go/src
Tim Ebringer 489f65b52a net: improve netsh usage in Windows unit tests
The TestInterfaceAddrsWithNetsh Windows unit test parses and compares the
output of the "netsh" command against more low level Windows API calls. In
at least two cases, some quirks of netsh cause these comparisons to fail.

One example appears to be wi-fi adapters. After a reboot, before it has
been allowed to connect to a network, netsh for IPv4 will not show an
address, whereas netsh for IPv6 will. If the interface is allowed to
connect, and then disconnected, netsh for IPv4 now shows an address and
the test will pass.

The fix is to not compare netsh output if the interface is down.

A related issue is that the IPv6 version of "netsh" can return an
IPv4-embedded IPv6 address where the IPv4 component of the address
is in decimal form, whilst the test is expecting hexadecimal form.

For example, output might be:

  Address fe80::5efe:192.168.1.7%6 Parameters
    ...

Whilst this is valid notation, the fix is to recognise this format in the
"netsh" output and re-parse the address into the all-hexadecimal
representation that the test is expecting.

Fixes #13981

Change-Id: Ie8366673f4d43d07bad80d6d5d1d6e33f654b6cc
Reviewed-on: https://go-review.googlesource.com/18711
Reviewed-by: Alex Brainman <alex.brainman@gmail.com>
Run-TryBot: Alex Brainman <alex.brainman@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
2016-01-21 23:01:56 +00:00
..
archive archive/zip: fix reading, writing of zip64 archives 2016-01-07 00:44:04 +00:00
bufio bufio: clarify Read docs 2015-12-01 20:05:25 +00:00
builtin
bytes bytes: document that buffer is reused in Truncate and Reset 2015-12-18 19:40:58 +00:00
cmd cmd/go: document PackageError in go list output 2016-01-21 01:35:07 +00:00
compress build: shorten a few packages with long tests 2015-12-29 15:46:44 +00:00
container
crypto crypto/tls: note in comment that Certificate.Leaf is nil after parsing. 2016-01-21 18:50:24 +00:00
database/sql database/sql/driver: clarify DefaultParameterConverter docs 2016-01-13 18:15:38 +00:00
debug debug/dwarf: fix nil pointer dereference in cyclic type structures 2016-01-14 02:05:31 +00:00
encoding encoding/json: doc: Decode only writes to exported fields 2016-01-08 16:15:25 +00:00
errors
expvar
flag
fmt Revert "fmt: check newline in the end of input" 2015-12-11 06:35:20 +00:00
go net/http: update http2 to check header values, move from vendor to internal 2016-01-21 00:19:02 +00:00
hash cmd/internal/obj/x86: add new instructions, cleanup. 2016-01-13 14:04:44 +00:00
html text/template,html/template: correct comment in DefinedTemplates 2015-11-24 21:52:36 +00:00
image image/color: have NYCbCrA.RGBA work in 16-bit color. 2015-12-24 06:55:33 +00:00
index/suffixarray
internal net/http: update http2 to check header values, move from vendor to internal 2016-01-21 00:19:02 +00:00
io io/ioutil: add examples to functions 2015-11-30 19:47:18 +00:00
log log/syslog: document that syslog is frozen 2016-01-05 22:56:07 +00:00
math math/big: fix Exp(x, x, x) for certain large x 2016-01-13 01:43:35 +00:00
mime mime: fix parsing of empty string attribute value 2015-12-05 20:14:25 +00:00
net net: improve netsh usage in Windows unit tests 2016-01-21 23:01:56 +00:00
os runtime: for c-archive/c-shared, install signal handlers synchronously 2016-01-09 00:58:38 +00:00
path path/filepath: include test number in TestIssue13582 output 2015-12-15 06:43:35 +00:00
reflect reflect: document DeepEqual, fix case of maps with NaN keys 2015-12-11 05:50:05 +00:00
regexp regexp/syntax: fix factoring of common prefixes in alternations 2016-01-08 16:41:46 +00:00
runtime runtime/race: fix test so it compiles 2016-01-20 03:08:07 +00:00
sort sort: improve average quicksort performance 2015-12-04 20:41:47 +00:00
strconv
strings
sync internal/race: add package 2015-11-26 16:50:31 +00:00
syscall cmd/compile: recognize Syscall-like functions for liveness analysis 2016-01-14 01:16:45 +00:00
testing testing: move comment inside T.Parallel 2016-01-06 17:59:55 +00:00
text text/template: fix documentation for pipelines 2016-01-21 18:41:36 +00:00
time time: restore old error text for day out of range 2016-01-08 03:15:20 +00:00
unicode unicode/utf8: add test for FullRune 2015-12-01 10:39:06 +00:00
unsafe
vendor net/http: update http2 to check header values, move from vendor to internal 2016-01-21 00:19:02 +00:00
Make.dist
all.bash
all.bat
all.rc
androidtest.bash
bootstrap.bash build: use consistent shebang line 2016-01-14 03:16:20 +00:00
buildall.bash build: test linux/mips64 and linux/mips64le with buildall.bash 2016-01-19 04:43:44 +00:00
clean.bash
clean.bat
clean.rc
iostest.bash
make.bash src: remove reference to since-deleted dist -s flag 2015-12-17 22:03:56 +00:00
make.bat
make.rc
nacltest.bash
race.bash cmd/dist: make test default to --no-rebuild 2015-12-29 15:20:00 +00:00
race.bat cmd/dist: make test default to --no-rebuild 2015-12-29 15:20:00 +00:00
run.bash cmd/dist: make test default to --no-rebuild 2015-12-29 15:20:00 +00:00
run.bat cmd/dist: make test default to --no-rebuild 2015-12-29 15:20:00 +00:00
run.rc cmd/dist: make test default to --no-rebuild 2015-12-29 15:20:00 +00:00