From: David Goulet Date: Thu, 1 Sep 2011 21:12:20 +0000 (-0400) Subject: Fix benchmark scripts to wait PID X-Git-Url: http://git.lttng.org./?a=commitdiff_plain;h=5400b0f9cf4514a435e6ebdd3e44c4f6d640428d;p=lttng-tools.git Fix benchmark scripts to wait PID Signed-off-by: David Goulet --- diff --git a/benchmark/run-boot-time.sh b/benchmark/run-boot-time.sh index ba57d168d..c17a4fd26 100755 --- a/benchmark/run-boot-time.sh +++ b/benchmark/run-boot-time.sh @@ -43,9 +43,7 @@ sleep 1 kill $PID_SESSIOND -echo -e "\nResults will be available shortly in $RESULTS_PATH" -echo "" - -tail -F $RESULTS_PATH --pid $PID_SESSIOND 2>/dev/null +# Trick to wait for a PID which is not a child +tail --pid=$PID_SESSIOND --quiet -F $RESULTS_PATH > /dev/null 2>&1 exit 0 diff --git a/benchmark/run-ust-notify.sh b/benchmark/run-ust-notify.sh index 660492a54..be1544ed5 100755 --- a/benchmark/run-ust-notify.sh +++ b/benchmark/run-ust-notify.sh @@ -33,10 +33,9 @@ fi PID_SESSIOND=`pidof lt-$SESSIOND_BIN` -echo -e "\nResults will be available shortly in $RESULTS_PATH" -echo "" - kill $PID_SESSIOND -tail -F $RESULTS_PATH --pid $PID_SESSIOND 2>/dev/null + +# Trick to wait for a PID which is not a child +tail --pid=$PID_SESSIOND --quiet -F $RESULTS_PATH > /dev/null 2>&1 exit 0 diff --git a/benchmark/run-ust-register.sh b/benchmark/run-ust-register.sh index 88e70e0a0..61c76f4db 100755 --- a/benchmark/run-ust-register.sh +++ b/benchmark/run-ust-register.sh @@ -21,7 +21,7 @@ SESSIOND_BIN="ltt-sessiond" RESULTS_PATH="/tmp/lttng-bench-results.txt" BASEDIR=`dirname $0` -echo "Session daemon boot process benchmark" +echo "Session daemon boot" `BENCH_UST_REGISTER=1 $BASEDIR/../ltt-sessiond/$SESSIOND_BIN --daemonize --quiet` if [ $? -ne 0 ]; then @@ -39,10 +39,9 @@ sleep 2 # Start libust instrumented application to register. UST_AUTOPROBE=1 UST_TRACE=1 ./$BASEDIR/hello -echo -e "\nResults will be available shortly in $RESULTS_PATH" -echo "" - kill $PID_SESSIOND -tail -F $RESULTS_PATH --pid $PID_SESSIOND 2>/dev/null + +# Trick to wait for a PID which is not a child +tail --pid=$PID_SESSIOND --quiet -F $RESULTS_PATH > /dev/null 2>&1 exit 0 diff --git a/benchmark/runall.sh b/benchmark/runall.sh index d77694482..037ac9e3e 100755 --- a/benchmark/runall.sh +++ b/benchmark/runall.sh @@ -19,7 +19,8 @@ #### ADD TESTS HERE #### -test_suite=( "run-boot-time.sh" "run-sessions.sh" "run-ust-register.sh" ) +test_suite=( "run-boot-time.sh" "run-sessions.sh" "run-ust-register.sh" \ + "run-ust-notify.sh" ) #### END TESTS HERE ####