Page MenuHomePhabricator

test: check for matching object hashes in wait_for_getdata

Authored by PiRK on Jan 19 2021, 16:21.


Group Reviewers
Restricted Project
rABCb6aa3c347dd0: test: check for matching object hashes in wait_for_getdata

Previously, wait_for_getdata only looked for the presence of a recent "getdata" message. Additionally checking the object hashes inside the message should make tests involving wait_for_getdata more robust. already overrides wait_for_getdata do this check; we can use the same approach consistently across all tests that call wait_for_getdata.

This is a backport of Core PR18690

Test Plan

ninja check-functional

Diff Detail

rABC Bitcoin ABC
Automatic diff as part of commit; lint not applicable.
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

PiRK requested review of this revision.Jan 19 2021, 16:21

Failed tests logs:

====== Bitcoin ABC functional tests: ======

------- Stdout: -------
2021-01-19T16:29:51.372000Z TestFramework (INFO): Initializing test directory /work/abc-ci-builds/build-diff/test/tmp/test_runner_₿₵_  _20210119_162950/rpc_bind_591
2021-01-19T16:29:51.373000Z TestFramework (INFO): Check for linux
2021-01-19T16:29:51.421000Z TestFramework (INFO): Check for ipv6
2021-01-19T16:29:51.421000Z TestFramework (INFO): Check for non-loopback interface
2021-01-19T16:29:51.421000Z TestFramework (INFO): Bind test for []
2021-01-19T16:29:52.658000Z TestFramework (INFO): Bind test for []
2021-01-19T16:29:53.181000Z TestFramework (INFO): Bind test for ['[::1]']
2021-01-19T16:29:53.708000Z TestFramework (INFO): Bind test for ['', '[::1]']
2021-01-19T16:29:54.185000Z TestFramework (INFO): Using interface for testing
2021-01-19T16:29:54.185000Z TestFramework (INFO): Bind test for ['']
2021-01-19T16:29:54.472000Z TestFramework (ERROR): Unexpected exception caught during testing
Traceback (most recent call last):
  File "/work/test/functional/test_framework/", line 120, in main
  File "/work/test/functional/", line 136, in run_test
  File "/work/test/functional/", line 171, in _run_nonloopback_tests
    [(self.non_loopback_ip, self.defaultport)])
  File "/work/test/functional/", line 72, in run_bind_test
    assert_equal(set(get_bind_addrs(pid)), set(expected))
  File "/work/test/functional/test_framework/", line 87, in get_bind_addrs
    inodes = get_socket_inodes(pid)
  File "/work/test/functional/test_framework/", line 37, in get_socket_inodes
    target = os.readlink(os.path.join(base, item))
FileNotFoundError: [Errno 2] No such file or directory: '/proc/7595/fd/16'
2021-01-19T16:29:54.523000Z TestFramework (INFO): Stopping nodes
2021-01-19T16:29:54.674000Z TestFramework (WARNING): Not cleaning up dir /work/abc-ci-builds/build-diff/test/tmp/test_runner_₿₵_  _20210119_162950/rpc_bind_591
2021-01-19T16:29:54.675000Z TestFramework (ERROR): Test failed. Test logging available at /work/abc-ci-builds/build-diff/test/tmp/test_runner_₿₵_  _20210119_162950/rpc_bind_591/test_framework.log
2021-01-19T16:29:54.675000Z TestFramework (ERROR): Hint: Call /work/test/functional/ '/work/abc-ci-builds/build-diff/test/tmp/test_runner_₿₵_  _20210119_162950/rpc_bind_591' to consolidate all logs

Each failure log is accessible here:
Bitcoin ABC functional tests:

This revision is now accepted and ready to land.Jan 19 2021, 18:38