diff options
Diffstat (limited to 'tools/testing/radix-tree/xarray.c')
-rw-r--r-- | tools/testing/radix-tree/xarray.c | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/tools/testing/radix-tree/xarray.c b/tools/testing/radix-tree/xarray.c index 9bbd667172a7..e61e43efe463 100644 --- a/tools/testing/radix-tree/xarray.c +++ b/tools/testing/radix-tree/xarray.c | |||
@@ -4,4 +4,32 @@ | |||
4 | * Copyright (c) 2018 Matthew Wilcox <willy@infradead.org> | 4 | * Copyright (c) 2018 Matthew Wilcox <willy@infradead.org> |
5 | */ | 5 | */ |
6 | 6 | ||
7 | #define XA_DEBUG | ||
8 | #include "test.h" | ||
9 | |||
10 | #define module_init(x) | ||
11 | #define module_exit(x) | ||
12 | #define MODULE_AUTHOR(x) | ||
13 | #define MODULE_LICENSE(x) | ||
14 | #define dump_stack() assert(0) | ||
15 | |||
7 | #include "../../../lib/xarray.c" | 16 | #include "../../../lib/xarray.c" |
17 | #undef XA_DEBUG | ||
18 | #include "../../../lib/test_xarray.c" | ||
19 | |||
20 | void xarray_tests(void) | ||
21 | { | ||
22 | xarray_checks(); | ||
23 | xarray_exit(); | ||
24 | } | ||
25 | |||
26 | int __weak main(void) | ||
27 | { | ||
28 | radix_tree_init(); | ||
29 | xarray_tests(); | ||
30 | radix_tree_cpu_dead(1); | ||
31 | rcu_barrier(); | ||
32 | if (nr_allocated) | ||
33 | printf("nr_allocated = %d\n", nr_allocated); | ||
34 | return 0; | ||
35 | } | ||