diff --git a/bindings/c/CMakeLists.txt b/bindings/c/CMakeLists.txt index 01959eb048..f4dc35f88d 100644 --- a/bindings/c/CMakeLists.txt +++ b/bindings/c/CMakeLists.txt @@ -292,6 +292,7 @@ if(NOT WIN32) --retain-client-lib-copies ) set_tests_properties("${test_name}" PROPERTIES TIMEOUT 300) + set_tests_properties("${test_name}" PROPERTIES ENVIRONMENT "${SANITIZER_OPTIONS}") endforeach() add_test(NAME fdb_c_upgrade_to_future_version diff --git a/contrib/lsan.suppressions b/contrib/lsan.suppressions new file mode 100644 index 0000000000..3d3d40e59e --- /dev/null +++ b/contrib/lsan.suppressions @@ -0,0 +1,5 @@ +# LeakSanitizer suppressions file for FDB +# https://github.com/google/sanitizers/wiki/AddressSanitizerLeakSanitizer + +# Not all incoming connections are cleanly shut down in client API tests +leak:ConnectionReaderActorState diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index a90acc84a1..177de8e7d0 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -10,7 +10,7 @@ set(TEST_AGGREGATE_TRACES "NONE" CACHE STRING "Create aggregated trace files (NO set(TEST_LOG_FORMAT "xml" CACHE STRING "Format for test trace files (xml, json)") set(TEST_INCLUDE ".*" CACHE STRING "Include only tests that match the given regex") set(TEST_EXCLUDE ".^" CACHE STRING "Exclude all tests matching the given regex") -set(SANITIZER_OPTIONS "UBSAN_OPTIONS=print_stacktrace=1:halt_on_error=1;TSAN_OPTIONS=suppressions=${CMAKE_SOURCE_DIR}/contrib/tsan.suppressions" CACHE STRING "Environment variables setting sanitizer options") +set(SANITIZER_OPTIONS "UBSAN_OPTIONS=print_stacktrace=1:halt_on_error=1;TSAN_OPTIONS=suppressions=${CMAKE_SOURCE_DIR}/contrib/tsan.suppressions;LSAN_OPTIONS=suppressions=${CMAKE_SOURCE_DIR}/contrib/lsan.suppressions" CACHE STRING "Environment variables setting sanitizer options") # for the restart test we optimally want to use the last stable fdbserver # to test upgrades