From: David Zafman Date: Wed, 23 Nov 2016 05:38:42 +0000 (-0800) Subject: test: CLEANUP: Make wait_for_clean() clearer changing variable name X-Git-Tag: v11.1.0~190^2~1 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=dcb5fb9b5aba894a5e6f721f73958743b3d7bda1;p=ceph.git test: CLEANUP: Make wait_for_clean() clearer changing variable name Signed-off-by: David Zafman --- 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 }