diff options
Diffstat (limited to 'tools/testing/radix-tree/xarray.c')
| -rw-r--r-- | tools/testing/radix-tree/xarray.c | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/tools/testing/radix-tree/xarray.c b/tools/testing/radix-tree/xarray.c new file mode 100644 index 000000000000..253208a8541b --- /dev/null +++ b/tools/testing/radix-tree/xarray.c @@ -0,0 +1,30 @@ +// SPDX-License-Identifier: GPL-2.0+ +/* + * xarray.c: Userspace shim for XArray test-suite + * Copyright (c) 2018 Matthew Wilcox <willy@infradead.org> + */ + +#include "xarray-shared.h" +#include "test.h" + +#undef XA_DEBUG +#include "../../../lib/test_xarray.c" + +void xarray_tests(void) +{ + xarray_checks(); + xarray_exit(); +} + +int __weak main(void) +{ + rcu_register_thread(); + radix_tree_init(); + xarray_tests(); + radix_tree_cpu_dead(1); + rcu_barrier(); + if (nr_allocated) + printf("nr_allocated = %d\n", nr_allocated); + rcu_unregister_thread(); + return 0; +} |
