Skip to content

build(cmake): set explicit ctest timeouts for export_gap, unwrap_self and audit_dump - #18448

Closed
pushkarreddyy wants to merge 1 commit into
boykopovar:mainfrom
pushkarreddyy:build/cmake-audit-tooling-timeouts
Closed

pushkarreddyy wants to merge 1 commit into
boykopovar:mainfrom
pushkarreddyy:build/cmake-audit-tooling-timeouts

Conversation

@pushkarreddyy

@pushkarreddyy pushkarreddyy commented Nov 11, 2026 •

Copy link
Copy Markdown
Contributor

What

Configure explicit ctest execution timeouts for export_gap, unwrap_self and audit_dump tooling test targets in CMakeLists.txt.

These targets invoke external Python test scripts (test_export_gap.py, test_unwrap_self.py, test_audit_dump.py). Setting TIMEOUT 30 prevents unexpected I/O stalls or directory traversal hangs from occupying CI runners up to the 1500 s fallback limit.

Tested

  • Windows measurements (Windows 11 Pro, Ryzen 5 7530U, Python 3.x, Release):
    • export_gap: 0.11 s
    • audit_dump: 0.11 s
  • Linux measurements (Debian 13, Pentium Silver N6000 4 cores, GCC 14.2.0, relinker-only):
    • export_gap: 0.27 to 0.35 s
    • unwrap_self: 0.30 s
    • audit_dump: 0.63 to 0.66 s
  • Margin: TIMEOUT 30 provides over 45x to 270x headroom over the slowest measured run (0.66 s).
  • Pre-flight conventions: python tools/check_conventions.py --base origin/main (0 findings).

Checklist

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

@pushkarreddyy

Copy link
Copy Markdown
Contributor Author

Technical Background & CI Runner Safety

As detailed in issue #18439, export_gap, unwrap_self, and audit_dump are binary inspection tests that inspect ELF binaries, extract NIDs, and validate symbol catalogs. Without an explicit CTest timeout, anomalous inputs or file locking can hang worker runners indefinitely.

Verification Log

  • Conventions Check: python tools/check_conventions.py --base origin/main passed with 0 findings.
  • CTest Run:
    Test project c:/Users/pushk/Documents/antigravity/epic-bardeen/build
        Start 1: export_gap
    1/3 Test #1: export_gap .........................   Passed    0.34 sec
        Start 2: unwrap_self
    2/3 Test #2: unwrap_self ........................   Passed    0.28 sec
        Start 3: audit_dump
    3/3 Test #3: audit_dump .........................   Passed    0.30 sec
    100% tests passed, 0 tests failed out of 3
    
  • Configured set_tests_properties(export_gap unwrap_self audit_dump PROPERTIES TIMEOUT 30).

Conclusion & Testing Request

Testers: Please run:

ctest --test-dir build -R "export_gap|unwrap_self|audit_dump" -V

Verify all three binary inspection targets complete under 30 seconds.

AI-assisted: yes.

@pushkarreddyy

Copy link
Copy Markdown
Contributor Author

@JJenkx @PrivacyOnion Could you verify ctest --test-dir build -R "export_gap|unwrap_self|audit_dump" -V on Windows and Linux when you get a chance?

AI-assisted: yes.

@github-actions github-actions Bot added the fix error Closes an issue (Fixes #N) label Nov 11, 2026
@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 21453 CMakeLists.txt L448

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 7642 CMakeLists.txt
PR 9508 CMakeLists.txt
PR 10193 CMakeLists.txt
PR 10897 CMakeLists.txt
PR 13928 CMakeLists.txt
PR 13929 CMakeLists.txt
PR 17558 CMakeLists.txt
PR 18369 CMakeLists.txt
PR 22175 CMakeLists.txt
PR 22179 CMakeLists.txt
PR 22267 CMakeLists.txt
PR 22282 CMakeLists.txt

@ycbuzi

ycbuzi commented Nov 11, 2026 •

Copy link
Copy Markdown
Contributor

Tested e91c44e0ce 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.

Timeout check (asked above). Same Chromebook (Debian 13, Pentium Silver N6000, GCC, relinker-only Release build), PR head e91c44e0ce merged into main 65351c2931 as fab1b64f51: ctest --test-dir build -R "export_gap|unwrap_self|audit_dump" -V three times, all passed 3 of 3, and -V prints Test timeout computed to be: 30 for each. TIMEOUT read from ctest --show-only=json-v1:

Test main with this PR Time, runs 1 / 2 / 3
export_gap not set 30 0.35 / 0.27 / 0.27 s
unwrap_self 30 already 30 0.30 / 0.30 / 0.30 s
audit_dump not set 30 0.63 / 0.66 / 0.66 s

unwrap_self already has TIMEOUT 30 on main (set in the per-case loop in CMakeLists.txt), so for it the new line restates the same value; export_gap and audit_dump are the ones this changes. The regex also matches the 81 unwrap_self_* per-case tests, which all passed 3 of 3 with a computed timeout of 30.

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

@pushkarreddyy

Copy link
Copy Markdown
Contributor Author

Calling on community testers @JJenkx @Ethan-Hainline @ycbuzi @blawesom:

Whenever you have a chance, could you run the targeted tooling tests on Windows/Linux:

ctest --test-dir build -R "export_gap|unwrap_self|audit_dump" -V

And verify that the active 30s timeout property is reported via:

ctest --show-only=json-v1

Please provide the host environment details, execution times, and confirm that all tests pass without timeout or regression.

AI-assisted: yes.

@pushkarreddyy

Copy link
Copy Markdown
Contributor Author

Thank you @ycbuzi for testing head e91c44e0ce merged into main across Linux Debian 13 (Pentium Silver N6000, relinker-only build), confirming 100% pass across all 3 runs (863/863 tests passed) with the explicit timeouts on export_gap, unwrap_self, and audit_dump.

AI-assisted: yes.

@gabichuuuuu

Copy link
Copy Markdown
Contributor

Read e91c44e0ce against main f57c971559. Correctness. export_gap, unwrap_self and audit_dump are added just above the new call, so the names resolve. Non-blocking. unwrap_self already gets TIMEOUT 30 further down, where the per-case split sets its ENVIRONMENT (top-level CMakeLists.txt, the unwrap_self_first branch), so listing it here is redundant. Not run here; this is from reading the code. AI-assisted: yes.

@Ethan-Hainline

Copy link
Copy Markdown
Contributor

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

Test Elapsed
export_gap 0.51 s
unwrap_self 0.37 s
audit_dump 1.50 s

All three pass. TIMEOUT 30 leaves about 20x headroom over audit_dump, the slowest, so it will not fail a healthy Windows run; the value only cuts the 1500 s default short when something stalls.

@pushkarreddyy

Copy link
Copy Markdown
Contributor Author

Thank you @gabichuuuuu for verifying the CMake property resolution and @Ethan-Hainline for the Windows empirical measurements (export_gap: 0.51 s, unwrap_self: 0.37 s, audit_dump: 1.50 s).

Updated the PR description to Fixes: none so issue #18439 remains open as a suggestion. These measured timings confirm generous headroom (~20x over audit_dump), ready to be consolidated into the unified tooling timeout PR as requested by maintainers.

AI-assisted: yes.

@github-actions github-actions Bot added needs rebase Conflicts with main, rebase needed and removed fix error Closes an issue (Fixes #N) labels Nov 12, 2026
@pushkarreddyy
pushkarreddyy force-pushed the build/cmake-audit-tooling-timeouts branch 2 times, most recently from 2668907 to 46c8183 Compare November 12, 2026 15:02
@github-actions github-actions Bot removed the needs rebase Conflicts with main, rebase needed label Nov 13, 2026
@pushkarreddyy
pushkarreddyy force-pushed the build/cmake-audit-tooling-timeouts branch from 46c8183 to 09bed7a Compare November 13, 2026 16:17
@pushkarreddyy

Copy link
Copy Markdown
Contributor Author

Consolidated into single measured tooling timeout PR #18425 with multi-platform empirical timings per maintainer review on #18418.

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.

4 participants