ipv4: skip tests on aix, fuchsia and hurd
Also marks test helper functions.
Change-Id: I3417885fb81c8ab27cdfbe80c83270b94b878862
Reviewed-on: https://go-review.googlesource.com/c/net/+/167339
Run-TryBot: Mikio Hara <mikioh.public.networking@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Matt Layher <mdlayher@gmail.com>
diff --git a/ipv4/multicastsockopt_test.go b/ipv4/multicastsockopt_test.go
index c0a2680..fd783d0 100644
--- a/ipv4/multicastsockopt_test.go
+++ b/ipv4/multicastsockopt_test.go
@@ -26,7 +26,7 @@
func TestPacketConnMulticastSocketOptions(t *testing.T) {
switch runtime.GOOS {
- case "js", "nacl", "plan9":
+ case "aix", "fuchsia", "hurd", "js", "nacl", "plan9":
t.Skipf("not supported on %s", runtime.GOOS)
}
ifi := nettest.RoutedInterface("ip4", net.FlagUp|net.FlagMulticast|net.FlagLoopback)
@@ -66,7 +66,7 @@
func TestRawConnMulticastSocketOptions(t *testing.T) {
switch runtime.GOOS {
- case "js", "nacl", "plan9":
+ case "aix", "fuchsia", "hurd", "js", "nacl", "plan9":
t.Skipf("not supported on %s", runtime.GOOS)
}
if m, ok := nettest.SupportsRawIPSocket(); !ok {
@@ -111,6 +111,8 @@
}
func testMulticastSocketOptions(t *testing.T, c testIPv4MulticastConn, ifi *net.Interface, grp net.Addr) {
+ t.Helper()
+
const ttl = 255
if err := c.SetMulticastTTL(ttl); err != nil {
t.Error(err)
@@ -149,6 +151,8 @@
}
func testSourceSpecificMulticastSocketOptions(t *testing.T, c testIPv4MulticastConn, ifi *net.Interface, grp, src net.Addr) {
+ t.Helper()
+
// MCAST_JOIN_GROUP -> MCAST_BLOCK_SOURCE -> MCAST_UNBLOCK_SOURCE -> MCAST_LEAVE_GROUP
if err := c.JoinGroup(ifi, grp); err != nil {
t.Error(err)