···18271827 This is intended to help people writing architecture-specific18281828 optimized versions. If unsure, say N.1829182918301830+config TEST_IDA18311831+ tristate "Perform selftest on IDA functions"18321832+18301833config TEST_PARMAN18311834 tristate "Perform selftest on priority array manager"18321835 default n
···309309 idr_u32_test(0);310310}311311312312+#define module_init(x)313313+#define module_exit(x)314314+#define MODULE_AUTHOR(x)315315+#define MODULE_LICENSE(x)316316+#define dump_stack() assert(0)317317+void ida_dump(struct ida *);318318+319319+#include "../../../lib/test_ida.c"320320+312321/*313322 * Check that we get the correct error when we run out of memory doing314323 * allocations. To ensure we run out of memory, just "forget" to preload.···497488 ida_destroy(&ida);498489}499490500500-void ida_checks(void)491491+void user_ida_checks(void)501492{502493 DEFINE_IDA(ida);503494 int id;···591582 pthread_join(threads[i], NULL);592583}593584585585+void ida_tests(void)586586+{587587+ user_ida_checks();588588+ ida_checks();589589+ ida_exit();590590+ ida_thread_tests();591591+}592592+594593int __weak main(void)595594{596595 radix_tree_init();597596 idr_checks();598598- ida_checks();599599- ida_thread_tests();597597+ ida_tests();600598 radix_tree_cpu_dead(1);601599 rcu_barrier();602600 if (nr_allocated)