tests: trigger action firing policy
authorJonathan Rajotte <jonathan.rajotte-julien@efficios.com>
Tue, 30 Mar 2021 02:00:37 +0000 (22:00 -0400)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Sun, 18 Apr 2021 23:28:57 +0000 (19:28 -0400)
commit6ffce1f5bbc5c3e956bc91ce801c779588bf37af
tree94ade1c0f07c381cd0ff84d123fdf8a97d5178ae
parente45dd625d3e802d8e6e2ec3de180c73546e8f9fe
tests: trigger action firing policy

Implements the regression tests for the trigger action firing polices.

For now the focus is put on the notify action behavior. In the future,
the ability to fetch the number of time an action was enqueued for
execution and the number of type it was executed should greatly
facilitate this work. For now, use the notify action for minimal
regression testing.

gen-ust-events is modified to allow a caller to specify that an `end`
event should be emitted at the end of the program. This is used to
guaranteed that all previous event tracer notifications should be
received when the `end` event notification is received. Note that
ordering is guaranteed for delivery of tracer notification and
notification for a given process.

notificiation-client is modified to allow reception of N notifications
and to validate that it received the count it expects.

notificiation-client is modified to allow reception of N notifications
and to exit only when an `end` event notification is received. This
allow us validate the firing policy.

The tests are pretty straightforward. We register 2 triggers, one with
an event rule condition on `tp:tptest` and the other one with a event
rule condition on `tp:end`. From there we perform a phase of event hits
were we expect no notification except for the `tp:end` then we force a
single event hit were we expect a notification for `tp:tptest`. For the
fire every N policy, we rinse and repeat to validate the behaviour. For
the once after N, we simply do a third phase were we generate N events
and expect no notification.

Signed-off-by: Jonathan Rajotte <jonathan.rajotte-julien@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Change-Id: Ia3c88f38dcca0389165e1416b06768338b2889b6
configure.ac
tests/regression/Makefile.am
tests/regression/tools/trigger/Makefile.am
tests/regression/tools/trigger/firing-policy/Makefile.am [new file with mode: 0644]
tests/regression/tools/trigger/firing-policy/test_ust_firing_policy [new file with mode: 0755]
tests/regression/tools/trigger/utils/notification-client.c
tests/utils/testapp/gen-ust-events/gen-ust-events.c
tests/utils/testapp/gen-ust-events/tp.h
This page took 0.025572 seconds and 4 git commands to generate.