3 # This test will use TSan as part of a build and a make check.
5 # Copyright (c) 2020 Linaro
6 # Copyright (c) 2016 Red Hat Inc.
9 # Robert Foley <robert.foley@linaro.org>
10 # Originally based on test-quick from Fam Zheng <famz@redhat.com>
12 # This work is licensed under the terms of the GNU GPL, version 2
13 # or (at your option) any later version. See the COPYING file in
14 # the top-level directory.
21 tsan_log_dir
="/tmp/qemu-test/build/tsan"
22 mkdir
-p $tsan_log_dir > /dev
/null || true
23 EXTRA_CONFIGURE_OPTS
="${EXTRA_CONFIGURE_OPTS} --enable-tsan \
24 --cc=clang --cxx=clang++ \
25 --disable-werror --extra-cflags=-O0"
26 # detect deadlocks is false currently simply because
27 # TSan crashes immediately with deadlock detector enabled.
28 # We have maxed out the history size to get the best chance of finding
29 # warnings during testing.
30 # Note, to get TSan to fail on warning, use exitcode=66 below.
31 tsan_opts
="suppressions=/tmp/qemu-test/src/tests/tsan/suppressions.tsan\
32 detect_deadlocks=false history_size=7\
33 halt_on_error=0 exitcode=0 verbose=5\
34 log_path=$tsan_log_dir/tsan_warning"
35 export TSAN_OPTIONS
="$tsan_opts"
40 TARGET_LIST
=${TARGET_LIST:-$DEF_TARGET_LIST} \