From: Ian Lance Taylor Date: Sat, 21 Nov 2015 00:01:45 +0000 (-0800) Subject: net: don't run multicast listen test on nil interface in short mode X-Git-Tag: go1.6beta1~343 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=7e312243292866e73d2f2346a81eceffa1890f64;p=gostls13.git net: don't run multicast listen test on nil interface in short mode The gccgo bug report https://gcc.gnu.org/PR65785 points out that the multicast listen tests will use the network even with -test.short. Fix test by checking testing.Short with a nil interface. Change-Id: I7eab8df34fe3b78fc376912312fac9d0f94977f1 Reviewed-on: https://go-review.googlesource.com/17154 Reviewed-by: Mikio Hara --- diff --git a/src/net/listen_test.go b/src/net/listen_test.go index d5627f2556..51ffe67238 100644 --- a/src/net/listen_test.go +++ b/src/net/listen_test.go @@ -542,7 +542,7 @@ func TestIPv4MulticastListener(t *testing.T) { // routing stuff for finding out an appropriate // nexthop containing both network and link layer // adjacencies. - if ifi == nil && !*testExternal { + if ifi == nil && (testing.Short() || !*testExternal) { continue } for _, tt := range ipv4MulticastListenerTests { @@ -618,7 +618,7 @@ func TestIPv6MulticastListener(t *testing.T) { // routing stuff for finding out an appropriate // nexthop containing both network and link layer // adjacencies. - if ifi == nil && (!*testExternal || !*testIPv6) { + if ifi == nil && (testing.Short() || !*testExternal || !*testIPv6) { continue } for _, tt := range ipv6MulticastListenerTests {