]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
qa/workunits: cephtool: only run heap profiler test if tcmalloc enabled
authorJoao Eduardo Luis <joao.luis@inktank.com>
Wed, 25 Jun 2014 00:48:24 +0000 (01:48 +0100)
committerJoao Eduardo Luis <joao.luis@inktank.com>
Thu, 26 Jun 2014 00:00:36 +0000 (01:00 +0100)
Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
qa/workunits/cephtool/test.sh

index b45fe32d57b3af9ec4b279704c3b420635504d80..3cc007901c1167ebff1b736dd3d75417f6883593 100755 (executable)
@@ -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()