- ret = setup_buffer_usage_condition(high_condition, "high_condition",
- session_name, channel_name, domain_type);
+ *condition = tmp_condition;
+ *trigger = tmp_trigger;
+ *action = tmp_action;
+ goto end;
+
+error:
+ lttng_action_destroy(tmp_action);
+ lttng_condition_destroy(tmp_condition);
+ lttng_trigger_destroy(tmp_trigger);
+
+end:
+ return ret;
+}
+
+static void test_subscription_twice(const char *session_name,
+ const char *channel_name,
+ const enum lttng_domain_type domain_type)
+{
+ int ret = 0;
+ enum lttng_notification_channel_status nc_status;
+
+ struct lttng_action *action = NULL;
+ struct lttng_notification_channel *notification_channel = NULL;
+ struct lttng_trigger *trigger = NULL;
+
+ struct lttng_condition *condition = NULL;
+
+ ret = register_buffer_usage_notify_trigger(session_name, channel_name,
+ domain_type, BUFFER_USAGE_TYPE_LOW, 0.99, &condition,
+ &action, &trigger);