Page MenuHomePhabricator

[test] call CheckPackage for package sanitization checks
ClosedPublic

Authored by PiRK on Oct 22 2022, 09:26.

Details

Reviewers
Fabien
Group Reviewers
Restricted Project
Commits
rABC9f8c2b711e1d: [test] call CheckPackage for package sanitization checks
Summary

Makes the test more minimal. We're just trying to test that our package
sanitization logic is correct. Now that this code lives in its own
function (rather than inside of AcceptMultipleTransactions), there's no
need to call ProcessNewPackage to test this.

This is a partial backport of core#23381
https://github.com/bitcoin/bitcoin/pull/23381/commits/14cd7bf793547fa5143acece564482271f5c30bc
Depends on D12361

Test Plan

ninja check

Diff Detail

Repository
rABC Bitcoin ABC
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

PiRK requested review of this revision.Oct 22 2022, 09:26
PiRK planned changes to this revision.Oct 22 2022, 09:27

this is wrong

actually use CheckPackage (previous attempt resulted in a move only, without the changes)

Tail of the build log:

----------------------------------------------------------------------
Ran 5 tests in 0.001s

OK
[180/480] Automatic MOC for target test_bitcoin-qt
[181/480] Building CXX object src/seeder/test/CMakeFiles/test-seeder.dir/parse_name_tests.cpp.o
[182/480] Building CXX object src/pow/test/CMakeFiles/test-pow.dir/eda_tests.cpp.o
[183/480] Building CXX object src/test/CMakeFiles/test_bitcoin.dir/__/wallet/test/coinselector_tests.cpp.o
[184/480] Building CXX object src/seeder/test/CMakeFiles/test-seeder.dir/write_name_tests.cpp.o
[185/480] Test Bitcoin utilities...
[186/480] Building CXX object src/seeder/test/CMakeFiles/test-seeder.dir/options_tests.cpp.o
[187/480] Building CXX object src/pow/test/CMakeFiles/test-pow.dir/grasberg_tests.cpp.o
[188/480] Linking CXX executable src/pow/test/test-pow
[189/480] pow: testing daa_tests
[190/480] Running utility command for check-pow-daa_tests
[191/480] Building CXX object src/seeder/test/CMakeFiles/test-seeder.dir/p2p_messaging_tests.cpp.o
[192/480] pow: testing eda_tests
[193/480] Running utility command for check-pow-eda_tests
[194/480] Building CXX object src/qt/test/CMakeFiles/test_bitcoin-qt.dir/bitcoinaddressvalidatortests.cpp.o
[195/480] pow: testing grasberg_tests
[196/480] Running utility command for check-pow-grasberg_tests
[197/480] Building CXX object src/seeder/test/CMakeFiles/test-seeder.dir/message_writer_tests.cpp.o
[198/480] Building CXX object src/qt/test/CMakeFiles/test_bitcoin-qt.dir/compattests.cpp.o
[199/480] Linking CXX executable src/seeder/test/test-seeder
[200/480] seeder: testing options_tests
[201/480] Running utility command for check-seeder-options_tests
[202/480] seeder: testing message_writer_tests
[203/480] Running utility command for check-seeder-message_writer_tests
[204/480] seeder: testing p2p_messaging_tests
[205/480] Running utility command for check-seeder-p2p_messaging_tests
[206/480] seeder: testing parse_name_tests
[207/480] Building CXX object src/qt/test/CMakeFiles/test_bitcoin-qt.dir/util.cpp.o
[208/480] Building CXX object src/qt/test/CMakeFiles/test_bitcoin-qt.dir/test_bitcoin-qt_autogen/mocs_compilation.cpp.o
[209/480] Running utility command for check-seeder-parse_name_tests
[210/480] seeder: testing write_name_tests
[211/480] Building CXX object src/test/CMakeFiles/test_bitcoin.dir/__/wallet/test/wallet_tests.cpp.o
[212/480] Running utility command for check-seeder-write_name_tests
[213/480] Running seeder test suite
PASSED: seeder test suite
[214/480] Building CXX object src/qt/test/CMakeFiles/test_bitcoin-qt.dir/guiutiltests.cpp.o
[215/480] pow: testing aserti32d_tests
[216/480] Running utility command for check-pow-aserti32d_tests
[217/480] Running pow test suite
PASSED: pow test suite
[218/480] Building CXX object src/qt/test/CMakeFiles/test_bitcoin-qt.dir/uritests.cpp.o
[219/480] Building CXX object src/qt/test/CMakeFiles/test_bitcoin-qt.dir/apptests.cpp.o
[220/480] Building CXX object src/test/CMakeFiles/test_bitcoin.dir/util_tests.cpp.o
[221/480] Building CXX object src/qt/test/CMakeFiles/test_bitcoin-qt.dir/test_main.cpp.o
[222/480] Building CXX object src/qt/test/CMakeFiles/test_bitcoin-qt.dir/rpcnestedtests.cpp.o
[223/480] Building CXX object src/test/CMakeFiles/test_bitcoin.dir/script_tests.cpp.o
[224/480] Building CXX object src/qt/test/CMakeFiles/test_bitcoin-qt.dir/__/__/wallet/test/wallet_test_fixture.cpp.o
[225/480] Building CXX object src/qt/test/CMakeFiles/test_bitcoin-qt.dir/paymentservertests.cpp.o
[226/480] Building CXX object src/qt/test/CMakeFiles/test_bitcoin-qt.dir/addressbooktests.cpp.o
[227/480] Building CXX object src/qt/test/CMakeFiles/test_bitcoin-qt.dir/wallettests.cpp.o
[228/480] Linking CXX executable src/qt/test/test_bitcoin-qt
[229/480] bitcoin-qt: testing test_bitcoin-qt
[230/480] Running bitcoin-qt test suite
PASSED: bitcoin-qt test suite
ninja: build stopped: cannot make progress due to previous errors.
Build build-clang failed with exit code 1

Tail of the build log:

wallet_importmulti.py                     | ✓ Passed  | 6 s
wallet_importprunedfunds.py               | ✓ Passed  | 2 s
wallet_importprunedfunds.py --descriptors | ✓ Passed  | 3 s
wallet_keypool.py                         | ✓ Passed  | 3 s
wallet_keypool_topup.py                   | ✓ Passed  | 5 s
wallet_keypool_topup.py --descriptors     | ✓ Passed  | 4 s
wallet_labels.py                          | ✓ Passed  | 3 s
wallet_labels.py --descriptors            | ✓ Passed  | 3 s
wallet_listreceivedby.py                  | ✓ Passed  | 9 s
wallet_listsinceblock.py                  | ✓ Passed  | 6 s
wallet_listsinceblock.py --descriptors    | ✓ Passed  | 8 s
wallet_listtransactions.py                | ✓ Passed  | 5 s
wallet_listtransactions.py --descriptors  | ✓ Passed  | 4 s
wallet_multiwallet.py                     | ✓ Passed  | 48 s
wallet_multiwallet.py --usecli            | ✓ Passed  | 17 s
wallet_reorgsrestore.py                   | ✓ Passed  | 6 s
wallet_resendwallettransactions.py        | ✓ Passed  | 3 s
wallet_send.py                            | ✓ Passed  | 9 s
wallet_startup.py                         | ✓ Passed  | 3 s
wallet_txn_clone.py                       | ✓ Passed  | 3 s
wallet_txn_clone.py --mineblock           | ✓ Passed  | 4 s
wallet_txn_doublespend.py                 | ✓ Passed  | 3 s
wallet_txn_doublespend.py --mineblock     | ✓ Passed  | 4 s
wallet_watchonly.py                       | ✓ Passed  | 2 s
wallet_watchonly.py --usecli              | ✓ Passed  | 2 s

ALL                                       | ✓ Passed  | 1878 s (accumulated) 
Runtime: 377 s

[161/481] Test Bitcoin RPC authentication...
...
----------------------------------------------------------------------
Ran 3 tests in 0.005s

OK
[162/481] cd /work/contrib/devtools/chainparams && /usr/bin/python3.9 ./test_make_chainparams.py
.....
----------------------------------------------------------------------
Ran 5 tests in 0.001s

OK
[207/481] Running seeder test suite
PASSED: seeder test suite
[353/481] bitcoin: testing txpackage_tests
FAILED: src/test/CMakeFiles/check-bitcoin-txpackage_tests 
cd /work/abc-ci-builds/build-debug/src/test && /usr/bin/cmake -E make_directory /work/abc-ci-builds/build-debug/test/junit && /usr/bin/cmake -E make_directory /work/abc-ci-builds/build-debug/test/log && /usr/bin/cmake -E env /work/cmake/utils/log-and-print-on-failure.sh /work/abc-ci-builds/build-debug/test/log/bitcoin-txpackage_tests.log /work/abc-ci-builds/build-debug/src/test/test_bitcoin --run_test=txpackage_tests --logger=HRF,message:JUNIT,message,bitcoin-txpackage_tests.xml --catch_system_errors=no
Running 2 test cases...
Assertion failed: lock cs_main not held in ../../src/validation.cpp:896; locks held:
Aborted (core dumped)
[453/481] Running pow test suite
PASSED: pow test suite
[454/481] Running avalanche test suite
PASSED: avalanche test suite
[458/481] Running bitcoin-qt test suite
PASSED: bitcoin-qt test suite
[476/481] Running secp256k1 test suite
PASSED: secp256k1 test suite
[478/481] Running utility command for check-bitcoin-coins_tests
ninja: build stopped: cannot make progress due to previous errors.
Build build-debug failed with exit code 1

Failed tests logs:

====== Bitcoin ABC functional tests: abc_p2p_getavaaddr.py ======

------- Stdout: -------
2022-10-22T09:45:20.770000Z TestFramework (INFO): Initializing test directory /work/abc-ci-builds/build-diff/test/tmp/test_runner_₿₵_  _20221022_094446/abc_p2p_getavaaddr_7
2022-10-22T09:45:33.781000Z TestFramework (ERROR): Assertion failed
Traceback (most recent call last):
  File "/work/test/functional/test_framework/test_framework.py", line 132, in main
    self.run_test()
  File "/work/test/functional/abc_p2p_getavaaddr.py", line 505, in run_test
    self.getavaaddr_interval_test()
  File "/work/test/functional/abc_p2p_getavaaddr.py", line 149, in getavaaddr_interval_test
    requester.send_message(msg_getavaaddr())
  File "/usr/lib/python3.9/contextlib.py", line 124, in __exit__
    next(self.gen)
  File "/work/test/functional/test_framework/test_node.py", line 532, in assert_debug_log
    self._raise_assertion_error(
  File "/work/test/functional/test_framework/test_node.py", line 212, in _raise_assertion_error
    raise AssertionError(self._node_msg(msg))
AssertionError: [node 0] Expected messages "['Ignoring repeated getavaaddr from peer']" does not partially match log:

 - 


2022-10-22T09:45:34.498000Z TestFramework (INFO): Stopping nodes
2022-10-22T09:45:34.800000Z TestFramework (WARNING): Not cleaning up dir /work/abc-ci-builds/build-diff/test/tmp/test_runner_₿₵_  _20221022_094446/abc_p2p_getavaaddr_7
2022-10-22T09:45:34.800000Z TestFramework (ERROR): Test failed. Test logging available at /work/abc-ci-builds/build-diff/test/tmp/test_runner_₿₵_  _20221022_094446/abc_p2p_getavaaddr_7/test_framework.log
2022-10-22T09:45:34.800000Z TestFramework (ERROR): 
2022-10-22T09:45:34.800000Z TestFramework (ERROR): Hint: Call /work/test/functional/combine_logs.py '/work/abc-ci-builds/build-diff/test/tmp/test_runner_₿₵_  _20221022_094446/abc_p2p_getavaaddr_7' to consolidate all logs
2022-10-22T09:45:34.800000Z TestFramework (ERROR): 
2022-10-22T09:45:34.800000Z TestFramework (ERROR): If this failure happened unexpectedly or intermittently, please file a bug and provide a link or upload of the combined log.
2022-10-22T09:45:34.800000Z TestFramework (ERROR): https://github.com/Bitcoin-ABC/bitcoin-abc/issues
2022-10-22T09:45:34.800000Z TestFramework (ERROR):

Each failure log is accessible here:
Bitcoin ABC functional tests: abc_p2p_getavaaddr.py

PiRK planned changes to this revision.Oct 22 2022, 12:37

failing tests. Checks locks.

rebase. The failures are related to the code before updating the revision

This revision is now accepted and ready to land.Oct 24 2022, 08:41