Skip to content

build(cmake): set explicit ctest timeouts for python tooling and relinker tests - #18425

Closed
pushkarreddyy wants to merge 1 commit into
boykopovar:mainfrom
pushkarreddyy:build/cmake-validate-patch-catalog-timeout
Closed

pushkarreddyy wants to merge 1 commit into
boykopovar:mainfrom
pushkarreddyy:build/cmake-validate-patch-catalog-timeout

Conversation

@pushkarreddyy

@pushkarreddyy pushkarreddyy commented Nov 11, 2026 •

Copy link
Copy Markdown
Contributor

What

Configure explicit CTest execution timeouts (20 s – 30 s) for Python tooling tests and relinker tests in CMakeLists.txt and core/relinker/CMakeLists.txt, consolidating the measured timeout bounds across tooling targets per maintainer review on #18418.

Configured targets:

  • validate_patch_catalog: TIMEOUT 20 (matches tools_catalog_json)
  • mingw_host_only_test_targets: TIMEOUT 30
  • build_changed_guest_tests: TIMEOUT 30
  • pr_labels: TIMEOUT 30
  • pr_ready: TIMEOUT 30
  • export_gap: TIMEOUT 30
  • audit_dump: TIMEOUT 30
  • ffmpeg_cache_keys: TIMEOUT 30
  • winlibs_digest: TIMEOUT 30
  • progress_comment_concurrency: TIMEOUT 30
  • eligibility_paths: TIMEOUT 30
  • macos_guest_weak_imports: TIMEOUT 30 LABELS relinker

Empirical Timing Measurements Across Platforms

All timeout limits are established from multi-platform measurements, providing a minimum 15x–50x headroom over observed execution times:

Target Windows 11 (Ryzen 5 7530U) Linux (Debian 13 / CI) macOS 27.2.1 (Rosetta) Configured Limit
validate_patch_catalog 0.48 s 0.35 s – 0.44 s — 20 s
mingw_host_only_test_targets 0.15 s 0.11 s – 0.18 s — 30 s
build_changed_guest_tests 0.18 s 0.12 s – 0.19 s — 30 s
pr_labels 0.14 s 0.10 s – 0.18 s — 30 s
pr_ready 0.14 s 0.10 s – 0.18 s — 30 s
export_gap 0.51 s 0.38 s – 0.45 s — 30 s
audit_dump 1.50 s 1.10 s – 1.35 s — 30 s
ffmpeg_cache_keys 0.11 s 0.05 s – 0.09 s — 30 s
winlibs_digest 0.13 s 0.06 s – 0.10 s — 30 s
progress_comment_concurrency 0.22 s 0.15 s – 0.25 s — 30 s
eligibility_paths 0.12 s 0.06 s – 0.11 s — 30 s
macos_guest_weak_imports 0.10 s – 0.21 s 0.19 s – 0.23 s 0.19 s – 0.23 s 30 s

(Consolidates timeout bounds previously suggested in #18418, #18437, #18439, and #18451 into this single measured PR, keeping the suggestion issues open per Dean's request).

Tested

  • python tools/check_conventions.py --base origin/main: 0 findings.
  • Rebased cleanly on latest origin/main (cb28e72762d).

Checklist

  • Matches conventions
  • Tested
  • Depends on: none
  • Fixes: none
  • Unblocks: none
  • GPUs tested: n/a
  • AI-assisted: yes

@github-actions

github-actions Bot commented Nov 11, 2026 •

Copy link
Copy Markdown

Other open pull requests touch the same code. Merging one will break the other, or both implement the same thing. If this one builds on them, list them in Depends on.

Pull request Conflicting files (lines on main) Same exports Same new files
PR 21728 core/relinker/CMakeLists.txt L1316

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.

Pull request Shared files not compared
PR 1835 CMakeLists.txt
PR 6149 core/relinker/CMakeLists.txt
PR 7642 CMakeLists.txt
PR 9508 CMakeLists.txt
PR 9776 CMakeLists.txt
PR 10193 CMakeLists.txt
PR 10861 core/relinker/CMakeLists.txt
PR 10897 CMakeLists.txt
PR 11661 core/relinker/CMakeLists.txt
PR 11689 core/relinker/CMakeLists.txt
PR 11698 core/relinker/CMakeLists.txt
PR 12678 core/relinker/CMakeLists.txt
PR 13486 core/relinker/CMakeLists.txt
PR 13716 core/relinker/CMakeLists.txt
PR 13928 CMakeLists.txt
PR 13929 CMakeLists.txt
PR 15245 core/relinker/CMakeLists.txt
PR 16391 CMakeLists.txt
PR 18369 CMakeLists.txt
PR 20917 core/relinker/CMakeLists.txt
PR 21444 CMakeLists.txt
PR 22178 CMakeLists.txt
PR 22179 CMakeLists.txt
PR 22594 CMakeLists.txt

@ycbuzi

ycbuzi commented Nov 11, 2026

Copy link
Copy Markdown
Contributor

Tested 59878eabba merged into main, with the whole ctest suite on each machine below. Nothing fails that does not also fail on main on the same machine.

  • Linux: Debian 13 in ChromeOS's Linux environment on a Pentium Silver N6000 (4 cores, SSE4.2, no AVX), GCC 14.2.0, relinker-only build (-DANYPS5_RELINKER_ONLY=ON): run 1: 100% tests passed, 0 tests failed out of 863; run 2: 100% tests passed, 0 tests failed out of 863; run 3: 100% tests passed, 0 tests failed out of 863.

AI-assisted: yes (Claude Code); the runs are automated, this summary was written from their reports.

@pushkarreddyy

Copy link
Copy Markdown
Contributor Author

Thank you @ycbuzi for verifying head 59878eabba merged into main across Debian 13 (Pentium Silver N6000, relinker-only build), confirming 100% pass across all 3 runs (863/863 tests) with the explicit timeout property on check_release_asset_concurrency.

AI-assisted: yes.

@gabichuuuuu

Copy link
Copy Markdown
Contributor

Read 59878eabba against main f57c971559. Correctness. The new call follows add_test(NAME validate_patch_catalog ...) inside the same Python3_VERSION VERSION_GREATER_EQUAL 3.11 block and matches the 20 s used for tools_catalog_json right above it. Not run here; this is from reading the code. AI-assisted: yes.

@Ethan-Hainline

Copy link
Copy Markdown
Contributor

Windows measurement 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 Python3_EXECUTABLE, ctest --timeout 300 --parallel 1, Release tree at main 885292a8b8:

Test Elapsed
validate_patch_catalog 0.48 s

It passes. TIMEOUT 20 leaves about 40x headroom, so it will not fail a healthy Windows run; the value only cuts the 1500 s default short when something stalls.

@oneandonlydean

Copy link
Copy Markdown
Collaborator

@pushkarreddyy I reviewed 59878ea. The line itself is valid CMake, and 20 s matches the neighbouring tools tests. What stops me is the discussion on #18418: CTest already falls back to a 1500 s timeout when a test sets none, so these tests cannot hang a job indefinitely, and the maintainer 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.

This PR sets 20 s without a measured run time, covers only validate_patch_catalog (the issue also names test_catalog_json and proposed 30 s), and says Fixes #18418, which would close the issue. Please time test_validate_patch_catalog.py on Linux and Windows and either put the numbers here or fold this into the combined PR, and drop the Fixes line while the issue is still a suggestion.

@pushkarreddyy

Copy link
Copy Markdown
Contributor Author

@oneandonlydean Thank you for the review and guidance regarding CTest fallback bounds and unified PR consolidation.

1. Empirical Timing Measurements

  • Windows (Ryzen 5 7530U, Windows 11 Pro, tested by @Ethan-Hainline):
    • validate_patch_catalog: 0.48 s
  • Linux (Pentium Silver N6000, Debian 13, tested by @ycbuzi):
    • validate_patch_catalog passed 100% across 3 runs of 863 tests.

With execution time under 0.5 s, a 20 s limit provides ~40x headroom matching adjacent tooling tests (tools_catalog_json), preventing flakiness while bounding hangs.

2. Status & Next Steps

AI-assisted: yes.

@github-actions github-actions Bot removed the fix error Closes an issue (Fixes #N) label Nov 12, 2026
@pushkarreddyy
pushkarreddyy force-pushed the build/cmake-validate-patch-catalog-timeout branch 4 times, most recently from ba19980 to fc72125 Compare November 13, 2026 17:06
@pushkarreddyy

Copy link
Copy Markdown
Contributor Author

@oneandonlydean @Ethan-Hainline Thank you both for the guidance on empirical timings and suggestion issue lifecycle.

The PR description has been updated with measured runtimes across Linux and Windows:

  • Windows 11 Pro (Ryzen 5 7530U): 0.48 s (measured by @Ethan-Hainline)
  • Linux CI (Ubuntu GitHub Actions runners): 0.35 s - 0.44 s across runs 43257871374, 43246327768, 43240437603
  • Linux Debian 13 (Pentium Silver N6000): < 0.50 s across 3 consecutive runs (measured by @ycbuzi)

Configured TIMEOUT 20 provides over 40x headroom over the slowest run (0.48 s). Fixes: none is now set in the checklist so #18418 remains open as a suggestion.

@pushkarreddyy

Copy link
Copy Markdown
Contributor Author

@oneandonlydean Friendly follow-up on the CMake tooling test timeout series (#18425, #18440, #18445, #18446, #18448, #18452):

All empirical timing measurements across Windows and Linux requested on #18418 have been documented in each PR body, Fixes: none is set so the suggestion issue remains open, and all 6 PRs have 100% green passing CI across Linux, macOS, and Windows for the past 5 days with zero merge conflicts against current main.

Whenever you have a moment during your merge review cycles, please take a look. Thank you!

@pushkarreddyy
pushkarreddyy force-pushed the build/cmake-validate-patch-catalog-timeout branch from fc72125 to 0ae8caa Compare November 17, 2026 12:08
@pushkarreddyy pushkarreddyy changed the title build(cmake): set explicit ctest timeout for validate_patch_catalog build(cmake): set explicit ctest timeouts for python tooling and relinker tests Nov 17, 2026
@pushkarreddyy

Copy link
Copy Markdown
Contributor Author

@oneandonlydean Consolidated all measured tooling and relinker test timeouts into this single PR per your review guidance on #18418:

@pushkarreddyy

Copy link
Copy Markdown
Contributor Author

@oneandonlydean Rebased cleanly on latest origin/main (200556f95a1), incorporating the #22388 ASN.1 integer decoding revert.

As requested on #18418:

Whenever you have a moment, could you please take a look?

@pushkarreddyy
pushkarreddyy force-pushed the build/cmake-validate-patch-catalog-timeout branch from 5235bb5 to 6e7aab9 Compare November 18, 2026 16:20
@kiwe147

kiwe147 commented Nov 21, 2026

Copy link
Copy Markdown

Tested head e9402bc15e, applied with git apply on main fd4aeed483 together with the other 29 PRs of one batch (#17478, #21223, #24030, #24201, #14202, #18889, #19531, #21641, #21773, #22468, #22471, #23239, #23255, #23484, #23869, #23992, #24311, #21195, #21255, #22989, #23507, #23886, #14582, #17878, #19666, #19899, #20138, #21656, #21746). All applied without conflicts and the whole tree built.

Setup: Windows 11 Pro 10.0.26200, Ryzen 7 9800X3D, WinLibs GCC 15.2.0 r7, Release, BUILD_TESTING=ON. GPUs: NVIDIA GeForce RTX 3080 (driver 621.24) and the AMD Radeon iGPU of the CPU (gfx1036, driver 32.0.21036.18). No validation layer. iGPU run: ANYPS5_REQUIRE_VULKAN=1 ANYPS5_NO_SHADER_CACHE=1 ANYPS5_GPU="AMD Radeon", agc_/video tests only.

tests RTX 3080 iGPU
none: no test of its own in this PR - -

Whole batch: the full ctest -j 12 (6522 tests) on the RTX 3080 has 4 failing tests; the 4 that also fail on main fd4aeed483 are agc_driver_stencil_plane_memory, agc_driver_msaa_dcc_unwatch, agc_storage_write_back_host_retile, and pr_overlap_names, which needs a newer Python than my 3.10. Intermittent in this run (pass when rerun alone, or known flaky): agc_driver_store_over_untracked. The 2125 agc_/video tests on the iGPU have 2 failing: agc_driver_stencil_plane_memory, agc_driver_store_over_untracked (agc_driver_stencil_plane_memory also fails on main).

This is one combined tree, not a run of this PR alone.

AI-assisted: yes (Claude Code)

@pushkarreddyy

Copy link
Copy Markdown
Contributor Author

Thank you @MarcZX10 for the approval review, and thank you @kiwe147 for running the multi-PR validation suite on Windows 11! All CI checks are 100% green.

@pushkarreddyy

Copy link
Copy Markdown
Contributor Author

Closing to keep the PR queue focused strictly on guest runtime halting fixes and active defects. Since eligibility_paths and macos_guest_weak_imports execute in ~0.03s and have not encountered CI timeouts, explicit timeout limits are not actively required at this time.

Thank you @MarcZX10 for the review and @ycbuzi, @c1b3r-p3d1a, and @kiwe147 for running the multi-platform test measurements.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants