Skip to content

Stop timed-out Wine test process groups - #4589

Open
ligmaSec wants to merge 2 commits into
ItsNotRexed:mainfrom
ligmaSec:test/wine-timeout-process-group
Open

ligmaSec wants to merge 2 commits into
ItsNotRexed:mainfrom
ligmaSec:test/wine-timeout-process-group

Conversation

@ligmaSec

@ligmaSec ligmaSec commented Nov 23, 2026 •

Copy link
Copy Markdown

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

AI-assisted. Synthetic fixtures only. No GPU or game files used.

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 Kam471 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 AGInformatique81 left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 Flyander left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@Atomic258

Copy link
Copy Markdown

Tested head 2810e912 locally (CPU only, no Wine needed for the unit tests, no game files).

Environment: Linux, Python 3.10.12. Command: python3 -I tests/test_run_wine_tests.py

51 tests, 0 failures. Covers the timed-out Wine test process-group handling in scripts/run_wine_tests.py. The Wine-runtime paths themselves are not exercised here (no Wine on this machine).

AI-assisted verification (Devin), no game files, no GPU.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants