+error:
+ lttng_action_destroy(tmp_action);
+ lttng_condition_destroy(tmp_condition);
+ lttng_trigger_destroy(tmp_trigger);
+
+end:
+ return ret;
+}
+
+static void test_notification_channel(const char *session_name,
+ const char *channel_name,
+ const enum lttng_domain_type domain_type,
+ const char **argv)
+{
+ int ret = 0;
+ enum lttng_notification_channel_status nc_status;
+
+ struct lttng_action *low_action = NULL;
+ struct lttng_action *high_action = NULL;
+ struct lttng_notification *notification = NULL;
+ struct lttng_notification_channel *notification_channel = NULL;
+ struct lttng_trigger *low_trigger = NULL;
+ struct lttng_trigger *high_trigger = NULL;
+
+ struct lttng_condition *low_condition = NULL;
+ struct lttng_condition *high_condition = NULL;
+
+ const double low_ratio = 0.0;
+ const double high_ratio = 0.90;
+
+ ret = register_buffer_usage_notify_trigger(session_name, channel_name,
+ domain_type, BUFFER_USAGE_TYPE_LOW, low_ratio,
+ &low_condition, &low_action, &low_trigger);
+ if (ret) {
+ fail("Setup error on low trigger registration");