AI-generated analysisPublished automatically and not human-verified. Validated context appears in community notes below.
← Watch feed
Informational 15 Bitcoin

test framework: expand expected_stderr, expected_ret_code options

Public commit record

What the developer wrote

Authored by Ryan Ofsky

83/100 · Strong
test framework: expand expected_stderr, expected_ret_code options

Allow `expected_stderr` option passed to `wait_until_stopped` and
`is_node_stopped` helper functions to be a regex pattern instead of just a
fixed string.

Allow `expected_ret_code` be list of possible exit codes instead of a single
error code to handle the case where exit codes vary depending on OS and libc.
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Mentions testing or verification
The short version

What changed, and why it matters

This commit changes Bitcoin Core's internal testing helper code. It makes two test-only quality-of-life improvements: an expected error message can now be a regular expression pattern instead of only a fixed string, and an expected program exit code can now be a list of acceptable values instead of a single value. These changes only affect how tests validate results; they do not change the behavior of the Bitcoin Core software that users run.

Recommended action

No security action needed. This is a benign test-framework enhancement. Reviewers may optionally verify that the regex path handles bytes vs strings correctly and that the Iterable check does not accidentally treat strings as iterables of characters (the supplied expected_ret_code is an int, so this is not a concern here).

Security signals we found

No strong security signals were identified.

Risk score

Why this scored 15/100

Our methodology →
Potential impact 0/30
Exploitability 0/25
Stealth signal 0/15
Affected reach 0/15
Confidence 10/10
Evidence quality 5/5
Human-validated context

Community notes

Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.

No validated notes yet.

The AI analysis stands alone for now. Submit a note if you can add evidence or important context.