qa: Check for platform-independent part of error message
What changed, and why it matters
This is a minor test-only change. It updates a single automated test in Bitcoin Core so that it checks for a stable, platform-independent error message ('Wallet file verification failed.') instead of a Windows-specific filesystem error string. There is no change to the actual Bitcoin Core wallet code that users run, and no security issue is present.
No security action needed. This is a routine QA/test robustness improvement.
Security signals we found
No strong security signals were identified.
Evidence from the diff
The commit modifies test/functional/wallet_multiwallet.py. The test previously asserted that createwallet(‘w8/bad’) raised an RPC error containing either ‘filesystem error:’ on non-Windows or ‘create_directories:’ on Windows. The patch replaces that platform-conditional assertion with the common, higher-level message ‘Wallet file verification failed. ‘. This makes the functional test pass reliably across native and cross-compiled Windows builds. The product code and error behavior are unchanged.
Changed components
test/functional/wallet_multiwallet.pyInspect captured patch +1 / −1
diff --git a/test/functional/wallet_multiwallet.py b/test/functional/wallet_multiwallet.py
index 76b78d6c..505138eb 100755
--- a/test/functional/wallet_multiwallet.py
+++ b/test/functional/wallet_multiwallet.py
@@ -327,7 +327,7 @@ class MultiWalletTest(BitcoinTestFramework):
# should raise rpc error if wallet path can't be created
err_code = -4
- assert_raises_rpc_error(err_code, "filesystem error:" if platform.system() != 'Windows' else "create_directories:", node.createwallet, "w8/bad")
+ assert_raises_rpc_error(err_code, "Wallet file verification failed. ", node.createwallet, "w8/bad")
# Fail to create a wallet if it already exists.
path = wallet_dir(node, "w2")
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.