Repository navigation
Conversation
…ive flips On a loaded machine (the full workspace test run) the flip wait oversleeps the 5 ms interval and the next flip lands a few ticks later, so the test failed 30 of 30 runs under CPU load. It now checks that each flip ends on a new tick, no earlier than the tick due when the wait was called, and no later than the ticks that passed during the call.
…ive flips On a loaded machine (the full workspace test run) the flip wait oversleeps the 5 ms interval and the next flip lands a few ticks later, so the test failed 30 of 30 runs under CPU load. It now checks that each flip ends on a new tick, no earlier than the tick due when the wait was called, and no later than the ticks that passed during the call.
|
Supporting data: on Windows 11 with all 16 cores busy, this test failed 15 of 20 runs on main for us (the flip ticks came out as e.g. |
|
The test at d31567c passed under ordinary Wine scheduling. A 60 ms pause after the due-tick sample but before the timer started exposed one remaining false failure: due tick 4, flip tick 16, one elapsed tick counted. Starting the timer immediately before the sample passed the same delayed control while keeping the per-flip assertions. Update: 211d365 covers this interval with its independent clock. Its focused test passed on Wine 11.22 unchanged and with one 60 ms pause immediately after the first due-tick sample, including the exact-tick check. We closed the follow-up as superseded. |
The previous revision compared each flip with next_tick, the function under test, so an off-by-one there went unnoticed. The test now keeps its own clock: each flip must land on a new tick, not before the one due when the wait was called and not after the ticks that passed during it; at least one flip must land exactly on the expected tick, and no wait may end before its tick (1 ms tolerance).
The previous revision compared each flip with next_tick, the function under test, so an off-by-one there went unnoticed. The test now keeps its own clock: each flip must land on a new tick, not before the one due when the wait was called and not after the ticks that passed during it; at least one flip must land exactly on the expected tick, and no wait may end before its tick (1 ms tolerance).
|
Independent reproduction on Windows 11 x64, Ryzen 5 5600 / 32 GiB RAM, pinned Rust 1.98.1, while a separate WARP workload was active. Before #985, After merging head The surrounding local integration includes #211, #89 and #492 plus the capture-directory change from #1146; these were unchanged between the two test runs. The reproducible integration branch now also includes #206: https://github.com/jamesn-xt/VIctory/tree/test/rtx4080-target-formats . Synthetic test results only; no retail logs or captures attached. |
…ive flips On a loaded machine (the full workspace test run) the flip wait oversleeps the 5 ms interval and the next flip lands a few ticks later, so the test failed 30 of 30 runs under CPU load. It now checks that each flip ends on a new tick, no earlier than the tick due when the wait was called, and no later than the ticks that passed during the call. The test keeps its own clock rather than comparing each flip with next_tick, the function under test, so an off-by-one there cannot go unnoticed: each flip must land on a new tick, not before the one due when the wait was called and not after the ticks that passed during it; at least one flip must land exactly on the expected tick, and no wait may end before its tick (1 ms tolerance). Upstream's two commits (d31567c, 211d365) in one, paths renamed to xtp-gpu. Ported from Marvisak/VIctory#985 (head 211d365) by Makto94
211d365 to
38942cc
Compare
…rame-test-oversleep # Conflicts: # crates/victory-gpu/src/frame.rs
…/frame-test-oversleep
|
Automated triage for the maintainers. Closing because this change is already in If this is mistaken, reply here with what was missed (or push a change and say so) and it will be looked at again. Thank you for the contribution. |
What and why
frame::tests::waits_end_on_ticks_and_count_frames(victory-gpu) requires four flips on consecutive 5 ms ticks. When the CPU is loaded, the flip wait oversleeps and the next flip correctly lands on a later tick ([38, 45, 52, 59]), so the test fails.Scope: this reproduces locally under CPU load (e.g.
cargo test --workspaceon a busy machine). It did not appear in the 28 most recent failed CI runs upstream.The test now keeps its own clock instead of trusting
next_tick. For each flip:Only the test changes.
How it was tested
Windows 11, test binary run directly; load = 16 busy-loop processes.
Mutants in
next_tick/wait, each failing 3/3 with this test: tick+1→+2,+1→+0,sleep(wait / 2),sleep(0). The old test missed+0and both sleep mutants. Both clippy commands from CI andcargo test -p victory-gpu --lockedpass.🤖 Generated with Claude Code