Greg Kroah-Hartman | b244131 | 2017-11-01 15:07:57 +0100 | [diff] [blame] | 1 | // SPDX-License-Identifier: GPL-2.0 |
Ingo Molnar | 3ca576a | 2013-10-02 16:21:37 +0200 | [diff] [blame] | 2 | /* |
| 3 | * test-all.c: Try to build all the main testcases at once. |
| 4 | * |
| 5 | * A well-configured system will have all the prereqs installed, so we can speed |
| 6 | * up auto-detection on such systems. |
| 7 | */ |
Ingo Molnar | baa9c30 | 2013-10-01 14:14:31 +0200 | [diff] [blame] | 8 | |
Ingo Molnar | 3ca576a | 2013-10-02 16:21:37 +0200 | [diff] [blame] | 9 | /* |
| 10 | * Quirk: Python and Perl headers cannot be in arbitrary places, so keep |
| 11 | * these 3 testcases at the top: |
| 12 | */ |
| 13 | #define main main_test_libpython |
| 14 | # include "test-libpython.c" |
| 15 | #undef main |
Ingo Molnar | baa9c30 | 2013-10-01 14:14:31 +0200 | [diff] [blame] | 16 | |
Ingo Molnar | 3ca576a | 2013-10-02 16:21:37 +0200 | [diff] [blame] | 17 | #define main main_test_libpython_version |
| 18 | # include "test-libpython-version.c" |
| 19 | #undef main |
Ingo Molnar | baa9c30 | 2013-10-01 14:14:31 +0200 | [diff] [blame] | 20 | |
Ingo Molnar | 3ca576a | 2013-10-02 16:21:37 +0200 | [diff] [blame] | 21 | #define main main_test_libperl |
| 22 | # include "test-libperl.c" |
| 23 | #undef main |
Ingo Molnar | baa9c30 | 2013-10-01 14:14:31 +0200 | [diff] [blame] | 24 | |
Ingo Molnar | 3ca576a | 2013-10-02 16:21:37 +0200 | [diff] [blame] | 25 | #define main main_test_hello |
| 26 | # include "test-hello.c" |
| 27 | #undef main |
Ingo Molnar | baa9c30 | 2013-10-01 14:14:31 +0200 | [diff] [blame] | 28 | |
Ingo Molnar | 3ca576a | 2013-10-02 16:21:37 +0200 | [diff] [blame] | 29 | #define main main_test_libelf |
| 30 | # include "test-libelf.c" |
| 31 | #undef main |
Ingo Molnar | baa9c30 | 2013-10-01 14:14:31 +0200 | [diff] [blame] | 32 | |
Ingo Molnar | 3ca576a | 2013-10-02 16:21:37 +0200 | [diff] [blame] | 33 | #define main main_test_libelf_mmap |
| 34 | # include "test-libelf-mmap.c" |
| 35 | #undef main |
Ingo Molnar | baa9c30 | 2013-10-01 14:14:31 +0200 | [diff] [blame] | 36 | |
Arnaldo Carvalho de Melo | 8feb8ef | 2018-11-19 16:56:22 -0300 | [diff] [blame] | 37 | #define main main_test_get_current_dir_name |
| 38 | # include "test-get_current_dir_name.c" |
| 39 | #undef main |
| 40 | |
Ingo Molnar | 3ca576a | 2013-10-02 16:21:37 +0200 | [diff] [blame] | 41 | #define main main_test_glibc |
| 42 | # include "test-glibc.c" |
| 43 | #undef main |
Ingo Molnar | baa9c30 | 2013-10-01 14:14:31 +0200 | [diff] [blame] | 44 | |
Ingo Molnar | 3ca576a | 2013-10-02 16:21:37 +0200 | [diff] [blame] | 45 | #define main main_test_dwarf |
| 46 | # include "test-dwarf.c" |
| 47 | #undef main |
Ingo Molnar | baa9c30 | 2013-10-01 14:14:31 +0200 | [diff] [blame] | 48 | |
Arnaldo Carvalho de Melo | 49247345 | 2016-04-05 11:33:41 -0300 | [diff] [blame] | 49 | #define main main_test_dwarf_getlocations |
| 50 | # include "test-dwarf_getlocations.c" |
| 51 | #undef main |
| 52 | |
Arnaldo Carvalho de Melo | 11c6cbe | 2018-11-21 17:42:00 -0300 | [diff] [blame] | 53 | #define main main_test_eventfd |
| 54 | # include "test-eventfd.c" |
| 55 | #undef main |
| 56 | |
Ingo Molnar | 3ca576a | 2013-10-02 16:21:37 +0200 | [diff] [blame] | 57 | #define main main_test_libelf_getphdrnum |
| 58 | # include "test-libelf-getphdrnum.c" |
| 59 | #undef main |
Ingo Molnar | baa9c30 | 2013-10-01 14:14:31 +0200 | [diff] [blame] | 60 | |
Arnaldo Carvalho de Melo | 1c1a3a4 | 2016-07-12 12:19:09 -0300 | [diff] [blame] | 61 | #define main main_test_libelf_gelf_getnote |
| 62 | # include "test-libelf-gelf_getnote.c" |
| 63 | #undef main |
| 64 | |
Arnaldo Carvalho de Melo | 2492c46 | 2016-07-04 19:35:47 -0300 | [diff] [blame] | 65 | #define main main_test_libelf_getshdrstrndx |
| 66 | # include "test-libelf-getshdrstrndx.c" |
| 67 | #undef main |
| 68 | |
Ingo Molnar | 3ca576a | 2013-10-02 16:21:37 +0200 | [diff] [blame] | 69 | #define main main_test_libunwind |
| 70 | # include "test-libunwind.c" |
| 71 | #undef main |
Ingo Molnar | baa9c30 | 2013-10-01 14:14:31 +0200 | [diff] [blame] | 72 | |
Ingo Molnar | 3ca576a | 2013-10-02 16:21:37 +0200 | [diff] [blame] | 73 | #define main main_test_libaudit |
| 74 | # include "test-libaudit.c" |
| 75 | #undef main |
Ingo Molnar | baa9c30 | 2013-10-01 14:14:31 +0200 | [diff] [blame] | 76 | |
Ingo Molnar | 3ca576a | 2013-10-02 16:21:37 +0200 | [diff] [blame] | 77 | #define main main_test_libslang |
| 78 | # include "test-libslang.c" |
| 79 | #undef main |
Ingo Molnar | baa9c30 | 2013-10-01 14:14:31 +0200 | [diff] [blame] | 80 | |
Ingo Molnar | 3ca576a | 2013-10-02 16:21:37 +0200 | [diff] [blame] | 81 | #define main main_test_gtk2 |
| 82 | # include "test-gtk2.c" |
| 83 | #undef main |
Ingo Molnar | baa9c30 | 2013-10-01 14:14:31 +0200 | [diff] [blame] | 84 | |
Ingo Molnar | 3ca576a | 2013-10-02 16:21:37 +0200 | [diff] [blame] | 85 | #define main main_test_gtk2_infobar |
| 86 | # include "test-gtk2-infobar.c" |
| 87 | #undef main |
Ingo Molnar | baa9c30 | 2013-10-01 14:14:31 +0200 | [diff] [blame] | 88 | |
Ingo Molnar | 3ca576a | 2013-10-02 16:21:37 +0200 | [diff] [blame] | 89 | #define main main_test_libbfd |
| 90 | # include "test-libbfd.c" |
| 91 | #undef main |
Ingo Molnar | baa9c30 | 2013-10-01 14:14:31 +0200 | [diff] [blame] | 92 | |
Ingo Molnar | 3ca576a | 2013-10-02 16:21:37 +0200 | [diff] [blame] | 93 | #define main main_test_backtrace |
| 94 | # include "test-backtrace.c" |
| 95 | #undef main |
Ingo Molnar | baa9c30 | 2013-10-01 14:14:31 +0200 | [diff] [blame] | 96 | |
Ingo Molnar | 3ca576a | 2013-10-02 16:21:37 +0200 | [diff] [blame] | 97 | #define main main_test_libnuma |
| 98 | # include "test-libnuma.c" |
| 99 | #undef main |
Ingo Molnar | baa9c30 | 2013-10-01 14:14:31 +0200 | [diff] [blame] | 100 | |
Arnaldo Carvalho de Melo | f8ac860 | 2015-09-17 12:20:28 -0300 | [diff] [blame] | 101 | #define main main_test_numa_num_possible_cpus |
| 102 | # include "test-numa_num_possible_cpus.c" |
| 103 | #undef main |
| 104 | |
David Ahern | 87419c9 | 2013-10-29 10:43:16 -0600 | [diff] [blame] | 105 | #define main main_test_timerfd |
| 106 | # include "test-timerfd.c" |
| 107 | #undef main |
| 108 | |
Jiri Olsa | bc32358 | 2013-11-28 12:33:01 +0100 | [diff] [blame] | 109 | #define main main_test_stackprotector_all |
| 110 | # include "test-stackprotector-all.c" |
| 111 | #undef main |
| 112 | |
Jiri Olsa | 4575789 | 2014-02-19 16:52:56 +0100 | [diff] [blame] | 113 | #define main main_test_libdw_dwarf_unwind |
| 114 | # include "test-libdw-dwarf-unwind.c" |
| 115 | #undef main |
| 116 | |
Adrian Hunter | f6d3136 | 2014-07-14 13:02:53 +0300 | [diff] [blame] | 117 | #define main main_test_sync_compare_and_swap |
| 118 | # include "test-sync-compare-and-swap.c" |
| 119 | #undef main |
| 120 | |
Namhyung Kim | e92ce12 | 2014-10-31 16:51:38 +0900 | [diff] [blame] | 121 | #define main main_test_zlib |
| 122 | # include "test-zlib.c" |
| 123 | #undef main |
| 124 | |
Vineet Gupta | 459a3df | 2015-01-13 19:13:24 +0530 | [diff] [blame] | 125 | #define main main_test_pthread_attr_setaffinity_np |
Jiri Olsa | c59a142 | 2015-03-11 09:02:00 +0100 | [diff] [blame] | 126 | # include "test-pthread-attr-setaffinity-np.c" |
Vineet Gupta | 459a3df | 2015-01-13 19:13:24 +0530 | [diff] [blame] | 127 | #undef main |
| 128 | |
Arnaldo Carvalho de Melo | 25ab5ab | 2017-12-05 10:14:42 -0300 | [diff] [blame] | 129 | #define main main_test_pthread_barrier |
| 130 | # include "test-pthread-barrier.c" |
| 131 | #undef main |
| 132 | |
Arnaldo Carvalho de Melo | 120010c | 2017-03-02 12:55:49 -0300 | [diff] [blame] | 133 | #define main main_test_sched_getcpu |
| 134 | # include "test-sched_getcpu.c" |
| 135 | #undef main |
| 136 | |
Jiri Olsa | 97e7a51 | 2015-03-11 09:00:41 +0100 | [diff] [blame] | 137 | # if 0 |
| 138 | /* |
| 139 | * Disable libbabeltrace check for test-all, because the requested |
| 140 | * library version is not released yet in most distributions. Will |
| 141 | * reenable later. |
| 142 | */ |
| 143 | |
Jiri Olsa | 53d0a57 | 2015-02-20 23:16:58 +0100 | [diff] [blame] | 144 | #define main main_test_libbabeltrace |
| 145 | # include "test-libbabeltrace.c" |
| 146 | #undef main |
Jiri Olsa | 97e7a51 | 2015-03-11 09:00:41 +0100 | [diff] [blame] | 147 | #endif |
Jiri Olsa | 53d0a57 | 2015-02-20 23:16:58 +0100 | [diff] [blame] | 148 | |
Jiri Olsa | 6c6f0f6 | 2015-03-04 11:35:47 +0100 | [diff] [blame] | 149 | #define main main_test_lzma |
| 150 | # include "test-lzma.c" |
| 151 | #undef main |
| 152 | |
Arnaldo Carvalho de Melo | b0063db | 2015-09-17 12:54:30 -0300 | [diff] [blame] | 153 | #define main main_test_get_cpuid |
| 154 | # include "test-get_cpuid.c" |
| 155 | #undef main |
| 156 | |
Wang Nan | 0c4d40d | 2016-01-11 13:48:01 +0000 | [diff] [blame] | 157 | #define main main_test_bpf |
| 158 | # include "test-bpf.c" |
| 159 | #undef main |
| 160 | |
Stephane Eranian | 8ee4646 | 2015-11-30 10:02:21 +0100 | [diff] [blame] | 161 | #define main main_test_libcrypto |
| 162 | # include "test-libcrypto.c" |
| 163 | #undef main |
| 164 | |
Masami Hiramatsu | e26e63b | 2016-07-12 19:05:56 +0900 | [diff] [blame] | 165 | #define main main_test_sdt |
| 166 | # include "test-sdt.c" |
| 167 | #undef main |
| 168 | |
Arnaldo Carvalho de Melo | 86bcdb5 | 2017-07-18 17:15:29 -0300 | [diff] [blame] | 169 | #define main main_test_setns |
| 170 | # include "test-setns.c" |
| 171 | #undef main |
| 172 | |
Alexey Budankov | 2a07d81 | 2018-11-06 12:03:35 +0300 | [diff] [blame] | 173 | #define main main_test_libaio |
| 174 | # include "test-libaio.c" |
| 175 | #undef main |
| 176 | |
Arnaldo Carvalho de Melo | a96c03e | 2019-02-14 12:01:04 -0300 | [diff] [blame] | 177 | #define main main_test_reallocarray |
| 178 | # include "test-reallocarray.c" |
| 179 | #undef main |
| 180 | |
Ingo Molnar | baa9c30 | 2013-10-01 14:14:31 +0200 | [diff] [blame] | 181 | int main(int argc, char *argv[]) |
| 182 | { |
Ingo Molnar | 3ca576a | 2013-10-02 16:21:37 +0200 | [diff] [blame] | 183 | main_test_libpython(); |
| 184 | main_test_libpython_version(); |
| 185 | main_test_libperl(); |
| 186 | main_test_hello(); |
| 187 | main_test_libelf(); |
| 188 | main_test_libelf_mmap(); |
Arnaldo Carvalho de Melo | 8feb8ef | 2018-11-19 16:56:22 -0300 | [diff] [blame] | 189 | main_test_get_current_dir_name(); |
Ingo Molnar | 3ca576a | 2013-10-02 16:21:37 +0200 | [diff] [blame] | 190 | main_test_glibc(); |
| 191 | main_test_dwarf(); |
Arnaldo Carvalho de Melo | 49247345 | 2016-04-05 11:33:41 -0300 | [diff] [blame] | 192 | main_test_dwarf_getlocations(); |
Arnaldo Carvalho de Melo | 11c6cbe | 2018-11-21 17:42:00 -0300 | [diff] [blame] | 193 | main_test_eventfd(); |
Ingo Molnar | 3ca576a | 2013-10-02 16:21:37 +0200 | [diff] [blame] | 194 | main_test_libelf_getphdrnum(); |
Arnaldo Carvalho de Melo | 1c1a3a4 | 2016-07-12 12:19:09 -0300 | [diff] [blame] | 195 | main_test_libelf_gelf_getnote(); |
Arnaldo Carvalho de Melo | 2492c46 | 2016-07-04 19:35:47 -0300 | [diff] [blame] | 196 | main_test_libelf_getshdrstrndx(); |
Ingo Molnar | 3ca576a | 2013-10-02 16:21:37 +0200 | [diff] [blame] | 197 | main_test_libunwind(); |
| 198 | main_test_libaudit(); |
| 199 | main_test_libslang(); |
| 200 | main_test_gtk2(argc, argv); |
| 201 | main_test_gtk2_infobar(argc, argv); |
| 202 | main_test_libbfd(); |
Ingo Molnar | 3ca576a | 2013-10-02 16:21:37 +0200 | [diff] [blame] | 203 | main_test_backtrace(); |
| 204 | main_test_libnuma(); |
Arnaldo Carvalho de Melo | f8ac860 | 2015-09-17 12:20:28 -0300 | [diff] [blame] | 205 | main_test_numa_num_possible_cpus(); |
David Ahern | 87419c9 | 2013-10-29 10:43:16 -0600 | [diff] [blame] | 206 | main_test_timerfd(); |
Jiri Olsa | bc32358 | 2013-11-28 12:33:01 +0100 | [diff] [blame] | 207 | main_test_stackprotector_all(); |
Jiri Olsa | 4575789 | 2014-02-19 16:52:56 +0100 | [diff] [blame] | 208 | main_test_libdw_dwarf_unwind(); |
Adrian Hunter | f6d3136 | 2014-07-14 13:02:53 +0300 | [diff] [blame] | 209 | main_test_sync_compare_and_swap(argc, argv); |
Namhyung Kim | e92ce12 | 2014-10-31 16:51:38 +0900 | [diff] [blame] | 210 | main_test_zlib(); |
Vineet Gupta | 459a3df | 2015-01-13 19:13:24 +0530 | [diff] [blame] | 211 | main_test_pthread_attr_setaffinity_np(); |
Arnaldo Carvalho de Melo | 25ab5ab | 2017-12-05 10:14:42 -0300 | [diff] [blame] | 212 | main_test_pthread_barrier(); |
Jiri Olsa | 6c6f0f6 | 2015-03-04 11:35:47 +0100 | [diff] [blame] | 213 | main_test_lzma(); |
Arnaldo Carvalho de Melo | b0063db | 2015-09-17 12:54:30 -0300 | [diff] [blame] | 214 | main_test_get_cpuid(); |
Wang Nan | 0c4d40d | 2016-01-11 13:48:01 +0000 | [diff] [blame] | 215 | main_test_bpf(); |
Stephane Eranian | 8ee4646 | 2015-11-30 10:02:21 +0100 | [diff] [blame] | 216 | main_test_libcrypto(); |
Arnaldo Carvalho de Melo | 120010c | 2017-03-02 12:55:49 -0300 | [diff] [blame] | 217 | main_test_sched_getcpu(); |
Masami Hiramatsu | e26e63b | 2016-07-12 19:05:56 +0900 | [diff] [blame] | 218 | main_test_sdt(); |
Arnaldo Carvalho de Melo | 86bcdb5 | 2017-07-18 17:15:29 -0300 | [diff] [blame] | 219 | main_test_setns(); |
Alexey Budankov | 2a07d81 | 2018-11-06 12:03:35 +0300 | [diff] [blame] | 220 | main_test_libaio(); |
Arnaldo Carvalho de Melo | a96c03e | 2019-02-14 12:01:04 -0300 | [diff] [blame] | 221 | main_test_reallocarray(); |
Ingo Molnar | baa9c30 | 2013-10-01 14:14:31 +0200 | [diff] [blame] | 222 | |
| 223 | return 0; |
| 224 | } |