X-Git-Url: http://git.lttng.org./?a=blobdiff_plain;f=tests%2Funit%2Ftest_ust_data.c;h=75257d3e2c7297c5bded9d181df66757183174c5;hb=4f5288dcaa3fe20105650cc6631eeed1228276ee;hp=f92b1f802b7481b415aae1834ae2475b02e070c3;hpb=fc4b93fa8aa36b19caad0f8dc4a6a3237fcc36bf;p=lttng-tools.git diff --git a/tests/unit/test_ust_data.c b/tests/unit/test_ust_data.c index f92b1f802..75257d3e2 100644 --- a/tests/unit/test_ust_data.c +++ b/tests/unit/test_ust_data.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 2011 David Goulet + * Copyright (C) 2011 EfficiOS Inc. * * SPDX-License-Identifier: GPL-2.0-only * @@ -21,6 +21,8 @@ #include #include +#include + #include /* This path will NEVER be created in this test */ @@ -31,10 +33,7 @@ /* Number of TAP tests in this file */ #define NUM_TESTS 16 -/* For error.h */ -int lttng_opt_quiet = 1; -int lttng_opt_verbose; -int lttng_opt_mi; +DEFINE_LTTNG_UST_SIGBUS_STATE(); static const char alphanum[] = "0123456789" @@ -79,6 +78,7 @@ static void test_create_one_ust_session(void) "Validate UST session"); trace_ust_destroy_session(usess); + trace_ust_free_session(usess); } static void test_create_ust_channel(void) @@ -177,9 +177,9 @@ static void test_create_ust_event_exclusion(void) exclusion->count = exclusion_count; random_name = get_random_string(); strncpy(LTTNG_EVENT_EXCLUSION_NAME_AT(exclusion, 0), random_name, - LTTNG_SYMBOL_NAME_LEN); + LTTNG_SYMBOL_NAME_LEN - 1); strncpy(LTTNG_EVENT_EXCLUSION_NAME_AT(exclusion, 1), random_name, - LTTNG_SYMBOL_NAME_LEN); + LTTNG_SYMBOL_NAME_LEN - 1); ret = trace_ust_create_event(&ev, NULL, NULL, exclusion, false, &event); exclusion = NULL; @@ -209,9 +209,9 @@ static void test_create_ust_event_exclusion(void) exclusion->count = exclusion_count; strncpy(LTTNG_EVENT_EXCLUSION_NAME_AT(exclusion, 0), - get_random_string(), LTTNG_SYMBOL_NAME_LEN); + get_random_string(), LTTNG_SYMBOL_NAME_LEN - 1); strncpy(LTTNG_EVENT_EXCLUSION_NAME_AT(exclusion, 1), - get_random_string(), LTTNG_SYMBOL_NAME_LEN); + get_random_string(), LTTNG_SYMBOL_NAME_LEN - 1); exclusion_copy->count = exclusion_count; strncpy(LTTNG_EVENT_EXCLUSION_NAME_AT(exclusion_copy, 0),