2 minor findings · 3 suggestions
Earlier concerns neither republished nor resolved: 4 minor findings · 5 suggestions. See the Run archive for their assessments.
Findings
[minor] · The documented core-dump option is rejected
Following the README's --catch_system_errors=no instructions makes test_bitcoin exit with an unknown-argument error before running any test.
Location: src/test/util/framework.cpp:317 (head).
Details and suggested fix
parse_args accepts only the singular --catch_system_error spelling. The plural option documented in src/test/README.md:153-157 falls through to Unknown argument, so run() prints usage and returns UnknownArgs (2). CTest and libmultiprocess CI use the accepted singular spelling and are unaffected. Accept the plural spelling as an alias to keep the documented command working. Also update the README's explanation of the default: the new runner installs no system-error handler, so users need the normal OS core-dump settings rather than an option to bypass interception.
[minor] · CTest discovery ignores TEST_SUITE_BEGIN suites
A new suite declared only with TEST_SUITE_BEGIN gets no CTest entry, so the documented workflow and CI skip it even though direct test_bitcoin execution runs it.
Location: src/test/util/framework.h:476 (head).
Details and suggested fix
TEST_SUITE_BEGIN registers cases with the runner, but add_boost_test reads the source text and recognizes only BOOST_FIXTURE_TEST_SUITE and BOOST_AUTO_TEST_SUITE. A new or wholly migrated suite using the replacement spelling therefore produces no --run_test=<suite> CTest entry. The unit-test path in ci/test/03_test_script.sh:180-189 invokes CTest, so it does not run that suite. No checked-in source uses TEST_SUITE_BEGIN directly yet; this affects adoption of the new API rather than an existing suite. Extend both CMake scanner expressions to recognize TEST_SUITE_BEGIN while retaining the Boost spellings.
Optional improvements
[suggestion] · Runner failure-to-exit propagation has no regression test
The migrated passing suites do not check that failed assertions and exceptions escaping a test produce a failing process exit status.
Location: src/test/util/framework.cpp:403 (head).
Details and suggested fix
A failed REQUIRE relies on record_check counting the failure before the runner swallows RequireFailed. Other exceptions rely on exception_occurred(), and the final exit status relies on summary.failed. No focused regression test verifies this end to end, so returning success after recorded failures could go undetected by normally passing suites. Add a small separate executable linked against test_framework, with cases containing a failing CHECK, a failing REQUIRE followed by a sentinel, and an exception escaping the test. Have a harness run each case separately, check its exit code and diagnostics, and verify that the sentinel does not execute. Also cover --log_level=nothing. This keeps intentional failures out of test_bitcoin.
[suggestion] · CHECK leaves its mixed-signed integer semantics undocumented
CHECK and the comparison shims silently use mathematical integer comparisons, so mixed-signed operands can produce a different result from the written C++ expression.
Location: src/test/util/framework.h:337 (head).
Details and suggested fix
When both operands satisfy is_non_bool_char_int, the decomposer calls std::cmp_* instead of the written operator. For example, CHECK(-1 < 1u) passes although the built-in C++ expression is false. The BOOST_TEST and comparison shims use this path, while BOOST_CHECK evaluates its predicate natively, so the assertion forms can disagree. The signedness-safe choice avoids sign-compare warnings, but the assertion documentation does not explain it. Document the mathematical-value semantics at DECOMPOSE_OP and CHECK. No current assertion comparing a negative signed value with an unsigned one was found, so the impact on the current suite remains unconfirmed.
[suggestion] · Exception-only failures report 0/N checks failed
A test that fails through an exception escaping its body gets 0/N checks failed in its per-test summary, leaving the cause only in the separate exception diagnostic.
Location: src/test/util/framework.cpp:420 (head).
Details and suggested fix
exception_occurred() sets m_did_throw without changing the assertion counters, and passed() correctly takes that flag into account. The [FAIL] line prints only stats.failed_checks and stats.checks, so an exception after N passing checks produces [FAIL] suite/case (0/N checks failed). The preceding EXCEPTION in ... diagnostic and the failing process exit status are correct. Include an exception marker in the per-test summary so that scanning the [FAIL] lines also explains why these tests failed.
Earlier concerns
Earlier reports raised these, with the titles and severities shown there. This review neither republished nor resolved them.
- [suggestion]: Verify the vcpkg Boost workaround is obsolete for remaining Boost headers
- [minor]:
--run_testno longer supports wildcard filters - [minor]: Reject malformed shuffle-seed values
- [minor]: Do not apply
strcmpto raw character-pointer comparisons - [minor]: C-string checks replace pointer equality with content equality
- [suggestion]: Add focused tests for runner options and filters
- [suggestion]: Clarify the runner's default system-error behavior
- [suggestion]: Descriptor checks no longer show compared values on failure
- [suggestion]: Document the actual full test-name separator