From: Brad Fitzpatrick Date: Mon, 2 May 2011 21:22:40 +0000 (-0700) Subject: net: default to 127.0.0.1, not localhost, in TestICMP X-Git-Tag: weekly.2011-05-22~169 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=12cf1699e7ff6d7fc9f62e52f9ee065cdfa23f00;p=gostls13.git net: default to 127.0.0.1, not localhost, in TestICMP If localhost resolves to ::1, the IPv4-only test fails. R=rsc, r2 CC=golang-dev https://golang.org/cl/4444084 --- diff --git a/src/pkg/net/ipraw_test.go b/src/pkg/net/ipraw_test.go index ee8c71fc19..0c0b675f87 100644 --- a/src/pkg/net/ipraw_test.go +++ b/src/pkg/net/ipraw_test.go @@ -60,7 +60,8 @@ func parsePingReply(p []byte) (id, seq int) { } var srchost = flag.String("srchost", "", "Source of the ICMP ECHO request") -var dsthost = flag.String("dsthost", "localhost", "Destination for the ICMP ECHO request") +// 127.0.0.1 because this is an IPv4-specific test. +var dsthost = flag.String("dsthost", "127.0.0.1", "Destination for the ICMP ECHO request") // test (raw) IP socket using ICMP func TestICMP(t *testing.T) {