test: Check that interrupt results in EXIT_SUCCESS
What changed, and why it matters
This is a small change to a Bitcoin Core functional test. It adds a check that when the test interrupts (stops) a running node, the node exits with status code 0 (success). Previously the test only waited for the node to stop without checking the exit code. This is a test-hardening improvement, not a fix to the Bitcoin Core software itself.
No security action required. This is a benign test-only change that improves test coverage for graceful shutdown behavior during initialization.
Security signals we found
No strong security signals were identified.
Evidence from the diff
In test/functional/feature_init.py, the line node.process.wait() is changed to assert_equal(0, node.process.wait()). This asserts that the bitcoind process returns exit code 0 after being interrupted during initialization. The change strengthens the regression test so that a non-zero exit code on clean interruption would fail the test. It does not modify production code behavior.
Changed components
test/functional/feature_init.pyInspect captured patch +1 / −1
diff --git a/test/functional/feature_init.py b/test/functional/feature_init.py
index 1ca1b15b..f9dad893 100755
--- a/test/functional/feature_init.py
+++ b/test/functional/feature_init.py
@@ -53,7 +53,7 @@ class InitTest(BitcoinTestFramework):
os.kill(node.process.pid, signal.CTRL_BREAK_EVENT)
else:
node.process.terminate()
- node.process.wait()
+ assert_equal(0, node.process.wait())
lines_to_terminate_after = [
b'Validating signatures for all blocks',
Why this scored 12/100
Community notes
Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.
The AI analysis stands alone for now. Submit a note if you can add evidence or important context.