test: Fail on self-check warnings in test_runner.py
What changed, and why it matters
This commit changes Bitcoin Core's internal test tooling so that self-check warnings always cause test runs to fail, instead of only doing so when a special '--ci' flag was passed. It also removes the now-unused '--ci' flag from CI scripts. This is a testing-hygiene improvement, not a fix for a security vulnerability in the Bitcoin software itself.
No security action required. Treat as routine test-infrastructure cleanup. Reviewers may verify that CI still passes and that the removed '--ci' option is not referenced elsewhere in documentation or scripts.
Security signals we found
No security-relevant code paths modified
Change is confined to test framework and CI configuration
No input parsing, cryptography, networking, or consensus logic affected
No vulnerability disclosure language in commit title or message
Evidence from the diff
The patch removes the ‘–ci’ argument from test_runner.py and sets fail_on_warn = True unconditionally. CI workflow and shell script invocations are updated to drop the obsolete ‘–ci’ flag. The change ensures self-check warnings (e.g., test framework sanity checks) fail the test runner in all environments, not just CI. It does not alter consensus, networking, wallet, or RPC code.
Changed components
test/functional/test_runner.py.github/workflows/ci.ymlci/test/03_test_script.shInspect captured patch +5 / −5
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index 97cbbeb2..285f9251 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -326,7 +326,7 @@ jobs:
BITCOINWALLET: '${{ github.workspace }}\build\bin\Release\bitcoin-wallet.exe'
BITCOINCHAINSTATE: '${{ github.workspace }}\build\bin\Release\bitcoin-chainstate.exe'
TEST_RUNNER_EXTRA: ${{ github.event_name != 'pull_request' && '--extended' || '' }}
- run: py -3 test/functional/test_runner.py --jobs $NUMBER_OF_PROCESSORS --ci --quiet --tmpdirprefix="${RUNNER_TEMP}" --combinedlogslen=99999999 --timeout-factor=${TEST_RUNNER_TIMEOUT_FACTOR} ${TEST_RUNNER_EXTRA}
+ run: py -3 test/functional/test_runner.py --jobs $NUMBER_OF_PROCESSORS --quiet --tmpdirprefix="${RUNNER_TEMP}" --combinedlogslen=99999999 --timeout-factor=${TEST_RUNNER_TIMEOUT_FACTOR} ${TEST_RUNNER_EXTRA}
- name: Clone corpora
if: matrix.job-type == 'fuzz'
@@ -501,7 +501,7 @@ jobs:
env:
TEST_RUNNER_EXTRA: ${{ github.event_name != 'pull_request' && '--extended' || '' }}
run: |
- py -3 test/functional/test_runner.py --jobs $NUMBER_OF_PROCESSORS --ci --quiet --tmpdirprefix="$RUNNER_TEMP" --combinedlogslen=99999999 --timeout-factor=$TEST_RUNNER_TIMEOUT_FACTOR $TEST_RUNNER_EXTRA \
+ py -3 test/functional/test_runner.py --jobs $NUMBER_OF_PROCESSORS --quiet --tmpdirprefix="$RUNNER_TEMP" --combinedlogslen=99999999 --timeout-factor=$TEST_RUNNER_TIMEOUT_FACTOR $TEST_RUNNER_EXTRA \
`# feature_unsupported_utxo_db.py fails on Windows because of emojis in the test data directory.` \
--exclude feature_unsupported_utxo_db.py \
`# See https://github.com/bitcoin/bitcoin/issues/31409.` \
diff --git a/ci/test/03_test_script.sh b/ci/test/03_test_script.sh
index 1cf9eb23..1bd9fcfc 100755
--- a/ci/test/03_test_script.sh
+++ b/ci/test/03_test_script.sh
@@ -184,7 +184,7 @@ if [ "$RUN_FUNCTIONAL_TESTS" = "true" ]; then
eval "TEST_RUNNER_EXTRA=($TEST_RUNNER_EXTRA)"
LD_LIBRARY_PATH="${DEPENDS_DIR}/${HOST}/lib" \
"${BASE_BUILD_DIR}/test/functional/test_runner.py" \
- --ci "${MAKEJOBS}" \
+ "${MAKEJOBS}" \
--tmpdirprefix "${BASE_SCRATCH_DIR}/test_runner/" \
--ansi \
--combinedlogslen=99999999 \
diff --git a/test/functional/test_runner.py b/test/functional/test_runner.py
index 425205b3..ae2320a1 100755
--- a/test/functional/test_runner.py
+++ b/test/functional/test_runner.py
@@ -410,7 +410,6 @@ def main():
parser.add_argument('--ansi', action='store_true', default=sys.stdout.isatty(), help="Use ANSI colors and dots in output (enabled by default when standard output is a TTY)")
parser.add_argument('--combinedlogslen', '-c', type=int, default=0, metavar='n', help='On failure, print a log (of length n lines) to the console, combined from the test framework and all test nodes.')
parser.add_argument('--coverage', action='store_true', help='generate a basic coverage report for the RPC interface')
- parser.add_argument('--ci', action='store_true', help='Run checks and code that are usually only enabled in a continuous integration environment')
parser.add_argument('--exclude', '-x', action='append', help='specify a script to exclude. Can be specified multiple times. The .py extension is optional.')
parser.add_argument('--extended', action='store_true', help='run the extended test suite in addition to the basic tests')
parser.add_argument('--help', '-h', '-?', action='store_true', help='print help text and exit')
@@ -425,7 +424,8 @@ def main():
parser.add_argument('--resultsfile', '-r', help='store test results (as CSV) to the provided file')
args, unknown_args = parser.parse_known_args()
- fail_on_warn = args.ci
+ # Fail on self-check warnings before running the tests.
+ fail_on_warn = True
if not args.ansi:
global DEFAULT, BOLD, GREEN, RED
DEFAULT = ("", "")
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.