From: David Goulet Date: Tue, 10 Apr 2012 17:42:46 +0000 (-0400) Subject: Fix: wait for sessiond to stop in tests X-Git-Tag: v2.0.1~11 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=cccd0e3a52908b9fff9680185035011ecea93e07;p=lttng-tools.git 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 --- 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 }