diff --git a/src/pkg/net/multicast_test.go b/src/pkg/net/multicast_test.go index 1eb6a420dc7..8ff02a3c933 100644 --- a/src/pkg/net/multicast_test.go +++ b/src/pkg/net/multicast_test.go @@ -93,7 +93,7 @@ var ipv6MulticastListenerTests = []struct { // port. func TestIPv6MulticastListener(t *testing.T) { switch runtime.GOOS { - case "plan9", "solaris", "windows": + case "plan9", "solaris": t.Skipf("skipping test on %q", runtime.GOOS) } if !supportsIPv6 { diff --git a/src/pkg/net/unicast_posix_test.go b/src/pkg/net/unicast_posix_test.go index a8855cab7da..b0588f4e529 100644 --- a/src/pkg/net/unicast_posix_test.go +++ b/src/pkg/net/unicast_posix_test.go @@ -45,7 +45,7 @@ var listenerTests = []struct { // same port. func TestTCPListener(t *testing.T) { switch runtime.GOOS { - case "plan9", "windows": + case "plan9": t.Skipf("skipping test on %q", runtime.GOOS) } @@ -69,7 +69,7 @@ func TestTCPListener(t *testing.T) { // same port. func TestUDPListener(t *testing.T) { switch runtime.GOOS { - case "plan9", "windows": + case "plan9": t.Skipf("skipping test on %q", runtime.GOOS) } @@ -101,63 +101,6 @@ func TestUDPListener(t *testing.T) { } } -func TestSimpleTCPListener(t *testing.T) { - switch runtime.GOOS { - case "plan9": - t.Skipf("skipping test on %q", runtime.GOOS) - return - } - - for _, tt := range listenerTests { - if tt.wildcard && (testing.Short() || !*testExternal) { - continue - } - if tt.ipv6 { - continue - } - l1, port := usableListenPort(t, tt.net, tt.laddr) - checkFirstListener(t, tt.net, tt.laddr+":"+port, l1) - l2, err := Listen(tt.net, tt.laddr+":"+port) - checkSecondListener(t, tt.net, tt.laddr+":"+port, err, l2) - l1.Close() - } -} - -func TestSimpleUDPListener(t *testing.T) { - switch runtime.GOOS { - case "plan9": - t.Skipf("skipping test on %q", runtime.GOOS) - return - } - - toudpnet := func(net string) string { - switch net { - case "tcp": - return "udp" - case "tcp4": - return "udp4" - case "tcp6": - return "udp6" - } - return "" - } - - for _, tt := range listenerTests { - if tt.wildcard && (testing.Short() || !*testExternal) { - continue - } - if tt.ipv6 { - continue - } - tt.net = toudpnet(tt.net) - l1, port := usableListenPacketPort(t, tt.net, tt.laddr) - checkFirstListener(t, tt.net, tt.laddr+":"+port, l1) - l2, err := ListenPacket(tt.net, tt.laddr+":"+port) - checkSecondListener(t, tt.net, tt.laddr+":"+port, err, l2) - l1.Close() - } -} - var dualStackListenerTests = []struct { net1 string // first listener laddr1 string @@ -231,7 +174,7 @@ func TestDualStackTCPListener(t *testing.T) { t.Skipf("skipping test on %q", runtime.GOOS) } if !supportsIPv6 { - return + t.Skip("ipv6 is not supported") } for _, tt := range dualStackListenerTests { @@ -263,7 +206,7 @@ func TestDualStackUDPListener(t *testing.T) { t.Skipf("skipping test on %q", runtime.GOOS) } if !supportsIPv6 { - return + t.Skip("ipv6 is not supported") } toudpnet := func(net string) string {