From 640bea831a921bd10d119a75ef973a14b4bed20f Mon Sep 17 00:00:00 2001 From: Sun Yuechi Date: Tue, 23 Jun 2026 01:38:54 +0800 Subject: [PATCH] test/encoding: disable LeakSanitizer in readable.sh and check-generated.sh readable.sh forks two short-lived ceph-dencoder processes per corpus object(tens of thousands of processes overall). With ASAN's LeakSanitizer enabled each process runs a whole-heap leak check at exit that dominates runtime (~10s vs ~1s per process, measured on riscv64). This test only validates encode/decode behaviour, not leaks, so disable leak detection while keeping ASAN's other checks active. check-generated.sh forks ceph-dencoder the same way, so apply the same fix there. Signed-off-by: Sun Yuechi --- src/test/encoding/check-generated.sh | 6 ++++++ src/test/encoding/readable.sh | 4 ++++ 2 files changed, 10 insertions(+) diff --git a/src/test/encoding/check-generated.sh b/src/test/encoding/check-generated.sh index c297d415273..42e70eed463 100755 --- a/src/test/encoding/check-generated.sh +++ b/src/test/encoding/check-generated.sh @@ -4,6 +4,12 @@ set -e source $(dirname $0)/../detect-build-env-vars.sh source $CEPH_ROOT/qa/standalone/ceph-helpers.sh +if ldd $(command -v ceph-dencoder) 2>/dev/null | grep -q libasan; then + # Per-object leak checks dominate runtime here (~10s vs ~1s each on riscv64) + # and this test only checks encode/decode, so disable them; keep other checks. + export ASAN_OPTIONS="${ASAN_OPTIONS:+$ASAN_OPTIONS:}detect_leaks=0" +fi + dir=$1 test_selected_type() { diff --git a/src/test/encoding/readable.sh b/src/test/encoding/readable.sh index dcf53d2c8ae..607657355bf 100755 --- a/src/test/encoding/readable.sh +++ b/src/test/encoding/readable.sh @@ -34,6 +34,10 @@ if ldd $(command -v $CEPH_DENCODER) 2>/dev/null | grep -q libasan; then else echo "ASAN build detected but 'setarch -R' is unavailable; running ceph-dencoder without ASLR disable" fi + + # Per-object leak checks dominate runtime here (~10s vs ~1s each on riscv64) + # and this test only checks encode/decode, so disable them; keep other checks. + export ASAN_OPTIONS="${ASAN_OPTIONS:+$ASAN_OPTIONS:}detect_leaks=0" fi myversion=$($CEPH_DENCODER version) -- 2.47.3