go.net/ipv4: use testing.Skip{,f}

R=bradfitz, dave
CC=bradfitz, gobot, golang-dev, rsc
https://golang.org/cl/7194047
diff --git a/ipv4/multicast_test.go b/ipv4/multicast_test.go
index a5c470d..307eea1 100644
--- a/ipv4/multicast_test.go
+++ b/ipv4/multicast_test.go
@@ -15,8 +15,7 @@
 
 func TestReadWriteMulticastIPPayloadUDP(t *testing.T) {
 	if testing.Short() || !*testExternal {
-		t.Logf("skipping test to avoid external network")
-		return
+		t.Skip("to avoid external network")
 	}
 
 	c, err := net.ListenPacket("udp4", "224.0.0.0:1024") // see RFC 4727
@@ -27,8 +26,7 @@
 
 	ifi := loopbackInterface()
 	if ifi == nil {
-		t.Logf("skipping test; an appropriate interface not found")
-		return
+		t.Skip("an appropriate interface not found")
 	}
 	dst, err := net.ResolveUDPAddr("udp4", "224.0.0.254:1024") // see RFC 4727
 	if err != nil {
@@ -56,12 +54,10 @@
 
 func TestReadWriteMulticastIPPayloadICMP(t *testing.T) {
 	if testing.Short() || !*testExternal {
-		t.Logf("skipping test to avoid external network")
-		return
+		t.Skip("to avoid external network")
 	}
 	if os.Getuid() != 0 {
-		t.Logf("skipping test; must be root")
-		return
+		t.Skip("must be root")
 	}
 
 	c, err := net.ListenPacket("ip4:icmp", "0.0.0.0")
@@ -72,8 +68,7 @@
 
 	ifi := loopbackInterface()
 	if ifi == nil {
-		t.Logf("skipping test; an appropriate interface not found")
-		return
+		t.Skip("an appropriate interface not found")
 	}
 	dst, err := net.ResolveIPAddr("ip4", "224.0.0.254") // see RFC 4727
 	if err != nil {
@@ -115,12 +110,10 @@
 
 func TestReadWriteMulticastIPDatagram(t *testing.T) {
 	if testing.Short() || !*testExternal {
-		t.Logf("skipping test to avoid external network")
-		return
+		t.Skip("to avoid external network")
 	}
 	if os.Getuid() != 0 {
-		t.Logf("skipping test; must be root")
-		return
+		t.Skip("must be root")
 	}
 
 	c, err := net.ListenPacket("ip4:icmp", "0.0.0.0")
@@ -131,8 +124,7 @@
 
 	ifi := loopbackInterface()
 	if ifi == nil {
-		t.Logf("skipping test; an appropriate interface not found")
-		return
+		t.Skip("an appropriate interface not found")
 	}
 	dst, err := net.ResolveIPAddr("ip4", "224.0.0.254") // see RFC 4727
 	if err != nil {
diff --git a/ipv4/multicastlistener_test.go b/ipv4/multicastlistener_test.go
index 2ece9a7..f743d45 100644
--- a/ipv4/multicastlistener_test.go
+++ b/ipv4/multicastlistener_test.go
@@ -23,8 +23,7 @@
 
 func TestUDPSingleConnWithMultipleGroupListeners(t *testing.T) {
 	if testing.Short() || !*testExternal {
-		t.Logf("skipping test to avoid external network")
-		return
+		t.Skip("to avoid external network")
 	}
 
 	for _, tt := range udpMultipleGroupListenerTests {
@@ -61,8 +60,7 @@
 
 func TestUDPMultipleConnWithMultipleGroupListeners(t *testing.T) {
 	if testing.Short() || !*testExternal {
-		t.Logf("skipping test to avoid external network")
-		return
+		t.Skip("to avoid external network")
 	}
 
 	for _, tt := range udpMultipleGroupListenerTests {
@@ -112,12 +110,10 @@
 
 func TestIPSingleConnWithSingleGroupListener(t *testing.T) {
 	if testing.Short() || !*testExternal {
-		t.Logf("skipping test to avoid external network")
-		return
+		t.Skip("to avoid external network")
 	}
 	if os.Getuid() != 0 {
-		t.Logf("skipping test; must be root")
-		return
+		t.Skip("must be root")
 	}
 
 	// listen to a wildcard address
@@ -156,8 +152,7 @@
 
 func TestUDPPerInterfaceSingleConnWithSingleGroupListener(t *testing.T) {
 	if testing.Short() || !*testExternal {
-		t.Logf("skipping test to avoid external network")
-		return
+		t.Skip("to avoid external network")
 	}
 
 	gaddr := &net.IPAddr{IP: net.IPv4(224, 0, 0, 254)} // see RFC 4727
@@ -197,12 +192,10 @@
 
 func TestIPPerInterfaceSingleConnWithSingleGroupListener(t *testing.T) {
 	if testing.Short() || !*testExternal {
-		t.Logf("skipping test to avoid external network")
-		return
+		t.Skip("to avoid external network")
 	}
 	if os.Getuid() != 0 {
-		t.Logf("skipping test; must be root")
-		return
+		t.Skip("must be root")
 	}
 
 	gaddr := &net.IPAddr{IP: net.IPv4(224, 0, 0, 254)} // see RFC 4727
diff --git a/ipv4/multicastsockopt_test.go b/ipv4/multicastsockopt_test.go
index 3f22739..e8a7691 100644
--- a/ipv4/multicastsockopt_test.go
+++ b/ipv4/multicastsockopt_test.go
@@ -39,8 +39,7 @@
 
 func TestUDPMulticastSockopt(t *testing.T) {
 	if testing.Short() || !*testExternal {
-		t.Logf("skipping test to avoid external network")
-		return
+		t.Skip("to avoid external network")
 	}
 
 	for _, tt := range multicastSockoptTests {
@@ -57,12 +56,10 @@
 
 func TestIPMulticastSockopt(t *testing.T) {
 	if testing.Short() || !*testExternal {
-		t.Logf("skipping test to avoid external network")
-		return
+		t.Skip("to avoid external network")
 	}
 	if os.Getuid() != 0 {
-		t.Logf("skipping test; must be root")
-		return
+		t.Skip("must be root")
 	}
 
 	for _, tt := range multicastSockoptTests {
diff --git a/ipv4/unicast_test.go b/ipv4/unicast_test.go
index bddfb97..c601ee1 100644
--- a/ipv4/unicast_test.go
+++ b/ipv4/unicast_test.go
@@ -36,8 +36,7 @@
 
 func TestReadWriteUnicastIPPayloadICMP(t *testing.T) {
 	if os.Getuid() != 0 {
-		t.Logf("skipping test; must be root")
-		return
+		t.Skip("must be root")
 	}
 
 	c, err := net.ListenPacket("ip4:icmp", "0.0.0.0")
@@ -79,8 +78,7 @@
 
 func TestReadWriteUnicastIPDatagram(t *testing.T) {
 	if os.Getuid() != 0 {
-		t.Logf("skipping test; must be root")
-		return
+		t.Skip("must be root")
 	}
 
 	c, err := net.ListenPacket("ip4:icmp", "0.0.0.0")
diff --git a/ipv4/unicastsockopt_test.go b/ipv4/unicastsockopt_test.go
index 6316a2a..ea9bb76 100644
--- a/ipv4/unicastsockopt_test.go
+++ b/ipv4/unicastsockopt_test.go
@@ -88,8 +88,7 @@
 
 func TestIPUnicastSockopt(t *testing.T) {
 	if os.Getuid() != 0 {
-		t.Logf("skipping test; must be root")
-		return
+		t.Skip("must be root")
 	}
 
 	for _, tt := range unicastSockoptTests {