Repository navigation
SPIRV-TOOL-TREE-CLEANUP: rdna2spirv, make_game: terminate spirv-as/val children on abort and sweep stale .spirv-*.tmp - #909
Conversation
|
Tested this merged into current main (9f9a7c5). The translator suite and The cause: those tests patch A smaller point: AI-assisted (Claude). |
|
Reviewed 60f6dc7: external spirv-as/val invocations now run through run_tool, which terminates and reaps the child on interrupt; SIGTERM becomes a graceful SystemExit(143); make_game's abort path and rdna2spirv's merge/non-shard tails sweep stale .spirv-*.tmp. Run on arm64 Linux without SPIRV-Tools: the 7-test file passes on this branch and its 4 new tests fail on main exactly at the new behavior; related suites (gpu_python_assembler, the make_game* family, pipeline_batches, an alu_add translator subset) pass on the PR and on a materialized merge into current main; a deterministic SIGTERM-inside-the-staging-window probe shows main dying by signal (-15) with a stranded .spirv-*.tmp in --out while this branch exits 143 with the staging file removed. No findings; minor notes: _run_spirv_tool ignores kwargs beyond input/text/cwd (worth a comment for future callers) and the sweep helper exists in two copies. AI-assisted review. Recommendation: Merge |
|
Rechecked the current head 60f6dc7 merged into today's main: |
…weep stale .spirv-*.tmp
|
@tiguan26 Thanks for catching that! Rebased onto |
60f6dc7 to
d84ce54
Compare
d84ce54 to
317b04f
Compare
tiguan26
left a comment
There was a problem hiding this comment.
Approving 317b04f. Thanks for the fix: _run_spirv_tool now leaves a patched subprocess.run in charge, and _run_tool forwards timeout/env.
Merged into current main (d1dff79) with no conflicts, then on Linux, Python 3.13:
tests/test_rdna2spirv_cli.pyandtests/test_make_game_translate_cleanup.pyin one process (the case that failed before): 42 passed, 1 skipped.- The other tests that touch these helpers (
test_make_game_argparse,_empty_translation,_wave64,_resume,_translator_flags,test_run_gpu_tests_python_assembler): 154 passed, 1 skipped, the same on main. - Full translator suite (
run_semantic_tests.py tests/semantic): 6,374 tests; the 8 failures (7 intest_fspx_dot4_op_sel_disasm, plustest_int32_to_f64) fail identically on main.
Every call site passes only input/capture_output/text/cwd, which _run_tool handles. AI-assisted (Claude Code).
|
Thanks for this! Cleaning up spirv-as/spirv-val children and leftover During maintainer testing (local, 2026-11-28) (head 317b04f, merged on main b1619e0 / 6dfca64, Windows 11, Python tests via pytest/unittest) we found:
To get this merged:
AI-assisted (Claude Code), posted for DadaCap (maintainer). |
Summary
subprocess.runin_run_spirv_tool()with_run_tool()usingPopen+terminate()/kill()onBaseException(SIGINT/SIGTERM) so orphanedspirv-as/spirv-valchildren are cleaned up.SIGTERMhandler inrdna2spirv.main()and sweep leftover.spirv-*.tmpstaging files onmake_game.translate()abort and afterrdna2spirvmerge/single-run completion.Verification
python3 -I tests/test_make_game_translate_cleanup.py: 7/7 passed.AI-assisted: yes (synthetic tests only, no game files).