X-Git-Url: https://git.lttng.org/?a=blobdiff_plain;f=tests%2Funit%2Ftest_ust_data.c;h=4fb6a315e38c3319d94666ab21eae6bac918ec28;hb=88f06f1562c6ecd3a5666baa93a57273fbe10437;hp=150d5dafb70b785cd63cf6c5442b53584f1c0b97;hpb=14fb1ebe1000da2c3ccca45e7e97ad6637947cfe;p=lttng-tools.git diff --git a/tests/unit/test_ust_data.c b/tests/unit/test_ust_data.c index 150d5dafb..4fb6a315e 100644 --- a/tests/unit/test_ust_data.c +++ b/tests/unit/test_ust_data.c @@ -39,15 +39,19 @@ #define RANDOM_STRING_LEN 11 /* Number of TAP tests in this file */ -#define NUM_TESTS 10 +#define NUM_TESTS 11 /* For error.h */ int lttng_opt_quiet = 1; int lttng_opt_verbose; +int lttng_opt_mi; int ust_consumerd32_fd; int ust_consumerd64_fd; +/* Global variable required by sessiond objects being linked-in */ +struct lttng_ht *agent_apps_ht_by_sock; + static const char alphanum[] = "0123456789" "ABCDEFGHIJKLMNOPQRSTUVWXYZ" @@ -124,7 +128,7 @@ 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); + event = trace_ust_create_event(&ev, NULL, NULL, NULL, false); ok(event != NULL, "Create UST event"); @@ -156,10 +160,16 @@ static void test_create_ust_event_exclusion(void) /* set up an exclusion set */ exclusion = zmalloc(sizeof(*exclusion) + LTTNG_SYMBOL_NAME_LEN); + if (!exclusion) { + PERROR("zmalloc"); + } + + ok(exclusion != NULL, "Create UST exclusion"); + exclusion->count = 1; strncpy((char *)(exclusion->names), get_random_string(), LTTNG_SYMBOL_NAME_LEN); - event = trace_ust_create_event(&ev, NULL, NULL, exclusion); + event = trace_ust_create_event(&ev, NULL, NULL, exclusion, false); ok(event != NULL, "Create UST event with exclusion");