Repository navigation
Tests: a title-queue upload waits for at least the mappings made before it - #3278
Conversation
…re it gpu_a_title_queue_upload_waits_for_the_page_mappings_before_it asserted that the upload waited for exactly the page-mapping value the test had just made. The value is device-wide: every mapping and unmapping on the device raises it, including late releases of earlier tests and tests that do not hold VRAM_TEST_LOCK. When one lands between the test's mapping and its upload, the upload rightly waits for the newer value, and the test failed (CI: "left: 28, right: 26"). It then poisoned TEST_LOCK, so seven more title_textures tests failed on PoisonError in the same run; that is most of the "Build and test" failures on recent PRs that do not touch D3D12.X. The test now asserts what it describes: the upload waits for at least the mapping made before it, and for no more than the device has reached (new vram::mapping_value_for_test). An upload that does not wait still fails it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
merge-check |
|
merge-check
Note for @Foniass: the |
|
@Foniass here are the two
This PR ( AI use: Claude Code (Claude Fable 5.2) ran the two builds and the smoke script.
|
Fixes the flaky
Build and test (Windows, no GPU)failures that show up on many PRs that never touch D3D12.X (e.g. #3250, #3266): 8title_texturestests red in one run, green in the next.There is one flaky test,
gpu_a_title_queue_upload_waits_for_the_page_mappings_before_it. It asserted that the upload waited for exactly the page-mapping value the test had just made. That value is device-wide: every mapping and unmapping on the device raises it (vram.rs,self.value += 1in map / unmap), including late releases of earlier tests and tests that do not holdVRAM_TEST_LOCK. When one lands between the test's mapping and its upload, the upload rightly waits for the newer value and the test fails. CI logs:left: 28, right: 26. Its panic then poisonsTEST_LOCK, so the next 7title_texturestests fail onPoisonErrorin the same run.The test now asserts what its doc comment says: the upload waits for at least the mapping made before it, and for no more than the device has reached. An upload that does not wait still fails it, so the check keeps what it tests; it no longer requires that nothing else maps pages meanwhile.
What is in it
crates/xcl/src/hle/d3d12x/title_textures.rs: the assertion, with the three values in its messagecrates/xcl/src/hle/d3d12x/vram.rs:mapping_value_for_test(test-only)Test-only: both changes are in
#[cfg(test)]code. It touches files undercrates/xcl/src, so it needs thetest-onlylabel instead of smoke runs.Tested
cargo test -p xcl --lib title_textures -- --test-threads=4: 63 passed, 0 failed, 1 ignoredcargo test -p xcl --lib -- --test-threads=4: 2465 passed, 4 failed, 29 ignored. The 4 aregpu::dxil::fuzz_tests::fuzz_validate_and_gpu_0..3with a driverE_OUTOFMEMORYthat this machine also has on main (they pass on other 5070 Tis).Not tested
uma_driver::tests::mixed_window_keeps_its_bytes_and_the_gpu_sees_every_segment(its watched regions sometimes include the 128 MiB GPU_UPLOAD segment). It has a different cause, and Tests: the mixed-window remake tests run in a child process #3187 already addresses those mixed-window tests, so it is not touched here.AI use
🤖 Generated with Claude Code