Closed kfsone closed 2 years ago
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:
OS Microsoft Windows 10.0.20241
Platform Win32NT
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: https://github.com/golang/go/issues/40604
Well, maybe, but TestLookPath
has been passing on Windows systems for six years.
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. I didn't find any mention of this being intended behaviour,
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.
cc @alexbrainman @zx2c4 @mattn
This issue somehow duplicates #44379 solved in official releases of Windows. Test was re-enabled with CL 341455 with success. Issue can probably be closed.
Thanks @iwdgo, closing. Please comment if we missed something, or file a new issue if there's a new problem.
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: https://github.com/golang/go/blob/615c7c18a70e0d6638accdb0fcc5f60c57a2118b/src/os/exec/lp_windows_test.go#L295-L298
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: https://github.com/golang/go/issues/40604
Same errors occur from master