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

Merged
Nik3310 merged 1 commit from upstream-pr/137 into main 2026-11-23 20:51:52 +00:00
Nik3310 commented 2026-11-23 14:48:53 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by Nik3310 on 2026-11-23T14:48:53Z.


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.

<!-- greyfinch-sync:ivall/xcl:issue:6561929765 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/137). Originally posted by [Nik3310](https://github.com/Nik3310) on 2026-11-23T14:48:53Z. --- 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.
upstream-sync closed this pull request 2026-11-24 06:57:20 +00:00
ivall commented 2026-11-24 07:04:17 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by ivall on 2026-11-23T20:52:38Z.


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.

<!-- greyfinch-sync:ivall/xcl:comment:7113682213 --> Imported from [ivall/xcl](https://github.com/ivall/xcl/pull/137#issuecomment-7113682213). Originally posted by [ivall](https://github.com/ivall) on 2026-11-23T20:52:38Z. --- 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.
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
xcl-dev/xcl!135
No description provided.