aboutsummaryrefslogtreecommitdiff
path: root/test
AgeCommit message (Collapse)Author
2020-03-22test: add executable flag for rpc_estimatefee.pySebastian Falbesoner
2020-03-22ci: Run feature_block and feature_abortnode in valgrindMarcoFalke
2020-03-22test: delete wallet_bumpfee_totalfee_deprecation.pyJon Atack
2020-03-22test: update bumpfee testing from totalFee to fee_rateJon Atack
2020-03-20test: Remove ci timeout restriction in test_runnerMarcoFalke
2020-03-18Add bn2vch test to functional testsPieter Wuille
2020-03-18Simplify bn2vch using int.to_bytesPieter Wuille
2020-03-18Merge #18300: fuzz: Add option to merge input dir to test runnerMarcoFalke
fa3fa27c45618bcd8e325b27728b5f6c175d1a03 fuzz: Remove option --export_coverage from test_runner (MarcoFalke) aaaa055ff72a33241a3fdc2308d77bcbf51c262d fuzz: Add option to merge input dir to test runner (MarcoFalke) fa4fa88d7648bfeb75fac941cdff79dcc38affbf doc: Remove --disable-ccache from docs (MarcoFalke) Pull request description: This is mainly useful for myself to merge pull requests like https://github.com/bitcoin-core/qa-assets/pull/4 I thought it wouldn't hurt to share the code. Also remove the `--disable-ccache` from the docs to speed up builds when developing fuzzers. Top commit has no ACKs. Tree-SHA512: 818d85a90db86a7f4e8b001cc88342e5b28b02029d2bd4174440b28a8c4cc29b5406bd6348f72ddf909bb3d0f9bf7b1011976f6480e4418c8b7da5ecccae93e8
2020-03-17Merge #17319: Tests: remove bignum moduleMarcoFalke
3ed772d2219e58d6afea3d12c0ebebb8487445e7 [tests] remove bignum.py (John Newbery) f950ec25201e8ff7948be99ce3171f9700c4a8dc [tests] remove bn2bin() (John Newbery) 3b9b38579c59d5b31bd75103618776eafc05c132 [tests] remove bn_bytes() function (John Newbery) a760aa14a974cc18fa70a91f87a96a3db395a624 [tests] remove mpi2vch() function (John Newbery) 9a60bef50def228da763fe842bc2a7b9bf4fbcd7 [tests] don't encode the integer size in bignum (John Newbery) 1dc68aee66795bd806675913dc0401420383b9d1 [tests] add function comments to bignum (John Newbery) f31fc0e92efae793af840c9a46e765c20e0899b4 [tests] fix flake8 warnings in script.py and bignum.py (John Newbery) Pull request description: Only one function is imported in script.py. Just move that function to script.py and remove the bignum.py module. Remove unused functionality and fix some flake8 warnings along the way. Top commit has no ACKs. Tree-SHA512: 015f543ab545b5d5451896e2751d9c19334d9155b03faacd2023781e89833a2440f7f28741e9a8ac49badd9cdc012cbb6e038cdcdebeefaf9cb9d461c0689157
2020-03-17tests: simplify next_block() function in feature_blockJohn Newbery
The solve parameter is unnecessary. Remove it and add comments.
2020-03-16Merge #18350: test: Fix mining to an invalid target + ensure that a new ↵MarcoFalke
block has the correct hash internally 7a6627ae87b637bf32c03122865402bd71adf0d1 Fix mining to an invalid target + ensure that a new block has the correct hash internally in Python tests (Samer Afach) Pull request description: Test with block 47 in the `feature_block.py` creates a block with a hash higher than the target, which is supposed to fail. Now two issues exist there, and both have low probability of showing up: 1. The creation is done with `while (hash < target)`, which is wrong, because hash = target is a valid mined value based on the code in the function `CheckProofOfWork()` that validates the mining target: ``` if (UintToArith256(hash) > bnTarget) return false; ``` 2. As we know the hash stored in CBlock class in Python is stateful, unlike how it's in C++, where calling `CBlock::GetHash()` will actively calculate the hash and not cache it anywhere. With this, blocks that come out of the method `next_block` can have incorrect hash value when `solve=False`. This is because the `next_block` is mostly used with `solve=True`, and solving does call the function `rehash()` which calculates the hash of the block, but with `solve=False`, nothing calls that method. And since the work to be done in regtests is very low, the probably of this problem showing up is very low, but it practically happens (well, with much higher probability compared to issue No. 1 above). This PR fixes both these issues. Top commit has no ACKs. Tree-SHA512: f3b54d18f5073d6f1c26eab89bfec78620dda4ac1e4dde4f1d69543f1b85a7989d64c907e091db63f3f062408f5ed1e111018b842819ba1a5f8348c7b01ade96
2020-03-14test: Bump timeouts to avoid valgrind failuresMarcoFalke
2020-03-14Replace std::to_string with locale-independent alternativeBen Woosley
2020-03-14Fix mining to an invalid target + ensure that a new block has theSamer Afach
correct hash internally in Python tests
2020-03-12Merge #18228: test: Add missing syncwithvalidationinterfacequeueMarcoFalke
faf6f156ffd1a8ed1aed047428d791a8c13c162b test: Add missing syncwithvalidationinterfacequeue (MarcoFalke) Pull request description: The wallet rebroadcast functionality learns about new blocks via the validation interface queue. To avoid test failures such as https://ci.appveyor.com/project/DrahtBot/bitcoin/builds/31119387#L466 , we can sync with the queue before advancing the test. ACKs for top commit: jonatack: ACK faf6f156 this makes sense; the fix was previously added to mempool_persist.py and wallet_zapwallettxes.py in #12217 and to wallet_balance.py in #16302. It is also used in src/test/validation_block_tests.cpp (processnewblock_signals_ordering) and src/bench/wallet_balance.cpp. Tree-SHA512: d72fd4b597b669d8111007902b523e946712913cd6eea6f9a695b0f04ecbe2321d05019873af999a95b9e0aa0f5c140a17109b37503723e40c9eab24ec358eb7
2020-03-12Merge #18213: test: Fix race in p2p_segwitMarcoFalke
fa2cf85e6f366d62ebf173bf0bd51af45806afe1 test: Fix race in p2p_segwit (MarcoFalke) Pull request description: Fixes #11696 Top commit has no ACKs. Tree-SHA512: 09de07ea26236547586f5c373a0df2b68d84af5cfa8f40bd2ca9f951fc083c5f4b8a472a60668d99118bbd9f3942ec3d6a34f05944d47345acca41c95475bb27
2020-03-11Merge #18318: test: Bump rpc timeout in feature_assumevalid to avoid ↵MarcoFalke
valgrind timeouts fa9b3040e7f21733416c3ea155f372c8c398ea80 test: Bump rpc timeout in feature_assumevalid to avoid valgrind timeouts (MarcoFalke) fa72d270ad5326d8ad78bb7100e74dd460188c32 test: Bump walletpassphrase timeouts in wallet_createwallet to avoid valgrind timeouts (MarcoFalke) Pull request description: Fixes: * https://travis-ci.org/github/bitcoin/bitcoin/jobs/661135188#L3137 * https://travis-ci.org/github/bitcoin/bitcoin/jobs/661066901#L3137 * https://travis-ci.org/github/bitcoin/bitcoin/jobs/661121674#L3828 ACKs for top commit: practicalswift: ACK fa9b3040e7f21733416c3ea155f372c8c398ea80 Tree-SHA512: 9c9f844da28c08d335145cd28da84bfd6dd81285eee7410fcf8e4b3707ff6f9bd8f4c60afaa0389dbebe4b1f3a4ad209d58d0d5b8739799cc25acd920ffb2404
2020-03-11Merge #13693: [test] Add coverage to estimaterawfee and estimatesmartfeeMarcoFalke
111880aaf7e12a12f0797f1b19673e3d96328edd [test] Add coverage to estimaterawfee and estimatesmartfee (Ben Woosley) Pull request description: This adds light functional coverage to estimaterawfee - a subset of the testing applied to estimatesmartfee, and argument validation testing to both estimaterawfee and estimatesmartfee. One valid estimatesmartfee signature test is commented out because it fails currently. Extracted from #12940 Top commit has no ACKs. Tree-SHA512: 361a883457b28b2dc75081666e49d6dc6b5d76eed40d858abe2dd4f35ece152cf1f99c94480a91f42a896aa2a73cf55f57921316fe66970b2d7ba691a3b17e2d
2020-03-11test: Bump rpc timeout in feature_assumevalid to avoid valgrind timeoutsMarcoFalke
2020-03-11test: Bump walletpassphrase timeouts in wallet_createwallet to avoid ↵MarcoFalke
valgrind timeouts
2020-03-11Merge #18255: test: Add bad-txns-*-toolarge test cases to invalid_txsWladimir J. van der Laan
faae5a9a356d821f0cbdea32030b0ce356351a1d test: Add bad-txns-*-toolarge test cases to invalid_txs (MarcoFalke) Pull request description: ACKs for top commit: laanwj: ACK faae5a9a356d821f0cbdea32030b0ce356351a1d Tree-SHA512: 93962de02104de220cc76f3759e7276423668bbd7f2b5c32e256ece2daf55501d72804bb9eb009a5d7b3a6631c88859cf6cc3e51da19dddf73b4e7df6e8c4ce4
2020-03-11Merge #18304: ci: Enable all functional tests in valgrindMarcoFalke
4444edc2e6671d3f73de3725447130f73ecf0375 ci: Enable all functional tests in valgrind (MarcoFalke) Pull request description: The travis timeout for our repo has been bumped to 2h, so we can run all tests in valgrind now ACKs for top commit: practicalswift: ACK 4444edc2e6671d3f73de3725447130f73ecf0375 -- regarding the three disabled cases (`feature_abortnode`, `feature_block` and `rpc_bind`): not a big deal since MSan will take care of those once #18288 is merged. More is more :) Tree-SHA512: ea2f798112911b6d1f3d88cfcdf0a7cdb698687248343703d6fe55da144542c961c15d888bffb41672c10aa76765615cb7c7ff93d468bfad3c51f962f24e7abb
2020-03-10ci: Enable all functional tests in valgrindMarcoFalke
2020-03-10Merge #18311: Bumpfee test fixMarcoFalke
f1b45031148105754c23af08c891387e71c3c2c3 bumpfee test: exit loop at proper time with new fee value being compared (Gregory Sanders) 2e4edc68f903cf7873027440ff551f3f6121dbe6 Add some test logging to wallet_bumpfee.py (Gregory Sanders) Pull request description: In the loop we accidentally used `origfee` which is not the value to check, and also allowed the loop to exit too early since the new fee must be strictly greater than `0.0005`. Also converted/added a bunch of logging from comments. Resolves https://github.com/bitcoin/bitcoin/issues/17716 ACKs for top commit: MarcoFalke: ACK f1b45031148105754c23af08c891387e71c3c2c3 🏈 Tree-SHA512: eb73297fc82b09b9ec08d85ba3f0bec662119d0ff63ccf5d978a7bad6a674b5915f5ed021ec42f72a732c9ee7af43212d1de87361f50a970df7755caec96f6d8
2020-03-10bumpfee test: exit loop at proper time with new fee value being comparedGregory Sanders
2020-03-10Add some test logging to wallet_bumpfee.pyGregory Sanders
2020-03-10Merge #18305: test: Explain why test logging should be usedMarcoFalke
ffff9dcdc3cbe427739cc19cc7a53f032474fa2a test: Explain why test logging should be used (MarcoFalke) Pull request description: Background is that some tests don't have any `self.log` call at all. Thus there are no "anchor points" and those tests are hard to debug because the logs can't easily be parsed by a human. ACKs for top commit: jonatack: ACK ffff9dcdc3cbe427739cc19cc7a53f032474fa2a instagibbs: ACK https://github.com/bitcoin/bitcoin/pull/18305/commits/ffff9dcdc3cbe427739cc19cc7a53f032474fa2a fanquake: re-ACK ffff9dcdc3cbe427739cc19cc7a53f032474fa2a Tree-SHA512: 08d962e85c4892c2a0c58feb5dc697c680a9d68e41a79417da6fcd415e0c5c735c4533a985cf225bb89deb5ca717d9bedf990657958079185804caa512b10f5a
2020-03-10fuzz: Remove option --export_coverage from test_runnerMarcoFalke
The coverage statistics are not stable across clang versions
2020-03-10test: Explain why test logging should be usedMarcoFalke
2020-03-10qa: Add getdescriptorinfo functional testJoão Barbosa
2020-03-09test: add logging to wallet_listsinceblock.pyJon Atack
2020-03-09tests: Remove FUZZERS_MISSING_CORPORApracticalswift
2020-03-09tests: Add basic fuzzing harness for CNetAddr/CService/CSubNet related ↵practicalswift
functions (netaddress.h)
2020-03-09fuzz: Add option to merge input dir to test runnerMarcoFalke
2020-03-09tests: Reset FUZZERS_MISSING_CORPORA to enable regression fuzzing for more ↵practicalswift
harnesses
2020-03-07tests: Add key_io fuzzing harnesspracticalswift
2020-03-06build: Add locale fuzzer to FUZZERS_MISSING_CORPORApracticalswift
2020-03-06Merge #18234: refactor: Replace boost::mutex,condition_var,chrono with std ↵Wladimir J. van der Laan
equivalents in scheduler 70a6b529f306ff72ea1badf25e970a92b2b17ab3 lint-cppcheck: Remove -DHAVE_WORKING_BOOST_SLEEP_FOR (Anthony Towns) 294937b39de5924e772f8ed90d35c53290c8acab scheduler_tests: re-enable mockforward test (Anthony Towns) cea19f685915be8affb2203184a549576194413f Drop unused reverselock.h (Anthony Towns) d0ebd93270758ea97ea956b8821e17a2d001ea94 scheduler: switch from boost to std (Anthony Towns) b9c426012770d166e6ebfab27689be44e6e89aa5 sync.h: add REVERSE_LOCK (Anthony Towns) 306f71b4eb4a0fd8e64f47dc008bc235b80b13d9 scheduler: don't rely on boost interrupt on shutdown (Anthony Towns) Pull request description: Replacing boost functionality with C++11 stuff. Motivated by #18227, but should stand alone. Changing from `boost::condition_var` to `std::condition_var` means `threadGroup.interrupt_all` isn't enough to interrupt `serviceQueue` anymore, so that means calling `stop()` before `join_all()` is needed. And the existing reverselock.h code doesn't work with sync.h's DebugLock code (because the reversed lock won't be removed from `g_lockstack` which then leads to incorrect potential deadlock warnings), so I've replaced that with a dedicated class and macro that's aware of our debug lock behaviour. Fixes #16027, Fixes #14200, Fixes #18227 ACKs for top commit: laanwj: ACK 70a6b529f306ff72ea1badf25e970a92b2b17ab3 Tree-SHA512: d1da13adeabcf9186d114e2dad9a4fdbe2e440f7afbccde0c13dfbaf464efcd850b69d3371c5bf8b179d7ceb9d81f4af3cc22960b90834e41eaaf6d52ef7d331
2020-03-07lint-cppcheck: Remove -DHAVE_WORKING_BOOST_SLEEP_FORAnthony Towns
2020-03-06tests: Add fuzzing harness for locale independence testingpracticalswift
2020-03-06scheduler: switch from boost to stdAnthony Towns
Changes from boost::chrono to std::chrono, boost::condition_var to std::condition_var, boost::mutex to sync.h Mutex, and reverselock.h to sync.h REVERSE_LOCK. Also adds threadsafety annotations to CScheduler members.
2020-03-05Merge #17972: tests: Add fuzzing harness for CKey and key related functionsMarcoFalke
f4691b6c217ab843e6e66fa0ad34d83137499a89 tests: Add fuzzing harness for CKey related functions (practicalswift) Pull request description: Add fuzzing harness for `CKey` and key related functions. **How to test this PR** ``` $ make distclean $ ./autogen.sh $ CC=clang CXX=clang++ ./configure --enable-fuzz \ --with-sanitizers=address,fuzzer,undefined $ make $ src/test/fuzz/key … #4096 pulse cov: 5736 ft: 6960 corp: 27/833b lim: 67 exec/s: 2048 rss: 122Mb #8192 pulse cov: 5736 ft: 6960 corp: 27/833b lim: 103 exec/s: 2048 rss: 143Mb #13067 NEW cov: 5736 ft: 6965 corp: 28/865b lim: 154 exec/s: 2177 rss: 166Mb L: 32/32 MS: 1 ChangeBit- #16384 pulse cov: 5736 ft: 6965 corp: 28/865b lim: 182 exec/s: 2048 rss: 181Mb #32768 pulse cov: 5736 ft: 6965 corp: 28/865b lim: 347 exec/s: 2184 rss: 258Mb … ``` Top commit has no ACKs. Tree-SHA512: 5b17ffb70c31966d3eac06d2258c127ae671d28d6cdf4e6ac20b45cd59ad32f80952c9c749930b97d317c72d5f840a3b75d466fd28fb6c351424a72c3e41bcbc
2020-03-05tests: Add fuzzing harness for CKey related functionspracticalswift
2020-03-05Merge #17996: tests: Add fuzzing harness for serialization/deserialization ↵MarcoFalke
of floating-points and integrals 9ff41f64198e8ddb969544fc1a5328763f1fa183 tests: Add float to FUZZERS_MISSING_CORPORA (temporarily) (practicalswift) 8f6fb0a85ae6399c8fb4f205ad35c319c42294f1 tests: Add serialization/deserialization fuzzing for integral types (practicalswift) 3c82b92d2e01e409cc46261bffcf3643102f0b94 tests: Add fuzzing harness for functions taking floating-point types as input (practicalswift) c2bd5888607d283a229c9361747a93c83dfea0de Add missing includes (practicalswift) Pull request description: Add simple fuzzing harness for functions with floating-point parameters (such as `ser_double_to_uint64(double)`, etc.). Add serialization/deserialization fuzzing for integral types. Add missing includes. To test this PR: ``` $ make distclean $ ./autogen.sh $ CC=clang CXX=clang++ ./configure --enable-fuzz \ --with-sanitizers=address,fuzzer,undefined $ make $ src/test/fuzz/float … ``` Top commit has no ACKs. Tree-SHA512: 9b5a0c4838ad18d715c7398e557d2a6d0fcc03aa842f76d7a8ed716170a28f17f249eaede4256998aa3417afe2935e0ffdfaa883727d71ae2d2d18a41ced24b5
2020-03-05tests: Add float to FUZZERS_MISSING_CORPORA (temporarily)practicalswift
2020-03-05Merge #18056: ci: Check for submodulesWladimir J. van der Laan
2a95c7c95690112a03b14ccb0fb8f66db12cb75b ci: Check for submodules (Emil Engler) Pull request description: See #18019. The current solution looks like this (I also tested with multiple submodules): ``` These submodules were found, delete them: 355a5a310019659d9bf6818d2fd66fbb214dfed7 curl (curl-7_68_0-108-g355a5a310) ``` The submodule example command was `git submodule add https://github.com/curl/curl.git curl` ACKs for top commit: laanwj: ACK 2a95c7c95690112a03b14ccb0fb8f66db12cb75b Tree-SHA512: 64bf388123f0a88d12e3e41ff29bc190339377a0615c35dc3f2700bb7773470a8fa426e0ff57188a60ed88bded39f75082ff0b73118651ff403b163422395005
2020-03-05Merge #17812: config, net, test: asmap feature refinements and functional testsfanquake
1ba3e1cc21150abe632a5b82a1a38998b33815dc init: move asmap code earlier in init process (Jon Atack) 5ba829e12e99f119df56cab422f827b9be03fe57 rpc: fix getpeerinfo RPCResult `mapped_as` type (Jon Atack) c90b9a2399f4cead37bad39f388ce1255e123dc4 net: extract conditional to bool CNetAddr::IsHeNet (Jon Atack) 819fb5549b0d02477f47b3c40338071f37b6d885 logging: asmap logging and #include fixups (Jon Atack) dcaf543ba0241f9219cea70b67c7b066d4c9ca9b test: add functional test for an empty, unparsable asmap (Jon Atack) b8d0412b213df18f23bf8677ab94068c6cca9f51 config: separate the asmap finding and parsing checks (Jon Atack) 81c38a24975f34e5894efe3d1aaf45ff6a8cee4a config: enable passing -asmap an absolute file path (Jon Atack) fbe9b024f01c29153afe494fed74b623ce3ffefa config: use default value in -asmap config (Jon Atack) 08b992675cf8d946db19b7bea747fa1085fdb2a2 test: add feature_asmap functional tests (Jon Atack) Pull request description: This PR builds on PR #16702 to add functional tests / sanity checks and user-facing refinements for passing `-asmap` to configure ASN-based IP bucketing in addrman. As per our review discussion in that PR, the idea here is to handle aspects like functional tests and config arg handling that can help the PR be merged while enabling the author to focus on the bucketing itself. - [x] add feature functional tests to verify node behaviour and debug log output when launching - `bitcoind` with no `-asmap` arg - `bitcoind -asmap=RELATIVE_FILENAME` to the unit test data skeleton asmap - `bitcoind -asmap` with no filename specified using the default asmap file - `bitcoind -asmap` with no filename specified and a missing default asmap file - [x] add the ability to pass absolute path filenames to the `-asmap` config arg in addition to datadir-relative path filenames as per https://github.com/bitcoin/bitcoin/pull/16702#discussion_r361300447, and add test coverage - [x] separate the asmap file finding and parsing checks, which allows adding tests for the case of a found but unparseable or empty asmap - [x] add test for an empty asmap - [x] various asmap fixups - [x] move the asmap init code earlier in the init process to provide immediate feedback when passing an `-asmap` config arg. This speeds up the `feature_asmap` functional test from 60 to 5 seconds! Credit to Wladimir J. van der Laan for the suggestion. ACKs for top commit: practicalswift: ACK 1ba3e1cc21150abe632a5b82a1a38998b33815dc -- diff looks correct fanquake: ACK 1ba3e1cc21150abe632a5b82a1a38998b33815dc Tree-SHA512: e9094460a597ac5597449acfe631c87b71d3ede6a12c7ae61b26d1161b3eefed8e7e25c4fb0505864cebd89300b7c4cf9378060aa9155441029315df15fa3283
2020-03-05Merge #18249: test: Bump timeouts to accomodate really slow disksfanquake
fa6df0de538c15a6d393830af373ac9af6f48125 test: Bump timeouts to accomodate really slow disks (MarcoFalke) Pull request description: Needed these patches locally for some arm machines with slow storage ACKs for top commit: practicalswift: ACK fa6df0de538c15a6d393830af373ac9af6f48125 fanquake: ACK fa6df0de538c15a6d393830af373ac9af6f48125 Tree-SHA512: 22f2f6f7ed05f26013431126bb179b029dbc931f02d0e58f8970c6d477f43e3106d76c9732942034cb2cfcb827191e338a082f953ccb69531a19ee6dab9a7e1a
2020-03-04init: move asmap code earlier in init processJon Atack
and update feature_asmap.py and test_runner.py This commit moves the asmap init.cpp code from the end of "Step 12: start node" to "Step 6: network initialization" to provide feedback on passing an -asmap config arg much more quickly. This change speeds up the feature_asmap.py functional test file from 60 to 5 seconds by accelerating the 2 tests that use `assert_start_raises_init_error`. Credit to Wladimir J. van der Laan for the suggestion.
2020-03-04logging: asmap logging and #include fixupsJon Atack
- move asmap #includes to sorted positions in addrman and init (move-only) - remove redundant quotes in asmap InitError, update test - remove full stops from asmap logging to be consistent with debug logging, update tests