F1 menu tests: the two that set where the menu saves no longer race #3618
No reviewers
Labels
No labels
AMD
audio
bug
confirmed
crash
cutscene
dlss
documentation
duplicate
enhancement
fixed-on-main
frame-generation
good first issue
help wanted
input
INTEL
invalid
lighting
linux-proton
memory
needs-info
needs-logs
needs-rebase
NVIDIA
performance
pr-diagnostics
pr-docs
pr-feature
pr-fix
pr-performance
pr-refactor
pr-tests
question
RAYTRACING
rendering
report
series-s
shaders
spam
startup
upstream
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/trustno1-coder--VIctory-NVIDIA!3618
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-3618"
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?
@tphira612 on GitHub · 2026-11-30 01:54 UTC · original
tests/menu-env-race→main· +18 −1 · 1 files · 1 commits · closed without mergingWhat it changes
gray_shadow_lift_is_live_and_saved_as_a_percentagesetsVICTORY_MENU_FILE, whilea_change_is_saved_at_once_however_the_game_was_startedexpects it unset andVICTORY_HOMEset. The harness runs them at the same time, so the second test saved into the first one's file and found nothing in its own (menu.rsassertion onVICTORY_MENU_DLSS=quality).Both tests now hold one lock (
SAVES) while they change those variables and save. Test-only; nothing in the game changes.How it was tested
cargo test -p victory-gpu --lib host::menu: 40 of 40 runs failed onmain, 3 of 3 pass with this change (14 passed).cargo clippy -p victory-gpu --all-targets: no warnings inmenu.rs.cargo xtask policy --stagedpasses.cargo test -p victory-gpu --librun onmain; the other,every_switch_of_the_translator_is_in_the_key, is fixed by #3385 / #3530.@Trillazill on GitHub · 2026-11-30 02:54 UTC · original · reviewed
Reviewed and reproduced, and it looks right to me.
Reproduced (Ryzen 9 7900, 24 threads, Windows 11),
cargo test --locked -p victory-gpu --lib host::menu:41adb551): failed in 9 of 10 runs, ata_change_is_saved_at_once_however_the_game_was_started(menu.rs:1984).b21922b7): passed in 10 of 10 runs (14 passed).Checked:
victory-gputhat reachsave()(both throughchange_and_save), so the lock covers every saver.reset()and the Enter handler's save lines aren't driven by any test, andkey_bindings_are_shown_and_writtenonly edits strings, with no file._savesis declared before_restore, so the variables are put back before the lock is released.cargo test -p victory-gpu --libwith this PR shows nomenufailures. What's left fails on main too:every_switch_of_the_translator_is_in_the_key(as you say), andpipeline::host::tests::shared_root_signatures_load_from_library_and_execute_across_pso_switches, which failed in 2 of 2 full runs on main here. A GPU test or two (upq,uav_pool) also fails now and then under the full parallel run, outsidemenu.rs.One suggestion (not new in this PR):
a_change_is_saved_at_once_however_the_game_was_startedremovesVICTORY_MENU_FILEand setsVICTORY_HOMEbut never puts them back, so once it lets go ofSAVESthe rest of the process keepsVICTORY_HOMEpointing at the temp folder it deleted.Restoreis local to the first test today. Moving it up besideSAVESand using it in the second test too, declared after_saves, would leave both tests clean:Nothing reads
VICTORY_HOMEinvictory-gpu's tests today, so this is tidiness rather than a fix.@babuakhil on GitHub · 2026-11-30 16:48 UTC · original
Checked on Windows 11 (Rust 1.98.1, pinned). The fix was right for the
mainit was written against, butmainhas since fixed the same race the same way, so I think this one can be closed rather than rebased.cargo test -p victory-gpu --lib --locked host::menu, 30 runs each:41adb551(this PR's base)a_change_is_saved_at_once_however_the_game_was_startedfails in all 3041adb551main(84bd61e2, with #4025 so the library's tests build)victory-gpulib suite also passes 4 of 4 (1133 passed, 0 failed)On
main, both tests now take one lock,SETTINGS_FILE_ENV:a_change_is_saved_…throughtest_env_lock()(c2820be4) andgray_shadow_lift_is_live_and_saved_as_a_percentagedirectly (bb946c0f). The newerwith_temp_settings_filehelper takes it too. Nothing outsidemenu.rssetsVICTORY_MENU_FILEorVICTORY_HOME. Rebasing this PR would add a second mutex,SAVES, next to the one already there.Pull request closed