diff options
| author | Ondřej Surý <ondrej@sury.org> | 2012-02-29 11:23:13 +0100 |
|---|---|---|
| committer | Ondřej Surý <ondrej@sury.org> | 2012-02-29 11:23:13 +0100 |
| commit | b6d7097a0d6072199f2cd74d67404890697cf78a (patch) | |
| tree | a2193c528a79fd5606507568859ee5067c6b86e4 /src/pkg/net/server_test.go | |
| parent | 4cecda6c347bd6902b960c6a35a967add7070b0d (diff) | |
| download | golang-b6d7097a0d6072199f2cd74d67404890697cf78a.tar.gz | |
Imported Upstream version 2012.02.22upstream-weekly/2012.02.22
Diffstat (limited to 'src/pkg/net/server_test.go')
| -rw-r--r-- | src/pkg/net/server_test.go | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/src/pkg/net/server_test.go b/src/pkg/net/server_test.go index b0b546be3..b98621681 100644 --- a/src/pkg/net/server_test.go +++ b/src/pkg/net/server_test.go @@ -83,7 +83,7 @@ func connect(t *testing.T, network, addr string, isEmpty bool) { } // Send explicit ending for unixpacket. - // Older Linux kernels do stop reads on close. + // Older Linux kernels do not stop reads on close. if network == "unixpacket" { fd.Write([]byte("END")) } @@ -95,7 +95,7 @@ func doTest(t *testing.T, network, listenaddr, dialaddr string) { t.Logf("Test %q %q %q", network, listenaddr, dialaddr) switch listenaddr { case "", "0.0.0.0", "[::]", "[::ffff:0.0.0.0]": - if testing.Short() || avoidMacFirewall { + if testing.Short() || !*testExternal { t.Logf("skip wildcard listen during short test") return } @@ -115,16 +115,13 @@ func doTest(t *testing.T, network, listenaddr, dialaddr string) { } func TestTCPServer(t *testing.T) { - if runtime.GOOS != "openbsd" { - doTest(t, "tcp", "", "127.0.0.1") - } + doTest(t, "tcp", "", "127.0.0.1") doTest(t, "tcp", "0.0.0.0", "127.0.0.1") doTest(t, "tcp", "127.0.0.1", "127.0.0.1") doTest(t, "tcp4", "", "127.0.0.1") doTest(t, "tcp4", "0.0.0.0", "127.0.0.1") doTest(t, "tcp4", "127.0.0.1", "127.0.0.1") if supportsIPv6 { - doTest(t, "tcp", "", "[::1]") doTest(t, "tcp", "[::]", "[::1]") doTest(t, "tcp", "[::1]", "[::1]") doTest(t, "tcp6", "", "[::1]") |
