Skip to content

Commit

Permalink
syscall: allow EINVAL in TestSCMCredentials
Browse files Browse the repository at this point in the history
This can occur on NixOS.

Change-Id: I0571b0cc5345d01396dca6a4116aa1024c390a5a
Reviewed-on: https://go-review.googlesource.com/c/go/+/393437
Trust: Josh Bleecher Snyder <[email protected]>
Run-TryBot: Josh Bleecher Snyder <[email protected]>
TryBot-Result: Gopher Robot <[email protected]>
Reviewed-by: Ian Lance Taylor <[email protected]>
  • Loading branch information
josharian committed Mar 17, 2022
1 parent 6686536 commit f839aaa
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/syscall/creds_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
}

Expand Down

0 comments on commit f839aaa

Please sign in to comment.