tests: when the test title does not finish, print the exit code and the log tail #507

Closed
Luislariosss wants to merge 2 commits from upstream-pr/512 into main
Luislariosss commented 2026-11-24 01:07:49 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by Luislariosss on 2026-11-24T01:07:49Z.


Follow-up to #500.

The assertion in the debug-layer end-to-end test only printed the launcher's opening lines:

the test title did not run to the end:
XCL 0.1.0 – starting 'XCL.TestTitle'
  ...
  console: imports kernelx.dll, xgameruntime.dll

with no exit code and no log, so a failure could not be told apart from a refusal, a crash, or a title that never started. I hit that once on this machine (it did not reproduce in five later runs, see #500) and could not diagnose it.

Change

Test-only, one file:

  • the log is read before the assertion and with unwrap_or_default(), so a missing log no longer panics on its own and hides why the title stopped;
  • the failure now carries the process exit code, the launcher's stdout and stderr, and the last 40 lines of xcl.log;
  • the "debug layer did not come up" assertion prints the same tail.

A forced failure shows what it looks like now:

the test title did not run to the end (exit Some(0)):
--- xcl stdout ---
...
--- xcl stderr ---
--- xcl.log, last 40 lines ---
xcl: D3D12: debug layer enabled
xcl: D3D12 debug layer (error, id 93): ID3D12Device::CreatePixelShader: Pixel Shader is corrupt or in an unrecognized format.
xcl: D3D12 debug layer (error, id 93): ID3D12Device::CreatePixelShader: Shader is corrupt or in an unrecognized format.
...

That last part is worth a second look on its own: the debug layer is reporting a corrupt pixel shader in this test, which the old message hid completely.

Testing

  • cargo test -p xcl --test e2e test_title_draws_with_a_root_signature_under_the_debug_layer: ok, 1 passed.
  • The message above comes from inverting the assertion for one run, then reverting it.

AI-assisted.

<!-- greyfinch-sync:ivall/xcl:issue:5464122034 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/512). Originally posted by [Luislariosss](https://github.com/Luislariosss) on 2026-11-24T01:07:49Z. --- Follow-up to #500. The assertion in the debug-layer end-to-end test only printed the launcher's opening lines: ``` the test title did not run to the end: XCL 0.1.0 – starting 'XCL.TestTitle' ... console: imports kernelx.dll, xgameruntime.dll ``` with no exit code and no log, so a failure could not be told apart from a refusal, a crash, or a title that never started. I hit that once on this machine (it did not reproduce in five later runs, see #500) and could not diagnose it. ## Change Test-only, one file: - the log is read before the assertion and with `unwrap_or_default()`, so a missing log no longer panics on its own and hides why the title stopped; - the failure now carries the process exit code, the launcher's stdout **and** stderr, and the last 40 lines of `xcl.log`; - the "debug layer did not come up" assertion prints the same tail. A forced failure shows what it looks like now: ``` the test title did not run to the end (exit Some(0)): --- xcl stdout --- ... --- xcl stderr --- --- xcl.log, last 40 lines --- xcl: D3D12: debug layer enabled xcl: D3D12 debug layer (error, id 93): ID3D12Device::CreatePixelShader: Pixel Shader is corrupt or in an unrecognized format. xcl: D3D12 debug layer (error, id 93): ID3D12Device::CreatePixelShader: Shader is corrupt or in an unrecognized format. ... ``` That last part is worth a second look on its own: the debug layer is reporting a corrupt pixel shader in this test, which the old message hid completely. ## Testing - `cargo test -p xcl --test e2e test_title_draws_with_a_root_signature_under_the_debug_layer`: ok, 1 passed. - The message above comes from inverting the assertion for one run, then reverting it. AI-assisted.
Luislariosss commented 2026-11-24 07:05:10 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by Luislariosss on 2026-11-24T01:08:32Z.


About the debug-layer errors I quoted: I chased them and they are not a bug, so nobody should follow me there.

The log shows what happens, in order:

[SHADER] ps 8a5d1b6c5b50f11e: 56 B, format container-unknown, parts [XBOX] D3D12 debug layer (error, id 93): ID3D12Device::CreatePixelShader: Pixel Shader is corrupt or in an unrecognized format. D3D12.X: graphics PSO rejected by the driver (0x80004005) - fallback shaders used (#1)

The test title ships a 56-byte synthetic console container, the driver refuses it, and the layer falls back to its own shaders and carries on - which is the point of that fixture. So those three messages are the expected output of a deliberate refusal, not a defect, and the test passing is correct.

What PR #512 is worth is only the diagnosis: the failure message now contains those lines instead of hiding them, which is what was missing when #500 failed once without a reason. I have edited the paragraph about it above rather than leave a false lead in the description.

AI-assisted.

<!-- greyfinch-sync:ivall/xcl:comment:7118797490 --> Imported from [ivall/xcl](https://github.com/ivall/xcl/pull/512#issuecomment-7118797490). Originally posted by [Luislariosss](https://github.com/Luislariosss) on 2026-11-24T01:08:32Z. --- About the debug-layer errors I quoted: I chased them and they are not a bug, so nobody should follow me there. The log shows what happens, in order: ` [SHADER] ps 8a5d1b6c5b50f11e: 56 B, format container-unknown, parts [XBOX] D3D12 debug layer (error, id 93): ID3D12Device::CreatePixelShader: Pixel Shader is corrupt or in an unrecognized format. D3D12.X: graphics PSO rejected by the driver (0x80004005) - fallback shaders used (#1) ` The test title ships a 56-byte synthetic console container, the driver refuses it, and the layer falls back to its own shaders and carries on - which is the point of that fixture. So those three messages are the expected output of a deliberate refusal, not a defect, and the test passing is correct. What PR #512 is worth is only the diagnosis: the failure message now contains those lines instead of hiding them, which is what was missing when #500 failed once without a reason. I have edited the paragraph about it above rather than leave a false lead in the description. AI-assisted.
H0UNDZER0 commented 2026-11-24 07:05:38 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by H0UNDZER0 on 2026-11-24T02:40:41Z.


Tested on an RTX 5080, release build: pass, 677 passed, 0 failed.

  • Commit a01193bbb8141f542be6a0f0c7f135b5bab3c55b, this PR's head as is (on its base 2997c9a; it includes #502's commit), release build.
  • NVIDIA GeForce RTX 5080 16 GB, driver 621.24 (32.0.16.2124), 32-lane waves; Ryzen 7 9700X; Windows 11 Pro 24H2 (26100.9711); Rust 1.100.0 MSVC; DXC 1.9.2602.17 (Windows SDK 10.0.26100.0); D3D12 debug layer installed. No XCL_* variables set.
  • cargo build --release --workspace --locked: OK, the same single fetch_update warning as main.
  • cargo test --workspace --release --no-fail-fast --locked -- --test-threads=4, run twice (the second with --show-output): 677 passed, 0 failed, 41 ignored both times. main 2997c9a gives 676 / 0 / 41 on this PC: the difference is the new a_failed_commit_leaves_the_page_lazy, which passes.
  • SKIPPED: the usual 2, gpu_geometry_wave32_prefix_count_over_a_mask and gpu_wave32_program_in_wave64_hardware (no wave64).
  • Both test-title tests in e2e pass, test_title_draws_with_a_root_signature_under_the_debug_layer included, so the new failure messages had nothing to print here.

Not tested

  • The new messages themselves: they print only when the test title does not finish.
  • This PR merged onto a newer main. At the time of the run that was 9ce2070; git merge-tree showed no conflict.
  • Debug build, retail titles, scripts/smoke.ps1.

AI use: Claude Code (Claude Opus 5.5, Claude Fable 5.2)

<!-- greyfinch-sync:ivall/xcl:comment:7120376402 --> Imported from [ivall/xcl](https://github.com/ivall/xcl/pull/512#issuecomment-7120376402). Originally posted by [H0UNDZER0](https://github.com/H0UNDZER0) on 2026-11-24T02:40:41Z. --- **Tested** on an RTX 5080, release build: **pass**, 677 passed, 0 failed. - Commit `a01193bbb8141f542be6a0f0c7f135b5bab3c55b`, this PR's head as is (on its base `2997c9a`; it includes #502's commit), release build. - NVIDIA GeForce RTX 5080 16 GB, driver 621.24 (32.0.16.2124), 32-lane waves; Ryzen 7 9700X; Windows 11 Pro 24H2 (26100.9711); Rust 1.100.0 MSVC; DXC 1.9.2602.17 (Windows SDK 10.0.26100.0); D3D12 debug layer installed. No `XCL_*` variables set. - `cargo build --release --workspace --locked`: OK, the same single `fetch_update` warning as `main`. - `cargo test --workspace --release --no-fail-fast --locked -- --test-threads=4`, run twice (the second with `--show-output`): **677 passed, 0 failed, 41 ignored** both times. `main` `2997c9a` gives 676 / 0 / 41 on this PC: the difference is the new `a_failed_commit_leaves_the_page_lazy`, which passes. - `SKIPPED`: the usual 2, `gpu_geometry_wave32_prefix_count_over_a_mask` and `gpu_wave32_program_in_wave64_hardware` (no wave64). - Both test-title tests in `e2e` pass, `test_title_draws_with_a_root_signature_under_the_debug_layer` included, so the new failure messages had nothing to print here. **Not tested** - The new messages themselves: they print only when the test title does not finish. - This PR merged onto a newer `main`. At the time of the run that was `9ce2070`; `git merge-tree` showed no conflict. - Debug build, retail titles, `scripts/smoke.ps1`. **AI use:** Claude Code (Claude Opus 5.5, Claude Fable 5.2)
MesshM commented 2026-11-24 07:06:12 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by MesshM on 2026-11-24T04:21:25Z.


Test run of a01193bbb8141f542be6a0f0c7f135b5bab3c55b on AMD RDNA4. I merged it onto current main f4ce27c locally (clean merge) and tested that tree.

Tested

  • AMD Radeon RX 9060 XT 16 GB (RDNA4), driver 32.0.32029.2010; Ryzen 7 5700X, 64 GB RAM, Windows 11 Pro build 26200, Rust 1.100.0 stable-x86_64-pc-windows-msvc, debug
  • cargo build --workspace + cargo test --workspace -- --test-threads=4 on the merge: 702 passed, 0 failed, 41 ignored, exit code 0; xcl lib tests 661 passed, 0 failed, 21 ignored
  • 0 SKIPPED; a_failed_commit_leaves_the_page_lazy and the other lazy tests pass, as does the e2e test.

Review: The title says this is about the e2e test's failure output, but the PR also changes kernelx/lazy.rs so a failed MEM_COMMIT leaves the page in the lazy set, which is a runtime change and what #487 does for #467. CONTRIBUTING asks for one change per PR and a regression run for runtime changes; splitting the lazy.rs part out (or leaving it to #487) would let the test-output part land as a test-only change. The lazy.rs change itself looks right: the page is only removed from the set once the commit succeeded.

Not tested: no retail title or regression run (I have no unpacked game), no XCL_SAMPLE_* tests, release build; the PR's head on its old base was not run, only its merge onto main.

Run and review by Claude Code (Claude Opus 5.5) on this machine; the review points were checked against the code.

<!-- greyfinch-sync:ivall/xcl:comment:7121942929 --> Imported from [ivall/xcl](https://github.com/ivall/xcl/pull/512#issuecomment-7121942929). Originally posted by [MesshM](https://github.com/MesshM) on 2026-11-24T04:21:25Z. --- Test run of `a01193bbb8141f542be6a0f0c7f135b5bab3c55b` on AMD RDNA4. I merged it onto current `main` `f4ce27c` locally (clean merge) and tested that tree. **Tested** - AMD Radeon RX 9060 XT 16 GB (RDNA4), driver 32.0.32029.2010; Ryzen 7 5700X, 64 GB RAM, Windows 11 Pro build 26200, Rust 1.100.0 `stable-x86_64-pc-windows-msvc`, debug - `cargo build --workspace` + `cargo test --workspace -- --test-threads=4` on the merge: **702 passed, 0 failed, 41 ignored**, exit code 0; `xcl` lib tests 661 passed, 0 failed, 21 ignored - **0 `SKIPPED`**; `a_failed_commit_leaves_the_page_lazy` and the other `lazy` tests pass, as does the e2e test. **Review:** The title says this is about the e2e test's failure output, but the PR also changes `kernelx/lazy.rs` so a failed `MEM_COMMIT` leaves the page in the lazy set, which is a runtime change and what #487 does for #467. CONTRIBUTING asks for one change per PR and a regression run for runtime changes; splitting the `lazy.rs` part out (or leaving it to #487) would let the test-output part land as a test-only change. The `lazy.rs` change itself looks right: the page is only removed from the set once the commit succeeded. **Not tested:** no retail title or regression run (I have no unpacked game), no `XCL_SAMPLE_*` tests, release build; the PR's head on its old base was not run, only its merge onto `main`. Run and review by Claude Code (Claude Opus 5.5) on this machine; the review points were checked against the code.
upstream-sync closed this pull request 2026-11-24 11:04:48 +00:00
raylitebull commented 2026-11-24 11:05:56 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by raylitebull on 2026-11-24T10:43:40Z.


Closing because it fails the required PR description check (missing required template / AI-use sections per CONTRIBUTING.md). Feel free to reopen once updated to match the template.

<!-- greyfinch-sync:ivall/xcl:comment:7129163803 --> Imported from [ivall/xcl](https://github.com/ivall/xcl/pull/512#issuecomment-7129163803). Originally posted by [raylitebull](https://github.com/raylitebull) on 2026-11-24T10:43:40Z. --- Closing because it fails the required `PR description` check (missing required template / AI-use sections per `CONTRIBUTING.md`). Feel free to reopen once updated to match the template.
Luislariosss commented 2026-11-26 21:43:20 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by Luislariosss on 2026-11-26T21:43:20Z.


Superseded by #2890: rebased onto main (main's own exit-code check kept, with the log tail added to the failure paths), the #502 commit dropped so this is test-only, and the description now follows the template. The branch was force-pushed for the rebase, so GitHub cannot reopen this PR.

<!-- greyfinch-sync:ivall/xcl:comment:7203997203 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/512#issuecomment-7203997203). Originally posted by [Luislariosss](https://github.com/Luislariosss) on 2026-11-26T21:43:20Z. --- Superseded by #2890: rebased onto main (main's own exit-code check kept, with the log tail added to the failure paths), the #502 commit dropped so this is test-only, and the description now follows the template. The branch was force-pushed for the rebase, so GitHub cannot reopen this PR.

Pull request closed

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!507
No description provided.