HomePhabricator

test: feature_init: retain debug.log and improve detection

Description

test: feature_init: retain debug.log and improve detection

Summary:

test: introduce TestNode.debug_log_bytes

test: add TestNode.wait_for_debug_log

test: feature_init: retain debug.log and improve detection

This test sporadically fails due to the Python test missing log lines
for reasons that are poorly understood. The problem is made worse by the
fact that this test does not retain the log files from iteration to
iteration.

Change the test to do logline detection in a more robust manner (by
using re.search on the whole log content) in a way that is comparable
to the existing assert_debug_log utility, and retain all debug.log
content from case to case.

This is a partial backport of core#23737
https://github.com/bitcoin/bitcoin/pull/23737/commits/a2fb62b632d39e468f59e7e0b6890f82d0f5eebb
https://github.com/bitcoin/bitcoin/pull/23737/commits/a8ffbc01db85d918b8d1406b178b3c6f09123cf1
https://github.com/bitcoin/bitcoin/pull/23737/commits/93db6d8422345cc10db333d56ea9bcceefcf58b6

Depends on D12613

Test Plan: ninja check-functional

Reviewers: #bitcoin_abc, Fabien

Reviewed By: #bitcoin_abc, Fabien

Differential Revision: https://reviews.bitcoinabc.org/D12614

Details

Provenance
James O'Beirne <james.obeirne@pm.me>Authored on Dec 10 2021, 19:23
PiRKCommitted on Nov 25 2022, 14:26
PiRKPushed on Nov 25 2022, 14:26
Reviewer
Restricted Project
Differential Revision
D12614: test: feature_init: retain debug.log and improve detection
Parents
rABC8dffcaf38196: test: feature_init: tweak all .ldb files of a certain type
Branches
Unknown
Tags
Unknown