1
0
mirror of https://github.com/golang/go synced 2024-11-17 20:54:48 -07:00

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 <mikioh.mikioh@gmail.com>
This commit is contained in:
Ian Lance Taylor 2015-11-20 16:01:45 -08:00
parent 29499858bf
commit 7e31224329

View File

@ -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 {