mirror of
https://github.com/golang/sys.git
synced 2026-02-08 03:36:03 +03:00
unix: fix TestSCMCredentials after CL 272226
After CL 42765 (*net.UnixConn).ReadMsgUnix returns flags with MSG_CMSG_CLOEXEC set. Adjust TestSCMCredentials accordingly. Change-Id: Id7da35bbd94c51433f5f27a0e04827795826c02e Reviewed-on: https://go-review.googlesource.com/c/sys/+/311390 Trust: Tobias Klauser <tobias.klauser@gmail.com> Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com> TryBot-Result: Go Bot <gobot@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org>
This commit is contained in:
committed by
Tobias Klauser
parent
93ed5bcd2b
commit
ac73e9fd89
@@ -89,8 +89,8 @@ func TestSCMCredentials(t *testing.T) {
|
||||
if err != nil {
|
||||
t.Fatalf("ReadMsgUnix: %v", err)
|
||||
}
|
||||
if flags != 0 {
|
||||
t.Fatalf("ReadMsgUnix flags = 0x%x, want 0", flags)
|
||||
if flags != 0 && flags != unix.MSG_CMSG_CLOEXEC {
|
||||
t.Fatalf("ReadMsgUnix flags = %#x, want 0 or %#x (MSG_CMSG_CLOEXEC)", flags, unix.MSG_CMSG_CLOEXEC)
|
||||
}
|
||||
if n != tt.dataLen {
|
||||
t.Fatalf("ReadMsgUnix n = %d, want %d", n, tt.dataLen)
|
||||
|
||||
Reference in New Issue
Block a user