X-Git-Url: http://git.liburcu.org/?a=blobdiff_plain;ds=sidebyside;f=tests%2Funit%2Ftest_ust_data.c;h=f22f8c4e21fdfcf3db85e9f6a3c8aec161d9cdb3;hb=dd1cd4064dbceb0bb023aa2719427fe8c8b76003;hp=7996b8e60e7d4e9ce60cea4220e44a357692d6ce;hpb=8273250bde9f8fa0cc2f6d8ea86aaf4b9fe83fc1;p=lttng-tools.git diff --git a/tests/unit/test_ust_data.c b/tests/unit/test_ust_data.c index 7996b8e60..f22f8c4e2 100644 --- a/tests/unit/test_ust_data.c +++ b/tests/unit/test_ust_data.c @@ -30,6 +30,7 @@ #include #include #include +#include #include @@ -49,8 +50,9 @@ int lttng_opt_mi; int ust_consumerd32_fd; int ust_consumerd64_fd; -/* Global variable required by sessiond objects being linked-in */ +/* Global variables required by sessiond objects being linked-in */ struct lttng_ht *agent_apps_ht_by_sock; +struct notification_thread_handle *notification_thread_handle; static const char alphanum[] = "0123456789" @@ -104,8 +106,11 @@ static void test_create_ust_channel(void) { struct ltt_ust_channel *uchan; struct lttng_channel attr; + struct lttng_channel_extended extended; memset(&attr, 0, sizeof(attr)); + memset(&extended, 0, sizeof(extended)); + attr.attr.extended.ptr = &extended; ok(lttng_strncpy(attr.name, "channel0", sizeof(attr.name)) == 0, "Validate channel name length"); @@ -247,8 +252,12 @@ static void test_create_ust_context(void) uctx = trace_ust_create_context(&ectx); ok(uctx != NULL, "Create UST context"); - ok((int) uctx->ctx.ctx == LTTNG_UST_CONTEXT_VTID, - "Validate UST context"); + if (uctx) { + ok((int) uctx->ctx.ctx == LTTNG_UST_CONTEXT_VTID, + "Validate UST context"); + } else { + skip(1, "Skipping UST context validation as creation failed"); + } free(uctx); }