Repository navigation
Conversation
d3d12_depth24_draw, d3d12_depth_resolve, d3d12_f16_halves, d3d12_geometry, d3d12_mesh, d3d12_state_sweep and d3d12_stores_atomics wrote their shader library under one fixed %TEMP% name. Two copies at once (ctest -j with two checkouts, or two suites sharing one TMPDIR or Wine prefix) then removed or overwrote each other's modules, the race test_temp_dir.h describes. - depth24_draw, geometry, mesh (they already remove the folder at the end): testfiles::process_temp_dir(<same name>). - depth_resolve, f16_halves, state_sweep, stores_atomics (they never removed it, so a per-process name alone would leave one folder per run): testfiles::ScratchDir, which creates the folder and removes it on return. In depth_resolve it lives outside the block, because the device reads the library through info.shader_dir afterwards. Measured on Windows 11, RX 7800 XT, 4 copies at once, 3 rounds (12 runs) each, on main dde82f2 vs this change: depth24_draw 9 -> 0 failed, geometry 5 -> 0, mesh 4 -> 0 (at PSO creation / h.run); f16_halves, state_sweep, stores_atomics 0 -> 0; no folder left in %TEMP%. depth_resolve fails alone on both sides with the same AMD host differences, unrelated. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
tupacfan04
left a comment
There was a problem hiding this comment.
The seven changed tests are correct, but two other synthetic runtime tests still share one fixed temp folder — and one copy's cleanup deletes another copy's files.
-
d3d12_shader_cache_teststill usesleonida_shader_cache_disk_test.runtime/test/d3d12_shader_cache_test.cpp:289-302removes and recreates that fixed folder, thencurrent_path(temp_dir); theRestoreCwddestructor (:296-300) removes the same fixed folder. Two copies at once (parallel CTest from two checkouts, or a sharedTMPDIR/Wine prefix) race: one startup/teardownremove_alldeletes the other's cache and working directory. The PR body excludes onlybink_audio/bink_decode, so this one is unmentioned. -
xgameruntime_gamesave_teststill usesleonida_gamesave_test.runtime/test/xgameruntime_gamesave_test.cpp:125-128removes that fixed root and setsLEONIDA_SAVE_DIRto it;:371removes it at the end. Two copies share saves and one cleanup deletes the other's. The same per-processScratchDir/process_temp_dirfix applies.
The bink_audio/bink_decode exclusions are reasonable (inspection output/movie input), but these two are synthetic and unconstrained.
Test gap: no committed two-copy test. The PR body's manual table is useful, but three of the seven (d3d12_f16_halves, d3d12_state_sweep, d3d12_stores_atomics) were 0/12 on main as well, so their two-copy case was never reproduced, and d3d12_depth_resolve fails on the author's card on both sides. Add a two-copy test (shared temp dir, both must pass) to catch a future fixed-path regression.
Minor: the three process_temp_dir tests rely on remove_all(library) at the end, so an early return/crash leaves a per-PID folder; d3d12_mesh handles its early skip, the other two may not. ScratchDir for all seven would make cleanup uniform. Correct: per-PID paths, no cross-process deletion in the changed tests, no path escape. Synthetic/code-read only; no game files. AI-assisted (OpenCode).
Claim: new item in #8047 (comment).
Seven runtime tests wrote their shader library under one fixed
%TEMP%name. Two copies at once (ctest -jfrom two checkouts, or two suites sharing one TMPDIR / Wine prefix) remove or overwrite each other's modules: the raceruntime/test/test_temp_dir.hdescribes, and the one #6221 / #6184 fix ford3d12_bindless_churn(left out here so this doesn't overlap them).d3d12_depth24_draw,d3d12_geometry,d3d12_mesh: they alreadyremove_allthe folder at the end, so only the name changes:testfiles::process_temp_dir(<same name>).d3d12_depth_resolve,d3d12_f16_halves,d3d12_state_sweep,d3d12_stores_atomics: they never removed the folder, so a per-process name alone would leave one folder per run. They usetestfiles::ScratchDir, which creates it and removes it whenmainreturns. Ind3d12_depth_resolveit is declared before the block, because the device reads the library throughinfo.shader_dirafter it.bink_audio/bink_decodealso use fixed names, but for output files a person may want to look at, and they need a movie from the game; not touched.Tested on Windows 11, AMD Radeon RX 7800 XT (driver 32.0.32029.2010), MSVC 2022 RelWithDebInfo, Vulkan SDK 1.4.363.0, synthetic only, no game files. 4 copies of each test started at once, 3 rounds (12 runs),
maindde82f27evs this branch:mainfailedmainfailured3d12_depth24_drawh.run(...)at lines 348/364/378/413d3d12_geometryCreateGraphicsPipelineStateat lines 129/131d3d12_meshcreate(...)at lines 207/212d3d12_f16_halves,d3d12_state_sweep,d3d12_stores_atomicsEvery test passes run alone on both sides, and no
leonida_*folder is left in%TEMP%after the branch's runs.d3d12_depth_resolvefails on this card on both sides, alone too, with the same AMD host stencil-resolve differences (63 of 97 match, 18 host quirksagainst the AMD host,71 of 71against WARP): not this change.🤖 Generated with Claude Code