Skip to content

Conversation

BsAtHome
Copy link
Contributor

Fix the runtests race condition running checkresult before the result file is closed. This can happen when the test-process runs asynchronously and has not yet exited, keeping the from runtests redirected stdio descriptors in an open state.

The mb2hal process, which exhibited the race, has another race fixed, where the signal handlers were installed too late in the process. Additionally, the mb2hal internal quit_flag must be declared volatile because it is written in the signal handler and read in separate threads.

Finally, a longstanding bug in runtests prevented it to take multiple directories from the command-line when, for example, done using a wildcard. The expansion to find tests mistakenly used $* instead of $@.

@andypugh
Copy link
Collaborator

Thanks for doing this. As it's a bug-fix I will apply it to 2.9 then merge up.

@andypugh andypugh merged commit 6bba0e3 into LinuxCNC:master Sep 5, 2025
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants