Major overhaul to testing infrastructure
[akaros.git] / kern / src / ktest.c
1 /*
2  * Declaration of all the tests to be ran.
3  */
4
5 #include <stdbool.h>
6 #include <ktest.h>
7 #include "pb_ktests.c"
8
9 /* Global string used to report info about the last completed test */
10 char ktest_msg[1024];
11
12 /* Postboot kernel tests declarations. */
13 struct ktest pb_ktests[] = {
14 #ifdef CONFIG_X86
15         KTEST_REG(ipi_sending,        CONFIG_TEST_ipi_sending),
16         KTEST_REG(pic_reception,      CONFIG_TEST_pic_reception),
17         KTEST_REG(ioapic_pit_reroute, CONFIG_TEST_ioapic_status_bit),
18         KTEST_REG(lapic_status_bit,   CONFIG_TEST_lapic_status_bit),
19         KTEST_REG(pit,                CONFIG_TEST_pit),
20         KTEST_REG(circ_buffer,        CONFIG_TEST_circ_buffer),
21         KTEST_REG(kernel_messages,    CONFIG_TEST_kernel_messages),
22 #endif // CONFIG_X86
23 #ifdef CONFIG_PAGE_COLORING
24         KTEST_REG(page_coloring,      CONFIG_TEST_page_coloring),
25         KTEST_REG(color_alloc,        CONFIG_TEST_color_alloc),
26 #endif // CONFIG_PAGE_COLORING
27         KTEST_REG(print_info,         CONFIG_TEST_print_info),
28         KTEST_REG(barrier,            CONFIG_TEST_barrier),
29         KTEST_REG(interrupts_irqsave, CONFIG_TEST_interrupts_irqsave),
30         KTEST_REG(bitmasks,           CONFIG_TEST_bitmasks),
31         KTEST_REG(checklists,         CONFIG_TEST_checklists),
32         KTEST_REG(smp_call_functions, CONFIG_TEST_smp_call_functions),
33         KTEST_REG(slab,               CONFIG_TEST_slab),
34         KTEST_REG(kmalloc,            CONFIG_TEST_kmalloc),
35         KTEST_REG(hashtable,          CONFIG_TEST_hashtable),
36         KTEST_REG(bcq,                CONFIG_TEST_bcq),
37         KTEST_REG(ucq,                CONFIG_TEST_ucq),
38         KTEST_REG(vm_regions,         CONFIG_TEST_vm_regions),
39         KTEST_REG(radix_tree,         CONFIG_TEST_radix_tree),
40         KTEST_REG(random_fs,          CONFIG_TEST_random_fs),
41         KTEST_REG(kthreads,           CONFIG_TEST_kthreads),
42         KTEST_REG(kref,               CONFIG_TEST_kref),
43         KTEST_REG(atomics,            CONFIG_TEST_atomics),
44         KTEST_REG(abort_halt,         CONFIG_TEST_abort_halt),
45         KTEST_REG(cv,                 CONFIG_TEST_cv),
46         KTEST_REG(memset,             CONFIG_TEST_memset),
47         KTEST_REG(setjmp,             CONFIG_TEST_setjmp),
48         KTEST_REG(apipe,              CONFIG_TEST_apipe),
49         KTEST_REG(rwlock,             CONFIG_TEST_rwlock),
50         KTEST_REG(rv,                 CONFIG_TEST_rv),
51         KTEST_REG(alarm,              CONFIG_TEST_alarm)
52 };
53 int num_pb_ktests = sizeof(pb_ktests) / sizeof(struct ktest);
54