Often, it is hard to debug unit test failures without the debug log. Especially when the failure happens remotely (e.g. on a ci system).
Fix that by printing the log on failure.
Often, it is hard to debug unit test failures without the debug log. Especially when the failure happens remotely (e.g. on a ci system).
Fix that by printing the log on failure.
make check
Concept ACK.
Ran make -j7 check
with following patch and got confusing output - looks like a lot of duplicated lines. Maybe unavoidable?
0diff --git a/src/test/net_tests.cpp b/src/test/net_tests.cpp
1index fed65afdbf..d0948dcbca 100644
2--- a/src/test/net_tests.cpp
3+++ b/src/test/net_tests.cpp
4@@ -88,6 +88,7 @@ BOOST_AUTO_TEST_CASE(cnode_listen_port)
5 BOOST_CHECK(gArgs.SoftSetArg("-port", std::to_string(altPort)));
6 port = GetListenPort();
7 BOOST_CHECK(port == altPort);
8+ BOOST_CHECK(false);
9 }
10
11 BOOST_AUTO_TEST_CASE(caddrdb_read)
0Making check in src
1make[1]: Entering directory '/home/james/src/bitcoin/src'
2make[2]: Entering directory '/home/james/src/bitcoin/src'
3make[3]: Entering directory '/home/james/src/bitcoin'
4make[3]: Leaving directory '/home/james/src/bitcoin'
5make check-TESTS check-local
6make[3]: Entering directory '/home/james/src/bitcoin/src'
7Running tests: arith_uint256_tests from test/arith_uint256_tests.cpp
8Running tests: addrman_tests from test/addrman_tests.cpp
9Running tests: amount_tests from test/amount_tests.cpp
10Running tests: allocator_tests from test/allocator_tests.cpp
11Running tests: base32_tests from test/base32_tests.cpp
12Running tests: base58_tests from test/base58_tests.cpp
13Running tests: base64_tests from test/base64_tests.cpp
14Running tests: bech32_tests from test/bech32_tests.cpp
15Running tests: bip32_tests from test/bip32_tests.cpp
16Running tests: blockchain_tests from test/blockchain_tests.cpp
17Running tests: blockencodings_tests from test/blockencodings_tests.cpp
18Running tests: blockfilter_tests from test/blockfilter_tests.cpp
19Running tests: blockfilter_index_tests from test/blockfilter_index_tests.cpp
20Running tests: bloom_tests from test/bloom_tests.cpp
21Running tests: bswap_tests from test/bswap_tests.cpp
22Running tests: checkqueue_tests from test/checkqueue_tests.cpp
23Running tests: coins_tests from test/coins_tests.cpp
24Running tests: compilerbug_tests from test/compilerbug_tests.cpp
25Running tests: compress_tests from test/compress_tests.cpp
26Running tests: crypto_tests from test/crypto_tests.cpp
27Running tests: cuckoocache_tests from test/cuckoocache_tests.cpp
28Running tests: denialofservice_tests from test/denialofservice_tests.cpp
29make[4]: Entering directory '/home/james/src/bitcoin/src'
30make[5]: Entering directory '/home/james/src/bitcoin'
31make[5]: Leaving directory '/home/james/src/bitcoin'
32Running tests: descriptor_tests from test/descriptor_tests.cpp
33Running tests: flatfile_tests from test/flatfile_tests.cpp
34Running tests: fs_tests from test/fs_tests.cpp
35Running tests: getarg_tests from test/getarg_tests.cpp
36Running tests: hash_tests from test/hash_tests.cpp
37Running tests: key_io_tests from test/key_io_tests.cpp
38Running tests: key_tests from test/key_tests.cpp
39Running tests: limitedmap_tests from test/limitedmap_tests.cpp
40Running tests: dbwrapper_tests from test/dbwrapper_tests.cpp
41Running tests: validation_tests from test/validation_tests.cpp
42Running tests: mempool_tests from test/mempool_tests.cpp
43Running tests: merkle_tests from test/merkle_tests.cpp
44Running tests: merkleblock_tests from test/merkleblock_tests.cpp
45Running tests: miner_tests from test/miner_tests.cpp
46PASS: qt/test/test_bitcoin-qt
47============================================================================
48Testsuite summary for Bitcoin Core 0.18.99
49============================================================================
50# TOTAL: 1
51# PASS: 1
52# SKIP: 0
53# XFAIL: 0
54# FAIL: 0
55# XPASS: 0
56# ERROR: 0
57============================================================================
58make[4]: Leaving directory '/home/james/src/bitcoin/src'
59Running tests: multisig_tests from test/multisig_tests.cpp
60Running tests: net_tests from test/net_tests.cpp
61Running 9 test cases...
62Entering test module "Bitcoin Core Test Suite"
63test/net_tests.cpp(79): Entering test suite "net_tests"
64test/net_tests.cpp(81): Entering test case "cnode_listen_port"
652019-09-27T18:03:51Z Bitcoin Core version v0.18.99.0-fa8e20aaca-dirty (debug build)
662019-09-27T18:03:51Z Using 16 MiB out of 32/2 requested for signature cache, able to store 524288 elements
672019-09-27T18:03:51Z Using 16 MiB out of 32/2 requested for script execution cache, able to store 524288 elements
68test/net_tests.cpp(91): error: in "net_tests/cnode_listen_port": check false has failed
69test/net_tests.cpp(81): Leaving test case "cnode_listen_port"; testing time: 36113us
70test/net_tests.cpp(94): Entering test case "caddrdb_read"
712019-09-27T18:03:51Z Bitcoin Core version v0.18.99.0-fa8e20aaca-dirty (debug build)
722019-09-27T18:03:51Z Bitcoin Core version v0.18.99.0-fa8e20aaca-dirty (debug build)
732019-09-27T18:03:51Z Using 16 MiB out of 32/2 requested for signature cache, able to store 524288 elements
742019-09-27T18:03:51Z Using 16 MiB out of 32/2 requested for signature cache, able to store 524288 elements
752019-09-27T18:03:51Z Using 16 MiB out of 32/2 requested for script execution cache, able to store 524288 elements
762019-09-27T18:03:51Z Using 16 MiB out of 32/2 requested for script execution cache, able to store 524288 elements
77test/net_tests.cpp(94): Leaving test case "caddrdb_read"; testing time: 12342us
78test/net_tests.cpp(139): Entering test case "caddrdb_read_corrupted"
792019-09-27T18:03:51Z Bitcoin Core version v0.18.99.0-fa8e20aaca-dirty (debug build)
802019-09-27T18:03:51Z Bitcoin Core version v0.18.99.0-fa8e20aaca-dirty (debug build)
812019-09-27T18:03:51Z Bitcoin Core version v0.18.99.0-fa8e20aaca-dirty (debug build)
822019-09-27T18:03:51Z Using 16 MiB out of 32/2 requested for signature cache, able to store 524288 elements
832019-09-27T18:03:51Z Using 16 MiB out of 32/2 requested for signature cache, able to store 524288 elements
842019-09-27T18:03:51Z Using 16 MiB out of 32/2 requested for signature cache, able to store 524288 elements
852019-09-27T18:03:51Z Using 16 MiB out of 32/2 requested for script execution cache, able to store 524288 elements
862019-09-27T18:03:51Z Using 16 MiB out of 32/2 requested for script execution cache, able to store 524288 elements
872019-09-27T18:03:51Z Using 16 MiB out of 32/2 requested for script execution cache, able to store 524288 elements
882019-09-27T18:03:51Z ERROR: DeserializeDB: Deserialize or I/O error - CDataStream::read(): end of data: iostream error
892019-09-27T18:03:51Z ERROR: DeserializeDB: Deserialize or I/O error - CDataStream::read(): end of data: iostream error
902019-09-27T18:03:51Z ERROR: DeserializeDB: Deserialize or I/O error - CDataStream::read(): end of data: iostream error
91test/net_tests.cpp(139): Leaving test case "caddrdb_read_corrupted"; testing time: 7922us
92test/net_tests.cpp(170): Entering test case "cnode_simple_test"
932019-09-27T18:03:51Z Bitcoin Core version v0.18.99.0-fa8e20aaca-dirty (debug build)
942019-09-27T18:03:51Z Bitcoin Core version v0.18.99.0-fa8e20aaca-dirty (debug build)
952019-09-27T18:03:51Z Bitcoin Core version v0.18.99.0-fa8e20aaca-dirty (debug build)
962019-09-27T18:03:51Z Bitcoin Core version v0.18.99.0-fa8e20aaca-dirty (debug build)
972019-09-27T18:03:51Z Using 16 MiB out of 32/2 requested for signature cache, able to store 524288 elements
982019-09-27T18:03:51Z Using 16 MiB out of 32/2 requested for signature cache, able to store 524288 elements
992019-09-27T18:03:51Z Using 16 MiB out of 32/2 requested for signature cache, able to store 524288 elements
1002019-09-27T18:03:51Z Using 16 MiB out of 32/2 requested for signature cache, able to store 524288 elements
1012019-09-27T18:03:51Z Using 16 MiB out of 32/2 requested for script execution cache, able to store 524288 elements
1022019-09-27T18:03:51Z Using 16 MiB out of 32/2 requested for script execution cache, able to store 524288 elements
1032019-09-27T18:03:51Z Using 16 MiB out of 32/2 requested for script execution cache, able to store 524288 elements
1042019-09-27T18:03:51Z Using 16 MiB out of 32/2 requested for script execution cache, able to store 524288 elements
105test/net_tests.cpp(170): Leaving test case "cnode_simple_test"; testing time: 7579us
106test/net_tests.cpp(195): Entering test case "ipv4_peer_with_ipv6_addrMe_test"
1072019-09-27T18:03:51Z Bitcoin Core version v0.18.99.0-fa8e20aaca-dirty (debug build)
1082019-09-27T18:03:51Z Bitcoin Core version v0.18.99.0-fa8e20aaca-dirty (debug build)
1092019-09-27T18:03:51Z Bitcoin Core version v0.18.99.0-fa8e20aaca-dirty (debug build)
1102019-09-27T18:03:51Z Bitcoin Core version v0.18.99.0-fa8e20aaca-dirty (debug build)
1112019-09-27T18:03:51Z Bitcoin Core version v0.18.99.0-fa8e20aaca-dirty (debug build)
1122019-09-27T18:03:51Z Using 16 MiB out of 32/2 requested for signature cache, able to store 524288 elements
1132019-09-27T18:03:51Z Using 16 MiB out of 32/2 requested for signature cache, able to store 524288 elements
1142019-09-27T18:03:51Z Using 16 MiB out of 32/2 requested for signature cache, able to store 524288 elements
1152019-09-27T18:03:51Z Using 16 MiB out of 32/2 requested for signature cache, able to store 524288 elements
1162019-09-27T18:03:51Z Using 16 MiB out of 32/2 requested for signature cache, able to store 524288 elements
1172019-09-27T18:03:51Z Using 16 MiB out of 32/2 requested for script execution cache, able to store 524288 elements
1182019-09-27T18:03:51Z Using 16 MiB out of 32/2 requested for script execution cache, able to store 524288 elements
1192019-09-27T18:03:51Z Using 16 MiB out of 32/2 requested for script execution cache, able to store 524288 elements
1202019-09-27T18:03:51Z Using 16 MiB out of 32/2 requested for script execution cache, able to store 524288 elements
1212019-09-27T18:03:51Z Using 16 MiB out of 32/2 requested for script execution cache, able to store 524288 elements
122test/net_tests.cpp(195): Leaving test case "ipv4_peer_with_ipv6_addrMe_test"; testing time: 6446us
123test/net_tests.cpp(233): Entering test case "LimitedAndReachable_Network"
1242019-09-27T18:03:51Z Bitcoin Core version v0.18.99.0-fa8e20aaca-dirty (debug build)
1252019-09-27T18:03:51Z Bitcoin Core version v0.18.99.0-fa8e20aaca-dirty (debug build)
1262019-09-27T18:03:51Z Bitcoin Core version v0.18.99.0-fa8e20aaca-dirty (debug build)
1272019-09-27T18:03:51Z Bitcoin Core version v0.18.99.0-fa8e20aaca-dirty (debug build)
1282019-09-27T18:03:51Z Bitcoin Core version v0.18.99.0-fa8e20aaca-dirty (debug build)
1292019-09-27T18:03:51Z Bitcoin Core version v0.18.99.0-fa8e20aaca-dirty (debug build)
1302019-09-27T18:03:51Z Using 16 MiB out of 32/2 requested for signature cache, able to store 524288 elements
1312019-09-27T18:03:51Z Using 16 MiB out of 32/2 requested for signature cache, able to store 524288 elements
1322019-09-27T18:03:51Z Using 16 MiB out of 32/2 requested for signature cache, able to store 524288 elements
1332019-09-27T18:03:51Z Using 16 MiB out of 32/2 requested for signature cache, able to store 524288 elements
1342019-09-27T18:03:51Z Using 16 MiB out of 32/2 requested for signature cache, able to store 524288 elements
1352019-09-27T18:03:51Z Using 16 MiB out of 32/2 requested for signature cache, able to store 524288 elements
1362019-09-27T18:03:51Z Using 16 MiB out of 32/2 requested for script execution cache, able to store 524288 elements
1372019-09-27T18:03:51Z Using 16 MiB out of 32/2 requested for script execution cache, able to store 524288 elements
1382019-09-27T18:03:51Z Using 16 MiB out of 32/2 requested for script execution cache, able to store 524288 elements
1392019-09-27T18:03:51Z Using 16 MiB out of 32/2 requested for script execution cache, able to store 524288 elements
1402019-09-27T18:03:51Z Using 16 MiB out of 32/2 requested for script execution cache, able to store 524288 elements
1412019-09-27T18:03:51Z Using 16 MiB out of 32/2 requested for script execution cache, able to store 524288 elements
142test/net_tests.cpp(233): Leaving test case "LimitedAndReachable_Network"; testing time: 5801us
143test/net_tests.cpp(256): Entering test case "LimitedAndReachable_NetworkCaseUnroutableAndInternal"
1442019-09-27T18:03:51Z Bitcoin Core version v0.18.99.0-fa8e20aaca-dirty (debug build)
1452019-09-27T18:03:51Z Bitcoin Core version v0.18.99.0-fa8e20aaca-dirty (debug build)
1462019-09-27T18:03:51Z Bitcoin Core version v0.18.99.0-fa8e20aaca-dirty (debug build)
1472019-09-27T18:03:51Z Bitcoin Core version v0.18.99.0-fa8e20aaca-dirty (debug build)
1482019-09-27T18:03:51Z Bitcoin Core version v0.18.99.0-fa8e20aaca-dirty (debug build)
1492019-09-27T18:03:51Z Bitcoin Core version v0.18.99.0-fa8e20aaca-dirty (debug build)
1502019-09-27T18:03:51Z Bitcoin Core version v0.18.99.0-fa8e20aaca-dirty (debug build)
1512019-09-27T18:03:51Z Using 16 MiB out of 32/2 requested for signature cache, able to store 524288 elements
1522019-09-27T18:03:51Z Using 16 MiB out of 32/2 requested for signature cache, able to store 524288 elements
1532019-09-27T18:03:51Z Using 16 MiB out of 32/2 requested for signature cache, able to store 524288 elements
1542019-09-27T18:03:51Z Using 16 MiB out of 32/2 requested for signature cache, able to store 524288 elements
1552019-09-27T18:03:51Z Using 16 MiB out of 32/2 requested for signature cache, able to store 524288 elements
1562019-09-27T18:03:51Z Using 16 MiB out of 32/2 requested for signature cache, able to store 524288 elements
1572019-09-27T18:03:51Z Using 16 MiB out of 32/2 requested for signature cache, able to store 524288 elements
1582019-09-27T18:03:51Z Using 16 MiB out of 32/2 requested for script execution cache, able to store 524288 elements
1592019-09-27T18:03:51Z Using 16 MiB out of 32/2 requested for script execution cache, able to store 524288 elements
1602019-09-27T18:03:51Z Using 16 MiB out of 32/2 requested for script execution cache, able to store 524288 elements
1612019-09-27T18:03:51Z Using 16 MiB out of 32/2 requested for script execution cache, able to store 524288 elements
1622019-09-27T18:03:51Z Using 16 MiB out of 32/2 requested for script execution cache, able to store 524288 elements
1632019-09-27T18:03:51Z Using 16 MiB out of 32/2 requested for script execution cache, able to store 524288 elements
1642019-09-27T18:03:51Z Using 16 MiB out of 32/2 requested for script execution cache, able to store 524288 elements
165test/net_tests.cpp(256): Leaving test case "LimitedAndReachable_NetworkCaseUnroutableAndInternal"; testing time: 5789us
166test/net_tests.cpp(279): Entering test case "LimitedAndReachable_CNetAddr"
1672019-09-27T18:03:51Z Bitcoin Core version v0.18.99.0-fa8e20aaca-dirty (debug build)
1682019-09-27T18:03:51Z Bitcoin Core version v0.18.99.0-fa8e20aaca-dirty (debug build)
1692019-09-27T18:03:51Z Bitcoin Core version v0.18.99.0-fa8e20aaca-dirty (debug build)
1702019-09-27T18:03:51Z Bitcoin Core version v0.18.99.0-fa8e20aaca-dirty (debug build)
1712019-09-27T18:03:51Z Bitcoin Core version v0.18.99.0-fa8e20aaca-dirty (debug build)
1722019-09-27T18:03:51Z Bitcoin Core version v0.18.99.0-fa8e20aaca-dirty (debug build)
1732019-09-27T18:03:51Z Bitcoin Core version v0.18.99.0-fa8e20aaca-dirty (debug build)
1742019-09-27T18:03:51Z Bitcoin Core version v0.18.99.0-fa8e20aaca-dirty (debug build)
1752019-09-27T18:03:51Z Using 16 MiB out of 32/2 requested for signature cache, able to store 524288 elements
1762019-09-27T18:03:51Z Using 16 MiB out of 32/2 requested for signature cache, able to store 524288 elements
1772019-09-27T18:03:51Z Using 16 MiB out of 32/2 requested for signature cache, able to store 524288 elements
1782019-09-27T18:03:51Z Using 16 MiB out of 32/2 requested for signature cache, able to store 524288 elements
1792019-09-27T18:03:51Z Using 16 MiB out of 32/2 requested for signature cache, able to store 524288 elements
1802019-09-27T18:03:51Z Using 16 MiB out of 32/2 requested for signature cache, able to store 524288 elements
1812019-09-27T18:03:51Z Using 16 MiB out of 32/2 requested for signature cache, able to store 524288 elements
1822019-09-27T18:03:51Z Using 16 MiB out of 32/2 requested for signature cache, able to store 524288 elements
1832019-09-27T18:03:51Z Using 16 MiB out of 32/2 requested for script execution cache, able to store 524288 elements
1842019-09-27T18:03:51Z Using 16 MiB out of 32/2 requested for script execution cache, able to store 524288 elements
1852019-09-27T18:03:51Z Using 16 MiB out of 32/2 requested for script execution cache, able to store 524288 elements
1862019-09-27T18:03:51Z Using 16 MiB out of 32/2 requested for script execution cache, able to store 524288 elements
1872019-09-27T18:03:51Z Using 16 MiB out of 32/2 requested for script execution cache, able to store 524288 elements
1882019-09-27T18:03:51Z Using 16 MiB out of 32/2 requested for script execution cache, able to store 524288 elements
1892019-09-27T18:03:51Z Using 16 MiB out of 32/2 requested for script execution cache, able to store 524288 elements
1902019-09-27T18:03:51Z Using 16 MiB out of 32/2 requested for script execution cache, able to store 524288 elements
191test/net_tests.cpp(279): Leaving test case "LimitedAndReachable_CNetAddr"; testing time: 5767us
192test/net_tests.cpp(293): Entering test case "LocalAddress_BasicLifecycle"
1932019-09-27T18:03:51Z Bitcoin Core version v0.18.99.0-fa8e20aaca-dirty (debug build)
1942019-09-27T18:03:51Z Bitcoin Core version v0.18.99.0-fa8e20aaca-dirty (debug build)
1952019-09-27T18:03:51Z Bitcoin Core version v0.18.99.0-fa8e20aaca-dirty (debug build)
1962019-09-27T18:03:51Z Bitcoin Core version v0.18.99.0-fa8e20aaca-dirty (debug build)
1972019-09-27T18:03:51Z Bitcoin Core version v0.18.99.0-fa8e20aaca-dirty (debug build)
1982019-09-27T18:03:51Z Bitcoin Core version v0.18.99.0-fa8e20aaca-dirty (debug build)
1992019-09-27T18:03:51Z Bitcoin Core version v0.18.99.0-fa8e20aaca-dirty (debug build)
2002019-09-27T18:03:51Z Bitcoin Core version v0.18.99.0-fa8e20aaca-dirty (debug build)
2012019-09-27T18:03:51Z Bitcoin Core version v0.18.99.0-fa8e20aaca-dirty (debug build)
2022019-09-27T18:03:51Z Using 16 MiB out of 32/2 requested for signature cache, able to store 524288 elements
2032019-09-27T18:03:51Z Using 16 MiB out of 32/2 requested for signature cache, able to store 524288 elements
2042019-09-27T18:03:51Z Using 16 MiB out of 32/2 requested for signature cache, able to store 524288 elements
2052019-09-27T18:03:51Z Using 16 MiB out of 32/2 requested for signature cache, able to store 524288 elements
2062019-09-27T18:03:51Z Using 16 MiB out of 32/2 requested for signature cache, able to store 524288 elements
2072019-09-27T18:03:51Z Using 16 MiB out of 32/2 requested for signature cache, able to store 524288 elements
2082019-09-27T18:03:51Z Using 16 MiB out of 32/2 requested for signature cache, able to store 524288 elements
2092019-09-27T18:03:51Z Using 16 MiB out of 32/2 requested for signature cache, able to store 524288 elements
2102019-09-27T18:03:51Z Using 16 MiB out of 32/2 requested for signature cache, able to store 524288 elements
2112019-09-27T18:03:51Z Using 16 MiB out of 32/2 requested for script execution cache, able to store 524288 elements
2122019-09-27T18:03:51Z Using 16 MiB out of 32/2 requested for script execution cache, able to store 524288 elements
2132019-09-27T18:03:51Z Using 16 MiB out of 32/2 requested for script execution cache, able to store 524288 elements
2142019-09-27T18:03:51Z Using 16 MiB out of 32/2 requested for script execution cache, able to store 524288 elements
2152019-09-27T18:03:51Z Using 16 MiB out of 32/2 requested for script execution cache, able to store 524288 elements
2162019-09-27T18:03:51Z Using 16 MiB out of 32/2 requested for script execution cache, able to store 524288 elements
2172019-09-27T18:03:51Z Using 16 MiB out of 32/2 requested for script execution cache, able to store 524288 elements
2182019-09-27T18:03:51Z Using 16 MiB out of 32/2 requested for script execution cache, able to store 524288 elements
2192019-09-27T18:03:51Z Using 16 MiB out of 32/2 requested for script execution cache, able to store 524288 elements
2202019-09-27T18:03:51Z AddLocal(2.1.1.1:1000,1000)
2212019-09-27T18:03:51Z AddLocal(2.1.1.1:1000,1000)
2222019-09-27T18:03:51Z AddLocal(2.1.1.1:1000,1000)
2232019-09-27T18:03:51Z AddLocal(2.1.1.1:1000,1000)
2242019-09-27T18:03:51Z AddLocal(2.1.1.1:1000,1000)
2252019-09-27T18:03:51Z AddLocal(2.1.1.1:1000,1000)
2262019-09-27T18:03:51Z AddLocal(2.1.1.1:1000,1000)
2272019-09-27T18:03:51Z AddLocal(2.1.1.1:1000,1000)
2282019-09-27T18:03:51Z AddLocal(2.1.1.1:1000,1000)
2292019-09-27T18:03:51Z RemoveLocal(2.1.1.1:1000)
2302019-09-27T18:03:51Z RemoveLocal(2.1.1.1:1000)
2312019-09-27T18:03:51Z RemoveLocal(2.1.1.1:1000)
2322019-09-27T18:03:51Z RemoveLocal(2.1.1.1:1000)
2332019-09-27T18:03:51Z RemoveLocal(2.1.1.1:1000)
2342019-09-27T18:03:51Z RemoveLocal(2.1.1.1:1000)
2352019-09-27T18:03:51Z RemoveLocal(2.1.1.1:1000)
2362019-09-27T18:03:51Z RemoveLocal(2.1.1.1:1000)
2372019-09-27T18:03:51Z RemoveLocal(2.1.1.1:1000)
238test/net_tests.cpp(293): Leaving test case "LocalAddress_BasicLifecycle"; testing time: 5885us
239test/net_tests.cpp(79): Leaving test suite "net_tests"; testing time: 93768us
240Leaving test module "Bitcoin Core Test Suite"; testing time: 93846us
241
242*** 1 failure is detected in the test module "Bitcoin Core Test Suite"
243Makefile:13822: recipe for target 'test/net_tests.cpp.test' failed
244make[3]: *** [test/net_tests.cpp.test] Error 1
245make[3]: *** Waiting for unfinished jobs....
246make[3]: Leaving directory '/home/james/src/bitcoin/src'
247Makefile:13560: recipe for target 'check-am' failed
248make[2]: *** [check-am] Error 2
249make[2]: Leaving directory '/home/james/src/bitcoin/src'
250Makefile:13248: recipe for target 'check-recursive' failed
251make[1]: *** [check-recursive] Error 1
252make[1]: Leaving directory '/home/james/src/bitcoin/src'
253Makefile:775: recipe for target 'check-recursive' failed
254make: *** [check-recursive] Error 1
76@@ -77,6 +77,9 @@ namespace BCLog {
77
78 std::string LogTimestampStr(const std::string& str);
79
80+ /** Slots that connect to the print signal */
81+ std::list<std::function<void(const std::string&)>> m_print_callbacks /* GUARDED_BY(m_cs) */ {};
sync.h
, the tests won’t run after compilation.
109+ m_print_callbacks.push_back(std::move(fun));
110+ return --m_print_callbacks.end();
111+ }
112+
113+ /** Delete a connection */
114+ void DeleteCallback(std::list<std::function<void(const std::string&)>>::iterator it)
txindex_tests
, which I could reproduce.
The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.
No conflicts as of last run.
Ah, forgot to push one more tsan suppression. Fixed.
Though, longer term I’d like to do #8670 (comment)
utACK faa5a01d523b8eb0436128eb6c87ef22694cf13f. Tried a few different scenarios and noted that logging is provided for multiple failed test cases in a file before exiting.
For example:
0test/arith_uint256_tests.cpp:345: Entering test case "divide"
12019-10-22T19:44:29Z Bitcoin Core version v0.18.99.0-faa5a01d5-dirty (release build)
22019-10-22T19:44:29Z Using 16 MiB out of 32/2 requested for signature cache, able to store 524288 elements
32019-10-22T19:44:29Z Using 16 MiB out of 32/2 requested for script execution cache, able to store 524288 elements
4test/arith_uint256_tests.cpp:353: error: in "arith_uint256_tests/divide": check MaxL / R1L == 3 has failed
5test/arith_uint256_tests.cpp:345: Leaving test case "divide"; testing time: 2732us
6...
7test/arith_uint256_tests.cpp:404: Entering test case "bignum_SetCompact"
82019-10-22T19:44:29Z Bitcoin Core version v0.18.99.0-faa5a01d5-dirty (release build)
92019-10-22T19:44:29Z Using 16 MiB out of 32/2 requested for signature cache, able to store 524288 elements
102019-10-22T19:44:29Z Using 16 MiB out of 32/2 requested for script execution cache, able to store 524288 elements
11test/arith_uint256_tests.cpp:430: error: in "arith_uint256_tests/bignum_SetCompact": check fNegative == true has failed [false != true]
12test/arith_uint256_tests.cpp:404: Leaving test case "bignum_SetCompact"; testing time: 2225us
Concept ACK
If there are multiple test cases in a single test file and one of them fails currently the logs of all the test cases are printed, also the succeeding ones. Could that be improved? It could be especially annoying if there are a lot of logs for every test case and the developer would have to search for the failing one (I discovered this on merkle_tests.cpp
where logs were short, not sure which unit test has the most logs).
@fjahr I don’t think I can solve that without having a way to detect (inside the TestingSetup
, e.g. the destructor) whether a test case failed
Also, I think having too much logs is better than having no logs to debug at all.
Concept ACK.
Also, I think having too much logs is better than having no logs to debug at all.
Usually true, though having too much (unrelated) logging can also distract. And CI web interfaces make the experience of browsing large files quite horrible. Also, too much logging can slow down the tests.
But I don’t think that’s the case with this change.
Usually true, though having too much (unrelated) logging can also distract. And CI web interfaces make the experience of browsing large files quite horrible. Also, too much logging can slow down the tests. But I don’t think that’s the case with this change.
Agree on the distraction part, but if you set the log level to “debug” or “test_suite” I think a verbose log should be expected.
Note that this is not printed to the ci log unless the test fails.
Also note that the tests already log to the debug.log, so logging to the test log shouldn’t slow them down.
See the comparison:
0$ /usr/bin/time ./src/test/test_bitcoin-fab72a301a86373d7d7a8d05a300391687048ec8
1Running 381 test cases...
2
3*** No errors detected
442.97user 9.04system 0:41.84elapsed 124%CPU (0avgtext+0avgdata 250648maxresident)k
5
6$ /usr/bin/time ./src/test/test_bitcoin-master
7Running 381 test cases...
8
9*** No errors detected
1044.08user 8.72system 0:42.28elapsed 124%CPU (0avgtext+0avgdata 250176maxresident)k
So it might or might not be slower, but I don’t think there is any significant difference
Would-be ACK https://github.com/bitcoin/bitcoin/pull/16975/commits/fa37e0a68bea65979f9f8f2e5258fe608acf2bdf but it looks like I’ve hit a deadlock.
Modified the coins test for failure:
0diff --git a/src/test/coins_tests.cpp b/src/test/coins_tests.cpp
1index 436c1bffa0..2c20efc12b 100644
2--- a/src/test/coins_tests.cpp
3+++ b/src/test/coins_tests.cpp
4@@ -213,6 +213,7 @@ BOOST_AUTO_TEST_CASE(coins_cache_simulation_test)
5 unsigned int flushIndex = InsecureRandRange(stack.size() - 1);
6 BOOST_CHECK(stack[flushIndex]->Flush());
7 }
8+ assert(false);
9 }
10 if (InsecureRandRange(100) == 0) {
11 // Every 100 iterations, change the cache stack.
and ran with make -j 4 check
.
Noticed the test seemed to be hanging, so straced:
0$ ps aux | grep test
1...
2james 20079 0.0 0.0 19992 3180 pts/15 S+ 11:38 0:00 /bin/bash -c test/test_bitcoin -l test_suite -t "`cat test/coins_tests.cpp | grep -E "(BOOST_FIXTURE_TEST_SUITE\\(|BOOST_AUTO_TEST_SUITE\\()" | cut -d '(' -f 2 | cut -d ',' -f 1 | cut -d ')' -f 1`" > test/coins_tests.cpp.log 2>&1 || (cat test/coins_tests.cpp.log && false)
3...
4
5$ sudo strace -p 20079
6
7strace: Process 20079 attached
8wait4(-1,
ACK fa37e0a68bea65979f9f8f2e5258fe608acf2bdf (jamesob/ackr/16975.1.MarcoFalke.test_show_debug_log_on_u
)
Confirmed that assert(false);
behavior deadlocks on master too.
0-----BEGIN PGP SIGNED MESSAGE-----
1Hash: SHA512
2
3ACK fa37e0a68bea65979f9f8f2e5258fe608acf2bdf ([`jamesob/ackr/16975.1.MarcoFalke.test_show_debug_log_on_u`](https://github.com/jamesob/bitcoin/tree/ackr/16975.1.MarcoFalke.test_show_debug_log_on_u))
4
5Confirmed that `assert(false);` behavior deadlocks on master too.
6-----BEGIN PGP SIGNATURE-----
7
8iQIzBAEBCgAdFiEEpm2+LMqPsWj2rAwWyrywS1A+5mgFAl4QsLcACgkQyrywS1A+
95mhfUQ//f7fDaV29XKZ6Ww7Cb1NWzLedvSbkpYmE/6EgGhT2/HHQyCLWg6z+xbmI
10273lVXdjIUKShuoSk97SjfAJAkyAk9bcehrVTvbSSixh5uVrdSKe6OENIoIoOWRO
11wUWDIu7uR3zBcrdHkVIF+RxbTybtKhzZ6pPPpB6lMUZD/YFzrCZjG7NrwNWMxJ5i
12ikDQfL5Jx80lc6BkvfEjtYVWJIazDvEty7UWqzlex3wtKS5QfA0a02KZ2H+v0D9V
139bfnl7WDDXqmVJdgkD0x9jsc2twcsPbw8CmQLV+/josYpgD9r9LM0uGE9l9rz2W2
142Ik6zQ2aSJZiOjJa1pmR9472LuS48folnyVYvvoVkhBiokgK2N5mLxFNAvIm8snf
15Bx2p9xj4ts88loBwbKu1k00x/9wRgUk+Thd1va/32FJ1DcWN+JPbkxJwJp85D2Hc
163zD5CgxZYYIhddXu7qvwIi3xPMXeQZrYImtASeOOsHklVvkjhkAt136Gt1ZGjnzB
17CeR9Kb1/mcfIooGuUIeO0PDNWQsWjG4JU+0UBVSOB/bSqx4ioKLLz3NvjT0NwIde
18yONvxlJRGUjbaUZ5elEMGI0RRX/Ncw9b/jQglZWuqj6iJN+3bja+BnZoCwbwoh5/
19dwajH3AZOTos5QR+kjY58WstyjNT98jx9Hm83BcqYXkqBgOnUEk=
20=jrpf
21-----END PGP SIGNATURE-----