diff options
author | Ian Lance Taylor <iant@golang.org> | 2022-02-11 14:53:56 -0800 |
---|---|---|
committer | Ian Lance Taylor <iant@golang.org> | 2022-02-11 15:01:19 -0800 |
commit | 8dc2499aa62f768c6395c9754b8cabc1ce25c494 (patch) | |
tree | 43d7fd2bbfd7ad8c9625a718a5e8718889351994 /libgo/go/net/unixsock_test.go | |
parent | 9a56779dbc4e2d9c15be8d31e36f2f59be7331a8 (diff) | |
download | gcc-8dc2499aa62f768c6395c9754b8cabc1ce25c494.zip gcc-8dc2499aa62f768c6395c9754b8cabc1ce25c494.tar.gz gcc-8dc2499aa62f768c6395c9754b8cabc1ce25c494.tar.bz2 |
libgo: update to Go1.18beta2
gotools/
* Makefile.am (go_cmd_cgo_files): Add ast_go118.go
(check-go-tool): Copy golang.org/x/tools directories.
* Makefile.in: Regenerate.
Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/384695
Diffstat (limited to 'libgo/go/net/unixsock_test.go')
-rw-r--r-- | libgo/go/net/unixsock_test.go | 32 |
1 files changed, 11 insertions, 21 deletions
diff --git a/libgo/go/net/unixsock_test.go b/libgo/go/net/unixsock_test.go index 71092e8..2fc9580 100644 --- a/libgo/go/net/unixsock_test.go +++ b/libgo/go/net/unixsock_test.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build !js && !plan9 && !windows -// +build !js,!plan9,!windows package net @@ -26,7 +25,7 @@ func TestReadUnixgramWithUnnamedSocket(t *testing.T) { testenv.SkipFlaky(t, 15157) } - addr := testUnixAddr() + addr := testUnixAddr(t) la, err := ResolveUnixAddr("unixgram", addr) if err != nil { t.Fatal(err) @@ -77,10 +76,7 @@ func TestUnixgramZeroBytePayload(t *testing.T) { t.Skip("unixgram test") } - c1, err := newLocalPacketListener("unixgram") - if err != nil { - t.Fatal(err) - } + c1 := newLocalPacketListener(t, "unixgram") defer os.Remove(c1.LocalAddr().String()) defer c1.Close() @@ -127,10 +123,7 @@ func TestUnixgramZeroByteBuffer(t *testing.T) { // issue 4352: Recvfrom failed with "address family not // supported by protocol family" if zero-length buffer provided - c1, err := newLocalPacketListener("unixgram") - if err != nil { - t.Fatal(err) - } + c1 := newLocalPacketListener(t, "unixgram") defer os.Remove(c1.LocalAddr().String()) defer c1.Close() @@ -175,7 +168,7 @@ func TestUnixgramWrite(t *testing.T) { t.Skip("unixgram test") } - addr := testUnixAddr() + addr := testUnixAddr(t) laddr, err := ResolveUnixAddr("unixgram", addr) if err != nil { t.Fatal(err) @@ -220,7 +213,7 @@ func testUnixgramWriteConn(t *testing.T, raddr *UnixAddr) { } func testUnixgramWritePacketConn(t *testing.T, raddr *UnixAddr) { - addr := testUnixAddr() + addr := testUnixAddr(t) c, err := ListenPacket("unixgram", addr) if err != nil { t.Fatal(err) @@ -249,9 +242,9 @@ func TestUnixConnLocalAndRemoteNames(t *testing.T) { } handler := func(ls *localServer, ln Listener) {} - for _, laddr := range []string{"", testUnixAddr()} { + for _, laddr := range []string{"", testUnixAddr(t)} { laddr := laddr - taddr := testUnixAddr() + taddr := testUnixAddr(t) ta, err := ResolveUnixAddr("unix", taddr) if err != nil { t.Fatal(err) @@ -260,10 +253,7 @@ func TestUnixConnLocalAndRemoteNames(t *testing.T) { if err != nil { t.Fatal(err) } - ls, err := (&streamListener{Listener: ln}).newLocalServer() - if err != nil { - t.Fatal(err) - } + ls := (&streamListener{Listener: ln}).newLocalServer() defer ls.teardown() if err := ls.buildup(handler); err != nil { t.Fatal(err) @@ -311,9 +301,9 @@ func TestUnixgramConnLocalAndRemoteNames(t *testing.T) { t.Skip("unixgram test") } - for _, laddr := range []string{"", testUnixAddr()} { + for _, laddr := range []string{"", testUnixAddr(t)} { laddr := laddr - taddr := testUnixAddr() + taddr := testUnixAddr(t) ta, err := ResolveUnixAddr("unixgram", taddr) if err != nil { t.Fatal(err) @@ -369,7 +359,7 @@ func TestUnixUnlink(t *testing.T) { if !testableNetwork("unix") { t.Skip("unix test") } - name := testUnixAddr() + name := testUnixAddr(t) listen := func(t *testing.T) *UnixListener { l, err := Listen("unix", name) |