mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-04-29 23:09:44 -04:00
Merge 80034e76c8
into c5e44a0435
This commit is contained in:
commit
755f3747c6
2 changed files with 29 additions and 13 deletions
4
.github/workflows/ci.yml
vendored
4
.github/workflows/ci.yml
vendored
|
@ -374,10 +374,8 @@ jobs:
|
|||
|
||||
- name: Run functional tests
|
||||
env:
|
||||
# TODO: Fix the excluded test and re-enable it.
|
||||
EXCLUDE: '--exclude wallet_multiwallet.py'
|
||||
TEST_RUNNER_EXTRA: ${{ github.event_name != 'pull_request' && '--extended' || '' }}
|
||||
run: py -3 test/functional/test_runner.py --jobs $NUMBER_OF_PROCESSORS --ci --quiet --tmpdirprefix="$RUNNER_TEMP" --combinedlogslen=99999999 --timeout-factor=$TEST_RUNNER_TIMEOUT_FACTOR $EXCLUDE $TEST_RUNNER_EXTRA
|
||||
run: py -3 test/functional/test_runner.py --jobs $NUMBER_OF_PROCESSORS --ci --quiet --tmpdirprefix="$RUNNER_TEMP" --combinedlogslen=99999999 --timeout-factor=$TEST_RUNNER_TIMEOUT_FACTOR $TEST_RUNNER_EXTRA
|
||||
|
||||
asan-lsan-ubsan-integer-no-depends-usdt:
|
||||
name: 'ASan + LSan + UBSan + integer, no depends, USDT'
|
||||
|
|
|
@ -85,9 +85,6 @@ class MultiWalletTest(BitcoinTestFramework):
|
|||
|
||||
os.symlink('..', wallet_dir('recursive_dir_symlink'))
|
||||
|
||||
os.mkdir(wallet_dir('self_walletdat_symlink'))
|
||||
os.symlink('wallet.dat', wallet_dir('self_walletdat_symlink/wallet.dat'))
|
||||
|
||||
# rename wallet.dat to make sure plain wallet file paths (as opposed to
|
||||
# directory paths) can be loaded
|
||||
# create another dummy wallet for use in testing backups later
|
||||
|
@ -126,15 +123,36 @@ class MultiWalletTest(BitcoinTestFramework):
|
|||
for wallet_name in to_load:
|
||||
self.nodes[0].loadwallet(wallet_name)
|
||||
|
||||
os.mkdir(wallet_dir('no_access'))
|
||||
os.chmod(wallet_dir('no_access'), 0)
|
||||
try:
|
||||
# Tests for possible scanning errors:
|
||||
# 0. Baseline, no errors.
|
||||
with self.nodes[0].assert_debug_log(expected_msgs=[], unexpected_msgs=['Error scanning']):
|
||||
walletlist = self.nodes[0].listwalletdir()['wallets']
|
||||
assert_equal(sorted(map(lambda w: w['name'], walletlist)), sorted(in_wallet_dir))
|
||||
# 1. "Permission denied" error.
|
||||
if platform.system() != 'Windows':
|
||||
if os.geteuid() == 0:
|
||||
self.log.warning('Skipping "permission denied"-test requiring non-root user.')
|
||||
else:
|
||||
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))
|
||||
# 2. "Too many levels of symbolic links" error.
|
||||
# This test cannot be conducted robustly on Windows
|
||||
# because it depends on the build toolchain:
|
||||
# - A cross-compiled bitcoind.exe parses self_walletdat_symlink without errors.
|
||||
# - A natively compiled bitcoind.exe logs the "Error scanning" message.
|
||||
if platform.system() != 'Windows':
|
||||
os.mkdir(wallet_dir('self_walletdat_symlink'))
|
||||
os.symlink('wallet.dat', wallet_dir('self_walletdat_symlink/wallet.dat'))
|
||||
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))
|
||||
assert_equal(sorted(map(lambda w: w['name'], walletlist)), sorted(in_wallet_dir))
|
||||
|
||||
assert_equal(set(node.listwallets()), set(wallet_names))
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue