X-Git-Url: http://git.efficios.com/?a=blobdiff_plain;f=tests%2Funit%2Ftest_ust_data.c;h=155d83215bd1b4772b949326a5b2470d3fac7a66;hb=36d2e35df61339e4394e84ad9790b984d259e0f0;hp=dd00089266ad7770ce4c64e18b1340439f167c9b;hpb=c7e35b037773dbbfe10178c946ba44feefb226e1;p=lttng-tools.git diff --git a/tests/unit/test_ust_data.c b/tests/unit/test_ust_data.c index dd0008926..155d83215 100644 --- a/tests/unit/test_ust_data.c +++ b/tests/unit/test_ust_data.c @@ -39,7 +39,7 @@ #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; @@ -49,6 +49,9 @@ 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" @@ -101,7 +104,7 @@ static void test_create_ust_channel(void) strncpy(attr.name, "channel0", 8); - uchan = trace_ust_create_channel(&attr); + uchan = trace_ust_create_channel(&attr, LTTNG_DOMAIN_UST); ok(uchan != NULL, "Create UST channel"); ok(uchan->enabled == 0 && @@ -125,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"); @@ -157,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");