X-Git-Url: https://git.lttng.org/?p=lttng-tools.git;a=blobdiff_plain;f=tests%2Funit%2Ftest_ust_data.c;fp=tests%2Funit%2Ftest_ust_data.c;h=b80cb5b5402eeb26ca2f67cb301a96d8b4714343;hp=ac3350d796baabe6647d0971b872c3feeeff23fd;hb=3968741092cac3eaf33f7bf558bb2b476189470b;hpb=71a3bb01e288ad6e611be0501a4444375c4124a7 diff --git a/tests/unit/test_ust_data.c b/tests/unit/test_ust_data.c index ac3350d79..b80cb5b54 100644 --- a/tests/unit/test_ust_data.c +++ b/tests/unit/test_ust_data.c @@ -150,6 +150,7 @@ static void test_create_ust_event(void) { 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(), @@ -158,9 +159,9 @@ static void test_create_ust_event(void) 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"); @@ -178,6 +179,7 @@ static void test_create_ust_event(void) static void test_create_ust_event_exclusion(void) { + enum lttng_error_code ret; struct ltt_ust_event *event; struct lttng_event ev; char *name; @@ -212,10 +214,10 @@ static void test_create_ust_event_exclusion(void) 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); @@ -231,8 +233,8 @@ static void test_create_ust_event_exclusion(void) 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");