tests/plugins/flt.utils.muxer: add test for clock (in)compatibility cases
authorSimon Marchi <simon.marchi@efficios.com>
Tue, 12 Mar 2024 21:23:02 +0000 (17:23 -0400)
committerSimon Marchi <simon.marchi@efficios.com>
Tue, 26 Mar 2024 18:56:36 +0000 (14:56 -0400)
commitfaf0a8c2c7051f8e013308838fcf52856486bb9a
treeb47561f4920fc4743f57a82242d4e3acda24f2a2
parent0ea4aa9f8de0535273540aeaeacec74421cfb6b8
tests/plugins/flt.utils.muxer: add test for clock (in)compatibility cases

Add a test for the various clock class incompatibility cases checked by
the `MsgIter::_makeSureClkClsIsExpected` method in the `flt.utils.muxer`
component class.

The scenarios are equivalent to the triggers in
`tests/lib/conds/conds-trigger.cpp`, used to test the preconditions in
the library.  Since the scenarios are equivalent, it would probably be
possible to share some code with that file, but I haven't tried it.

In essence, for each scenario, the test creates a graph where a muxer
component receives two messages with incompatible clock
configurations.  The test expects that an exception is thrown, and
checks whether the root cause contains an expected string.

Change-Id: I8bd98fa52719ab2cedb7cbb09310a560b437eb28
Signed-off-by: Simon Marchi <simon.marchi@efficios.com>
Reviewed-on: https://review.lttng.org/c/babeltrace/+/12005
Reviewed-by: Philippe Proulx <eeppeliteloop@gmail.com>
Tested-by: jenkins <jenkins@lttng.org>
tests/Makefile.am
tests/plugins/flt.utils.muxer/test-clock-compatibility.cpp [new file with mode: 0644]
tests/plugins/flt.utils.muxer/test-clock-compatibility.sh [new file with mode: 0755]
This page took 0.024678 seconds and 4 git commands to generate.