]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
cmake: disable LeakSanitizer suppression output to fix CLI tests 65192/head
authorKefu Chai <tchaikov@gmail.com>
Sat, 23 Aug 2025 07:39:50 +0000 (15:39 +0800)
committerKefu Chai <tchaikov@gmail.com>
Sat, 23 Aug 2025 07:53:54 +0000 (15:53 +0800)
commit65bede20808a55f7e8d85147f3e2866492cfbef3
tree992c4542e4ef9de250346c051ec9fb757067949d
parentf19a8ab044e4592db262ae2000083350981d9d0a
cmake: disable LeakSanitizer suppression output to fix CLI tests

LeakSanitizer prints matched suppressions by default, which causes CLI
tests to fail when built with LSan enabled. The tests compare actual
output against expected output, and the additional LSan messages break
this comparison.

Example failure:

```
/home/jenkins-build/build/workspace/ceph-pull-requests/src/test/cli/ceph-kvstore-tool/help.t: failed
--- /home/jenkins-build/build/workspace/ceph-pull-requests/src/test/cli/ceph-kvstore-tool/help.t
+++ /home/jenkins-build/build/workspace/ceph-pull-requests/src/test/cli/ceph-kvstore-tool/help.t.err
@@ -21,3 +21,9 @@
     stats
     histogram [prefix]

+  -----------------------------------------------------
+  Suppressions used:
+    count      bytes template
+        1         45 ^MallocExtension::Initialize
+  -----------------------------------------------------
+
```

Set LSAN_OPTIONS=print_suppressions=0 to prevent this output rather
than modifying test expectations, since the suppression messages are
not part of the actual tool output and would vary between builds.

This change should fix run_cli_tests failures when building with LeakSanitizer

See https://github.com/google/sanitizers/wiki/SanitizerCommonFlags
for the environment variables respected by LeakSanitizer.

Signed-off-by: Kefu Chai <tchaikov@gmail.com>
cmake/modules/AddCephTest.cmake