Repository navigation
Conversation
Run each POSIX test in its own session and stop the group on timeout or interruption. A helper that inherits the output pipe must be stopped even when the launcher already exited.
Kam471
left a comment
There was a problem hiding this comment.
Ran this at 59879f23 on Windows 11: python -I tests/test_run_wine_tests.py -> 51 tests, OK (6 skipped); git diff --check clean.
On POSIX the test now runs in its own session and a timeout or KeyboardInterrupt kills the whole process group before re-raising, so Wine launcher helpers holding the output pipe cannot outlive the deadline; Windows keeps the plain subprocess.run path. The new skipped cases are the POSIX ones (this host cannot exercise the group kill). No blocking issue.
AGInformatique81
left a comment
There was a problem hiding this comment.
Independent synthetic check at 2810e912. In WSL with CPython 3.14.7, all 51 tests passed, including the helper-holds-output-pipe case. On native Windows 11 build 26300 with CPython 3.15.2, 45 passed with six POSIX-only skips.
The patch trial-merged cleanly with #4547 at 26d24733. The combined suite passed 52/52 under WSL and 46 on Windows with the same six skips. This exercises the runner with Python stand-ins for Wine. No game files or GPU. AI-assisted with Codex.
Flyander
left a comment
There was a problem hiding this comment.
The updated head only relocates the helper and clarifies its description. The POSIX process-group cleanup remains correct, and the new synthetic timeout case plus the combined-run report cover the orphaned-child scenario. I found no blocking issue in this patch.
|
Tested head Environment: Linux, Python 3.10.12. Command: 51 tests, 0 failures. Covers the timed-out Wine test process-group handling in AI-assisted verification (Devin), no game files, no GPU. |
TEST-996. Coordination claim
A Wine test can launch Windows helpers that retain the runner's output pipe and outlive the test. The POSIX timeout used to stop only the process started by Python. A surviving helper could then write files or interfere with the next test in the same prefix.
Run each POSIX test in its own session. On timeout or interruption, stop that test's process group even if the original launcher has already exited. Keep the partial log in the timeout diagnostic.
Verification
Debian 13, Wine 10.0, Xvfb, Python 3.13.5. A synthetic x64 PE launched a helper via
CreateProcessand exceeded its three-second CTest deadline. On main, the helper wrote a marker afterward and the next test failed. With this change the first test still returned the expected timeout, the helper never wrote its marker, and the next test passed in the same prefix.All 51 Wine runner unit tests passed. The new POSIX regression checks a helper holding the output pipe after its launcher exits. The same test fails against main because the helper still holds its lock.
Line-ending, tool-output encoding, and Python compilation checks passed.
Trial merges with run_wine_tests: an aborted test ends at once instead of waiting 120 s for winedbg (~12 min off each Wine CI job) #4462, Honor CTest fixture setup dependencies in the Wine runner #4558 and Run CTest CMake fixtures from Windows artifacts under Wine #4041 are conflict-free. The combined runner suites passed 64, 53 and 56 tests respectively. With Run CTest CMake fixtures from Windows artifacts under Wine #4041, a real CMake fixture under Wine stopped its helper at the same deadline and the following test passed.
A separate Wine 10.0 check sent SIGINT to the runner during the timeout fixture. The backing helper stopped while an unrelated Windows process in the same prefix exited successfully.
AI-assisted. Synthetic fixtures only. No GPU or game files used.