Each testcase should resume the application if needed. They must ensure
they suspend it before returning.
Signed-off-by: Francis Deslauriers <francis.deslauriers@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Change-Id: I5d4f5f43886af676163ab6190b90181bfb575170
Depends-on: lttng-ust: I5a800fc92e588c2a6a0e26282b0ad5f31c044479
ok(nc_status == LTTNG_NOTIFICATION_CHANNEL_STATUS_ALREADY_SUBSCRIBED,
"Subscribe to a condition for which subscription was already done");
ok(nc_status == LTTNG_NOTIFICATION_CHANNEL_STATUS_ALREADY_SUBSCRIBED,
"Subscribe to a condition for which subscription was already done");
+ resume_application();
+
/* Wait for notification to happen */
stop_consumer(argv);
lttng_start_tracing(session_name);
/* Wait for notification to happen */
stop_consumer(argv);
lttng_start_tracing(session_name);
lttng_notification_destroy(notification);
notification = NULL;
lttng_notification_destroy(notification);
notification = NULL;
- /* Resume consumer to allow event consumption */
+
+ /* Resume consumer to allow event consumption */
lttng_stop_tracing_no_wait(session_name);
resume_consumer(argv);
wait_data_pending(session_name);
lttng_stop_tracing_no_wait(session_name);
resume_consumer(argv);
wait_data_pending(session_name);
+ /*
+ * Test cases are responsible for resuming the app when needed and
+ * making sure it's suspended when returning.
+ */
+ suspend_application();
+
diag("Test trigger for domain %s with buffer_usage_low condition", domain_type_string);
test_triggers_buffer_usage_condition(session_name, channel_name, domain_type, LTTNG_CONDITION_TYPE_BUFFER_USAGE_LOW);
diag("Test trigger for domain %s with buffer_usage_high condition", domain_type_string);
diag("Test trigger for domain %s with buffer_usage_low condition", domain_type_string);
test_triggers_buffer_usage_condition(session_name, channel_name, domain_type, LTTNG_CONDITION_TYPE_BUFFER_USAGE_LOW);
diag("Test trigger for domain %s with buffer_usage_high condition", domain_type_string);