hc
2025-02-14 bbb9540dc49f70f6b703d1c8d1b85fa5f602d86e
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
// SPDX-License-Identifier: GPL-2.0+
/*
 * xarray.c: Userspace shim for XArray test-suite
 * Copyright (c) 2018 Matthew Wilcox <willy@infradead.org>
 */
 
#define XA_DEBUG
#include "test.h"
 
#define module_init(x)
#define module_exit(x)
#define MODULE_AUTHOR(x)
#define MODULE_LICENSE(x)
#define dump_stack()    assert(0)
 
#include "../../../lib/xarray.c"
#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;
}