Skip to content

Commit 02155b4

Browse files
committed
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 <[email protected]>
1 parent a837f49 commit 02155b4

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

cmake/modules/AddCephTest.cmake

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,8 @@ function(add_ceph_test test_name test_path)
3232
set_property(TEST ${test_name}
3333
APPEND
3434
PROPERTY ENVIRONMENT
35-
ASAN_OPTIONS=detect_odr_violation=0)
35+
ASAN_OPTIONS=detect_odr_violation=0
36+
LSAN_OPTIONS=suppressions=${CMAKE_SOURCE_DIR}/qa/lsan.supp)
3637
endif()
3738
set_property(TEST ${test_name}
3839
PROPERTY TIMEOUT ${CEPH_TEST_TIMEOUT})

0 commit comments

Comments
 (0)