Fix: honor base path for network URIs
[lttng-tools.git] / tests / unit / test_session.c
index 991b1dca3de4e71d69d038bab9469bbef402af6c..c7ad4ec71be3d70b87100be069bab9c328d1c445 100644 (file)
@@ -132,7 +132,7 @@ static int create_one_session(char *name)
        struct ltt_session *session = NULL;
 
        session_lock_list();
-       ret_code = session_create(name, geteuid(), getegid(), &session);
+       ret_code = session_create(name, geteuid(), getegid(), NULL, &session);
        session_put(session);
        if (ret_code == LTTNG_OK) {
                /* Validate */
@@ -269,9 +269,13 @@ void test_destroy_session(void)
        ok(tmp != NULL,
           "Destroying session: session found");
 
-       ok(destroy_one_session(tmp) == 0,
-          "Destroying session: %s destroyed",
-          SESSION1);
+       if (tmp) {
+               ok(destroy_one_session(tmp) == 0,
+                  "Destroying session: %s destroyed",
+                  SESSION1);
+       } else {
+               skip(1, "Skipping session destruction as it was not found");
+       }
        session_unlock_list();
 }
 
@@ -288,7 +292,7 @@ void test_session_name_generation(void)
        const char *expected_session_name_prefix = DEFAULT_SESSION_NAME;
 
        session_lock_list();
-       ret_code = session_create(NULL, geteuid(), getegid(), &session);
+       ret_code = session_create(NULL, geteuid(), getegid(), NULL, &session);
        ok(ret_code == LTTNG_OK,
                "Create session with a NULL name (auto-generate a name)");
        if (!session) {
This page took 0.025719 seconds and 5 git commands to generate.