SoW-2020-0002: Trace Hit Counters
[lttng-tools.git] / tests / unit / test_ust_data.c
index b4e927c9d4ea8212284fee020ce6bc3f81acc8cd..330d49e59d7cc61e89257ad79ab0e9014e154e27 100644 (file)
@@ -1,23 +1,11 @@
 /*
- * Copyright (c)  2011 David Goulet <david.goulet@polymtl.ca>
+ * Copyright (C) 2011 David Goulet <david.goulet@polymtl.ca>
  *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * as published by the Free Software Foundation; only version 2
- * of the License.
+ * SPDX-License-Identifier: GPL-2.0-only
  *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
  */
 
 #include <assert.h>
-#include <errno.h>
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
@@ -28,6 +16,7 @@
 #include <lttng/lttng.h>
 #include <bin/lttng-sessiond/lttng-ust-abi.h>
 #include <common/defaults.h>
+#include <common/compat/errno.h>
 #include <bin/lttng-sessiond/trace-ust.h>
 #include <bin/lttng-sessiond/ust-app.h>
 #include <bin/lttng-sessiond/notification-thread.h>
@@ -47,13 +36,6 @@ int lttng_opt_quiet = 1;
 int lttng_opt_verbose;
 int lttng_opt_mi;
 
-int ust_consumerd32_fd;
-int ust_consumerd64_fd;
-
-/* 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"
        "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
@@ -143,7 +125,8 @@ static void test_create_ust_event(void)
        ev.type = LTTNG_EVENT_TRACEPOINT;
        ev.loglevel_type = LTTNG_EVENT_LOGLEVEL_ALL;
 
-       ret = trace_ust_create_event(&ev, NULL, NULL, NULL, false, &event);
+       ret = trace_ust_create_event(0, ev.name, NULL, ev.type, ev.loglevel_type,
+                       ev.loglevel, NULL, NULL, NULL, false, &event);
 
        ok(ret == LTTNG_OK, "Create UST event");
 
@@ -199,7 +182,8 @@ static void test_create_ust_event_exclusion(void)
        strncpy(LTTNG_EVENT_EXCLUSION_NAME_AT(exclusion, 1), random_name,
                LTTNG_SYMBOL_NAME_LEN);
 
-       ret = trace_ust_create_event(&ev, NULL, NULL, exclusion, false, &event);
+       ret = trace_ust_create_event(0, ev.name, NULL, ev.type, ev.loglevel_type,
+                       ev.loglevel, NULL, NULL, exclusion, false, &event);
        exclusion = NULL;
 
        ok(ret != LTTNG_OK, "Create UST event with identical exclusion names fails");
@@ -237,7 +221,8 @@ static void test_create_ust_event_exclusion(void)
        strncpy(LTTNG_EVENT_EXCLUSION_NAME_AT(exclusion_copy, 1),
                LTTNG_EVENT_EXCLUSION_NAME_AT(exclusion, 1), LTTNG_SYMBOL_NAME_LEN);
 
-       ret = trace_ust_create_event(&ev, NULL, NULL, exclusion, false, &event);
+       ret = trace_ust_create_event(0, ev.name, NULL, ev.type, ev.loglevel_type,
+                       ev.loglevel, NULL, NULL, exclusion, false, &event);
        exclusion = NULL;
        ok(ret == LTTNG_OK, "Create UST event with different exclusion names");
 
This page took 0.025892 seconds and 5 git commands to generate.