]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
test: Fix kill_daemon() to check after last large sleep
authorDavid Zafman <dzafman@redhat.com>
Mon, 4 Feb 2019 21:30:11 +0000 (13:30 -0800)
committerDavid Zafman <dzafman@redhat.com>
Tue, 5 Feb 2019 19:30:04 +0000 (11:30 -0800)
Signed-off-by: David Zafman <dzafman@redhat.com>
qa/standalone/ceph-helpers.sh

index f38d1d8fb9d658afb3f1347b9e56dc849b132ecc..1a613c34fa790dfafea77cd535dc2dc164889e4f 100755 (executable)
@@ -256,7 +256,9 @@ function kill_daemon() {
     local send_signal=$2
     local delays=${3:-0.1 0.2 1 1 1 2 3 5 5 5 10 10 20 60 60 60 120}
     local exit_code=1
-    for try in $delays ; do
+    # In order to try after the last large sleep add 0 at the end so we check
+    # one last time before dropping out of the loop
+    for try in $delays 0 ; do
          if kill -$send_signal $pid 2> /dev/null ; then
             exit_code=1
          else