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
# Run 5 times with a 1 second delay
$TESTAPP_BIN $NR_ITER $NR_USEC_WAIT >/dev/null 2>&1 &
- start_lttng_tracing $SESSION_NAME
+ #FIXME: racy missing synchro
- wait_apps
+ start_lttng_tracing $SESSION_NAME
+ # 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 &
+ $TESTAPP_BIN $NR_ITER $NR_USEC_WAIT >/dev/null 2>&1
- wait_apps
+ #FIXME: racy missing synchro
stop_lttng_tracing $SESSION_NAME
destroy_lttng_session $SESSION_NAME
+
+ # Wait for the applications started in background
+ wait
}
plan_tests $NUM_TESTS