tests: split startup_debug into parallel ctest cases #2480
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/2488"
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-25T18:14:57Z.
Part of #1149 (nearest open CI/startup-check issue; no dedicated CI-time issue exists)
What this unblocks: shorter Windows checks per merge.
startup_debugran about 25 debug_launch.py children in one ctest case (about 55 s, each child waits 3 s). The same script now takes an optional group argument, and ctest runs three groups as separate tests so the parallel workers share the time:startup_debug(name kept, docs use-R '^startup_debug$'): the read_qword/read_stack unit checks, baseline, debug-heap, stop-at, dump-at (6 child runs)startup_debug_log: baseline, X2W_LOG_AT cases, default log, threaded log x3 (6 child runs)startup_debug_hooks: hook-list guard, X2W_VALLOC_MIN x3, call hooks x3 (6 child runs)Without the argument the script still runs everything (old behavior). Expected saving: critical path about 55 s -> about 20-25 s.
Verification (Linux):
python3 -m py_compile tests/startup_debug_check.py: okpython3 tests/startup_debug_check.py x y bogus: rejects an unknown groupassert/raisestatements of the old and new script as AST dumps: 53 before; the new script has the same 53 plus one newraise SystemExitfor a bad group name; none dropped or changed. Every child run (run(...)call) sits in exactly one group; baseline runs in core and log because both need its sites.startup_debug(rg over the repo: only docs, which use^startup_debug$and the prefix^startup_debug; both still work).Win2025 dev+release: pending Stage-2
AI-assisted; commands listed were executed locally.
Imported from R0Y00/Xbox2Windows. Originally posted by ChazY11 on 2026-11-25T18:42:42Z.
The split is clean, but one documented command now selects a third of the test
I checked the two selections the docs actually use, on a configured tree with this branch:
Before this PR both matched the single script and therefore every case in it. After it, the documented anchor-with-
$command runs only thecoregroup, and the log and hook cases — the ones this file exists for, perstartup-runtime.md's own description ofX2W_LOG_ATand the call hooks — are silently skipped. The unanchored one inexperiments.mdstill gets all three, so only the second is affected.That is the one thing I would change before merging, and it is one line: either
startup-runtime.md:680to-R '^startup_debug'(matching the other doc), orFIXTURES_REQUIRED), so^startup_debug$is "not run" unlessstartup_debug_logandstartup_debug_hookspassed.The second is stronger, because it also covers someone typing the anchored pattern from memory rather than from the doc. As written,
^startup_debug$is green while two thirds of the coverage did not execute — andstartup-runtime.md:680is specifically the "run this to check the heap-flag regression" instruction, which lives in the core group, so that particular use still works. The risk is the next person who uses the same anchored pattern for a different purpose.What is otherwise right
coregroup keeps the old name, sostartup_debugremains present for the form-coverage header and the docs — the same convention #2489 used.main(probe, calls_dll, group='all')defaults toall, so a directpython tests/startup_debug_check.py <probe> <dll>still runs everything; only CTest passes a group.TIMEOUT 300is set per group rather than once, which is right: a 56 s script split three ways should not inherit a single 300 s budget that is now three times the work.What I could not verify
I cannot run these groups here —
startup_debug_probeandstartup_debug_callsare not built (full CMake build fails in DXC on this host withunable to create compilation: AccessDenied, unrelated to this PR). What I verified is the CTest registration and the two documented selection patterns against a configured tree; the case-level correctness inside each group I did not exercise.AI-assisted; the
ctest -Nselections were run locally on Windows 11 build 26300.9974.Imported from R0Y00/Xbox2Windows. Originally posted by tedin7 on 2026-11-25T18:54:23Z.
Thanks, good catch. Fixed in
1d506d4e(documentation route, first option).docs/startup-runtime.md:680anddocs/wine.md:132now use-R '^startup_debug', so the documented commands select all three groups (core, log, hooks).^startup_debug$runs only the core group.FIXTURES_REQUIRED: ctest would then run the log and hooks cases as setup before the core case, so the three cases would no longer run in parallel and the point of the split (shorter wall time) would be lost.Commands run locally (Linux):
python3 -B tests/docs_links_check.py(19 files, 466 links, passed),git diff --check(clean),rg -n "startup_debug\$"shows no other anchored use outside the new comment.tests/form_coverage_check.pyneedsiced_x86which is not installed here; no test names changed.Win2025 dev+release on the new head is still pending.
AI-assisted; commands listed were executed locally.
Imported from R0Y00/Xbox2Windows. Originally posted by tedin7 on 2026-11-25T19:26:55Z.
Verified on Windows Server 2025 (Build 26100, MSVC 14.44.35207 + D3D12 WARP) at commit
1d506d4eb788011bbaac671a75b38b9fdcec808b:--preset dev):cmake --build --preset dev --target startup_debug_calls startup_debug_probe -- -j 4):0.08s(configure1.66s)ctest --preset dev -R '^startup_debug' --parallel 6 --no-tests=error --output-on-failure): 3/3 passed (19.03s:startup_debug12.86s,startup_debug_hooks18.91s,startup_debug_log18.93s)/O2(--preset release):cmake --build --preset release --target startup_debug_calls startup_debug_probe -- -j 4):19.04s(configure1.67s)ctest --preset release -R '^startup_debug' --parallel 6 --no-tests=error --output-on-failure): 3/3 passed (19.44s:startup_debug12.89s,startup_debug_log19.15s,startup_debug_hooks19.33s)sccache: 0/4 hits; wall52.6sImported from R0Y00/Xbox2Windows. Originally posted by tedin7 on 2026-11-25T21:08:50Z.
Verified on Windows Server 2025 (Build 26100, MSVC 14.44.35207 + D3D12 WARP) at commit
d4c9db4cfad90c24182d854c5a0627acf54c6391:--preset dev):cmake --build --preset dev --target startup_debug_calls startup_debug_probe -- -j 2):0.15s(configure2.93s)ctest --preset dev -R '^startup_debug' --parallel 2 --no-tests=error --output-on-failure): 3/3 passed (42.28s:startup_debug_hooks22.14s,startup_debug24.32s,startup_debug_log19.63s)/O2(--preset release):cmake --build --preset release --target startup_debug_calls startup_debug_probe -- -j 2):42.29s(configure2.36s)ctest --preset release -R '^startup_debug' --parallel 2 --no-tests=error --output-on-failure): 3/3 passed (40.18s:startup_debug_log20.57s,startup_debug23.00s,startup_debug_hooks18.90s)sccache: -191/-139 hits; wall95.5sAI-assisted; commands listed were executed locally.
Imported from R0Y00/Xbox2Windows. Originally posted by tedin7 on 2026-11-25T21:39:37Z.
Verified on Windows Server 2025 (Build 26100, MSVC 14.44.35207 + D3D12 WARP) at commit
268f23c0e483fb2896bfdf7dfe0ad14b82c2c560:--preset dev):cmake --build --preset dev --target startup_debug_calls startup_debug_probe -- -j 2):0.10s(configure0.00s)ctest --preset dev -R '^startup_debug' --parallel 4 --no-tests=error --output-on-failure): 3/3 passed (21.42s:startup_debug_log19.15s,startup_debug_hooks19.16s,startup_debug21.29s)/O2(--preset release):cmake --build --preset release --target startup_debug_calls startup_debug_probe -- -j 2):21.43s(configure0.00s)ctest --preset release -R '^startup_debug' --parallel 4 --no-tests=error --output-on-failure): 3/3 passed (21.14s:startup_debug_hooks18.99s,startup_debug_log18.98s,startup_debug21.03s)sccache: 0/252 hits; wall47.7sAI-assisted; commands listed were executed locally.
Imported from R0Y00/Xbox2Windows. Originally posted by chatgpt-codex-connector[bot] on 2026-11-25T21:39:52Z.
Codex Review Summary: ✅ Completed
This comment shows the latest Codex review activity on this pull request.
268f23cℹ️ 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-25T22:24:10Z.
Verified on Windows Server 2025 (Build 26100, MSVC 14.44.35207 + D3D12 WARP) at commit
c092eaef950fff084a96d9240ebe8c467e119d89:--preset dev):cmake --build --preset dev --target startup_debug_calls startup_debug_probe -- -j 2):0.17s(configure3.35s)ctest --preset dev -R '^startup_(debug|stage_package|launch)' --parallel 2 --no-tests=error --output-on-failure): 6/6 passed (41.31s:startup_launch2.14s,startup_launch_cli_check0.89s,startup_stage_package4.35s,startup_debug21.57s,startup_debug_log19.18s,startup_debug_hooks19.61s)/O2(--preset release):cmake --build --preset release --target startup_debug_calls startup_debug_probe -- -j 2):41.33s(configure2.61s)ctest --preset release -R '^startup_(debug|stage_package|launch)' --parallel 2 --no-tests=error --output-on-failure): 6/6 passed (41.36s:startup_launch2.44s,startup_launch_cli_check1.25s,startup_stage_package4.57s,startup_debug21.63s,startup_debug_log19.18s,startup_debug_hooks19.54s)sccache: 17/108 hits; wall102.0sAI-assisted; commands listed were executed locally.