From 9338cac0509a862e64135799472f0c24bf2efc79 Mon Sep 17 00:00:00 2001 From: Janos Follath Date: Wed, 4 Oct 2023 18:55:39 +0100 Subject: [PATCH] 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 --- tests/scripts/all.sh | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/tests/scripts/all.sh b/tests/scripts/all.sh index 40a8fe0bf..05fc1a0d5 100755 --- a/tests/scripts/all.sh +++ b/tests/scripts/all.sh @@ -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.