From: Jérémie Galarneau Date: Wed, 9 Jun 2021 21:58:45 +0000 (-0400) Subject: Add condition-targeting error query X-Git-Tag: v2.13.0-rc3~49 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=8ce7c93a4e83444a093f00aa7ed04c75233cd7a0;p=lttng-tools.git Add condition-targeting error query Notifications discarded by the tracers are reported at the level of a trigger. As those errors are specific to triggers with an "event-rule matches" condition, they should be reported through a condition-specific error query. Note that a condition error query is created from a trigger: there is no ambiguity since, unlike actions, conditions cannot be nested. Given the proximity of the final 2.13 release, the code which populated trigger error query results is simply used to populate the condition error query results when the condition is of type "event-rule matches". No trigger-scope errors can be reported for the moment. However, such error reports will be added in the future. Signed-off-by: Jérémie Galarneau Change-Id: Ie1ac3668142041beb6fd61574ccef506707c55b2 --- diff --git a/include/lttng/error-query-internal.h b/include/lttng/error-query-internal.h index b5578d44d..5de3c43f9 100644 --- a/include/lttng/error-query-internal.h +++ b/include/lttng/error-query-internal.h @@ -17,6 +17,7 @@ enum lttng_error_query_target_type { LTTNG_ERROR_QUERY_TARGET_TYPE_TRIGGER, + LTTNG_ERROR_QUERY_TARGET_TYPE_CONDITION, LTTNG_ERROR_QUERY_TARGET_TYPE_ACTION, }; @@ -28,6 +29,10 @@ LTTNG_HIDDEN const struct lttng_trigger *lttng_error_query_trigger_borrow_target( const struct lttng_error_query *query); +LTTNG_HIDDEN +const struct lttng_trigger *lttng_error_query_condition_borrow_target( + const struct lttng_error_query *query); + LTTNG_HIDDEN const struct lttng_trigger *lttng_error_query_action_borrow_trigger_target( const struct lttng_error_query *query); diff --git a/include/lttng/error-query.h b/include/lttng/error-query.h index 8a5945ae9..ff0f0ae99 100644 --- a/include/lttng/error-query.h +++ b/include/lttng/error-query.h @@ -61,6 +61,10 @@ enum lttng_error_query_results_status { extern struct lttng_error_query *lttng_error_query_trigger_create( const struct lttng_trigger *trigger); +/* Create an error query targetting a trigger's condition object. */ +extern struct lttng_error_query *lttng_error_query_condition_create( + const struct lttng_trigger *trigger); + /* * Create an error query targetting an action object. * diff --git a/include/lttng/trigger/trigger-internal.h b/include/lttng/trigger/trigger-internal.h index c58787ceb..02dcf5335 100644 --- a/include/lttng/trigger/trigger-internal.h +++ b/include/lttng/trigger/trigger-internal.h @@ -237,6 +237,11 @@ enum lttng_trigger_status lttng_trigger_add_error_results( const struct lttng_trigger *trigger, struct lttng_error_query_results *results); +LTTNG_HIDDEN +enum lttng_trigger_status lttng_trigger_condition_add_error_results( + const struct lttng_trigger *trigger, + struct lttng_error_query_results *results); + LTTNG_HIDDEN enum lttng_trigger_status lttng_trigger_add_action_error_query_results( struct lttng_trigger *trigger, diff --git a/src/bin/lttng-sessiond/cmd.c b/src/bin/lttng-sessiond/cmd.c index 9ae4d1974..7715e1452 100644 --- a/src/bin/lttng-sessiond/cmd.c +++ b/src/bin/lttng-sessiond/cmd.c @@ -4662,7 +4662,7 @@ enum lttng_error_code cmd_execute_error_query(const struct lttng_credentials *cm { enum lttng_error_code ret_code; const struct lttng_trigger *query_target_trigger; - struct lttng_action *query_target_action = NULL; + const struct lttng_action *query_target_action = NULL; struct lttng_trigger *matching_trigger = NULL; const char *trigger_name; uid_t trigger_owner; @@ -4673,6 +4673,10 @@ enum lttng_error_code cmd_execute_error_query(const struct lttng_credentials *cm case LTTNG_ERROR_QUERY_TARGET_TYPE_TRIGGER: query_target_trigger = lttng_error_query_trigger_borrow_target(query); break; + case LTTNG_ERROR_QUERY_TARGET_TYPE_CONDITION: + query_target_trigger = + lttng_error_query_condition_borrow_target(query); + break; case LTTNG_ERROR_QUERY_TARGET_TYPE_ACTION: query_target_trigger = lttng_error_query_action_borrow_trigger_target( query); @@ -4748,6 +4752,21 @@ enum lttng_error_code cmd_execute_error_query(const struct lttng_credentials *cm } break; + case LTTNG_ERROR_QUERY_TARGET_TYPE_CONDITION: + { + trigger_status = lttng_trigger_condition_add_error_results( + matching_trigger, results); + + switch (trigger_status) { + case LTTNG_TRIGGER_STATUS_OK: + break; + default: + ret_code = LTTNG_ERR_UNK; + goto end; + } + + break; + } case LTTNG_ERROR_QUERY_TARGET_TYPE_ACTION: { const enum lttng_action_status action_status = diff --git a/src/bin/lttng-sessiond/trigger-error-query.c b/src/bin/lttng-sessiond/trigger-error-query.c index 4c464004d..ac076b21e 100644 --- a/src/bin/lttng-sessiond/trigger-error-query.c +++ b/src/bin/lttng-sessiond/trigger-error-query.c @@ -14,6 +14,14 @@ LTTNG_HIDDEN enum lttng_trigger_status lttng_trigger_add_error_results( const struct lttng_trigger *trigger, struct lttng_error_query_results *results) +{ + return LTTNG_TRIGGER_STATUS_OK; +} + +LTTNG_HIDDEN +enum lttng_trigger_status lttng_trigger_condition_add_error_results( + const struct lttng_trigger *trigger, + struct lttng_error_query_results *results) { enum lttng_trigger_status status; uint64_t discarded_tracer_messages_count; @@ -29,7 +37,12 @@ enum lttng_trigger_status lttng_trigger_add_error_results( &trigger_owner); assert(status == LTTNG_TRIGGER_STATUS_OK); - /* Only add discarded tracer messages count for applicable triggers. */ + /* + * Only add discarded tracer messages count for applicable conditions. + * As of 2.13, only "event rule matches" conditions can generate + * reportable errors hence why this function is very specific to this + * condition type. + */ if (!lttng_trigger_needs_tracer_notifier(trigger)) { status = LTTNG_TRIGGER_STATUS_OK; goto end; diff --git a/src/bin/lttng/commands/list_triggers.c b/src/bin/lttng/commands/list_triggers.c index 929d9a46b..a456afc89 100644 --- a/src/bin/lttng/commands/list_triggers.c +++ b/src/bin/lttng/commands/list_triggers.c @@ -29,6 +29,8 @@ static const char help_msg[] = ; #endif +#define INDENTATION_LEVEL_STR " " + typedef enum lttng_event_rule_status (*event_rule_logging_get_name_pattern)( const struct lttng_event_rule *rule, const char **pattern); typedef enum lttng_event_rule_status (*event_rule_logging_get_filter)( @@ -638,6 +640,79 @@ void print_one_event_expr(const struct lttng_event_expr *event_expr) } } +static +void print_indentation(unsigned int indentation_level) +{ + unsigned int i; + + for (i = 0; i < indentation_level; i++) { + _MSG(INDENTATION_LEVEL_STR); + } +} + +static +void print_error_query_results(struct lttng_error_query_results *results, + unsigned int base_indentation_level) +{ + unsigned int i, count, printed_errors_count = 0; + enum lttng_error_query_results_status results_status; + + results_status = lttng_error_query_results_get_count(results, &count); + assert(results_status == LTTNG_ERROR_QUERY_RESULTS_STATUS_OK); + + assert(results); + + print_indentation(base_indentation_level); + _MSG("errors:"); + + for (i = 0; i < count; i++) { + const struct lttng_error_query_result *result; + enum lttng_error_query_result_status result_status; + const char *result_name; + const char *result_description; + uint64_t result_value; + + results_status = lttng_error_query_results_get_result( + results, &result, i); + assert(results_status == LTTNG_ERROR_QUERY_RESULTS_STATUS_OK); + + result_status = lttng_error_query_result_get_name( + result, &result_name); + assert(result_status == LTTNG_ERROR_QUERY_RESULT_STATUS_OK); + result_status = lttng_error_query_result_get_description( + result, &result_description); + assert(result_status == LTTNG_ERROR_QUERY_RESULT_STATUS_OK); + + + if (lttng_error_query_result_get_type(result) == + LTTNG_ERROR_QUERY_RESULT_TYPE_COUNTER) { + result_status = lttng_error_query_result_counter_get_value( + result, &result_value); + assert(result_status == + LTTNG_ERROR_QUERY_RESULT_STATUS_OK); + if (result_value == 0) { + continue; + } + + MSG(""); + print_indentation(base_indentation_level + 1); + + _MSG("%s: %" PRIu64, result_name, result_value); + printed_errors_count++; + } else { + MSG(""); + print_indentation(base_indentation_level + 1); + _MSG("Unknown error query result type for result '%s' (%s)", + result_name, result_description); + continue; + } + } + + if (printed_errors_count == 0) { + _MSG(" none"); + } +} + static void print_condition_event_rule_matches( const struct lttng_condition *condition) { @@ -676,9 +751,7 @@ static void print_action_errors(const struct lttng_trigger *trigger, const uint64_t *action_path_indexes, size_t action_path_length) { - unsigned int i, count, printed_errors_count = 0; enum lttng_error_code error_query_ret; - enum lttng_error_query_results_status results_status; struct lttng_error_query_results *results = NULL; const char *trigger_name; uid_t trigger_uid; @@ -710,53 +783,7 @@ static void print_action_errors(const struct lttng_trigger *trigger, goto end; } - results_status = lttng_error_query_results_get_count(results, &count); - assert(results_status == LTTNG_ERROR_QUERY_RESULTS_STATUS_OK); - - _MSG(" errors:"); - - for (i = 0; i < count; i++) { - const struct lttng_error_query_result *result; - enum lttng_error_query_result_status result_status; - const char *result_name; - const char *result_description; - uint64_t result_value; - - results_status = lttng_error_query_results_get_result( - results, &result, i); - assert(results_status == LTTNG_ERROR_QUERY_RESULTS_STATUS_OK); - - result_status = lttng_error_query_result_get_name( - result, &result_name); - assert(result_status == LTTNG_ERROR_QUERY_RESULT_STATUS_OK); - result_status = lttng_error_query_result_get_description( - result, &result_description); - assert(result_status == LTTNG_ERROR_QUERY_RESULT_STATUS_OK); - - if (lttng_error_query_result_get_type(result) == - LTTNG_ERROR_QUERY_RESULT_TYPE_COUNTER) { - result_status = lttng_error_query_result_counter_get_value( - result, &result_value); - assert(result_status == - LTTNG_ERROR_QUERY_RESULT_STATUS_OK); - if (result_value == 0) { - continue; - } - - MSG(""); - _MSG(" %s: %" PRIu64, result_name, - result_value); - printed_errors_count++; - } else { - _MSG(" Unknown error query result type for result '%s' (%s)", - result_name, result_description); - continue; - } - } - - if (printed_errors_count == 0) { - _MSG(" none"); - } + print_error_query_results(results, 3); end: MSG(""); @@ -945,9 +972,7 @@ end: static void print_trigger_errors(const struct lttng_trigger *trigger) { - unsigned int i, count, printed_errors_count = 0; enum lttng_error_code error_query_ret; - enum lttng_error_query_results_status results_status; struct lttng_error_query_results *results = NULL; enum lttng_trigger_status trigger_status; const char *trigger_name; @@ -974,53 +999,45 @@ void print_trigger_errors(const struct lttng_trigger *trigger) goto end; } - results_status = lttng_error_query_results_get_count(results, &count); - assert(results_status == LTTNG_ERROR_QUERY_RESULTS_STATUS_OK); - - _MSG(" errors:"); + print_error_query_results(results, 1); - for (i = 0; i < count; i++) { - const struct lttng_error_query_result *result; - enum lttng_error_query_result_status result_status; - const char *result_name; - const char *result_description; - uint64_t result_value; +end: + MSG(""); + lttng_error_query_destroy(query); + lttng_error_query_results_destroy(results); +} - results_status = lttng_error_query_results_get_result( - results, &result, i); - assert(results_status == LTTNG_ERROR_QUERY_RESULTS_STATUS_OK); +static +void print_condition_errors(const struct lttng_trigger *trigger) +{ + enum lttng_error_code error_query_ret; + struct lttng_error_query_results *results = NULL; + enum lttng_trigger_status trigger_status; + const char *trigger_name; + uid_t trigger_uid; + struct lttng_error_query *query = + lttng_error_query_condition_create(trigger); - result_status = lttng_error_query_result_get_name( - result, &result_name); - assert(result_status == LTTNG_ERROR_QUERY_RESULT_STATUS_OK); - result_status = lttng_error_query_result_get_description( - result, &result_description); - assert(result_status == LTTNG_ERROR_QUERY_RESULT_STATUS_OK); + assert(query); + /* + * Anonymous triggers are not listed; this would be an internal error. + */ + trigger_status = lttng_trigger_get_name(trigger, &trigger_name); + assert(trigger_status == LTTNG_TRIGGER_STATUS_OK); - if (lttng_error_query_result_get_type(result) == - LTTNG_ERROR_QUERY_RESULT_TYPE_COUNTER) { - result_status = lttng_error_query_result_counter_get_value( - result, &result_value); - assert(result_status == - LTTNG_ERROR_QUERY_RESULT_STATUS_OK); - if (result_value == 0) { - continue; - } + trigger_status = lttng_trigger_get_owner_uid(trigger, &trigger_uid); + assert(trigger_status == LTTNG_TRIGGER_STATUS_OK); - MSG(""); - _MSG(" %s: %" PRIu64, result_name, - result_value); - printed_errors_count++; - } else { - _MSG(" Unknown error query result type for result '%s' (%s)", - result_name, result_description); - continue; - } + error_query_ret = lttng_error_query_execute( + query, lttng_session_daemon_command_endpoint, &results); + if (error_query_ret != LTTNG_OK) { + ERR("Failed to query errors of condition of trigger '%s' (owner uid: %d): %s", + trigger_name, (int) trigger_uid, + lttng_strerror(-error_query_ret)); + goto end; } - if (printed_errors_count == 0) { - _MSG(" none"); - } + print_error_query_results(results, 2); end: MSG(""); @@ -1078,6 +1095,8 @@ void print_one_trigger(const struct lttng_trigger *trigger) abort(); } + print_condition_errors(trigger); + action = lttng_trigger_get_const_action(trigger); action_type = lttng_action_get_type(action); if (action_type == LTTNG_ACTION_TYPE_LIST) { diff --git a/src/common/error-query.c b/src/common/error-query.c index 0be04fa13..38f47c224 100644 --- a/src/common/error-query.c +++ b/src/common/error-query.c @@ -36,6 +36,12 @@ struct lttng_error_query_trigger { struct lttng_trigger *trigger; }; +struct lttng_error_query_condition { + struct lttng_error_query parent; + /* Mutable only because of the reference count. */ + struct lttng_trigger *trigger; +}; + struct lttng_error_query_action { struct lttng_error_query parent; /* Mutable only because of the reference count. */ @@ -111,6 +117,37 @@ end: return query ? &query->parent : NULL; } +struct lttng_error_query *lttng_error_query_condition_create( + const struct lttng_trigger *trigger) +{ + struct lttng_error_query_condition *query = NULL; + struct lttng_trigger *trigger_copy = NULL; + + if (!trigger) { + goto end; + } + + trigger_copy = lttng_trigger_copy(trigger); + if (!trigger_copy) { + goto end; + } + + query = zmalloc(sizeof(*query)); + if (!query) { + PERROR("Failed to allocate condition error query"); + goto error; + } + + query->parent.target_type = LTTNG_ERROR_QUERY_TARGET_TYPE_CONDITION; + query->trigger = trigger_copy; + trigger_copy = NULL; + +error: + lttng_trigger_put(trigger_copy); +end: + return query ? &query->parent : NULL; +} + static struct lttng_action *get_trigger_action_from_path( struct lttng_trigger *trigger, @@ -605,6 +642,28 @@ end: return ret; } +static +int lttng_error_query_condition_serialize(const struct lttng_error_query *query, + struct lttng_payload *payload) +{ + int ret; + const struct lttng_error_query_condition *query_trigger = + container_of(query, typeof(*query_trigger), parent); + + if (!lttng_trigger_validate(query_trigger->trigger)) { + ret = -1; + goto end; + } + + ret = lttng_trigger_serialize(query_trigger->trigger, payload); + if (ret) { + goto end; + } + +end: + return ret; +} + static int lttng_error_query_action_serialize(const struct lttng_error_query *query, struct lttng_payload *payload) @@ -649,6 +708,16 @@ const struct lttng_trigger *lttng_error_query_trigger_borrow_target( return query_trigger->trigger; } +LTTNG_HIDDEN +const struct lttng_trigger *lttng_error_query_condition_borrow_target( + const struct lttng_error_query *query) +{ + const struct lttng_error_query_condition *query_trigger = + container_of(query, typeof(*query_trigger), parent); + + return query_trigger->trigger; +} + LTTNG_HIDDEN const struct lttng_trigger *lttng_error_query_action_borrow_trigger_target( const struct lttng_error_query *query) @@ -694,6 +763,13 @@ int lttng_error_query_serialize(const struct lttng_error_query *query, goto end; } + break; + case LTTNG_ERROR_QUERY_TARGET_TYPE_CONDITION: + ret = lttng_error_query_condition_serialize(query, payload); + if (ret) { + goto end; + } + break; case LTTNG_ERROR_QUERY_TARGET_TYPE_ACTION: ret = lttng_error_query_action_serialize(query, payload); @@ -758,6 +834,35 @@ ssize_t lttng_error_query_create_from_payload(struct lttng_payload_view *view, break; } + case LTTNG_ERROR_QUERY_TARGET_TYPE_CONDITION: + { + ssize_t trigger_used_size; + struct lttng_payload_view trigger_view = + lttng_payload_view_from_view( + view, used_size, -1); + + if (!lttng_payload_view_is_valid(&trigger_view)) { + used_size = -1; + goto end; + } + + trigger_used_size = lttng_trigger_create_from_payload( + &trigger_view, &trigger); + if (trigger_used_size < 0) { + used_size = -1; + goto end; + } + + used_size += trigger_used_size; + + *query = lttng_error_query_condition_create(trigger); + if (!*query) { + used_size = -1; + goto end; + } + + break; + } case LTTNG_ERROR_QUERY_TARGET_TYPE_ACTION: { struct lttng_action_path *action_path = NULL; diff --git a/tests/regression/tools/notification/test_notification_notifier_discarded_count b/tests/regression/tools/notification/test_notification_notifier_discarded_count index 47793b8b8..c9235393e 100755 --- a/tests/regression/tools/notification/test_notification_notifier_discarded_count +++ b/tests/regression/tools/notification/test_notification_notifier_discarded_count @@ -41,13 +41,13 @@ function trigger_get_discarded_notif_number() "$FULL_LTTNG_BIN" list-triggers > "$list_triggers_stdout" - cat "$list_triggers_stdout" | grep -a7 "$trigger_name" | tail -1 | grep --quiet "errors: none" + cat "$list_triggers_stdout" | grep -A7 "$trigger_name" | grep -A2 "event rule matches" | tail -1 | grep --quiet "errors: none" ret=$? if [ "$ret" -eq "0" ]; then notif_nb="0" else - notif_nb=$(cat "$list_triggers_stdout" | grep -a8 "$trigger_name" | tail -1 | grep "discarded tracer messages" | cut -d' ' -f8) + notif_nb=$(cat "$list_triggers_stdout" | grep -A7 "$trigger_name" | grep "discarded tracer messages" | cut -d' ' -f10) fi rm -f "$list_triggers_stdout" diff --git a/tests/regression/tools/trigger/test_list_triggers_cli b/tests/regression/tools/trigger/test_list_triggers_cli index c55cbcc38..dcc634438 100755 --- a/tests/regression/tools/trigger/test_list_triggers_cli +++ b/tests/regression/tools/trigger/test_list_triggers_cli @@ -62,6 +62,7 @@ test_top_level_options () owner uid: ${uid} condition: event rule matches rule: test-name (type: user tracepoint) + errors: none actions: notify errors: none @@ -93,6 +94,7 @@ test_event_rule_matches_tracepoint () owner uid: ${uid} condition: event rule matches rule: aaa (type: user tracepoint, filter: p == 2) + errors: none actions: notify errors: none @@ -101,6 +103,7 @@ test_event_rule_matches_tracepoint () owner uid: ${uid} condition: event rule matches rule: gerboise (type: user tracepoint, log level at least INFO) + errors: none actions: notify errors: none @@ -109,6 +112,7 @@ test_event_rule_matches_tracepoint () owner uid: ${uid} condition: event rule matches rule: * (type: user tracepoint) + errors: none actions: notify errors: none @@ -117,6 +121,7 @@ test_event_rule_matches_tracepoint () owner uid: ${uid} condition: event rule matches rule: hello* (type: user tracepoint, exclusions: hello2,hello3,hello4) + errors: none actions: notify errors: none @@ -125,6 +130,7 @@ test_event_rule_matches_tracepoint () owner uid: ${uid} condition: event rule matches rule: lemming (type: user tracepoint, log level is WARNING) + errors: none actions: notify errors: none @@ -135,6 +141,7 @@ test_event_rule_matches_tracepoint () rule: capture-payload-field (type: user tracepoint) captures: - a + errors: none actions: notify errors: none @@ -146,6 +153,7 @@ test_event_rule_matches_tracepoint () captures: - a[2] - \$ctx.tourlou[18] + errors: none actions: notify errors: none @@ -156,6 +164,7 @@ test_event_rule_matches_tracepoint () rule: capture-chan-ctx (type: user tracepoint) captures: - \$ctx.vpid + errors: none actions: notify errors: none @@ -166,6 +175,7 @@ test_event_rule_matches_tracepoint () rule: capture-app-ctx (type: user tracepoint) captures: - \$app.iga:active_clients + errors: none actions: notify errors: none @@ -174,6 +184,7 @@ test_event_rule_matches_tracepoint () owner uid: ${uid} condition: event rule matches rule: lemming (type: user tracepoint) + errors: none actions: notify errors: none @@ -226,6 +237,7 @@ test_event_rule_matches_probe () owner uid: ${uid} condition: event rule matches rule: my_channel_enable (type: kernel:kprobe, location: lttng_channel_enable) + errors: none actions: notify errors: none @@ -234,6 +246,7 @@ test_event_rule_matches_probe () owner uid: ${uid} condition: event rule matches rule: my_channel_enable (type: kernel:kprobe, location: ${base_symbol}+${offset_hex}) + errors: none actions: notify errors: none @@ -242,6 +255,7 @@ test_event_rule_matches_probe () owner uid: ${uid} condition: event rule matches rule: my_channel_enable (type: kernel:kprobe, location: 0x${channel_enable_addr}) + errors: none actions: notify errors: none @@ -268,6 +282,7 @@ test_event_rule_matches_userspace_probe_elf () owner uid: ${uid} condition: event rule matches rule: ma-probe-elf (type: kernel:uprobe, location type: ELF, location: ${uprobe_elf_binary}:${elf_function_name}) + errors: none actions: notify errors: none @@ -293,6 +308,7 @@ test_event_rule_matches_userspace_probe_sdt () owner uid: 0 condition: event rule matches rule: ma-probe-sdt (type: kernel:uprobe, location type: SDT, location: ${uprobe_sdt_binary}:${sdt_provider_name}:${sdt_probe_name}) + errors: none actions: notify errors: none @@ -319,6 +335,7 @@ test_event_rule_matches_syscall () owner uid: ${uid} condition: event rule matches rule: open (type: kernel:syscall:entry+exit) + errors: none actions: notify errors: none @@ -327,6 +344,7 @@ test_event_rule_matches_syscall () owner uid: ${uid} condition: event rule matches rule: open (type: kernel:syscall:entry) + errors: none actions: notify errors: none @@ -335,6 +353,7 @@ test_event_rule_matches_syscall () owner uid: ${uid} condition: event rule matches rule: open (type: kernel:syscall:exit) + errors: none actions: notify errors: none @@ -343,6 +362,7 @@ test_event_rule_matches_syscall () owner uid: ${uid} condition: event rule matches rule: open (type: kernel:syscall:entry+exit) + errors: none actions: notify errors: none @@ -351,6 +371,7 @@ test_event_rule_matches_syscall () owner uid: ${uid} condition: event rule matches rule: ptrace (type: kernel:syscall:entry+exit, filter: a > 2) + errors: none actions: notify errors: none @@ -376,6 +397,7 @@ test_session_consumed_size_condition () condition: session consumed size session name: the-session-name threshold: 1234 bytes + errors: none actions: notify errors: none @@ -399,6 +421,7 @@ test_buffer_usage_conditions () channel name: the-channel-name domain: ust threshold (bytes): 1234 + errors: none actions: notify errors: none @@ -410,6 +433,7 @@ test_buffer_usage_conditions () channel name: the-channel-name domain: ust threshold (ratio): 0.25 + errors: none actions: notify errors: none @@ -421,6 +445,7 @@ test_buffer_usage_conditions () channel name: the-channel-name domain: ust threshold (bytes): 2345 + errors: none actions: notify errors: none @@ -432,6 +457,7 @@ test_buffer_usage_conditions () channel name: the-channel-name domain: ust threshold (ratio): 0.40 + errors: none actions: notify errors: none @@ -455,6 +481,7 @@ test_session_rotation_conditions () owner uid: ${uid} condition: session rotation completed session name: the-session-name + errors: none actions: notify errors: none @@ -463,6 +490,7 @@ test_session_rotation_conditions () owner uid: ${uid} condition: session rotation ongoing session name: the-session-name + errors: none actions: notify errors: none @@ -495,6 +523,7 @@ test_snapshot_action () owner uid: ${uid} condition: event rule matches rule: some-event (type: user tracepoint) + errors: none actions: snapshot session \`ze-session\` errors: none @@ -503,6 +532,7 @@ test_snapshot_action () owner uid: ${uid} condition: event rule matches rule: some-event (type: user tracepoint) + errors: none actions: snapshot session \`ze-session\`, path: /some/path errors: none @@ -511,6 +541,7 @@ test_snapshot_action () owner uid: ${uid} condition: event rule matches rule: some-event (type: user tracepoint) + errors: none actions: snapshot session \`ze-session\`, path: /some/other/path errors: none @@ -519,6 +550,7 @@ test_snapshot_action () owner uid: ${uid} condition: event rule matches rule: some-event (type: user tracepoint) + errors: none actions: snapshot session \`ze-session\`, url: net://1.2.3.4 errors: none @@ -527,6 +559,7 @@ test_snapshot_action () owner uid: ${uid} condition: event rule matches rule: some-event (type: user tracepoint) + errors: none actions: snapshot session \`ze-session\`, url: net://1.2.3.4:1234:1235 errors: none @@ -535,6 +568,7 @@ test_snapshot_action () owner uid: ${uid} condition: event rule matches rule: some-event (type: user tracepoint) + errors: none actions: snapshot session \`ze-session\`, control url: tcp://1.2.3.4:1111, data url: tcp://1.2.3.4:1112 errors: none @@ -543,6 +577,7 @@ test_snapshot_action () owner uid: ${uid} condition: event rule matches rule: some-event (type: user tracepoint) + errors: none actions: snapshot session \`ze-session\`, path: /some/path, max size: 1234 errors: none @@ -551,6 +586,7 @@ test_snapshot_action () owner uid: ${uid} condition: event rule matches rule: some-event (type: user tracepoint) + errors: none actions: snapshot session \`ze-session\`, path: /some/path, name: meh errors: none @@ -559,6 +595,7 @@ test_snapshot_action () owner uid: ${uid} condition: event rule matches rule: some-event (type: user tracepoint) + errors: none actions: snapshot session \`ze-session\`, rate policy: every 10 occurrences errors: none @@ -567,6 +604,7 @@ test_snapshot_action () owner uid: ${uid} condition: event rule matches rule: some-event (type: user tracepoint) + errors: none actions: snapshot session \`ze-session\`, rate policy: once after 10 occurrences errors: none @@ -597,6 +635,7 @@ test_notify_action () owner uid: ${uid} condition: event rule matches rule: some-event (type: user tracepoint) + errors: none actions: notify, rate policy: once after 5 occurrences errors: none @@ -605,6 +644,7 @@ test_notify_action () owner uid: ${uid} condition: event rule matches rule: some-event (type: user tracepoint) + errors: none actions: notify, rate policy: every 10 occurrences errors: none diff --git a/tests/regression/tools/trigger/test_remove_trigger_cli b/tests/regression/tools/trigger/test_remove_trigger_cli index 7bbdae226..9e342d9b5 100755 --- a/tests/regression/tools/trigger/test_remove_trigger_cli +++ b/tests/regression/tools/trigger/test_remove_trigger_cli @@ -76,6 +76,7 @@ cat > "${tmp_expected_stdout}" <<- EOF owner uid: ${uid} condition: event rule matches rule: aaa (type: user tracepoint, filter: p == 2) + errors: none actions: notify errors: none @@ -84,6 +85,7 @@ cat > "${tmp_expected_stdout}" <<- EOF owner uid: ${uid} condition: event rule matches rule: * (type: user tracepoint) + errors: none actions: notify errors: none @@ -98,6 +100,7 @@ cat > "${tmp_expected_stdout}" <<- EOF owner uid: ${uid} condition: event rule matches rule: * (type: user tracepoint) + errors: none actions: notify errors: none diff --git a/tests/regression/ust/python-logging/test_python_logging.in b/tests/regression/ust/python-logging/test_python_logging.in index be0422cf0..470452260 100755 --- a/tests/regression/ust/python-logging/test_python_logging.in +++ b/tests/regression/ust/python-logging/test_python_logging.in @@ -700,6 +700,7 @@ function test_python_trigger_notify_action owner uid: ${uid} condition: event rule matches rule: * (type: python:logging) + errors: none actions: notify errors: none