test(menu): the options check reads the keys save() owns on a line of their own, as gpu_device_id since #736 #806
No reviewers
Labels
No labels
area/accessibility
area/audio
area/input
area/install
area/menu
area/renderer
area/saves
area/upscaling
beanstalk: approved @ 1697603
beanstalk: approved @ 2c5a62e
beanstalk: approved @ 4fd82b7
beanstalk: approved @ 64d6d09
beanstalk: approved @ 6f91fae
beanstalk: approved @ 70a78f9
beanstalk: approved @ 8d361dc
beanstalk: approved @ 9d8356e
beanstalk: approved @ abf2227
beanstalk: approved @ d82f202
beanstalk: approved @ e5f1e40
beanstalk: approved @ ee8ab5f
ci: approved
good first issue
gpu/amd
gpu/igpu
gpu/intel
gpu/nvidia
help wanted
kind
bug
kind
chore
kind
docs
kind
feature
kind
performance
kind
question
needs measurements
platform/linux
platform/macos
platform/steam-deck
platform/windows
preview
priority
critical
priority
high
priority
low
regression
status
blocked
status
confirmed
status
duplicate
status
invalid
status
needs-info
status
wontfix
testing wanted
ci: approved
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
MagicBeanDev/Longshot!806
Loading…
Reference in a new issue
No description provided.
Delete branch "d4nkn3ss/Longshot:fix/test-options-owned-keys"
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?
Type: test · Risk: low · Tested on: Windows 11, RTX 3080 · Needs: none
Why
tests/test_options_budget_once.pyhas failed on main on every OS since #736 (the GPU device row keeps its card). It reports that the options file keeps an oldgpu_device_idline next to the new one, but the game doesn't:save()does drop the old line. The check reads only one of the two placessave()lists the keys it owns. A check that is always red hides the day this bug really comes back. I searched the tracker (forge.py issue list --state all) and the open PRs and found nothing on it.What changed
The check now reads the keys
save()owns on amine |= key == "..."line of their own, as well as those in thebool mine = ...list. It passes on main's code and still fails when thegpu_device_idline is taken out.tests/test_options_budget_once.py:ownedalso takesmine |= key == "<key>";fromgpu/vk/vk_menu.cpp.Measurements
Verdict: passes: the check fails on main @
aa95d35fand passes on this PR @09fbf742. Withsave()'sgpu_device_idline taken out ofvk_menu.cpp, it fails again with the same message, so it still catches the bug it was written for.Hardware: Windows 11 Pro 26300, RTX 3080 10 GB, i9-12900K, 64 GB; Python 3.12, llvm-mingw from the Longshot Builder
Scene: none (game-free checks)
Method: the check on its own on each commit, and with the ownership line removed by hand;
python -I -B tests/run_all.pyonce on each commit, the failing checks comparedHow to reproduce:
python -I -B tests/test_options_budget_once.pyon main and on this branchaa95d35f09fbf74209fbf742test_options_budget_once.pyrun_all.pyin allFlags and settings
None
Testing
Tested: the check on its own as above;
python -I -B tests/run_all.pyfrom PowerShell on Windows 11 on main @aa95d35fand this PR @09fbf742: 542 passed, 16 failed, 35 skipped here, and the 16 fail on main too:test_appimage_player_build,test_cpm_discovery,test_cpp_preflight,test_crash_dialog,test_env_on,test_lift_cleanup_error,test_linux_preflight,test_make_game_cache,test_make_game_prepare,test_missing_nup,test_oot_state_tap,test_readback_late,test_release,test_tested_configurations,test_vk_pgo,test_walk_key(each has an open PR, among them #804, #592, #622, #144).Not tested: Linux: the check is plain Python reading a source file, the same on every OS.
Must be tested: None. The check is the change.
Risks
What could break: nothing in the game: only a check changes.
Turning it off: revert the commit.
Compatibility: Nothing changes.
Checklist
Everyone
type(scope): description) of the status line's type.main.python -I -B tests/run_all.pypasses (any failure that also fails onmainis named).third_party/untouched (a new folder with aPROVENANCE.mdinstead).When it applies
Assisted-by:/Co-Authored-By:trailers.tests/that reads changed source updated in this PR, not weakened.🤖 Generated with Claude Code
WIP: test(menu): the options check reads the keys save() owns on a line of their own, as gpu_device_id since #736to test(menu): the options check reads the keys save() owns on a line of their own, as gpu_device_id since #736View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.