WIP: test(input): give the Walk key fixture the Skip title screen's input hook #497
No reviewers
Labels
No labels
area/accessibility
area/audio
area/input
area/install
area/menu
area/renderer
area/saves
area/upscaling
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/steam-deck
platform/windows
preview
priority
critical
priority
high
priority
low
status
blocked
status
confirmed
status
duplicate
status
invalid
status
needs-info
status
wontfix
testing wanted
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
MagicBeanDev/Longshot!497
Loading…
Reference in a new issue
No description provided.
Delete branch "mooki/Longshot:fix/test-walk-key"
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?
Why
tests/test_walk_key.pyfails on main before any of its assertions runs: its fixture no longer links. So the Walk key(#66) has no working game-free check, on any platform.
What changed
tests/test_walk_key.pydefines an emptyhos_oot_autoload_input()(Skip title screen off),the same stand-in
tests/test_input_background.pyhas had since #399. No assertion, product code or other testchanges.
Why the test is what's wrong, not the code: #399 (
ecb0f612) maderead_input()inhost/nn_hid.ccallhos_oot_autoload_input()(host/oot_autoload.c, the Skip title screen row's presses), and gave the fixture intests/test_input_background.pyan empty stand-in. #66 (8c1844a9), merged 34 seconds later, addedtests/test_walk_key.py, which also compilesread_input()on its own, but was written on a base without that call.The call is the intended behaviour; only the new fixture is stale.
Flags and settings
None.
Measurements
main:
9c9d69ed09(2026-11-14)this PR: fix/test-walk-key @
5f3e15404aHardware: Apple M4 Max (16 CPUs), 64 GB, macOS 26.7.1, Apple clang 21 (the test runs
gcc, which is Apple clang here).Game-free: no GPU, no game
Scene: none (a test fixture only)
Method:
tests/run_all.py test_walk_keyin turn: main, this PR, main, this PR. The result is pass or fail, the same inboth rounds, so there is no timing median. A scratch copy with Walk broken shows the repaired check still catches it.
The full game-free suite on both sides, compared by test name.
How to reproduce:
python -I -B tests/test_walk_key.pyin each checkout (needs a C compiler)9c9d69ed5f3e1540tests/test_walk_key.py, round 1tests/test_walk_key.py, round 2tests/run_all.py --jobs 6)The repaired check still detects what it protects. In a scratch copy of this PR's files,
walk_held()inhost/nn_hid.cmade to return 0 at once (Walk never held):Testing
Tested:
tests/test_walk_key.pyfails on main and passes here, in two rounds run in turn.clean before and after).
tests/test_walk_key.py, FAIL on main, passes here.test_appimage_package_retry,test_collect_wide,test_control,test_crash_record,test_game_layout,test_longshot_ctl,test_low_memory_notice,test_mem_gate,test_mem_gate_children,test_mirror_trim,test_oot_state_tap,test_pcache_header_read,test_pipeline_cache_file,test_pipeline_cache_save,test_pipeline_play_cache,test_prof_symbols,test_program_cache_cleanup,test_program_cache_one_variant,test_report_run.guardbinary in a temporary folder, started by Python, killed bySIGSEGV. That is the deliberate
fault-outsidecase oftests/test_linux_driver_fault_guard.py, which passed[inference from the name, parent and time; main's run left none].
Not tested:
linker [inference: not run there]; the fix is one empty C function, which
tests/test_input_background.pyalreadycompiles on every platform.
Needs other testers: None needed to merge: a game-free fixture, no product code. Running it on Linux or Windows
would confirm the "fails on main" side there.
Screenshots
Nothing on screen.
Risk and rollback
Test-only. The empty stand-in means this check never presses through the title screen; the Skip title presses have
their own check (
tests/test_skip_title.py), and the Walk check never exercised them. Reverting the commit restores thelink failure.
Reviewer notes
tests/test_walk_key.py. #319 changesread_input()'s window gate inhost/nn_hid.cbut not this test; they applyindependently.
tests/test_pad_layout.py, which main already fixed in #66; on9c9d69edit passes.Issues
See #66 and #399.
Checklist
For everyone
type(scope): description).main.python -I -B tests/run_all.pyrun and passing (any failure that also fails onmainis named above).third_party/untouched (a new folder with aPROVENANCE.mdinstead).If applicable
Assisted-by:/Co-Authored-By:trailers.tests/that reads changed source updated in this PR, not weakened.View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.