t0061: fix test for argv[0] with spaces (MINGW only) - #651
Conversation
|
Looks good! Please note that running the test within a Maybe you want to adjust the commit message? Oh, and I restarted the failed Travis job. It was a temporary problem with To submit the patch to the Git mailing list for review, you could use GitGitGadget as before, or submitGit, or send it manually. |
|
For me the test fails at least when running it with I have now tried to put So this is expected that executable fails to run, because indeed its dependencies can't be found on PATH and also can't be found next to .exe. Am I misunderstanding something? |
Oh, I thought via |
|
Also, if you build in Git for Windows' SDK using GCC, and run the test suite also in that SDK, there won't be any |
|
So it seems that commit message was correct, then? Because the test fails without additional external settings? If not, can you please suggest the desired wording? |
In a manner of speaking. What it left out was that the common way to build Git is not using MSVC, but GCC. So in most cases, even when Git is built on Windows, there is no problem with That's the part I am missing from the commit message. |
The test was originally designed for the case where user reported that setting GIT_SSH to a .bat file with spaces in path fails on Windows: git-for-windows#692 The test has two different problems: 1. It succeeds with AND without fix eb7c786 that addressed user's problem. This happens because the core problem was misunderstood, leading to conclusion that git is unable to start any programs with spaces in path on Win7. But in fact a) Bug only affected cmd.exe scripts, such as .bat scripts b) Bug only happened when cmd.exe received at least two quoted args c) Bug happened on any Windows (verified on Win10). Therefore, correct test must involve .bat script and two quoted args. 2. In Visual Studio build, it fails to run, because 'test-fake-ssh.exe' is copied away from its dependencies 'libiconv.dll' and 'zlib1.dll'. Fix both problems by using .bat script instead of 'test-fake-ssh.exe'. NOTE: With this change, the test now correctly fails without eb7c786. Signed-off-by: Alexandr Miloslavskiy <[email protected]>
1489a3d to
1921cf9
Compare
|
Oh! Only now I understood that I pushed the wrong button and created PR in a wrong repo. |
The test was originally designed for the case where user reported
that setting GIT_SSH to a .bat file with spaces in path fails on
Windows: git-for-windows#692
The test has two different problems:
copied away from its dependencies 'libiconv.dll' and 'zlib1.dll'.
Even when test succeeds, this is still not quite right, because it
unexpectedly uses MINGW dependencies instead of the built ones.
eb7c786 that addressed user's problem. This happens because the core
problem was misunderstood, leading to conclusion that git is unable to
start any programs with spaces in path on Win7. But in fact
a) it only affects cmd.exe scripts, such as .bat scripts
b) it only happens when cmd.exe receives at least two quoted args
c) it happens on any Windows (verified on Win10).
Therefore, correct test must involve .bat script and two quoted args.
Fix both problems by using .bat script.
NOTE: With this change, the test now correctly fails without eb7c786.
Signed-off-by: Alexandr Miloslavskiy [email protected]