aboutsummaryrefslogtreecommitdiff
path: root/test/functional/feature_init.py
AgeCommit message (Collapse)Author
2023-12-08test: detect OS consistently using `platform.system()`Sebastian Falbesoner
2023-11-09test: Avoid intermittent failures in feature_initMarcoFalke
2023-10-08test: randomized perturbing in feature_initL0la L33tz
2023-10-08test: simplify feature_initFabian Jahr
2023-07-18test: fix feature_init.py file perturbationMartin Zumsande
Simultaneously opening the file in read and write mode would lead to opening of an empty file instead of perturbing the existing file. Also, revert to the previous state after each perturbation so that each perturbation is applied in isolation.
2023-07-07scripted-diff: rename 'loadblk' thread name to 'initload'furszy
The thread does not only load blocks, it loads the mempool and, in a future commit, will start the indexes as well. Also, renamed the 'ThreadImport' function to 'ImportBlocks' And the 'm_load_block' class member to 'm_thread_load'. -BEGIN VERIFY SCRIPT- sed -i "s/ThreadImport/ImportBlocks/g" $(git grep -l ThreadImport -- ':!/doc/') sed -i "s/loadblk/initload/g" $(git grep -l loadblk -- ':!/doc/release-notes/') sed -i "s/m_load_block/m_thread_load/g" $(git grep -l m_load_block) -END VERIFY SCRIPT-
2023-05-05Merge bitcoin/bitcoin#26653: test, init: perturb file to ensure failure ↵fanquake
instead of only deleting them c371cae07a7ba045130568b6abc470eaa4f95ef4 test, init: perturb file to ensure failure instead of only deleting them (brunoerg) Pull request description: In `feature_init.py` there is a TODO about perturbing the files instead of only testing by deleting them. ```py # TODO: at some point, we should test perturbing the files instead of removing # them, e.g. # # contents = target_file.read_bytes() # tweaked_contents = bytearray(contents) # tweaked_contents[50:250] = b'1' * 200 # target_file.write_bytes(bytes(tweaked_contents)) # # At the moment I can't get this to work (bitcoind loads successfully?) so # investigate doing this later. ``` This PR adds it by writing into the file random bytes and checking whether it throws an error when starting. ACKs for top commit: MarcoFalke: lgtm ACK c371cae07a7ba045130568b6abc470eaa4f95ef4 Tree-SHA512: d691eee60b91dd9d1b200588608f56b0a10dccd9761a75254b69e0ba5e5866cae14d2f90cb2bd7ec0f95b0617c2562cd33f20892ffd16355b6df770d3806a0ff
2022-12-24scripted-diff: Bump copyright headersHennadii Stepanov
-BEGIN VERIFY SCRIPT- ./contrib/devtools/copyright_header.py update ./ -END VERIFY SCRIPT- Commits of previous years: - 2021: f47dda2c58b5d8d623e0e7ff4e74bc352dfa83d7 - 2020: fa0074e2d82928016a43ca408717154a1c70a4db - 2019: aaaaad6ac95b402fe18d019d67897ced6b316ee0
2022-12-07test, init: perturb file to ensure failure instead of only deleting thembrunoerg
2022-11-10test: Remove wallet option from non-wallet testsMacroFake
Review note: The changes are complete, because self.options.descriptors is set to None in parse_args (test_framework.py). A value of None implies -disablewallet, see the previous commit. So if a call to add_wallet_options is missing, it will lead to a test failure when the wallet is compiled in.
2022-09-13init: add utxo snapshot detectionJames O'Beirne
Add functionality for activating a snapshot-based chainstate if one is detected on-disk. Also cautiously initialize chainstate cache usages so that we don't somehow blow past our cache allowances during initialization, then rebalance at the end of init. Co-authored-by: Russell Yanofsky <russ@yanofsky.org>
2022-06-07test: Fix wait_for_debug_log UnicodeDecodeErrorMacroFake
2022-01-31test: activate all index types in feature_init.pyMartin Zumsande
2022-01-31test: Fix feature_init intermittent issuesMarcoFalke
2022-01-31test: Remove random line number feature from feature_init.pyMarcoFalke
This is needed for the next commit. Also, it doesn't really test anything novel. wait_for_debug_log is inherently racy, so will randomly terminate at the exact point or later. So the randomization is already sufficiently covered by the existing test.
2022-01-12[bugfix] prevent UnicodeDecodeError errors when opening log file in ↵sogoagain
feature_init.py open log file as a raw byte stream in feature_init.py (fixes #23989)
2021-12-29test: enable txindex in feature_initJames O'Beirne
Now that #23365 is merged.
2021-12-29test: feature_init: retain debug.log and improve detectionJames O'Beirne
This test sporadically fails due to the Python test missing log lines for reasons that are poorly understood. The problem is made worse by the fact that this test does not retain the log files from iteration to iteration. Change the test to do logline detection in a more robust manner (by using `re.search` on the whole log content) in a way that is comparable to the existing `assert_debug_log` utility, and retain all debug.log content from case to case.
2021-12-29test: feature_init: tweak all .ldb files of a certain typeJames O'Beirne
This part of the test sporadically fails on CI infrastructure. Instead of perturbing a single .ldb file of each type, move all .ldb files of a given type to ensure a bad startup.
2021-12-15test: re-organized array according to order of logs and included 2 more ↵seaona
interruption events
2021-12-15test: include two more interruptions pointsseaona
2021-10-26test: add stress tests for initializationJames O'Beirne