X-Git-Url: https://git.lttng.org/?a=blobdiff_plain;f=tests%2Fregression%2Ftools%2Fnotification%2Fnotification.c;h=97a056b6ab94b49a694c81dbecae4a1b28e9426f;hb=7676e0d235b5e6254811ecece74159d2c8ca1bcf;hp=aa0181b6e8818abe1f7bc73a86b8845f20b3fdb9;hpb=a6ae2480fd07132b711c437b33f263756f155902;p=lttng-tools.git diff --git a/tests/regression/tools/notification/notification.c b/tests/regression/tools/notification/notification.c index aa0181b6e..97a056b6a 100644 --- a/tests/regression/tools/notification/notification.c +++ b/tests/regression/tools/notification/notification.c @@ -621,6 +621,8 @@ void test_notification_channel(const char *session_name, 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); @@ -721,8 +723,9 @@ void test_notification_channel(const char *session_name, lttng_notification_destroy(notification); notification = NULL; - /* Resume consumer to allow event consumption */ suspend_application(); + + /* Resume consumer to allow event consumption */ lttng_stop_tracing_no_wait(session_name); resume_consumer(argv); wait_data_pending(session_name); @@ -783,6 +786,12 @@ int main(int argc, const char *argv[]) goto error; } + /* + * 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);