Repository navigation
Conversation
|
The following sections might be updated with supplementary metadata relevant to reviewers and maintainers. Code Coverage & BenchmarksFor details see: https://corecheck.dev/bitcoin/bitcoin/pulls/31410. ReviewsSee the guideline for information on the review process.
If your review is incorrectly listed, please copy-paste ConflictsReviewers, this pull request conflicts with the following ones:
If you consider this pull request important, please also help to review the conflicting pull requests. Ideally, start with the one that should be merged first. |
c37c6b5 to
b58c8fe
Compare
b58c8fe to
0a1a7f7
Compare
0a1a7f7 to
c012743
Compare
maflcko
left a comment
There was a problem hiding this comment.
review ACK c012743 🎑
Show signature
Signature:
untrusted comment: signature from minisign secret key on empty file; verify via: minisign -Vm "${path_to_any_empty_file}" -P RWTRmVTMeKV5noAMqVlsMugDDCyyTSbA3Re5AkUrhvLVln0tSaFWglOw -x "${path_to_this_whole_four_line_signature_blob}"
RUTRmVTMeKV5npGrKx1nqXCw5zeVHdtdYURB/KlyA/LMFgpNCs+SkW9a8N95d+U4AP1RJMi+krxU1A3Yux4bpwZNLvVBKy0wLgM=
trusted comment: review ACK c0127439597ee9d09b8e117be7d6226a68b45721 🎑
tf/up7OMkfp/8WkQfPI/JfkrY0jnqtfRAg2T09eD2yTw/BRFey4pUZPMlJu+Y93FYLisAf28Ld2wEeMnGisIBQ==
|
Friendly ping a Python connoisseur @stickies-v :) |
| if platform.system() != 'Windows' and os.geteuid() != 0: | ||
| os.mkdir(wallet_dir('no_access')) | ||
| os.chmod(wallet_dir('no_access'), 0) | ||
| try: | ||
| with self.nodes[0].assert_debug_log(expected_msgs=['Error scanning']): | ||
| walletlist = self.nodes[0].listwalletdir()['wallets'] | ||
| finally: | ||
| # Need to ensure access is restored for cleanup | ||
| os.chmod(wallet_dir('no_access'), stat.S_IRUSR | stat.S_IWUSR | stat.S_IXUSR) | ||
| assert_equal(sorted(map(lambda w: w['name'], walletlist)), sorted(in_wallet_dir)) |
There was a problem hiding this comment.
Making this check conditional on platform is undocumented in the commit message, and seems orthogonal to the goal of testing errors individually. I think it would be best to split this out in a separate commit and document it?
There was a problem hiding this comment.
I don't think these changes can be meaningfully separated. Applying either change independently would break the test or render it incomplete.
The commit message has been updated though.
| assert_equal(sorted(map(lambda w: w['name'], walletlist)), sorted(in_wallet_dir)) | ||
| # 2. "Too many levels of symbolic links" error. | ||
| # This test cannot be conducted robustly on Windows | ||
| # because it depends on the build toolchain: |
There was a problem hiding this comment.
In c012743:
because it depends on the build toolchain:
Even if this is the case, is the best option to just to do nothing? Shouldn't we atleast test the known behaviour for our release build, so we'd catch if this changes (is fixed?) in future? Otherwise my understanding is if this changes again, it's just going to be hidden/ignored.
There was a problem hiding this comment.
I guess the check could be limited to exclude the msvc build?
There was a problem hiding this comment.
Shouldn't we atleast test the known behaviour for our release build...?
As documented in the code comment:
A cross-compiled bitcoind.exe parses self_walletdat_symlink without errors.
Therefore, the release build won't trigger the "Error scanning" message, and this test would fail on the master branch.
There was a problem hiding this comment.
I guess the check could be limited to exclude the msvc build?
That would make the most sense to me.
There was a problem hiding this comment.
Therefore, the release build won't trigger the "Error scanning" message, and this test would fail on the master branch.
Sure, so you can check that that is happening when testing on Windows.
There was a problem hiding this comment.
I guess the check could be limited to exclude the msvc build?
Unfortunately, I can't find a simple way to detect whether binaries were built with MSVC without adding extra complexity to the Python code.
There was a problem hiding this comment.
I'd be fine with a hacky check that only runs on windows and checks for a magic msvc binary string in open(exe_path, "rb").read(), but anything is fine and this is not a blocker from my side.
c012743 to
e717fb5
Compare
|
Only change is the commit msg re-ACK e717fb5 🍣 Show signatureSignature: |
|
UPD. Further investigation is needed. |
There was a problem hiding this comment.
Code review e717fb5
Guix cross-build failure
Attempted to run Guix build e717fb5 cross-built for Windows, but it fails already on test "0" / line 133:
bitcoin/test/functional/wallet_multiwallet.py
Lines 129 to 133 in e717fb5
Log
$ BITCOIND=/c/Users/hodlinator/Downloads/bitcoind-e717fb5a429d.exe build/test/functional/wallet_multiwallet.py
2025-02-08T22:43:58.813000Z TestFramework (INFO): PRNG seed is: 7271806868081798699
2025-02-08T22:43:58.862000Z TestFramework (INFO): Initializing test directory C:\Users\HODLIN~1\AppData\Local\Temp\bitcoin_func_test_fj5a7zvd
2025-02-08T22:44:00.455000Z TestFramework (ERROR): Assertion failed
Traceback (most recent call last):
File "C:\Users\hodlinator\bitcoin\build\test\functional\test_framework\test_framework.py", line 135, in main
self.run_test()
~~~~~~~~~~~~~^^
File "C:\Users\hodlinator\bitcoin\build\test\functional\wallet_multiwallet.py", line 133, in run_test
assert_equal(sorted(map(lambda w: w['name'], walletlist)), sorted(in_wallet_dir))
~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\hodlinator\bitcoin\build\test\functional\test_framework\util.py", line 77, in assert_equal
raise AssertionError("not(%s)" % " == ".join(str(arg) for arg in (thing1, thing2) + args))
AssertionError: not(['default_wallet', 'recursive_dir_symlink\\wallets\\default_wallet',
'recursive_dir_symlink\\wallets\\recursive_dir_symlink\\wallets\\default_wallet',
'recursive_dir_symlink\\wallets\\recursive_dir_symlink\\wallets\\recursive_dir_symlink\\wallets\\default_wallet',
'recursive_dir_symlink\\wallets\\recursive_dir_symlink\\wallets\\recursive_dir_symlink\\wallets\\recursive_dir_symlink\\wallets\\default_wallet',
'recursive_dir_symlink\\wallets\\recursive_dir_symlink\\wallets\\recursive_dir_symlink\\wallets\\recursive_dir_symlink\\wallets\\recursive_dir_symlink\\wallets\\sub\\w5',
'recursive_dir_symlink\\wallets\\recursive_dir_symlink\\wallets\\recursive_dir_symlink\\wallets\\recursive_dir_symlink\\wallets\\recursive_dir_symlink\\wallets\\w',
'recursive_dir_symlink\\wallets\\recursive_dir_symlink\\wallets\\recursive_dir_symlink\\wallets\\recursive_dir_symlink\\wallets\\recursive_dir_symlink\\wallets\\w1',
'recursive_dir_symlink\\wallets\\recursive_dir_symlink\\wallets\\recursive_dir_symlink\\wallets\\recursive_dir_symlink\\wallets\\recursive_dir_symlink\\wallets\\w2',
'recursive_dir_symlink\\wallets\\recursive_dir_symlink\\wallets\\recursive_dir_symlink\\wallets\\recursive_dir_symlink\\wallets\\recursive_dir_symlink\\wallets\\w3',
'recursive_dir_symlink\\wallets\\recursive_dir_symlink\\wallets\\recursive_dir_symlink\\wallets\\recursive_dir_symlink\\wallets\\recursive_dir_symlink\\wallets\\w7',
'recursive_dir_symlink\\wallets\\recursive_dir_symlink\\wallets\\recursive_dir_symlink\\wallets\\recursive_dir_symlink\\wallets\\recursive_dir_symlink\\wallets\\w7_symlink',
'recursive_dir_symlink\\wallets\\recursive_dir_symlink\\wallets\\recursive_dir_symlink\\wallets\\recursive_dir_symlink\\wallets\\sub\\w5',
'recursive_dir_symlink\\wallets\\recursive_dir_symlink\\wallets\\recursive_dir_symlink\\wallets\\recursive_dir_symlink\\wallets\\w',
'recursive_dir_symlink\\wallets\\recursive_dir_symlink\\wallets\\recursive_dir_symlink\\wallets\\recursive_dir_symlink\\wallets\\w1',
'recursive_dir_symlink\\wallets\\recursive_dir_symlink\\wallets\\recursive_dir_symlink\\wallets\\recursive_dir_symlink\\wallets\\w2',
'recursive_dir_symlink\\wallets\\recursive_dir_symlink\\wallets\\recursive_dir_symlink\\wallets\\recursive_dir_symlink\\wallets\\w3',
'recursive_dir_symlink\\wallets\\recursive_dir_symlink\\wallets\\recursive_dir_symlink\\wallets\\recursive_dir_symlink\\wallets\\w7',
'recursive_dir_symlink\\wallets\\recursive_dir_symlink\\wallets\\recursive_dir_symlink\\wallets\\recursive_dir_symlink\\wallets\\w7_symlink',
'recursive_dir_symlink\\wallets\\recursive_dir_symlink\\wallets\\recursive_dir_symlink\\wallets\\sub\\w5',
'recursive_dir_symlink\\wallets\\recursive_dir_symlink\\wallets\\recursive_dir_symlink\\wallets\\w',
'recursive_dir_symlink\\wallets\\recursive_dir_symlink\\wallets\\recursive_dir_symlink\\wallets\\w1',
'recursive_dir_symlink\\wallets\\recursive_dir_symlink\\wallets\\recursive_dir_symlink\\wallets\\w2',
'recursive_dir_symlink\\wallets\\recursive_dir_symlink\\wallets\\recursive_dir_symlink\\wallets\\w3',
'recursive_dir_symlink\\wallets\\recursive_dir_symlink\\wallets\\recursive_dir_symlink\\wallets\\w7',
'recursive_dir_symlink\\wallets\\recursive_dir_symlink\\wallets\\recursive_dir_symlink\\wallets\\w7_symlink',
'recursive_dir_symlink\\wallets\\recursive_dir_symlink\\wallets\\sub\\w5',
'recursive_dir_symlink\\wallets\\recursive_dir_symlink\\wallets\\w',
'recursive_dir_symlink\\wallets\\recursive_dir_symlink\\wallets\\w1',
'recursive_dir_symlink\\wallets\\recursive_dir_symlink\\wallets\\w2',
'recursive_dir_symlink\\wallets\\recursive_dir_symlink\\wallets\\w3',
'recursive_dir_symlink\\wallets\\recursive_dir_symlink\\wallets\\w7',
'recursive_dir_symlink\\wallets\\recursive_dir_symlink\\wallets\\w7_symlink',
'recursive_dir_symlink\\wallets\\sub\\w5',
'recursive_dir_symlink\\wallets\\w', 'recursive_dir_symlink\\wallets\\w1', 'recursive_dir_symlink\\wallets\\w2',
'recursive_dir_symlink\\wallets\\w3', 'recursive_dir_symlink\\wallets\\w7', 'recursive_dir_symlink\\wallets\\w7_symlink',
'sub\\w5', 'w', 'w1', 'w2', 'w3', 'w7', 'w7_symlink']
== ['default_wallet', 'sub\\w5', 'w', 'w1', 'w2', 'w3', 'w7', 'w7_symlink'])
2025-02-08T22:44:00.507000Z TestFramework (INFO): Stopping nodes
Should that not be working?
C++ behavior difference when iterating directories?
I managed to come up with 584e2fc, which adds extra error checking that appears to be missing from the wallet/db.cpp code. (Edit: later merged as #32736).
After adding that, I was able to re-implement permission checking for Windows in 0f67bd65ec3536ba618e6ae79931a68a2517f375 (for native builds, cross compiled seem to fail earlier as noted above). It does use ACLs since I hadn't seen #31410 (comment) until I was pretty much done with the implementation (didn't want to bias my review). Might be something for a follow-up PR.
Windows Developer Mode parenthesis
First thing I attempted on Windows was to run the wallet_multiwallet.py test on the current parent of this PR (ebe4cac):
$ BITCOIND=/c/Users/hodlinator/bitcoin/build/src/Release/bitcoind.exe build/test/functional/wallet_multiwallet.py
2025-02-08T12:32:02.546000Z TestFramework (INFO): PRNG seed is: 1953116584645958224
2025-02-08T12:32:02.566000Z TestFramework (INFO): Initializing test directory C:\Users\HODLIN~1\AppData\Local\Temp\bitcoin_func_test_tqrp64pv
2025-02-08T12:32:03.168000Z TestFramework (ERROR): Unexpected exception caught during testing
Traceback (most recent call last):
File "C:\Users\hodlinator\bitcoin\build\test\functional\test_framework\test_framework.py", line 135, in main
self.run_test()
~~~~~~~~~~~~~^^
File "C:\Users\hodlinator\bitcoin\build\test\functional\wallet_multiwallet.py", line 85, in run_test
os.symlink('w7', wallet_dir('w7_symlink'))
~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
OSError: [WinError 1314] A required privilege is not held by the client: 'w7' -> 'C:\\Users\\HODLIN~1\\AppData\\Local\\Temp\\bitcoin_func_test_tqrp64pv\\node0\\regtest\\wallets\\w7_symlink'
Was able to find a solution on StackOverflow - activated Developer Mode in Windows settings to avoid it. After that the test runs fine using native-built Windows binaries (without changes from this PR). Later I changed my user to be Administrator, might have solved it too.
e717fb5 to
9025657
Compare
|
@hebasto are you planning on working on a fix? Otherwise maybe we should close this, and move the relevent details into an issue, so that someone might pick it up. |
|
Since I volunteered in late October out-of-band to have a look at this, I today confirmed with @hebasto that he's fine with me taking over this issue, and will resume work on it next week if nothing unforeseen happens. Feel free to close this one, I will create a tracking issue next week, to be followed by my own PR. |
|
Started looking further into which parts of the test fail with cross-built binaries, but not ready create a new PR yet. I'm considering having explicit The already existing #31409 should be sufficient to track this for now. |
|
New PR up for review: #34418 |
test_scanning_sub_dir(): - Remove try/finally - we don't need to clean up after a failed test (done in this commit to maintain indentation). Regarding symlinks: bitcoin#31410 (comment) Co-authored-by: Ava Chow <[email protected]>
test_scanning_sub_dir(): - Remove try/finally - we don't need to clean up after a failed test (done in this commit to maintain indentation). Regarding symlinks: bitcoin#31410 (comment) Kept some symlink creation which didn't disrupt Windows cross builds to make for a smaller diff and less cumbersome code. There is some hope of eventually getting better symlink support via bitcoin#34603. Co-authored-by: Ava Chow <[email protected]>
…tible 111864a qa: Avoid duplicating output in case the diff is the same (Hodlinator) c2e28d4 ci: Enable `wallet_multiwallet.py` in "Windows, test cross-built" job (Hodlinator) 850a80c qa: Disable parts of the test when running under Windows or root (Hodlinator) fb803e3 qa: Test scanning errors individually (Hodlinator) ed43ce5 qa: Check for platform-independent part of error message (Hodlinator) 64a098a refactor(qa): Break apart ginormous run_test() (Hodlinator) bb1aff7 move-only(qa): Move wallet creation check down to others (Hodlinator) d1a4ddb refactor(qa): Lift out functions to outer scopes (Hodlinator) c811e47 scripted-diff: self.nodes[0] => node (Hodlinator) 73cf858 refactor(qa): Remove unused option (Hodlinator) Pull request description: Makes the functional test compatible with *Linux->Windows cross-built executables*. Main parts: * Commit "qa: Check for platform-independent part of error message" switches to match on platform-independent part of error message. * Commit "qa: Test scanning errors individually" disentangles code causing the same error message substring, based on #31410. * Commit "qa: Disable parts of the test when running under Windows or root" enables the test to be run on Windows, based in part on #31410 (comment). Also: * Removes unused option in wallet_multiwallet.py. * Breaks apart wallet_multiwallet.py's `run_test()` into smaller test functions. * Improves `assert_equal()` output for dicts. Fixes #31409. ACKs for top commit: achow101: ACK 111864a janb84: re ACK 111864a w0xlt: reACK 111864a Tree-SHA512: 4e3ff92588ac9f2611fc963ce62097b6c0dd4d4eb8da7952c72619c7b554ff3cae5163fe1886d4d9bbd7af1acca5b846411e7f5b46f9bddb08719b61108efbba
… on Windows natively 546e38c ci: Test cross-built Windows executables on Windows natively (Hennadii Stepanov) 2c7a42b ci: Move "Windows cross" job from Cirrus CI to GHA CI (Hennadii Stepanov) 4d0bc3c ci: Use `bash` by default for all platforms (Hennadii Stepanov) Pull request description: This PR enables on the CI tests of cross-compiled Windows binaries on Windows. It is important to have such tests in CI because the release binaries for Windows are also cross-compiled. Two functional tests, `wallet_migration.py` and `wallet_multiwallet.py`, are temporarily disabled. They require fixes, such as bitcoin/bitcoin#31410, and adjustments for error message handling. Re-enabling these tests will be addressed in follow-up PRs. Resolves bitcoin/bitcoin#31071. ACKs for top commit: davidgumberg: tested reACK bitcoin/bitcoin@546e38c hodlinator: re-ACK 546e38c willcl-ark: utACK 546e38c maflcko: review-only ACK 546e38c 🍎 Tree-SHA512: fb9150807b7ebb248e8f4fe7b16e5179251e7be9336459287787f27e542583d73d937e6969667fd836378b676bb9be7f66756dc1abca8a01364bc9ee3e3720a5
…ling fa204a1 log: Use warning level while scanning wallet dir (MarcoFalke) 2472f55 qa, wallet: Verify warning when failing to scan (Hodlinator) 9dfcb9f wallet: Correct dir iteration error handling (Hodlinator) Pull request description: Make wallet DB properly detect and report failure to scan wallet directory. Seems to have been broken since moving from Boost to `std::filesystem`. Found while reviewing: bitcoin/bitcoin#31410 (review) ACKs for top commit: achow101: ACK fa204a1 maflcko: re-ACK fa204a1 🍽 rkrux: tACK fa204a1 Tree-SHA512: 969afde2e37f885ed0c823dc36d2dbeaa0378639849c6a26f8ac67b4f1997eea95bbcae6d58aef5b716807210f37eb166c0cda7ba1d6caffd34249970833af3a
test_scanning_sub_dir(): - Remove try/finally - we don't need to clean up after a failed test (done in this commit to maintain indentation). Regarding symlinks: bitcoin/bitcoin#31410 (comment) Kept some symlink creation which didn't disrupt Windows cross builds to make for a smaller diff and less cumbersome code. There is some hope of eventually getting better symlink support via #34603. Co-authored-by: Ava Chow <[email protected]>
…rossbuild-compatible 6841ebd qa: Avoid duplicating output in case the diff is the same (Hodlinator) e47eb6d ci: Enable `wallet_multiwallet.py` in "Windows, test cross-built" job (Hodlinator) f907c5d qa: Disable parts of the test when running under Windows or root (Hodlinator) e0b73c8 qa: Test scanning errors individually (Hodlinator) e8a8dad qa: Check for platform-independent part of error message (Hodlinator) 538bc8d refactor(qa): Break apart ginormous run_test() (Hodlinator) e8b6853 move-only(qa): Move wallet creation check down to others (Hodlinator) 37cabb2 refactor(qa): Lift out functions to outer scopes (Hodlinator) 2de2cbc scripted-diff: self.nodes[0] => node (Hodlinator) 475703b refactor(qa): Remove unused option (Hodlinator) Pull request description: Makes the functional test compatible with *Linux->Windows cross-built executables*. Main parts: * Commit "qa: Check for platform-independent part of error message" switches to match on platform-independent part of error message. * Commit "qa: Test scanning errors individually" disentangles code causing the same error message substring, based on #31410. * Commit "qa: Disable parts of the test when running under Windows or root" enables the test to be run on Windows, based in part on bitcoin/bitcoin#31410 (comment). Also: * Removes unused option in wallet_multiwallet.py. * Breaks apart wallet_multiwallet.py's `run_test()` into smaller test functions. * Improves `assert_equal()` output for dicts. Fixes #31409. ACKs for top commit: achow101: ACK 6841ebd janb84: re ACK 6841ebd w0xlt: reACK 6841ebd Tree-SHA512: 4e3ff92588ac9f2611fc963ce62097b6c0dd4d4eb8da7952c72619c7b554ff3cae5163fe1886d4d9bbd7af1acca5b846411e7f5b46f9bddb08719b61108efbba
… on Windows natively c6125ae ci: Test cross-built Windows executables on Windows natively (Hennadii Stepanov) 3e66229 ci: Move "Windows cross" job from Cirrus CI to GHA CI (Hennadii Stepanov) 355f487 ci: Use `bash` by default for all platforms (Hennadii Stepanov) Pull request description: This PR enables on the CI tests of cross-compiled Windows binaries on Windows. It is important to have such tests in CI because the release binaries for Windows are also cross-compiled. Two functional tests, `wallet_migration.py` and `wallet_multiwallet.py`, are temporarily disabled. They require fixes, such as bitcoin/bitcoin#31410, and adjustments for error message handling. Re-enabling these tests will be addressed in follow-up PRs. Resolves bitcoin/bitcoin#31071. ACKs for top commit: davidgumberg: tested reACK bitcoin/bitcoin@c6125ae hodlinator: re-ACK c6125ae willcl-ark: utACK c6125ae maflcko: review-only ACK c6125ae 🍎 Tree-SHA512: fb9150807b7ebb248e8f4fe7b16e5179251e7be9336459287787f27e542583d73d937e6969667fd836378b676bb9be7f66756dc1abca8a01364bc9ee3e3720a5
…ling 04553eb log: Use warning level while scanning wallet dir (MarcoFalke) 4b3d5d7 qa, wallet: Verify warning when failing to scan (Hodlinator) f1828ce wallet: Correct dir iteration error handling (Hodlinator) Pull request description: Make wallet DB properly detect and report failure to scan wallet directory. Seems to have been broken since moving from Boost to `std::filesystem`. Found while reviewing: bitcoin/bitcoin#31410 (review) ACKs for top commit: achow101: ACK 04553eb maflcko: re-ACK 04553eb 🍽 rkrux: tACK 04553eb Tree-SHA512: 969afde2e37f885ed0c823dc36d2dbeaa0378639849c6a26f8ac67b4f1997eea95bbcae6d58aef5b716807210f37eb166c0cda7ba1d6caffd34249970833af3a
test_scanning_sub_dir(): - Remove try/finally - we don't need to clean up after a failed test (done in this commit to maintain indentation). Regarding symlinks: bitcoin/bitcoin#31410 (comment) Kept some symlink creation which didn't disrupt Windows cross builds to make for a smaller diff and less cumbersome code. There is some hope of eventually getting better symlink support via #34603. Co-authored-by: Ava Chow <[email protected]>
…rossbuild-compatible a0b0ce1 qa: Avoid duplicating output in case the diff is the same (Hodlinator) 142a62a ci: Enable `wallet_multiwallet.py` in "Windows, test cross-built" job (Hodlinator) 2454c25 qa: Disable parts of the test when running under Windows or root (Hodlinator) a7009ec qa: Test scanning errors individually (Hodlinator) 5f8e9fd qa: Check for platform-independent part of error message (Hodlinator) 0146fc0 refactor(qa): Break apart ginormous run_test() (Hodlinator) 1165922 move-only(qa): Move wallet creation check down to others (Hodlinator) cf3dcbf refactor(qa): Lift out functions to outer scopes (Hodlinator) 5089a96 scripted-diff: self.nodes[0] => node (Hodlinator) 3b19908 refactor(qa): Remove unused option (Hodlinator) Pull request description: Makes the functional test compatible with *Linux->Windows cross-built executables*. Main parts: * Commit "qa: Check for platform-independent part of error message" switches to match on platform-independent part of error message. * Commit "qa: Test scanning errors individually" disentangles code causing the same error message substring, based on #31410. * Commit "qa: Disable parts of the test when running under Windows or root" enables the test to be run on Windows, based in part on bitcoin/bitcoin#31410 (comment). Also: * Removes unused option in wallet_multiwallet.py. * Breaks apart wallet_multiwallet.py's `run_test()` into smaller test functions. * Improves `assert_equal()` output for dicts. Fixes #31409. ACKs for top commit: achow101: ACK a0b0ce1 janb84: re ACK a0b0ce1 w0xlt: reACK a0b0ce1 Tree-SHA512: 4e3ff92588ac9f2611fc963ce62097b6c0dd4d4eb8da7952c72619c7b554ff3cae5163fe1886d4d9bbd7af1acca5b846411e7f5b46f9bddb08719b61108efbba
… on Windows natively 25b56fd9b469f8e5d36f0132c3b79a5214e3372a ci: Test cross-built Windows executables on Windows natively (Hennadii Stepanov) 3501bca8c7e54923242fd3cfd21e7ef1c5d51d9d ci: Move "Windows cross" job from Cirrus CI to GHA CI (Hennadii Stepanov) f8619196ceb5c6a58125506d276d9515837f043a ci: Use `bash` by default for all platforms (Hennadii Stepanov) Pull request description: This PR enables on the CI tests of cross-compiled Windows binaries on Windows. It is important to have such tests in CI because the release binaries for Windows are also cross-compiled. Two functional tests, `wallet_migration.py` and `wallet_multiwallet.py`, are temporarily disabled. They require fixes, such as bitcoin/bitcoin#31410, and adjustments for error message handling. Re-enabling these tests will be addressed in follow-up PRs. Resolves bitcoin/bitcoin#31071. ACKs for top commit: davidgumberg: tested reACK bitcoin/bitcoin@25b56fd hodlinator: re-ACK 25b56fd9b469f8e5d36f0132c3b79a5214e3372a willcl-ark: utACK 25b56fd9b469f8e5d36f0132c3b79a5214e3372a maflcko: review-only ACK 25b56fd9b469f8e5d36f0132c3b79a5214e3372a 🍎 Tree-SHA512: fb9150807b7ebb248e8f4fe7b16e5179251e7be9336459287787f27e542583d73d937e6969667fd836378b676bb9be7f66756dc1abca8a01364bc9ee3e3720a5
…ling 272cd09b796a36596b325277bb43cb47b19c8e12 log: Use warning level while scanning wallet dir (MarcoFalke) 17776443675ddf804f92042883ad36ed040438c3 qa, wallet: Verify warning when failing to scan (Hodlinator) 893e51ffeb0543e1c8d33e83b20c56f02d2b793c wallet: Correct dir iteration error handling (Hodlinator) Pull request description: Make wallet DB properly detect and report failure to scan wallet directory. Seems to have been broken since moving from Boost to `std::filesystem`. Found while reviewing: bitcoin/bitcoin#31410 (review) ACKs for top commit: achow101: ACK 272cd09b796a36596b325277bb43cb47b19c8e12 maflcko: re-ACK 272cd09b796a36596b325277bb43cb47b19c8e12 🍽 rkrux: tACK 272cd09b796a36596b325277bb43cb47b19c8e12 Tree-SHA512: 969afde2e37f885ed0c823dc36d2dbeaa0378639849c6a26f8ac67b4f1997eea95bbcae6d58aef5b716807210f37eb166c0cda7ba1d6caffd34249970833af3a
test_scanning_sub_dir(): - Remove try/finally - we don't need to clean up after a failed test (done in this commit to maintain indentation). Regarding symlinks: bitcoin/bitcoin#31410 (comment) Kept some symlink creation which didn't disrupt Windows cross builds to make for a smaller diff and less cumbersome code. There is some hope of eventually getting better symlink support via #34603. Co-authored-by: Ava Chow <[email protected]>
…rossbuild-compatible 111864ac30126dc64a9e21d4e1b5e3d9ef4e5358 qa: Avoid duplicating output in case the diff is the same (Hodlinator) c2e28d455af8fbb8d6074dc26590e61b9764d761 ci: Enable `wallet_multiwallet.py` in "Windows, test cross-built" job (Hodlinator) 850a80c1999e671b6cce33d8545af06adf5f77f0 qa: Disable parts of the test when running under Windows or root (Hodlinator) fb803e3c79e52305df74ae30e77fd36900a49c24 qa: Test scanning errors individually (Hodlinator) ed43ce57cce53612f13ac7c6db59fa7ac60e31c4 qa: Check for platform-independent part of error message (Hodlinator) 64a098a9b6263dbdeea25f89f4c9fe3c53943dd1 refactor(qa): Break apart ginormous run_test() (Hodlinator) bb1aff7ed7e4bd6618dfe75b5faa9956c3adead4 move-only(qa): Move wallet creation check down to others (Hodlinator) d1a4ddb58ef676d4e7436cc3bcdf5fb3008b4b6f refactor(qa): Lift out functions to outer scopes (Hodlinator) c811e47367d531b69c10e3fc976df764e79f13e2 scripted-diff: self.nodes[0] => node (Hodlinator) 73cf858911056717a4ebe97cd250f3a506136eff refactor(qa): Remove unused option (Hodlinator) Pull request description: Makes the functional test compatible with *Linux->Windows cross-built executables*. Main parts: * Commit "qa: Check for platform-independent part of error message" switches to match on platform-independent part of error message. * Commit "qa: Test scanning errors individually" disentangles code causing the same error message substring, based on #31410. * Commit "qa: Disable parts of the test when running under Windows or root" enables the test to be run on Windows, based in part on bitcoin/bitcoin#31410 (comment). Also: * Removes unused option in wallet_multiwallet.py. * Breaks apart wallet_multiwallet.py's `run_test()` into smaller test functions. * Improves `assert_equal()` output for dicts. Fixes #31409. ACKs for top commit: achow101: ACK 111864ac30126dc64a9e21d4e1b5e3d9ef4e5358 janb84: re ACK 111864ac30126dc64a9e21d4e1b5e3d9ef4e5358 w0xlt: reACK 111864ac30126dc64a9e21d4e1b5e3d9ef4e5358 Tree-SHA512: 4e3ff92588ac9f2611fc963ce62097b6c0dd4d4eb8da7952c72619c7b554ff3cae5163fe1886d4d9bbd7af1acca5b846411e7f5b46f9bddb08719b61108efbba
Fixes #31409.
The first commit prevents possible false positives by ensuring that each condition potentially causing the "Error scanning" log message is tested separately.
The second commit disables a problematic check on Windows.