Repository navigation
test(tools): run the rebase_verify tests in three ctest shards - #25461
Merged
oneandonlydean merged 1 commit intoNov 22, 2026
Merged
Conversation
rebase_verify took 48 to 50 s in every Windows job of the Build workflow on main and 44 s in the Windows MSYS2 nightly, over the 30 s that CONTRIBUTING.md allows a test. Almost all of it is git: the 42 tests start 610 git processes, about 39 ms each on Windows (23.9 s of a 26.2 s run). Split the script into three ctest runs with the --shard INDEX/COUNT scheme of conventions_function_bodies. The first shard keeps the name rebase_verify; TestShardTests checks that the shards run every case exactly once. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
MarcZX10
approved these changes
Nov 22, 2026
MarcZX10
left a comment
Contributor
There was a problem hiding this comment.
Reviewed — looks good
The reviewed change at head 4bb061a6c82e147cf1236e9bcc0849e090b1f43c distributes discovered test cases across three CTest invocations, and the inspected code supports the stated shard behavior.
What I ran
No commands were run. I inspected the prepared diff and the changed files at the pinned head.
Results
| Check | Result | Note |
|---|---|---|
| Diff and changed code review | passed | Both changed files inspected |
| Automated checks | not run | Relied on review bundle’s author-reported results |
Findings
Blocking
None.
Non-blocking
None.
Not verified
The full test suite, Windows runtime behavior, and reported benchmark results were not independently verified. files.json was not available through the reader, so I could not confirm the excluded-file inventory. The review manifest lists two changed files, both of which were read: CMakeLists.txt and tools/tests/test_rebase_verify.py.
To get this to a good state
Nothing is required.
12 tasks done
12 tasks done
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.
What
rebase_verifyis over the 30 s that CONTRIBUTING.md allows a test on every Windows run. Thewindowsjob of the Build workflow onmainreports it at 48.2 to 49.8 s in each of its last four completed runs (44970429056, 44968344723, 44963555299, 44955500745), and the Windows MSYS2 nightly at 44.1 s (44884949723). ItsTIMEOUTis 60.Why: the script is git process start-ups. Counting
subprocess.runcalls in one run of the 42 tests on Windows: 610 calls togit, 39.1 ms each on average, 23.9 s of the 26.2 s run (91%). Eachverify()runs about ten git commands, and most tests build their own commits first.This PR splits the script into three ctest runs with the
--shard INDEX/COUNTschemeconventions_function_bodiesalready uses: the cases are sorted by id and dealt round-robin. The first shard keeps the namerebase_verify; the others arerebase_verify_shard_1andrebase_verify_shard_2, each with the existingTIMEOUT 60. A newTestShardTestschecks that the shards run every case exactly once. No test is removed or changed.check_test_registration.pyaccepts the registration: a script run without class names counts as running all of its classes.Tested
Windows 11 Pro 26H2 (10.0.26300), AMD Ryzen 7 5800X (8 cores, 16 threads), MSYS2 UCRT64 GCC 16.2.0, Python 3.12.10, Git 2.56.1.windows.1, Release,
BUILD_TESTING=ON, non-elevated.mainc94713f7c7against this PR on top of it. Times are the ctest times of each run.main(rebase_verify)rebase_verify/_shard_1/_shard_2)-j3, 3 runsctest -j16 --timeout 120Alone, the three shards together take 2 to 3 s more than the single run (Python start-up and the shared fixture repository of
RebaseVerifyTests, built once per shard). The Windows runners took 48 to 50 s for what takes 35 s alone here; at the same ratio the slowest shard would take about 21 s there. That is an estimate; the CI annotations of this PR's run will show it.python tools/tests/test_rebase_verify.py --shard N/3for N = 0, 1, 2 runs 15, 14 and 14 tests, all passing; the whole script still runs all 43 withunittest.main().--shard 3/3and--shard xexit 2 with a message.CMakeLists.txt, sotools/select_tests.pyselects the full run:ctest -j16 --timeout 120, 6686 tests, 6649 passed, 34 skipped (Linux dma-buf paths, device features the GPU lacks, no 120 Hz or HDR display, and tests that need elevation), 3 failed, 605 s. The three also fail onmainon this machine:agc_process_sampler_stack(test(libSceAgcDriver): check the sampled caller through native unwind data on SEH toolchains #24354),agc_storage_write_back_host_retile(test(agc): settle the padding block's import before the write-back route checks #23751) andagc_driver_cpu_label_wake(test(libSceAgcDriver): submit the CPU label wake without sleep_for #25147).check_test_registration.py buildpasses (check_test_registration_scriptandtest_registrationpass in the full run).tools/check_conventions.pypasses.tools/pr_overlap.py --branchfinds no overlapping change; it could not compareCMakeLists.txtwith 18 pull requests that conflict withmain. I read theirCMakeLists.txthunks: none touches therebase_verifyregistration, and the nearest (test(tools): cover the stub, seed, packaging and selection tools #22178) adds lines aftercheck_test_registration_script, three unchanged lines away.Checklist
main; no other open PR implements the same functionsNotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt file.mdfiles or images added to the repository (attach them to this PR)🤖 Generated with Claude Code