tests: fail when a configured shader sample cannot be read #137

Manually merged
github merged 1 commit from gh-pr/137/head into gh-pr/137/base 2026-11-26 04:12:03 +00:00
Owner

@⁠Nik3310 on GitHub · 2026-11-23 14:48 UTC · original
Nik3310:fix/sample-rpf-read-errors → main · +48 −1 · 1 files · 1 commits · merged 2026-11-23 20:51 UTC

When XCL_SAMPLE_RPF is set to a missing or unreadable path, gpu_pso_e2e::setup currently discards the read error and reports "XCL_SAMPLE_RPF not set – skipping", so the retail pipeline tests appear to pass. Keep skipping when the variable is absent, but fail with the configured path and the I/O error when reading an explicitly supplied sample fails. Read the variable with var_os so a native path is not mistaken for an unset variable.

Adds a regression test that launches one existing retail pipeline test in separate processes with the variable unset, pointing at a missing file, and pointing at a directory. This exercises the actual setup path without shared environment mutations or OnceLock reuse and needs no GPU, DXC, or game data.

Validation

  • Added the regression test first on upstream 484dd5799077a5297e58027f4a67a2c5e1c6b14b: it failed because the configured missing file returned success with the misleading skip message.
  • After the fix: cargo test --locked --offline --release -p xcl --test gpu_pso_e2e sample_pack_read_errors_fail_instead_of_skipping -- --exact --nocapture passes.
  • cargo build --locked --offline --release --workspace succeeds.
  • cargo test --locked --offline --release --workspace --no-fail-fast -- --test-threads=4: 561 passed, 0 failed, 39 ignored, including 2 explicit native-wave64 skips and tests that return early without external samples. All XCL_SAMPLE_* variables were unset for the full run; no retail pack was tested.
  • git diff --check passes.

Windows 11 Pro build 26200, RTX 4060 driver 617.42, Rust 1.93.1 MSVC, SDK DXC 1.8.2502.11.

Related to the test-reporting discussion in #42. AI-assisted implementation and validation.

**@⁠Nik3310** on GitHub · 2026-11-23 14:48 UTC · [original](https://github.com/xcl-dev/xcl/pull/137) `Nik3310:fix/sample-rpf-read-errors` → `main` · +48 −1 · 1 files · 1 commits · merged 2026-11-23 20:51 UTC When `XCL_SAMPLE_RPF` is set to a missing or unreadable path, `gpu_pso_e2e::setup` currently discards the read error and reports "XCL_SAMPLE_RPF not set – skipping", so the retail pipeline tests appear to pass. Keep skipping when the variable is absent, but fail with the configured path and the I/O error when reading an explicitly supplied sample fails. Read the variable with `var_os` so a native path is not mistaken for an unset variable. Adds a regression test that launches one existing retail pipeline test in separate processes with the variable unset, pointing at a missing file, and pointing at a directory. This exercises the actual setup path without shared environment mutations or `OnceLock` reuse and needs no GPU, DXC, or game data. ### Validation - Added the regression test first on upstream `484dd5799077a5297e58027f4a67a2c5e1c6b14b`: it failed because the configured missing file returned success with the misleading skip message. - After the fix: `cargo test --locked --offline --release -p xcl --test gpu_pso_e2e sample_pack_read_errors_fail_instead_of_skipping -- --exact --nocapture` passes. - `cargo build --locked --offline --release --workspace` succeeds. - `cargo test --locked --offline --release --workspace --no-fail-fast -- --test-threads=4`: **561 passed, 0 failed, 39 ignored**, including 2 explicit native-wave64 skips and tests that return early without external samples. All `XCL_SAMPLE_*` variables were unset for the full run; no retail pack was tested. - `git diff --check` passes. Windows 11 Pro build 26200, RTX 4060 driver 617.42, Rust 1.93.1 MSVC, SDK DXC 1.8.2502.11. Related to the test-reporting discussion in #42. AI-assisted implementation and validation.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 04:12:01 +00:00
github manually merged commit 0511fedd56 into gh-pr/137/base 2026-11-26 04:12:03 +00:00
Author
Owner

@⁠ivall on GitHub · 2026-11-23 20:52 UTC · original

Merged (main 2abc562) in place of #140 (same goal, smaller change). Checked on an RX 9070 (RDNA4) with the 11 PRs merged together on main 38b05b7: cargo build --workspace && cargo test --workspace -- --test-threads=4 - 547 unit tests passed, 0 failed (19 ignored); the integration and e2e tests passed too.

**@⁠ivall** on GitHub · 2026-11-23 20:52 UTC · [original](https://github.com/xcl-dev/xcl/pull/137#issuecomment-7113682213) Merged (main 2abc562) in place of #140 (same goal, smaller change). Checked on an RX 9070 (RDNA4) with the 11 PRs merged together on main 38b05b7: `cargo build --workspace && cargo test --workspace -- --test-threads=4` - 547 unit tests passed, 0 failed (19 ignored); the integration and e2e tests passed too.
This discussion has been locked. Commenting is limited to contributors.
No description provided.