There is currently no "basic" pre-condition assertion test, even though
we have the support for it. Add one, so that the support code is
exercised. The new test checks that passing a wrong MIP version to
bt_grbt_graph_create triggers an assertion.
Change-Id: Iddaa7905684e1bda3a731ab215a0e42b5eb62633
Signed-off-by: Simon Marchi <simon.marchi@efficios.com>
Reviewed-on: https://review.lttng.org/c/babeltrace/+/10056
Reviewed-by: Philippe Proulx <eeppeliteloop@gmail.com>
#include "common/assert.h"
#include "utils.h"
+static
+void trigger_graph_mip_version(void)
+{
+ bt_graph_create(292);
+}
+
static
bt_field_class *get_uint_fc(bt_self_component *self_comp)
{
static
const struct cond_trigger triggers[] = {
+ COND_TRIGGER_PRE_BASIC("pre:graph-create:valid-mip-version", NULL,
+ trigger_graph_mip_version),
COND_TRIGGER_PRE_RUN_IN_COMP_CLS_INIT(
"pre:field-class-integer-set-field-value-range:valid-n",
"0",