From: Jonathan Rajotte Date: Tue, 30 Mar 2021 02:00:37 +0000 (-0400) Subject: tests: trigger action firing policy X-Git-Tag: v2.13.0-rc1~87 X-Git-Url: http://git.lttng.org./?a=commitdiff_plain;h=6ffce1f5bbc5c3e956bc91ce801c779588bf37af;hp=6ffce1f5bbc5c3e956bc91ce801c779588bf37af;p=lttng-tools.git 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 Signed-off-by: Jérémie Galarneau Change-Id: Ia3c88f38dcca0389165e1416b06768338b2889b6 ---