TRACE_PATH=$(mktemp -d)
-NUM_TESTS=18
+NUM_TESTS=16
source $TESTDIR/utils/utils.sh
ok $? "Create session with default path"
}
-function wait_apps
-{
- while [ -n "$(pidof $TESTAPP_NAME)" ]; do
- sleep 0.5
- done
- pass "Wait for applications to end"
-}
# MUST set TESTDIR before calling those functions
$TESTAPP_BIN $NR_ITER $NR_USEC_WAIT >/dev/null 2>&1 &
start_lttng_tracing $SESSION_NAME
-
- wait_apps
+ # Wait for the applications started in background
+ wait ${!}
stop_lttng_tracing $SESSION_NAME
destroy_lttng_session $SESSION_NAME
start_lttng_tracing $SESSION_NAME
# Run 5 times with a 1 second delay
- $TESTAPP_BIN $NR_ITER $NR_USEC_WAIT >/dev/null 2>&1 &
-
- wait_apps
+ $TESTAPP_BIN $NR_ITER $NR_USEC_WAIT >/dev/null 2>&1
stop_lttng_tracing $SESSION_NAME
destroy_lttng_session $SESSION_NAME