From 0b6a504e564f45aaf695cfe1aa97777f55009db9 Mon Sep 17 00:00:00 2001 From: David Zafman Date: Fri, 25 Jan 2019 16:03:30 -0800 Subject: [PATCH] test: Add option to wait_for_clean() to execute at every sleep Signed-off-by: David Zafman (cherry picked from commit 70b51362084d2ae5f2a6e9e5856f17452c53e3f3) --- qa/standalone/ceph-helpers.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/qa/standalone/ceph-helpers.sh b/qa/standalone/ceph-helpers.sh index ffc71c215051d..2bd5f250c2550 100755 --- a/qa/standalone/ceph-helpers.sh +++ b/qa/standalone/ceph-helpers.sh @@ -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 -- 2.39.5