Commit Graph

72 Commits

Author SHA1 Message Date
Wladimir J. van der Laan a987def4f6
Merge #10143: [net] Allow disconnectnode RPC to be called with node id
d54297f [tests] disconnect_ban: add tests for disconnect-by-nodeid (John Newbery)
5cc3ee2 [tests] disconnect_ban: remove dependency on urllib (John Newbery)
12de2f2 [tests] disconnect_ban: use wait_until instead of sleep (John Newbery)
2077fda [tests] disconnect_ban: add logging (John Newbery)
395561b [tests] disconnectban test - only use two nodes (John Newbery)
e367ad5 [tests] rename nodehandling to disconnectban (John Newbery)
d6564a2 [tests] fix nodehandling.py flake8 warnings (John Newbery)
23e6e64 Allow disconnectnode() to be called with node id (John Newbery)

Tree-SHA512: a371bb05a24a91cdb16a7ac4fbb091d5d3bf6554b29bd69d74522cb7523d3f1c5b1989d5e7b03f3fc7369fb727098dd2a549de551b731dd480c121d9517d3576
2017-04-20 11:47:22 +02:00
John Newbery d54297f1a8 [tests] disconnect_ban: add tests for disconnect-by-nodeid 2017-04-19 13:47:56 -04:00
John Newbery 5cc3ee24d2 [tests] disconnect_ban: remove dependency on urllib 2017-04-19 13:47:56 -04:00
John Newbery 12de2f252c [tests] disconnect_ban: use wait_until instead of sleep 2017-04-19 13:47:56 -04:00
John Newbery 2077fdacd3 [tests] disconnect_ban: add logging 2017-04-19 13:47:56 -04:00
John Newbery 395561becf [tests] disconnectban test - only use two nodes 2017-04-19 13:47:56 -04:00
John Newbery e367ad5b44 [tests] rename nodehandling to disconnectban 2017-04-19 13:47:56 -04:00
John Newbery d6564a26f4 [tests] fix nodehandling.py flake8 warnings 2017-04-19 13:47:56 -04:00
MarcoFalke 9111df9673
Merge #10219: Tests: Order Python Tests Differently
637706d Tests: Put Extended tests first when they're included (Jimmy Song)

Tree-SHA512: 0a720b2443b3e65f4ad548ecdf822468460fc4f4ecf32385dd79511a01c9ea4c94f0bf765ca593705b19baee1bae254dfcc3952da64b9c51d75b7da7abcdcd28
2017-04-18 09:26:43 +02:00
Jimmy Song 637706dc9e Tests: Put Extended tests first when they're included
* Added documentation in tests/README.md about enabling wallet, utils and daemon.
* Change ordering to make the long-running EXTENDED_TESTS go first.
2017-04-17 15:20:35 -07:00
MarcoFalke d86bb075bf
Merge #10197: [tests] Functional test warnings
08e51c1 [tests] Remove cache directory by default when running test_runner (John Newbery)
c85b080 [test] add warnings to test_runner (John Newbery)

Tree-SHA512: 537a8a258e410102708d1e02893f3f45abe7a3a3290536249381a7dc55d74ca78322804bf34178dec1461ec1c29d8f8358c5901ddd1633f8b301b95bcbb6ce6d
2017-04-17 22:17:22 +02:00
John Newbery a97ed80f97 [tests] test_runner - check unicode 2017-04-17 14:16:43 -04:00
John Newbery 08e51c1c03 [tests] Remove cache directory by default when running test_runner 2017-04-17 10:31:55 -04:00
John Newbery c85b080cc7 [test] add warnings to test_runner 2017-04-17 10:31:55 -04:00
Wladimir J. van der Laan e96462fbec tests: Fix test_runner return value in case of skipped test
Currently test_runner reports an error if a test case is skipped.
This is not how it should be, only failed tests should cause it to fail.
2017-04-11 19:49:34 +02:00
Wladimir J. van der Laan e19586a8a9
Merge #10135: [p2p] Send the correct error code in reject messages
5d08c9c Send the correct error code in reject messages (John Newbery)

Tree-SHA512: 0cd3ef3ae202584b138cc0bbfba4125635822e0c5a755fb9276a604b39286959ab22dabc3104aa5d7e71358cd69d965de2a333ff04bf3e8ed43cf0296ac01264
2017-04-10 14:44:22 +02:00
MarcoFalke 88799ea1b1
Merge #10124: [test] Suppress test logging spam
45ce471 Reduce spammy test logging (John Newbery)

Tree-SHA512: 64b2ce29fb62a4e738840bbaf93563559451c2ef078ba66ecfc1dbe34adefea61ad2ad2d768444cb2e0b30cb3cbe47e38ed818d4c91f7723a3d1ba9fdd0043f9
2017-04-08 12:34:31 +02:00
John Newbery 45ce471ab0 Reduce spammy test logging
This commit reduces spammy logging by the test framework. It truncates
logging send/receive message in mininode to 500 characters.  mininode
was previously logging the entire message sent received, which can be up
to 1MB for a full block.
2017-04-07 22:16:41 -04:00
John Newbery d80baaa514 fixup - align summary row correctly and make colors/glyphs globals 2017-04-07 09:15:29 -04:00
John Newbery bb92d839d5 [tests] Add unicode symbols for tests passing/failing/skipping 2017-04-06 13:31:47 -04:00
John Newbery 63062bda1a [tests] color test results and sort alphabetically 2017-04-05 18:36:37 -04:00
Suhas Daftuar ba7dd8bf6f Test prioritisetransaction and ancestor fee state
There is already a similar test for descendant fee state.
2017-04-03 15:48:55 -04:00
Wladimir J. van der Laan ebfd653798
Merge #10077: [qa] Add setnetworkactive smoke test
fa697b7 [qa] Add setnetworkactive smoke test (MarcoFalke)

Tree-SHA512: 7205bae16f551e93383987392702e6853cfb06d4448735815fa116385cbf5deb6c4a8f521efdd43cf3cc59fede3b3d1ffe74e662890b74bcc21b5c13ce1f20b7
2017-04-02 15:39:26 +02:00
MarcoFalke 12af74b289
Merge #10072: Remove sources of unreliablility in extended functional tests
a4fd89f Make forknotify.py more robust (John Newbery)
1f3d78b Wait for connection to open in bip9-softforks.py (John Newbery)

Tree-SHA512: de7d0002ee62ad97059b6f6c89b11f6e9901e3b4164ef6906bcd61e4ca499c277d9034784755966e5baf599869fad611b0b18f5547a384ceb5b7db3cc5bbd132
2017-04-02 12:52:31 +02:00
John Newbery 5d08c9c579 Send the correct error code in reject messages 2017-03-31 14:22:25 -04:00
Wladimir J. van der Laan de301b0488
Merge #10130: bitcoin-tx input verification (awemany, jnewbery)
19ecd1e Add tests for bitcoin-tx input checking (John Newbery)
21704f6 Check stderr when testing bitcoin-tx (John Newbery)
eb66bf9 bitcoin-tx: Fix missing range check (Awemany)

Tree-SHA512: 08c6153cf7dd5e0ecd23e24d81af4c0f17534d484179dd91dcd78d42df14c91284341d31cc695469a64c507bce72c34231748b7cabb7df8f1051d228fb0a62c5
2017-03-31 10:21:38 +02:00
John Newbery 19ecd1e2e1 Add tests for bitcoin-tx input checking 2017-03-30 16:37:53 -04:00
John Newbery 21704f6334 Check stderr when testing bitcoin-tx 2017-03-30 16:37:53 -04:00
John Newbery 6a18bb9a36 [tests] sync_with_ping should assert that ping hasn't timed out
sync_with_ping currently returns false if the timeout expires, and it is
the caller's responsibility to fail the test. However, none of the tests
currently assert on sync_with_ping()'s return code. This commit adds an
assert to sync_with_ping so the test will fail if the timeout expires.

This commit also removes all the duplicate implementations of
sync_with_ping() from the individual tests.
2017-03-30 08:39:12 -04:00
John Newbery 6426716a99 Add send_await_disconnect() method to p2p-compactblocks.py
p2p-compactblocks was incorrectly using sync_with_ping() when sending in
invalid block. The node would disconnect us and never respond to the
ping, so the sync_with_ping would just time out after 30 seconds and
continue with the test.

This commit adds a send_await_disconnect() method that sends the
message, and then waits for the node to disconnect us. In this commit
I've added the method to p2p-compactblocks.py, but a future commit could
move it to mininode since it could be useful more generally.

This commit reduces the p2p-compactblock runtime by 30 seconds.
2017-03-30 08:39:12 -04:00
MarcoFalke 8ac8041286
Merge #10109: Remove SingleNodeConnCB
159fe88 Remove SingleNodeConnCB (John Newbery)

Tree-SHA512: 2fc3d060f4ac9445e657134919a871c46987d53eb98d23a858ee9515fc997be7a81923f08f2a37d07d123b55b912ae82ffa0f820d16297b044ab24dcf0788a8a
2017-03-30 09:23:15 +02:00
Wladimir J. van der Laan f34cdcbd80
Merge #9294: Use internal HD chain for change outputs (hd split)
4115af7 Fix rebase issue where pwalletMain was used instead of pwallet Ser./Deser. nInternalChainCounter as last element (Jonas Schnelli)
9382f04 Do not break backward compatibility during wallet encryption (Jonas Schnelli)
1df08d1 Add assertion for CanSupportFeature(FEATURE_HD_SPLIT) (Jonas Schnelli)
cd468d0 Define CWallet::DeriveNewChildKey() as private (Jonas Schnelli)
ed79e4f Optimize GetOldestKeyPoolTime(), return as soon as we have both oldest keys (Jonas Schnelli)
771a304 Make sure we set the wallets min version to FEATURE_HD_SPLIT at the very first point (Jonas Schnelli)
1b3b5c6 Slightly modify fundrawtransaction.py test (change getnewaddress() into getrawchangeaddress()) (Jonas Schnelli)
003e197 Remove FEATURE_HD_SPLIT bump TODO (Jonas Schnelli)
d9638e5 Overhaul the internal/external key derive switch (Jonas Schnelli)
1090502 Fix superfluous cast and code style nits in RPC wallet-hd.py test (Jonas Schnelli)
58e1483 CKeyPool avoid "catch (...)" in SerializationOp (Jonas Schnelli)
e138876 Only show keypoolsize_hd_internal if HD split is enabled (Jonas Schnelli)
add38d9 GetOldestKeyPoolTime: if HD & HD Chain Split is enabled, response max(oldest-internal-key, oldest-external-key) (Jonas Schnelli)
dd526c2 Don't switch to HD-chain-split during wallet encryption of non HD-chain-split wallets (Jonas Schnelli)
79df9df Switch to 100% for the HD internal keypool size (Jonas Schnelli)
bcafca1 Make sure we always generate one keypool key at minimum (Jonas Schnelli)
d0a627a Fix issue where CDataStream->nVersion was taken a CKeyPool record version (Jonas Schnelli)
9af8f00 Make sure we hand out keypool keys if HD_SPLIT is not enabled (Jonas Schnelli)
469a47b Make sure ReserveKeyFromKeyPool only hands out internal keys if HD_SPLIT is supported (Jonas Schnelli)
05a9b49 Fix wrong keypool internal size in RPC getwalletinfo help (Jonas Schnelli)
01de822 Removed redundant IsLocked() check in NewKeyPool() (Jonas Schnelli)
d59531d Immediately return setKeyPool's size if HD or HD_SPLIT is disabled or not supported (Jonas Schnelli)
02592f4 [Wallet] split the keypool in an internal and external part (Jonas Schnelli)

Tree-SHA512: 80d355d5e844b48c3163b56c788ab8b5b5285db0ceeb19858a3ef517d5a702afeca21dbae526d7b8fb4101c2a745af1d92bf557c40cf516780f17992bf678c1a
2017-03-29 12:51:06 +02:00
John Newbery a4fd89fddb Make forknotify.py more robust
forknotify would intermittently fail because the alert file was not
being written fast enough. This commit adds a timeout so the test does
not fail immediately.
2017-03-28 16:22:19 -04:00
John Newbery 1f3d78b4e0 Wait for connection to open in bip9-softforks.py
bip9-sofforks.py stop-starts the bitcoind node twice during the test
run, but it doesn't wait for the connection from mininode to open before
continuing with the test. This leads to race conditions where the test
can fail getblocktemplate() because it has no p2p connections.
2017-03-28 16:15:38 -04:00
John Newbery 159fe88abf Remove SingleNodeConnCB
This commit merges the NodeConnCB and SingleNodeConnCB into a single
class (called NodeConnCB). The original intent for the NodeConnCB was to
be able to have a python 'mininode' connect to multiple running
bitcoinds. This has never been used and can be achieved more easily by
having multiple NodeConns backed by a common datastore if it is ever
needed.

The changes in mininode.py are just code moves (and merging the two
classes into a single class). The code changes in the individual test
cases are changing the subclasses to subclass from NodeConnCB instead of
SingleNodeConnCB. There is a lot of duplicate code in the subclasses
that can be removed in future commits.
2017-03-28 14:16:21 -04:00
practicalswift 85de9d474b Remove call to gettransaction(...) where the result is unused 2017-03-28 15:19:52 +02:00
practicalswift bd02422332 Remove accidental trailing semicolons in Python code 2017-03-28 15:19:19 +02:00
MarcoFalke 5b029aaedb
Merge #10076: [qa] combine_logs: Use ordered list for logfiles
fa4535d [qa] combine_logs: Use ordered list for logfiles (MarcoFalke)

Tree-SHA512: 66da6f2659018d24b1cac1f6d2ee8603c2c6f15ce5aff456e8e4b208874e97c7046b97112046d5b45bfd777b405771a3ad0a55036c4f4cdeec06842563af2c4d
2017-03-28 14:45:07 +02:00
MarcoFalke 79af9fbd8c
Merge #10096: Check that all test scripts in test/functional are being run
29d6634 Check that all test scripts in test/functional are being run (John Newbery)

Tree-SHA512: 9231d3a119632be031c51c4f7e95a8adae58489a8ec36fc967d499c0708bae2941a3bf28f11dcd4efd59141eb54c3c920f2629f5cd8a0139d30397a19591666d
2017-03-28 11:36:42 +02:00
John Newbery 8c7288c06b Print out the final 1000 lines of test_framework.log if test fails 2017-03-27 19:34:25 -04:00
John Newbery 55992f1302 Add --quiet option to suppress rpc-tests.py output
rpt-tests.py outputs progress information as it runs tests. This commit
adds a --quiet option that suppresses that progress output and only
prints a summary of results (and logs from failed tests).
2017-03-27 11:55:48 -04:00
John Newbery 29d6634a69 Check that all test scripts in test/functional are being run
This commit checks that all of the python files in the test/functional
directory are listed in test_runner.py.
2017-03-27 11:33:00 -04:00
MarcoFalke fa4535df57 [qa] combine_logs: Use ordered list for logfiles 2017-03-27 11:26:31 +02:00
Wladimir J. van der Laan b1a4f27576
Merge #10073: Actually run assumevalid.py
717ad13 Actually run assumevalid.py. (John Newbery)

Tree-SHA512: 6fd55789be43e26347f8f5456194aa5e7beeeba3db85411dc75581b98059ca3a85485494fca36848f21c0f48096004906a0409fd76309951b5f977bab9f45b91
2017-03-27 09:50:42 +02:00
NicolasDorier dd5be2c7b3 [QA] Renaming rawTx into rawtx 2017-03-26 05:47:27 +00:00
MarcoFalke 111849345b
Merge #10069: [QA] Fix typo in fundrawtransaction test
803e6a3 [QA] Fix typo in fundrawtransaction test (Nicolas Dorier)

Tree-SHA512: 7b88cf09d7e756f0f5535738993868287d4c7049db44072e318f48a9b08786bebb9877f787471bbf6aac58b3d709275eefa372d727f4afd6ded41494fe0024d1
2017-03-25 16:11:02 +01:00
MarcoFalke fa697b7192 [qa] Add setnetworkactive smoke test 2017-03-25 15:33:01 +01:00
Wladimir J. van der Laan 90dd9e6c4c
Merge #9946: Fix build errors if spaces in path or parent directory
b1f584d fix build if spaces in src dir path (Matthew Zipkin)

Tree-SHA512: 5834690c1f63b85ed04bb8ed411a94da04738534364d58bd9ee333ccff7129b2bbb710f31598c40123199e023da02c1745514294af3efdbb2c2e4c1320aded35
2017-03-25 12:15:06 +01:00
Matthew Zipkin b1f584dbc1 fix build if spaces in src dir path 2017-03-24 18:22:34 -07:00
John Newbery 717ad131f6 Actually run assumevalid.py.
assumevalid was merged as part of PR 9484, but was not added to the
test_runner, so is not run even as part of the extended tests.

This commit adds assumevalid to the list of tests in test_runner. It
also clarifies the code in assumevalid considerably.
2017-03-24 18:23:36 -04:00