From 5fa325800d52b417e45b98cc659d3360c4f6c9d5 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 2d8b46a83..0f4affd99 100644 --- a/tests/utils.sh +++ b/tests/utils.sh @@ -101,6 +101,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