Tests: skip sparse reinit when no sparse state exists #2758

Open
github-bot wants to merge 1 commit from github-bot/gh-2758 into main AGit
Owner

@⁠luckyteagirl on GitHub · 2026-11-26 10:18 UTC · original
luckyteagirl:codex/test-sparse-reinit-guard → main · +3 −3 · 1 files · 1 commits · draft

The sparse reinitialization fixture used a coherent UMA GPU address as proof that sparse windows existed. A coherent buffer can be imported without a sparse state, leaving the fixture to panic on sparse::alloc before it checks the #344 reinitialization behavior. This test-only change checks the sparse queue directly.

What is in it

  • crates/xcl/tests/sparse_reinit.rs: skip explicitly when no sparse queue was initialized; otherwise keep the existing sparse allocation and reinitialization assertions.

Tested

  • Windows 11 Home build 26200, AMD Radeon RX 6800M (driver 30.0.13002.13003), Rust stable 1.99.0 MSVC, debug build.
  • cargo +stable build --workspace --locked: passed.
  • With XCL_ADAPTER=RX 6800M and XCL_REQUIRE_GPU=wave64, cargo +stable test --locked -p xcl --test sparse_reinit -- --exact the_sparse_state_is_replaced_outside_its_lock --test-threads=4 --nocapture: 1 passed, 0 failed, 0 ignored, 0 skipped; three sparse windows were created and re-created.
  • With WARP on Windows PowerShell 7, the same focused test exited 0 with 1 explicit SKIPPED ...: no sparse GPU UMA, 0 exercised, 0 failed, 0 ignored.
  • In a disposable coherent-only fault injection (restored before commit), the old guard panicked on expect("a sparse block") (0 passed, 1 failed); the new guard explicitly skipped (0 exercised, 1 skip, 0 failed).
  • cargo test --workspace -- --test-threads=4 was attempted as cargo +stable test --workspace --locked -- --test-threads=4 on the RX 6800M. It exited 0xc0000005 in the first library binary after 83 logged passes and 1 ignored, with no final library summary or later target results. A separate clean-main serial run reproduced an access violation at raw_loads_in_root_windows_respect_exec_and_bounds; the exact four-thread crashing test is unproven.
  • git diff --check passed; only the fixture file changed.

Not tested

  • The full GPU suite could not complete because of the library access violation. No retail title, release build, or other physical GPU was tested. The change does not touch runtime code.

AI use

  • OpenAI Codex (GPT-6.2 Sol) wrote the fixture change and ran focused GPU, WARP, and fault-injection tests. OpenAI Codex (GPT-6.2 Astra) reviewed the diff, ran the workspace build and GPU suite, and prepared this PR.
**@⁠luckyteagirl** on GitHub · 2026-11-26 10:18 UTC · [original](https://github.com/xcl-dev/xcl/pull/2758) `luckyteagirl:codex/test-sparse-reinit-guard` → `main` · +3 −3 · 1 files · 1 commits · draft The sparse reinitialization fixture used a coherent UMA GPU address as proof that sparse windows existed. A coherent buffer can be imported without a sparse state, leaving the fixture to panic on `sparse::alloc` before it checks the #344 reinitialization behavior. This test-only change checks the sparse queue directly. **What is in it** - `crates/xcl/tests/sparse_reinit.rs`: skip explicitly when no sparse queue was initialized; otherwise keep the existing sparse allocation and reinitialization assertions. **Tested** - Windows 11 Home build 26200, AMD Radeon RX 6800M (driver 30.0.13002.13003), Rust stable 1.99.0 MSVC, debug build. - `cargo +stable build --workspace --locked`: passed. - With `XCL_ADAPTER=RX 6800M` and `XCL_REQUIRE_GPU=wave64`, `cargo +stable test --locked -p xcl --test sparse_reinit -- --exact the_sparse_state_is_replaced_outside_its_lock --test-threads=4 --nocapture`: 1 passed, 0 failed, 0 ignored, 0 skipped; three sparse windows were created and re-created. - With WARP on Windows PowerShell 7, the same focused test exited 0 with 1 explicit `SKIPPED ...: no sparse GPU UMA`, 0 exercised, 0 failed, 0 ignored. - In a disposable coherent-only fault injection (restored before commit), the old guard panicked on `expect("a sparse block")` (0 passed, 1 failed); the new guard explicitly skipped (0 exercised, 1 skip, 0 failed). - `cargo test --workspace -- --test-threads=4` was attempted as `cargo +stable test --workspace --locked -- --test-threads=4` on the RX 6800M. It exited `0xc0000005` in the first library binary after 83 logged passes and 1 ignored, with no final library summary or later target results. A separate clean-main serial run reproduced an access violation at `raw_loads_in_root_windows_respect_exec_and_bounds`; the exact four-thread crashing test is unproven. - `git diff --check` passed; only the fixture file changed. **Not tested** - The full GPU suite could not complete because of the library access violation. No retail title, release build, or other physical GPU was tested. The change does not touch runtime code. **AI use** - OpenAI Codex (GPT-6.2 Sol) wrote the fixture change and ran focused GPU, WARP, and fault-injection tests. OpenAI Codex (GPT-6.2 Astra) reviewed the diff, ran the workspace build and GPU suite, and prepared this PR.
A coherent UMA window can exist without any sparse windows. The old guard used
the coherent GPU VA as a proxy for sparse initialization, so the fixture could
panic before checking its intended reinit behavior. Check the sparse queue.

RX 6800M positive fixture passed. Coherent-only fault injection made the old
guard panic and the corrected guard skip. WARP emitted an explicit skip.

Assisted-by: Codex (GPT-6.2 Sol)
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 11:14:53 +00:00
This pull request can be merged automatically.
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin '+refs/pull/2758/head:github-bot/gh-2758'
git switch 'github-bot/gh-2758'

Merge

Merge the changes and update on Forgejo.
git switch 'main'
git merge --no-ff 'github-bot/gh-2758'
git switch 'github-bot/gh-2758'
git rebase 'main'
git switch 'main'
git merge --ff-only 'github-bot/gh-2758'
git switch 'github-bot/gh-2758'
git rebase 'main'
git switch 'main'
git merge --no-ff 'github-bot/gh-2758'
git switch 'main'
git merge --squash 'github-bot/gh-2758'
git switch 'main'
git merge --ff-only 'github-bot/gh-2758'
git switch 'main'
git merge 'github-bot/gh-2758'
git push origin 'main'
This discussion has been locked. Commenting is limited to contributors.
No description provided.