From: Kefu Chai Date: Sun, 24 Mar 2024 15:20:38 +0000 (+0800) Subject: cmake: suppress LeakSanitizer reports of known leaks X-Git-Tag: v20.0.0~2279^2~1 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=02155b4ffc34c530cd42b8bc4c10540426df75e2;p=ceph.git 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 --- diff --git a/cmake/modules/AddCephTest.cmake b/cmake/modules/AddCephTest.cmake index 4593070fe17d..ab4dc63ca32a 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})