Fix: track-untrack.c: regression of `--all --pid` option ordering
Background
==========
The `tests/regression/kernel/test_callstack` test uses the PID tracker
to restrict what events end up in the trace. It does that by using the
following lttng command:
lttng untrack -s $SESSION_NAME --all --pid -k
Issue
=====
A regression was introduced along with the UID tracker patch series that
makes the above command fail silently and return status 1. The bug is in
the argument parsing function that assumes that the tracker option
(`--pid` in this case) would appear before the `--all` option.
Where the above command fails, the one below works as expected:
lttng untrack -s $SESSION_NAME --pid --all -k
Both ordering are valid and should be accepted.
Fix
===
When parsing the arguments, first record the fact that we encountered the
`--all` flag, and later check to what tracker it applies too.
Signed-off-by: Francis Deslauriers <francis.deslauriers@efficios.com>
Change-Id: I85f7a2fa8d6f67056aeff8edf3d12508f5ae0879
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
This page took 0.026918 seconds and 4 git commands to generate.