{
struct ltt_ust_event *event;
struct lttng_event ev;
+ enum lttng_error_code ret;
memset(&ev, 0, sizeof(ev));
ok(lttng_strncpy(ev.name, get_random_string(),
ev.type = LTTNG_EVENT_TRACEPOINT;
ev.loglevel_type = LTTNG_EVENT_LOGLEVEL_ALL;
- event = trace_ust_create_event(&ev, NULL, NULL, NULL, false);
+ ret = trace_ust_create_event(&ev, NULL, NULL, NULL, false, &event);
- ok(event != NULL, "Create UST event");
+ ok(ret == LTTNG_OK, "Create UST event");
if (!event) {
skip(1, "UST event is null");
static void test_create_ust_event_exclusion(void)
{
+ enum lttng_error_code ret;
struct ltt_ust_event *event;
struct lttng_event ev;
char *name;
strncpy(LTTNG_EVENT_EXCLUSION_NAME_AT(exclusion, 1), random_name,
LTTNG_SYMBOL_NAME_LEN);
- event = trace_ust_create_event(&ev, NULL, NULL, exclusion, false);
+ ret = trace_ust_create_event(&ev, NULL, NULL, exclusion, false, &event);
exclusion = NULL;
- ok(!event, "Create UST event with identical exclusion names fails");
+ ok(ret != LTTNG_OK, "Create UST event with identical exclusion names fails");
exclusion = zmalloc(sizeof(*exclusion) +
LTTNG_SYMBOL_NAME_LEN * exclusion_count);
strncpy(LTTNG_EVENT_EXCLUSION_NAME_AT(exclusion, 1),
get_random_string(), LTTNG_SYMBOL_NAME_LEN);
- event = trace_ust_create_event(&ev, NULL, NULL, exclusion, false);
- ok(event != NULL, "Create UST event with different exclusion names");
+ ret = trace_ust_create_event(&ev, NULL, NULL, exclusion, false, &event);
+ ok(ret == LTTNG_OK, "Create UST event with different exclusion names");
if (!event) {
skip(1, "UST event with exclusion is null");