From cccd0e3a52908b9fff9680185035011ecea93e07 Mon Sep 17 00:00:00 2001 From: David Goulet Date: Tue, 10 Apr 2012 13:42:46 -0400 Subject: [PATCH] Fix: wait for sessiond to stop in tests 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 --- tests/utils.sh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tests/utils.sh b/tests/utils.sh index 55bc9e9d5..0d5b13e79 100644 --- a/tests/utils.sh +++ b/tests/utils.sh @@ -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 } -- 2.34.1