From 82b4ebcefe81a70dfbffbf06f27b5baef7930ce3 Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=A9r=C3=A9mie=20Galarneau?= Date: Fri, 5 May 2017 12:17:17 -0400 Subject: [PATCH] Tests fix: initialize UST extended channel attributes MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Jérémie Galarneau --- src/bin/lttng-sessiond/trace-ust.c | 4 ++-- tests/unit/test_ust_data.c | 3 +++ 2 files changed, 5 insertions(+), 2 deletions(-) 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"); -- 2.34.1