From 02155b4ffc34c530cd42b8bc4c10540426df75e2 Mon Sep 17 00:00:00 2001 From: Kefu Chai Date: Sun, 24 Mar 2024 23:20:38 +0800 Subject: [PATCH] cmake: suppress LeakSanitizer reports of known leaks there are known leaks, which are tracked by qa/lsan.suppr, in Ceph. so let's reuse it so we don't see them when running unit test with ASan enabled. see also https://clang.llvm.org/docs/AddressSanitizer.html#issue-suppression Signed-off-by: Kefu Chai --- cmake/modules/AddCephTest.cmake | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/cmake/modules/AddCephTest.cmake b/cmake/modules/AddCephTest.cmake index 4593070fe17..ab4dc63ca32 100644 --- a/cmake/modules/AddCephTest.cmake +++ b/cmake/modules/AddCephTest.cmake @@ -32,7 +32,8 @@ function(add_ceph_test test_name test_path) set_property(TEST ${test_name} APPEND PROPERTY ENVIRONMENT - ASAN_OPTIONS=detect_odr_violation=0) + ASAN_OPTIONS=detect_odr_violation=0 + LSAN_OPTIONS=suppressions=${CMAKE_SOURCE_DIR}/qa/lsan.supp) endif() set_property(TEST ${test_name} PROPERTY TIMEOUT ${CEPH_TEST_TIMEOUT}) -- 2.47.3