5 # Copyright(c) 2010-2012 Intel Corporation. All rights reserved.
8 # Redistribution and use in source and binary forms, with or without
9 # modification, are permitted provided that the following conditions
12 # * Redistributions of source code must retain the above copyright
13 # notice, this list of conditions and the following disclaimer.
14 # * Redistributions in binary form must reproduce the above copyright
15 # notice, this list of conditions and the following disclaimer in
16 # the documentation and/or other materials provided with the
18 # * Neither the name of Intel Corporation nor the names of its
19 # contributors may be used to endorse or promote products derived
20 # from this software without specific prior written permission.
22 # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
23 # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
24 # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
25 # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
26 # OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
27 # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
28 # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
29 # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
30 # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
31 # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
32 # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
35 # Test data for autotests
38 from autotest_test_funcs import *
40 # quick and dirty function to find out number of sockets
42 return len(glob("/sys/devices/system/node/node*"))
44 # multiply given number for all sockets
45 # e.g. 32 becomes 32,32 or 32,32,32,32 etc.
47 mem_per_socket = num / num_sockets()
48 return ",".join([str(mem_per_socket)] * num_sockets())
50 # groups of tests that can be run in parallel
51 # the grouping has been found largely empirically
52 parallel_test_group_list = [
60 "Name" : "Timer autotest",
61 "Command" : "timer_autotest",
62 "Func" : timer_autotest,
66 "Name" : "Debug autotest",
67 "Command" : "debug_autotest",
68 "Func" : default_autotest,
72 "Name" : "Errno autotest",
73 "Command" : "errno_autotest",
74 "Func" : default_autotest,
78 "Name" : "Dump log history",
79 "Command" : "dump_log_history",
80 "Func" : dump_autotest,
84 "Name" : "Dump rings",
85 "Command" : "dump_ring",
86 "Func" : dump_autotest,
90 "Name" : "Dump mempools",
91 "Command" : "dump_mempool",
92 "Func" : dump_autotest,
103 "Name" : "Memory autotest",
104 "Command" : "memory_autotest",
105 "Func" : memory_autotest,
109 "Name" : "Read/write lock autotest",
110 "Command" : "rwlock_autotest",
111 "Func" : rwlock_autotest,
115 "Name" : "Logs autotest",
116 "Command" : "logs_autotest",
117 "Func" : logs_autotest,
121 "Name" : "CPU flags autotest",
122 "Command" : "cpuflags_autotest",
123 "Func" : default_autotest,
127 "Name" : "Version autotest",
128 "Command" : "version_autotest",
129 "Func" : default_autotest,
133 "Name" : "EAL filesystem autotest",
134 "Command" : "eal_fs_autotest",
135 "Func" : default_autotest,
139 "Name" : "EAL flags autotest",
140 "Command" : "eal_flags_autotest",
141 "Func" : default_autotest,
145 "Name" : "Hash autotest",
146 "Command" : "hash_autotest",
147 "Func" : default_autotest,
154 "Memory" : all_sockets(256),
158 "Name" : "LPM autotest",
159 "Command" : "lpm_autotest",
160 "Func" : default_autotest,
164 "Name" : "Memcpy autotest",
165 "Command" : "memcpy_autotest",
166 "Func" : default_autotest,
170 "Name" : "Memzone autotest",
171 "Command" : "memzone_autotest",
172 "Func" : default_autotest,
176 "Name" : "String autotest",
177 "Command" : "string_autotest",
178 "Func" : default_autotest,
182 "Name" : "Alarm autotest",
183 "Command" : "alarm_autotest",
184 "Func" : default_autotest,
191 "Memory" : all_sockets(128),
195 "Name" : "PCI autotest",
196 "Command" : "pci_autotest",
197 "Func" : default_autotest,
201 "Name" : "Malloc autotest",
202 "Command" : "malloc_autotest",
203 "Func" : default_autotest,
207 "Name" : "Multi-process autotest",
208 "Command" : "multiprocess_autotest",
209 "Func" : default_autotest,
213 "Name" : "Mbuf autotest",
214 "Command" : "mbuf_autotest",
215 "Func" : default_autotest,
219 "Name" : "Per-lcore autotest",
220 "Command" : "per_lcore_autotest",
221 "Func" : default_autotest,
232 "Name" : "Spinlock autotest",
233 "Command" : "spinlock_autotest",
234 "Func" : spinlock_autotest,
238 "Name" : "Byte order autotest",
239 "Command" : "byteorder_autotest",
240 "Func" : default_autotest,
244 "Name" : "TAILQ autotest",
245 "Command" : "tailq_autotest",
246 "Func" : default_autotest,
250 "Name" : "Command-line autotest",
251 "Command" : "cmdline_autotest",
252 "Func" : default_autotest,
256 "Name" : "Interrupts autotest",
257 "Command" : "interrupt_autotest",
258 "Func" : default_autotest,
265 "Memory" : all_sockets(588),
269 "Name" : "Function reentrancy autotest",
270 "Command" : "func_reentrancy_autotest",
271 "Func" : default_autotest,
275 "Name" : "Mempool autotest",
276 "Command" : "mempool_autotest",
277 "Func" : default_autotest,
281 "Name" : "Atomics autotest",
282 "Command" : "atomic_autotest",
283 "Func" : default_autotest,
287 "Name" : "Prefetch autotest",
288 "Command" : "prefetch_autotest",
289 "Func" : default_autotest,
296 # tests that should not be run when any other tests are running
297 non_parallel_test_group_list = [
300 "Prefix": "mempool_perf",
301 "Memory" : all_sockets(256),
305 "Name" : "Cycles autotest",
306 "Command" : "cycles_autotest",
307 "Func" : default_autotest,
311 "Name" : "Mempool performance autotest",
312 "Command" : "mempool_perf_autotest",
313 "Func" : default_autotest,
319 "Prefix": "memcpy_perf",
320 "Memory" : all_sockets(512),
324 "Name" : "Memcpy performance autotest",
325 "Command" : "memcpy_perf_autotest",
326 "Func" : default_autotest,
332 "Prefix": "hash_perf",
333 "Memory" : all_sockets(512),
337 "Name" : "Hash performance autotest",
338 "Command" : "hash_perf_autotest",
339 "Func" : default_autotest,
345 "Prefix": "ring_perf",
346 "Memory" : all_sockets(512),
350 "Name" : "Ring autotest",
351 "Command" : "ring_autotest",
352 "Func" : ring_autotest,