Skip to content

Commit 26d98d5

Browse files
committed
Merge bitcoin/bitcoin#24574: test: Actually print TSan tracebacks
fa76d8d test: Actually print TSan tracebacks (MarcoFalke) Pull request description: Commit 5e5138a made the TSan logs to be printed before returning an error from the ci script. However, it seems that on Cirrus CI, the `--failfast` option will kill not only all python process and bitcoind child process, but also the parent CI bash script, rendering the `trap` inefficient. I believe this bug was introduced in commit 451b96f. ACKs for top commit: fanquake: utACK fa76d8d Tree-SHA512: 686f889d38a343882cb62ad6e0c2080196330e7cc7086891a7ff66d9443b455c82ba8d7e4a5cc42daa0513b0ad2743055bfe90e2f6ac88a910ee3b663fabddcd
2 parents 864fb89 + fa76d8d commit 26d98d5

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

.cirrus.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ env: # Global defaults
22
PACKAGE_MANAGER_INSTALL: "apt-get update && apt-get install -y"
33
MAKEJOBS: "-j10"
44
TEST_RUNNER_PORT_MIN: "14000" # Must be larger than 12321, which is used for the http cache. See https://cirrus-ci.org/guide/writing-tasks/#http-cache
5+
CI_FAILFAST_TEST_LEAVE_DANGLING: "1" # Cirrus CI does not care about dangling process and setting this variable avoids killing the CI script itself on error
56
CCACHE_SIZE: "200M"
67
CCACHE_DIR: "/tmp/ccache_dir"
78
CCACHE_NOHASHDIR: "1" # Debug info might contain a stale path if the build dir changes, but this is fine

test/functional/test_runner.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -586,11 +586,12 @@ def run_tests(*, test_list, src_dir, build_dir, tmpdir, jobs=1, enable_coverage=
586586
# Clean up dangling processes if any. This may only happen with --failfast option.
587587
# Killing the process group will also terminate the current process but that is
588588
# not an issue
589-
if len(job_queue.jobs):
589+
if not os.getenv("CI_FAILFAST_TEST_LEAVE_DANGLING") and len(job_queue.jobs):
590590
os.killpg(os.getpgid(0), signal.SIGKILL)
591591

592592
sys.exit(not all_passed)
593593

594+
594595
def print_results(test_results, max_len_name, runtime):
595596
results = "\n" + BOLD[1] + "%s | %s | %s\n\n" % ("TEST".ljust(max_len_name), "STATUS ", "DURATION") + BOLD[0]
596597

0 commit comments

Comments
 (0)