Fix: list without a name is not an error

Fixes #829

Signed-off-by: Jonathan Rajotte Julien <jonathan.r.julien@gmail.com>
Signed-off-by: David Goulet <dgoulet@efficios.com>
Fix: parse_prob_opts return the actual success of the function

This bug have been triggered by the mi merging and the use of a
command_ret in enable_events functions. Previously, enable_events was
reusing the ret variable for another operation and always replacing ret.
Parse_probe_event returned the last output of sscanf which represent
the number of match and not the success of the operation.

Fixes #830

Signed-off-by: Jonathan Rajotte Julien <jonathan.r.julien@gmail.com>
Signed-off-by: David Goulet <dgoulet@efficios.com>
Fix: mi print of probe attributes + validation

Signed-off-by: Jonathan Rajotte Julien <jonathan.r.julien@gmail.com>
Signed-off-by: David Goulet <dgoulet@efficios.com>
Fix: Parenthesize previous statement when adding conditions to a filter

Not parenthesizing the clauses in a filter string causes JUL events to be
traced even though they are not enabled when an enable-event command is
issued with a filter and the --loglevel-only option.

For instance,

lttng enable-event -j "my_event" --loglevel-only JUL_CONFIG -f "int_loglevel > 0 || int_loglevel < 0"

results in the following filter being applied:

int_loglevel > 0 || int_loglevel < 0 && logger_name == "my_event" && int_loglevel == 700

The resulting expression will always evaluate to true, regardless of the logger
name.

This fix parenthesizes each clause to ensure they are all independently
evaluated and not unintuitively affected by operator precedence.

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Signed-off-by: David Goulet <dgoulet@efficios.com>
Tests: Validate that filters may be used with JUL's logger_name filtering

This test validates that custom filters may be used on JUL events
without interfering with the implicit filtering done on the logger_name
field.

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Signed-off-by: David Goulet <dgoulet@efficios.com>