test: the sampler check's concurrent case takes replay_mu, and test_job_queue passes on Windows in the queue #2610
No reviewers
Labels
No labels
area/accessibility
area/audio
area/input
area/install
area/menu
area/mods
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
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
MagicBeanDev/Longshot!2610
Loading…
Reference in a new issue
No description provided.
Delete branch "Jiro113/Longshot:fix/tests-chasse-bugs-2026-11-26"
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
Two game-free checks fail on
mainfor reasons in the checks themselves, not in the code they test.tests/test_sampler_admission.py, theconcurrentcase. It sent four threads intosampler_makeat oncewithout the replay's lock. The sampler book has no lock of its own, and nothing in the renderer calls it that way:
every path to
sampler_makeholdsreplay_mu. That coversrun_submit(gpu/vk/vk_replay.cpp:2822) and thebenchmark (
5434);drawanddispatchreach it only from the replay, throughbuild_descriptors. The threadsraced on the book and made more than one sampler. On
mainthe case failed in 29 of 30 runs. It also fails atrandom in other people's reports (#2587 names it). Each call now takes the fixture's
replay_mu, asrun_submitdoes, and the four threads still run at once. #2074 made the same change to the recording admission fixture.
tests/test_job_queue.pyon Windows, when the suite runs in the job queue (dev.py queue run, asAGENTS.mdasks). Two cases failed there:
test_a_build_outside_the_queuestarted its fakelongshot-builder.exewith the suite's environment, so withthe job's
LONGSHOT_JOB.heavy_procsrightly took it for a job's build (21708 not found in []). It now startsthrough the class's
start(), which leavesLONGSHOT_JOBout, and also checks that a job's builder is skipped.test_a_pid_used_again_or_another_namespace_is_not_itcompared pid namespaces throughprocs.pidns(), whichis
""on Windows.job_abovethen has nothing to compare and returns the job. The namespace half now givesthis process a made-up namespace, so it runs on every OS.
CI runs the suite on Linux only, so this never showed there.
To see it on
main: runpython -I scripts/dev.py queue run t --mode build -- python -I -B tests/test_job_queue.pyon Windows. For the sampler check, run
tests/test_sampler_admission.py --headers <Vulkan headers>a few times.Read first:
tests/sampler_admission_test.cpp(theconcurrentcase), thentests/test_job_queue.py(
InsideAJob,WindowsPlayersReal).Flags and settings: none. No renderer or queue code changes.
Testing
Tested: Windows 11 (build 26300), Python 3.13, clang++ from llvm-mingw 20261104, Vulkan headers 1.4.345. Every
run went through the PC's job queue (
dev.py queue run … --mode build).mainwas201f8868e, run from agit archivecopy. No game run: only checks change.mainfailed 29 of 30, always onconcurrent(route id 22 times, make 19, cache-off21). This branch: 0 of 30 failed, all 147 cases passing each time. With the sampler book made per thread
(
thread_local, a mutation ofvk_draw.cpppassed with--source),concurrentfails again, along withshared-thread,thread-retryandlimit: the case still catches a book the threads don't share.tests/test_job_queue.pyin the queue: onmain, 40 tests with these 2 failing. Here, 40 tests, none failing (6skipped, the same as on
main).tests/run_all.py --changed origin/mainin the queue: 3 checks, all passing (test_sampler_admission.pyalone,test_job_queue.py,byte_compile_tracked.py).tests/run_all.pyin full, in the queue (Windows, 32 at once), with this change and the job queue's noise fix(#2611) on top: 794 passed, 13
failed, 52 skipped. The 13 fail the same way on
main201f8868e. I reran them alone on both (--exact) and gotthe same 41 failure lines, but for temporary paths:
test_auto_handheld,test_bug_report,test_builder_channel,test_coverage_run,test_dev_ab,test_dev_build,test_dev_migrate,test_game_menu_mouse_buttons,test_input_movie,test_oot_menu_mouse,test_pads_after_menu,test_parity_gates,test_run_all_mingw. These are this PC's Windows failures, among them a recent clangwarning under
-Werrorand checks that run only on Linux. They are unrelated to this change.Still to test:
Measurements
Nothing to measure: only game-free checks change.
Risks
None for players: no game, renderer or tool code changes. The
concurrentcase no longer checks unlocked parallelcalls, which the renderer never makes. If a later change calls
sampler_makefrom two threads withoutreplay_mu,this case won't catch it;
shared-threadandlimitstill check that the threads share the book.Neither check was run on Linux here, so CI's Linux run is the first. There the
concurrentcase builds with g++(only llvm-mingw's clang++ ran here). The namespace half of
test_a_pid_used_again_or_another_namespace_is_not_itruns with
procs.pidns()patched, where it used the real one before. No second agent has reviewed it cold yet.Checklist
Ready for review
main; the title is a Conventional Commit.mise run testpasses (any failure that also fails onmainis named).main, or Measurements says why there is nothing to measure.third_party/untouched; nothing GPL-incompatible.When it applies
mainand passes here.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
WIP: test: the sampler check's concurrent case takes replay_mu, and test_job_queue passes on Windows in the queueto test: the sampler check's concurrent case takes replay_mu, and test_job_queue passes on Windows in the queue6c0345b6b0c77be0189c@review
c77be0189cf9eee63582f9eee635829b299eaba39b299eaba3e4ca7e1bbfe4ca7e1bbfb63cb0bf36b63cb0bf36eb6297d57deb6297d57d4cbab327a84cbab327a87e4065fd857e4065fd85c19a50ed23c19a50ed2395a2817d8995a2817d89f5d1d280b2f5d1d280b28ebecaa2958ebecaa2956c88b54fc9View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.