]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
test/encoding: disable LeakSanitizer in readable.sh and check-generated.sh 69658/head
authorSun Yuechi <sunyuechi@iscas.ac.cn>
Mon, 22 Jun 2026 17:38:54 +0000 (01:38 +0800)
committerSun Yuechi <sunyuechi@iscas.ac.cn>
Tue, 23 Jun 2026 01:41:25 +0000 (09:41 +0800)
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 <sunyuechi@iscas.ac.cn>
src/test/encoding/check-generated.sh
src/test/encoding/readable.sh

index c297d415273a697c9849b7d035137b7f175af631..42e70eed4631ed51dbf410ca299a69c333e25a5f 100755 (executable)
@@ -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() {
index dcf53d2c8aea53261148e2d0547cf6daf00ed4e5..607657355bf42dad69a1e877c1e7d35f4a7923b9 100755 (executable)
@@ -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)