Run the view-guard tests one at a time #246

Merged
hamdanpor-ctrl merged 1 commit from upstream-pr/246 into main 2026-11-27 12:10:07 +00:00
hamdanpor-ctrl commented 2026-11-27 12:00:27 +00:00 (Migrated from github.com)

Imported from TaynanGT/Vice-Tay. Originally posted by hamdanpor-ctrl on 2026-11-27T12:00:27Z.


cargo test -p victory-gpu fails now and then on my laptop. The view-guard tests in watch.rs share the global guards and ran beside each other: a view one test maps can land beside another test's guarded block, and that block is then told as written again, so a range the test expects clean comes back with its page (left: Some([page]), right: Some([])).

This makes the 21 tests that guard views of their own hold one_asking_test(), as the ask_once tests already do, and says so in its comment. Tests only; nothing outside #[cfg(test)] changes.

cargo test -p victory-gpu --locked Runs Failed
main at 573eff0 11 2 (both a_block_just_written_rests)
a_block_just_written_rests alone, on main 30 0
only a_block_just_written_rests holding the lock 30 2 (a_range_that_begins_in_an_unmapped_block_is_guarded, a_write_through_another_view_is_reported_at_the_guarded_one)
this branch 30 0 (471 passed each, about 25 s as before)

Clippy with and without --all-features is clean. cargo test --workspace --all-features -- --test-threads=1 passed on main as well, which runs the tests one at a time.

  • PC: RTX 3050 Laptop GPU 4 GB (driver 32.0.16.1742) with Intel Iris Xe, i7-12700H, 16 GB, Windows 11 Pro
  • Toolchain: Rust 1.98.1, VS 2022 Build Tools

AI-assisted (Claude Code).

🤖 Generated with Claude Code

<!-- greyfinch-sync:TaynanGT/Vice-Tay:issue:5526255880 --> Imported from [TaynanGT/Vice-Tay](https://github.com/TaynanGT/Vice-Tay/pull/246). Originally posted by [hamdanpor-ctrl](https://github.com/hamdanpor-ctrl) on 2026-11-27T12:00:27Z. --- `cargo test -p victory-gpu` fails now and then on my laptop. The view-guard tests in `watch.rs` share the global guards and ran beside each other: a view one test maps can land beside another test's guarded block, and that block is then told as written again, so a range the test expects clean comes back with its page (`left: Some([page])`, `right: Some([])`). This makes the 21 tests that guard views of their own hold `one_asking_test()`, as the `ask_once` tests already do, and says so in its comment. Tests only; nothing outside `#[cfg(test)]` changes. | `cargo test -p victory-gpu --locked` | Runs | Failed | |---|---:|---:| | `main` at `573eff0` | 11 | 2 (both `a_block_just_written_rests`) | | `a_block_just_written_rests` alone, on `main` | 30 | 0 | | only `a_block_just_written_rests` holding the lock | 30 | 2 (`a_range_that_begins_in_an_unmapped_block_is_guarded`, `a_write_through_another_view_is_reported_at_the_guarded_one`) | | this branch | 30 | 0 (471 passed each, about 25 s as before) | Clippy with and without `--all-features` is clean. `cargo test --workspace --all-features -- --test-threads=1` passed on `main` as well, which runs the tests one at a time. - PC: RTX 3050 Laptop GPU 4 GB (driver 32.0.16.1742) with Intel Iris Xe, i7-12700H, 16 GB, Windows 11 Pro - Toolchain: Rust 1.98.1, VS 2022 Build Tools AI-assisted (Claude Code). 🤖 Generated with [Claude Code](https://claude.com/claude-code)
TaynanGT commented 2026-11-27 12:03:37 +00:00 (Migrated from github.com)

Imported from TaynanGT/Vice-Tay. Originally posted by TaynanGT on 2026-11-27T12:03:37Z.


@hamdanpor-ctrl The repeated run where serialising just one test moved the failure to other view tests makes the shared guard state the useful clue. I’ll check that the 21 tests take the same lock as the existing ask_once cases and run the parallel Windows suite at this head.

<!-- greyfinch-sync:TaynanGT/Vice-Tay:comment:7217790560 --> Imported from [TaynanGT/Vice-Tay](https://github.com/TaynanGT/Vice-Tay/pull/246#issuecomment-7217790560). Originally posted by [TaynanGT](https://github.com/TaynanGT) on 2026-11-27T12:03:37Z. --- @hamdanpor-ctrl The repeated run where serialising just one test moved the failure to other view tests makes the shared guard state the useful clue. I’ll check that the 21 tests take the same lock as the existing `ask_once` cases and run the parallel Windows suite at this head.
hamdanpor-ctrl commented 2026-11-27 16:23:33 +00:00 (Migrated from github.com)

Imported from TaynanGT/Vice-Tay. Originally posted by hamdanpor-ctrl on 2026-11-27T16:23:33Z.


Rebased onto main at 6b3a266 and added the lock to six more tests that map views of their own (what_is_put_in_beside_the_guards_is_told_at_every_view, which came to main after this branch, bits_go_at_every_view, holes_are_known_until_the_runtime_tells, no_mapping_is_lost_between_askers, no_write_through_another_view_is_lost_between_askers, nothing_is_guarded_between_our_forgetting_it_and_its_unmapping).

While testing #245, #238 and #247 on top of 6b3a266 here, view-guard tests failed now and then as before (a_write_is_reported_at_every_checked_view, what_is_put_in_beside_the_guards_is_told_at_every_view, what_the_kernel_writes_through_is_not_guarded_for_another_view, a_block_just_written_rests, a_view_being_split_leaves_its_pages_unguarded_elsewhere).

With this branch: cargo test -p victory-gpu --locked failed 0 of 30 runs (473 passed each); clippy on victory-gpu is clean. Same laptop: RTX 3050 Laptop 4 GB, i7-12700H, 16 GB, Windows 11 Pro.

<!-- greyfinch-sync:TaynanGT/Vice-Tay:comment:7223206615 --> Imported from [TaynanGT/Vice-Tay](https://github.com/TaynanGT/Vice-Tay/pull/246#issuecomment-7223206615). Originally posted by [hamdanpor-ctrl](https://github.com/hamdanpor-ctrl) on 2026-11-27T16:23:33Z. --- Rebased onto `main` at `6b3a266` and added the lock to six more tests that map views of their own (`what_is_put_in_beside_the_guards_is_told_at_every_view`, which came to `main` after this branch, `bits_go_at_every_view`, `holes_are_known_until_the_runtime_tells`, `no_mapping_is_lost_between_askers`, `no_write_through_another_view_is_lost_between_askers`, `nothing_is_guarded_between_our_forgetting_it_and_its_unmapping`). While testing #245, #238 and #247 on top of `6b3a266` here, view-guard tests failed now and then as before (`a_write_is_reported_at_every_checked_view`, `what_is_put_in_beside_the_guards_is_told_at_every_view`, `what_the_kernel_writes_through_is_not_guarded_for_another_view`, `a_block_just_written_rests`, `a_view_being_split_leaves_its_pages_unguarded_elsewhere`). With this branch: `cargo test -p victory-gpu --locked` failed 0 of 30 runs (473 passed each); clippy on `victory-gpu` is clean. Same laptop: RTX 3050 Laptop 4 GB, i7-12700H, 16 GB, Windows 11 Pro.
TaynanGT commented 2026-11-27 16:25:27 +00:00 (Migrated from github.com)

Imported from TaynanGT/Vice-Tay. Originally posted by TaynanGT on 2026-11-27T16:25:27Z.


@hamdanpor-ctrl Zero failures in 30 runs makes the six view tests a good follow-up. #246 is already in main, so a small PR from the current tip with just the extra lock coverage will let the CI result isolate that change.

<!-- greyfinch-sync:TaynanGT/Vice-Tay:comment:7223243936 --> Imported from [TaynanGT/Vice-Tay](https://github.com/TaynanGT/Vice-Tay/pull/246#issuecomment-7223243936). Originally posted by [TaynanGT](https://github.com/TaynanGT) on 2026-11-27T16:25:27Z. --- @hamdanpor-ctrl Zero failures in 30 runs makes the six view tests a good follow-up. #246 is already in main, so a small PR from the current tip with just the extra lock coverage will let the CI result isolate that change.
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
TaynanGT/Vice-Tay!246
No description provided.