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: test fails when there's no network #7431

Closed
randall77 opened this issue Feb 27, 2014 · 5 comments

Comments

Projects
None yet
6 participants
@randall77
Copy link
Contributor

commented Feb 27, 2014

Turn off your network (ifconfig eth0 down, whatever else makes sense).

Run all.bash.

--- FAIL: TestIPv4MulticastListener (0.01 seconds)
    multicast_test.go:55: First ListenMulticastUDP on <nil> failed: listen udp 224.0.0.254: setsockopt: no such device
FAIL
FAIL    net 2.376s

TestIPv6 also fails.

all.bash should work even without the presence of the network, even if it just skips
these tests.
@mikioh

This comment has been minimized.

Copy link
Contributor

commented Feb 28, 2014

Comment 1:

Sure, I'll smash all such frakiness in Go 1.4 with new helper library: net/test.
Friends: issue #4176, issue #5524, issue #5707, issue #6553, issue #6843, issue #6879

Labels changed: added release-go1.4.

Status changed to Accepted.

@robpike

This comment has been minimized.

Copy link
Contributor

commented Feb 28, 2014

Comment 2:

Not so fast. I'm not convinced this is worth refactoring for. If there's no network, the
best we can do is skip the network tests but then what? Skip tests that need floating
point if there's no FP unit? Skip tests that use the file system if the disk is
unmounted?
@bradfitz

This comment has been minimized.

Copy link
Member

commented Feb 28, 2014

Comment 3:

all.bash normally passes on an airplane with no network access. (skipping some tests)
It occasionally breaks, and is then fixed. I think it's a good goal to have.
The actual builders have network access, so we won't regress with some skips.
@mikioh

This comment has been minimized.

Copy link
Contributor

commented Aug 13, 2014

Comment 4:

Labels changed: added repo-main, removed release-go1.4.

Status changed to New.

@randall77 randall77 added new labels Aug 13, 2014

@bradfitz bradfitz removed the new label Dec 18, 2014

@rsc rsc added this to the Unplanned milestone Apr 10, 2015

@rsc rsc removed the repo-main label Apr 14, 2015

@mikioh

This comment has been minimized.

Copy link
Contributor

commented May 12, 2016

I think go1.6 and above can handle this case. Closing.

@mikioh mikioh closed this May 12, 2016

@golang golang locked and limited conversation to collaborators May 12, 2017

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
You can’t perform that action at this time.