2
2
mirror of https://github.com/octoleo/restic.git synced 2024-11-29 16:23:59 +00:00

Merge pull request #1611 from qbit/master

On OpenBSD only root can set sticky bit
This commit is contained in:
Alexander Neumann 2018-02-18 12:57:54 +01:00
commit be02008025

View File

@ -209,10 +209,13 @@ func TestNodeRestoreAt(t *testing.T) {
rtest.Assert(t, test.GID == n2.GID, rtest.Assert(t, test.GID == n2.GID,
"%v: GID doesn't match (%v != %v)", test.Type, test.GID, n2.GID) "%v: GID doesn't match (%v != %v)", test.Type, test.GID, n2.GID)
if test.Type != "symlink" { if test.Type != "symlink" {
// On OpenBSD only root can set sticky bit (see sticky(8)).
if runtime.GOOS != "openbsd" && test.Name == "testSticky" {
rtest.Assert(t, test.Mode == n2.Mode, rtest.Assert(t, test.Mode == n2.Mode,
"%v: mode doesn't match (0%o != 0%o)", test.Type, test.Mode, n2.Mode) "%v: mode doesn't match (0%o != 0%o)", test.Type, test.Mode, n2.Mode)
} }
} }
}
AssertFsTimeEqual(t, "AccessTime", test.Type, test.AccessTime, n2.AccessTime) AssertFsTimeEqual(t, "AccessTime", test.Type, test.AccessTime, n2.AccessTime)
AssertFsTimeEqual(t, "ModTime", test.Type, test.ModTime, n2.ModTime) AssertFsTimeEqual(t, "ModTime", test.Type, test.ModTime, n2.ModTime)