From dcb5fb9b5aba894a5e6f721f73958743b3d7bda1 Mon Sep 17 00:00:00 2001 From: David Zafman Date: Tue, 22 Nov 2016 21:38:42 -0800 Subject: [PATCH] test: CLEANUP: Make wait_for_clean() clearer changing variable name Signed-off-by: David Zafman --- qa/workunits/ceph-helpers.sh | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/qa/workunits/ceph-helpers.sh b/qa/workunits/ceph-helpers.sh index d988e176a78..ba73e913115 100755 --- a/qa/workunits/ceph-helpers.sh +++ b/qa/workunits/ceph-helpers.sh @@ -1126,7 +1126,7 @@ function wait_for_clean() { local num_active_clean=-1 local cur_active_clean local -a delays=($(get_timeout_delays $TIMEOUT .1)) - local -i timer=0 + local -i loop=0 local num_pgs=$(get_num_pgs) test $num_pgs != 0 || return 1 @@ -1137,16 +1137,16 @@ function wait_for_clean() { cur_active_clean=$(get_num_active_clean) test $cur_active_clean = $num_pgs && break if test $cur_active_clean != $num_active_clean ; then - timer=0 + loop=0 num_active_clean=$cur_active_clean elif get_is_making_recovery_progress ; then - timer=0 - elif (( $timer >= ${#delays[*]} )) ; then + loop=0 + elif (( $loop >= ${#delays[*]} )) ; then ceph report return 1 fi - sleep ${delays[$timer]} - timer+=1 + sleep ${delays[$loop]} + loop+=1 done return 0 } -- 2.39.5