x is never reused, no need to shift it
[lttng-tools.git] / tests / unit / test_ust_data.c
index d81169572d0f6cd85a6f36836635382cf7f6fe8e..82d15b66d21ff6e34e20538c0b4e45723ad0d3d2 100644 (file)
@@ -38,7 +38,7 @@
 #define RANDOM_STRING_LEN      11
 
 /* Number of TAP tests in this file */
-#define NUM_TESTS 15
+#define NUM_TESTS 16
 
 /* For error.h */
 int lttng_opt_quiet = 1;
@@ -165,12 +165,12 @@ static void test_create_ust_event_exclusion(void)
        /* set up an exclusion set */
        exclusion = zmalloc(sizeof(*exclusion) +
                LTTNG_SYMBOL_NAME_LEN * exclusion_count);
+       ok(exclusion != NULL, "Create UST exclusion");
        if (!exclusion) {
                PERROR("zmalloc");
+               abort();
        }
 
-       ok(exclusion != NULL, "Create UST exclusion");
-
        exclusion->count = exclusion_count;
        random_name = get_random_string();
        strncpy(LTTNG_EVENT_EXCLUSION_NAME_AT(exclusion, 0), random_name,
@@ -179,13 +179,16 @@ static void test_create_ust_event_exclusion(void)
                LTTNG_SYMBOL_NAME_LEN);
 
        event = trace_ust_create_event(&ev, NULL, NULL, exclusion, false);
+       exclusion = NULL;
 
        ok(!event, "Create UST event with identical exclusion names fails");
 
        exclusion = zmalloc(sizeof(*exclusion) +
                LTTNG_SYMBOL_NAME_LEN * exclusion_count);
+       ok(exclusion != NULL, "Create UST exclusion");
        if (!exclusion) {
                PERROR("zmalloc");
+               abort();
        }
 
        exclusion->count = exclusion_count;
This page took 0.024462 seconds and 4 git commands to generate.