Skip to content

net: TestInterfaces and TestInterfaceAddrs fail on unnumbered or dialup network interfaces #15249

@clausecker

Description

@clausecker

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 [email protected]:/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

Metadata

Metadata

Assignees

No one assigned

    Labels

    FrozenDueToAgeTestingAn issue that has been verified to require only test changes, not just a test failure.

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions