From: Xinze Chi Date: Fri, 29 May 2015 01:33:01 +0000 (+0800) Subject: commit: test: check daemon is alive or not agagin when sleep 60s X-Git-Tag: v9.0.2~96^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F4794%2Fhead;p=ceph.git commit: test: check daemon is alive or not agagin when sleep 60s Signed-off-by: Xinze Chi --- diff --git a/src/test/ceph-helpers.sh b/src/test/ceph-helpers.sh index 58eea9bbebd1..371f30b8a065 100755 --- a/src/test/ceph-helpers.sh +++ b/src/test/ceph-helpers.sh @@ -193,7 +193,7 @@ function kill_daemons() { local dir=$1 local signal=${2:-KILL} local name_prefix=$3 # optional, osd, mon, osd.1 - local delays=${4:-0 1 1 1 2 3 5 5 5 10 10 20 60} + local delays=${4:-0 0 1 1 1 2 3 5 5 5 10 10 20 60} local status=0 for pidfile in $(find $dir | grep $name_prefix'[^/]*\.pid') ; do @@ -201,6 +201,7 @@ function kill_daemons() { local send_signal=$signal local kill_complete=false for try in $delays ; do + sleep $try if kill -$send_signal $pid 2> /dev/null ; then kill_complete=false else @@ -208,7 +209,6 @@ function kill_daemons() { break fi send_signal=0 - sleep $try done if ! $kill_complete ; then status=1