Commit d6388d96 authored by Mikio Hara's avatar Mikio Hara

icmp: don't run diagnostic tests by default, even in long mode

Change-Id: I4eec45705348437ec2ee7eae8d0d98db0f28152d
Reviewed-on: https://go-review.googlesource.com/c/155858Reviewed-by: 's avatarIan Lance Taylor <iant@golang.org>
parent 4602d507
...@@ -6,6 +6,7 @@ package icmp_test ...@@ -6,6 +6,7 @@ package icmp_test
import ( import (
"errors" "errors"
"flag"
"fmt" "fmt"
"net" "net"
"os" "os"
...@@ -21,6 +22,8 @@ import ( ...@@ -21,6 +22,8 @@ import (
"golang.org/x/net/ipv6" "golang.org/x/net/ipv6"
) )
var testDiag = flag.Bool("diag", false, "whether to test ICMP message exchange with external network")
type diagTest struct { type diagTest struct {
network, address string network, address string
protocol int protocol int
...@@ -28,7 +31,7 @@ type diagTest struct { ...@@ -28,7 +31,7 @@ type diagTest struct {
} }
func TestDiag(t *testing.T) { func TestDiag(t *testing.T) {
if testing.Short() { if !*testDiag {
t.Skip("avoid external network") t.Skip("avoid external network")
} }
......
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