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: Windows test use PowerShell "getmac", not always available #20073

Open
bradfitz opened this Issue Apr 21, 2017 · 14 comments

Comments

Projects
None yet
7 participants
@bradfitz
Member

bradfitz commented Apr 21, 2017

The Windows tests use PowerShell "getmac", which only works in Windows Server 2008.

In 2012 and 2016, it fails.

Maybe the replacement is now "Get-NetAdapter | select Name,MacAddress" ?

/cc @alexbrainman @mikioh

@bradfitz bradfitz added this to the Unplanned milestone Apr 21, 2017

gopherbot pushed a commit that referenced this issue Apr 21, 2017

net: skip Windows test using getmac if getmac cmdlet not available
This doesn't appear to be present on Windows Server 2012 or 2016:

https://build.golang.org/log/6ea21b99c9b8a2be20f9aeaec6c425b84faf1af7
https://build.golang.org/log/2bcf04f1df003577352f4f987a39a59a081094ee

Updates #17513
Updates #20073

Change-Id: I72820704b4cb16bb1720b7f6a9f2e10028c71334
Reviewed-on: https://go-review.googlesource.com/41395
Reviewed-by: Alex Brainman <alex.brainman@gmail.com>
@gopherbot

This comment has been minimized.

gopherbot commented Apr 21, 2017

CL https://golang.org/cl/41395 mentions this issue.

@as

This comment has been minimized.

Contributor

as commented Apr 22, 2017

Wouldn't wmic nic get Name,MACAddress be easier? Almost every version of Windows since XP supports it.

@bradfitz

This comment has been minimized.

Member

bradfitz commented Apr 22, 2017

@as, feel free to fix things up. I don't know Windows well so I just disabled the test.

@mxplusb

This comment has been minimized.

mxplusb commented Jun 4, 2017

@bradfitz what is getmac used for in the larger scope?

@alexbrainman

This comment has been minimized.

Member

alexbrainman commented Jun 4, 2017

@bradfitz what is getmac used for in the larger scope?

Perhaps I do not understand your question. But getmac command is used in TestInterfaceHardwareAddrWithGetmac in net package.

Alex

@mxplusb

This comment has been minimized.

mxplusb commented Jun 4, 2017

Sorry, I meant what is the reason for shelling out getmac instead of just making the syscall? Is there a specific reason for doing so?

@alexbrainman

This comment has been minimized.

Member

alexbrainman commented Jun 4, 2017

I meant what is the reason for shelling out getmac instead of just making the syscall?

TestInterfaceHardwareAddrWithGetmac tests the syscall. How do you propose to test syscall by calling syscall?

Alex

@mxplusb

This comment has been minimized.

mxplusb commented Jun 6, 2017

I misunderstood why getmac was needed, sorry! Still new to contributing.

@alexbrainman

This comment has been minimized.

Member

alexbrainman commented Jun 7, 2017

I misunderstood why getmac was needed, sorry! Still new to contributing.

No worries.

Alex

@mikioh mikioh added the help wanted label Jul 21, 2017

@gopherbot

This comment has been minimized.

gopherbot commented Oct 15, 2017

Change https://golang.org/cl/70845 mentions this issue: [release-branch.go1.8] net: skip Windows test using getmac if getmac cmdlet not available

gopherbot pushed a commit that referenced this issue Oct 25, 2017

[release-branch.go1.8] net: skip Windows test using getmac if getmac …
…cmdlet not available

This doesn't appear to be present on Windows Server 2012 or 2016:

https://build.golang.org/log/6ea21b99c9b8a2be20f9aeaec6c425b84faf1af7
https://build.golang.org/log/2bcf04f1df003577352f4f987a39a59a081094ee

Updates #17513
Updates #20073

Change-Id: I72820704b4cb16bb1720b7f6a9f2e10028c71334
Reviewed-on: https://go-review.googlesource.com/41395
Reviewed-by: Alex Brainman <alex.brainman@gmail.com>
Reviewed-on: https://go-review.googlesource.com/70845
Run-TryBot: Russ Cox <rsc@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
@gopherbot

This comment has been minimized.

gopherbot commented Dec 8, 2017

Change https://golang.org/cl/82975 mentions this issue: net: enable TestInterfaceHardwareAddrWithGetmac on all windows versions

@johnsonj johnsonj removed the help wanted label Dec 8, 2017

@gopherbot gopherbot closed this in 82f58c1 Dec 8, 2017

@gopherbot

This comment has been minimized.

gopherbot commented Dec 22, 2017

Change https://golang.org/cl/85315 mentions this issue: Revert "net: enable TestInterfaceHardwareAddrWithGetmac on all windows versions"

gopherbot pushed a commit that referenced this issue Dec 25, 2017

net: revert CL 82975
this solution as it stands doesn't work with
non-english device names (#23191 (which has a fix))
and names some devices differently (#23153) probably due to the
fact that this test previously only ran on Server 2008.

Re-opens #20073

Change-Id: I5c36774ddd85ac07620b4015372d564acbb169ad
Reviewed-on: https://go-review.googlesource.com/85315
Reviewed-by: Alex Brainman <alex.brainman@gmail.com>
@gopherbot

This comment has been minimized.

gopherbot commented Dec 25, 2017

Change https://golang.org/cl/84935 mentions this issue: net: redirect output out of wmic command to file on Windows

@alexbrainman

This comment has been minimized.

Member

alexbrainman commented Dec 26, 2017

CL 85315 was meant to reopen this issue, but the issue is still closed. Reopening manually.

Alex

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment