Tests: one submission at a time across the suite (no_write_is_lost_with_port_7 failed beside refreshed_ranges_hold_title_memory) #382
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/382"
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?
Imported from Belobug/VIctory-Belobug-AMD. Originally posted by felicerosella on 2026-11-26T22:58:54Z.
watch::port7_tests::no_write_is_lost_with_port_7fails now and then in the parallelvictory-gpusuite, withround N, page P: X is not after Xfrom its submission thread. It is another test's doing, not port 7's.Cause.
ask_onceends whatever asking stands, as it should with the runtime's one submission thread. The tests that play the submission each kept to that in their own way, or not at all:host::refresh_tests::submission: a mutex of its own (static ONE)host::refresh_tests::unchanged_ranges_are_known: a retry "if a submission of another test ended it"watch::tests::the_rest_of_the_one_asking_has_a_number_of_its_own: nothingSo
refreshed_ranges_hold_title_memory'sask_onceended the port-7 test's asking mid-round, and that test then read a page's write with a number it had already seen.Fix (test code only).
watch::submission_in_test()is one lock for all of them:unchanged_ranges_are_known'slookandthe_rest_of_the_one_asking_has_a_number_of_its_ownhold it;I left
unchanged_ranges_are_known's retry loop in place to keep the change small.Results on
a-publierat4eb6cfd, RTX 4070 SUPER, Ryzen 7 7800X3D, Windows 11 26200:no_write_is_lost_with_port_7+refreshed_ranges_hold_title_memory(--exact), 20 runscargo test -p victory-gpu --lib, 10 runsIn the full suite it only shows up now and then. It came up once in 4 full runs on this machine while I was testing something else.
cargo clippy -p victory-gpu --all-targets -- -D warningsis clean.AI-assisted: yes (Claude Code)
Imported from Belobug/VIctory-Belobug-AMD. Originally posted by MamaLeVrai on 2026-11-27T00:22:24Z.
Tested on an RX 6950 XT 16 GB (RDNA 2), driver 32.0.21045.29003, Windows 11 build 26300, Rust 1.98.1, release, at
3ed1953:cargo test --release -p victory-gpu --lib396 passed, 0 failed, 34 ignored.AI-assisted (Claude Code); no game data.
Imported from Belobug/VIctory-Belobug-AMD. Originally posted by lvndrpup on 2026-11-27T03:31:51Z.
Review: COMMENTED
Tested on an RTX 3060 Ti 8 GB, Ryzen 5 5600X, 32 GB, Windows 11 build 26300, Rust 1.98.1, debug. On
4eb6cfd,no_write_is_lost_with_port_7besiderefreshed_ranges_hold_title_memoryfailed in 10 of 10 runs; with3ed1953, in 0 of 10. It merges cleanly with #446 and #450, andcargo test -p victory-gpu --lib -- watch:: host::refresh_testsfailed in 0 of 30 runs with #450, and in 0 of 30 with #446 and #450.One more caller:
host::card_steps::tests::the_card_copies_what_is_recordedis not ignored and submits throughhost.execute(card_steps.rs:1202).HostQueue::submitthen callswatch::ask_once(host.rs:5840) andask_once_end(host.rs:5898) withoutsubmission_in_test(), so it can still end the asking of a test that holds the guard. A throwawayeprintln!inask_onceshowed one call per run on this card. I have not seen a failure from it, since the window is one call a run. Taking the guard at the top of that test (let _one = crate::watch::submission_in_test();) would close it.submitnever takes the guard, so this cannot deadlock. I tried that one line on top of this PR, #446 and #450, andcargo test -p victory-gpu --lib -- host::card_steps watch::port7_tests host::refresh_testspassed in 5 of 5 runs (17 tests each).Imported from Belobug/VIctory-Belobug-AMD. Originally posted by lvndrpup on 2026-11-27T04:14:54Z.
More data, from the whole
victory-gpulib test binary run directly with default test threads, which is where these failures show. RTX 3060 Ti 8 GB, Windows 11 build 26300, Rust 1.98.1, debug, 30 runs each, alternating:a-publier4eb6cfdhost::refresh_tests::unchanged_ranges_are_known(3),watch::port7_tests::no_write_is_lost_with_port_7(3), both in one run4eb6cfd+ this PR + #446 + #450So with this PR,
unchanged_ranges_are_knownis covered too. #446 lists it as still failing now and then: itslookclosure is one of the places that now takessubmission_in_test().descriptor::host::tests::views_off_their_elements_get_a_copy_of_their_bytes, the other one #446 names, did not fail in any of these 60 runs.View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.