ipv6: enable IPV6_PATHMTU and IPV6_TCLASS tests on darwin/ios
These options are supported on all darwin/ios versions currently
supported by Go.
Change-Id: I4cf1f435889cbbfbfb12321114e3c2e18bb613b2
Reviewed-on: https://go-review.googlesource.com/c/net/+/305350
Trust: Tobias Klauser <tobias.klauser@gmail.com>
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
diff --git a/ipv6/sockopt_test.go b/ipv6/sockopt_test.go
index 8ac322b..3305cfc 100644
--- a/ipv6/sockopt_test.go
+++ b/ipv6/sockopt_test.go
@@ -40,12 +40,7 @@
defer c.Close()
if pmtu, err := ipv6.NewConn(c).PathMTU(); err != nil {
- switch runtime.GOOS {
- case "darwin", "ios": // older darwin kernels don't support IPV6_PATHMTU option
- t.Logf("not supported on %s", runtime.GOOS)
- default:
- t.Fatal(err)
- }
+ t.Fatal(err)
} else {
t.Logf("path mtu for %v: %v", c.RemoteAddr(), pmtu)
}
@@ -78,12 +73,7 @@
defer c.Close()
if pmtu, err := ipv6.NewConn(c).PathMTU(); err != nil {
- switch runtime.GOOS {
- case "darwin", "ios": // older darwin kernels don't support IPV6_PATHMTU option
- t.Logf("not supported on %s", runtime.GOOS)
- default:
- t.Fatal(err)
- }
+ t.Fatal(err)
} else {
t.Logf("path mtu for %v: %v", c.RemoteAddr(), pmtu)
}
diff --git a/ipv6/unicastsockopt_test.go b/ipv6/unicastsockopt_test.go
index 9b8df33..ac0daf2 100644
--- a/ipv6/unicastsockopt_test.go
+++ b/ipv6/unicastsockopt_test.go
@@ -96,11 +96,6 @@
tclass := iana.DiffServCS0 | iana.NotECNTransport
if err := c.SetTrafficClass(tclass); err != nil {
- switch runtime.GOOS {
- case "darwin", "ios": // older darwin kernels don't support IPV6_TCLASS option
- t.Logf("not supported on %s", runtime.GOOS)
- goto next
- }
t.Fatal(err)
}
if v, err := c.TrafficClass(); err != nil {
@@ -109,7 +104,6 @@
t.Fatalf("got %v; want %v", v, tclass)
}
-next:
hoplim := 255
if err := c.SetHopLimit(hoplim); err != nil {
t.Fatal(err)