ipv4, ipv6, nettest: skip unsupported tests on wasip1

Updates golang/go#58141

Change-Id: Iec7a525633dcc93c8941c9aaaef6e54e6867a8d0
Reviewed-on: https://go-review.googlesource.com/c/net/+/485675
Reviewed-by: Ian Lance Taylor <iant@google.com>
Reviewed-by: Bryan Mills <bcmills@google.com>
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com>
Auto-Submit: Tobias Klauser <tobias.klauser@gmail.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
This commit is contained in:
Tobias Klauser
2023-04-18 13:22:30 +02:00
committed by Gopher Robot
parent eb1572ce7f
commit 938ff153cf
15 changed files with 45 additions and 45 deletions

View File

@@ -30,7 +30,7 @@ var packetConnReadWriteMulticastUDPTests = []struct {
func TestPacketConnReadWriteMulticastUDP(t *testing.T) {
switch runtime.GOOS {
case "fuchsia", "hurd", "illumos", "js", "nacl", "plan9", "solaris", "windows", "zos":
case "fuchsia", "hurd", "illumos", "js", "nacl", "plan9", "solaris", "wasip1", "windows", "zos":
t.Skipf("not supported on %s", runtime.GOOS)
}
ifi, err := nettest.RoutedInterface("ip4", net.FlagUp|net.FlagMulticast|net.FlagLoopback)
@@ -132,7 +132,7 @@ var packetConnReadWriteMulticastICMPTests = []struct {
func TestPacketConnReadWriteMulticastICMP(t *testing.T) {
switch runtime.GOOS {
case "fuchsia", "hurd", "illumos", "js", "nacl", "plan9", "solaris", "windows":
case "fuchsia", "hurd", "illumos", "js", "nacl", "plan9", "solaris", "wasip1", "windows":
t.Skipf("not supported on %s", runtime.GOOS)
}
if !nettest.SupportsRawSocket() {
@@ -262,7 +262,7 @@ var rawConnReadWriteMulticastICMPTests = []struct {
func TestRawConnReadWriteMulticastICMP(t *testing.T) {
switch runtime.GOOS {
case "fuchsia", "hurd", "illumos", "js", "nacl", "plan9", "solaris", "windows":
case "fuchsia", "hurd", "illumos", "js", "nacl", "plan9", "solaris", "wasip1", "windows":
t.Skipf("not supported on %s", runtime.GOOS)
}
if testing.Short() {

View File

@@ -21,7 +21,7 @@ var udpMultipleGroupListenerTests = []net.Addr{
func TestUDPSinglePacketConnWithMultipleGroupListeners(t *testing.T) {
switch runtime.GOOS {
case "fuchsia", "hurd", "js", "nacl", "plan9", "windows", "zos":
case "fuchsia", "hurd", "js", "nacl", "plan9", "wasip1", "windows", "zos":
t.Skipf("not supported on %s", runtime.GOOS)
}
if testing.Short() {
@@ -61,7 +61,7 @@ func TestUDPSinglePacketConnWithMultipleGroupListeners(t *testing.T) {
func TestUDPMultiplePacketConnWithMultipleGroupListeners(t *testing.T) {
switch runtime.GOOS {
case "fuchsia", "hurd", "js", "nacl", "plan9", "windows", "zos":
case "fuchsia", "hurd", "js", "nacl", "plan9", "wasip1", "windows", "zos":
t.Skipf("not supported on %s", runtime.GOOS)
}
if testing.Short() {
@@ -116,7 +116,7 @@ func TestUDPMultiplePacketConnWithMultipleGroupListeners(t *testing.T) {
func TestUDPPerInterfaceSinglePacketConnWithSingleGroupListener(t *testing.T) {
switch runtime.GOOS {
case "fuchsia", "hurd", "js", "nacl", "plan9", "windows", "zos":
case "fuchsia", "hurd", "js", "nacl", "plan9", "wasip1", "windows", "zos":
t.Skipf("not supported on %s", runtime.GOOS)
}
if testing.Short() {
@@ -172,7 +172,7 @@ func TestUDPPerInterfaceSinglePacketConnWithSingleGroupListener(t *testing.T) {
func TestIPSingleRawConnWithSingleGroupListener(t *testing.T) {
switch runtime.GOOS {
case "fuchsia", "hurd", "js", "nacl", "plan9", "windows", "zos":
case "fuchsia", "hurd", "js", "nacl", "plan9", "wasip1", "windows", "zos":
t.Skipf("not supported on %s", runtime.GOOS)
}
if testing.Short() {
@@ -217,7 +217,7 @@ func TestIPSingleRawConnWithSingleGroupListener(t *testing.T) {
func TestIPPerInterfaceSingleRawConnWithSingleGroupListener(t *testing.T) {
switch runtime.GOOS {
case "fuchsia", "hurd", "js", "nacl", "plan9", "windows", "zos":
case "fuchsia", "hurd", "js", "nacl", "plan9", "wasip1", "windows", "zos":
t.Skipf("not supported on %s", runtime.GOOS)
}
if testing.Short() {

View File

@@ -26,7 +26,7 @@ var packetConnMulticastSocketOptionTests = []struct {
func TestPacketConnMulticastSocketOptions(t *testing.T) {
switch runtime.GOOS {
case "fuchsia", "hurd", "js", "nacl", "plan9", "zos":
case "fuchsia", "hurd", "js", "nacl", "plan9", "wasip1", "zos":
t.Skipf("not supported on %s", runtime.GOOS)
}
ifi, err := nettest.RoutedInterface("ip4", net.FlagUp|net.FlagMulticast|net.FlagLoopback)
@@ -66,7 +66,7 @@ var rawConnMulticastSocketOptionTests = []struct {
func TestRawConnMulticastSocketOptions(t *testing.T) {
switch runtime.GOOS {
case "fuchsia", "hurd", "js", "nacl", "plan9", "zos":
case "fuchsia", "hurd", "js", "nacl", "plan9", "wasip1", "zos":
t.Skipf("not supported on %s", runtime.GOOS)
}
if !nettest.SupportsRawSocket() {

View File

@@ -21,7 +21,7 @@ import (
func BenchmarkReadWriteUnicast(b *testing.B) {
switch runtime.GOOS {
case "fuchsia", "hurd", "js", "nacl", "plan9", "windows":
case "fuchsia", "hurd", "js", "nacl", "plan9", "wasip1", "windows":
b.Skipf("not supported on %s", runtime.GOOS)
}
@@ -69,7 +69,7 @@ func BenchmarkReadWriteUnicast(b *testing.B) {
func BenchmarkPacketConnReadWriteUnicast(b *testing.B) {
switch runtime.GOOS {
case "fuchsia", "hurd", "js", "nacl", "plan9", "windows":
case "fuchsia", "hurd", "js", "nacl", "plan9", "wasip1", "windows":
b.Skipf("not supported on %s", runtime.GOOS)
}
@@ -220,7 +220,7 @@ func BenchmarkPacketConnReadWriteUnicast(b *testing.B) {
func TestPacketConnConcurrentReadWriteUnicastUDP(t *testing.T) {
switch runtime.GOOS {
case "fuchsia", "hurd", "js", "nacl", "plan9", "windows":
case "fuchsia", "hurd", "js", "nacl", "plan9", "wasip1", "windows":
t.Skipf("not supported on %s", runtime.GOOS)
}
@@ -324,7 +324,7 @@ func TestPacketConnConcurrentReadWriteUnicastUDP(t *testing.T) {
func TestPacketConnConcurrentReadWriteUnicast(t *testing.T) {
switch runtime.GOOS {
case "fuchsia", "hurd", "js", "nacl", "plan9", "windows":
case "fuchsia", "hurd", "js", "nacl", "plan9", "wasip1", "windows":
t.Skipf("not supported on %s", runtime.GOOS)
}

View File

@@ -20,7 +20,7 @@ import (
func TestPacketConnReadWriteUnicastUDP(t *testing.T) {
switch runtime.GOOS {
case "fuchsia", "hurd", "js", "nacl", "plan9", "windows":
case "fuchsia", "hurd", "js", "nacl", "plan9", "wasip1", "windows":
t.Skipf("not supported on %s", runtime.GOOS)
}
// Skip this check on z/OS since net.Interfaces() does not return loopback, however
@@ -85,7 +85,7 @@ func TestPacketConnReadWriteUnicastUDP(t *testing.T) {
func TestPacketConnReadWriteUnicastICMP(t *testing.T) {
switch runtime.GOOS {
case "fuchsia", "hurd", "js", "nacl", "plan9", "windows":
case "fuchsia", "hurd", "js", "nacl", "plan9", "wasip1", "windows":
t.Skipf("not supported on %s", runtime.GOOS)
}
if !nettest.SupportsRawSocket() {
@@ -180,7 +180,7 @@ func TestPacketConnReadWriteUnicastICMP(t *testing.T) {
func TestRawConnReadWriteUnicastICMP(t *testing.T) {
switch runtime.GOOS {
case "fuchsia", "hurd", "js", "nacl", "plan9", "windows":
case "fuchsia", "hurd", "js", "nacl", "plan9", "wasip1", "windows":
t.Skipf("not supported on %s", runtime.GOOS)
}
if !nettest.SupportsRawSocket() {

View File

@@ -16,7 +16,7 @@ import (
func TestConnUnicastSocketOptions(t *testing.T) {
switch runtime.GOOS {
case "fuchsia", "hurd", "js", "nacl", "plan9", "windows", "zos":
case "fuchsia", "hurd", "js", "nacl", "plan9", "wasip1", "windows", "zos":
t.Skipf("not supported on %s", runtime.GOOS)
}
if _, err := nettest.RoutedInterface("ip4", net.FlagUp|net.FlagLoopback); err != nil {
@@ -61,7 +61,7 @@ var packetConnUnicastSocketOptionTests = []struct {
func TestPacketConnUnicastSocketOptions(t *testing.T) {
switch runtime.GOOS {
case "fuchsia", "hurd", "js", "nacl", "plan9", "windows", "zos":
case "fuchsia", "hurd", "js", "nacl", "plan9", "wasip1", "windows", "zos":
t.Skipf("not supported on %s", runtime.GOOS)
}
if _, err := nettest.RoutedInterface("ip4", net.FlagUp|net.FlagLoopback); err != nil {
@@ -86,7 +86,7 @@ func TestPacketConnUnicastSocketOptions(t *testing.T) {
func TestRawConnUnicastSocketOptions(t *testing.T) {
switch runtime.GOOS {
case "fuchsia", "hurd", "js", "nacl", "plan9", "windows", "zos":
case "fuchsia", "hurd", "js", "nacl", "plan9", "wasip1", "windows", "zos":
t.Skipf("not supported on %s", runtime.GOOS)
}
if !nettest.SupportsRawSocket() {

View File

@@ -34,7 +34,7 @@ func TestICMPString(t *testing.T) {
func TestICMPFilter(t *testing.T) {
switch runtime.GOOS {
case "fuchsia", "hurd", "js", "nacl", "plan9", "windows":
case "fuchsia", "hurd", "js", "nacl", "plan9", "wasip1", "windows":
t.Skipf("not supported on %s", runtime.GOOS)
}
@@ -61,7 +61,7 @@ func TestICMPFilter(t *testing.T) {
func TestSetICMPFilter(t *testing.T) {
switch runtime.GOOS {
case "fuchsia", "hurd", "js", "nacl", "plan9", "windows":
case "fuchsia", "hurd", "js", "nacl", "plan9", "wasip1", "windows":
t.Skipf("not supported on %s", runtime.GOOS)
}
if !nettest.SupportsIPv6() {

View File

@@ -29,7 +29,7 @@ var packetConnReadWriteMulticastUDPTests = []struct {
func TestPacketConnReadWriteMulticastUDP(t *testing.T) {
switch runtime.GOOS {
case "fuchsia", "hurd", "js", "nacl", "plan9", "windows":
case "fuchsia", "hurd", "js", "nacl", "plan9", "wasip1", "windows":
t.Skipf("not supported on %s", runtime.GOOS)
}
if !nettest.SupportsIPv6() {
@@ -144,7 +144,7 @@ func TestPacketConnReadWriteMulticastICMP(t *testing.T) {
`and needs investigation, see golang.org/issue/42064`)
}
switch runtime.GOOS {
case "fuchsia", "hurd", "js", "nacl", "plan9", "windows":
case "fuchsia", "hurd", "js", "nacl", "plan9", "wasip1", "windows":
t.Skipf("not supported on %s", runtime.GOOS)
}
if !nettest.SupportsIPv6() {

View File

@@ -21,7 +21,7 @@ var udpMultipleGroupListenerTests = []net.Addr{
func TestUDPSinglePacketConnWithMultipleGroupListeners(t *testing.T) {
switch runtime.GOOS {
case "fuchsia", "hurd", "js", "nacl", "plan9", "windows":
case "fuchsia", "hurd", "js", "nacl", "plan9", "wasip1", "windows":
t.Skipf("not supported on %s", runtime.GOOS)
}
if !nettest.SupportsIPv6() {
@@ -61,7 +61,7 @@ func TestUDPSinglePacketConnWithMultipleGroupListeners(t *testing.T) {
func TestUDPMultiplePacketConnWithMultipleGroupListeners(t *testing.T) {
switch runtime.GOOS {
case "fuchsia", "hurd", "js", "nacl", "plan9", "windows", "zos":
case "fuchsia", "hurd", "js", "nacl", "plan9", "wasip1", "windows", "zos":
t.Skipf("not supported on %s", runtime.GOOS)
}
if !nettest.SupportsIPv6() {
@@ -116,7 +116,7 @@ func TestUDPMultiplePacketConnWithMultipleGroupListeners(t *testing.T) {
func TestUDPPerInterfaceSinglePacketConnWithSingleGroupListener(t *testing.T) {
switch runtime.GOOS {
case "fuchsia", "hurd", "js", "nacl", "plan9", "windows":
case "fuchsia", "hurd", "js", "nacl", "plan9", "wasip1", "windows":
t.Skipf("not supported on %s", runtime.GOOS)
}
if !nettest.SupportsIPv6() {
@@ -172,7 +172,7 @@ func TestUDPPerInterfaceSinglePacketConnWithSingleGroupListener(t *testing.T) {
func TestIPSinglePacketConnWithSingleGroupListener(t *testing.T) {
switch runtime.GOOS {
case "fuchsia", "hurd", "js", "nacl", "plan9", "windows":
case "fuchsia", "hurd", "js", "nacl", "plan9", "wasip1", "windows":
t.Skipf("not supported on %s", runtime.GOOS)
}
if !nettest.SupportsIPv6() {
@@ -216,7 +216,7 @@ func TestIPPerInterfaceSinglePacketConnWithSingleGroupListener(t *testing.T) {
switch runtime.GOOS {
case "darwin", "ios", "dragonfly", "openbsd": // platforms that return fe80::1%lo0: bind: can't assign requested address
t.Skipf("not supported on %s", runtime.GOOS)
case "fuchsia", "hurd", "js", "nacl", "plan9", "windows":
case "fuchsia", "hurd", "js", "nacl", "plan9", "wasip1", "windows":
t.Skipf("not supported on %s", runtime.GOOS)
}
if !nettest.SupportsIPv6() {

View File

@@ -26,7 +26,7 @@ var packetConnMulticastSocketOptionTests = []struct {
func TestPacketConnMulticastSocketOptions(t *testing.T) {
switch runtime.GOOS {
case "fuchsia", "hurd", "js", "nacl", "plan9", "windows":
case "fuchsia", "hurd", "js", "nacl", "plan9", "wasip1", "windows":
t.Skipf("not supported on %s", runtime.GOOS)
}
if !nettest.SupportsIPv6() {

View File

@@ -21,7 +21,7 @@ import (
func BenchmarkReadWriteUnicast(b *testing.B) {
switch runtime.GOOS {
case "fuchsia", "hurd", "js", "nacl", "plan9", "windows":
case "fuchsia", "hurd", "js", "nacl", "plan9", "wasip1", "windows":
b.Skipf("not supported on %s", runtime.GOOS)
}
@@ -72,7 +72,7 @@ func BenchmarkReadWriteUnicast(b *testing.B) {
func BenchmarkPacketConnReadWriteUnicast(b *testing.B) {
switch runtime.GOOS {
case "fuchsia", "hurd", "js", "nacl", "plan9", "windows":
case "fuchsia", "hurd", "js", "nacl", "plan9", "wasip1", "windows":
b.Skipf("not supported on %s", runtime.GOOS)
}
@@ -220,7 +220,7 @@ func BenchmarkPacketConnReadWriteUnicast(b *testing.B) {
func TestPacketConnConcurrentReadWriteUnicastUDP(t *testing.T) {
switch runtime.GOOS {
case "fuchsia", "hurd", "js", "nacl", "plan9", "windows":
case "fuchsia", "hurd", "js", "nacl", "plan9", "wasip1", "windows":
t.Skipf("not supported on %s", runtime.GOOS)
}
ifi, err := nettest.RoutedInterface("ip6", net.FlagUp|net.FlagLoopback)
@@ -327,7 +327,7 @@ func TestPacketConnConcurrentReadWriteUnicastUDP(t *testing.T) {
func TestPacketConnConcurrentReadWriteUnicast(t *testing.T) {
switch runtime.GOOS {
case "fuchsia", "hurd", "js", "nacl", "plan9", "windows":
case "fuchsia", "hurd", "js", "nacl", "plan9", "wasip1", "windows":
t.Skipf("not supported on %s", runtime.GOOS)
}

View File

@@ -17,7 +17,7 @@ import (
func TestConnInitiatorPathMTU(t *testing.T) {
switch runtime.GOOS {
case "fuchsia", "hurd", "js", "nacl", "plan9", "windows", "zos":
case "fuchsia", "hurd", "js", "nacl", "plan9", "windows", "wasip1", "zos":
t.Skipf("not supported on %s", runtime.GOOS)
}
@@ -51,7 +51,7 @@ func TestConnInitiatorPathMTU(t *testing.T) {
func TestConnResponderPathMTU(t *testing.T) {
switch runtime.GOOS {
case "fuchsia", "hurd", "js", "nacl", "plan9", "windows", "zos":
case "fuchsia", "hurd", "js", "nacl", "plan9", "windows", "wasip1", "zos":
t.Skipf("not supported on %s", runtime.GOOS)
}
if _, err := nettest.RoutedInterface("ip6", net.FlagUp|net.FlagLoopback); err != nil {
@@ -84,7 +84,7 @@ func TestConnResponderPathMTU(t *testing.T) {
func TestPacketConnChecksum(t *testing.T) {
switch runtime.GOOS {
case "fuchsia", "hurd", "js", "nacl", "plan9", "windows":
case "fuchsia", "hurd", "js", "nacl", "plan9", "wasip1", "windows":
t.Skipf("not supported on %s", runtime.GOOS)
}
if !nettest.SupportsIPv6() {

View File

@@ -20,7 +20,7 @@ import (
func TestPacketConnReadWriteUnicastUDP(t *testing.T) {
switch runtime.GOOS {
case "fuchsia", "hurd", "js", "nacl", "plan9", "windows":
case "fuchsia", "hurd", "js", "nacl", "plan9", "wasip1", "windows":
t.Skipf("not supported on %s", runtime.GOOS)
}
if _, err := nettest.RoutedInterface("ip6", net.FlagUp|net.FlagLoopback); err != nil {
@@ -91,7 +91,7 @@ func TestPacketConnReadWriteUnicastUDP(t *testing.T) {
func TestPacketConnReadWriteUnicastICMP(t *testing.T) {
switch runtime.GOOS {
case "fuchsia", "hurd", "js", "nacl", "plan9", "windows", "zos":
case "fuchsia", "hurd", "js", "nacl", "plan9", "wasip1", "windows", "zos":
t.Skipf("not supported on %s", runtime.GOOS)
}
if !nettest.SupportsIPv6() {

View File

@@ -16,7 +16,7 @@ import (
func TestConnUnicastSocketOptions(t *testing.T) {
switch runtime.GOOS {
case "fuchsia", "hurd", "js", "nacl", "plan9", "windows":
case "fuchsia", "hurd", "js", "nacl", "plan9", "wasip1", "windows":
t.Skipf("not supported on %s", runtime.GOOS)
}
if _, err := nettest.RoutedInterface("ip6", net.FlagUp|net.FlagLoopback); err != nil {
@@ -61,7 +61,7 @@ var packetConnUnicastSocketOptionTests = []struct {
func TestPacketConnUnicastSocketOptions(t *testing.T) {
switch runtime.GOOS {
case "fuchsia", "hurd", "js", "nacl", "plan9", "windows":
case "fuchsia", "hurd", "js", "nacl", "plan9", "wasip1", "windows":
t.Skipf("not supported on %s", runtime.GOOS)
}
if _, err := nettest.RoutedInterface("ip6", net.FlagUp|net.FlagLoopback); err != nil {

View File

@@ -103,12 +103,12 @@ func TestableNetwork(network string) bool {
// This is an internal network name for testing on the
// package net of the standard library.
switch runtime.GOOS {
case "android", "fuchsia", "hurd", "ios", "js", "nacl", "plan9", "windows":
case "android", "fuchsia", "hurd", "ios", "js", "nacl", "plan9", "wasip1", "windows":
return false
}
case "ip", "ip4", "ip6":
switch runtime.GOOS {
case "fuchsia", "hurd", "js", "nacl", "plan9":
case "fuchsia", "hurd", "js", "nacl", "plan9", "wasip1":
return false
default:
if os.Getuid() != 0 {
@@ -117,14 +117,14 @@ func TestableNetwork(network string) bool {
}
case "unix", "unixgram":
switch runtime.GOOS {
case "android", "fuchsia", "hurd", "ios", "js", "nacl", "plan9", "windows":
case "android", "fuchsia", "hurd", "ios", "js", "nacl", "plan9", "wasip1", "windows":
return false
case "aix":
return unixStrmDgramEnabled()
}
case "unixpacket":
switch runtime.GOOS {
case "aix", "android", "fuchsia", "hurd", "darwin", "ios", "js", "nacl", "plan9", "windows", "zos":
case "aix", "android", "fuchsia", "hurd", "darwin", "ios", "js", "nacl", "plan9", "wasip1", "windows", "zos":
return false
}
}