projects
/
lttng-tools.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix: tests: register thread for RCU operations.
[lttng-tools.git]
/
tests
/
unit
/
test_session.c
diff --git
a/tests/unit/test_session.c
b/tests/unit/test_session.c
index 7242edded9879640cddfd2f408168ecf4b87397b..1e633187f8299c6b9d49af3b9d245384fd9612a9 100644
(file)
--- a/
tests/unit/test_session.c
+++ b/
tests/unit/test_session.c
@@
-16,7
+16,6
@@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
-#define _GNU_SOURCE
#include <assert.h>
#include <errno.h>
#include <stdio.h>
#include <assert.h>
#include <errno.h>
#include <stdio.h>
@@
-25,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>
@@
-43,9
+43,10
@@
static struct ltt_session_list *session_list;
static struct ltt_session_list *session_list;
-/* For
lttnger
r.h */
+/* For
erro
r.h */
int lttng_opt_quiet = 1;
int lttng_opt_verbose = 0;
int lttng_opt_quiet = 1;
int lttng_opt_verbose = 0;
+int lttng_opt_mi;
int ust_consumerd32_fd;
int ust_consumerd64_fd;
int ust_consumerd32_fd;
int ust_consumerd64_fd;
@@
-108,8
+109,7
@@
static void empty_session_list(void)
struct ltt_session *iter, *tmp;
cds_list_for_each_entry_safe(iter, tmp, &session_list->head, list) {
struct ltt_session *iter, *tmp;
cds_list_for_each_entry_safe(iter, tmp, &session_list->head, list) {
- cds_list_del(&iter->list);
- free(iter);
+ session_destroy(iter);
}
/* Session list must be 0 */
}
/* Session list must be 0 */
@@
-296,6
+296,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();
@@
-312,5
+314,7
@@
int main(int argc, char **argv)
test_large_session_number();
test_large_session_number();
+ rcu_unregister_thread();
+
return exit_status();
}
return exit_status();
}
This page took
0.024528 seconds
and
4
git commands to generate.