-
Notifications
You must be signed in to change notification settings - Fork 17.9k
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: TestInterfaceAddrsWithNetsh is flaky #13981
Comments
Thanks for the report. It looks like the test has two issues. One is that it doesn't assume netsh command never returns IPv4 link-local addresses. Another is that it does literal address comparison incorrectly for IPv6 addressing for IPv4/IPv6 translators (see RFC 6052) used in ISATAP, 6to4, XLAT and MAP. |
We can skip TestInterfaceAddrsWithNetsh in Go 1.6 because we have bottom line test cases in interface_test.go and interface_windows_test.go. |
CL https://golang.org/cl/18710 mentions this issue. |
@jucie please run
command and show us its output. Thank you. Alex |
netsh interface ipv4 show address >netshOutput.txt |
Perhaps we should just skip interfaces that are not "enabled". @jucie can you show us more, please? It would be nice to know what
commands output. Thank you. Alex |
I collected the output of all this commands into a single file, Alex. |
Updates #13981. Change-Id: Id8f3cd56a81a7a993cea5c757e619407da491fed Reviewed-on: https://go-review.googlesource.com/18710 Reviewed-by: Ian Lance Taylor <[email protected]>
@jucie, thank you for testing. It seems to me that netsh does not display any addresses for interfaces that are disabled. So your CL 18711 to skip appropriate tests sounds like a good solution for this issue. One thing that still puzzules me is (see your output above):
"169.254.129.89/16" is returned by Go net library for your "Local Area Connection* 13" network interface. Given that netsh displays no such address, where does this address come from? @mikio ? @jucie, did you had this address configured / used in the past? If so, how is this address of any use to anyone? @mikio ? Perhaps we should return no address if interface is down? Alex |
Hi, Alex. The suggestion to skip TestInterfaceAddrsWithNetsh was from @mikioh. I don't know that code. This box of mine is a notebook. I only use Wifi connection. Maybe 169.254.129.89/16 is for the wired connection, that I don't use anymore. I used wired connection a while back, when my Wifi wasn't ok. |
I was refering to your https://go-review.googlesource.com/#/c/18711/ Thank you for checking your usage of 169.254.129.89/16. My questions to @mikioh still stand. Alex |
As mentioned above, 169.254.0.0/16 is the prefix containing IPv4 link-local addresses: https://tools.ietf.org/html/rfc3927. As per MSDN, IP_ADAPTER_UNICAST_ADDRESS strucuture contains a few states such as Flags and DadState. That means that it's possible for netsh command to veil IPv4 addresses which are not important for non-IP infrastructure applications with its display filters even on an interface that is operational status is up. I think that addresses displayed by netsh command are a subset of addresses returned from GetAdapterAddresses but not vice versa. |
Thank you for explaining @mikioh. But I still don't see how it is helpful to user of GetAdapterAddresses that Ethernet interface has "169.254.130.171/16" address. It is marked as "DHCP enabled", so even when we bring this interface up there is no guarantee that address will remain. I think this knowledge is pretty useless and confusing. Don't you think? Can you also, please, review https://go-review.googlesource.com/#/c/18711/ ? Thank you. Alex |
CL https://golang.org/cl/18711 mentions this issue. |
Only to make things clear, I must say that https://go-review.googlesource.com/#/c/18711/ is Tim Ebringer's work, not mine. |
My confusion. Sorry about that. Alex |
What version of Go are you using (go version)?
go version go1.6beta2 windows/amd64
What operating system and processor architecture are you using?
OS Name: Microsoft Windows 8 Single Language
OS Version: 6.2.9200 N/A Build 9200
Intel64 Family 6 Model 58 Stepping 9 GenuineIntel ~2400 Mhz
What did you do?
cd go\src
all.bat
What did you expect to see?
A clean build & test output.
What did you see instead?
--- FAIL: TestInterfaceAddrsWithNetsh (6.59s)
net_windows_test.go:433: Local Area Connection* 13: unexpected addresses list ["169.254.129.89/16" "fe80::85ef:998a:25c7:8159"], want ["fe80::85ef:998a:25c7:8159"]
net_windows_test.go:433: Bluetooth Network Connection: unexpected addresses list ["169.254.80.206/16" "fe80::4ca8:627d:ea16:50ce"], want ["fe80::4ca8:627d:ea16:50ce"]
net_windows_test.go:433: Ethernet: unexpected addresses list ["169.254.130.171/16" "fe80::d16c:aa5d:b3b4:82ab"], want ["fe80::d16c:aa5d:b3b4:82ab"]
net_windows_test.go:433: isatap.{729DD26D-8C51-46ED-8530-F0CB45D3073B}: unexpected addresses list ["fe80::5efe:c0a8:167"], want ["fe80::5efe:192.168.1.103"]
FAIL
The text was updated successfully, but these errors were encountered: