From: Francis Deslauriers Date: Tue, 7 Jan 2020 20:34:07 +0000 (-0500) Subject: Fix: track-untrack.c: regression of `--all --pid` option ordering X-Git-Tag: v2.12.0-rc1~76 X-Git-Url: http://git.lttng.org./?a=commitdiff_plain;h=adce7589954ef2c8236be5145e664b4383474d43;hp=adce7589954ef2c8236be5145e664b4383474d43;p=lttng-tools.git 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 Change-Id: I85f7a2fa8d6f67056aeff8edf3d12508f5ae0879 Signed-off-by: Jérémie Galarneau ---