Commit eaa7bc33 by Ian Lance Taylor

re PR go/65785 (libgo TestIPv4MulticastListener test fails on machine with no network connection)

	PR go/65785
    net: don't run multicast listen test on nil interface in short mode
    
    This is a backport of https://golang.org/cl/17154.
    
    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.
    
    Reviewed-on: https://go-review.googlesource.com/17158

From-SVN: r230695
parent bbbe8b33
b839c8c35af49bd6d86306ad34449654a4657cb1 81dcb1ba4de82a6c9325cb322d5a832a6b1f168d
The first line of this file holds the git revision number of the last The first line of this file holds the git revision number of the last
merge done from the gofrontend repository. merge done from the gofrontend repository.
...@@ -542,7 +542,7 @@ func TestIPv4MulticastListener(t *testing.T) { ...@@ -542,7 +542,7 @@ func TestIPv4MulticastListener(t *testing.T) {
// routing stuff for finding out an appropriate // routing stuff for finding out an appropriate
// nexthop containing both network and link layer // nexthop containing both network and link layer
// adjacencies. // adjacencies.
if ifi == nil && !*testExternal { if ifi == nil && (testing.Short() || !*testExternal) {
continue continue
} }
for _, tt := range ipv4MulticastListenerTests { for _, tt := range ipv4MulticastListenerTests {
...@@ -618,7 +618,7 @@ func TestIPv6MulticastListener(t *testing.T) { ...@@ -618,7 +618,7 @@ func TestIPv6MulticastListener(t *testing.T) {
// routing stuff for finding out an appropriate // routing stuff for finding out an appropriate
// nexthop containing both network and link layer // nexthop containing both network and link layer
// adjacencies. // adjacencies.
if ifi == nil && (!*testExternal || !*testIPv6) { if ifi == nil && (testing.Short() || !*testExternal || !*testIPv6) {
continue continue
} }
for _, tt := range ipv6MulticastListenerTests { for _, tt := range ipv6MulticastListenerTests {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment