From 4b0809a13eb363a15e52a6a57372a0a31a64cef8 Mon Sep 17 00:00:00 2001 From: Joao Eduardo Luis Date: Wed, 25 Jun 2014 01:48:24 +0100 Subject: [PATCH] qa/workunits: cephtool: only run heap profiler test if tcmalloc enabled Signed-off-by: Joao Eduardo Luis --- qa/workunits/cephtool/test.sh | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/qa/workunits/cephtool/test.sh b/qa/workunits/cephtool/test.sh index b45fe32d57b3a..3cc007901c116 100755 --- a/qa/workunits/cephtool/test.sh +++ b/qa/workunits/cephtool/test.sh @@ -693,14 +693,22 @@ function test_mon_osd_misc() function test_mon_heap_profiler() { + do_test=1 set +e # expect 'heap' commands to be correctly parsed - ceph heap stats + ceph heap stats 2>$TMPFILE + if [[ $? -eq 22 && `grep 'tcmalloc not enabled' $TMPFILE` ]]; then + echo "tcmalloc not enabled; skip heap profiler test" + do_test=0 + fi + set -e + + [[ $do_test -eq 0 ]] && return 0 + ceph heap start_profiler ceph heap dump ceph heap stop_profiler ceph heap release - set -e } function test_osd_bench() -- 2.39.5