Skip to content

tests: Fix Windows test helper tool search & use it for handle64#12115

Closed
dfandrich wants to merge 1 commit into
masterfrom
dfandrich/testpath
Closed

tests: Fix Windows test helper tool search & use it for handle64#12115
dfandrich wants to merge 1 commit into
masterfrom
dfandrich/testpath

Conversation

@dfandrich

Copy link
Copy Markdown
Contributor

The checkcmd() and checktestcmd() functions would not have worked on
Windows due to hard-coding the UNIX PATH separator character and not
adding .exe file extension. This meant that tools like stunnel, valgrind
and nghttpx would not have been found and used on Windows, and
inspection of previous test runs show none of those being found in pure
Windows CI builds.

With this fixed, they can be used to detect the handle64.exe program
before attempting to use it. When handle64.exe was called
unconditionally without it existing, it caused perl to abort the test
run with the error

The running command stopped because the preference variable
"ErrorActionPreference" or common parameter is set to Stop:
sh: handle64.exe: command not found

Closes #12115

The checkcmd() and checktestcmd() functions would not have worked on
Windows due to hard-coding the UNIX PATH separator character and not
adding .exe file extension. This meant that tools like stunnel, valgrind
and nghttpx would not have been found and used on Windows, and
inspection of previous test runs show none of those being found in pure
Windows CI builds.

With this fixed, they can be used to detect the handle64.exe program
before attempting to use it. When handle64.exe was called
unconditionally without it existing, it caused perl to abort the test
run with the error

    The running command stopped because the preference variable
    "ErrorActionPreference" or common parameter is set to Stop:
    sh: handle64.exe: command not found

Closes #12115
@github-actions github-actions Bot added the tests label Oct 13, 2023
@jay

jay commented Oct 15, 2023

Copy link
Copy Markdown
Member

I think it would be worthwhile to rebase this on a bad commit (that actually causes handle64 to be invoked) and run it through CI to make sure it functions as expected.

@dfandrich

Copy link
Copy Markdown
Contributor Author

Testing it is the trick. I'll try pushing a build to the CI that randomly clears locks some percentage of the time to see how it goes.

dfandrich added a commit that referenced this pull request Oct 17, 2023
The checkcmd() and checktestcmd() functions would not have worked on
Windows due to hard-coding the UNIX PATH separator character and not
adding .exe file extension. This meant that tools like stunnel, valgrind
and nghttpx would not have been found and used on Windows, and
inspection of previous test runs show none of those being found in pure
Windows CI builds.

With this fixed, they can be used to detect the handle64.exe program
before attempting to use it. When handle64.exe was called
unconditionally without it existing, it caused perl to abort the test
run with the error

    The running command stopped because the preference variable
    "ErrorActionPreference" or common parameter is set to Stop:
    sh: handle64.exe: command not found

Closes #12115
dfandrich added a commit that referenced this pull request Oct 17, 2023
The checkcmd() and checktestcmd() functions would not have worked on
Windows due to hard-coding the UNIX PATH separator character and not
adding .exe file extension. This meant that tools like stunnel, valgrind
and nghttpx would not have been found and used on Windows, and
inspection of previous test runs show none of those being found in pure
Windows CI builds.

With this fixed, they can be used to detect the handle64.exe program
before attempting to use it. When handle64.exe was called
unconditionally without it existing, it caused perl to abort the test
run with the error

    The running command stopped because the preference variable
    "ErrorActionPreference" or common parameter is set to Stop:
    sh: handle64.exe: command not found

Closes #12115
@dfandrich

Copy link
Copy Markdown
Contributor Author

It appears to be working as expected. Here's an msys2 build on Azure that seems to have run handle64.exe and retrieved a handle for a number of tests. On the other hand, the test Appveyor builds showed no error messages now, despite those being the one complaining about handle64.exe in the past.

@dfandrich dfandrich closed this in 6493691 Oct 17, 2023
@dfandrich dfandrich deleted the dfandrich/testpath branch October 17, 2023 19:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Development

Successfully merging this pull request may close these issues.

3 participants