mirror of https://github.com/golang/go.git
simplify the unit test for windows
This commit is contained in:
parent
40a763c3d1
commit
3dbcc8bded
|
|
@ -75,13 +75,12 @@ func TestUnixAbstractLongNameNullStart(t *testing.T) {
|
|||
t.Skip("unix test")
|
||||
}
|
||||
|
||||
addr := "\x00abstract_test"
|
||||
rsu := syscall.RawSockaddrUnix{}
|
||||
paddedAddr := make([]byte, len(rsu.Path))
|
||||
// Create an abstract socket name that starts with a null byte ("\x00")
|
||||
// whose length is the maximum of RawSockaddrUnix Path len
|
||||
paddedAddr := make([]byte, len(syscall.RawSockaddrUnix{}.Path))
|
||||
copy(paddedAddr, "\x00abstract_test")
|
||||
addr = string(paddedAddr)
|
||||
|
||||
la, err := ResolveUnixAddr("unix", addr)
|
||||
la, err := ResolveUnixAddr("unix", string(paddedAddr))
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue