summaryrefslogtreecommitdiffstats
path: root/llgo/third_party/gofrontend/libgo/go/syscall/creds_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'llgo/third_party/gofrontend/libgo/go/syscall/creds_test.go')
-rw-r--r--llgo/third_party/gofrontend/libgo/go/syscall/creds_test.go8
1 files changed, 7 insertions, 1 deletions
diff --git a/llgo/third_party/gofrontend/libgo/go/syscall/creds_test.go b/llgo/third_party/gofrontend/libgo/go/syscall/creds_test.go
index b1894c66b07..b4a14ff4dd9 100644
--- a/llgo/third_party/gofrontend/libgo/go/syscall/creds_test.go
+++ b/llgo/third_party/gofrontend/libgo/go/syscall/creds_test.go
@@ -56,7 +56,13 @@ func TestSCMCredentials(t *testing.T) {
ucred.Gid = 0
oob := syscall.UnixCredentials(&ucred)
_, _, err := cli.(*net.UnixConn).WriteMsgUnix(nil, oob, nil)
- if err.(*net.OpError).Err != syscall.EPERM {
+ if op, ok := err.(*net.OpError); ok {
+ err = op.Err
+ }
+ if sys, ok := err.(*os.SyscallError); ok {
+ err = sys.Err
+ }
+ if err != syscall.EPERM {
t.Fatalf("WriteMsgUnix failed with %v, want EPERM", err)
}
}
OpenPOWER on IntegriCloud