mirror of
https://github.com/ubiquitarianism/leonida.git
synced 2026-11-27 00:20:53 +01:00
[PR #1952] Isolate the game-save and Bink test scratch directories #1959
Labels
No labels
bug
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
starred/leonida#1959
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
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?
📋 Pull Request Information
Original PR: https://github.com/ubiquitarianism/leonida/pull/1952
Author: @lgr123
Created: 11/25/2026
Status: 🔄 Open
Base:
main← Head:runtime-scratch-isolation📝 Commits (2)
9c73fc1Isolate the game-save and Bink test scratch directories78249acClean up Bink diagnostics unless retention is requested📊 Changes
7 files changed (+56 additions, -20 deletions)
View changed files
📝
docs/movies.md(+4 -0)📝
runtime/test/bink_audio_test.cpp(+14 -4)📝
runtime/test/bink_audio_test.md(+5 -2)📝
runtime/test/bink_decode_test.cpp(+20 -8)📝
runtime/test/bink_decode_test.md(+5 -2)📝
runtime/test/test_temp_dir.h(+5 -1)📝
runtime/test/xgameruntime_gamesave_test.cpp(+3 -3)📄 Description
Claimed as
RT-ISOLATE-GAMESAVE-AND-BINK-SCRATCHin #1608, following the report's three residual sites.Four concurrent game-save test processes sharing one temporary base exposed the race on Windows x64. Over three batches, public main failed 12 of 12 runs. This patch passed 12 of 12, with 76 checks per run and no leftover game-save scratch directories.
Two invocations using the same temporary base can delete or overwrite one another’s files. Game-save now uses the existing per-process RAII scratch directory, including on early returns. Bink audio and decode use per-process paths and clean them up on normal or handled-failure exit. Set
LEONIDA_KEEP_BINK_OUTPUT=1to retain diagnostics and print their folder. This patch stays scoped to the three remaining fixed names.Reviewer check
Build the
xgameruntime_gamesave_testCMake target, then start four copies at once withTEMPandTMPpointing to the same disposable folder. Let each process use an independent output log. Repeat on main and this branch. This test uses synthetic saves and needs no retail files.Independent Windows verification passed 12 of 12 concurrent runs alongside #1579 after resolving the three overlapping lines. It also identified that Bink diagnostic folders would accumulate. The follow-up addresses retention with scoped cleanup and an explicit opt-in.
Tested
9e7720c. Built the actual synthetic game-save executable. Ran three batches of four simultaneously active processes sharing one disposable temporary base.git diff --checkand the source-only check passed. No game files were used.GPUs tested: n/a.
AI-assisted: yes.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.