Skip to content

Commit d478a73

Browse files
author
MarcoFalke
committed
Merge #18392: ci: Run feature_block in valgrind
fa92af5 ci: Run feature_block and feature_abortnode in valgrind (MarcoFalke) fa01feb test: Remove ci timeout restriction in test_runner (MarcoFalke) Pull request description: Also revert commit 0a4912e, because some tests take too long for this to be useful anymore. Top commit has no ACKs. Tree-SHA512: 363f14766e1f4a5860ab668a516b41acebc6fbdf11d8defb3a95a772dbf82304ca1f5f14b1dbad97f2029503e03d92e8c69df0466a8872409c20665838f617ed
2 parents 57a8fa9 + fa92af5 commit d478a73

File tree

4 files changed

+10
-17
lines changed

4 files changed

+10
-17
lines changed

ci/test/00_setup_env_native_valgrind.sh

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ export CONTAINER_NAME=ci_native_valgrind
1010
export PACKAGES="valgrind clang llvm python3-zmq libevent-dev bsdmainutils libboost-system-dev libboost-filesystem-dev libboost-test-dev libboost-thread-dev libdb5.3++-dev libminiupnpc-dev libzmq3-dev"
1111
export USE_VALGRIND=1
1212
export NO_DEPENDS=1
13-
export TEST_RUNNER_EXTRA="--exclude feature_abortnode,feature_block,rpc_bind" # Excluded for now
14-
export RUN_FUNCTIONAL_TESTS=true
13+
export TEST_RUNNER_EXTRA="--exclude rpc_bind" # Excluded for now, see https://github.com/bitcoin/bitcoin/issues/17765#issuecomment-602068547
1514
export GOAL="install"
1615
export BITCOIN_CONFIG="--enable-zmq --with-incompatible-bdb --with-gui=no CC=clang CXX=clang++" # TODO enable GUI

test/functional/feature_abortnode.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,12 @@
1414
from test_framework.util import wait_until, get_datadir_path, connect_nodes
1515
import os
1616

17-
class AbortNodeTest(BitcoinTestFramework):
1817

18+
class AbortNodeTest(BitcoinTestFramework):
1919
def set_test_params(self):
2020
self.setup_clean_chain = True
2121
self.num_nodes = 2
22+
self.rpc_timeout = 240
2223

2324
def setup_network(self):
2425
self.setup_nodes()
@@ -44,5 +45,6 @@ def run_test(self):
4445
self.log.info("Node crashed - now verifying restart fails")
4546
self.nodes[0].assert_start_raises_init_error()
4647

48+
4749
if __name__ == '__main__':
4850
AbortNodeTest().main()

test/functional/feature_block.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1263,7 +1263,7 @@ def run_test(self):
12631263
self.save_spendable_output()
12641264
spend = self.get_spendable_output()
12651265

1266-
self.send_blocks(blocks, True, timeout=1920)
1266+
self.send_blocks(blocks, True, timeout=2440)
12671267
chain1_tip = i
12681268

12691269
# now create alt chain of same length
@@ -1275,14 +1275,14 @@ def run_test(self):
12751275

12761276
# extend alt chain to trigger re-org
12771277
block = self.next_block("alt" + str(chain1_tip + 1), version=4)
1278-
self.send_blocks([block], True, timeout=1920)
1278+
self.send_blocks([block], True, timeout=2440)
12791279

12801280
# ... and re-org back to the first chain
12811281
self.move_tip(chain1_tip)
12821282
block = self.next_block(chain1_tip + 1, version=4)
12831283
self.send_blocks([block], False, force_send=True)
12841284
block = self.next_block(chain1_tip + 2, version=4)
1285-
self.send_blocks([block], True, timeout=1920)
1285+
self.send_blocks([block], True, timeout=2440)
12861286

12871287
self.log.info("Reject a block with an invalid block header version")
12881288
b_v1 = self.next_block('b_v1', version=1)

test/functional/test_runner.py

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,8 @@
1919
import os
2020
import time
2121
import shutil
22-
import signal
23-
import sys
2422
import subprocess
23+
import sys
2524
import tempfile
2625
import re
2726
import logging
@@ -366,11 +365,10 @@ def main():
366365
args=passon_args,
367366
combined_logs_len=args.combinedlogslen,
368367
failfast=args.failfast,
369-
runs_ci=args.ci,
370368
use_term_control=args.ansi,
371369
)
372370

373-
def run_tests(*, test_list, src_dir, build_dir, tmpdir, jobs=1, enable_coverage=False, args=None, combined_logs_len=0, failfast=False, runs_ci, use_term_control):
371+
def run_tests(*, test_list, src_dir, build_dir, tmpdir, jobs=1, enable_coverage=False, args=None, combined_logs_len=0, failfast=False, use_term_control):
374372
args = args or []
375373

376374
# Warn if bitcoind is already running
@@ -412,7 +410,6 @@ def run_tests(*, test_list, src_dir, build_dir, tmpdir, jobs=1, enable_coverage=
412410
tmpdir=tmpdir,
413411
test_list=test_list,
414412
flags=flags,
415-
timeout_duration=40 * 60 if runs_ci else float('inf'), # in seconds
416413
use_term_control=use_term_control,
417414
)
418415
start_time = time.time()
@@ -497,12 +494,11 @@ class TestHandler:
497494
Trigger the test scripts passed in via the list.
498495
"""
499496

500-
def __init__(self, *, num_tests_parallel, tests_dir, tmpdir, test_list, flags, timeout_duration, use_term_control):
497+
def __init__(self, *, num_tests_parallel, tests_dir, tmpdir, test_list, flags, use_term_control):
501498
assert num_tests_parallel >= 1
502499
self.num_jobs = num_tests_parallel
503500
self.tests_dir = tests_dir
504501
self.tmpdir = tmpdir
505-
self.timeout_duration = timeout_duration
506502
self.test_list = test_list
507503
self.flags = flags
508504
self.num_running = 0
@@ -543,10 +539,6 @@ def get_next(self):
543539
time.sleep(.5)
544540
for job in self.jobs:
545541
(name, start_time, proc, testdir, log_out, log_err) = job
546-
if int(time.time() - start_time) > self.timeout_duration:
547-
# Timeout individual tests if timeout is specified (to stop
548-
# tests hanging and not providing useful output).
549-
proc.send_signal(signal.SIGINT)
550542
if proc.poll() is not None:
551543
log_out.seek(0), log_err.seek(0)
552544
[stdout, stderr] = [log_file.read().decode('utf-8') for log_file in (log_out, log_err)]

0 commit comments

Comments
 (0)