What changed, and why it matters
This commit only tightens a unit test's error-message check. It does not change production code, network behavior, or wallet logic, so it has no direct security impact on users.
No action needed; this is a benign test-only change.
Security signals we found
No strong security signals were identified.
Evidence from the diff
The change is in src/test/system_tests.cpp inside the BOOST_AUTO_TEST_CASE(run_command) test. It makes the substring match in an exception message more specific by including the expected exit code (1) and stderr output (‘err’) in the searched string. This is a test-hardening follow-up to a prior fix and does not alter any runtime behavior of Bitcoin Core.
Changed components
src/test/system_tests.cppInspect captured patch +1 / −1
diff --git a/src/test/system_tests.cpp b/src/test/system_tests.cpp
index 0ba58bcc..f4490dec 100644
--- a/src/test/system_tests.cpp
+++ b/src/test/system_tests.cpp
@@ -69,7 +69,7 @@ BOOST_AUTO_TEST_CASE(run_command)
const std::string expected{"err"};
BOOST_CHECK_EXCEPTION(RunCommandParseJSON(command), std::runtime_error, [&](const std::runtime_error& e) {
const std::string what(e.what());
- BOOST_CHECK(what.find(strprintf("RunCommandParseJSON error: process(%s) returned", util::Join(command, " "))) != std::string::npos);
+ BOOST_CHECK(what.find(strprintf("RunCommandParseJSON error: process(%s) returned %s: %s", util::Join(command, " "), 1, "err")) != std::string::npos);
BOOST_CHECK(what.find(expected) != std::string::npos);
return true;
});
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.