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: TestInterfaces and TestInterfaceAddrs fail on unnumbered or dialup network interfaces #15249

Closed
fuzxxl opened this issue Apr 12, 2016 · 11 comments

Comments

Projects
None yet
4 participants
@fuzxxl
Copy link

commented Apr 12, 2016

Please answer these questions before submitting your issue. Thanks!

  1. What version of Go are you using (go version)?
    I'm trying to build Go 1.6.1

  2. What operating system and processor architecture are you using (go env)?
    I can't run Go env but uname says:

    FreeBSD miso 10.3-RELEASE FreeBSD 10.3-RELEASE #0 r297264: Fri Mar 25 02:10:02 UTC 2016 root@releng1.nyi.freebsd.org:/usr/obj/usr/src/sys/GENERIC amd64

  3. What did you do?
    If possible, provide a recipe for reproducing the error.
    A complete runnable program is good.
    A link on play.golang.org is best.

# in the Go source tree
git checkout go1.6.1
git clean -dxf
cd src
./all.bash 2>&1 | tee /tmp/go1.6.1-build.log
  1. What did you expect to see?

A successful build.

  1. What did you see instead?

Failed tests:

--- FAIL: TestInterfaces (0.00s)
    interface_test.go:79: "em0": flags "up|broadcast|multicast", ifindex 1, mtu 1500
    interface_test.go:80: hardware address "34:e6:d7:60:b2:c5"
    interface_test.go:215: interface address "fe80::36e6:d7ff:fe60:b2c5/64"
    interface_test.go:215: interface address "2a01:1e8:e100:854d:36e6:d7ff:fe60:b2c5/64"
    interface_test.go:215: interface address "192.168.2.20/24"
    interface_test.go:257: joined group address "224.0.0.1"
    interface_test.go:257: joined group address "ff01::1"
    interface_test.go:257: joined group address "ff02::2:2342:deaf"
    interface_test.go:257: joined group address "ff02::2:ff23:42de"
    interface_test.go:257: joined group address "ff02::1"
    interface_test.go:257: joined group address "ff02::1:ff60:b2c5"
    interface_test.go:79: "ath0": flags "up|broadcast|multicast", ifindex 2, mtu 2290
    interface_test.go:80: hardware address "1c:65:9d:0d:70:31"
    interface_test.go:79: "lo0": flags "up|loopback|multicast", ifindex 3, mtu 16384
    interface_test.go:80: hardware address ""
    interface_test.go:215: interface address "::1/128"
    interface_test.go:215: interface address "fe80::1/64"
    interface_test.go:215: interface address "127.0.0.1/8"
    interface_test.go:257: joined group address "224.0.0.1"
    interface_test.go:257: joined group address "ff01::1"
    interface_test.go:257: joined group address "ff02::2:2342:deaf"
    interface_test.go:257: joined group address "ff02::2:ff23:42de"
    interface_test.go:257: joined group address "ff02::1"
    interface_test.go:257: joined group address "ff02::1:ff00:1"
    interface_test.go:79: "wlan0": flags "up|broadcast|multicast", ifindex 4, mtu 1500
    interface_test.go:80: hardware address "1c:65:9d:0d:70:31"
    interface_test.go:185: unexpected value: &net.IPNet{IP:net.IP{0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xff, 0xff, 0x0, 0x0, 0x0, 0x0}, Mask:net.IPMask{0xff, 0x0, 0x0, 0x0}}
    interface_test.go:257: joined group address "224.0.0.1"
--- FAIL: TestInterfaceAddrs (0.00s)
    interface_test.go:215: interface address "fe80::36e6:d7ff:fe60:b2c5/64"
    interface_test.go:215: interface address "2a01:1e8:e100:854d:36e6:d7ff:fe60:b2c5/64"
    interface_test.go:215: interface address "192.168.2.20/24"
    interface_test.go:215: interface address "::1/128"
    interface_test.go:215: interface address "fe80::1/64"
    interface_test.go:215: interface address "127.0.0.1/8"
    interface_test.go:185: unexpected value: &net.IPNet{IP:net.IP{0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xff, 0xff, 0x0, 0x0, 0x0, 0x0}, Mask:net.IPMask{0xff, 0x0, 0x0, 0x0}}
FAIL
FAIL    net 4.447s

The complete (hopefully) build log is attached as go1.6.1-build.log.txt.

Here is my ifconfig if that helps:

$ ifconfig
em0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
    options=4019b<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,VLAN_HWCSUM,TSO4,VLAN_HWTSO>
    ether 34:e6:d7:60:b2:c5
    inet6 fe80::36e6:d7ff:fe60:b2c5%em0 prefixlen 64 scopeid 0x1 
    inet6 2a01:1e8:e100:854d:36e6:d7ff:fe60:b2c5 prefixlen 64 autoconf 
    inet 192.168.2.20 netmask 0xffffff00 broadcast 192.168.2.255 
    nd6 options=23<PERFORMNUD,ACCEPT_RTADV,AUTO_LINKLOCAL>
    media: Ethernet autoselect (1000baseT <full-duplex>)
    status: active
ath0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 2290
    ether 1c:65:9d:0d:70:31
    nd6 options=21<PERFORMNUD,AUTO_LINKLOCAL>
    media: IEEE 802.11 Wireless Ethernet autoselect mode 11ng
    status: associated
lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> metric 0 mtu 16384
    options=600003<RXCSUM,TXCSUM,RXCSUM_IPV6,TXCSUM_IPV6>
    inet6 ::1 prefixlen 128 
    inet6 fe80::1%lo0 prefixlen 64 scopeid 0x3 
    inet 127.0.0.1 netmask 0xff000000 
    nd6 options=21<PERFORMNUD,AUTO_LINKLOCAL>
wlan0: flags=8c43<UP,BROADCAST,RUNNING,OACTIVE,SIMPLEX,MULTICAST> metric 0 mtu 1500
    ether 1c:65:9d:0d:70:31
    inet 0.0.0.0 netmask 0xff000000 broadcast 255.255.255.255 
    nd6 options=29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL>
    media: IEEE 802.11 Wireless Ethernet autoselect (autoselect)
    status: no carrier
    ssid "Vodafone Hotspot" channel 6 (2437 MHz 11g ht/20)
    regdomain 106 indoor ecm authmode OPEN privacy OFF txpower 20 bmiss 7
    scanvalid 60 protmode CTS ampdulimit 8k ampdudensity 8 shortgi wme
    burst

@mikioh mikioh changed the title Building Go 1.6.1 fails on FreeBSD 10.3 net: Building Go 1.6.1 fails on FreeBSD 10.3 Apr 12, 2016

@mikioh

This comment has been minimized.

Copy link
Contributor

commented Apr 12, 2016

@fuzxxl

Thanks for the report. Can you please show us the output of go test -v TestRouteRIB at $GOROOT/src/syscall? Especially for "wlan0". Thanks.

@mikioh mikioh added this to the Go1.7 milestone Apr 12, 2016

@mikioh

This comment has been minimized.

Copy link
Contributor

commented Apr 12, 2016

Looks like this is a bug on both TestInterfaces and TestInterfaceAddrs test cases. I completely overlooked the existence of dialup interfaces. You can ignore those test errors. The network interface identification functionality works correctly.

@fuzxxl

This comment has been minimized.

Copy link
Author

commented Apr 12, 2016

I have just confirmed, this issue also happens on tip.

Are you sure that's the right command? Because I get this:

$ go version          
go version go1.6.1 freebsd/amd64
$ go env | grep GOROOT
GOROOT="/home/fuz/go"
$ pwd
/home/fuz/go/src/syscall
$ which go
/home/fuz/go/bin/go
$ go test -v TestRouteRIB
can't load package: package TestRouteRIB: cannot find package "TestRouteRIB" in any of:
    /home/fuz/go/src/TestRouteRIB (from $GOROOT)
    /home/fuz/src/go/src/TestRouteRIB (from $GOPATH)
@mikioh

This comment has been minimized.

Copy link
Contributor

commented Apr 12, 2016

Please run the command at $GOROOT/src/syscall.

@mikioh mikioh changed the title net: Building Go 1.6.1 fails on FreeBSD 10.3 net: TestInterfaces and TestInterfaceAddrs fail on unnumbered or dialup network ineterfaces Apr 12, 2016

@mikioh mikioh changed the title net: TestInterfaces and TestInterfaceAddrs fail on unnumbered or dialup network ineterfaces net: TestInterfaces and TestInterfaceAddrs fail on unnumbered or dialup network interfaces Apr 12, 2016

@fuzxxl

This comment has been minimized.

Copy link
Author

commented Apr 12, 2016

@mikioh I did, which is why I included the output of pwd and go env.

@mikioh

This comment has been minimized.

Copy link
Contributor

commented Apr 12, 2016

@fuzxxl,

Yup, my bad, sorry. Please run go test -v -run=TestRouteRIB.

@fuzxxl

This comment has been minimized.

Copy link
Author

commented Apr 12, 2016

@mikioh

This comment has been minimized.

Copy link
Contributor

commented Apr 12, 2016

@fuzxxl,

Thanks for the information. Just confirmed that this is a bug of both test cases and the net package APIs work correctly.

@mikioh mikioh added the Testing label Apr 12, 2016

@fuzxxl

This comment has been minimized.

Copy link
Author

commented Apr 12, 2016

It would be great if the fix could be ported back to Go 1.6.1 so I have a chance to build Go from the ports without disabling tests.

@mikioh mikioh removed this from the Go1.7 milestone Apr 12, 2016

@ianlancetaylor

This comment has been minimized.

Copy link
Contributor

commented Apr 12, 2016

We only backport critical fixes to releases. A test failure is not a critical fix. Sorry.

@ianlancetaylor ianlancetaylor added this to the Go1.7 milestone Apr 12, 2016

@gopherbot

This comment has been minimized.

Copy link

commented Apr 14, 2016

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

@gopherbot gopherbot closed this in 19db745 Apr 15, 2016

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