From: Jérémie Galarneau Date: Fri, 5 May 2017 16:17:17 +0000 (-0400) Subject: Tests fix: initialize UST extended channel attributes X-Git-Tag: v2.10.0-rc1~15 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=82b4ebcefe81a70dfbffbf06f27b5baef7930ce3;p=lttng-tools.git Tests fix: initialize UST extended channel attributes Signed-off-by: Jérémie Galarneau --- diff --git a/src/bin/lttng-sessiond/trace-ust.c b/src/bin/lttng-sessiond/trace-ust.c index 55ca4fb3c..314c21e38 100644 --- a/src/bin/lttng-sessiond/trace-ust.c +++ b/src/bin/lttng-sessiond/trace-ust.c @@ -356,8 +356,8 @@ struct ltt_ust_channel *trace_ust_create_channel(struct lttng_channel *chan, luc->attr.switch_timer_interval = chan->attr.switch_timer_interval; luc->attr.read_timer_interval = chan->attr.read_timer_interval; luc->attr.output = (enum lttng_ust_output) chan->attr.output; - luc->monitor_timer_interval = - ((struct lttng_channel_extended *) chan->attr.extended.ptr)->monitor_timer_interval; + luc->monitor_timer_interval = ((struct lttng_channel_extended *) + chan->attr.extended.ptr)->monitor_timer_interval; /* Translate to UST output enum */ switch (luc->attr.output) { diff --git a/tests/unit/test_ust_data.c b/tests/unit/test_ust_data.c index 86c1e23bf..43ad3115b 100644 --- a/tests/unit/test_ust_data.c +++ b/tests/unit/test_ust_data.c @@ -106,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");