go: net: TestInterfaceHardwareAddrWithWmic fails
What version of Go are you using (go version)?
go version devel +98443ecd0a Fri Dec 15 21:57:27 2017 +0000 windows/amd64
Does this issue reproduce with the latest release?
Yes, it does.
What operating system and processor architecture are you using (go env)?
set GOARCH=amd64 set GOBIN= set GOCACHE=C:\Users\Alex\AppData\Local\go-build set GOEXE=.exe set GOHOSTARCH=amd64 set GOHOSTOS=windows set GOOS=windows set GOPATH=c:\users\alex\dev set GORACE= set GOROOT=c:\users\alex\dev\go set GOTMPDIR= set GOTOOLDIR=c:\users\alex\dev\go\pkg\tool\windows_amd64 set GCCGO=gccgo set CC=gcc set CXX=g++ set CGO_ENABLED=1 set CGO_CFLAGS=-g -O2 set CGO_CPPFLAGS= set CGO_CXXFLAGS=-g -O2 set CGO_FFLAGS=-g -O2 set CGO_LDFLAGS=-g -O2 set PKG_CONFIG=pkg-config set GOGCCFLAGS=-m64 -mthreads -fmessage-length=0 -fdebug-prefix-map=C:\Users\Alex\AppData\Local\Temp\go-build981970258=/tmp/go-build -gno-record-gcc-switches
What did you do?
I run go test -run=TestInterfaceHardwareAddrWithWmic net command.
What did you expect to see?
PASS
What did you see instead?
--- FAIL: TestInterfaceHardwareAddrWithWmic (0.31s)
net_windows_test.go:560: go interface count (3, map[0a:00:27:00:00:06:VirtualBox Host-Only Network #2 44:8a:5b:e8:97:a9:Ethernet 00:00:00:00:00:00:00:e0:Teredo Tunneling Pseudo-Interface]) differs from wmic count (2, map[44:8a:5b:e8:97:a9:[Ethernet] 0a:00:27:00:00:06:[VirtualBox Host-Only Network #2]])
net_windows_test.go:572: go found interface (name: Teredo Tunneling Pseudo-Interface, mac: 00:00:00:00:00:00:00:e0) not found by wmic (map[44:8a:5b:e8:97:a9:[Ethernet] 0a:00:27:00:00:06:[VirtualBox Host-Only Network #2]])
FAIL
FAIL net 0.638s
Alex
About this issue
- Original URL
- State: closed
- Created 7 years ago
- Comments: 16 (13 by maintainers)
@alexbrainman Good news. wmic command output UTF-16 when the output is a file. It return DBCS when output is a pipe. So writing file should work. Could you please add runWmic?