Scripts: cover test runner failures and missing Cargo #296

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

@⁠svds12343 on GitHub · 2026-11-23 22:36 UTC · original
svds12343:contrib/test-runner-failure-cases → main · +60 −14 · 1 files · 1 commits · open

The runner's regression test covered successful stderr output, but failure codes and missing Cargo were checked only manually in #185. Add permanent cases to catch failures being reported as success.

Complements #279, which adds CI execution of this script.

What is in it

  • scripts/test-native-stderr.tests.ps1: run each case in a fresh instance of the same PowerShell. Check success, build exit 17 without starting tests, test exit 101, and missing Cargo exit 1 with a diagnostic.
  • Preserve redirected stderr and skip-summary checks; return 0 only after all assertions pass so expected child failures do not fail the CI shell wrapper.

Tested

  • Windows 11 build 26200, i7-12700K, RTX 3070 (driver 32.0.16.1088), Rust 1.100.0 MSVC, DXC 1.9.2602.17, debug. Tested working-tree patch committed unchanged as 29e66d46e5a2869901d9b65f3f26427b07673111.
  • powershell.exe / pwsh.exe -NoProfile -File scripts/test-native-stderr.tests.ps1: all four cases pass under PowerShell 5.1.26100.9444 and 7.6.9. Both also pass with the CI-style caller & <script>; exit $LASTEXITCODE.
  • Five deliberately broken runner copies rejected: original stderr regression on 5.1; swallowed build/test failures, tests after failed build, and removed Cargo preflight on both shells (nine expected failures).
  • scripts/test.ps1 (cargo build --workspace, cargo test --workspace -- --test-threads=4): 651 passed, 0 failed, 40 ignored.
  • GPU SKIPPED: gpu_geometry_wave32_prefix_count_over_a_mask, gpu_wave32_program_in_wave64_hardware (no native wave64).
  • git diff --check: clean.

Regression run

  • Not required: only a script test changes.

Not tested

  • Release builds, AMD/Intel GPUs, retail games. All XCL_SAMPLE_* variables are unset; their early returns and the GPU skips remain included in libtest's passed count.

AI use

  • Codex (GPT-6; exact model variant unavailable) wrote the change and description, reviewed the diff, and ran validation on this PC.
**@⁠svds12343** on GitHub · 2026-11-23 22:36 UTC · [original](https://github.com/xcl-dev/xcl/pull/296) `svds12343:contrib/test-runner-failure-cases` → `main` · +60 −14 · 1 files · 1 commits · open The runner's regression test covered successful stderr output, but failure codes and missing Cargo were checked only manually in #185. Add permanent cases to catch failures being reported as success. Complements #279, which adds CI execution of this script. **What is in it** - `scripts/test-native-stderr.tests.ps1`: run each case in a fresh instance of the same PowerShell. Check success, build exit 17 without starting tests, test exit 101, and missing Cargo exit 1 with a diagnostic. - Preserve redirected stderr and skip-summary checks; return 0 only after all assertions pass so expected child failures do not fail the CI shell wrapper. **Tested** - Windows 11 build 26200, i7-12700K, RTX 3070 (driver 32.0.16.1088), Rust 1.100.0 MSVC, DXC 1.9.2602.17, debug. Tested working-tree patch committed unchanged as `29e66d46e5a2869901d9b65f3f26427b07673111`. - `powershell.exe` / `pwsh.exe -NoProfile -File scripts/test-native-stderr.tests.ps1`: all four cases pass under PowerShell 5.1.26100.9444 and 7.6.9. Both also pass with the CI-style caller `& <script>; exit $LASTEXITCODE`. - Five deliberately broken runner copies rejected: original stderr regression on 5.1; swallowed build/test failures, tests after failed build, and removed Cargo preflight on both shells (nine expected failures). - `scripts/test.ps1` (`cargo build --workspace`, `cargo test --workspace -- --test-threads=4`): 651 passed, 0 failed, 40 ignored. - GPU SKIPPED: `gpu_geometry_wave32_prefix_count_over_a_mask`, `gpu_wave32_program_in_wave64_hardware` (no native wave64). - `git diff --check`: clean. **Regression run** - Not required: only a script test changes. **Not tested** - Release builds, AMD/Intel GPUs, retail games. All `XCL_SAMPLE_*` variables are unset; their early returns and the GPU skips remain included in libtest's passed count. **AI use** - Codex (GPT-6; exact model variant unavailable) wrote the change and description, reviewed the diff, and ran validation on this PC.
Preserve the manually checked build/test exit codes and missing-Cargo behavior as subprocess regression cases. Verify the Cargo phase sequence and keep the native stderr regression covered in both PowerShell generations.

Assisted-by: Codex (GPT-6; exact model variant unavailable)
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 04:19:13 +00:00
Author
Owner

@⁠requiemsnkrp on GitHub · 2026-11-23 23:15 UTC · original

Tested 29e66d4 on NVIDIA GeForce RTX 3060 12 GB (driver 32.0.16.1714 / 617.14, 32-lane waves), Ryzen 5 5600X, Windows 11 Pro 25H2 (26200.9974), Rust 1.100.0 (stable-x86_64-pc-windows-msvc), DXC 1.9.2602.17 (Windows SDK), debug: pass.

Tested

  • powershell -NoProfile -NonInteractive -File scripts\test-native-stderr.tests.ps1 (Windows PowerShell 5.1.26100.9818): PASS: success, PASS: build failure, PASS: test failure, PASS: missing Cargo, exit 0. The same script from main 4017f8f: exit 0.
  • Mutation check: with the build exit-code line of a throwaway copy of scripts\test.ps1 removed, the script fails with build failure: expected exit 17, got 0. (exit 1).
  • cargo test --workspace -j 4 --no-fail-fast -- --test-threads=4 --skip test_title_runs_and_game_folder_is_untouched --skip test_title_draws_with_a_root_signature_under_the_debug_layer: 649 passed, 0 failed, 40 ignored
  • SKIPPED (no wave64): gpu_geometry_wave32_prefix_count_over_a_mask, gpu_wave32_program_in_wave64_hardware
  • main 4017f8f, same command: 650 passed, 0 failed, 40 ignored, same 2 SKIPPED (one test more on main since this PR's base 9ab7d76).
  • Tested the head itself; it merges cleanly into main 4017f8f (git merge-tree), the merge result was not tested.
  • Not run here: the two e2e tests that run the test title (test_title_runs_and_game_folder_is_untouched, test_title_draws_with_a_root_signature_under_the_debug_layer): they open the XCL game window and this PC was in use (the 2 "filtered out").

Not tested

  • PowerShell 7 (pwsh is not installed here).
  • Retail title regression run (not needed for a script change; no game copy here).

AI use: Claude Code with Claude Opus 5.5 (ran the tests and wrote this report).

**@⁠requiemsnkrp** on GitHub · 2026-11-23 23:15 UTC · [original](https://github.com/xcl-dev/xcl/pull/296#issuecomment-7116756797) Tested `29e66d4` on NVIDIA GeForce RTX 3060 12 GB (driver 32.0.16.1714 / 617.14, 32-lane waves), Ryzen 5 5600X, Windows 11 Pro 25H2 (26200.9974), Rust 1.100.0 (stable-x86_64-pc-windows-msvc), DXC 1.9.2602.17 (Windows SDK), debug: **pass**. **Tested** - `powershell -NoProfile -NonInteractive -File scripts\test-native-stderr.tests.ps1` (Windows PowerShell 5.1.26100.9818): `PASS: success`, `PASS: build failure`, `PASS: test failure`, `PASS: missing Cargo`, exit 0. The same script from `main` `4017f8f`: exit 0. - Mutation check: with the build exit-code line of a throwaway copy of `scripts\test.ps1` removed, the script fails with `build failure: expected exit 17, got 0.` (exit 1). - `cargo test --workspace -j 4 --no-fail-fast -- --test-threads=4 --skip test_title_runs_and_game_folder_is_untouched --skip test_title_draws_with_a_root_signature_under_the_debug_layer`: 649 passed, 0 failed, 40 ignored - `SKIPPED` (no wave64): `gpu_geometry_wave32_prefix_count_over_a_mask`, `gpu_wave32_program_in_wave64_hardware` - `main` `4017f8f`, same command: 650 passed, 0 failed, 40 ignored, same 2 SKIPPED (one test more on `main` since this PR's base `9ab7d76`). - Tested the head itself; it merges cleanly into `main` `4017f8f` (`git merge-tree`), the merge result was not tested. - Not run here: the two e2e tests that run the test title (`test_title_runs_and_game_folder_is_untouched`, `test_title_draws_with_a_root_signature_under_the_debug_layer`): they open the XCL game window and this PC was in use (the 2 "filtered out"). **Not tested** - PowerShell 7 (`pwsh` is not installed here). - Retail title regression run (not needed for a script change; no game copy here). **AI use**: Claude Code with Claude Opus 5.5 (ran the tests and wrote this report).
Author
Owner

@⁠anes66 on GitHub · 2026-11-24 03:59 UTC · original

Verified 29e66d46e5a2869901d9b65f3f26427b07673111 on Windows 10 Pro (build 19045), Ryzen 7 9800X3D.

Tested

  • Windows PowerShell 5.1.19041.7844:
    powershell.exe -NoProfile -NonInteractive -ExecutionPolicy Bypass -File scripts/test-native-stderr.tests.ps1
  • PowerShell 7.6.9:
    pwsh.exe -NoProfile -NonInteractive -File scripts/test-native-stderr.tests.ps1
  • All four cases passed in both shells: success, build failure, test failure and missing Cargo. Both runs exited 0.
  • This PR's scripts/test.ps1 matches main f4ce27ceb6d1b0576d0c659b713b674778bf1968.

PowerShell 5.1 initially blocked the unsigned script. The process-only override above allowed it to run; no persistent execution-policy setting was changed.

Not tested
Rust workspace, GPU tests, retail titles, GitHub Actions or mutation checks. These runs used the synthetic cargo.cmd fixture, not an actual Cargo build.

AI use
Codex (GPT-6; exact variant unavailable) inspected the changes, ran validation and drafted this report.

**@⁠anes66** on GitHub · 2026-11-24 03:59 UTC · [original](https://github.com/xcl-dev/xcl/pull/296#issuecomment-7121600154) Verified `29e66d46e5a2869901d9b65f3f26427b07673111` on Windows 10 Pro (build 19045), Ryzen 7 9800X3D. **Tested** - Windows PowerShell 5.1.19041.7844: `powershell.exe -NoProfile -NonInteractive -ExecutionPolicy Bypass -File scripts/test-native-stderr.tests.ps1` - PowerShell 7.6.9: `pwsh.exe -NoProfile -NonInteractive -File scripts/test-native-stderr.tests.ps1` - All four cases passed in both shells: success, build failure, test failure and missing Cargo. Both runs exited 0. - This PR's `scripts/test.ps1` matches main `f4ce27ceb6d1b0576d0c659b713b674778bf1968`. PowerShell 5.1 initially blocked the unsigned script. The process-only override above allowed it to run; no persistent execution-policy setting was changed. **Not tested** Rust workspace, GPU tests, retail titles, GitHub Actions or mutation checks. These runs used the synthetic `cargo.cmd` fixture, not an actual Cargo build. **AI use** Codex (GPT-6; exact variant unavailable) inspected the changes, ran validation and drafted this report.
Author
Owner

@⁠DavidM1911 on GitHub · 2026-11-25 14:43 UTC · original

Verification on RTX 3060 Ti (Windows 11), branch merged with current main:

  • cargo test -p xcl --lib: all passed, 0 failed, ~26 ignored. (Intermittent single-test flake / 0xc0000005 abort under parallel scheduling — tracked in #1978; clean on single-threaded rerun.)

Thanks!

**@⁠DavidM1911** on GitHub · 2026-11-25 14:43 UTC · [original](https://github.com/xcl-dev/xcl/pull/296#issuecomment-7165720606) Verification on RTX 3060 Ti (Windows 11), branch merged with current `main`: - `cargo test -p xcl --lib`: all passed, 0 failed, ~26 ignored. (Intermittent single-test flake / 0xc0000005 abort under parallel scheduling — tracked in #1978; clean on single-threaded rerun.) Thanks!
Author
Owner

@⁠RavenCurseBurg on GitHub · 2026-11-26 02:06 UTC · original · edited 2026-11-26 02:17 UTC

Tested 29e66d46e5a2869901d9b65f3f26427b07673111 using the four existing fake-Cargo cases under Windows PowerShell 5.1 and PowerShell 7.6.9. I varied the checkout and TEMP directories independently, using spaces in every path and literal square brackets in neither, either or both.

With the original fixture and runner, the two ordinary-path runs passed. The other six shell/path combinations stopped in the success control. A bracketed checkout failed at Set-Location; a bracketed TEMP path left the fixture's Cargo call log empty. Substituting main's runner from b49be1836844 gave the same six failures.

Candidate fix and regression case: all 32 checks passed (4 Cargo cases × 4 path combinations × 2 shells). Success, build exit 17, test exit 101 and missing Cargo exit 1 all retained the expected invocation sequence; no fixture directories remained. On main's runner, the revised success control also failed in both shells before the one-line literal-directory change and all four controls passed in each shell after it.

Commands: powershell.exe and pwsh.exe -NoProfile -NonInteractive -ExecutionPolicy RemoteSigned -File scripts/test-native-stderr.tests.ps1 in each directory layout. Windows build 26100, i7-13700. OpenAI Codex (GPT-6) prepared the patch and ran the checks. Only the Cargo stand-in was used; no Rust build, GPU or title run.

**@⁠RavenCurseBurg** on GitHub · 2026-11-26 02:06 UTC · [original](https://github.com/xcl-dev/xcl/pull/296#issuecomment-7180464924) · edited 2026-11-26 02:17 UTC Tested `29e66d46e5a2869901d9b65f3f26427b07673111` using the four existing fake-Cargo cases under Windows PowerShell 5.1 and PowerShell 7.6.9. I varied the checkout and TEMP directories independently, using spaces in every path and literal square brackets in neither, either or both. With the original fixture and runner, the two ordinary-path runs passed. The other six shell/path combinations stopped in the success control. A bracketed checkout failed at `Set-Location`; a bracketed TEMP path left the fixture's Cargo call log empty. Substituting main's runner from `b49be1836844` gave the same six failures. [Candidate fix and regression case](https://github.com/RavenCurseBurg/xcl/commit/3912e2d4e18e3b778d1ea62e2344cd169dfb1cd6): all 32 checks passed (4 Cargo cases × 4 path combinations × 2 shells). Success, build exit 17, test exit 101 and missing Cargo exit 1 all retained the expected invocation sequence; no fixture directories remained. On main's runner, the revised success control also failed in both shells before the one-line literal-directory change and all four controls passed in each shell after it. Commands: `powershell.exe` and `pwsh.exe -NoProfile -NonInteractive -ExecutionPolicy RemoteSigned -File scripts/test-native-stderr.tests.ps1` in each directory layout. Windows build 26100, i7-13700. OpenAI Codex (GPT-6) prepared the patch and ran the checks. Only the Cargo stand-in was used; no Rust build, GPU or title run.
This pull request can be merged automatically.
This branch is out-of-date with the base branch
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/296/head:github-bot/gh-296'
git switch 'github-bot/gh-296'

Merge

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