]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
test: Add option to wait_for_clean() to execute at every sleep
authorDavid Zafman <dzafman@redhat.com>
Sat, 26 Jan 2019 00:03:30 +0000 (16:03 -0800)
committerDavid Zafman <dzafman@redhat.com>
Wed, 6 Mar 2019 10:21:12 +0000 (10:21 +0000)
Signed-off-by: David Zafman <dzafman@redhat.com>
(cherry picked from commit 70b51362084d2ae5f2a6e9e5856f17452c53e3f3)

qa/standalone/ceph-helpers.sh

index c2d724629ccd14f20a9a50d843581700d36dc552..9a4bae2a58427fe0f411bea2939aa54d00dc75f6 100755 (executable)
@@ -1422,6 +1422,7 @@ function test_get_timeout_delays() {
 # @return 0 if the cluster is clean, 1 otherwise
 #
 function wait_for_clean() {
+    local cmd=$1
     local num_active_clean=-1
     local cur_active_clean
     local -a delays=($(get_timeout_delays $TIMEOUT .1))
@@ -1447,6 +1448,8 @@ function wait_for_clean() {
             ceph report
             return 1
         fi
+       # eval is a no-op if cmd is empty
+        eval $cmd
         sleep ${delays[$loop]}
         loop+=1
     done