Repository navigation
[None][test] Add a timeout to the subprocess.run call in test_bolt - #20305
Conversation
test_subprocess_timeouts requires every subprocess.run under tests/ to pass a timeout. The gcc call that builds a scratch shared object in test_bolt.py had none, so the policy test fails on every pre-merge run. Bound it at 60 seconds. Signed-off-by: chenfeiz0326 <203214996+chenfeiz0326@users.noreply.github.com>
|
/bot run |
|
PR_Github #77881 [ run ] triggered by Bot. Commit: |
|
PR_Github #77881 [ run ] completed with state |
|
CI is green. @mlefeb01 @yihwang-nv, could one of you take a look? It's a one-line |
|
[Repair Bot] NVBug 6929769 appears to have the same root cause as this PR.
If this is a different root cause, an NVIDIA collaborator can request a separate attempt by commenting |
|
Automatically added "ci: full pre-merge approved" because this PR has satisfied the required GitHub review approvals. Unresolved review conversations and other required checks remain independent merge requirements. |
Description
tests/unittest/scripts/test_subprocess_timeouts.py::test_subprocess_run_calls_have_timeouts(from #18812) requires everysubprocess.runundertests/to pass a timeout. #20024 added agcccall intests/unittest/scripts/test_bolt.py(_compile_so, which builds a scratch shared object) without one. Since then, theunittest/scriptsstage has failed on pre-merge runs onCPU-Generic-x86-1/arm-1. In recent L0 builds it failed on 7 unrelated PRs (e.g. #20099, #20151, #19492, #19722, #19275, #20253, #20250):This PR adds
timeout=60to that call. It compiles a one-line C file, so 60 s is generous. A hang now fails the test instead of the stage.Test Coverage
_candidate_paths+_missing_timeout_lines) over the patched tree: 119 files scanned, 0 violations. On currentmainit reportstests/unittest/scripts/test_bolt.py:123.test_bolt.pybehaviour is unchanged, apart from the bound on thatgcccall.PR Checklist
🤖 Generated with Claude Code
Dev Engineer Review
_compile_sonow passestimeout=60tosubprocess.runwhen it invokesgcc. This satisfies the existing policy test, which checks thatsubprocess.runcalls in the test tree specify a timeout. No other behavior change is reported. Current review finding counts are unavailable.QA Engineer Review
tests/unittest/scripts/test_bolt.pychanged. The change does not add or modify test functions; it bounds the compiler subprocess used by existing tests. The policy test checks for missing timeouts, but no test run result is provided. Coverage verdict: sufficient for this timeout-policy change. No CI or manual-QA test-list entry applies to this unit test file.Per-File QA Perspective
tests/unittest/scripts/test_bolt.py: Existing BOLT helper tests compile temporary shared objects through_compile_so; the compiler call now stops after 60 seconds. This unit test file is not listed in the integration CI or manual-QA lists.