Repository navigation
Tests: when the test title does not finish, print why - #2890
Open
Luislariosss wants to merge 1 commit into
Open
Luislariosss wants to merge 1 commit into
Luislariosss wants to merge 1 commit into
Conversation
The assertion in the debug-layer end-to-end test only printed the launcher's opening lines, so a failure looked like "the test title did not run to the end" with no exit code and no log. I hit exactly that once here (it did not reproduce in five later runs, issue xcl-dev#500) and could not tell whether the title crashed, was refused, or never started. Now the failure carries the process exit code, the launcher's stdout and stderr, and the last 40 lines of xcl.log, which is where the debug layer's own objections end up: 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 (error, id 93): ID3D12Device::CreatePixelShader: ... The log is read before the assertion and with unwrap_or_default, so a missing log no longer panics on its own and hides the reason the title stopped; the "debug layer did not come up" assertion prints the same tail. cargo test -p xcl --test e2e test_title_draws: ok, 1 passed. Test-only, no production code touched.
|
NVIDIA run (listed under Not tested): passes, and the new message shows up on a real failure here. Tested:
Two things from that run:
Small style point: 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. |
rootw0rm
pushed a commit
to rootw0rm/xcl
that referenced
this pull request
Nov 26, 2026
…re messages) Upstream xcl-dev#2890 (c6c14a1, single-commit on upstream/main 8b957be): title_under_the_debug_layer prints the last TAIL=40 lines of xcl.log in its three assertion messages and tolerates a missing log file (unwrap_or_default), so a title that never finishes still shows why. Verbatim port of the whole fix (1 file, +24/-4): the TAIL const + tail() helper after the PathBuf import and the three rewritten asserts. Applies cleanly; the only context offset is the linux-only debug_layer_skip_line helper above the hunk. Windows-only siblings xcl-dev#2888 (perf-compare ps1 stack), xcl-dev#2889 (tiling_parity.rs host-driver test, no cfg(windows) gate), xcl-dev#2891 (title_textures.rs write-watch tiering on the 71b8e6e dev-stack) stay out per the step-139 sync entry.
rootw0rm
pushed a commit
to rootw0rm/xcl
that referenced
this pull request
Nov 26, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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:
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 ofxcl.log; the log is read withunwrap_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.Tested
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 aregpu::dxil::fuzz_tests::fuzz_validate_and_gpu_1andfuzz_validate_and_gpu_3(a CPU/GPU result mismatch in the DXIL fuzzer): pre-existing on main on this adapter (checked out8b957beand reran them: same two failures; tracked upstream in DXIL fuzz tests: fuzz_validate_and_gpu_1 fails on AMD (seed 722 and others, RDNA2-4), so the default suite is red there #2115) and untouched by this PR.Not tested
AI use