fd-tracker test: register rcu thread of test application
authorJérémie Galarneau <jeremie.galarneau@efficios.com>
Fri, 6 Jul 2018 16:04:13 +0000 (12:04 -0400)
committerJonathan Rajotte <jonathan.rajotte-julien@efficios.com>
Fri, 21 Sep 2018 04:00:52 +0000 (00:00 -0400)
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
tests/unit/test_fd_tracker.c

index 4c6022ef9be1767d8037b33cec33ade226051dd9..4b948b342d914ec21957741022b90bbd8b614a81 100644 (file)
@@ -30,6 +30,8 @@
 #include <fcntl.h>
 #include <sys/stat.h>
 
+#include <urcu.h>
+
 #include <common/fd-tracker/fd-tracker.h>
 #include <common/error.h>
 
@@ -635,6 +637,8 @@ int main(int argc, char **argv)
        plan_tests(NUM_TESTS);
        diag("File descriptor tracker unit tests");
 
+       rcu_register_thread();
+
        unknown_fds_count = fd_count() - STDIO_FD_COUNT;
        assert(unknown_fds_count >= 0);
 
@@ -657,5 +661,6 @@ int main(int argc, char **argv)
        diag("Mixed - check that file descritptor limit is enforced");
        test_mixed_limit();
 
+       rcu_unregister_thread();
        return exit_status();
 }
This page took 0.026438 seconds and 5 git commands to generate.