Fix: tests: register thread for RCU operations.
authorJonathan Rajotte <jonathan.rajotte-julien@efficios.com>
Thu, 26 Jan 2017 19:53:03 +0000 (14:53 -0500)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Tue, 14 Feb 2017 15:16:50 +0000 (10:16 -0500)
Signed-off-by: Jonathan Rajotte <jonathan.rajotte-julien@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
tests/unit/test_session.c
tests/unit/test_ust_data.c

index f2343c9916bd5636a455807616b549cfc1e56811..03e6b91611ad0732fa82faf0c386c252cf0ca4c5 100644 (file)
@@ -24,6 +24,7 @@
 #include <unistd.h>
 #include <time.h>
 #include <sys/types.h>
+#include <urcu.h>
 
 #include <tap/tap.h>
 
@@ -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();
index cf795cfa0759631867ecf1e22872fa420366a0b2..7996b8e60e7d4e9ce60cea4220e44a357692d6ce 100644 (file)
@@ -23,6 +23,7 @@
 #include <string.h>
 #include <unistd.h>
 #include <time.h>
+#include <urcu.h>
 
 #include <lttng/lttng.h>
 #include <bin/lttng-sessiond/lttng-ust-abi.h>
@@ -257,11 +258,15 @@ int main(int argc, char **argv)
 
        diag("UST data structures unit test");
 
+       rcu_register_thread();
+
        test_create_one_ust_session();
        test_create_ust_channel();
        test_create_ust_event();
        test_create_ust_context();
        test_create_ust_event_exclusion();
 
+       rcu_unregister_thread();
+
        return exit_status();
 }
This page took 0.026915 seconds and 4 git commands to generate.