mirror of
https://github.com/golang/net.git
synced 2026-03-31 02:17:08 +09:00
ipv6: remove unnecessary double quotations from test messages
Change-Id: I1d91ddf7fb4eebd4782f0621446ec2820d132788 Reviewed-on: https://go-review.googlesource.com/3562 Reviewed-by: Ian Lance Taylor <iant@golang.org>
This commit is contained in:
@@ -35,7 +35,7 @@ func TestICMPString(t *testing.T) {
|
||||
func TestICMPFilter(t *testing.T) {
|
||||
switch runtime.GOOS {
|
||||
case "nacl", "plan9", "solaris", "windows":
|
||||
t.Skipf("not supported on %q", runtime.GOOS)
|
||||
t.Skipf("not supported on %s", runtime.GOOS)
|
||||
}
|
||||
|
||||
var f ipv6.ICMPFilter
|
||||
@@ -62,7 +62,7 @@ func TestICMPFilter(t *testing.T) {
|
||||
func TestSetICMPFilter(t *testing.T) {
|
||||
switch runtime.GOOS {
|
||||
case "nacl", "plan9", "solaris", "windows":
|
||||
t.Skipf("not supported on %q", runtime.GOOS)
|
||||
t.Skipf("not supported on %s", runtime.GOOS)
|
||||
}
|
||||
if !supportsIPv6 {
|
||||
t.Skip("ipv6 is not supported")
|
||||
|
||||
@@ -31,16 +31,16 @@ func TestPacketConnReadWriteMulticastUDP(t *testing.T) {
|
||||
switch runtime.GOOS {
|
||||
case "freebsd": // due to a bug on loopback marking
|
||||
// See http://www.freebsd.org/cgi/query-pr.cgi?pr=180065.
|
||||
t.Skipf("not supported on %q", runtime.GOOS)
|
||||
t.Skipf("not supported on %s", runtime.GOOS)
|
||||
case "nacl", "plan9", "solaris", "windows":
|
||||
t.Skipf("not supported on %q", runtime.GOOS)
|
||||
t.Skipf("not supported on %s", runtime.GOOS)
|
||||
}
|
||||
if !supportsIPv6 {
|
||||
t.Skip("ipv6 is not supported")
|
||||
}
|
||||
ifi := nettest.RoutedInterface("ip6", net.FlagUp|net.FlagMulticast|net.FlagLoopback)
|
||||
if ifi == nil {
|
||||
t.Skipf("not available on %q", runtime.GOOS)
|
||||
t.Skipf("not available on %s", runtime.GOOS)
|
||||
}
|
||||
|
||||
for _, tt := range packetConnReadWriteMulticastUDPTests {
|
||||
@@ -64,7 +64,7 @@ func TestPacketConnReadWriteMulticastUDP(t *testing.T) {
|
||||
switch runtime.GOOS {
|
||||
case "freebsd", "linux":
|
||||
default: // platforms that don't support MLDv2 fail here
|
||||
t.Logf("not supported on %q", runtime.GOOS)
|
||||
t.Logf("not supported on %s", runtime.GOOS)
|
||||
continue
|
||||
}
|
||||
t.Fatal(err)
|
||||
@@ -95,7 +95,7 @@ func TestPacketConnReadWriteMulticastUDP(t *testing.T) {
|
||||
for i, toggle := range []bool{true, false, true} {
|
||||
if err := p.SetControlMessage(cf, toggle); err != nil {
|
||||
if nettest.ProtocolNotSupported(err) {
|
||||
t.Logf("not supported on %q", runtime.GOOS)
|
||||
t.Logf("not supported on %s", runtime.GOOS)
|
||||
continue
|
||||
}
|
||||
t.Fatal(err)
|
||||
@@ -133,9 +133,9 @@ func TestPacketConnReadWriteMulticastICMP(t *testing.T) {
|
||||
switch runtime.GOOS {
|
||||
case "freebsd": // due to a bug on loopback marking
|
||||
// See http://www.freebsd.org/cgi/query-pr.cgi?pr=180065.
|
||||
t.Skipf("not supported on %q", runtime.GOOS)
|
||||
t.Skipf("not supported on %s", runtime.GOOS)
|
||||
case "nacl", "plan9", "solaris", "windows":
|
||||
t.Skipf("not supported on %q", runtime.GOOS)
|
||||
t.Skipf("not supported on %s", runtime.GOOS)
|
||||
}
|
||||
if !supportsIPv6 {
|
||||
t.Skip("ipv6 is not supported")
|
||||
@@ -145,7 +145,7 @@ func TestPacketConnReadWriteMulticastICMP(t *testing.T) {
|
||||
}
|
||||
ifi := nettest.RoutedInterface("ip6", net.FlagUp|net.FlagMulticast|net.FlagLoopback)
|
||||
if ifi == nil {
|
||||
t.Skipf("not available on %q", runtime.GOOS)
|
||||
t.Skipf("not available on %s", runtime.GOOS)
|
||||
}
|
||||
|
||||
for _, tt := range packetConnReadWriteMulticastICMPTests {
|
||||
@@ -168,7 +168,7 @@ func TestPacketConnReadWriteMulticastICMP(t *testing.T) {
|
||||
switch runtime.GOOS {
|
||||
case "freebsd", "linux":
|
||||
default: // platforms that don't support MLDv2 fail here
|
||||
t.Logf("not supported on %q", runtime.GOOS)
|
||||
t.Logf("not supported on %s", runtime.GOOS)
|
||||
continue
|
||||
}
|
||||
t.Fatal(err)
|
||||
@@ -228,7 +228,7 @@ func TestPacketConnReadWriteMulticastICMP(t *testing.T) {
|
||||
}
|
||||
if err := p.SetControlMessage(cf, toggle); err != nil {
|
||||
if nettest.ProtocolNotSupported(err) {
|
||||
t.Logf("not supported on %q", runtime.GOOS)
|
||||
t.Logf("not supported on %s", runtime.GOOS)
|
||||
continue
|
||||
}
|
||||
t.Fatal(err)
|
||||
@@ -246,7 +246,7 @@ func TestPacketConnReadWriteMulticastICMP(t *testing.T) {
|
||||
if n, cm, _, err := p.ReadFrom(rb); err != nil {
|
||||
switch runtime.GOOS {
|
||||
case "darwin": // older darwin kernels have some limitation on receiving icmp packet through raw socket
|
||||
t.Logf("not supported on %q", runtime.GOOS)
|
||||
t.Logf("not supported on %s", runtime.GOOS)
|
||||
continue
|
||||
}
|
||||
t.Fatal(err)
|
||||
|
||||
@@ -23,7 +23,7 @@ var udpMultipleGroupListenerTests = []net.Addr{
|
||||
func TestUDPSinglePacketConnWithMultipleGroupListeners(t *testing.T) {
|
||||
switch runtime.GOOS {
|
||||
case "nacl", "plan9", "solaris", "windows":
|
||||
t.Skipf("not supported on %q", runtime.GOOS)
|
||||
t.Skipf("not supported on %s", runtime.GOOS)
|
||||
}
|
||||
if !supportsIPv6 {
|
||||
t.Skip("ipv6 is not supported")
|
||||
@@ -63,7 +63,7 @@ func TestUDPSinglePacketConnWithMultipleGroupListeners(t *testing.T) {
|
||||
func TestUDPMultiplePacketConnWithMultipleGroupListeners(t *testing.T) {
|
||||
switch runtime.GOOS {
|
||||
case "nacl", "plan9", "solaris", "windows":
|
||||
t.Skipf("not supported on %q", runtime.GOOS)
|
||||
t.Skipf("not supported on %s", runtime.GOOS)
|
||||
}
|
||||
if !supportsIPv6 {
|
||||
t.Skip("ipv6 is not supported")
|
||||
@@ -115,7 +115,7 @@ func TestUDPMultiplePacketConnWithMultipleGroupListeners(t *testing.T) {
|
||||
func TestUDPPerInterfaceSinglePacketConnWithSingleGroupListener(t *testing.T) {
|
||||
switch runtime.GOOS {
|
||||
case "nacl", "plan9", "solaris", "windows":
|
||||
t.Skipf("not supported on %q", runtime.GOOS)
|
||||
t.Skipf("not supported on %s", runtime.GOOS)
|
||||
}
|
||||
if !supportsIPv6 {
|
||||
t.Skip("ipv6 is not supported")
|
||||
@@ -158,7 +158,7 @@ func TestUDPPerInterfaceSinglePacketConnWithSingleGroupListener(t *testing.T) {
|
||||
func TestIPSinglePacketConnWithSingleGroupListener(t *testing.T) {
|
||||
switch runtime.GOOS {
|
||||
case "nacl", "plan9", "solaris", "windows":
|
||||
t.Skipf("not supported on %q", runtime.GOOS)
|
||||
t.Skipf("not supported on %s", runtime.GOOS)
|
||||
}
|
||||
if !supportsIPv6 {
|
||||
t.Skip("ipv6 is not supported")
|
||||
@@ -200,9 +200,9 @@ func TestIPSinglePacketConnWithSingleGroupListener(t *testing.T) {
|
||||
func TestIPPerInterfaceSinglePacketConnWithSingleGroupListener(t *testing.T) {
|
||||
switch runtime.GOOS {
|
||||
case "darwin", "dragonfly", "openbsd": // platforms that return fe80::1%lo0: bind: can't assign requested address
|
||||
t.Skipf("not supported on %q", runtime.GOOS)
|
||||
t.Skipf("not supported on %s", runtime.GOOS)
|
||||
case "nacl", "plan9", "solaris", "windows":
|
||||
t.Skipf("not supported on %q", runtime.GOOS)
|
||||
t.Skipf("not supported on %s", runtime.GOOS)
|
||||
}
|
||||
if !supportsIPv6 {
|
||||
t.Skip("ipv6 is not supported")
|
||||
|
||||
@@ -27,14 +27,14 @@ var packetConnMulticastSocketOptionTests = []struct {
|
||||
func TestPacketConnMulticastSocketOptions(t *testing.T) {
|
||||
switch runtime.GOOS {
|
||||
case "nacl", "plan9", "solaris", "windows":
|
||||
t.Skipf("not supported on %q", runtime.GOOS)
|
||||
t.Skipf("not supported on %s", runtime.GOOS)
|
||||
}
|
||||
if !supportsIPv6 {
|
||||
t.Skip("ipv6 is not supported")
|
||||
}
|
||||
ifi := nettest.RoutedInterface("ip6", net.FlagUp|net.FlagMulticast|net.FlagLoopback)
|
||||
if ifi == nil {
|
||||
t.Skipf("not available on %q", runtime.GOOS)
|
||||
t.Skipf("not available on %s", runtime.GOOS)
|
||||
}
|
||||
|
||||
m, ok := nettest.SupportsRawIPSocket()
|
||||
@@ -120,7 +120,7 @@ func testSourceSpecificMulticastSocketOptions(t *testing.T, c testIPv6MulticastC
|
||||
switch runtime.GOOS {
|
||||
case "freebsd", "linux":
|
||||
default: // platforms that don't support MLDv2 fail here
|
||||
t.Logf("not supported on %q", runtime.GOOS)
|
||||
t.Logf("not supported on %s", runtime.GOOS)
|
||||
return
|
||||
}
|
||||
t.Error(err)
|
||||
|
||||
@@ -102,7 +102,7 @@ func benchmarkReadWriteIPv6UDP(b *testing.B, p *ipv6.PacketConn, wb, rb []byte,
|
||||
func TestPacketConnConcurrentReadWriteUnicastUDP(t *testing.T) {
|
||||
switch runtime.GOOS {
|
||||
case "nacl", "plan9", "solaris", "windows":
|
||||
t.Skipf("not supported on %q", runtime.GOOS)
|
||||
t.Skipf("not supported on %s", runtime.GOOS)
|
||||
}
|
||||
if !supportsIPv6 {
|
||||
t.Skip("ipv6 is not supported")
|
||||
@@ -127,7 +127,7 @@ func TestPacketConnConcurrentReadWriteUnicastUDP(t *testing.T) {
|
||||
|
||||
if err := p.SetControlMessage(cf, true); err != nil { // probe before test
|
||||
if nettest.ProtocolNotSupported(err) {
|
||||
t.Skipf("not supported on %q", runtime.GOOS)
|
||||
t.Skipf("not supported on %s", runtime.GOOS)
|
||||
}
|
||||
t.Fatal(err)
|
||||
}
|
||||
|
||||
@@ -20,7 +20,7 @@ var supportsIPv6 bool = nettest.SupportsIPv6()
|
||||
func TestConnInitiatorPathMTU(t *testing.T) {
|
||||
switch runtime.GOOS {
|
||||
case "nacl", "plan9", "solaris", "windows":
|
||||
t.Skipf("not supported on %q", runtime.GOOS)
|
||||
t.Skipf("not supported on %s", runtime.GOOS)
|
||||
}
|
||||
if !supportsIPv6 {
|
||||
t.Skip("ipv6 is not supported")
|
||||
@@ -44,7 +44,7 @@ func TestConnInitiatorPathMTU(t *testing.T) {
|
||||
if pmtu, err := ipv6.NewConn(c).PathMTU(); err != nil {
|
||||
switch runtime.GOOS {
|
||||
case "darwin": // older darwin kernels don't support IPV6_PATHMTU option
|
||||
t.Logf("not supported on %q", runtime.GOOS)
|
||||
t.Logf("not supported on %s", runtime.GOOS)
|
||||
default:
|
||||
t.Fatal(err)
|
||||
}
|
||||
@@ -58,7 +58,7 @@ func TestConnInitiatorPathMTU(t *testing.T) {
|
||||
func TestConnResponderPathMTU(t *testing.T) {
|
||||
switch runtime.GOOS {
|
||||
case "nacl", "plan9", "solaris", "windows":
|
||||
t.Skipf("not supported on %q", runtime.GOOS)
|
||||
t.Skipf("not supported on %s", runtime.GOOS)
|
||||
}
|
||||
if !supportsIPv6 {
|
||||
t.Skip("ipv6 is not supported")
|
||||
@@ -82,7 +82,7 @@ func TestConnResponderPathMTU(t *testing.T) {
|
||||
if pmtu, err := ipv6.NewConn(c).PathMTU(); err != nil {
|
||||
switch runtime.GOOS {
|
||||
case "darwin": // older darwin kernels don't support IPV6_PATHMTU option
|
||||
t.Logf("not supported on %q", runtime.GOOS)
|
||||
t.Logf("not supported on %s", runtime.GOOS)
|
||||
default:
|
||||
t.Fatal(err)
|
||||
}
|
||||
@@ -96,7 +96,7 @@ func TestConnResponderPathMTU(t *testing.T) {
|
||||
func TestPacketConnChecksum(t *testing.T) {
|
||||
switch runtime.GOOS {
|
||||
case "nacl", "plan9", "solaris", "windows":
|
||||
t.Skipf("not supported on %q", runtime.GOOS)
|
||||
t.Skipf("not supported on %s", runtime.GOOS)
|
||||
}
|
||||
if !supportsIPv6 {
|
||||
t.Skip("ipv6 is not supported")
|
||||
|
||||
@@ -21,7 +21,7 @@ import (
|
||||
func TestPacketConnReadWriteUnicastUDP(t *testing.T) {
|
||||
switch runtime.GOOS {
|
||||
case "nacl", "plan9", "solaris", "windows":
|
||||
t.Skipf("not supported on %q", runtime.GOOS)
|
||||
t.Skipf("not supported on %s", runtime.GOOS)
|
||||
}
|
||||
if !supportsIPv6 {
|
||||
t.Skip("ipv6 is not supported")
|
||||
@@ -54,7 +54,7 @@ func TestPacketConnReadWriteUnicastUDP(t *testing.T) {
|
||||
for i, toggle := range []bool{true, false, true} {
|
||||
if err := p.SetControlMessage(cf, toggle); err != nil {
|
||||
if nettest.ProtocolNotSupported(err) {
|
||||
t.Skipf("not supported on %q", runtime.GOOS)
|
||||
t.Skipf("not supported on %s", runtime.GOOS)
|
||||
}
|
||||
t.Fatal(err)
|
||||
}
|
||||
@@ -84,7 +84,7 @@ func TestPacketConnReadWriteUnicastUDP(t *testing.T) {
|
||||
func TestPacketConnReadWriteUnicastICMP(t *testing.T) {
|
||||
switch runtime.GOOS {
|
||||
case "nacl", "plan9", "solaris", "windows":
|
||||
t.Skipf("not supported on %q", runtime.GOOS)
|
||||
t.Skipf("not supported on %s", runtime.GOOS)
|
||||
}
|
||||
if !supportsIPv6 {
|
||||
t.Skip("ipv6 is not supported")
|
||||
@@ -149,7 +149,7 @@ func TestPacketConnReadWriteUnicastICMP(t *testing.T) {
|
||||
}
|
||||
if err := p.SetControlMessage(cf, toggle); err != nil {
|
||||
if nettest.ProtocolNotSupported(err) {
|
||||
t.Skipf("not supported on %q", runtime.GOOS)
|
||||
t.Skipf("not supported on %s", runtime.GOOS)
|
||||
}
|
||||
t.Fatal(err)
|
||||
}
|
||||
@@ -169,7 +169,7 @@ func TestPacketConnReadWriteUnicastICMP(t *testing.T) {
|
||||
if n, cm, _, err := p.ReadFrom(rb); err != nil {
|
||||
switch runtime.GOOS {
|
||||
case "darwin": // older darwin kernels have some limitation on receiving icmp packet through raw socket
|
||||
t.Logf("not supported on %q", runtime.GOOS)
|
||||
t.Logf("not supported on %s", runtime.GOOS)
|
||||
continue
|
||||
}
|
||||
t.Fatal(err)
|
||||
|
||||
@@ -17,7 +17,7 @@ import (
|
||||
func TestConnUnicastSocketOptions(t *testing.T) {
|
||||
switch runtime.GOOS {
|
||||
case "nacl", "plan9", "solaris", "windows":
|
||||
t.Skipf("not supported on %q", runtime.GOOS)
|
||||
t.Skipf("not supported on %s", runtime.GOOS)
|
||||
}
|
||||
if !supportsIPv6 {
|
||||
t.Skip("ipv6 is not supported")
|
||||
@@ -53,7 +53,7 @@ var packetConnUnicastSocketOptionTests = []struct {
|
||||
func TestPacketConnUnicastSocketOptions(t *testing.T) {
|
||||
switch runtime.GOOS {
|
||||
case "nacl", "plan9", "solaris", "windows":
|
||||
t.Skipf("not supported on %q", runtime.GOOS)
|
||||
t.Skipf("not supported on %s", runtime.GOOS)
|
||||
}
|
||||
if !supportsIPv6 {
|
||||
t.Skip("ipv6 is not supported")
|
||||
@@ -87,7 +87,7 @@ func testUnicastSocketOptions(t *testing.T, c testIPv6UnicastConn) {
|
||||
if err := c.SetTrafficClass(tclass); err != nil {
|
||||
switch runtime.GOOS {
|
||||
case "darwin": // older darwin kernels don't support IPV6_TCLASS option
|
||||
t.Logf("not supported on %q", runtime.GOOS)
|
||||
t.Logf("not supported on %s", runtime.GOOS)
|
||||
goto next
|
||||
}
|
||||
t.Fatal(err)
|
||||
|
||||
Reference in New Issue
Block a user