os/exec: TestCommand fails on Windows when NoDefaultCurrentDirectoryInExePath
is set in the environment
#62594
Labels
FrozenDueToAge
NeedsInvestigation
Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
OS-Windows
Testing
An issue that has been verified to require only test changes, not just a test failure.
Milestone
In investigating the data race reported in https://go.dev/cl/527337, I looked at the existing tests that cover the call to
lookExtensions
isexec.Cmd.Start
on Windows.I found several test cases in
TestCommand
that look suspicious: they expectexec.LookPath
to always resolve a bare filename relative to the current directory, possibly with anErrDot
error. However, ifNoDefaultCurrentDirectoryInExePath
is set in the environment,exec.LookPath
does not even attempt to resolve in the current directory, so the tests presumably won't pass.Running the tests on a gomote confirms that hypothesis as of https://go.dev/cl/527337:
(CC @golang/windows, @ianlancetaylor)
The text was updated successfully, but these errors were encountered: