+ $TESTAPP_BIN $NR_ITER $NR_USEC_WAIT >/dev/null 2>&1
+ ok $? "Running test application"
+}
+
+# Testing for the absence of an event when testing exclusion is tricky. An
+# event could be absent because our exclusion mechanism works but also because
+# the event was not generate in the first place. This function test the ability
+# of our test suite to generate events.
+function dry_run
+{
+ trace_path=$(mktemp -d)
+
+ # Create session
+ create_lttng_session_ok $SESSION_NAME $trace_path
+
+ $TESTDIR/../src/bin/lttng/$LTTNG_BIN enable-event -u "tp:*" -s $SESSION_NAME > /dev/null
+ ok $? "Enabling events without exclusion"
+
+ # Trace apps
+ start_lttng_tracing_ok $SESSION_NAME
+ run_apps
+ stop_lttng_tracing_ok $SESSION_NAME
+
+ nb_events=$(babeltrace $trace_path | wc -l)
+ if [ "$nb_events" -ne "0" ]; then
+ ok 0 "Events were found during the dry run without exclusion"
+ else
+ fail "No events were found during the dry run without exclusion"
+ fi
+
+ rm -rf $trace_path
+
+ # Destroy session
+ destroy_lttng_session_ok $SESSION_NAME