Repository navigation
Bound test run time: per-test wall clock in the runner, per-case bound in the corpus tests - #2179
Merged
Merged
Conversation
…d in the corpus tests run-ci-tests.sh runs each test under PERUN_TEST_TIMEOUT_S (default 900; a bad value falls back to 900) and reports a timed-out test as a FAIL line. The two security-gate corpus tests bound each guard check to 5 seconds, and the privacy-gate call gets a 120 second timeout. Child processes a test starts are outside the bound; the fragment states the limits. Tests: affected 19/19 (run-ci-tests --affected against main, incl. the new timeout test and the security-gates corpus), changelog fragments 23/23 Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
A test that never returns now fails after 900 seconds instead of running until someone stops it, and each security-gate corpus case is bounded to 5 seconds.
What changes
scripts/run-ci-tests.shruns each test underPERUN_TEST_TIMEOUT_S(default 900; a missing, non-numeric, non-positive or over-long value means 900). A test the alarm stops printsrun-ci-tests: FAIL <test> (timed out after Ns)and fails like any other failure.scripts/test_security_gates_corpus.pyand the in-process Python blocks ofscripts/test-destructive-guard.shbound each guard check to 5 seconds, so a hung check is a FAIL line naming the case. The privacy-gate call gets a 120 second timeout.scripts/ci-tests.d/run-ci-tests-timeout.sh;scripts/test_hermetic_children.pynow reads the wrapped runner line.Known limits
The alarm stops the test's own process, not children it started, so a caller that pipes the runner's output waits for those. A test that arms its own alarm replaces the runner's, and both corpus tests do: outside a case they run unbounded. The destructive-guard selftest and hook calls are bounded by the runner only.
Verification
Tests: affected 19/19 (run-ci-tests --affected against main, incl. the new timeout test and the security-gates corpus), changelog fragments 23/23
🤖 Generated with Claude Code