Wait for all apps in high-throughput test
authorDavid Goulet <dgoulet@efficios.com>
Thu, 12 Apr 2012 18:54:28 +0000 (14:54 -0400)
committerDavid Goulet <dgoulet@efficios.com>
Thu, 12 Apr 2012 18:54:28 +0000 (14:54 -0400)
Don't wait an arbitrary amount of time for application to end.

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

index 05f8e85eab4c9f1be5effb6d8ab408b2f68ae2c8..de3111ddde8b95540600cb796e43fd2ef8a18fa2 100755 (executable)
@@ -48,9 +48,12 @@ for i in `seq 1 $NR_ITER`; do
        ./$CURDIR/$BIN_NAME & >/dev/null 2>&1
 done
 
-echo "Waiting for all tracing to settle (7 secs)"
-echo "Warning: this arbitrary time can make the test fail on slower system"
-sleep 7
+echo "Waiting for applications to end"
+while [ -n "$(pidof $BIN_NAME)" ]; do
+       echo -n "."
+       sleep 0.5
+done
+echo ""
 
 stop_tracing $SESSION_NAME
 destroy_lttng_session $SESSION_NAME
index 0f4affd99145165bb21006416cc7aeb8a5367af9..9f2f629b49d6ec92a7b244e8e3a2c348e64ad8a2 100644 (file)
@@ -115,7 +115,7 @@ function create_lttng_session ()
        sess_name=$1
        trace_path=$2
 
-       echo -n "Creating lttng session $sess_name in $trace_path"
+       echo -n "Creating lttng session $sess_name in $trace_path "
        $TESTDIR/../src/bin/lttng/$LTTNG_BIN create $sess_name -o $trace_path >/dev/null 2>&1
        if [ $? -eq 1 ]; then
                echo -e "\e[1;31mFAILED\e[0m"
This page took 0.027171 seconds and 5 git commands to generate.