Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

net tests depend on external network #538

Closed
gopherbot opened this issue Jan 17, 2010 · 8 comments
Closed

net tests depend on external network #538

gopherbot opened this issue Jan 17, 2010 · 8 comments

Comments

@gopherbot
Copy link
Contributor

by csanady:

What steps will reproduce the problem?
1. Use IPv6 DNS servers exclusively in /etc/resolv.conf.
2. make all

What is the expected output? None.
What do you see instead?

First of all: 

--- FAIL: http.TestClient
    Get http://www.google.com/robots.txt: dial tcp www.google.com:http: dial udp 
2001:db8::1:53: too many colons in address 2001:db8::1:53
--- FAIL: http.TestRedirect
    Get http://codesearch.google.com/: dial tcp codesearch.google.com:http: dial udp 
2001:db8::1:53: too many colons in address 2001:db8::1:53
FAIL

net.Dial() requires []'s around IPv6 addresses.  After that is corrected:

--- FAIL: net.TestDialGoogle
    -- 74.125.19.99:80 --
    -- www.google.com:80 --
    Dial("tcp4", "", "www.google.com:80") = _, dial tcp4 www.google.com:80: dial udp 
[2001:db8::1]:53: address family not supported by protocol family
    -- 74.125.19.99:http --
    -- www.google.com:http --
    Dial("tcp4", "", "www.google.com:http") = _, dial tcp4 www.google.com:http: dial udp 
[2001:db8::1]:53: address family not supported by protocol family
    -- 074.125.019.099:0080 --
    -- [::ffff:74.125.19.99]:80 --
    -- [::ffff:4a7d:1363]:80 --
    -- [0:0:0:0:0000:ffff:74.125.19.99]:80 --
    -- [0:0:0:0:000000:ffff:74.125.19.99]:80 --
    -- [0:0:0:0:0:ffff::74.125.19.99]:80 --
FAIL

The net test disables IPv6 sockets, and the names can't be resolved.


What is your $GOOS?  $GOARCH? darwin/amd64


Which revision are you using?  release.2010-01-13


Please provide any additional information below.

The attached diff solves the above problems, though the preferIPv4 testing in
dialgoogle_test.go 
could be improved.  Also, while it not automatically tested without the -ipv6 flag, the
address for 
ipv6.google.com appears to be out of date.

Attachments:

  1. go.diff (1477 bytes)
@rsc
Copy link
Contributor

rsc commented Jan 17, 2010

Comment 1:

The eventual plan is to replace the net tests with ones that
don't require a network connection.

Owner changed to r...@golang.org.

Status changed to Accepted.

@gopherbot
Copy link
Contributor Author

Comment 2 by csanady:

The tests aside, name resolution is still not functional with an IPv6 name server.  
_DNS_ReadConfig() in 
dnsconfig.go, which parses /etc/resolv.conf, needs to properly bracket the address of
IPv6 nameserver entries.
The attached diff also includes a fix for dnsconfig.go.

@rsc
Copy link
Contributor

rsc commented Jan 18, 2010

Comment 3:

Issue #378 has been merged into this issue.

@rsc
Copy link
Contributor

rsc commented Feb 26, 2010

Comment 4:

Issue #629 has been merged into this issue.

@adg
Copy link
Contributor

adg commented Oct 18, 2010

Comment 5:

Issue #1205 has been merged into this issue.

@rsc
Copy link
Contributor

rsc commented Nov 19, 2010

Comment 6:

Issue #1287 has been merged into this issue.

@adg
Copy link
Contributor

adg commented Nov 23, 2010

Comment 7:

Issue #1292 has been merged into this issue.

@rsc
Copy link
Contributor

rsc commented Apr 20, 2011

Comment 8:

the testshort tests (what all.bash runs) don't use an external network anymore.

Status changed to Fixed.

This issue was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants