check_d3d12_trace: finish communicate() after killing a timed-out fixture (OLD-9920) #1330
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/1330"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Imported from ubiquitarianism/leonida. Originally posted by fin-github on 2026-11-24T21:58:08Z.
Claimed in the coordination issue as:
OLD-9920(https://github.com/ubiquitarianism/leonida/issues/14#issuecomment-7145581073)Supersedes draft #188, carried over from old upstream PR 9920 in the original repository. This is the same change cherry-picked onto current
main(git cherry-pick -x), with the original author (Sunkiller-qc) kept on every commit. The change and its explanation are theirs; see #188 for the original description.Tested
Windows 11 Pro 26200, CPython 3.14.4, on
main4a50cafc7. No GPU, no game files.tests/test_check_d3d12_trace.py: 4 tests OK (1 skipped), 4.6 smain's code:test_runner_timeout_does_not_wait_for_a_child_holding_the_outputfails (32 s run), so the tests still catch the bug on currentmain.scripts/check_no_game_data.pyon the changed files andtests/test_text_write_line_endings.py: clean.GPUs tested: n/a
AI-assisted: yes (Claude Code). The cherry-pick and the test runs were done by the agent; the code is the original author's.
Imported from ubiquitarianism/leonida. Originally posted by whoalin1 on 2026-11-24T23:36:39Z.
Independent verification (AI-assisted, overnight review batch):
6240af0; diff reworksrun_fixtureinruntime/test/check_d3d12_trace.pyto capture stdout/stderr intempfile.TemporaryFiles instead of pipes,wait(timeout), and a newkill_tree(killpg on POSIX-with-runner,taskkill /F /Ton Windows,process.kill()otherwise).origin/main: same synthetic runner+grandchild scenario — main's version blocked ~20 s (waited for the pipe-holding child to exit) before reporting the timeout; the PR branch reportsno exit within 2sat ~the limit.python -I -m pytest tests/test_check_d3d12_trace.py: 3 passed + 1 skipped (POSIX-only) in 6.4 s on rerun.check_no_game_data.pyon both changed files: clean. compileall clean.test_runner_timeout_does_not_wait_for_a_child_holding_the_outputis timing-sensitive: one run measured 15.39 s vs itsassertLess(elapsed, 15)bound and flaked a TemporaryDirectory teardown (orphaned grandchild briefly locks the dir). A rerun passed in 6.4 s. If taskkill exceeds its internal 5 s timeout under load, the grandchild can be orphaned — the check itself still exits on time, so this is a test-robustness note, not a correctness bug.taskkill /F /T /PIDdoes kill the whole tree when it completes (child PID terminated along with the launcher).Imported from ubiquitarianism/leonida. Originally posted by MoonEyes on 2026-11-25T17:13:24Z.
Thanks! For reference, #1338 has a byte-identical diff (same two commits) and was opened a few minutes after this one, so this PR looks like the one to keep; maintainers can decide.
AI-assisted: yes (Claude Code compared the diffs against origin/main; I reviewed it).
Imported from ubiquitarianism/leonida. Originally posted by MoonEyes on 2026-11-28T20:14:14Z.
Red/green: On main test_check_d3d12_trace.py fails because a timed-out fixture whose child holds the output takes 32 s instead of under 15 s, and with the PR it passes (4 OK, ctest d3d12_trace OK) on Windows 11 at OreoFR's (RTX 4070).
Independent tester (OreoFR, RTX 4070, Windows 11): PR head merged with the other PRs of its batch on main
c1ecf04ed, full ctest run (485 tests, tests that launch the game excluded): no new failure compared with main.Imported from ubiquitarianism/leonida. Originally posted by OreoFR on 2026-11-28T21:48:54Z.
Verified by OreoFR
3408969a7+ PR head6240af03a; green run in a merge package of 3 PRs, no new ctest failure vs mainpython -I tests/test_check_d3d12_trace.py ; ctest -R ^d3d12_trace$AI-assisted (Claude Code, Claude Opus 5.5).