From 99d88ad29709c2021516c34d40821c39216daa40 Mon Sep 17 00:00:00 2001 From: Aaron Bieber Date: Sat, 10 Feb 2018 09:05:07 -0700 Subject: [PATCH] Disable the 'testSticky' test on OpenBSD. Only root can set sticky. --- internal/restic/node_test.go | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/internal/restic/node_test.go b/internal/restic/node_test.go index 6b0a19cd5..0b548323d 100644 --- a/internal/restic/node_test.go +++ b/internal/restic/node_test.go @@ -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) + } } }