From: Jonathan Rajotte Date: Thu, 26 Jan 2017 19:53:03 +0000 (-0500) Subject: Fix: tests: register thread for RCU operations. X-Git-Tag: v2.9.4~5 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=5b9f4c239e3b7f7c4909ee25ce1e6b464fad738f;p=lttng-tools.git Fix: tests: register thread for RCU operations. Signed-off-by: Jonathan Rajotte Signed-off-by: Jérémie Galarneau --- diff --git a/tests/unit/test_session.c b/tests/unit/test_session.c index f2343c991..03e6b9161 100644 --- a/tests/unit/test_session.c +++ b/tests/unit/test_session.c @@ -24,6 +24,7 @@ #include #include #include +#include #include @@ -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(); diff --git a/tests/unit/test_ust_data.c b/tests/unit/test_ust_data.c index cf795cfa0..7996b8e60 100644 --- a/tests/unit/test_ust_data.c +++ b/tests/unit/test_ust_data.c @@ -23,6 +23,7 @@ #include #include #include +#include #include #include @@ -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(); }