+ /*
+ * We are giving ownership of the exclusion struct to the
+ * trace_ust_create_event() function. Make a copy of the exclusion struct
+ * so we can compare it later.
+ */
+
+ exclusion->count = exclusion_count;
+ strncpy(LTTNG_EVENT_EXCLUSION_NAME_AT(exclusion, 0),
+ get_random_string(), LTTNG_SYMBOL_NAME_LEN);
+ strncpy(LTTNG_EVENT_EXCLUSION_NAME_AT(exclusion, 1),
+ get_random_string(), LTTNG_SYMBOL_NAME_LEN);
+
+ exclusion_copy->count = exclusion_count;
+ strncpy(LTTNG_EVENT_EXCLUSION_NAME_AT(exclusion_copy, 0),
+ LTTNG_EVENT_EXCLUSION_NAME_AT(exclusion, 0), LTTNG_SYMBOL_NAME_LEN);
+ 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);
+ exclusion = NULL;
+ ok(ret == LTTNG_OK, "Create UST event with different exclusion names");
+
+ if (!event) {
+ skip(1, "UST event with exclusion is null");
+ goto end;
+ }