tests/docker: Added docker build support for TSan.

Added a new docker for ubuntu 20.04.
This docker has support for Thread Sanitizer
including one patch we need in one of the header files.
a72dc86cd

This command will build with tsan enabled:
make docker-test-tsan-ubuntu2004 V=1

Also added the TSAN suppresion file to disable certain
cases of TSAN warnings.

Cc: Fam Zheng <fam@euphon.net>
Cc: Philippe Mathieu-Daudé <philmd@redhat.com>
Signed-off-by: Robert Foley <robert.foley@linaro.org>
Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Message-Id: <20200609200738.445-10-robert.foley@linaro.org>
Message-Id: <20200612190237.30436-13-alex.bennee@linaro.org>
This commit is contained in:
Robert Foley 2020-06-12 20:02:31 +01:00 committed by Alex Bennée
parent 45a9595a1b
commit df79fd5667
4 changed files with 133 additions and 0 deletions

10
tests/tsan/blacklist.tsan Normal file
View file

@ -0,0 +1,10 @@
# This is an example blacklist.
# To enable use of the blacklist add this to configure:
# "--extra-cflags=-fsanitize-blacklist=<src path>/tests/tsan/blacklist.tsan"
# The eventual goal would be to fix these warnings.
# TSan is not happy about setting/getting of dirty bits,
# for example, cpu_physical_memory_set_dirty_range,
# and cpu_physical_memory_get_dirty.
src:bitops.c
src:bitmap.c

View file

@ -0,0 +1,14 @@
# This is the set of runtime suppressions of TSan warnings.
# The goal would be to have here only items we do not
# plan to fix, and to explain why for each item.
# TSan reports a double lock on RECURSIVE mutexes.
# Since the recursive lock is intentional, we choose to ignore it.
mutex:aio_context_acquire
mutex:pthread_mutex_lock
# TSan reports a race betwen pthread_mutex_init() and
# pthread_mutex_lock(). Since this is outside of QEMU,
# we choose to ignore it.
race:pthread_mutex_init
race:pthread_mutex_lock