aboutsummaryrefslogtreecommitdiff
path: root/test/functional/create_cache.py
diff options
context:
space:
mode:
authorJon Atack <jon@atack.com>2019-04-03 17:54:49 +0200
committerJon Atack <jon@atack.com>2019-07-08 13:02:28 +0200
commit7195fa792fcc19e9c064c4e38814c3b46a210b34 (patch)
treee96a6d598cd405f4983d1f02c42588d75a7cd887 /test/functional/create_cache.py
parent3bf2b3a37bbd550491d124b77fd7c1b2a7969f66 (diff)
downloadbitcoin-7195fa792fcc19e9c064c4e38814c3b46a210b34.tar.xz
test: Tool wallet test coverage for unexpected writes to wallet
This commit adds test coverage in `test/functional/tool_wallet.py` to reproduce unexpected writes to the wallet as described in https://github.com/bitcoin/bitcoin/issues/15608: - wallet tool `info` unexpectedly writes to the wallet file if the wallet file permissions are read/write. - wallet tool `info` raises with "Error loading . Is wallet being used by another process?" if the wallet file permissions are read-only. 1. Reproduce the reported issue, define the current unexpected behavior, and add test coverage to guide a future fix in the form of commented-out assertions to be uncommented when testing/fixing. 2. Provisionally extend the same coverage to the wallet tool create test and the getwalletinfo test as regression tests while fixing the issue. 3. Add some logging for sanity checking. ------ Changes after rebase: 5. Make wallet_path an instance method instead of a function in tool_wallet.py as per Marco Falke review suggestion. 6. Assert wallet permissions instead of logging them in tool_wallet.py. This ran into an issue with Appveyor keeping permissions at 666 so allowed for 666 as a workaround. 7. Change the added logging from info to debug level. 8. More helpful assertions order in tool_wallet.py#assert_tool_output. This change makes #assert_tool_output raise "Error loading wallet.dat. Is wallet being used by another process?" rather than a less-helpful message when debugging the read-only wallet permissions issue.
Diffstat (limited to 'test/functional/create_cache.py')
0 files changed, 0 insertions, 0 deletions