Closed fhs closed 4 years ago
Tests are also failing:
cpu% cd src/net
cpu% go test -short
--- FAIL: TestInterfaces (0.00s)
interface_test.go:56: route ip+net: open pkt2/addr: 'pkt2' './home/big/go/src/net/pkt2' does not exist
--- FAIL: TestInterfaceAddrs (0.00s)
interface_test.go:87: route ip+net: open pkt2/addr: 'pkt2' './home/big/go/src/net/pkt2' does not exist
--- FAIL: TestInterfaceUnicastAddrs (0.00s)
interface_test.go:106: route ip+net: open pkt2/addr: 'pkt2' './home/big/go/src/net/pkt2' does not exist
--- FAIL: TestInterfaceMulticastAddrs (0.00s)
interface_test.go:133: route ip+net: open pkt2/addr: 'pkt2' './home/big/go/src/net/pkt2' does not exist
FAIL
exit status: 'net.test 11992: 1'
FAIL net 40.497s
Change https://golang.org/cl/240259 mentions this issue: net: handle more interface types without a hardware address on Plan 9
What version of Go are you using (
go version
)?What did you do?
bind pkt
to the interface control file. Note that the device name in the interface status file ispkt2
:net.Interfaces()
in a Go program.What did you expect to see?
nil error
What did you see instead?
Error returned:
The code is assuming
pkt2
is a path to a network device (e.g./net/ether0
) and tries to openpkt2/addr
to read in theInterface.HardwareAddr
: https://github.com/golang/go/blob/c875503cf79f82b7d2dbec85667f330f72ec4557/src/net/interface_plan9.go#L71-L76 It does skip this for the loopback interface (/dev/null
device), but it should also skip for packet interfaces. Maybe it should just skip anything without a/net/
prefix.@gopherbot add labels OS-Plan9, NeedsFix