4 * Tests suite for LTTng notification API
6 * Copyright (C) 2017 Jonathan Rajotte <jonathan.rajotte-julien@efficios.com>
8 * SPDX-License-Identifier: MIT
20 #include <sys/types.h>
26 #include <common/compat/errno.h>
27 #include <lttng/action/action.h>
28 #include <lttng/action/notify.h>
29 #include <lttng/condition/buffer-usage.h>
30 #include <lttng/condition/condition.h>
31 #include <lttng/condition/evaluation.h>
32 #include <lttng/domain.h>
33 #include <lttng/endpoint.h>
34 #include <lttng/lttng-error.h>
35 #include <lttng/notification/channel.h>
36 #include <lttng/notification/notification.h>
37 #include <lttng/trigger/trigger.h>
38 #include <lttng/lttng.h>
45 int named_pipe_args_start
= 0;
47 const char *app_state_file
= NULL
;
50 void wait_on_file(const char *path
, bool file_exist
)
59 ret
= stat(path
, &buf
);
60 if (ret
== -1 && errno
== ENOENT
) {
63 * The file does not exist. wait a bit and
64 * continue looping until it does.
66 (void) poll(NULL
, 0, 10);
71 * File does not exist and the exit condition we want.
72 * Break from the loop and return.
81 * stat() returned 0, so the file exists. break now only if
82 * that's the exit condition we want.
91 int write_pipe(const char *path
, uint8_t data
)
96 fd
= open(path
, O_WRONLY
| O_NONBLOCK
);
98 perror("Could not open consumer control named pipe");
102 ret
= write(fd
, &data
, sizeof(data
));
104 perror("Named pipe write failed");
106 perror("Named pipe close failed");
114 perror("Name pipe closing failed");
123 int stop_consumer(const char **argv
)
127 for (i
= named_pipe_args_start
; i
< nb_args
; i
++) {
128 ret
= write_pipe(argv
[i
], 49);
134 int resume_consumer(const char **argv
)
138 for (i
= named_pipe_args_start
; i
< nb_args
; i
++) {
139 ret
= write_pipe(argv
[i
], 0);
145 int suspend_application(void)
150 if (!stat(app_state_file
, &buf
)) {
151 fail("App is already in a suspended state.");
157 * Send SIGUSR1 to application instructing it to bypass tracepoint.
161 ret
= kill(app_pid
, SIGUSR1
);
163 fail("SIGUSR1 failed. errno %d", errno
);
168 wait_on_file(app_state_file
, true);
176 int resume_application(void)
181 ret
= stat(app_state_file
, &buf
);
182 if (ret
== -1 && errno
== ENOENT
) {
183 fail("State file does not exist");
193 ret
= kill(app_pid
, SIGUSR1
);
195 fail("SIGUSR1 failed. errno %d", errno
);
200 wait_on_file(app_state_file
, false);
209 void test_triggers_buffer_usage_condition(const char *session_name
,
210 const char *channel_name
,
211 enum lttng_domain_type domain_type
,
212 enum lttng_condition_type condition_type
)
214 unsigned int test_vector_size
= 5, i
;
215 enum lttng_condition_status condition_status
;
216 struct lttng_action
*action
;
219 action
= lttng_action_notify_create();
221 fail("Setup error on action creation");
225 /* Test lttng_register_trigger with null value */
226 ok(lttng_register_trigger(NULL
) == -LTTNG_ERR_INVALID
, "Registering a NULL trigger fails as expected");
228 /* Test: register a trigger */
230 for (i
= 0; i
< pow(2,test_vector_size
); i
++) {
232 char *test_tuple_string
= NULL
;
233 unsigned int mask_position
= 0;
234 bool session_name_set
= false;
235 bool channel_name_set
= false;
236 bool threshold_ratio_set
= false;
237 bool threshold_byte_set
= false;
238 bool domain_type_set
= false;
240 struct lttng_trigger
*trigger
= NULL
;
241 struct lttng_condition
*condition
= NULL
;
243 /* Create base condition */
244 switch (condition_type
) {
245 case LTTNG_CONDITION_TYPE_BUFFER_USAGE_LOW
:
246 condition
= lttng_condition_buffer_usage_low_create();
248 case LTTNG_CONDITION_TYPE_BUFFER_USAGE_HIGH
:
249 condition
= lttng_condition_buffer_usage_high_create();
262 /* Prepare the condition for trigger registration test */
264 /* Set session name */
265 if ((1 << mask_position
) & i
) {
266 condition_status
= lttng_condition_buffer_usage_set_session_name(
267 condition
, session_name
);
268 if (condition_status
!= LTTNG_CONDITION_STATUS_OK
) {
272 session_name_set
= true;
276 /* Set channel name */
277 if ((1 << mask_position
) & i
) {
278 condition_status
= lttng_condition_buffer_usage_set_channel_name(
279 condition
, channel_name
);
280 if (condition_status
!= LTTNG_CONDITION_STATUS_OK
) {
284 channel_name_set
= true;
288 /* Set threshold ratio */
289 if ((1 << mask_position
) & i
) {
290 condition_status
= lttng_condition_buffer_usage_set_threshold_ratio(
292 if (condition_status
!= LTTNG_CONDITION_STATUS_OK
) {
296 threshold_ratio_set
= true;
300 /* Set threshold byte */
301 if ((1 << mask_position
) & i
) {
302 condition_status
= lttng_condition_buffer_usage_set_threshold(
304 if (condition_status
!= LTTNG_CONDITION_STATUS_OK
) {
308 threshold_byte_set
= true;
312 /* Set domain type */
313 if ((1 << mask_position
) & i
) {
314 condition_status
= lttng_condition_buffer_usage_set_domain_type(
315 condition
, LTTNG_DOMAIN_UST
);
316 if (condition_status
!= LTTNG_CONDITION_STATUS_OK
) {
320 domain_type_set
= true;
324 if (mask_position
!= test_vector_size
-1) {
325 assert("Logic error for test vector generation");
328 loop_ret
= asprintf(&test_tuple_string
, "session name %s, channel name %s, threshold ratio %s, threshold byte %s, domain type %s",
329 session_name_set
? "set" : "unset",
330 channel_name_set
? "set" : "unset",
331 threshold_ratio_set
? "set" : "unset",
332 threshold_byte_set
? "set" : "unset",
333 domain_type_set
? "set" : "unset");
334 if (!test_tuple_string
|| loop_ret
< 0) {
340 trigger
= lttng_trigger_create(condition
, action
);
346 loop_ret
= lttng_register_trigger(trigger
);
350 fail("Setup error occurred for tuple: %s", test_tuple_string
);
354 /* This combination happens three times */
355 if (session_name_set
&& channel_name_set
356 && (threshold_ratio_set
|| threshold_byte_set
)
357 && domain_type_set
) {
358 ok(loop_ret
== 0, "Trigger is registered: %s", test_tuple_string
);
361 * Test that a trigger cannot be registered
364 loop_ret
= lttng_register_trigger(trigger
);
365 ok(loop_ret
== -LTTNG_ERR_TRIGGER_EXISTS
, "Re-register trigger fails as expected: %s", test_tuple_string
);
367 /* Test that a trigger can be unregistered */
368 loop_ret
= lttng_unregister_trigger(trigger
);
369 ok(loop_ret
== 0, "Unregister trigger: %s", test_tuple_string
);
372 * Test that unregistration of a non-previously
373 * registered trigger fail.
375 loop_ret
= lttng_unregister_trigger(trigger
);
376 ok(loop_ret
== -LTTNG_ERR_TRIGGER_NOT_FOUND
, "Unregister of a non-registered trigger fails as expected: %s", test_tuple_string
);
378 ok(loop_ret
== -LTTNG_ERR_INVALID_TRIGGER
, "Trigger is invalid as expected and cannot be registered: %s", test_tuple_string
);
382 free(test_tuple_string
);
383 lttng_trigger_destroy(trigger
);
384 lttng_condition_destroy(condition
);
388 lttng_action_destroy(action
);
392 void wait_data_pending(const char *session_name
)
397 ret
= lttng_data_pending(session_name
);
403 int setup_buffer_usage_condition(struct lttng_condition
*condition
,
404 const char *condition_name
,
405 const char *session_name
,
406 const char *channel_name
,
407 const enum lttng_domain_type domain_type
)
409 enum lttng_condition_status condition_status
;
412 condition_status
= lttng_condition_buffer_usage_set_session_name(
413 condition
, session_name
);
414 if (condition_status
!= LTTNG_CONDITION_STATUS_OK
) {
415 fail("Failed to set session name on creation of condition `%s`",
421 condition_status
= lttng_condition_buffer_usage_set_channel_name(
422 condition
, channel_name
);
423 if (condition_status
!= LTTNG_CONDITION_STATUS_OK
) {
424 fail("Failed to set channel name on creation of condition `%s`",
430 condition_status
= lttng_condition_buffer_usage_set_domain_type(
431 condition
, domain_type
);
432 if (condition_status
!= LTTNG_CONDITION_STATUS_OK
) {
433 fail("Failed to set domain type on creation of condition `%s`",
444 void test_invalid_channel_subscription(
445 const enum lttng_domain_type domain_type
)
447 enum lttng_condition_status condition_status
;
448 enum lttng_notification_channel_status nc_status
;
449 struct lttng_condition
*dummy_condition
= NULL
;
450 struct lttng_condition
*dummy_invalid_condition
= NULL
;
451 struct lttng_notification_channel
*notification_channel
= NULL
;
454 notification_channel
= lttng_notification_channel_create(
455 lttng_session_daemon_notification_endpoint
);
456 ok(notification_channel
, "Notification channel object creation");
457 if (!notification_channel
) {
462 * Create a dummy, empty (thus invalid) condition to test error paths.
464 dummy_invalid_condition
= lttng_condition_buffer_usage_low_create();
465 if (!dummy_invalid_condition
) {
466 fail("Setup error on condition creation");
471 * Test subscription and unsubscription of an invalid condition to/from
474 nc_status
= lttng_notification_channel_subscribe(
475 notification_channel
, dummy_invalid_condition
);
476 ok(nc_status
== LTTNG_NOTIFICATION_CHANNEL_STATUS_INVALID
,
477 "Subscribing to an invalid condition");
479 nc_status
= lttng_notification_channel_unsubscribe(
480 notification_channel
, dummy_invalid_condition
);
481 ok(nc_status
== LTTNG_NOTIFICATION_CHANNEL_STATUS_INVALID
,
482 "Unsubscribing from an invalid condition");
484 /* Create a valid dummy condition with a ratio of 0.5 */
485 dummy_condition
= lttng_condition_buffer_usage_low_create();
486 if (!dummy_condition
) {
487 fail("Setup error on dummy_condition creation");
491 condition_status
= lttng_condition_buffer_usage_set_threshold_ratio(
492 dummy_condition
, 0.5);
493 if (condition_status
!= LTTNG_CONDITION_STATUS_OK
) {
494 fail("Setup error on condition creation");
498 ret
= setup_buffer_usage_condition(dummy_condition
, "dummy_condition",
499 "dummy_session", "dummy_channel", domain_type
);
501 fail("Setup error on dummy condition creation");
506 * Test subscription and unsubscription to/from a channel with invalid
509 nc_status
= lttng_notification_channel_subscribe(NULL
, NULL
);
510 ok(nc_status
== LTTNG_NOTIFICATION_CHANNEL_STATUS_INVALID
,
511 "Notification channel subscription is invalid: NULL, NULL");
513 nc_status
= lttng_notification_channel_subscribe(
514 notification_channel
, NULL
);
515 ok(nc_status
== LTTNG_NOTIFICATION_CHANNEL_STATUS_INVALID
,
516 "Notification channel subscription is invalid: NON-NULL, NULL");
518 nc_status
= lttng_notification_channel_subscribe(NULL
, dummy_condition
);
519 ok(nc_status
== LTTNG_NOTIFICATION_CHANNEL_STATUS_INVALID
,
520 "Notification channel subscription is invalid: NULL, NON-NULL");
522 nc_status
= lttng_notification_channel_unsubscribe(
523 notification_channel
, dummy_condition
);
524 ok(nc_status
== LTTNG_NOTIFICATION_CHANNEL_STATUS_UNKNOWN_CONDITION
,
525 "Unsubscribing from a valid unknown condition");
528 lttng_notification_channel_destroy(notification_channel
);
529 lttng_condition_destroy(dummy_invalid_condition
);
530 lttng_condition_destroy(dummy_condition
);
534 enum buffer_usage_type
{
535 BUFFER_USAGE_TYPE_LOW
,
536 BUFFER_USAGE_TYPE_HIGH
,
539 static int register_buffer_usage_notify_trigger(const char *session_name
,
540 const char *channel_name
,
541 const enum lttng_domain_type domain_type
,
542 enum buffer_usage_type buffer_usage_type
,
544 struct lttng_condition
**condition
,
545 struct lttng_action
**action
,
546 struct lttng_trigger
**trigger
)
548 enum lttng_condition_status condition_status
;
549 struct lttng_action
*tmp_action
= NULL
;
550 struct lttng_condition
*tmp_condition
= NULL
;
551 struct lttng_trigger
*tmp_trigger
= NULL
;
555 tmp_action
= lttng_action_notify_create();
557 fail("Setup error on action creation");
562 if (buffer_usage_type
== BUFFER_USAGE_TYPE_LOW
) {
563 tmp_condition
= lttng_condition_buffer_usage_low_create();
565 tmp_condition
= lttng_condition_buffer_usage_high_create();
568 if (!tmp_condition
) {
569 fail("Setup error on condition creation");
574 /* Set the buffer usage threashold */
575 condition_status
= lttng_condition_buffer_usage_set_threshold_ratio(
576 tmp_condition
, ratio
);
577 if (condition_status
!= LTTNG_CONDITION_STATUS_OK
) {
578 fail("Setup error on condition creation");
583 ret
= setup_buffer_usage_condition(tmp_condition
, "condition_name",
584 session_name
, channel_name
, domain_type
);
586 fail("Setup error on condition creation");
591 /* Register the trigger for condition. */
592 tmp_trigger
= lttng_trigger_create(tmp_condition
, tmp_action
);
594 fail("Setup error on trigger creation");
599 ret
= lttng_register_trigger(tmp_trigger
);
601 fail("Setup error on trigger registration");
606 *condition
= tmp_condition
;
607 *trigger
= tmp_trigger
;
608 *action
= tmp_action
;
612 lttng_action_destroy(tmp_action
);
613 lttng_condition_destroy(tmp_condition
);
614 lttng_trigger_destroy(tmp_trigger
);
620 static void test_subscription_twice(const char *session_name
,
621 const char *channel_name
,
622 const enum lttng_domain_type domain_type
)
625 enum lttng_notification_channel_status nc_status
;
627 struct lttng_action
*action
= NULL
;
628 struct lttng_notification_channel
*notification_channel
= NULL
;
629 struct lttng_trigger
*trigger
= NULL
;
631 struct lttng_condition
*condition
= NULL
;
633 ret
= register_buffer_usage_notify_trigger(session_name
, channel_name
,
634 domain_type
, BUFFER_USAGE_TYPE_LOW
, 0.99, &condition
,
637 fail("Setup error on trigger registration");
642 notification_channel
= lttng_notification_channel_create(
643 lttng_session_daemon_notification_endpoint
);
644 ok(notification_channel
, "Notification channel object creation");
645 if (!notification_channel
) {
649 /* Subscribe a valid condition. */
650 nc_status
= lttng_notification_channel_subscribe(
651 notification_channel
, condition
);
652 ok(nc_status
== LTTNG_NOTIFICATION_CHANNEL_STATUS_OK
,
653 "Subscribe to condition");
655 /* Subscribing again should fail. */
656 nc_status
= lttng_notification_channel_subscribe(
657 notification_channel
, condition
);
658 ok(nc_status
== LTTNG_NOTIFICATION_CHANNEL_STATUS_ALREADY_SUBSCRIBED
,
659 "Subscribe to a condition for which subscription was already done");
662 lttng_unregister_trigger(trigger
);
663 lttng_trigger_destroy(trigger
);
664 lttng_notification_channel_destroy(notification_channel
);
665 lttng_action_destroy(action
);
666 lttng_condition_destroy(condition
);
669 static void test_buffer_usage_notification_channel(const char *session_name
,
670 const char *channel_name
,
671 const enum lttng_domain_type domain_type
,
675 enum lttng_notification_channel_status nc_status
;
677 struct lttng_action
*low_action
= NULL
;
678 struct lttng_action
*high_action
= NULL
;
679 struct lttng_notification
*notification
= NULL
;
680 struct lttng_notification_channel
*notification_channel
= NULL
;
681 struct lttng_trigger
*low_trigger
= NULL
;
682 struct lttng_trigger
*high_trigger
= NULL
;
684 struct lttng_condition
*low_condition
= NULL
;
685 struct lttng_condition
*high_condition
= NULL
;
687 const double low_ratio
= 0.0;
688 const double high_ratio
= 0.90;
690 ret
= register_buffer_usage_notify_trigger(session_name
, channel_name
,
691 domain_type
, BUFFER_USAGE_TYPE_LOW
, low_ratio
,
692 &low_condition
, &low_action
, &low_trigger
);
694 fail("Setup error on low trigger registration");
698 ret
= register_buffer_usage_notify_trigger(session_name
, channel_name
,
699 domain_type
, BUFFER_USAGE_TYPE_HIGH
, high_ratio
,
700 &high_condition
, &high_action
, &high_trigger
);
702 fail("Setup error on high trigger registration");
707 notification_channel
= lttng_notification_channel_create(
708 lttng_session_daemon_notification_endpoint
);
709 ok(notification_channel
, "Notification channel object creation");
710 if (!notification_channel
) {
714 /* Subscribe a valid low condition */
715 nc_status
= lttng_notification_channel_subscribe(
716 notification_channel
, low_condition
);
717 ok(nc_status
== LTTNG_NOTIFICATION_CHANNEL_STATUS_OK
,
718 "Subscribe to low condition");
720 /* Subscribe a valid high condition */
721 nc_status
= lttng_notification_channel_subscribe(
722 notification_channel
, high_condition
);
723 ok(nc_status
== LTTNG_NOTIFICATION_CHANNEL_STATUS_OK
,
724 "Subscribe to high condition");
726 resume_application();
728 /* Wait for notification to happen */
730 lttng_start_tracing(session_name
);
732 /* Wait for high notification */
734 nc_status
= lttng_notification_channel_get_next_notification(
735 notification_channel
, ¬ification
);
736 } while (nc_status
== LTTNG_NOTIFICATION_CHANNEL_STATUS_INTERRUPTED
);
737 ok(nc_status
== LTTNG_NOTIFICATION_CHANNEL_STATUS_OK
&& notification
&&
738 lttng_condition_get_type(lttng_notification_get_condition(
740 LTTNG_CONDITION_TYPE_BUFFER_USAGE_HIGH
,
741 "High notification received after intermediary communication");
742 lttng_notification_destroy(notification
);
745 suspend_application();
746 lttng_stop_tracing_no_wait(session_name
);
747 resume_consumer(argv
);
748 wait_data_pending(session_name
);
751 * Test that communication still work even if there is notification
752 * waiting for consumption.
755 nc_status
= lttng_notification_channel_unsubscribe(
756 notification_channel
, low_condition
);
757 ok(nc_status
== LTTNG_NOTIFICATION_CHANNEL_STATUS_OK
,
758 "Unsubscribe with pending notification");
760 nc_status
= lttng_notification_channel_subscribe(
761 notification_channel
, low_condition
);
762 ok(nc_status
== LTTNG_NOTIFICATION_CHANNEL_STATUS_OK
,
763 "Subscribe with pending notification");
766 nc_status
= lttng_notification_channel_get_next_notification(
767 notification_channel
, ¬ification
);
768 } while (nc_status
== LTTNG_NOTIFICATION_CHANNEL_STATUS_INTERRUPTED
);
769 ok(nc_status
== LTTNG_NOTIFICATION_CHANNEL_STATUS_OK
&& notification
&&
770 lttng_condition_get_type(lttng_notification_get_condition(
772 LTTNG_CONDITION_TYPE_BUFFER_USAGE_LOW
,
773 "Low notification received after intermediary communication");
774 lttng_notification_destroy(notification
);
777 /* Stop consumer to force a high notification */
779 resume_application();
780 lttng_start_tracing(session_name
);
783 nc_status
= lttng_notification_channel_get_next_notification(
784 notification_channel
, ¬ification
);
785 } while (nc_status
== LTTNG_NOTIFICATION_CHANNEL_STATUS_INTERRUPTED
);
786 ok(nc_status
== LTTNG_NOTIFICATION_CHANNEL_STATUS_OK
&& notification
&&
787 lttng_condition_get_type(lttng_notification_get_condition(
789 LTTNG_CONDITION_TYPE_BUFFER_USAGE_HIGH
,
790 "High notification received after intermediary communication");
791 lttng_notification_destroy(notification
);
794 suspend_application();
795 lttng_stop_tracing_no_wait(session_name
);
796 resume_consumer(argv
);
797 wait_data_pending(session_name
);
800 nc_status
= lttng_notification_channel_get_next_notification(
801 notification_channel
, ¬ification
);
802 } while (nc_status
== LTTNG_NOTIFICATION_CHANNEL_STATUS_INTERRUPTED
);
803 ok(nc_status
== LTTNG_NOTIFICATION_CHANNEL_STATUS_OK
&& notification
&&
804 lttng_condition_get_type(lttng_notification_get_condition(
806 LTTNG_CONDITION_TYPE_BUFFER_USAGE_LOW
,
807 "Low notification received after re-subscription");
808 lttng_notification_destroy(notification
);
812 resume_application();
813 /* Stop consumer to force a high notification */
814 lttng_start_tracing(session_name
);
817 nc_status
= lttng_notification_channel_get_next_notification(
818 notification_channel
, ¬ification
);
819 } while (nc_status
== LTTNG_NOTIFICATION_CHANNEL_STATUS_INTERRUPTED
);
820 ok(nc_status
== LTTNG_NOTIFICATION_CHANNEL_STATUS_OK
&& notification
&&
821 lttng_condition_get_type(lttng_notification_get_condition(
823 LTTNG_CONDITION_TYPE_BUFFER_USAGE_HIGH
,
824 "High notification");
825 lttng_notification_destroy(notification
);
828 suspend_application();
830 /* Resume consumer to allow event consumption */
831 lttng_stop_tracing_no_wait(session_name
);
832 resume_consumer(argv
);
833 wait_data_pending(session_name
);
835 nc_status
= lttng_notification_channel_unsubscribe(
836 notification_channel
, low_condition
);
837 ok(nc_status
== LTTNG_NOTIFICATION_CHANNEL_STATUS_OK
,
838 "Unsubscribe low condition with pending notification");
840 nc_status
= lttng_notification_channel_unsubscribe(
841 notification_channel
, high_condition
);
842 ok(nc_status
== LTTNG_NOTIFICATION_CHANNEL_STATUS_OK
,
843 "Unsubscribe high condition with pending notification");
846 lttng_notification_channel_destroy(notification_channel
);
847 lttng_trigger_destroy(low_trigger
);
848 lttng_trigger_destroy(high_trigger
);
849 lttng_action_destroy(low_action
);
850 lttng_action_destroy(high_action
);
851 lttng_condition_destroy(low_condition
);
852 lttng_condition_destroy(high_condition
);
855 int main(int argc
, const char *argv
[])
858 const char *session_name
= NULL
;
859 const char *channel_name
= NULL
;
860 const char *domain_type_string
= NULL
;
861 enum lttng_domain_type domain_type
= LTTNG_DOMAIN_NONE
;
864 fail("Missing test scenario and/or domain type argument(s)");
868 test_scenario
= atoi(argv
[1]);
869 domain_type_string
= argv
[2];
871 if (!strcmp("LTTNG_DOMAIN_UST", domain_type_string
)) {
872 domain_type
= LTTNG_DOMAIN_UST
;
874 if (!strcmp("LTTNG_DOMAIN_KERNEL", domain_type_string
)) {
875 domain_type
= LTTNG_DOMAIN_KERNEL
;
877 if (domain_type
== LTTNG_DOMAIN_NONE
) {
878 fail("Unknown domain type");
882 switch (test_scenario
) {
886 /* Test cases that need gen-ust-event testapp. */
887 diag("Test basic notification error paths for domain %s",
889 test_invalid_channel_subscription(domain_type
);
894 /* Test cases that need a tracing session enabled. */
898 * Argument 7 and upward are named pipe location for consumerd
901 named_pipe_args_start
= 7;
904 fail("Missing parameter for tests to run %d", argc
);
910 session_name
= argv
[3];
911 channel_name
= argv
[4];
912 app_pid
= (pid_t
) atoi(argv
[5]);
913 app_state_file
= argv
[6];
916 * Test cases are responsible for resuming the app when needed
917 * and making sure it's suspended when returning.
919 suspend_application();
921 test_subscription_twice(session_name
, channel_name
,
924 diag("Test trigger for domain %s with buffer_usage_low condition",
926 test_triggers_buffer_usage_condition(session_name
, channel_name
,
928 LTTNG_CONDITION_TYPE_BUFFER_USAGE_LOW
);
930 diag("Test trigger for domain %s with buffer_usage_high condition",
932 test_triggers_buffer_usage_condition(session_name
, channel_name
,
934 LTTNG_CONDITION_TYPE_BUFFER_USAGE_HIGH
);
936 diag("Test buffer usage notification channel api for domain %s",
938 test_buffer_usage_notification_channel(session_name
, channel_name
,
947 return exit_status();