#include <common/defaults.h>
#include <bin/lttng-sessiond/trace-ust.h>
#include <bin/lttng-sessiond/ust-app.h>
+#include <bin/lttng-sessiond/notification-thread.h>
#include <tap/tap.h>
int ust_consumerd32_fd;
int ust_consumerd64_fd;
-/* Global variable required by sessiond objects being linked-in */
+/* 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";
static char random_string[RANDOM_STRING_LEN];
-static struct ltt_ust_session *usess;
-static struct lttng_domain dom;
-
/*
* Return random string of 10 characters.
* Not thread-safe.
static void test_create_one_ust_session(void)
{
- dom.type = LTTNG_DOMAIN_UST;
+ struct ltt_ust_session *usess =
+ trace_ust_create_session(42);
- usess = trace_ust_create_session(42);
ok(usess != NULL, "Create UST session");
if (!usess) {
{
struct ltt_ust_channel *uchan;
struct lttng_channel attr;
+ struct lttng_channel_extended extended;
memset(&attr, 0, sizeof(attr));
+ memset(&extended, 0, sizeof(extended));
+ attr.attr.extended.ptr = &extended;
ok(lttng_strncpy(attr.name, "channel0", sizeof(attr.name)) == 0,
"Validate channel name length");
uchan = trace_ust_create_channel(&attr, LTTNG_DOMAIN_UST);
ok(uchan != NULL, "Create UST channel");
- if (!usess) {
- skip(1, "UST session is null");
+ if (!uchan) {
+ skip(1, "UST channel is null");
return;
}
uctx = trace_ust_create_context(&ectx);
ok(uctx != NULL, "Create UST context");
- ok((int) uctx->ctx.ctx == LTTNG_UST_CONTEXT_VTID,
- "Validate UST context");
+ if (uctx) {
+ ok((int) uctx->ctx.ctx == LTTNG_UST_CONTEXT_VTID,
+ "Validate UST context");
+ } else {
+ skip(1, "Skipping UST context validation as creation failed");
+ }
free(uctx);
}