diff options
author | Kefu Chai <tchaikov@gmail.com> | 2024-03-24 16:20:38 +0100 |
---|---|---|
committer | Kefu Chai <tchaikov@gmail.com> | 2024-03-27 00:35:28 +0100 |
commit | 02155b4ffc34c530cd42b8bc4c10540426df75e2 (patch) | |
tree | fa0edf9ac1f80ae962b19488e6b7b891855d6112 /cmake/modules | |
parent | cmake: prevent ASAN_OPTIONS from detect_odr_violation (diff) | |
download | ceph-02155b4ffc34c530cd42b8bc4c10540426df75e2.tar.xz ceph-02155b4ffc34c530cd42b8bc4c10540426df75e2.zip |
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 <tchaikov@gmail.com>
Diffstat (limited to 'cmake/modules')
-rw-r--r-- | cmake/modules/AddCephTest.cmake | 3 |
1 files changed, 2 insertions, 1 deletions
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}) |