1f8d5d0ccSMatthew Wilcox // SPDX-License-Identifier: GPL-2.0+ 2f8d5d0ccSMatthew Wilcox /* 3f8d5d0ccSMatthew Wilcox * xarray.c: Userspace shim for XArray test-suite 4f8d5d0ccSMatthew Wilcox * Copyright (c) 2018 Matthew Wilcox <[email protected]> 5f8d5d0ccSMatthew Wilcox */ 6f8d5d0ccSMatthew Wilcox 7*74579d8dSLorenzo Stoakes #include "xarray-shared.h" 8ad3d6c72SMatthew Wilcox #include "test.h" 9ad3d6c72SMatthew Wilcox 10ad3d6c72SMatthew Wilcox #undef XA_DEBUG 11ad3d6c72SMatthew Wilcox #include "../../../lib/test_xarray.c" 12ad3d6c72SMatthew Wilcox xarray_tests(void)13ad3d6c72SMatthew Wilcoxvoid xarray_tests(void) 14ad3d6c72SMatthew Wilcox { 15ad3d6c72SMatthew Wilcox xarray_checks(); 16ad3d6c72SMatthew Wilcox xarray_exit(); 17ad3d6c72SMatthew Wilcox } 18ad3d6c72SMatthew Wilcox main(void)19ad3d6c72SMatthew Wilcoxint __weak main(void) 20ad3d6c72SMatthew Wilcox { 211bb4bd26SMatthew Wilcox (Oracle) rcu_register_thread(); 22ad3d6c72SMatthew Wilcox radix_tree_init(); 23ad3d6c72SMatthew Wilcox xarray_tests(); 24ad3d6c72SMatthew Wilcox radix_tree_cpu_dead(1); 25ad3d6c72SMatthew Wilcox rcu_barrier(); 26ad3d6c72SMatthew Wilcox if (nr_allocated) 27ad3d6c72SMatthew Wilcox printf("nr_allocated = %d\n", nr_allocated); 281bb4bd26SMatthew Wilcox (Oracle) rcu_unregister_thread(); 29ad3d6c72SMatthew Wilcox return 0; 30ad3d6c72SMatthew Wilcox } 31