Repository navigation
tests: when the test title does not finish, print the exit code and the log tail - #512
Luislariosss wants to merge 2 commits into
Conversation
commit() removed the page from LAZY before VirtualAlloc, so a failed commit - the system's commit limit, which a retail title on a 16 GB machine gets close to - left the page out of the set with nothing committed. The next access to it was no longer recognised as lazy, the handler returned EXCEPTION_CONTINUE_SEARCH, and the title died with 0xc0000005 on a page that was still MEM_RESERVE, with no log line: the crash named a wild write instead of an out-of-memory. The page now leaves the set only once the allocation succeeded. The allocation is a parameter (commit_with), so a test can make it fail and assert that the page stays lazy, that a retry that succeeds takes it out, and that a page that was never lazy is not touched.
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.
|
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:
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. |
|
Tested on an RTX 5080, release build: pass, 677 passed, 0 failed.
Not tested
AI use: Claude Code (Claude Opus 5.5, Claude Fable 5.2) |
|
Test run of Tested
Review: The title says this is about the e2e test's failure output, but the PR also changes Not tested: no retail title or regression run (I have no unpacked game), no Run and review by Claude Code (Claude Opus 5.5) on this machine; the review points were checked against the code. |
|
Closing because it fails the required |
Follow-up to #500.
The assertion in the debug-layer end-to-end test only printed the launcher's opening lines:
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:
unwrap_or_default(), so a missing log no longer panics on its own and hides why the title stopped;xcl.log;A forced failure shows what it looks like now:
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.AI-assisted.