Clean-up: Move agent_apps_ht_by_sock definition to main.c
[lttng-tools.git] / tests / unit / test_ust_data.c
index dd00089266ad7770ce4c64e18b1340439f167c9b..d7d2e35398ecf8b73a1de05bb3bb4c49a80f1df4 100644 (file)
@@ -39,7 +39,7 @@
 #define RANDOM_STRING_LEN      11
 
 /* Number of TAP tests in this file */
-#define NUM_TESTS 10
+#define NUM_TESTS 11
 
 /* For error.h */
 int lttng_opt_quiet = 1;
@@ -49,6 +49,9 @@ int lttng_opt_mi;
 int ust_consumerd32_fd;
 int ust_consumerd64_fd;
 
+/* Global variable required by sessiond objects being linked-in */
+struct lttng_ht *agent_apps_ht_by_sock;
+
 static const char alphanum[] =
        "0123456789"
        "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
@@ -157,6 +160,12 @@ static void test_create_ust_event_exclusion(void)
 
        /* set up an exclusion set */
        exclusion = zmalloc(sizeof(*exclusion) + LTTNG_SYMBOL_NAME_LEN);
+       if (!exclusion) {
+               PERROR("zmalloc");
+       }
+
+       ok(exclusion != NULL, "Create UST exclusion");
+
        exclusion->count = 1;
        strncpy((char *)(exclusion->names), get_random_string(), LTTNG_SYMBOL_NAME_LEN);
 
This page took 0.024425 seconds and 5 git commands to generate.