diff options
Diffstat (limited to 'src/net')
49 files changed, 65 insertions, 135 deletions
diff --git a/src/net/dial_test.go b/src/net/dial_test.go index 1bf96fd3ce..5a8d0e09ca 100644 --- a/src/net/dial_test.go +++ b/src/net/dial_test.go @@ -763,11 +763,6 @@ func TestDialCancel(t *testing.T) { } mustHaveExternalNetwork(t) - if runtime.GOOS == "nacl" { - // nacl doesn't have external network access. - t.Skipf("skipping on %s", runtime.GOOS) - } - blackholeIPPort := JoinHostPort(slowDst4, "1234") if !supportsIPv4() { blackholeIPPort = JoinHostPort(slowDst6, "1234") @@ -923,7 +918,7 @@ func TestDialListenerAddr(t *testing.T) { func TestDialerControl(t *testing.T) { switch runtime.GOOS { - case "nacl", "plan9": + case "plan9": t.Skipf("not supported on %s", runtime.GOOS) } diff --git a/src/net/error_nacl.go b/src/net/error_nacl.go deleted file mode 100644 index caad133b77..0000000000 --- a/src/net/error_nacl.go +++ /dev/null @@ -1,9 +0,0 @@ -// Copyright 2018 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package net - -func isConnError(err error) bool { - return false -} diff --git a/src/net/error_posix.go b/src/net/error_posix.go index 70efa4c66f..d709a273b7 100644 --- a/src/net/error_posix.go +++ b/src/net/error_posix.go @@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. -// +build aix darwin dragonfly freebsd js,wasm linux nacl netbsd openbsd solaris windows +// +build aix darwin dragonfly freebsd js,wasm linux netbsd openbsd solaris windows package net diff --git a/src/net/error_test.go b/src/net/error_test.go index c4fee5aa5e..89dcc2e6e6 100644 --- a/src/net/error_test.go +++ b/src/net/error_test.go @@ -185,7 +185,7 @@ func TestDialError(t *testing.T) { func TestProtocolDialError(t *testing.T) { switch runtime.GOOS { - case "nacl", "solaris", "illumos": + case "solaris", "illumos": t.Skipf("not supported on %s", runtime.GOOS) } @@ -214,7 +214,7 @@ func TestProtocolDialError(t *testing.T) { func TestDialAddrError(t *testing.T) { switch runtime.GOOS { - case "nacl", "plan9": + case "plan9": t.Skipf("not supported on %s", runtime.GOOS) } if !supportsIPv4() || !supportsIPv6() { @@ -376,7 +376,7 @@ func TestListenPacketError(t *testing.T) { func TestProtocolListenError(t *testing.T) { switch runtime.GOOS { - case "nacl", "plan9": + case "plan9": t.Skipf("not supported on %s", runtime.GOOS) } diff --git a/src/net/fd_unix.go b/src/net/fd_unix.go index 4f59871f49..a6d6453810 100644 --- a/src/net/fd_unix.go +++ b/src/net/fd_unix.go @@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. -// +build aix darwin dragonfly freebsd linux nacl netbsd openbsd solaris +// +build aix darwin dragonfly freebsd linux netbsd openbsd solaris package net diff --git a/src/net/file.go b/src/net/file.go index 81a44e1f3f..c13332c188 100644 --- a/src/net/file.go +++ b/src/net/file.go @@ -6,7 +6,7 @@ package net import "os" -// BUG(mikio): On JS, NaCl and Windows, the FileConn, FileListener and +// BUG(mikio): On JS and Windows, the FileConn, FileListener and // FilePacketConn functions are not implemented. type fileAddr string diff --git a/src/net/file_stub.go b/src/net/file_stub.go index 2256608365..bfb8100f53 100644 --- a/src/net/file_stub.go +++ b/src/net/file_stub.go @@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. -// +build nacl js,wasm +// +build js,wasm package net diff --git a/src/net/file_test.go b/src/net/file_test.go index cd717747af..8c09c0da1b 100644 --- a/src/net/file_test.go +++ b/src/net/file_test.go @@ -31,7 +31,7 @@ var fileConnTests = []struct { func TestFileConn(t *testing.T) { switch runtime.GOOS { - case "nacl", "plan9", "windows": + case "plan9", "windows": t.Skipf("not supported on %s", runtime.GOOS) } @@ -138,7 +138,7 @@ var fileListenerTests = []struct { func TestFileListener(t *testing.T) { switch runtime.GOOS { - case "nacl", "plan9", "windows": + case "plan9", "windows": t.Skipf("not supported on %s", runtime.GOOS) } @@ -230,7 +230,7 @@ var filePacketConnTests = []struct { func TestFilePacketConn(t *testing.T) { switch runtime.GOOS { - case "nacl", "plan9", "windows": + case "plan9", "windows": t.Skipf("not supported on %s", runtime.GOOS) } @@ -297,7 +297,7 @@ func TestFilePacketConn(t *testing.T) { // Issue 24483. func TestFileCloseRace(t *testing.T) { switch runtime.GOOS { - case "nacl", "plan9", "windows": + case "plan9", "windows": t.Skipf("not supported on %s", runtime.GOOS) } if !testableNetwork("tcp") { diff --git a/src/net/hook_unix.go b/src/net/hook_unix.go index a1568319f3..a28f1e066d 100644 --- a/src/net/hook_unix.go +++ b/src/net/hook_unix.go @@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. -// +build aix darwin dragonfly freebsd js,wasm linux nacl netbsd openbsd solaris +// +build aix darwin dragonfly freebsd js,wasm linux netbsd openbsd solaris package net diff --git a/src/net/interface.go b/src/net/interface.go index 58248560a2..914aaa010f 100644 --- a/src/net/interface.go +++ b/src/net/interface.go @@ -10,7 +10,7 @@ import ( "time" ) -// BUG(mikio): On JS and NaCl, methods and functions related to +// BUG(mikio): On JS, methods and functions related to // Interface are not implemented. // BUG(mikio): On AIX, DragonFly BSD, NetBSD, OpenBSD, Plan 9 and diff --git a/src/net/interface_stub.go b/src/net/interface_stub.go index 0afaa80d63..ec58665e19 100644 --- a/src/net/interface_stub.go +++ b/src/net/interface_stub.go @@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. -// +build nacl js,wasm +// +build js,wasm package net diff --git a/src/net/interface_test.go b/src/net/interface_test.go index 6cdfb6265f..c34cd7432f 100644 --- a/src/net/interface_test.go +++ b/src/net/interface_test.go @@ -290,7 +290,7 @@ func checkUnicastStats(ifStats *ifStats, uniStats *routeStats) error { func checkMulticastStats(ifStats *ifStats, uniStats, multiStats *routeStats) error { switch runtime.GOOS { - case "aix", "dragonfly", "nacl", "netbsd", "openbsd", "plan9", "solaris", "illumos": + case "aix", "dragonfly", "netbsd", "openbsd", "plan9", "solaris", "illumos": default: // Test the existence of connected multicast route // clones for IPv4. Unlike IPv6, IPv4 multicast diff --git a/src/net/internal/socktest/switch_unix.go b/src/net/internal/socktest/switch_unix.go index 0626aa06c0..7dc3518410 100644 --- a/src/net/internal/socktest/switch_unix.go +++ b/src/net/internal/socktest/switch_unix.go @@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. -// +build aix darwin dragonfly freebsd js,wasm linux nacl netbsd openbsd solaris +// +build aix darwin dragonfly freebsd js,wasm linux netbsd openbsd solaris package socktest diff --git a/src/net/internal/socktest/sys_unix.go b/src/net/internal/socktest/sys_unix.go index b96075bfe4..0525512bff 100644 --- a/src/net/internal/socktest/sys_unix.go +++ b/src/net/internal/socktest/sys_unix.go @@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. -// +build aix darwin dragonfly freebsd js,wasm linux nacl netbsd openbsd solaris +// +build aix darwin dragonfly freebsd js,wasm linux netbsd openbsd solaris package socktest diff --git a/src/net/iprawsock.go b/src/net/iprawsock.go index 8a9c26559b..f18331a1fd 100644 --- a/src/net/iprawsock.go +++ b/src/net/iprawsock.go @@ -21,7 +21,7 @@ import ( // change the behavior of these methods; use Read or ReadMsgIP // instead. -// BUG(mikio): On JS, NaCl and Plan 9, methods and functions related +// BUG(mikio): On JS and Plan 9, methods and functions related // to IPConn are not implemented. // BUG(mikio): On Windows, the File method of IPConn is not diff --git a/src/net/iprawsock_posix.go b/src/net/iprawsock_posix.go index 2a5d49f490..e653f6ae17 100644 --- a/src/net/iprawsock_posix.go +++ b/src/net/iprawsock_posix.go @@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. -// +build aix darwin dragonfly freebsd js,wasm linux nacl netbsd openbsd solaris windows +// +build aix darwin dragonfly freebsd js,wasm linux netbsd openbsd solaris windows package net diff --git a/src/net/ipsock_posix.go b/src/net/ipsock_posix.go index 947f4ef614..5570ed118d 100644 --- a/src/net/ipsock_posix.go +++ b/src/net/ipsock_posix.go @@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. -// +build aix darwin dragonfly freebsd js,wasm linux nacl netbsd openbsd solaris windows +// +build aix darwin dragonfly freebsd js,wasm linux netbsd openbsd solaris windows package net @@ -134,7 +134,7 @@ func favoriteAddrFamily(network string, laddr, raddr sockaddr, mode string) (fam } func internetSocket(ctx context.Context, net string, laddr, raddr sockaddr, sotype, proto int, mode string, ctrlFn func(string, string, syscall.RawConn) error) (fd *netFD, err error) { - if (runtime.GOOS == "aix" || runtime.GOOS == "windows" || runtime.GOOS == "openbsd" || runtime.GOOS == "nacl") && mode == "dial" && raddr.isWildcard() { + if (runtime.GOOS == "aix" || runtime.GOOS == "windows" || runtime.GOOS == "openbsd") && mode == "dial" && raddr.isWildcard() { raddr = raddr.toLocal(net) } family, ipv6only := favoriteAddrFamily(net, laddr, raddr, mode) diff --git a/src/net/listen_test.go b/src/net/listen_test.go index fef2b6405f..d8c72096ed 100644 --- a/src/net/listen_test.go +++ b/src/net/listen_test.go @@ -224,7 +224,7 @@ var dualStackTCPListenerTests = []struct { // to be greater than or equal to 4.4. func TestDualStackTCPListener(t *testing.T) { switch runtime.GOOS { - case "nacl", "plan9": + case "plan9": t.Skipf("not supported on %s", runtime.GOOS) } if !supportsIPv4() || !supportsIPv6() { @@ -314,7 +314,7 @@ var dualStackUDPListenerTests = []struct { // to be greater than or equal to 4.4. func TestDualStackUDPListener(t *testing.T) { switch runtime.GOOS { - case "nacl", "plan9": + case "plan9": t.Skipf("not supported on %s", runtime.GOOS) } if !supportsIPv4() || !supportsIPv6() { @@ -532,7 +532,7 @@ func TestIPv4MulticastListener(t *testing.T) { testenv.MustHaveExternalNetwork(t) switch runtime.GOOS { - case "android", "nacl", "plan9": + case "android", "plan9": t.Skipf("not supported on %s", runtime.GOOS) case "solaris", "illumos": t.Skipf("not supported on solaris or illumos, see golang.org/issue/7399") @@ -733,7 +733,7 @@ func TestClosingListener(t *testing.T) { func TestListenConfigControl(t *testing.T) { switch runtime.GOOS { - case "nacl", "plan9": + case "plan9": t.Skipf("not supported on %s", runtime.GOOS) } diff --git a/src/net/lookup.go b/src/net/lookup.go index 24d0d25c3a..9cebd10c87 100644 --- a/src/net/lookup.go +++ b/src/net/lookup.go @@ -27,8 +27,7 @@ var protocols = map[string]int{ } // services contains minimal mappings between services names and port -// numbers for platforms that don't have a complete list of port numbers -// (some Solaris distros, nacl, etc). +// numbers for platforms that don't have a complete list of port numbers. // // See https://www.iana.org/assignments/service-names-port-numbers // diff --git a/src/net/lookup_fake.go b/src/net/lookup_fake.go index 6c8a151bca..3b3c39bc7d 100644 --- a/src/net/lookup_fake.go +++ b/src/net/lookup_fake.go @@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. -// +build nacl js,wasm +// +build js,wasm package net diff --git a/src/net/lookup_test.go b/src/net/lookup_test.go index e85605fa2f..b933291cea 100644 --- a/src/net/lookup_test.go +++ b/src/net/lookup_test.go @@ -858,10 +858,6 @@ func TestLookupProtocol_Minimal(t *testing.T) { } func TestLookupNonLDH(t *testing.T) { - if runtime.GOOS == "nacl" { - t.Skip("skip on nacl") - } - defer dnsWaitGroup.Wait() if fixup := forceGoDNS(); fixup != nil { @@ -886,10 +882,6 @@ func TestLookupNonLDH(t *testing.T) { func TestLookupContextCancel(t *testing.T) { mustHaveExternalNetwork(t) - if runtime.GOOS == "nacl" { - t.Skip("skip on nacl") - } - defer dnsWaitGroup.Wait() ctx, ctxCancel := context.WithCancel(context.Background()) @@ -911,9 +903,6 @@ func TestLookupContextCancel(t *testing.T) { // crashes if nil is used. func TestNilResolverLookup(t *testing.T) { mustHaveExternalNetwork(t) - if runtime.GOOS == "nacl" { - t.Skip("skip on nacl") - } var r *Resolver = nil ctx := context.Background() @@ -933,10 +922,6 @@ func TestNilResolverLookup(t *testing.T) { // canceled lookups (see golang.org/issue/24178 for details). func TestLookupHostCancel(t *testing.T) { mustHaveExternalNetwork(t) - if runtime.GOOS == "nacl" { - t.Skip("skip on nacl") - } - const ( google = "www.google.com" invalidDomain = "invalid.invalid" // RFC 2606 reserves .invalid diff --git a/src/net/main_conf_test.go b/src/net/main_conf_test.go index b535046bda..a92dff56c2 100644 --- a/src/net/main_conf_test.go +++ b/src/net/main_conf_test.go @@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. -// +build !js,!nacl,!plan9,!windows +// +build !js,!plan9,!windows package net diff --git a/src/net/main_noconf_test.go b/src/net/main_noconf_test.go index 55e3770835..bac84aa300 100644 --- a/src/net/main_noconf_test.go +++ b/src/net/main_noconf_test.go @@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. -// +build js,wasm nacl plan9 windows +// +build js,wasm plan9 windows package net diff --git a/src/net/main_unix_test.go b/src/net/main_unix_test.go index 34a8a104e8..8b9897699c 100644 --- a/src/net/main_unix_test.go +++ b/src/net/main_unix_test.go @@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. -// +build aix darwin dragonfly freebsd linux nacl netbsd openbsd solaris +// +build aix darwin dragonfly freebsd linux netbsd openbsd solaris package net diff --git a/src/net/net_test.go b/src/net/net_test.go index 463ae8856d..a7406740f5 100644 --- a/src/net/net_test.go +++ b/src/net/net_test.go @@ -72,7 +72,7 @@ func TestCloseRead(t *testing.T) { func TestCloseWrite(t *testing.T) { switch runtime.GOOS { - case "nacl", "plan9": + case "plan9": t.Skipf("not supported on %s", runtime.GOOS) } @@ -285,7 +285,6 @@ func TestPacketConnClose(t *testing.T) { } } -// nacl was previous failing to reuse an address. func TestListenCloseListen(t *testing.T) { const maxTries = 10 for tries := 0; tries < maxTries; tries++ { @@ -302,7 +301,7 @@ func TestListenCloseListen(t *testing.T) { } ln, err = Listen("tcp", addr) if err == nil { - // Success. nacl couldn't do this before. + // Success. (This test didn't always make it here earlier.) ln.Close() return } @@ -541,7 +540,7 @@ func TestNotTemporaryRead(t *testing.T) { if err == nil { return errors.New("Read succeeded unexpectedly") } else if err == io.EOF { - // This happens on NaCl and Plan 9. + // This happens on Plan 9. return nil } else if ne, ok := err.(Error); !ok { return fmt.Errorf("unexpected error %v", err) diff --git a/src/net/platform_test.go b/src/net/platform_test.go index 10f55c971d..d35dfaade3 100644 --- a/src/net/platform_test.go +++ b/src/net/platform_test.go @@ -37,13 +37,9 @@ func testableNetwork(network string) bool { ss := strings.Split(network, ":") switch ss[0] { case "ip+nopriv": - switch runtime.GOOS { - case "nacl": - return false - } case "ip", "ip4", "ip6": switch runtime.GOOS { - case "nacl", "plan9": + case "plan9": return false default: if os.Getuid() != 0 { @@ -52,7 +48,7 @@ func testableNetwork(network string) bool { } case "unix", "unixgram": switch runtime.GOOS { - case "android", "nacl", "plan9", "windows": + case "android", "plan9", "windows": return false case "aix": return unixEnabledOnAIX @@ -63,7 +59,7 @@ func testableNetwork(network string) bool { } case "unixpacket": switch runtime.GOOS { - case "aix", "android", "darwin", "nacl", "plan9", "windows": + case "aix", "android", "darwin", "plan9", "windows": return false case "netbsd": // It passes on amd64 at least. 386 fails (Issue 22927). arm is unknown. diff --git a/src/net/port_unix.go b/src/net/port_unix.go index a6153c0c20..4fdd9a37bc 100644 --- a/src/net/port_unix.go +++ b/src/net/port_unix.go @@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. -// +build aix darwin dragonfly freebsd js,wasm linux netbsd openbsd solaris nacl +// +build aix darwin dragonfly freebsd js,wasm linux netbsd openbsd solaris // Read system port mappings from /etc/services diff --git a/src/net/rawconn.go b/src/net/rawconn.go index c40ea4a2e1..c786354582 100644 --- a/src/net/rawconn.go +++ b/src/net/rawconn.go @@ -15,7 +15,7 @@ import ( // deadlines. If the user-provided callback returns false, the Write // method will fail immediately. -// BUG(mikio): On JS, NaCl and Plan 9, the Control, Read and Write +// BUG(mikio): On JS and Plan 9, the Control, Read and Write // methods of syscall.RawConn are not implemented. type rawConn struct { diff --git a/src/net/rawconn_stub_test.go b/src/net/rawconn_stub_test.go index 0a033c12fc..cec977f75d 100644 --- a/src/net/rawconn_stub_test.go +++ b/src/net/rawconn_stub_test.go @@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. -// +build js,wasm nacl plan9 +// +build js,wasm plan9 package net diff --git a/src/net/rawconn_test.go b/src/net/rawconn_test.go index 11900dff8d..9a82f8f78e 100644 --- a/src/net/rawconn_test.go +++ b/src/net/rawconn_test.go @@ -15,7 +15,7 @@ import ( func TestRawConnReadWrite(t *testing.T) { switch runtime.GOOS { - case "nacl", "plan9": + case "plan9": t.Skipf("not supported on %s", runtime.GOOS) } @@ -175,7 +175,7 @@ func TestRawConnReadWrite(t *testing.T) { func TestRawConnControl(t *testing.T) { switch runtime.GOOS { - case "nacl", "plan9": + case "plan9": t.Skipf("not supported on %s", runtime.GOOS) } diff --git a/src/net/sendfile_stub.go b/src/net/sendfile_stub.go index 6d338da454..53bc53af43 100644 --- a/src/net/sendfile_stub.go +++ b/src/net/sendfile_stub.go @@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. -// +build aix darwin js,wasm nacl netbsd openbsd +// +build aix darwin js,wasm netbsd openbsd package net diff --git a/src/net/sendfile_test.go b/src/net/sendfile_test.go index 911e6139c5..13842a1261 100644 --- a/src/net/sendfile_test.go +++ b/src/net/sendfile_test.go @@ -218,7 +218,7 @@ func TestSendfileSeeked(t *testing.T) { // Test that sendfile doesn't put a pipe into blocking mode. func TestSendfilePipe(t *testing.T) { switch runtime.GOOS { - case "nacl", "plan9", "windows": + case "plan9", "windows": // These systems don't support deadlines on pipes. t.Skipf("skipping on %s", runtime.GOOS) } diff --git a/src/net/sock_posix.go b/src/net/sock_posix.go index 00ee61883c..80b4169ec6 100644 --- a/src/net/sock_posix.go +++ b/src/net/sock_posix.go @@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. -// +build aix darwin dragonfly freebsd linux nacl netbsd openbsd solaris windows +// +build aix darwin dragonfly freebsd linux netbsd openbsd solaris windows package net diff --git a/src/net/sock_stub.go b/src/net/sock_stub.go index bbce61b687..c9f86af4e7 100644 --- a/src/net/sock_stub.go +++ b/src/net/sock_stub.go @@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. -// +build aix nacl js,wasm solaris +// +build aix js,wasm solaris package net diff --git a/src/net/sockaddr_posix.go b/src/net/sockaddr_posix.go index ae83b5ab19..a3710dd3f7 100644 --- a/src/net/sockaddr_posix.go +++ b/src/net/sockaddr_posix.go @@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. -// +build aix darwin dragonfly freebsd js,wasm linux nacl netbsd openbsd solaris windows +// +build aix darwin dragonfly freebsd js,wasm linux netbsd openbsd solaris windows package net diff --git a/src/net/sockopt_stub.go b/src/net/sockopt_stub.go index bc0667504a..52624a35d8 100644 --- a/src/net/sockopt_stub.go +++ b/src/net/sockopt_stub.go @@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. -// +build nacl js,wasm +// +build js,wasm package net diff --git a/src/net/sockoptip_stub.go b/src/net/sockoptip_stub.go index 3297969314..57cd289040 100644 --- a/src/net/sockoptip_stub.go +++ b/src/net/sockoptip_stub.go @@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. -// +build nacl js,wasm +// +build js,wasm package net diff --git a/src/net/sys_cloexec.go b/src/net/sys_cloexec.go index e97fb21a1f..89aad7066a 100644 --- a/src/net/sys_cloexec.go +++ b/src/net/sys_cloexec.go @@ -5,7 +5,7 @@ // This file implements sysSocket and accept for platforms that do not // provide a fast path for setting SetNonblock and CloseOnExec. -// +build aix darwin nacl solaris +// +build aix darwin solaris package net diff --git a/src/net/tcpsock.go b/src/net/tcpsock.go index b7b73d0d81..9a9b03a1e8 100644 --- a/src/net/tcpsock.go +++ b/src/net/tcpsock.go @@ -12,7 +12,7 @@ import ( "time" ) -// BUG(mikio): On JS, NaCl and Windows, the File method of TCPConn and +// BUG(mikio): On JS and Windows, the File method of TCPConn and // TCPListener is not implemented. // TCPAddr represents the address of a TCP end point. diff --git a/src/net/tcpsock_posix.go b/src/net/tcpsock_posix.go index e32d5d7ee3..257c11976f 100644 --- a/src/net/tcpsock_posix.go +++ b/src/net/tcpsock_posix.go @@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. -// +build aix darwin dragonfly freebsd js,wasm linux nacl netbsd openbsd solaris windows +// +build aix darwin dragonfly freebsd js,wasm linux netbsd openbsd solaris windows package net diff --git a/src/net/tcpsock_test.go b/src/net/tcpsock_test.go index f78675b185..8a70496693 100644 --- a/src/net/tcpsock_test.go +++ b/src/net/tcpsock_test.go @@ -476,10 +476,6 @@ func TestTCPReadWriteAllocs(t *testing.T) { // I/O on Plan 9 allocates memory. // See net/fd_io_plan9.go. t.Skipf("not supported on %s", runtime.GOOS) - case "nacl": - // NaCl needs to allocate pseudo file descriptor - // stuff. See syscall/fd_nacl.go. - t.Skipf("not supported on %s", runtime.GOOS) } ln, err := Listen("tcp", "127.0.0.1:0") diff --git a/src/net/tcpsockopt_stub.go b/src/net/tcpsockopt_stub.go index fd7f57923b..d043da123d 100644 --- a/src/net/tcpsockopt_stub.go +++ b/src/net/tcpsockopt_stub.go @@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. -// +build nacl js,wasm +// +build js,wasm package net diff --git a/src/net/timeout_test.go b/src/net/timeout_test.go index b4fc2c0198..e90c16f34b 100644 --- a/src/net/timeout_test.go +++ b/src/net/timeout_test.go @@ -411,9 +411,6 @@ func TestReadTimeoutMustNotReturn(t *testing.T) { if perr := parseReadError(err); perr != nil { t.Error(perr) } - if err == io.EOF && runtime.GOOS == "nacl" { // see golang.org/issue/8044 - return - } if nerr, ok := err.(Error); !ok || nerr.Timeout() || nerr.Temporary() { t.Fatal(err) } @@ -432,11 +429,6 @@ var readFromTimeoutTests = []struct { } func TestReadFromTimeout(t *testing.T) { - switch runtime.GOOS { - case "nacl": - t.Skipf("not supported on %s", runtime.GOOS) // see golang.org/issue/8916 - } - ch := make(chan Addr) defer close(ch) handler := func(ls *localPacketServer, c PacketConn) { @@ -621,11 +613,6 @@ var writeToTimeoutTests = []struct { func TestWriteToTimeout(t *testing.T) { t.Parallel() - switch runtime.GOOS { - case "nacl": - t.Skipf("not supported on %s", runtime.GOOS) - } - c1, err := newLocalPacketListener("udp") if err != nil { t.Fatal(err) @@ -991,11 +978,6 @@ func TestReadWriteProlongedTimeout(t *testing.T) { func TestReadWriteDeadlineRace(t *testing.T) { t.Parallel() - switch runtime.GOOS { - case "nacl": - t.Skipf("not supported on %s", runtime.GOOS) - } - N := 1000 if testing.Short() { N = 50 diff --git a/src/net/udpsock.go b/src/net/udpsock.go index b234ed89ab..ec2bcfa607 100644 --- a/src/net/udpsock.go +++ b/src/net/udpsock.go @@ -9,15 +9,12 @@ import ( "syscall" ) -// BUG(mikio): On NaCl and Plan 9, the ReadMsgUDP and +// BUG(mikio): On Plan 9, the ReadMsgUDP and // WriteMsgUDP methods of UDPConn are not implemented. // BUG(mikio): On Windows, the File method of UDPConn is not // implemented. -// BUG(mikio): On NaCl, the ListenMulticastUDP function is not -// implemented. - // BUG(mikio): On JS, methods and functions related to UDPConn are not // implemented. diff --git a/src/net/udpsock_posix.go b/src/net/udpsock_posix.go index 611fe51df9..bbfa4ed9c7 100644 --- a/src/net/udpsock_posix.go +++ b/src/net/udpsock_posix.go @@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. -// +build aix darwin dragonfly freebsd js,wasm linux nacl netbsd openbsd solaris windows +// +build aix darwin dragonfly freebsd js,wasm linux netbsd openbsd solaris windows package net diff --git a/src/net/udpsock_test.go b/src/net/udpsock_test.go index 397b6649cd..947381a57b 100644 --- a/src/net/udpsock_test.go +++ b/src/net/udpsock_test.go @@ -162,13 +162,8 @@ func testWriteToConn(t *testing.T, raddr string) { t.Fatalf("should fail as ErrWriteToConnected: %v", err) } _, _, err = c.(*UDPConn).WriteMsgUDP(b, nil, nil) - switch runtime.GOOS { - case "nacl": // see golang.org/issue/9252 - t.Skipf("not implemented yet on %s", runtime.GOOS) - default: - if err != nil { - t.Fatal(err) - } + if err != nil { + t.Fatal(err) } } @@ -205,13 +200,8 @@ func testWriteToPacketConn(t *testing.T, raddr string) { t.Fatalf("should fail as errMissingAddress: %v", err) } _, _, err = c.(*UDPConn).WriteMsgUDP(b, nil, ra) - switch runtime.GOOS { - case "nacl": // see golang.org/issue/9252 - t.Skipf("not implemented yet on %s", runtime.GOOS) - default: - if err != nil { - t.Fatal(err) - } + if err != nil { + t.Fatal(err) } } @@ -335,7 +325,7 @@ func TestIPv6LinkLocalUnicastUDP(t *testing.T) { func TestUDPZeroBytePayload(t *testing.T) { switch runtime.GOOS { - case "nacl", "plan9": + case "plan9": t.Skipf("not supported on %s", runtime.GOOS) case "darwin": testenv.SkipFlaky(t, 29225) @@ -373,7 +363,7 @@ func TestUDPZeroBytePayload(t *testing.T) { func TestUDPZeroByteBuffer(t *testing.T) { switch runtime.GOOS { - case "nacl", "plan9": + case "plan9": t.Skipf("not supported on %s", runtime.GOOS) } @@ -410,7 +400,7 @@ func TestUDPZeroByteBuffer(t *testing.T) { func TestUDPReadSizeError(t *testing.T) { switch runtime.GOOS { - case "nacl", "plan9": + case "plan9": t.Skipf("not supported on %s", runtime.GOOS) } diff --git a/src/net/unixsock.go b/src/net/unixsock.go index ae912a46dd..b38438c11a 100644 --- a/src/net/unixsock.go +++ b/src/net/unixsock.go @@ -12,7 +12,7 @@ import ( "time" ) -// BUG(mikio): On JS, NaCl and Plan 9, methods and functions related +// BUG(mikio): On JS and Plan 9, methods and functions related // to UnixConn and UnixListener are not implemented. // BUG(mikio): On Windows, methods and functions related to UnixConn diff --git a/src/net/unixsock_posix.go b/src/net/unixsock_posix.go index 74f5cc231c..275c7c936d 100644 --- a/src/net/unixsock_posix.go +++ b/src/net/unixsock_posix.go @@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. -// +build aix darwin dragonfly freebsd js,wasm linux nacl netbsd openbsd solaris windows +// +build aix darwin dragonfly freebsd js,wasm linux netbsd openbsd solaris windows package net diff --git a/src/net/unixsock_test.go b/src/net/unixsock_test.go index 4828990310..80cccf21e3 100644 --- a/src/net/unixsock_test.go +++ b/src/net/unixsock_test.go @@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. -// +build !js,!nacl,!plan9,!windows +// +build !js,!plan9,!windows package net |