WIP: fix(test): test_input_movie compiles with clang again: the teleport stub's unused counter goes #2188
No reviewers
Labels
No labels
area/accessibility
area/audio
area/input
area/install
area/menu
area/renderer
area/saves
area/tooling
area/upscaling
beanstalk: approved
beanstalk: failed
beanstalk: needs approval
beanstalk: running
beanstalk: tested
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
risk
high
risk
low
risk
medium
status
blocked
status
confirmed
status
duplicate
status
invalid
status
needs-info
status
wontfix
ci: approved
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
MagicBeanDev/Longshot!2188
Loadingβ¦
Reference in a new issue
No description provided.
Delete branch "dyst/Longshot:fix/input-movie-clang"
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?
Summary
tests/test_input_movie.pyhas failed on Windows since #1582 merged: its glue's stand-in forhos_oot_teleport_cancelcounts its calls intp_cancels, which nothing reads. Clang (the Builder's llvm-mingw) stops at-Wunused-but-set-globalunder-Werror:glue.c:54:59: error: variable 'tp_cancels' set but not used. GCC on Linux doesn't warn there. The stub counts nothing now; no case asserted the count.Read first: the two lines in
tests/test_input_movie.py.Testing
Tested: not run yet. Found with
tests/run_all.pyon main1101b6127(Windows 11, llvm-mingw): the compile error above.Still to test:
python -I -B tests/run_all.py --exact tests/test_input_movie.py, expecting it to pass (by hand)Measurements
Nothing to measure: a check's stub.
Risks
None for the game: only a check changes. Reverting is enough.
Checklist
Ready for review
main; the title is a Conventional Commit.mise run testpasses (any failure that also fails onmainis named). Not run yet.main, or Measurements says why there is nothing to measure.third_party/untouched; nothing GPL-incompatible.When it applies
Assisted-by:/Co-Authored-By:trailers.Ready to merge
main, measured again or a comment says why the numbers still hold.π€ Generated with Claude Code
Read of
ddf37811(one file, two lines) on maina2dc5385. The removal itself is safe and weakens nothing. The finding is that the check still does not compile with clang as declared, so the fix's own premise and its Windows run do not exercise the clang toolchain.1.
RUN_ALL_ARGS = ["--cc", "gcc"]is a literal, not the configured compiler (tests/test_input_movie.py:42).run_allresolves{cc}asCCorwhich("gcc", "clang")(tests/run_all.py:139) β on a Windows Builder with only llvm-mingw that is clang β but the literalgccis passed as-is, andparse_compiler("gcc")only checks that agccexists (tests/run_all.py:267-274,tests/compiler_command.py:44-50). So onmise run test/ CI (run_all.py --strict,mise.toml:141-143) a Windows PC without agccdoes not compile the glue at all: the check fails asnot found: gcc (--strict)(or is skipped without--strict), andmain()'s ownSKIP: no gcccovers a direct run (:1049-1055). On a PC with a GCC, the glue is compiled by GCC, not clang β and-Wunused-but-set-globalis GCC's group (13+), which is the likely source of the diagnostic quoted in the body. Either way the clang path is not exercised, so "compiles with clang again" is not what this PR proves, and the Still-to-test ("run it on Windows, expecting it to pass") can pass without it. The declaration should be["--cc", "{cc}"]β astests/test_input_background.py:43andtests/test_control_picture.py:15already do β and then the run really compiles the glue with llvm-mingw's clang. The glue uses no GNU-only feature beyond-std=gnu11, which clang takes.2. The stub removal is safe.
tp_cancelshad no reader: on main it appears only in its declaration and its increment, and at this head nowhere (git grep tp_cancelsβ two lines on main, none here); no case or log prints it (the glue's teleport output istp_pending/tp_until'sTELEPORTline). The stub is still defined with the same no-op behaviour, and it is still the symbol the code under test calls (host/input_movie.c:855, 1105), so the cancel path is still linked and run; only the counter that nothing observed goes. Nothing in the test is weakened.3. Scope. Test-only, exactly
tests/test_input_movie.py(+2/β2); no game code, no generated files.hos_oot_teleport_cancel's(void)ticketkeeps the parameter used, so the same-Werrorflags stay quiet.4. The WIP state. Testing says "not run yet", and the Still-to-test should name the compiler: with the current declaration the run proves GCC (or a missing compiler), and with
{cc}it proves the Windows clang. One direct run with the fixed declaration on a Windows PC is the evidence this PR needs; on Linux it can be checked with--cc "{cc}"on the head (both gcc and clang, if both are installed), which is the cheap half before the Windows run.No approval (WIP), and no claim on it.
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.