Fix: Tests: `test_exclusion` passing for the wrong reason
Issue
=====
The following commit added `-i` and `-w` flags to the test app arguments
of the `test_exclusion` tests:
commit
6c4a91d639747f260ab46decebc50998ef063712
Author: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Date: Mon Aug 26 14:22:06 2019 -0400
tests: gen-ust-events: use options instead of arguments
Remove argument dependency and ease usage of features individually.
The `gen-ust-nevents` was not modified to support those flags. I suspect this
mistake was caused by the name similarity of the `gen-ust-nevents` and the
`gen-ust-events` test applications.
We ended up calling the following command:
./gen-ust-nevents -i 100 -w -1
When called with such arguments the `gen-ust-nevents` parsed the first
argument (`-i`) using `atoi()` which retuned 0. This was interpreted as
the number of iterations requested by the user so the app immediately
exited without generating any events.
So, the test was not seeing any of the excluded events in the trace
which was then considered as a successful result but no events were ever
excluded because none were generated in the first place.
Solution
========
Remove the use of `-i` and `-w` flags.
I also added a `dry_run` test to confirm that we do indeed get events
when exclusions are not used to prevent this error from happening in the
future.
Notes
=====
- I changed the wildcard used in the enable-event command so to only
enable events from the testapp and not the `lttng_ust_statedump:` events
as those are generated even if we didnt' ask for them.
- I add a stderr redirection to `/dev/null` in the trace reading
pipeline because we now end up with traces with no events. This has
changed because we now only enable events from the application (see
previous note).
- In a future commit, I will change the `gen-ust-nevents` application to
take those `-i` and `-w` flags.
Signed-off-by: Francis Deslauriers <francis.deslauriers@efficios.com>
Change-Id: Id37dcd59a18b3401d97439bce1191a8c5cac87d5
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>