Skip to content

Commit f055389

Browse files
author
MarcoFalke
committed
Merge #14829: travis: Enable functional tests in the ThreadSanitizer (TSan) build job
eaf4070 Add suppression for InterruptRPC (fRPCRunning) data race (practicalswift) 5e5138a travis: Use trap and set -e errtrace (Chun Kuan Lee) 069752b build: Enable functional tests in the ThreadSanitizer (TSan) build job (practicalswift) Pull request description: Enable functional tests in the ThreadSanitizer (TSan) build job. This is a follow-up to @MarcoFalke's #14764 which added TSan but for unit tests only. Tree-SHA512: dcc24d311fa124772c3036b16c2bf94732ece36c3e22b4bb8fe941772e52157ab2b1a90b1880b81079c2eef2d344ca7e1da58324b75dbf82d16204d591ad49fb
2 parents b545a7e + eaf4070 commit f055389

File tree

4 files changed

+13
-11
lines changed

4 files changed

+13
-11
lines changed

.travis.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -99,9 +99,9 @@ jobs:
9999
DOCKER_NAME_TAG=ubuntu:16.04
100100
PACKAGES="clang llvm python3-zmq qtbase5-dev qttools5-dev-tools libssl-dev libevent-dev bsdmainutils libboost-system-dev libboost-filesystem-dev libboost-chrono-dev libboost-test-dev libboost-thread-dev libdb5.3++-dev libminiupnpc-dev libzmq3-dev libprotobuf-dev protobuf-compiler libqrencode-dev"
101101
NO_DEPENDS=1
102-
RUN_FUNCTIONAL_TESTS=false # Disabled for now. TODO identify suppressions or exclude specific tests
102+
FUNCTIONAL_TESTS_CONFIG="--exclude feature_block.py,p2p_invalid_messages.py"
103103
GOAL="install"
104-
BITCOIN_CONFIG="--enable-zmq --with-incompatible-bdb --with-gui=qt5 CPPFLAGS=-DDEBUG_LOCKORDER --with-sanitizers=thread --disable-hardening --disable-asm CC=clang CXX=clang++"
104+
BITCOIN_CONFIG="--enable-zmq --disable-wallet --with-gui=qt5 CPPFLAGS=-DDEBUG_LOCKORDER --with-sanitizers=thread --disable-hardening --disable-asm CC=clang CXX=clang++"
105105
# x86_64 Linux (no depends, only system libs, sanitizers: address/leak (ASan + LSan) + undefined (UBSan) + integer)
106106
- stage: test
107107
env: >-

.travis/test_04_install.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,10 @@
77
export LC_ALL=C.UTF-8
88

99
travis_retry docker pull "$DOCKER_NAME_TAG"
10+
mkdir -p "${TRAVIS_BUILD_DIR}/sanitizer-output/"
1011
export ASAN_OPTIONS=""
1112
export LSAN_OPTIONS="suppressions=${TRAVIS_BUILD_DIR}/test/sanitizer_suppressions/lsan"
12-
export TSAN_OPTIONS="suppressions=${TRAVIS_BUILD_DIR}/test/sanitizer_suppressions/tsan"
13+
export TSAN_OPTIONS="suppressions=${TRAVIS_BUILD_DIR}/test/sanitizer_suppressions/tsan:log_path=${TRAVIS_BUILD_DIR}/sanitizer-output/tsan"
1314
export UBSAN_OPTIONS="suppressions=${TRAVIS_BUILD_DIR}/test/sanitizer_suppressions/ubsan:print_stacktrace=1:halt_on_error=1"
1415
env | grep -E '^(BITCOIN_CONFIG|CCACHE_|WINEDEBUG|LC_ALL|BOOST_TEST_RANDOM|CONFIG_SHELL|(ASAN|LSAN|TSAN|UBSAN)_OPTIONS)' | tee /tmp/env
1516
if [[ $HOST = *-mingw32 ]]; then

.travis/test_06_script.sh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,9 @@ BEGIN_FOLD configure
4040
DOCKER_EXEC ./configure --cache-file=../config.cache $BITCOIN_CONFIG_ALL $BITCOIN_CONFIG || ( cat config.log && false)
4141
END_FOLD
4242

43+
set -o errtrace
44+
trap 'DOCKER_EXEC "cat ${TRAVIS_BUILD_DIR}/sanitizer-output/* 2> /dev/null"' ERR
45+
4346
BEGIN_FOLD build
4447
DOCKER_EXEC make $MAKEJOBS $GOAL || ( echo "Build failure. Verbose build follows." && DOCKER_EXEC make $GOAL V=1 ; false )
4548
END_FOLD

test/sanitizer_suppressions/tsan

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,13 @@ deadlock:WalletBatch
77
# Intentional deadlock in tests
88
deadlock:TestPotentialDeadLockDetected
99

10+
# fRPCRunning race
11+
race:InterruptRPC
12+
1013
# Wildcard for all gui tests, should be replaced with non-wildcard suppressions
1114
race:src/qt/test/*
1215
deadlock:src/qt/test/*
1316

14-
# WIP: Unidentified suppressions to run the functional tests
15-
#race:zmqpublishnotifier.cpp
16-
#
17-
#deadlock:CreateWalletFromFile
18-
#deadlock:importprivkey
19-
#deadlock:walletdb.h
20-
#deadlock:walletdb.cpp
21-
#deadlock:wallet/db.cpp
17+
# External libraries
18+
deadlock:libdb
19+
race:libzmq

0 commit comments

Comments
 (0)