Fix: wait for sessiond to stop in tests
authorDavid Goulet <dgoulet@efficios.com>
Tue, 10 Apr 2012 17:42:46 +0000 (13:42 -0400)
committerDavid Goulet <dgoulet@efficios.com>
Tue, 10 Apr 2012 17:48:04 +0000 (13:48 -0400)
Before returning from stop_sessiond bash function, we wait that the
sessiond daemon completely stopped. If it hungs up at that point, the
kill did not work and investigation can begin.

Signed-off-by: David Goulet <dgoulet@efficios.com>
tests/utils.sh

index 55bc9e9d5a41adf559840f41a0bab677c25894db..0d5b13e79445642babb996392e60b78610de81fd 100644 (file)
@@ -72,6 +72,11 @@ function stop_sessiond ()
                echo -e "\e[1;31mFAILED\e[0m"
                return 1
        else
+               out=1
+               while [ -n "$out" ]; do
+                       out=$(pidof lt-$SESSIOND_BIN)
+                       sleep 0.5
+               done
                echo -e "\e[1;32mOK\e[0m"
        fi
 }
This page took 0.026205 seconds and 4 git commands to generate.