WIP: test: the checks main's last commits left stale pass again, and two bugs they caught #2213
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
3 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
MagicBeanDev/Longshot!2213
Loading…
Reference in a new issue
No description provided.
Delete branch "HumanBean/Longshot:test/main-checks-pass-2"
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
After #2171 merged, main's next commits left game-free checks and the website's build failing again. Run in CI's image (
catthehacker/ubuntu:act-24.04,tests/run_all.py --strict, both shards), this PR brings it back to 1 failing check:test_dev_packs, the one #2171 names and leaves for its own change. The website builds and passes its checks again.Checks that went stale (17 checks, and 4 of the C++ files they compile). Their cuts, stand-ins and fixtures follow the code again, and each checks the same thing it did:
sim_turf_settings_test.cpp;test_close_waits_for_save,test_fs_save_commit,test_guest_copies,test_damaged_rom_files;test_compile_zero_byte;test_hold_toggle,test_pads_after_menu,test_menu_i18n(it now reads the key caps fromvk_ui.h);nx2/test_import_windows(and it gains a check) andtest_lower_atomg_cas;test_sim_turf_poolsstill expected a floor of 0. It now expects the game's own size, which itstest_sim_turf_floorplays out;test_menu_keysandtest_vibration_menueach had a stand-in defined twice after a rebase. One copy is gone.What the checks rightly caught, fixed in the source:
gpu/vk/switches.def:RX_VK_SIM_TURF_ADAPTIVEandRX_VK_SIM_TURF_POOLSwere added among the G rows. The table is sorted, and the switch report finds a switch by binary search, so it missed both. They're now in their place, betweenRX_VK_SHOT_WandRX_VK_SKIP_CODE, andLC_ALL=C sort -cpasses on the table.gpu/vk/vk_draw.cpp:sim_turf_bound, the private creators bound for the dispatch being recorded, was a plainthread_localvector. With llvm-mingw, every use of athread_localwith a constructor or destructor calls the file's TLS init function (about 2.4% of the replay thread, by the comment aboveTLS_OBJECT), so this file's such objects go throughTLS_OBJECT, andtests/test_tls_objects.pychecks it. It now does, and its users callsim_turf_bound(). Same vector, same use.The website (
website/src/repo-docs/graphics-settings.ts,docs/user/):.helpthat names a string constant (.help = sim_turf_about) is read as that string.Read first:
gpu/vk/switches.def,gpu/vk/vk_draw.cpp, thenwebsite/src/repo-docs/graphics-settings.ts, then the tests by area.Testing
Tested: game-free only, on this commit (on main with #2174).
tests/run_all.py --strictran in CI's own image (catthehacker/ubuntu:act-24.04, Ubuntu 24.04's g++ and clang, the pinned headers, glslang 16.6.0) from a depth-1 checkout of this commit. Shard 1: 465 passed, onlytest_dev_packsfailed. Shard 2: 467 passed, onlytest_sim_turf_poolsfailed. After its fix,test_sim_turf_poolsandtest_sim_turf_floorboth passed in the same image. Results are in a comment below.scripts/website_check.shpassed in the same image: the site built,check-site.tswas clean, and 93 of 93 unit tests passed.Still to test:
RX_VK_SIM_TURF_POOLS=0andRX_VK_SIM_TURF_ADAPTIVE=0should still act as their descriptions say (by hand).longshot --switches(the switch report) lists both simulated-turf switches (by hand).Measurements
Nothing to measure. The source changes are the order of two lines in the switch table and a per-thread vector declared through
TLS_OBJECT.TLS_OBJECTis the file's existing way to reach a per-thread object without the TLS init function, so the Windows build can only get cheaper; the vector is used a few times per dispatch.Risks
sim_turf_boundnow goes throughTLS_OBJECT. If that went wrong, the turf's demand sampling would miss its creators, and the private lists would stay at their stock size. That's the same asRX_VK_SIM_TURF_ADAPTIVE=0.Checklist
Ready for review
main; the title is a Conventional Commit.mise run testpasses (any failure that also fails onmainis named). (tests/run_all.py --strict, both shards, in CI's image: onlytest_dev_packs, which fails onmaintoo, named above)main, or Measurements says why there is nothing to measure.third_party/untouched; nothing GPL-incompatible.When it applies
mainand passes here.tests/that reads changed source is updated, not weakened.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
Game-free runs on this change over main
a2dc5385, in CI's image (ghcr.io/catthehacker/ubuntu:act-24.04, a depth-1 checkout,tests/run_all.py --strict):test_dev_packs, fails onmaintoo), 9 skipped, 196 stest_sim_turf_pools, the stale floor, fixed after this run), 9 skipped, 184 stest_sim_turf_pools,test_sim_turf_floorafter the fixscripts/website_check.shcheck-site.tsclean, 93 of 93 unit tests passedNot run in the game: opened with
--force, as asked.Possibly related, for context:
One assertion is loosened rather than updated:
tests/sim_turf_settings_test.cppchangedassert(std::filesystem::remove(blocked_temp))toassert(!std::filesystem::exists(blocked_temp) || std::filesystem::remove(blocked_temp)). It now passes when the path is already gone, so it no longer asserts that the failed save left no temp; the test's ownremovecan satisfy it. That may be exactly the cross-platform cleanup the comment describes (DeleteFileWdoes not take a directory), but say so; if it is meant to pin the source's postcondition, assert the path is gone before the test touches it instead.The two bug claims are pinned.
tests/test_tls_objects.pywould fail on the old code (a plain namespace-scopethread_local std::vector<SimTurfBound>matches its heavy-type rule), andtests/test_switch_table.pywould fail on the old code twice: the name-order check, andfind(rows[i]) == &rows[i]for every row through the ordered table. Both are real reds for the two source fixes.The one claim those tests do not pin is the 2.4 % figure: it is quoted from the file's own comment (and repeated in
test_tls_objects.py), while this PR's Measurements says only that the Windows build "can only get cheaper", with no A/B or profile. If the TLS change is a bug fix, measure it (the replay-thread profile) or call it a cleanup; a test can pin theTLS_OBJECTpattern, not the percentage.Stale checks I read, with their reasons: the simulated-turf stand-ins (draw stream, FSR uniform, recording admission, slider ends), the #607 save cuts (
close_waits,fs_save_commit, guest copies, damaged ROM), the #2150 zero-byte deps as bytes, the #2038/#2168 sprint bits inhold_toggle/pads_after_menu/menu_i18n, the #2165 import count andNUM_OPCODESinlower_atomg_cas, the #2174 game-size floor insim_turf_pools, and the duplicateoptions_save_mu/grass_distance_nowstand-ins. Each follows the source change and keeps its assertion.test_close_waitsstill compiles the staticfs_*functions and text-checks the HLE wrappers;test_guest_copies's prefix is stricter than the old exact call (it requires the new comma), though it does not pin thesave_handle_calllock flag — if #607's save lock matters there, pin the 0/1.No approval, no fix claim; game-free only, and the PR says it has not run in the game.
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.