# Start tests. Each is an infinite tracing loop.
+file_sync_after_first=$(mktemp -u)
+file_sync_before_last=$(mktemp -u)
+
diag "Starting $NUM_PROCESS test applications"
for i in `seq 1 $NUM_PROCESS`
do
- $TESTAPP_BIN $NR_ITER $NR_USEC_WAIT >/dev/null 2>&1 &
+ $TESTAPP_BIN $NR_ITER $NR_USEC_WAIT ${file_sync_after_first} ${file_sync_before_last} >/dev/null 2>&1 &
APPS_PID="${APPS_PID} ${!}"
done
enable_ust_lttng_event $SESSION_NAME $EVENT_NAME
start_lttng_tracing $SESSION_NAME
+touch ${file_sync_before_last}
+
# We don't validate whether the applications have traced here, rather
# just that they registered to sessiond (above).
stop_lttng_tracing $SESSION_NAME
destroy_lttng_session $SESSION_NAME
+#TODO: add trace validation.
+
rm -rf $TRACE_PATH
diag "Stopping all spawned applications"
kill ${p}
wait ${p} 2>/dev/null
done
+APPS_PID=
pass "Stopped all spawned applications"
+rm -f ${file_sync_after_first}
+rm -f ${file_sync_before_last}
+
stop_lttng_sessiond