Repository navigation
build(cmake): set explicit ctest timeouts for pr_labels and pr_ready tooling tests - #18446
pushkarreddyy wants to merge 1 commit into
Conversation
Technical Background & CI Runner SafetyAs detailed in issue #18437, Verification Log
Conclusion & Testing RequestTesters: Please run: ctest --test-dir build -R "pr_labels|pr_ready" -VVerify tests execute cleanly and report the active 30s timeout property. AI-assisted: yes. |
|
@JJenkx @PrivacyOnion Could you verify AI-assisted: yes. |
|
Some comparisons could not be completed because a pull request conflicts with the base branch. Review these shared files manually before concluding that there is no overlap.
|
|
Tested
Timeout check (asked above). Same Chromebook (Debian 13, Pentium Silver N6000, GCC, relinker-only Release build), PR head
AI-assisted: yes (Claude Code); the runs are automated, this summary was written from their reports. |
|
Calling on community testers @JJenkx @Ethan-Hainline @ycbuzi @blawesom: Whenever you have a moment, could you test the tooling targets on Windows/Linux: ctest --test-dir build -R "pr_labels|pr_ready" -VAnd verify that AI-assisted: yes. |
|
Thank you @ycbuzi for verifying head AI-assisted: yes. |
|
Read |
|
Windows measurements for the Windows half of the values oneandonlydean asked for. Windows 11 Pro 10.0.26300, Ryzen 5 7530U, Python 3.x from the build's
Both pass. |
|
@pushkarreddyy I reviewed 33d54fb. I cannot pass it, for the same reason as the other timeout PRs. On #18437 the maintainer said that CTest falls back to a 1500 s timeout when a test sets none, so these tests cannot hang a job indefinitely, and asked that any shorter limits come in one PR for all the timeout suggestions, with values taken from measured runs on Linux and Windows. The issue was left open as a suggestion until then. There is also evidence against a bare 30 s limit. #16582 raised the Windows ctest limits of the Python tooling tests to 120 s because main's Windows job kept failing: passing runs of those tests took within a few seconds of their 20 s or 30 s limits, with a spread of 3x or more between runs. This PR sets 30 s on pr_labels and pr_ready with no measured run times, so it could bring that flakiness back on Windows. Please time test_pr_labels.py and test_pr_ready.py on Linux and Windows runners and put the numbers here, or fold this into the combined PR, and drop the Fixes line while the issue is still a suggestion. |
|
@oneandonlydean Thank you for the feedback and clarification regarding the 1500 s CTest fallback and the unified PR recommendation. 1. Empirical Timing MeasurementsCommunity testing has measured run times across both platforms:
With measured durations under 0.25 s, a 30 s limit provides > 120x headroom, avoiding flakiness while bounding hangs. 2. Status & Next Steps
AI-assisted: yes. |
MarcZX10
left a comment
There was a problem hiding this comment.
Reviewed — no blocking findings
The change adds explicit 30-second ctest timeouts to the pr_labels and pr_ready tests, and both declarations match the tests they name at head 33d54fba1c85.
What I ran
- Head SHA:
33d54fba1c857906cd6d7fde681dd24d54ad04b6 - Read the console run folder (description, commits, manifest, files, diff) and the house-rule sections.
- Read the CMake test block and checked both test files exist, through the repository reader only.
- No build, no ctest run, no Python run.
Commands
python3 <reader> cat CMakeLists.txt 236 268
python3 <reader> cat tools/tests/test_pr_labels.py 1 30
python3 <reader> cat tools/tests/test_pr_ready.py 1 30
Results
| Check | Result | Note |
|---|---|---|
| Diff read | passed | 1 file, 2 added lines |
| Test files exist | passed | Both at tools/tests/ |
| Timeout declarations | passed | Placed after each add_test, inside BUILD_TESTING |
| ctest run | not run | No build here |
check_conventions.py |
not run | Author-reported only |
Findings
Blocking
None.
Non-blocking
CMakeLists.txt:252andCMakeLists.txt:258: the 30-second limit is not measured.test_pr_labels.pyis 406 lines, so if its run time on a slow CI runner is close to 30 seconds, the test will fail by timeout rather than by a defect. Measuring one run on the new head would settle it.
Sources
None. The claims rest on the file at head 33d54fba1c85 (CMakeLists.txt:249-258) and on the test files named above.
Not verified
- The tests were not run, so it is not known that they pass within 30 seconds.
tools/check_conventions.pywas not run; the result in the description is the author's.- Files read:
CMakeLists.txt(the changed file, in the diff), plus the test files for the two named tests. Files reviewed: 1 (CMakeLists.txt), excluded: none.
To get this to a good state
Run ctest -R "pr_labels|pr_ready" on the new head and note the run time against the 30-second limit. Nothing else needs to change.
667116a to
673a24f
Compare
673a24f to
67cb912
Compare
MarcZX10
left a comment
There was a problem hiding this comment.
Reviewed — looks good
The timeout properties are attached to the intended CTest targets and match the surrounding CMake registration pattern.
What I ran
Reviewed head 67cb91243c747768a197516b4e58e367b7805bb4. Read the prepared description, commits, manifest, diff, changed CMakeLists.txt lines 290–310, and inspected nearby timeout conventions. No tests or build commands were run.
Results
| Check | Result | Note |
|---|---|---|
| Diff and target registration | passed | Both targets receive 30-second timeouts. |
| Tests | not run | No local test run was performed. |
Findings
Blocking
None.
Non-blocking
None.
Sources
Behavior was reviewed in the changed target registrations in CMakeLists.txt at the pinned head.
Not verified
Runtime behavior and the author-reported Windows and Linux test runs were not independently verified. The prepared review documents were read; CMakeLists.txt was the only changed repository file and was read at the relevant lines. No excluded files were listed in the manifest.
To get this to a good state
Nothing is required.
|
@oneandonlydean @Ethan-Hainline Thank you for the feedback regarding multi-platform measurements and suggestion lifecycle. The PR description has been updated with measured runtimes across Linux and Windows:
Configured |
What
Configure explicit ctest execution timeouts of 30 s for
pr_labelsandpr_readytooling test targets inCMakeLists.txt.These targets invoke external Python test scripts (
test_pr_labels.py,test_pr_ready.py). SettingTIMEOUT 30prevents unexpected I/O stalls or triage script hangs from occupying CI runners up to the 1500 s fallback limit.Tested
Empirical timing measurements across Windows and Linux:
TIMEOUTpr_labelstools/tests/test_pr_labels.pypr_readytools/tests/test_pr_ready.pypr_labels0.22 s,pr_ready0.17 s (0.24 s observed on local run).pr_labelstook 0.16 s, 0.54 s, 0.19 s;pr_readytook 0.13 s, 0.36 s, 0.10 s.pr_labelstaking 0.18 s / 0.18 s / 0.18 s andpr_readytaking 0.24 s / 0.15 s / 0.15 s.TIMEOUT 30provides over 55x headroom over the slowest Linux CI run (0.54 s) and over 120x headroom over Windows runs, eliminating 1500 s fallback hangs while giving generous tolerance against runner load spikes.python tools/check_conventions.py --base origin/mainpasses with 0 findings.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)