Tests: when the test title does not finish, print why #2890

Merged
Luislariosss merged 1 commit from upstream-pr/2890 into main 2026-12-02 17:38:38 +00:00
Luislariosss commented 2026-11-26 21:43:11 +00:00 (Migrated from github.com)

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


Follow-up to #500. Supersedes #512: the branch was force-pushed after that PR was closed, so GitHub cannot reopen it; this is the same change, rebased and updated to the template.

The end-to-end debug-layer test only printed the launcher's opening lines when the test title did not run to the end:

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.

What is in it

  • crates/xcl/tests/e2e.rs: the "did not run to the end" and "debug layer did not come up" assertions now print the process exit code, the launcher's stdout and stderr, and the last 40 lines of xcl.log; the log is read with unwrap_or_default(), so a missing log no longer panics on its own and hides why the title stopped. Rebased onto current main, which added an exit-code check of its own: both are kept, with the log tail on the failure paths.
  • The kernelx commit this branch carried earlier is gone: it is #502's, and this PR is test-only now.

Tested

  • AMD Radeon RX 9060 XT 16 GB (RDNA4), Windows driver 32.0.32029.2010; Ryzen 5 9600X; Windows 11 build 26200; Rust 1.99.0 stable-x86_64-pc-windows-msvc; debug build.
  • cargo build --workspace: ok.
  • cargo test -p xcl --test e2e (the two debug-layer tests): ok, 2 passed, 0 failed.
  • cargo test --workspace --no-fail-fast -- --test-threads=4: 1316 passed, 2 failed, 27 ignored. The 2 failures are gpu::dxil::fuzz_tests::fuzz_validate_and_gpu_1 and fuzz_validate_and_gpu_3 (a CPU/GPU result mismatch in the DXIL fuzzer): pre-existing on main on this adapter (checked out 8b957be and reran them: same two failures; tracked upstream in #2115) and untouched by this PR.

Not tested

  • NVIDIA and Intel GPUs; the retail title (this change touches only a test's failure message).

AI use

  • Claude Code (Claude Sonnet 5.5) reworked the test after the rebase, ran the commands above on the hardware named, and drafted this description.
<!-- greyfinch-sync:ivall/xcl:issue:5517540198 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2890). Originally posted by [Luislariosss](https://github.com/Luislariosss) on 2026-11-26T21:43:11Z. --- Follow-up to #500. Supersedes #512: the branch was force-pushed after that PR was closed, so GitHub cannot reopen it; this is the same change, rebased and updated to the template. The end-to-end debug-layer test only printed the launcher's opening lines when the test title did not run to the end: ``` 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. **What is in it** - `crates/xcl/tests/e2e.rs`: the "did not run to the end" and "debug layer did not come up" assertions now print the process exit code, the launcher's stdout and stderr, and the last 40 lines of `xcl.log`; the log is read with `unwrap_or_default()`, so a missing log no longer panics on its own and hides why the title stopped. Rebased onto current main, which added an exit-code check of its own: both are kept, with the log tail on the failure paths. - The kernelx commit this branch carried earlier is gone: it is #502's, and this PR is test-only now. **Tested** - AMD Radeon RX 9060 XT 16 GB (RDNA4), Windows driver 32.0.32029.2010; Ryzen 5 9600X; Windows 11 build 26200; Rust 1.99.0 `stable-x86_64-pc-windows-msvc`; debug build. - `cargo build --workspace`: ok. - `cargo test -p xcl --test e2e` (the two debug-layer tests): ok, 2 passed, 0 failed. - `cargo test --workspace --no-fail-fast -- --test-threads=4`: 1316 passed, 2 failed, 27 ignored. The 2 failures are `gpu::dxil::fuzz_tests::fuzz_validate_and_gpu_1` and `fuzz_validate_and_gpu_3` (a CPU/GPU result mismatch in the DXIL fuzzer): pre-existing on main on this adapter (checked out `8b957be` and reran them: same two failures; tracked upstream in #2115) and untouched by this PR. **Not tested** - NVIDIA and Intel GPUs; the retail title (this change touches only a test's failure message). **AI use** - Claude Code (Claude Sonnet 5.5) reworked the test after the rebase, ran the commands above on the hardware named, and drafted this description.
fromthemoonx commented 2026-11-26 22:07:29 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by fromthemoonx on 2026-11-26T22:07:29Z.


NVIDIA run (listed under Not tested): passes, and the new message shows up on a real failure here.

Tested: c6c14a1 (its base is current main 8b957be, so head = merged). RTX 3060 12 GB (driver 610.88), Ryzen 7 5700X, Windows 11 Pro 26300, Rust 1.100.0 MSVC, debug, Graphics Tools (D3D12 debug layer) installed.

result
cargo test --workspace --no-fail-fast -- --test-threads=4 1446 passed, 0 failed, 47 ignored; 25 SKIPPED lines (no wave64, refused per-lane forms); the 4 e2e tests pass
XCL_CONSOLE_LISTS=1 cargo test -p xcl --test e2e test_title_draws_with_a_root_signature_under_the_debug_layer (fails the same way on main: the title crashes in D3D12SDKLayers.dll+0x7f00c) fails at the exit-code assertion, which now ends with --- xcl.log, last 40 lines --- and the log's unhandled exception 0xc0000005 in D3D12SDKLayers.dll+0x7f00c (read at address 0x0) line

Two things from that run:

  • For a crash, main's message already names the cause: the exit-code assertion prints stdout, and stdout has the CRASH: unhandled exception … line. The tail adds the log's side. It helps most in the case from #500, a title that exits 0 without done, failures: 0.
  • On a crash, 33 of the 40 tail lines are the thread dump (one line per thread), so the exception line was 5th from the top. A title with a few more threads would push it out. Cutting the tail at thread dump ( or taking more lines would keep it in.

Small style point: const TAIL and fn tail sit between the use std::path and use std::process lines; after the use block they would read more naturally.

Not tested: Intel, a title that exits 0 without finishing (I could not trigger one here).

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

<!-- greyfinch-sync:ivall/xcl:comment:7204385107 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2890#issuecomment-7204385107). Originally posted by [fromthemoonx](https://github.com/fromthemoonx) on 2026-11-26T22:07:29Z. --- **NVIDIA run (listed under Not tested): passes, and the new message shows up on a real failure here.** **Tested:** `c6c14a1` (its base is current `main` `8b957be`, so head = merged). RTX 3060 12 GB (driver 610.88), Ryzen 7 5700X, Windows 11 Pro 26300, Rust 1.100.0 MSVC, debug, Graphics Tools (D3D12 debug layer) installed. | | result | |---|---| | `cargo test --workspace --no-fail-fast -- --test-threads=4` | 1446 passed, 0 failed, 47 ignored; 25 `SKIPPED` lines (`no wave64`, refused per-lane forms); the 4 `e2e` tests pass | | `XCL_CONSOLE_LISTS=1 cargo test -p xcl --test e2e test_title_draws_with_a_root_signature_under_the_debug_layer` (fails the same way on `main`: the title crashes in `D3D12SDKLayers.dll+0x7f00c`) | fails at the exit-code assertion, which now ends with `--- xcl.log, last 40 lines ---` and the log's `unhandled exception 0xc0000005 in D3D12SDKLayers.dll+0x7f00c (read at address 0x0)` line | Two things from that run: - For a crash, `main`'s message already names the cause: the exit-code assertion prints stdout, and stdout has the `CRASH: unhandled exception …` line. The tail adds the log's side. It helps most in the case from #500, a title that exits 0 without `done, failures: 0`. - On a crash, 33 of the 40 tail lines are the thread dump (one line per thread), so the exception line was 5th from the top. A title with a few more threads would push it out. Cutting the tail at `thread dump (` or taking more lines would keep it in. Small style point: `const TAIL` and `fn tail` sit between the `use std::path` and `use std::process` lines; after the `use` block they would read more naturally. **Not tested:** Intel, a title that exits 0 without finishing (I could not trigger one here). **AI use:** Claude Code (Claude Opus 5.5) ran the tests and wrote this report.
JJAutoCompare commented 2026-11-27 00:58:19 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by JJAutoCompare on 2026-11-27T00:58:19Z.


Tested

At clean c6c14a157cc683bd2b8c64d15f83c2eb2f3273b9, Windows 11 build 26200, Ryzen 7 3800X, Rust 1.100.0 MSVC debug. Built the checked-in e2e.rs with a synthetic launcher in an isolated harness using cargo test --manifest-path .\control\crates\xcl\Cargo.toml -j 2 --test e2e --no-run, then ran powershell.exe -NoProfile -ExecutionPolicy Bypass -File .\run-controls.ps1. Eight controls passed, with zero failures, ignores or skips. The two success controls passed libtest, and the six negative controls produced their expected failure diagnostics. Checked nonzero exit, missing completion marker, missing debug marker, stdout/stderr capture, exactly the last 40 lines when present, and an empty tail when the log was absent. A delayed child held the harness open during a 400 ms wait and the diagnostic printed after release. The harness has no child timeout at this SHA.

Running & $e2e debug_layer --nocapture --test-threads=1 with the real SystemRoot emitted two explicit skips for missing d3d12SDKLayers.dll. xgameruntime.dll was also absent.

Not tested

Real D3D12 or DRED execution, retail titles, and the full workspace suite.

AI use

T3 Code / Codex (gpt-6.2-sol for the worker run) built and ran the controls and drafted this report. Codex in the coordinator session reran the controls.

<!-- greyfinch-sync:ivall/xcl:comment:7206903246 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2890#issuecomment-7206903246). Originally posted by [JJAutoCompare](https://github.com/JJAutoCompare) on 2026-11-27T00:58:19Z. --- **Tested** At clean `c6c14a157cc683bd2b8c64d15f83c2eb2f3273b9`, Windows 11 build 26200, Ryzen 7 3800X, Rust 1.100.0 MSVC debug. Built the checked-in `e2e.rs` with a synthetic launcher in an isolated harness using `cargo test --manifest-path .\control\crates\xcl\Cargo.toml -j 2 --test e2e --no-run`, then ran `powershell.exe -NoProfile -ExecutionPolicy Bypass -File .\run-controls.ps1`. Eight controls passed, with zero failures, ignores or skips. The two success controls passed libtest, and the six negative controls produced their expected failure diagnostics. Checked nonzero exit, missing completion marker, missing debug marker, stdout/stderr capture, exactly the last 40 lines when present, and an empty tail when the log was absent. A delayed child held the harness open during a 400 ms wait and the diagnostic printed after release. The harness has no child timeout at this SHA. Running `& $e2e debug_layer --nocapture --test-threads=1` with the real SystemRoot emitted two explicit skips for missing `d3d12SDKLayers.dll`. `xgameruntime.dll` was also absent. **Not tested** Real D3D12 or DRED execution, retail titles, and the full workspace suite. **AI use** T3 Code / Codex (`gpt-6.2-sol` for the worker run) built and ran the controls and drafted this report. Codex in the coordinator session reran the controls.
BBareth commented 2026-12-01 07:30:28 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by BBareth on 2026-12-01T07:30:28Z.


merge-check claim
head: c6c14a157c

<!-- greyfinch-sync:ivall/xcl:comment:7304138945 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2890#issuecomment-7304138945). Originally posted by [BBareth](https://github.com/BBareth) on 2026-12-01T07:30:28Z. --- merge-check claim head: c6c14a157cc683bd2b8c64d15f83c2eb2f3273b9
BBareth commented 2026-12-01 07:48:15 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by BBareth on 2026-12-01T07:48:15Z.


merge-check
base: 493dbd3dd0
head: c6c14a157c
merge: clean
build: cargo build --workspace -> ok
tests: cargo test --workspace --no-fail-fast -- --test-threads=4 -> two runs: 2899 passed, 1 failed, 51 ignored, then 2900 passed, 0 failed, 51 ignored; 28 SKIPPED lines in both, as on the base; failing in the first run only: hle::d3d12x::pso_async::used_tests::emission_resolves_the_retained_recipe_after_title_address_reuse (pso_async.rs:6063, a leftover reference count of 1), in a file this PR does not touch; cargo test -p xcl --lib pso_async on the base alone then passed 6 of 6 times, so it is intermittent and not from this PR. The base alone, same machine, same commit: 2900 passed, 0 failed, 51 ignored, 28 SKIPPED lines (22 no wave64, 2 no heap windows, 2 no d3d12SDKLayers.dll, 1 no D3D12 debug layer, 1 cannot disable the driver cache). The e2e tests this PR changes (test_title_runs_under_the_debug_layer_with_dred and the one without DRED) ran and passed in both runs.
review: no blocking finding; one file (+24/-4, crates/xcl/tests/e2e.rs), every line read. The three assertions of title_under_the_debug_layer now also print the exit code and the last 40 lines of xcl.log; the log is read before the assertions with unwrap_or_default, so a missing log no longer panics on the read but fails the "debug layer did not come up" assertion with an empty tail. Nit: the new TAIL constant and tail function sit between two use lines. Not tested here: a failing title run, where the new text would show.
performance: none: test code only.
verdict: safe to merge
hardware / tool and model: RTX 5070 Ti 16 GB, driver 621.24 (32.0.16.2124); i7-12700K; Windows 11 26200. Claude Code, Claude Fable 5.2 read the diff, ran the build and the suite and wrote this check.

<!-- greyfinch-sync:ivall/xcl:comment:7304499483 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2890#issuecomment-7304499483). Originally posted by [BBareth](https://github.com/BBareth) on 2026-12-01T07:48:15Z. --- merge-check base: 493dbd3dd0cd50b4c3e8d28f73ab9b504fcd8158 head: c6c14a157cc683bd2b8c64d15f83c2eb2f3273b9 merge: clean build: cargo build --workspace -> ok tests: cargo test --workspace --no-fail-fast -- --test-threads=4 -> two runs: 2899 passed, 1 failed, 51 ignored, then 2900 passed, 0 failed, 51 ignored; 28 SKIPPED lines in both, as on the base; failing in the first run only: `hle::d3d12x::pso_async::used_tests::emission_resolves_the_retained_recipe_after_title_address_reuse` (pso_async.rs:6063, a leftover reference count of 1), in a file this PR does not touch; `cargo test -p xcl --lib pso_async` on the base alone then passed 6 of 6 times, so it is intermittent and not from this PR. The base alone, same machine, same commit: 2900 passed, 0 failed, 51 ignored, 28 SKIPPED lines (22 no wave64, 2 no heap windows, 2 no d3d12SDKLayers.dll, 1 no D3D12 debug layer, 1 cannot disable the driver cache). The e2e tests this PR changes (`test_title_runs_under_the_debug_layer_with_dred` and the one without DRED) ran and passed in both runs. review: no blocking finding; one file (+24/-4, `crates/xcl/tests/e2e.rs`), every line read. The three assertions of `title_under_the_debug_layer` now also print the exit code and the last 40 lines of `xcl.log`; the log is read before the assertions with `unwrap_or_default`, so a missing log no longer panics on the read but fails the "debug layer did not come up" assertion with an empty tail. Nit: the new `TAIL` constant and `tail` function sit between two `use` lines. Not tested here: a failing title run, where the new text would show. performance: none: test code only. verdict: safe to merge hardware / tool and model: RTX 5070 Ti 16 GB, driver 621.24 (32.0.16.2124); i7-12700K; Windows 11 26200. Claude Code, Claude Fable 5.2 read the diff, ran the build and the suite and wrote this check.
Foniass commented 2026-12-01 09:08:38 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by Foniass on 2026-12-01T09:08:38Z.


Triage (#1607) – head c6c14a1

This is the same change as #512 (closed, same author), which it replaces. No open PR makes the same change.
Minor points in crates/xcl/tests/e2e.rs: TAIL and tail are declared between the two use lines, and the doc comment (The last n lines of s) is on the const, not on the function. The other title test's assertion ("the test title did not run to the end", e2e.rs:191 on main) still prints nothing.
Recommendation: keep open.

AI review: Claude Code (Claude Opus 5.5), diffs read only, not built or run; not checked by a human.

<!-- greyfinch-sync:ivall/xcl:comment:7306277318 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2890#issuecomment-7306277318). Originally posted by [Foniass](https://github.com/Foniass) on 2026-12-01T09:08:38Z. --- **Triage (#1607)** – head c6c14a1 This is the same change as #512 (closed, same author), which it replaces. No open PR makes the same change. Minor points in `crates/xcl/tests/e2e.rs`: `TAIL` and `tail` are declared between the two `use` lines, and the doc comment (`The last n lines of s`) is on the const, not on the function. The other title test's assertion (`"the test title did not run to the end"`, e2e.rs:191 on main) still prints nothing. Recommendation: keep open. AI review: Claude Code (Claude Opus 5.5), diffs read only, not built or run; not checked by a human.
vasanex commented 2026-12-02 00:51:53 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by vasanex on 2026-12-02T00:51:53Z.


merge-check
base: 1c8b551475
head: c6c14a157c
merge: clean (merged tree 44b777a0, git diff --check clean)
build: cargo build --workspace -> ok
tests: cargo test --workspace --no-fail-fast -- --test-threads=4 -> 2909 passed, 0 failed, 51 ignored; SKIPPED: 25 (22 no wave64, 2 no heap windows, 1 cannot disable the driver cache), the same set as on the base; failing: none. Base alone, same machine: 2909 passed, 0 failed, 51 ignored. The e2e test this PR changes ran and passed (test_title_runs_under_the_debug_layer_with_dred).
review: whole diff read (one file, crates/xcl/tests/e2e.rs, +24/-4). No blocking finding. The three assertions of title_under_the_debug_layer now print the exit code and the last 40 lines of xcl.log; the log is read before them with unwrap_or_default, so a missing log fails the "debug layer did not come up" assertion with an empty tail instead of panicking on the read. Nit, as the first check says: TAIL and tail sit between two use lines. The new messages were not seen here, since the title run did not fail.
performance: none: test code only.
verdict: safe to merge
hardware / tool and model: NVIDIA GeForce RTX 3080 10 GB (driver 621.40), AMD Ryzen 9 7950X, Windows 11 Pro 26200, rustc 1.100.0, debug / Claude Code with Claude Fable 5.2. Run and posted without a human check of each point.

<!-- greyfinch-sync:ivall/xcl:comment:7331043347 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2890#issuecomment-7331043347). Originally posted by [vasanex](https://github.com/vasanex) on 2026-12-02T00:51:53Z. --- merge-check base: 1c8b551475e1e7bfe48f94448492a4c3544a2e0f head: c6c14a157cc683bd2b8c64d15f83c2eb2f3273b9 merge: clean (merged tree 44b777a0, `git diff --check` clean) build: cargo build --workspace -> ok tests: cargo test --workspace --no-fail-fast -- --test-threads=4 -> 2909 passed, 0 failed, 51 ignored; SKIPPED: 25 (22 no wave64, 2 no heap windows, 1 cannot disable the driver cache), the same set as on the base; failing: none. Base alone, same machine: 2909 passed, 0 failed, 51 ignored. The e2e test this PR changes ran and passed (`test_title_runs_under_the_debug_layer_with_dred`). review: whole diff read (one file, crates/xcl/tests/e2e.rs, +24/-4). No blocking finding. The three assertions of `title_under_the_debug_layer` now print the exit code and the last 40 lines of xcl.log; the log is read before them with `unwrap_or_default`, so a missing log fails the "debug layer did not come up" assertion with an empty tail instead of panicking on the read. Nit, as the first check says: `TAIL` and `tail` sit between two `use` lines. The new messages were not seen here, since the title run did not fail. performance: none: test code only. verdict: safe to merge hardware / tool and model: NVIDIA GeForce RTX 3080 10 GB (driver 621.40), AMD Ryzen 9 7950X, Windows 11 Pro 26200, rustc 1.100.0, debug / Claude Code with Claude Fable 5.2. Run and posted without a human check of each point.
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!2890
No description provided.