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: TestInterfaceArrivalAndDeparture failure #6879

Closed
gopherbot opened this issue Dec 3, 2013 · 5 comments

Comments

Projects
None yet
4 participants
@gopherbot
Copy link

commented Dec 3, 2013

by wyshunter:

Before filing a bug, please check whether it has been fixed since the
latest release. Search the issue tracker and check that you're running the
latest version of Go:

Run "go version" and compare against
http://golang.org/doc/devel/release.html  If a newer version of Go exists,
install it and retry what you did to reproduce the problem.

Thanks.

What steps will reproduce the problem?

[root@hostname net]# pwd
/usr/local/go/src/pkg/net

[root@hostname net]# go test net
--- FAIL: TestInterfaceArrivalAndDeparture (0.01 seconds)
    interface_unix_test.go:113: testInterface.setup failed: exit status 255
FAIL
FAIL    net 31.551s

What is the expected output?
ok      net some seconds

What do you see instead?

the same problem has been found in the previous issue and have been modified
                if err := ti.setBroadcast(5682 + i); err != nil {
                        t.Skipf("test requires external command: %v", err)
                }
                if err := ti.setup(); err != nil {
                        t.Fatalf("testInterface.setup failed: %v", err)
                } else {
                        time.Sleep(3 * time.Millisecond)
                }

I run it well as a normal user, but when I sudo to root and run it, it show the problem
again:

--- FAIL: TestInterfaceArrivalAndDeparture (0.01 seconds)
    interface_unix_test.go:113: testInterface.setup failed: exit status 255
FAIL

Which compiler are you using (5g, 6g, 8g, gccgo)?
6g

Which operating system are you using?
CST 2013 x86_64 x86_64 x86_64 GNU/Linux

Which version are you using?  (run 'go version')
go1.2rc5

Please provide any additional information below.
@remyoudompheng

This comment has been minimized.

Copy link
Contributor

commented Dec 3, 2013

Comment 1:

Please use a more descriptive title.
You can try the following patch to obtain more details:
diff -r 7326da92ff4d src/pkg/net/interface_unix_test.go
--- a/src/pkg/net/interface_unix_test.go    Mon Dec 02 09:06:41 2013 +1100
+++ b/src/pkg/net/interface_unix_test.go    Tue Dec 03 12:24:29 2013 +0100
@@ -7,6 +7,7 @@
 package net
 
 import (
+   "fmt"
    "os"
    "os/exec"
    "runtime"
@@ -24,8 +25,8 @@
 
 func (ti *testInterface) setup() error {
    for _, cmd := range ti.setupCmds {
-       if err := cmd.Run(); err != nil {
-           return err
+       if output, err := cmd.CombinedOutput(); err != nil {
+           return fmt.Errorf("%v: %s (%q)", cmd.Args, err, output)
        }
    }
    return nil
@mikioh

This comment has been minimized.

Copy link
Contributor

commented Dec 3, 2013

Comment 2:

Which version of Linux are you running?

Status changed to Accepted.

@rsc

This comment has been minimized.

Copy link
Contributor

commented Dec 4, 2013

Comment 3:

Labels changed: added release-none, removed go1.3maybe.

@rsc

This comment has been minimized.

Copy link
Contributor

commented Dec 4, 2013

Comment 4:

Labels changed: added repo-main.

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

@rsc rsc removed release-none labels Apr 10, 2015

@mikioh mikioh added the Testing label May 2, 2015

@gopherbot

This comment has been minimized.

Copy link
Author

commented May 13, 2016

CL https://golang.org/cl/23112 mentions this issue.

@gopherbot gopherbot closed this in 041cc14 May 14, 2016

@golang golang locked and limited conversation to collaborators May 14, 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.