XMem tests: the range lock's test runs in a process of its own #3621

Closed
tphira612 wants to merge 1 commit from upstream-pr/3621 into main
tphira612 commented 2026-11-30 01:56:08 +00:00 (Migrated from github.com)

Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by tphira612 on 2026-11-30T01:56:08Z.


What it changes

a_read_by_range_waits_only_for_a_remapping_that_meets_it checks that, with VICTORY_RANGE_LOCK, a read of one view is never refused while another view is remapped. The other xmem tests remap title memory as a whole (title_memory_remapping), which every read waits for, so when they ran beside it the read apart was refused and the refused == 0 assertion failed. It also turns the range lock on for the whole test process, which changes how those other tests run.

The test now runs itself again in a child process (this test alone, --exact --test-threads=1), the same way host_heap_new_honors_env_dynamic_slots_on_host_device does in victory-gpu. The parent checks that the child ran the test and passed. The test body is unchanged. Test-only; nothing in the game changes.

How it was tested

  • cargo test -p victory-hle --lib: main 422 passed, 1 failed (this test, in every full run); with this change 423 passed, 0 failed.
  • cargo test -p victory-hle --lib modules::xmem: 46 passed.
  • cargo clippy -p victory-hle --all-targets: no warnings in xmem.rs. cargo xtask policy --staged passes.
<!-- greyfinch-sync:trustno1-coder/VIctory-NVIDIA:issue:5557596994 --> Imported from [trustno1-coder/VIctory-NVIDIA](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/3621). Originally posted by [tphira612](https://github.com/tphira612) on 2026-11-30T01:56:08Z. --- ## What it changes `a_read_by_range_waits_only_for_a_remapping_that_meets_it` checks that, with `VICTORY_RANGE_LOCK`, a read of one view is never refused while another view is remapped. The other `xmem` tests remap title memory as a whole (`title_memory_remapping`), which every read waits for, so when they ran beside it the read apart was refused and the `refused == 0` assertion failed. It also turns the range lock on for the whole test process, which changes how those other tests run. The test now runs itself again in a child process (this test alone, `--exact --test-threads=1`), the same way `host_heap_new_honors_env_dynamic_slots_on_host_device` does in `victory-gpu`. The parent checks that the child ran the test and passed. The test body is unchanged. Test-only; nothing in the game changes. ## How it was tested - `cargo test -p victory-hle --lib`: **`main` 422 passed, 1 failed (this test, in every full run); with this change 423 passed, 0 failed.** - `cargo test -p victory-hle --lib modules::xmem`: 46 passed. - `cargo clippy -p victory-hle --all-targets`: no warnings in `xmem.rs`. `cargo xtask policy --staged` passes.

Pull request closed

Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
trustno1-coder/VIctory-NVIDIA!3621
No description provided.