Disable the 'testSticky' test on OpenBSD. Only root can set sticky.

This commit is contained in:
Aaron Bieber 2018-02-10 09:05:07 -07:00
parent 514f1b8917
commit 99d88ad297
No known key found for this signature in database
GPG Key ID: 279160AB1BE1236B
1 changed files with 5 additions and 2 deletions

View File

@ -209,8 +209,11 @@ func TestNodeRestoreAt(t *testing.T) {
rtest.Assert(t, test.GID == n2.GID,
"%v: GID doesn't match (%v != %v)", test.Type, test.GID, n2.GID)
if test.Type != "symlink" {
rtest.Assert(t, test.Mode == n2.Mode,
"%v: mode doesn't match (0%o != 0%o)", test.Type, test.Mode, n2.Mode)
// 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,
"%v: mode doesn't match (0%o != 0%o)", test.Type, test.Mode, n2.Mode)
}
}
}