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>
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() {
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)