action list: missing renames from previous name "group"
authorJérémie Galarneau <jeremie.galarneau@efficios.com>
Thu, 22 Apr 2021 18:56:59 +0000 (14:56 -0400)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Thu, 22 Apr 2021 18:56:59 +0000 (14:56 -0400)
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Change-Id: I9b7379d5f2ed66677666365cf5cf0b98c774f219

include/lttng/action/action.h
src/bin/lttng-sessiond/action-executor.c
src/bin/lttng-sessiond/notification-thread-events.c
src/bin/lttng/commands/list_triggers.c
src/common/actions/action.c
src/common/actions/list.c
src/common/error-query.c
tests/regression/tools/trigger/utils/notification-client.c

index be7e397d0629e6f94091ac4a0eccaf1061366d2b..cd3857d7222d7f1d8f780cbf473dce43e550c3da 100644 (file)
@@ -21,7 +21,7 @@ enum lttng_action_type {
        LTTNG_ACTION_TYPE_STOP_SESSION = 2,
        LTTNG_ACTION_TYPE_ROTATE_SESSION = 3,
        LTTNG_ACTION_TYPE_SNAPSHOT_SESSION = 4,
-       LTTNG_ACTION_TYPE_GROUP = 5,
+       LTTNG_ACTION_TYPE_LIST = 5,
 };
 
 enum lttng_action_status {
index 9a89865a930c142e395f134d6fb23303b3d3508d..79c8677143ea3a829cb0a0581c3f2e513de0db33 100644 (file)
@@ -135,7 +135,7 @@ static int action_executor_snapshot_session_handler(
                struct action_executor *executor,
                const struct action_work_item *,
                struct action_work_subitem *);
-static int action_executor_group_handler(struct action_executor *executor,
+static int action_executor_list_handler(struct action_executor *executor,
                const struct action_work_item *,
                struct action_work_subitem *);
 static int action_executor_generic_handler(struct action_executor *executor,
@@ -148,7 +148,7 @@ static const action_executor_handler action_executors[] = {
        [LTTNG_ACTION_TYPE_STOP_SESSION] = action_executor_stop_session_handler,
        [LTTNG_ACTION_TYPE_ROTATE_SESSION] = action_executor_rotate_session_handler,
        [LTTNG_ACTION_TYPE_SNAPSHOT_SESSION] = action_executor_snapshot_session_handler,
-       [LTTNG_ACTION_TYPE_GROUP] = action_executor_group_handler,
+       [LTTNG_ACTION_TYPE_LIST] = action_executor_list_handler,
 };
 
 /* Forward declaration */
@@ -660,11 +660,11 @@ end:
        return ret;
 }
 
-static int action_executor_group_handler(struct action_executor *executor,
+static int action_executor_list_handler(struct action_executor *executor,
                const struct action_work_item *work_item,
                struct action_work_subitem *item)
 {
-       ERR("Execution of a group action by the action executor should never occur");
+       ERR("Execution of a list action by the action executor should never occur");
        abort();
 }
 
@@ -1010,7 +1010,7 @@ static int add_action_to_subitem_array(struct lttng_action *action,
        assert(action);
        assert(subitems);
 
-       if (type == LTTNG_ACTION_TYPE_GROUP) {
+       if (type == LTTNG_ACTION_TYPE_LIST) {
                unsigned int count, i;
 
                status = lttng_action_list_get_count(action, &count);
@@ -1031,7 +1031,7 @@ static int add_action_to_subitem_array(struct lttng_action *action,
 
                /*
                 * Go directly to the end since there is no need to add the
-                * group action by itself to the subitems array.
+                * list action by itself to the subitems array.
                 */
                goto end;
        }
@@ -1060,7 +1060,7 @@ static int add_action_to_subitem_array(struct lttng_action *action,
                                action, &session_name);
                assert(status == LTTNG_ACTION_STATUS_OK);
                break;
-       case LTTNG_ACTION_TYPE_GROUP:
+       case LTTNG_ACTION_TYPE_LIST:
        case LTTNG_ACTION_TYPE_UNKNOWN:
                /* Fallthrough */
        default:
index c9c21bc7225df72ee21ad8a74d33f101dd878aca..c9847d032b372f2ad5b8cea23fc21a0679da5e3f 100644 (file)
@@ -2487,7 +2487,7 @@ bool is_trigger_action_notify(const struct lttng_trigger *trigger)
        if (action_type == LTTNG_ACTION_TYPE_NOTIFY) {
                is_notify = true;
                goto end;
-       } else if (action_type != LTTNG_ACTION_TYPE_GROUP) {
+       } else if (action_type != LTTNG_ACTION_TYPE_LIST) {
                goto end;
        }
 
@@ -2603,7 +2603,7 @@ enum lttng_error_code setup_tracer_notifier(
                        trigger, &error_counter_index);
        if (error_accounting_status != EVENT_NOTIFIER_ERROR_ACCOUNTING_STATUS_OK) {
                if (error_accounting_status == EVENT_NOTIFIER_ERROR_ACCOUNTING_STATUS_NO_INDEX_AVAILABLE) {
-                       DBG("Trigger group error accounting counter full.");
+                       DBG("Trigger list error accounting counter full.");
                        ret = LTTNG_ERR_EVENT_NOTIFIER_ERROR_ACCOUNTING_FULL;
                } else {
                        ERR("Error registering trigger for error accounting");
index bb90e7b6e196f44d822b52d808b792d64c2b9006..7c8bd7f883f6bd304656958a81ec570c31ebf230 100644 (file)
@@ -637,7 +637,7 @@ void print_one_action(const struct lttng_trigger *trigger,
        const char *value;
 
        action_type = lttng_action_get_type(action);
-       assert(action_type != LTTNG_ACTION_TYPE_GROUP);
+       assert(action_type != LTTNG_ACTION_TYPE_LIST);
 
        switch (action_type) {
        case LTTNG_ACTION_TYPE_NOTIFY:
@@ -939,7 +939,7 @@ void print_one_trigger(const struct lttng_trigger *trigger)
 
        action = lttng_trigger_get_const_action(trigger);
        action_type = lttng_action_get_type(action);
-       if (action_type == LTTNG_ACTION_TYPE_GROUP) {
+       if (action_type == LTTNG_ACTION_TYPE_LIST) {
                unsigned int count, i;
                enum lttng_action_status action_status;
 
index f9236c87811e1d3241b22b6bfbe60117102a4bd8..498e41f79405fb2fe71488f91c29b4cdec1ef907 100644 (file)
@@ -23,8 +23,8 @@ const char *lttng_action_type_string(enum lttng_action_type action_type)
        switch (action_type) {
        case LTTNG_ACTION_TYPE_UNKNOWN:
                return "UNKNOWN";
-       case LTTNG_ACTION_TYPE_GROUP:
-               return "GROUP";
+       case LTTNG_ACTION_TYPE_LIST:
+               return "LIST";
        case LTTNG_ACTION_TYPE_NOTIFY:
                return "NOTIFY";
        case LTTNG_ACTION_TYPE_ROTATE_SESSION:
@@ -191,7 +191,7 @@ ssize_t lttng_action_create_from_payload(struct lttng_payload_view *view,
                create_from_payload_cb =
                                lttng_action_stop_session_create_from_payload;
                break;
-       case LTTNG_ACTION_TYPE_GROUP:
+       case LTTNG_ACTION_TYPE_LIST:
                create_from_payload_cb = lttng_action_list_create_from_payload;
                break;
        default:
index 4c325df84d68447cb34dfcf32d8eb08941db3c1a..9b2d129b68a1e428ac4fb81f348f750d8e78fdee 100644 (file)
@@ -15,8 +15,8 @@
 #include <lttng/action/list-internal.h>
 #include <lttng/action/list.h>
 
-#define IS_GROUP_ACTION(action) \
-       (lttng_action_get_type(action) == LTTNG_ACTION_TYPE_GROUP)
+#define IS_LIST_ACTION(action) \
+       (lttng_action_get_type(action) == LTTNG_ACTION_TYPE_LIST)
 
 struct lttng_action_list {
        struct lttng_action parent;
@@ -63,7 +63,7 @@ static bool lttng_action_list_validate(struct lttng_action *action)
        struct lttng_action_list *action_list;
        bool valid;
 
-       assert(IS_GROUP_ACTION(action));
+       assert(IS_LIST_ACTION(action));
 
        action_list = action_list_from_action(action);
 
@@ -138,7 +138,7 @@ static int lttng_action_list_serialize(
 
        assert(action);
        assert(payload);
-       assert(IS_GROUP_ACTION(action));
+       assert(IS_LIST_ACTION(action));
 
        action_list = action_list_from_action(action);
 
@@ -196,13 +196,13 @@ ssize_t lttng_action_list_create_from_payload(
 {
        ssize_t consumed_len;
        const struct lttng_action_list_comm *comm;
-       struct lttng_action *group;
+       struct lttng_action *list;
        struct lttng_action *child_action = NULL;
        enum lttng_action_status status;
        size_t i;
 
-       group = lttng_action_list_create();
-       if (!group) {
+       list = lttng_action_list_create();
+       if (!list) {
                consumed_len = -1;
                goto end;
        }
@@ -229,7 +229,7 @@ ssize_t lttng_action_list_create_from_payload(
                        goto end;
                }
 
-               status = lttng_action_list_add_action(group, child_action);
+               status = lttng_action_list_add_action(list, child_action);
                if (status != LTTNG_ACTION_STATUS_OK) {
                        consumed_len = -1;
                        goto end;
@@ -242,11 +242,11 @@ ssize_t lttng_action_list_create_from_payload(
                consumed_len += consumed_len_child;
        }
 
-       *p_action = group;
-       group = NULL;
+       *p_action = list;
+       list = NULL;
 
 end:
-       lttng_action_list_destroy(group);
+       lttng_action_list_destroy(list);
        return consumed_len;
 }
 
@@ -256,8 +256,8 @@ static enum lttng_action_status lttng_action_list_add_error_query_results(
 {
        unsigned int i, count;
        enum lttng_action_status action_status;
-       const struct lttng_action_list *group =
-                       container_of(action, typeof(*group), parent);
+       const struct lttng_action_list *list =
+                       container_of(action, typeof(*list), parent);
 
        action_status = lttng_action_list_get_count(action, &count);
        if (action_status != LTTNG_ACTION_STATUS_OK) {
@@ -291,7 +291,7 @@ struct lttng_action *lttng_action_list_create(void)
 
        action = &action_list->parent;
 
-       lttng_action_init(action, LTTNG_ACTION_TYPE_GROUP,
+       lttng_action_init(action, LTTNG_ACTION_TYPE_LIST,
                        lttng_action_list_validate,
                        lttng_action_list_serialize,
                        lttng_action_list_is_equal, lttng_action_list_destroy,
@@ -306,27 +306,27 @@ end:
 }
 
 enum lttng_action_status lttng_action_list_add_action(
-               struct lttng_action *group, struct lttng_action *action)
+               struct lttng_action *list, struct lttng_action *action)
 {
        struct lttng_action_list *action_list;
        enum lttng_action_status status;
        int ret;
 
-       if (!group || !IS_GROUP_ACTION(group) || !action) {
+       if (!list || !IS_LIST_ACTION(list) || !action) {
                status = LTTNG_ACTION_STATUS_INVALID;
                goto end;
        }
 
        /*
-        * Don't allow adding groups in groups for now, since we're afraid of
+        * Don't allow adding lists in lists for now, since we're afraid of
         * cycles.
         */
-       if (IS_GROUP_ACTION(action)) {
+       if (IS_LIST_ACTION(action)) {
                status = LTTNG_ACTION_STATUS_INVALID;
                goto end;
        }
 
-       action_list = action_list_from_action(group);
+       action_list = action_list_from_action(list);
 
        ret = lttng_dynamic_pointer_array_add_pointer(&action_list->actions,
                        action);
@@ -343,38 +343,38 @@ end:
 }
 
 enum lttng_action_status lttng_action_list_get_count(
-               const struct lttng_action *group, unsigned int *count)
+               const struct lttng_action *list, unsigned int *count)
 {
        const struct lttng_action_list *action_list;
        enum lttng_action_status status = LTTNG_ACTION_STATUS_OK;
 
-       if (!group || !IS_GROUP_ACTION(group)) {
+       if (!list || !IS_LIST_ACTION(list)) {
                status = LTTNG_ACTION_STATUS_INVALID;
                *count = 0;
                goto end;
        }
 
-       action_list = action_list_from_action_const(group);
+       action_list = action_list_from_action_const(list);
        *count = lttng_dynamic_pointer_array_get_count(&action_list->actions);
 end:
        return status;
 }
 
 const struct lttng_action *lttng_action_list_get_at_index(
-               const struct lttng_action *group, unsigned int index)
+               const struct lttng_action *list, unsigned int index)
 {
-       return lttng_action_list_borrow_mutable_at_index(group, index);
+       return lttng_action_list_borrow_mutable_at_index(list, index);
 }
 
 LTTNG_HIDDEN
 struct lttng_action *lttng_action_list_borrow_mutable_at_index(
-               const struct lttng_action *group, unsigned int index)
+               const struct lttng_action *list, unsigned int index)
 {
        unsigned int count;
        const struct lttng_action_list *action_list;
        struct lttng_action *action = NULL;
 
-       if (lttng_action_list_get_count(group, &count) !=
+       if (lttng_action_list_get_count(list, &count) !=
                        LTTNG_ACTION_STATUS_OK) {
                goto end;
        }
@@ -383,7 +383,7 @@ struct lttng_action *lttng_action_list_borrow_mutable_at_index(
                goto end;
        }
 
-       action_list = action_list_from_action_const(group);
+       action_list = action_list_from_action_const(list);
        action = lttng_dynamic_pointer_array_get_pointer(&action_list->actions,
                        index);
 end:
index 8bee203977ddec1c27a6b399f53b78a4e6ceb479..01ed1ef216e9f3db5c1cccd318099f4f2b188ac6 100644 (file)
@@ -47,9 +47,9 @@ struct lttng_error_query_action {
        struct lttng_trigger *trigger;
        /*
         * Index of the target action. Since action lists can't be nested,
-        * the targetted action is the top-level group if the action_index is
+        * the targetted action is the top-level list if the action_index is
         * unset. Otherwise, the index refers to the index within the top-level
-        * group.
+        * list.
         */
        LTTNG_OPTIONAL(unsigned int) action_index;
 };
@@ -150,7 +150,7 @@ extern struct lttng_error_query *lttng_error_query_action_create(
         */
        if (action != trigger->action &&
                        lttng_action_get_type(trigger->action) ==
-                                       LTTNG_ACTION_TYPE_GROUP) {
+                                       LTTNG_ACTION_TYPE_LIST) {
                unsigned int i, action_list_count;
                enum lttng_action_status action_status;
 
@@ -178,7 +178,7 @@ extern struct lttng_error_query *lttng_error_query_action_create(
                }
        } else {
                /*
-                * Trigger action is not a group and not equal to the target
+                * Trigger action is not a list and not equal to the target
                 * action; invalid action provided.
                 */
                goto error;
@@ -681,8 +681,8 @@ struct lttng_action *lttng_error_query_action_borrow_action_target(
                target_action = trigger_action;
        } else {
                if (lttng_action_get_type(trigger_action) !=
-                               LTTNG_ACTION_TYPE_GROUP) {
-                       ERR("Invalid action error query target index: trigger action is not a group");
+                               LTTNG_ACTION_TYPE_LIST) {
+                       ERR("Invalid action error query target index: trigger action is not a list");
                        goto end;
                }
 
@@ -827,7 +827,7 @@ ssize_t lttng_error_query_create_from_payload(struct lttng_payload_view *view,
                        target_action = trigger->action;
                } else {
                        if (lttng_action_get_type(trigger->action) !=
-                                       LTTNG_ACTION_TYPE_GROUP) {
+                                       LTTNG_ACTION_TYPE_LIST) {
                                used_size = -1;
                                goto end;
                        }
index 98c00d6f7a77303f269c00cf9bed98601021b1c6..3d8aec46ddbd8b7feb5cf90dbc75a43298384bfc 100644 (file)
@@ -181,7 +181,7 @@ int main(int argc, char **argv)
                                continue;
                        }
                }
-               if (!((action_type == LTTNG_ACTION_TYPE_GROUP &&
+               if (!((action_type == LTTNG_ACTION_TYPE_LIST &&
                                      action_list_contains_notify(action)) ||
                                    action_type == LTTNG_ACTION_TYPE_NOTIFY)) {
                        /* "The action of trigger is not notify, skipping. */
This page took 0.033938 seconds and 4 git commands to generate.