Fix: Exclusion check iterates multiple times on same array
When specifying exclusions not contained in the event string warning
message is printed more than once.
For example, running the following command:
lttng enable-event -u 'event_name_*' --exclude=not_event,other_event,my_event
Will result in this warning:
Warning: Event event_name_*: not_event does not exclude any events from event_name_*
Warning: Event event_name_*: other_event does not exclude any events from event_name_*
Warning: Event event_name_*: my_event does not exclude any events from event_name_*
Warning: Event event_name_*: other_event does not exclude any events from event_name_*
Warning: Event event_name_*: my_event does not exclude any events from event_name_*
Warning: Event event_name_*: my_event does not exclude any events from event_name_*
The following should be printed:
Warning: Event event_name_*: not_event does not exclude any events from event_name_*
Warning: Event event_name_*: other_event does not exclude any events from event_name_*
Warning: Event event_name_*: my_event does not exclude any events from event_name_*
This is due to a bad indexing of the exclusions array.
Since we are already iterating on the exclusions array, pass the
exclusions directly with check_exclusion_subset().
Signed-off-by: Francis Deslauriers <francis.deslauriers@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
This page took 0.02567 seconds and 4 git commands to generate.