Tests: the mixed-window remake tests run in a child process #3187
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/3187"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Imported from ivall/xcl. Originally posted by Kalmarv on 2026-11-28T17:03:32Z.
On
nvidia-devthexcllib test binary is ended by a mixed-window test on NVIDIA (exit code 0x7C10003), reported by throny on #3041 (https://github.com/xcl-dev/xcl/issues/3041#issuecomment-7237732888) and worked around with--skipin #3116, #3169 and #3176. These tests came with our #3005-#3007.On
mainit fails CI on unrelated pull requests too: in the 60 most recent failedBuild and test (Windows, no GPU)runs (2026-12-02),mixed_window_keeps_its_bytes_and_the_gpu_sees_every_segmentfailed in 143828732230, 143718961344, 143562397058, 143175559324, and the lib binary was stopped with exit code 0x7C10003 in 143794881256, 143742411497, 143252746541, 143175576386.Cause:
a_refused_gpu_upload_segment_becomes_customandmixed_window_keeps_its_bytes_and_the_gpu_sees_every_segmentremake a window inside the shared test binary. After the lib's earlier tests, the remake'sCreateCommandQueuereturns E_OUTOFMEMORY, here as on throny's RTX 4080. It does so with--test-threads=1too, so the cause is something earlier tests leave in the process, not tests running beside it. I have not found what. standby saw command queues made from the shared device kept for the process once it is adopted, which fits but is not verified. The queue is made after a segment was mapped, so the remake cannot restore the window and stops the process. That is the fail-stop doing its job in a title, but in the test binary it ended every test after it. First I made the stop panic in tests instead. That was not enough: the binary then died later with an access violation, because the failed remake had left the window with the driver. So the fix isolates the tests instead.What is in it
crates/xcl/src/hle/d3d12x/uma_driver.rs(test module only):ran_in_child. Each of the two remake tests now runs again on its own in a child process, asfailed_restore_stops_before_importing_an_unbacked_windowalready does. The parent fails when the child fails (or when the child ran no test) and passes the child'sSKIPPEDlines on. No runtime code changes; the smoke pair below is for thePR checksworkflow.Tested
main078358a05(b5fb1711f), the same hardware:.\scripts\test.ps1(cargo test --workspace -- --test-threads=4, no--skip): 3006 passed, 0 failed, 52 ignored; SKIPPED 24 (22 no wave64, 2 no heap windows). Thelink_tests,title_texturesandvramfailures below did not happen on this base.XCL_*variable set.54225f58,cargo test -p xcl --lib --no-fail-fast -- --test-threads=4: the binary ended with exit code 0x7C10003 after 1,386 ok, at "coherent window could not be restored … after CreateCommandQueue: … (0x8007000E)".--skip, three runs: 1770 / 8 / 28, 1770 / 8 / 28 and 1774 / 4 / 28 (passed / failed / ignored). All 7uma_drivertests ok every time. In the third run the fourtitle_texturestests passed: their out-of-memory failures come and go between runs.link_tests::{gpu_linked_memory_accessors, linked_programs_keep_their_declarations}(DXC: "attribute WaveSize only valid on entry point function"), the fourtitle_texturestests throny listed, andvram::tests::{d32s8_targets_take_their_own_size_of_video_memory, gpu_retire_queue_holds_heap_until_blocked_queue_passes_mark}. The twovramtests fail on the head with E_OUTOFMEMORY, and also in a run with the two mixed tests skipped; on the base the binary ended before reaching them.cargo test -p xcl --lib uma_driver: 7 passed, 0 failed.cargo build --workspace && cargo test --workspace --no-fail-fast -- --test-threads=4, this head, no--skip: 40 test binaries, 1902 passed, 8 failed (the 8 lib tests above), 48 ignored. 150SKIPPEDlines: 123 "validator 1.7 < 1.8 (validation step only)", 21 "no wave64", 3 per-lane forms refused for #1426, andtwo_pass_binds_set_the_shared_view_heapandheap_window_out_of_memory_falls_back_to_the_switch_form(no heap windows).Regression run
main:
this PR's head:
Not tested
CreateCommandQueue; thetitle_texturesandvramtests above): not found.3d836390on base54225f58).AI use
🤖 Generated with Claude Code
Imported from ivall/xcl. Originally posted by throny on 2026-11-28T17:07:12Z.
merge-check claim
head:
3d8363906dOn the card that reported it (RTX 4080, 621.40): the whole suite on
nvidia-dev+ this PR without the three--skips, after the suite that is running now.Imported from ivall/xcl. Originally posted by andrewDoing on 2026-11-28T17:16:31Z.
The child isolation behaved as intended in a Windows libtest harness with the exact
ran_in_childfrom3d836390: normal completion passed, a permitted skip surfaced itsSKIPPEDline, and both a child assertion and an exact filter matching zero tests failed the parent.One diagnostic is lost for the failure that motivated the PR. I made the synthetic child exit with
0x07C10003without a panic. Direct invocation returned 130088963; under the wrapper the parent correctly failed with libtest exit 101, but its report contained only the child's partial transcript and no child exit code. A different native termination with the same partial output would look identical. Includingoutput.statusin the failed assertion preserved 130088963 in my retest while keeping the parent exit 101. Printing the Windows code in hex as well would make comparison with #3041 easier.These are CPU-only process-runner controls. I did not induce a driver failure or run the hardware fixture. AI use: OpenAI Codex built and ran the controls and prepared this report.
Imported from ivall/xcl. Originally posted by throny on 2026-11-28T17:20:28Z.
merge-check
base:
54225f58(nvidia-dev)head:
3d8363906dmerge: clean
build: cargo build --workspace -> ok
tests: cargo test --workspace --no-fail-fast -- --test-threads=4 (no --skip) on nvidia-dev
54225f58+ this PR -> 1904 passed, 6 failed, 48 ignored, 27 SKIPPED lines; every test binary ran to its end. Without this PR the lib test binary is terminated on this card (exit 0x7C10003), and with the three uma_driver tests skipped the same base gives 1901 passed, 6 failed, 48 ignored: so the three tests now run and pass (a_refused_gpu_upload_segment_becomes_custom, mixed_window_keeps_its_bytes_and_the_gpu_sees_every_segment, failed_restore_stops_before_importing_an_unbacked_window, all ok) and nothing else changed. The 6 failures are the ones this base has here without the PR: placed_title_textures_share_vram_and_preserve_pixels, three stream_recheck_* tests, and two vram::tests (d32s8_targets_take_their_own_size_of_video_memory, gpu_retire_queue_holds_heap_until_blocked_queue_passes_mark).review: read in full by me (31 lines, test code only). The helper runs the named test again alone in a child process with a marker variable, passes the child's SKIPPED lines on, and fails with the child's output when the child fails or does not report one passed test; in the child it returns false and the body runs. The lock that keeps the two tests apart is still taken first, so the two children do not run at the same time. Two notes, neither blocking: on a machine where the child skips (no D3D12 device), the parent still needs "1 passed" from it, which holds because a skipping test passes; and a failure inside the child shows up as the parent's assert with the transcript, so the first line of a failure report is the helper's, not the test's.
performance: none (test code only; no translator source).
verdict: safe to merge
hardware / tool and model: RTX 4080 16 GB (621.40), i9-12900K, Windows 11 26300, Rust 1.100.0, debug. Claude Code; merge, build and suite run by Claude Fable 5.2, diff review by Claude Opus 5.5 (every hunk read; nothing run on the GPU beyond the suite).
Imported from ivall/xcl. Originally posted by thehollowedone on 2026-11-28T19:29:30Z.
merge-check
base:
54225f5884(nvidia-dev)head:
d338db7a8emerge: clean (head descends from the current base)
build:
cargo build --offline --locked -j 4 --workspace-> ok;git diff --check-> oktests:
cargo test --offline --locked -j 4 --workspace --no-fail-fast -- --test-threads=4-> 1,910 passed, 0 failed, 48 ignored, 40 targets, 26 explicitSKIPPEDnotices.XCL_DXIL_CACHEpointed to a writable local cache. All three mixed-window tests, including the two now isolated in child processes, passed. Without that cache setting, the library binary still finished normally at 1,777 passed, 1 failed, 28 ignored; the sole failure wasconsole_mesh_caches_hlsl_compute_pass_in_memory_and_on_disk(DXIL not compiled yet). That test passed 1/0/0 when rerun with the writable cache. The default-cache failure is not a passing full-suite result.review: I read the complete 31-line test-only diff. Each remake test retains its serialization lock, runs its named body in a separate child, propagates skip notices, and fails the parent if the child fails or matches no passing test. The child does not recursively spawn. The missing child exit code in a failure message, reported separately, would improve diagnosis but does not change the pass/fail behavior.
performance: no runtime path changes; child process startup affects only these two tests.
verdict: safe to merge
hardware / tool and model: Windows 11 build 26300, RTX 3080 Ti / 621.35, Ryzen 7 9800X3D, rustc 1.99.1 MSVC; Codex (GPT-6.2 Sol) read the diff and ran the build and tests. I did not run a title or AMD/Intel hardware.
Imported from ivall/xcl. Originally posted by throny on 2026-11-29T03:30:52Z.
merge-check claim
head:
d338db7a8eRe-check of the head rebased onto main.
Imported from ivall/xcl. Originally posted by throny on 2026-11-29T03:41:39Z.
merge-check
base:
fa204595head:
d338db7a8emerge: clean
build: cargo build --workspace -> ok
tests: cargo test --workspace --no-fail-fast -- --test-threads=4 -> 2608 passed, 0 failed, 49 ignored (27 SKIPPED lines). Base alone at
fa204595: 2608 passed, 0 failed, 49 ignored. Every test binary ran to its end; the three uma_driver tests are ok. Without this PR, 2 of 10 whole-suite runs on main last night had no lib counts because the lib test binary was ended.review: re-check of the head rebased onto main. Compared with the head I checked, only the helper's doc comment changed (it now says the failure can also happen with one test thread); the code is the same.
performance: none (test code only).
verdict: safe to merge
hardware / tool and model: RTX 4080 16 GB (621.40), i9-12900K, Windows 11 26300, Rust 1.100.0, debug. Claude Code; merge, build and suite run by Claude Fable 5.2, diff review by Claude Opus 5.5 (every hunk read; nothing run on the GPU beyond the suite).
Imported from ivall/xcl. Originally posted by Foniass on 2026-11-29T14:57:47Z.
Merge-check run and written with Claude Code (Claude Opus 5.5): a test merge onto the base above and the full suite on this machine. The 4
fuzz_validate_and_gpu_*failures happen on main on this machine too.Imported from ivall/xcl. Originally posted by Foniass on 2026-12-01T05:20:00Z.
Re-review (head
cd13b171, diff read, not a merge-check:PR descriptionfails without the test-only label, so not run again here). Follow-up to my merge-check ofd338db7a.d338db7aonlyuma_driver.rs~717-720 changed: a comment, plus the child's exit code (decimal and hex) in both assert messages. When the tests pass and fail is unchanged, so my earlier verdict stands: safe to merge once a maintainer applies the test-only label (every hunk is inside#[cfg(test)]). Without it the required check keeps failing (no smoke pair).3d836390.Fine: the lock is taken before the child starts, so the two children never run together, and the child doesn't start another. SKIPPED lines are passed on through raw stderr, a child failure or crash fails the parent with the transcript and exit code, and a renamed test (zero matches) fails the "1 passed" check. It merges cleanly onto main
d0832e61.AI review: Claude Code (Claude Opus 5.5), posted by Foniass without a human check of each point.
Imported from ivall/xcl. Originally posted by Foniass on 2026-12-01T16:51:48Z.
Test report (not a merge-check:
PR descriptionred)base:
b2b1f109d2head:
cd13b17199merge: clean
build: cargo build --workspace -> ok
tests: cargo test --workspace --no-fail-fast -- --test-threads=4 -> 2902 passed, 0 failed, 51 ignored; SKIPPED: 28 (20 no wave64, 2 no d3d12SDKLayers.dll, 1 no D3D12 debug layer, 1 no heap windows, 1 cannot disable the driver cache, 3 others; the same set as on main); failing: none
review: not repeated here; my review of this same head is at https://github.com/xcl-dev/xcl/pull/3187#issuecomment-7301660266, and its findings stand. This run adds what reading couldn't: whether the change merges, builds and passes the whole suite on current main.
performance: no smoke run.
assessment: merges, builds and passes the whole suite on current main (0 failed); the findings in my review stand
hardware / tool and model: RTX 5070 Ti (driver 621.14), Ryzen 7 7800X3D, Windows 11 26300 / Claude Code with Claude Opus 5.5
AI-written and posted by Foniass without a human check of each point.
Imported from ivall/xcl. Originally posted by Kalmarv on 2026-12-03T00:04:43Z.
Superseded by #3743: this commit is folded, unchanged, into the unified CI-flake PR so all the fixes land together.
Pull request closed