Fix: typo 'occured' -> 'occurred'
[lttng-tools.git] / tests / unit / test_session.c
index f2343c9916bd5636a455807616b549cfc1e56811..cfbb52d048dd00820e6817a24dbe221a5a165716 100644 (file)
@@ -24,6 +24,7 @@
 #include <unistd.h>
 #include <time.h>
 #include <sys/types.h>
+#include <urcu.h>
 
 #include <tap/tap.h>
 
@@ -156,7 +157,7 @@ static int destroy_one_session(struct ltt_session *session)
        int ret;
        char session_name[NAME_MAX];
 
-       strncpy(session_name, session->name, sizeof(session->name));
+       strncpy(session_name, session->name, sizeof(session_name));
        session_name[sizeof(session_name) - 1] = '\0';
 
        ret = session_destroy(session);
@@ -302,6 +303,8 @@ int main(int argc, char **argv)
 
        diag("Sessions unit tests");
 
+       rcu_register_thread();
+
        test_session_list();
 
        test_create_one_session();
@@ -318,6 +321,7 @@ int main(int argc, char **argv)
 
        test_large_session_number();
 
+       rcu_unregister_thread();
        assert(!fini_ht_cleanup_thread(&ht_cleanup_thread));
 
        return exit_status();
This page took 0.023736 seconds and 4 git commands to generate.