diff --git a/src/syscall/creds_test.go b/src/syscall/creds_test.go index 1ee56fc340..2fc61df1c5 100644 --- a/src/syscall/creds_test.go +++ b/src/syscall/creds_test.go @@ -77,8 +77,10 @@ func TestSCMCredentials(t *testing.T) { if sys, ok := err.(*os.SyscallError); ok { err = sys.Err } - if err != syscall.EPERM { - t.Fatalf("WriteMsgUnix failed with %v, want EPERM", err) + switch err { + case syscall.EPERM, syscall.EINVAL: + default: + t.Fatalf("WriteMsgUnix failed with %v, want EPERM or EINVAL", err) } }