ci: run the full Windows suites with CTest in parallel #1166
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/1173"
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 R0Y00/Xbox2Windows. Originally posted by tedin7 on 2026-11-24T02:26:28Z.
Change
Run CTest with
--parallel 4in the full Windows suites that now run onmainandworkflow_dispatch(Debugdevand/O2release). The pull request job (--preset pr, a few focused tests) is left serial on purpose: it runs about a dozen tests that mostly use the WARP adapter, so parallelism would add contention for little gain.Shared-state fixes that make the parallel run safe:
xgameruntime_thunks,xgameruntime_contractsandxgameruntime_pls_xpackageall use%TEMP%\\xbox-recomp-plsand%TEMP%\\xbox-recomp-packages. They now share aRESOURCE_LOCK.cpu_native_worker_aliveis timing-sensitive, so it isRUN_SERIAL.tests/cpu/hang_probe.pytolerates a fixture that exits before reading its selector (broken pipe).Reviewed and found safe: TLS carrier directory (random name), per-PID scratch, Python
TemporaryDirectory, coverage record files (unique names), generated CPU sources (one per test), named events, no ports or pipes. Hardware tests stay excluded in CI and the local CTest presets are unchanged, so local runs stay serial.Refs #448 (faster CI feedback; does not change the device-per-case cost).
AI-assisted.
Verification
CTest wall time ("Total Test time (real)"), full suite,
-E '_hardware$':main(450 tests, runs 45298322316, 45298262059)--parallel 4, this PR (491 tests, upstream run 45316202524)--parallel 4, same branch on a fork, 2 runs (495 tests)Whole job: about 1000 to 1040 s serial (limit 20 min) against 405 to 409 s in the upstream parallel run. A serial run of
mainon the fork hit the 20 minute limit; the parallel runs there took 11 to 15 minutes, so the fork runners were slower than upstream.Failures found while enabling it, both fixed here:
cpu_native_worker_alivefailed in both jobs of the first run (waits 2 s per launch, 0.5 s for EOF). It is nowRUN_SERIAL.no_workerfixture exits without reading stdin, sohang_probe.pycould raiseOSErroron the stdin write or close. The probe now tolerates a broken pipe; the exit or timeout check still decides.Flakiness: 3 full-suite runs after the fixes, all green (1 upstream, 2 on the fork via
workflow_dispatch).gh run rerunneeds admin rights, so the repeats used the fork. Since #1185 pull requests run only theprpreset, so the full suites run onmainpushes andworkflow_dispatch.Evidence and follow-up
No fixtures added. After merge, the first
mainrun is the check that the parallel suites stay green.Checklist
Imported from R0Y00/Xbox2Windows. Originally posted by tedin7 on 2026-11-24T02:58:18Z.
AI-assisted. Both Windows jobs failed on cpu_native_worker_alive only (12.5 s, every other test passed). That probe waits 2 s per launch and 0.5 s for end of input, so it fails when other tests share the CPU under --parallel 4. Marked it RUN_SERIAL so it runs alone with its limits unchanged. Not reproducible on this Linux host (the test is Windows only); the new CI run is the check.
Imported from R0Y00/Xbox2Windows. Originally posted by tedin7 on 2026-11-24T03:12:13Z.
Update: after marking cpu_native_worker_alive RUN_SERIAL, both Windows jobs pass on the current head (Debug 6m45s against 14m31s serial, /O2 6m49s against 16m25s). That is one clean run after the fix: I could not re-run the workflow without admin rights, so the flakiness check is a single sample. Moving this to ready; it stays complementary to #1185 (it speeds up the full dev and release suites on main and workflow_dispatch), and I will rebase it if #1185 lands first.
AI-assisted.
Imported from R0Y00/Xbox2Windows. Originally posted by chatgpt-codex-connector[bot] on 2026-11-24T03:12:28Z.
Codex Review Summary: ✅ Completed
This comment shows the latest Codex review activity on this pull request.
822112aℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.
Imported from R0Y00/Xbox2Windows. Originally posted by tedin7 on 2026-11-24T03:17:28Z.
Merged
origin/main(#1185) into this branch. The workflow now keeps theprpreset serial and adds--parallel 4to the fulldevandreleasesuites that run onmainandworkflow_dispatch, plus theRESOURCE_LOCK,RUN_SERIALand broken-pipe fixes.This pull request does not run the full suites any more, so they are not exercised by the checks here. The timings in the description (Debug 14m31s to 6m45s, /O2 16m25s to 6m49s) come from earlier runs of this branch, for example run 45316202524, taken before #1185.
AI-assisted (Claude Code).
Imported from R0Y00/Xbox2Windows. Originally posted by nanyoudegege on 2026-11-24T03:21:37Z.
Independent check of the
hang_probe.pychange atecbcd9cc(cloud Linux, Python 3.12.14; AI-assisted). I used a synthetic child that writes to both pipes and exits with code 7 before reading stdin. To make the order deterministic, the harness waits for the real child to exit before returning itsPopenobject tolaunch(); the pipe operations themselves are real.b30ac9e5:launch()raisedBrokenPipeErrorin 6/6 runs.This covers the early-exit pipe branch only, not the Windows CTest scheduling, resource locks, or timings. No game files used.
Imported from R0Y00/Xbox2Windows. Originally posted by tedin7 on 2026-11-24T11:35:38Z.
Thanks @nanyoudegege: that confirms the early-exit pipe branch of hang_probe.py at
ecbcd9cc. The Windows CTest scheduling and resource locks are covered by our Windows runs, not by your check.Imported from R0Y00/Xbox2Windows. Originally posted by R0Y00 on 2026-11-24T11:36:58Z.
The timings and three green full runs are useful. This head only gets the fast PR check today, and the full Windows suite has acquired additional fixtures. Please update the branch to current main and attach both full Windows workflow_dispatch runs using parallel 4, including any resource-lock or timing failures and the elapsed CTest time. Leave the protected fast PR check serial.
Imported from R0Y00/Xbox2Windows. Originally posted by tedin7 on 2026-11-24T12:14:32Z.
Updated to current
main(rebased, 3 commits, head97a524a6). The workflow still runs the protectedprcheck serially (ctest --preset pr, no--parallel).--parallel 4is only on the fulldevandreleasesuites. These are 638 tests each.I dispatched
windows.ymltwice on this head. Each run includes both the Debug job and the/O2job:/O2(CTest)xmem_shim_page_runs, 477.71 sdxr_facing_warp, 388.22 sThe failures were not resource-lock collisions:
xmem_shim_page_runs(/O2): thereader-without-retrycase expected an access violation. The child reportedreader survived, and the xmem log showsunmap ... failed (error 487)just before it.dxr_facing_warp(Debug): WARP returned 16 of 96 ray mismatches. This is a numeric disagreement, not a lock or timeout. Neither test has a lock or timing dependency on the threexgameruntime_*fixtures.--parallel 4. I did not run them serially on this head.I re-ran the failed jobs once. Both runs then passed 638/638 in both jobs:
/O2479.67 s, Debug 489.46 s/O2480.57 sSo the full CTest time is about 8 minutes (389 to 489 s), and I saw no resource-lock failures or timeouts. Two of the four jobs failed on first attempt, so 4 of 4 clean first-attempt jobs is not what I have. The
xmem_shim_page_runsanddxr_facing_warpflakes are worth tracking separately. I can check whether they reproduce serially if you want.AI-assisted (Claude Code).
Imported from R0Y00/Xbox2Windows. Originally posted by R0Y00 on 2026-11-24T15:38:47Z.
I verified both workflow_dispatch runs at
97a524a6. Two first-attempt Windows jobs failed, in xmem_shim_page_runs (/O2) and dxr_facing_warp (Debug), and both passed on retry. Please keep this open while we distinguish existing flakes from a parallel-suite regression. After syncing with #1520, attach matched serial and parallel Windows results for the two cases, including first-attempt results. Keep the protected PR preset serial.Imported from R0Y00/Xbox2Windows. Originally posted by tedin7 on 2026-11-24T15:57:22Z.
@R0Y00 Rebased onto
mainafter #1520 at6ee0b619f963449eab4a96b67ec70773ef6216ad, preserving thepipcache,sccache, and parallelpixel-binarychecks from #1520. The protected PR preset (ctest --preset pr --no-tests=error) remains strictly serial; only the fulldevandreleasesuites pass--parallel 4.Matched serial vs. parallel Windows results at
6ee0b619(first-attempt results)Executed on Windows Server 2025 (Build 26100, MSVC 14.44.35207 + D3D12 WARP), first attempt for every cell (no retries):
dxr_facing_warpxmem_shim_page_runs^(dxr_facing_warp|xmem_shim_page_runs)$)dev)--parallel 1^(dxr_facing_warp|xmem_shim_page_runs)$)dev)--parallel 4^(dxr_facing_warp|xmem_shim_page_runs)$)/O2(release)--parallel 1^(dxr_facing_warp|xmem_shim_page_runs)$)/O2(release)--parallel 4^(dxr_.*_warp|xmem_shim_mapped_pages|xmem_shim_page_runs|xmem_shim_working_set_warp)$, 13 tests)dev)--parallel 1^(dxr_.*_warp|xmem_shim_mapped_pages|xmem_shim_page_runs|xmem_shim_working_set_warp)$, 13 tests)dev)--parallel 4^(dxr_.*_warp|xmem_shim_mapped_pages|xmem_shim_page_runs|xmem_shim_working_set_warp)$, 13 tests)/O2(release)--parallel 1^(dxr_.*_warp|xmem_shim_mapped_pages|xmem_shim_page_runs|xmem_shim_working_set_warp)$, 13 tests)/O2(release)--parallel 4Commands used (for both
--preset devand--preset release,--parallel 1and--parallel 4):CI and fork
workflow_dispatchat6ee0b6196ee0b619: all green (Build and test on Windows,Assemble and translate gfx1013 fixtures,Run platform-independent Python checks on Linux).workflow_dispatchrun on the fork at6ee0b619(attempt 1): https://github.com/tedin7/Xbox2Windows/actions/runs/45429390186 (in progress at the time of posting; both Linux jobs already passed, Windows Debug and/O2jobs running).Notes on the two first-attempt failures at
97a524a6xmem_shim_page_runs(/O2): attempt 1 failed inexpect_access_violation(controls, "reader-without-retry", ...)withAssertionError: reader-without-retry: no fault: 'child: reader starts\nchild: reader survived\n'(5.38s). The test does not share files or state with other CTest jobs, butreader_while_toggling(shim, base, 3.0)withX2W_XMEM_NO_FAULT_RETRY=1relies on the reader thread colliding with the transient unmapped window within 3.0s; under 4-way CPU contention, scheduling skew can let the reader survive the 3.0s window without faulting. No speculativeRUN_SERIALor test change was added here yet so we can separate that cleanly if it recurs.dxr_facing_warp(Debug): attempt 1 failed in 0.06s withdebug_errors=0 debug_warnings=0andray=48 flags=0x0 expected status=1 instance=5 primitive=0 distance=2 actual status=0 instance=0 primitive=0 distance=0(mismatches=16).offscreen_check warp --dxr-facinguses an isolated in-memory D3D12 WARP device with no shared files or temp directories, and none of the serial or parallel runs on Windows Server 2025 reproduced the inline RayQuery mismatch.AI-assisted; commands listed were executed locally.
Imported from R0Y00/Xbox2Windows. Originally posted by Makto94 on 2026-11-24T17:28:04Z.
Serial history of
mainfor the two cases, to help separate existing flakes from a parallel-suite regression.mainrunsctest --preset dev/releasewithout--parallel, and neitherwindows.ymlnorCMakePresets.jsonuses--repeat.xmem_shim_page_runsfailed once in a serial run onmain. Run 45421896173 (push tomainat71be6f0f, attempt 1, Debug job 138545800299):The
/O2job of the same run, on the same commit, passed it (Passed 10.22 sec). The 12:14Z comment describes the samereader-without-retrycase withreader survivedfor the/O2--parallel 4failure in fork run 45386098866; I did not read that log. In all 48 Windows jobs ofmainpush runs that started after #1306 merged (2026-11-24T08:54:38Z to 16:52Z), the test ran: 47 Passed (9.95-16.99 s), 1 Failed (the run above). One event gives no rate.43 of those 48 jobs ended as
cancelledat about 20.1 min (timeout-minutes: 20, annotation "The job has exceeded the maximum execution time of 20m0s"), for example runs 45429771527, 45434225604 and 45437184568. In each of themxmem_shim_page_runshad already run, so a failure there is only visible in the log, not in the step conclusion. I did not look into why the suite got slower.dxr_facing_warp: no first-attempt serial failure inmainpush runs from 2026-11-23T12:04Z to 2026-11-24T16:52Z (304 runs, 608 Windows jobs). The step "Configure, build and run PC tests" succeeded in 501 jobs and failed in 4 (other tests:compute_root_warp,cpu_native_reloc_free,cpu_native_package_ordinal_startup,cpu_aot_jump_tables). The log showsdxr_facing_warpPassed(0.04-0.07 s) in those 4 jobs and in all 48 jobs since 08:54Z.Limits: upstream runners only (Windows Server 2025, 10.0.26100). I did not run a matched
--parallel 1/--parallel 4pair, and no cause is established. Method:GET /repos/R0Y00/Xbox2Windows/actions/runs/<id>/attempts/1/jobsplus the job logs.Imported from R0Y00/Xbox2Windows. Originally posted by tedin7 on 2026-11-24T17:29:51Z.
Thanks for pulling that upstream
mainserial history, @Makto94 — that directly confirmsxmem_shim_page_runs(reader-without-retry: reader survived) occurs under serial execution onmainas well, and highlights that 43/48 recent serialmainpush jobs are hitting the 20-minute timeout ceiling, which is exactly what parallel CTest on the fulldev/releasesuites here is meant to relieve.AI-assisted.
Imported from R0Y00/Xbox2Windows. Originally posted by R0Y00 on 2026-11-24T19:56:27Z.
#1848 is now on main. The reader-without-retry negative control uses a test-only event to hold the unmapped window, and I independently reran the page-run fixture in Release. Please retest the rebased candidate with the full Debug and /O2 suites at parallel 4. Link both runs and separate any remaining baseline failures from the page-run case. The PR smoke result cannot exercise this change to the full suites.
Imported from R0Y00/Xbox2Windows. Originally posted by tedin7 on 2026-11-24T21:02:09Z.
@R0Y00 Retested the rebased candidate on top of #1848 with the full suites at
--parallel 4.Run on
c56b1a36: https://github.com/tedin7/Xbox2Windows/actions/runs/45483049804xmem_shim_page_runsdev)/O2(release)Baseline failures: none in either job. The page-run case passed in both, and no other test failed or timed out. That leaves nothing to separate.
Why the head moved from
bafc358atoc56b1a36: the first full run onbafc358a(https://github.com/tedin7/Xbox2Windows/actions/runs/45477137717) passed/O2820/820 in 503.32 s, withxmem_shim_page_runsPassed in 11.02 s. The Debug job was cancelled bytimeout-minutes: 20after 772/820 tests: 755 passed, 17 skipped and 0 failed, andxmem_shim_page_runsPassed in 11.47 s. That run started with a cold compiler cache, so setup and the Debug build took about 10 minutes before the tests started.c56b1a36changes onlytimeout-minuteson the two Windows jobs, from 20 to 30. The Debug job of the run above needed 17m10s with a warm cache, so the old limit leaves little margin.AI-assisted; commands listed were executed locally.