Add tsan to all.sh

component_test_tsan now builds and tests the library with
clang ThreadSanitizer enabled.

There are no multi-threaded unit tests so far, the goal is that they are
automatically tested with TSan when they are added.

Signed-off-by: Janos Follath <janos.follath@arm.com>
This commit is contained in:
Janos Follath 2023-10-04 18:55:39 +01:00 committed by Paul Elliott
parent eb075c5de4
commit 9338cac050

View file

@ -2159,6 +2159,18 @@ component_release_test_valgrind_constant_flow_psa () {
make memcheck
}
component_test_tsan () {
msg "build: TSan (clang)"
scripts/config.py set MBEDTLS_THREADING_C
scripts/config.py set MBEDTLS_THREADING_PTHREAD
CC=clang cmake -D CMAKE_BUILD_TYPE:String=TSan .
make
msg "test: main suites (TSan)"
make test
}
component_test_default_no_deprecated () {
# Test that removing the deprecated features from the default
# configuration leaves something consistent.