From: Joao Eduardo Luis Date: Wed, 25 Jun 2014 00:48:24 +0000 (+0100) Subject: qa/workunits: cephtool: only run heap profiler test if tcmalloc enabled X-Git-Tag: v0.83~38^2~2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=4b0809a13eb363a15e52a6a57372a0a31a64cef8;p=ceph.git qa/workunits: cephtool: only run heap profiler test if tcmalloc enabled Signed-off-by: Joao Eduardo Luis --- diff --git a/qa/workunits/cephtool/test.sh b/qa/workunits/cephtool/test.sh index b45fe32d57b3..3cc007901c11 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()