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.1.0-rc1~155 X-Git-Url: https://git.lttng.org/?p=lttng-tools.git;a=commitdiff_plain;h=5fa325800d52b417e45b98cc659d3360c4f6c9d5 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 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 }