ci: Allow overwriting check option in run() helper
What changed, and why it matters
This is a tiny internal cleanup in Bitcoin Core's continuous integration (CI) test script. It changes how a Python helper passes the 'check' option to subprocess commands so callers can override it. There is no security issue in the change itself.
No security action required. Treat as normal CI maintenance.
Security signals we found
No strong security signals were identified.
Evidence from the diff
The commit modifies ci/test/02_run_container.py. Previously run() always invoked subprocess.run(cmd, check=True, kwargs), meaning a caller could not override check via kwargs (because a later keyword argument would conflict). The patch uses kwargs.setdefault(‘check’, True) and then subprocess.run(cmd, kwargs), allowing callers to pass check=False when needed. This is a pure refactor with no functional change for existing callers and no security relevance.
Changed components
ci/test/02_run_container.pyInspect captured patch +2 / −1
diff --git a/ci/test/02_run_container.py b/ci/test/02_run_container.py
index 166acad7..7b1e3e0e 100755
--- a/ci/test/02_run_container.py
+++ b/ci/test/02_run_container.py
@@ -11,8 +11,9 @@ import sys
def run(cmd, **kwargs):
print("+ " + shlex.join(cmd), flush=True)
+ kwargs.setdefault("check", True)
try:
- return subprocess.run(cmd, check=True, **kwargs)
+ return subprocess.run(cmd, **kwargs)
except Exception as e:
sys.exit(e)
Why this scored 15/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.