-
Notifications
You must be signed in to change notification settings - Fork 18k
os/exec: TestLookPath fails on Windows #42264
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
Comments
I wonder why nobody else is reporting this. |
@ianlancetaylor It's possibly concealed behind the |> in the ticket itself, but I'm running an insider build:
not yet had chance to boot back into my stable build. |
Ah. So, does this means that Windows behavior has changed? |
@ianlancetaylor That's purely my speculation, but it's also possible it was being overlooked due to the crypto failure: #40604 |
Well, maybe, but |
Don't have intermediate versions to test with, but I can confirm that it passes on Build 1909 and fails on 10.0.20241.1005. Repeated in a hyper-v dev environment running 20241 and a 20241 sandbox. |
Any idea whether this is an intentional change in Windows? |
This reproduces on build 20257, It seems like windows now no longer considers the order of PATHEXT when looking up executables. Microsoft Windows [Version 10.0.20257.1]
(c) 2020 Microsoft Corporation. All rights reserved.
C:\repo\gopath>dir
Volume in drive C has no label.
Volume Serial Number is 56B0-79B2
Directory of C:\repo\gopath
2020-11-12 14:29 <DIR> .
2020-11-12 14:13 <DIR> ..
2020-11-12 14:17 34 go.mod
2020-11-12 14:29 231 main.go
2020-11-12 14:24 19 test42264.bat
2020-11-12 14:30 1,846,272 test42264.com
2020-11-12 14:30 1,846,272 test42264.exe
5 File(s) 3,692,828 bytes
2 Dir(s) 452,166,889,472 bytes free
C:\repo\gopath>test42264.exe
env:.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC
loo:test42264.com(0x0,0x0)
exe:C:\repo\gopath\test42264.exe(0x0,0x0)
C:\repo\gopath>test42264
test42264.bat Microsoft Windows [Version 10.0.19041.329]
(c) 2020 Microsoft Corporation. All rights reserved.
C:\Users\User\Desktop\gopath>test42264.exe
env:.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC
loo:test42264.com(0x0,0x0)
exe:C:\Users\User\Desktop\gopath\test42264.exe(0x0,0x0)
C:\Users\User\Desktop\gopath>test42264
env:.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC
loo:test42264.com(0x0,0x0)
exe:C:\Users\User\Desktop\gopath\test42264.com(0x0,0x0) |
Is this still an issue by now? I'm not seeing this test fail on the build dashboard, does it not reproduce there? There's very little time left to act on issues in the Go1.16 milestone. |
Thanks @iwdgo, closing. |
What version of Go are you using (
go version
)?from source:
Does this issue reproduce with the latest release?
Yes
What operating system and processor architecture are you using (
go env
)?go env
OutputOperating system:
OS Microsoft Windows 10.0.20241
Platform Win32NT
What did you do?
What did you expect to see?
What did you see instead?
Failure: (full output below)
This seems to be this test:
go/src/os/exec/lp_windows_test.go
Lines 295 to 298 in 615c7c1
MS's documentation (https://docs.microsoft.com/en-us/previous-versions//cc723564(v=technet.10)? does not stipulate the order used, but at face value I would have expected it to find .EXE before .BAT based on the PATHEXT variable. However, I can confirm that from CMD I can reproduce the original ".bat" behaviour on the same system:
However, powershell behaves differently, so perhaps the behavior is (either) inconsistent or being changed.
full output:
Crypto issue is tracked here: #40604
Same errors occur from master
The text was updated successfully, but these errors were encountered: