projects
/
lttng-tools.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Tests: add a session rotation ongoing/completed notification test
[lttng-tools.git]
/
tests
/
unit
/
test_session.c
diff --git
a/tests/unit/test_session.c
b/tests/unit/test_session.c
index f2343c9916bd5636a455807616b549cfc1e56811..cfbb52d048dd00820e6817a24dbe221a5a165716 100644
(file)
--- a/
tests/unit/test_session.c
+++ b/
tests/unit/test_session.c
@@
-24,6
+24,7
@@
#include <unistd.h>
#include <time.h>
#include <sys/types.h>
#include <unistd.h>
#include <time.h>
#include <sys/types.h>
+#include <urcu.h>
#include <tap/tap.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];
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);
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");
diag("Sessions unit tests");
+ rcu_register_thread();
+
test_session_list();
test_create_one_session();
test_session_list();
test_create_one_session();
@@
-318,6
+321,7
@@
int main(int argc, char **argv)
test_large_session_number();
test_large_session_number();
+ rcu_unregister_thread();
assert(!fini_ht_cleanup_thread(&ht_cleanup_thread));
return exit_status();
assert(!fini_ht_cleanup_thread(&ht_cleanup_thread));
return exit_status();
This page took
0.025524 seconds
and
5
git commands to generate.