From c576bcbad5e7671ae24d499d77a4b2371c4ab981 Mon Sep 17 00:00:00 2001 From: Mikio Hara Date: Mon, 2 Sep 2013 16:44:51 +0900 Subject: [PATCH] net: fix TestFirstFavoriteAddr failure on single IP stack kernel Update #3610 Update #5267 Update #5707 R=golang-dev, bradfitz, dave CC=golang-dev https://golang.org/cl/13465043 --- src/pkg/net/ipsock_test.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/pkg/net/ipsock_test.go b/src/pkg/net/ipsock_test.go index 522266f4abf..3deacaaa72b 100644 --- a/src/pkg/net/ipsock_test.go +++ b/src/pkg/net/ipsock_test.go @@ -177,6 +177,10 @@ var firstFavoriteAddrTests = []struct { } func TestFirstFavoriteAddr(t *testing.T) { + if !supportsIPv4 || !supportsIPv6 { + t.Skip("ipv4 or ipv6 is not supported") + } + for i, tt := range firstFavoriteAddrTests { addr, err := firstFavoriteAddr(tt.filter, tt.ips, tt.inetaddr) if err != tt.err {