I also ran clang-format on this patch.
No behavior changes intented.
Signed-off-by: Francis Deslauriers <francis.deslauriers@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Change-Id: I7089a288b626e94bed2543f5b13de0537b4d5e4d
Depends-on: lttng-ust: I5a800fc92e588c2a6a0e26282b0ad5f31c044479
- notification_channel = lttng_notification_channel_create(lttng_session_daemon_notification_endpoint);
+ notification_channel = lttng_notification_channel_create(
+ lttng_session_daemon_notification_endpoint);
ok(notification_channel, "Notification channel object creation");
if (!notification_channel) {
goto end;
ok(notification_channel, "Notification channel object creation");
if (!notification_channel) {
goto end;
/* Basic error path check */
nc_status = lttng_notification_channel_subscribe(NULL, NULL);
/* Basic error path check */
nc_status = lttng_notification_channel_subscribe(NULL, NULL);
- ok(nc_status == LTTNG_NOTIFICATION_CHANNEL_STATUS_INVALID, "Notification channel subscription is invalid: NULL, NULL");
+ ok(nc_status == LTTNG_NOTIFICATION_CHANNEL_STATUS_INVALID,
+ "Notification channel subscription is invalid: NULL, NULL");
nc_status = lttng_notification_channel_subscribe(notification_channel, NULL);
nc_status = lttng_notification_channel_subscribe(notification_channel, NULL);
- ok(nc_status == LTTNG_NOTIFICATION_CHANNEL_STATUS_INVALID, "Notification channel subscription is invalid: NON-NULL, NULL");
+ ok(nc_status == LTTNG_NOTIFICATION_CHANNEL_STATUS_INVALID,
+ "Notification channel subscription is invalid: NON-NULL, NULL");
nc_status = lttng_notification_channel_subscribe(NULL, low_condition);
nc_status = lttng_notification_channel_subscribe(NULL, low_condition);
- ok(nc_status == LTTNG_NOTIFICATION_CHANNEL_STATUS_INVALID, "Notification channel subscription is invalid: NULL, NON-NULL");
+ ok(nc_status == LTTNG_NOTIFICATION_CHANNEL_STATUS_INVALID,
+ "Notification channel subscription is invalid: NULL, NON-NULL");
- nc_status = lttng_notification_channel_subscribe(notification_channel, dummy_invalid_condition);
- ok(nc_status == LTTNG_NOTIFICATION_CHANNEL_STATUS_INVALID, "Subscribing to an invalid condition");
+ nc_status = lttng_notification_channel_subscribe(
+ notification_channel, dummy_invalid_condition);
+ ok(nc_status == LTTNG_NOTIFICATION_CHANNEL_STATUS_INVALID,
+ "Subscribing to an invalid condition");
- nc_status = lttng_notification_channel_unsubscribe(notification_channel, dummy_invalid_condition);
- ok(nc_status == LTTNG_NOTIFICATION_CHANNEL_STATUS_INVALID, "Unsubscribing from an invalid condition");
+ nc_status = lttng_notification_channel_unsubscribe(
+ notification_channel, dummy_invalid_condition);
+ ok(nc_status == LTTNG_NOTIFICATION_CHANNEL_STATUS_INVALID,
+ "Unsubscribing from an invalid condition");
- nc_status = lttng_notification_channel_unsubscribe(notification_channel, dummy_condition);
- ok(nc_status == LTTNG_NOTIFICATION_CHANNEL_STATUS_UNKNOWN_CONDITION, "Unsubscribing from a valid unknown condition");
+ nc_status = lttng_notification_channel_unsubscribe(
+ notification_channel, dummy_condition);
+ ok(nc_status == LTTNG_NOTIFICATION_CHANNEL_STATUS_UNKNOWN_CONDITION,
+ "Unsubscribing from a valid unknown condition");
/* Subscribe a valid low condition */
/* Subscribe a valid low condition */
- nc_status = lttng_notification_channel_subscribe(notification_channel, low_condition);
- ok(nc_status == LTTNG_NOTIFICATION_CHANNEL_STATUS_OK, "Subscribe to condition");
+ nc_status = lttng_notification_channel_subscribe(
+ notification_channel, low_condition);
+ ok(nc_status == LTTNG_NOTIFICATION_CHANNEL_STATUS_OK,
+ "Subscribe to condition");
/* Subscribe a valid high condition */
/* Subscribe a valid high condition */
- nc_status = lttng_notification_channel_subscribe(notification_channel, high_condition);
- ok(nc_status == LTTNG_NOTIFICATION_CHANNEL_STATUS_OK, "Subscribe to condition");
+ nc_status = lttng_notification_channel_subscribe(
+ notification_channel, high_condition);
+ ok(nc_status == LTTNG_NOTIFICATION_CHANNEL_STATUS_OK,
+ "Subscribe to condition");
- nc_status = lttng_notification_channel_subscribe(notification_channel, low_condition);
- ok(nc_status == LTTNG_NOTIFICATION_CHANNEL_STATUS_ALREADY_SUBSCRIBED, "Subscribe to a condition for which subscription was already done");
+ nc_status = lttng_notification_channel_subscribe(
+ notification_channel, low_condition);
+ ok(nc_status == LTTNG_NOTIFICATION_CHANNEL_STATUS_ALREADY_SUBSCRIBED,
+ "Subscribe to a condition for which subscription was already done");
- nc_status = lttng_notification_channel_subscribe(notification_channel, high_condition);
- ok(nc_status == LTTNG_NOTIFICATION_CHANNEL_STATUS_ALREADY_SUBSCRIBED, "Subscribe to a condition for which subscription was already done");
+ nc_status = lttng_notification_channel_subscribe(
+ notification_channel, high_condition);
+ ok(nc_status == LTTNG_NOTIFICATION_CHANNEL_STATUS_ALREADY_SUBSCRIBED,
+ "Subscribe to a condition for which subscription was already done");
/* Wait for notification to happen */
stop_consumer(argv);
/* Wait for notification to happen */
stop_consumer(argv);
/* Wait for high notification */
do {
/* Wait for high notification */
do {
- nc_status = lttng_notification_channel_get_next_notification(notification_channel, ¬ification);
+ nc_status = lttng_notification_channel_get_next_notification(
+ notification_channel, ¬ification);
} while (nc_status == LTTNG_NOTIFICATION_CHANNEL_STATUS_INTERRUPTED);
} while (nc_status == LTTNG_NOTIFICATION_CHANNEL_STATUS_INTERRUPTED);
- ok(nc_status == LTTNG_NOTIFICATION_CHANNEL_STATUS_OK
- && notification
- && lttng_condition_get_type(lttng_notification_get_condition(notification)) == LTTNG_CONDITION_TYPE_BUFFER_USAGE_HIGH,
+ ok(nc_status == LTTNG_NOTIFICATION_CHANNEL_STATUS_OK && notification &&
+ lttng_condition_get_type(lttng_notification_get_condition(
+ notification)) ==
+ LTTNG_CONDITION_TYPE_BUFFER_USAGE_HIGH,
"High notification received after intermediary communication");
lttng_notification_destroy(notification);
notification = NULL;
"High notification received after intermediary communication");
lttng_notification_destroy(notification);
notification = NULL;
* waiting for consumption.
*/
* waiting for consumption.
*/
- nc_status = lttng_notification_channel_unsubscribe(notification_channel, low_condition);
- ok(nc_status == LTTNG_NOTIFICATION_CHANNEL_STATUS_OK, "Unsubscribe with pending notification");
+ nc_status = lttng_notification_channel_unsubscribe(
+ notification_channel, low_condition);
+ ok(nc_status == LTTNG_NOTIFICATION_CHANNEL_STATUS_OK,
+ "Unsubscribe with pending notification");
- nc_status = lttng_notification_channel_subscribe(notification_channel, low_condition);
- ok(nc_status == LTTNG_NOTIFICATION_CHANNEL_STATUS_OK, "subscribe with pending notification");
+ nc_status = lttng_notification_channel_subscribe(
+ notification_channel, low_condition);
+ ok(nc_status == LTTNG_NOTIFICATION_CHANNEL_STATUS_OK,
+ "Subscribe with pending notification");
- nc_status = lttng_notification_channel_get_next_notification(notification_channel, ¬ification);
+ nc_status = lttng_notification_channel_get_next_notification(
+ notification_channel, ¬ification);
} while (nc_status == LTTNG_NOTIFICATION_CHANNEL_STATUS_INTERRUPTED);
} while (nc_status == LTTNG_NOTIFICATION_CHANNEL_STATUS_INTERRUPTED);
- ok(nc_status == LTTNG_NOTIFICATION_CHANNEL_STATUS_OK
- && notification
- && lttng_condition_get_type(lttng_notification_get_condition(notification)) == LTTNG_CONDITION_TYPE_BUFFER_USAGE_LOW,
+ ok(nc_status == LTTNG_NOTIFICATION_CHANNEL_STATUS_OK && notification &&
+ lttng_condition_get_type(lttng_notification_get_condition(
+ notification)) ==
+ LTTNG_CONDITION_TYPE_BUFFER_USAGE_LOW,
"Low notification received after intermediary communication");
lttng_notification_destroy(notification);
notification = NULL;
"Low notification received after intermediary communication");
lttng_notification_destroy(notification);
notification = NULL;
lttng_start_tracing(session_name);
do {
lttng_start_tracing(session_name);
do {
- nc_status = lttng_notification_channel_get_next_notification(notification_channel, ¬ification);
+ nc_status = lttng_notification_channel_get_next_notification(
+ notification_channel, ¬ification);
} while (nc_status == LTTNG_NOTIFICATION_CHANNEL_STATUS_INTERRUPTED);
ok(nc_status == LTTNG_NOTIFICATION_CHANNEL_STATUS_OK && notification &&
} while (nc_status == LTTNG_NOTIFICATION_CHANNEL_STATUS_INTERRUPTED);
ok(nc_status == LTTNG_NOTIFICATION_CHANNEL_STATUS_OK && notification &&
- lttng_condition_get_type(lttng_notification_get_condition(notification)) == LTTNG_CONDITION_TYPE_BUFFER_USAGE_HIGH,
+ lttng_condition_get_type(lttng_notification_get_condition(
+ notification)) ==
+ LTTNG_CONDITION_TYPE_BUFFER_USAGE_HIGH,
"High notification received after intermediary communication");
lttng_notification_destroy(notification);
notification = NULL;
"High notification received after intermediary communication");
lttng_notification_destroy(notification);
notification = NULL;
wait_data_pending(session_name);
do {
wait_data_pending(session_name);
do {
- nc_status = lttng_notification_channel_get_next_notification(notification_channel, ¬ification);
+ nc_status = lttng_notification_channel_get_next_notification(
+ notification_channel, ¬ification);
} while (nc_status == LTTNG_NOTIFICATION_CHANNEL_STATUS_INTERRUPTED);
ok(nc_status == LTTNG_NOTIFICATION_CHANNEL_STATUS_OK && notification &&
} while (nc_status == LTTNG_NOTIFICATION_CHANNEL_STATUS_INTERRUPTED);
ok(nc_status == LTTNG_NOTIFICATION_CHANNEL_STATUS_OK && notification &&
- lttng_condition_get_type(lttng_notification_get_condition(notification)) == LTTNG_CONDITION_TYPE_BUFFER_USAGE_LOW,
+ lttng_condition_get_type(lttng_notification_get_condition(
+ notification)) ==
+ LTTNG_CONDITION_TYPE_BUFFER_USAGE_LOW,
"Low notification received after re-subscription");
lttng_notification_destroy(notification);
notification = NULL;
"Low notification received after re-subscription");
lttng_notification_destroy(notification);
notification = NULL;
lttng_start_tracing(session_name);
do {
lttng_start_tracing(session_name);
do {
- nc_status = lttng_notification_channel_get_next_notification(notification_channel, ¬ification);
+ nc_status = lttng_notification_channel_get_next_notification(
+ notification_channel, ¬ification);
} while (nc_status == LTTNG_NOTIFICATION_CHANNEL_STATUS_INTERRUPTED);
ok(nc_status == LTTNG_NOTIFICATION_CHANNEL_STATUS_OK && notification &&
} while (nc_status == LTTNG_NOTIFICATION_CHANNEL_STATUS_INTERRUPTED);
ok(nc_status == LTTNG_NOTIFICATION_CHANNEL_STATUS_OK && notification &&
- lttng_condition_get_type(lttng_notification_get_condition(notification)) == LTTNG_CONDITION_TYPE_BUFFER_USAGE_HIGH,
+ lttng_condition_get_type(lttng_notification_get_condition(
+ notification)) ==
+ LTTNG_CONDITION_TYPE_BUFFER_USAGE_HIGH,
"High notification");
lttng_notification_destroy(notification);
notification = NULL;
"High notification");
lttng_notification_destroy(notification);
notification = NULL;
resume_consumer(argv);
wait_data_pending(session_name);
resume_consumer(argv);
wait_data_pending(session_name);
- nc_status = lttng_notification_channel_unsubscribe(notification_channel, low_condition);
- ok(nc_status == LTTNG_NOTIFICATION_CHANNEL_STATUS_OK, "Unsubscribe low condition with pending notification");
- nc_status = lttng_notification_channel_unsubscribe(notification_channel, high_condition);
- ok(nc_status == LTTNG_NOTIFICATION_CHANNEL_STATUS_OK, "Unsubscribe high condition with pending notification");
+ nc_status = lttng_notification_channel_unsubscribe(
+ notification_channel, low_condition);
+ ok(nc_status == LTTNG_NOTIFICATION_CHANNEL_STATUS_OK,
+ "Unsubscribe low condition with pending notification");
+
+ nc_status = lttng_notification_channel_unsubscribe(
+ notification_channel, high_condition);
+ ok(nc_status == LTTNG_NOTIFICATION_CHANNEL_STATUS_OK,
+ "Unsubscribe high condition with pending notification");
end:
lttng_notification_channel_destroy(notification_channel);
end:
lttng_notification_channel_destroy(notification_channel);