5 # Copyright(c) 2010-2014 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.
34 # Test data for autotests
37 from autotest_test_funcs import *
39 # quick and dirty function to find out number of sockets
41 result = len(glob("/sys/devices/system/node/node*"))
46 # spread given number for all sockets
47 # e.g. 32 becomes 16,16 or 8,8,8,8 etc.
49 mem_per_socket = num / num_sockets()
50 return ",".join([str(mem_per_socket)] * num_sockets())
52 # groups of tests that can be run in parallel
53 # the grouping has been found largely empirically
54 parallel_test_group_list = [
58 "Memory" : all_sockets(8),
62 "Name" : "Timer autotest",
63 "Command" : "timer_autotest",
64 "Func" : timer_autotest,
68 "Name" : "Debug autotest",
69 "Command" : "debug_autotest",
70 "Func" : default_autotest,
74 "Name" : "Errno autotest",
75 "Command" : "errno_autotest",
76 "Func" : default_autotest,
80 "Name" : "Meter autotest",
81 "Command" : "meter_autotest",
82 "Func" : default_autotest,
86 "Name" : "Common autotest",
87 "Command" : "common_autotest",
88 "Func" : default_autotest,
92 "Name" : "Dump log history",
93 "Command" : "dump_log_history",
94 "Func" : dump_autotest,
98 "Name" : "Dump rings",
99 "Command" : "dump_ring",
100 "Func" : dump_autotest,
104 "Name" : "Dump mempools",
105 "Command" : "dump_mempool",
106 "Func" : dump_autotest,
117 "Name" : "Memory autotest",
118 "Command" : "memory_autotest",
119 "Func" : memory_autotest,
123 "Name" : "Read/write lock autotest",
124 "Command" : "rwlock_autotest",
125 "Func" : rwlock_autotest,
129 "Name" : "Logs autotest",
130 "Command" : "logs_autotest",
131 "Func" : logs_autotest,
135 "Name" : "CPU flags autotest",
136 "Command" : "cpuflags_autotest",
137 "Func" : default_autotest,
141 "Name" : "Version autotest",
142 "Command" : "version_autotest",
143 "Func" : default_autotest,
147 "Name" : "EAL filesystem autotest",
148 "Command" : "eal_fs_autotest",
149 "Func" : default_autotest,
153 "Name" : "EAL flags autotest",
154 "Command" : "eal_flags_autotest",
155 "Func" : default_autotest,
159 "Name" : "Hash autotest",
160 "Command" : "hash_autotest",
161 "Func" : default_autotest,
168 "Memory" : all_sockets(1024),
172 "Name" : "LPM autotest",
173 "Command" : "lpm_autotest",
174 "Func" : default_autotest,
178 "Name" : "IVSHMEM autotest",
179 "Command" : "ivshmem_autotest",
180 "Func" : default_autotest,
184 "Name" : "Memcpy autotest",
185 "Command" : "memcpy_autotest",
186 "Func" : default_autotest,
190 "Name" : "Memzone autotest",
191 "Command" : "memzone_autotest",
192 "Func" : default_autotest,
196 "Name" : "String autotest",
197 "Command" : "string_autotest",
198 "Func" : default_autotest,
202 "Name" : "Alarm autotest",
203 "Command" : "alarm_autotest",
204 "Func" : default_autotest,
211 "Memory" : all_sockets(128),
215 "Name" : "PCI autotest",
216 "Command" : "pci_autotest",
217 "Func" : default_autotest,
221 "Name" : "Malloc autotest",
222 "Command" : "malloc_autotest",
223 "Func" : default_autotest,
227 "Name" : "Multi-process autotest",
228 "Command" : "multiprocess_autotest",
229 "Func" : default_autotest,
233 "Name" : "Mbuf autotest",
234 "Command" : "mbuf_autotest",
235 "Func" : default_autotest,
239 "Name" : "Per-lcore autotest",
240 "Command" : "per_lcore_autotest",
241 "Func" : default_autotest,
245 "Name" : "Ring autotest",
246 "Command" : "ring_autotest",
247 "Func" : default_autotest,
258 "Name" : "Spinlock autotest",
259 "Command" : "spinlock_autotest",
260 "Func" : spinlock_autotest,
264 "Name" : "Byte order autotest",
265 "Command" : "byteorder_autotest",
266 "Func" : default_autotest,
270 "Name" : "TAILQ autotest",
271 "Command" : "tailq_autotest",
272 "Func" : default_autotest,
276 "Name" : "Command-line autotest",
277 "Command" : "cmdline_autotest",
278 "Func" : default_autotest,
282 "Name" : "Interrupts autotest",
283 "Command" : "interrupt_autotest",
284 "Func" : default_autotest,
291 "Memory" : all_sockets(620),
295 "Name" : "Function reentrancy autotest",
296 "Command" : "func_reentrancy_autotest",
297 "Func" : default_autotest,
301 "Name" : "Mempool autotest",
302 "Command" : "mempool_autotest",
303 "Func" : default_autotest,
307 "Name" : "Atomics autotest",
308 "Command" : "atomic_autotest",
309 "Func" : default_autotest,
313 "Name" : "Prefetch autotest",
314 "Command" : "prefetch_autotest",
315 "Func" : default_autotest,
319 "Name" :"Red autotest",
320 "Command" : "red_autotest",
321 "Func" :default_autotest,
327 "Prefix" : "group_7",
332 "Name" : "PMD ring autotest",
333 "Command" : "ring_pmd_autotest",
334 "Func" : default_autotest,
338 "Name" : "Access list control autotest",
339 "Command" : "acl_autotest",
340 "Func" : default_autotest,
344 "Name" :"Sched autotest",
345 "Command" : "sched_autotest",
346 "Func" :default_autotest,
353 # tests that should not be run when any other tests are running
354 non_parallel_test_group_list = [
362 "Name" : "KNI autotest",
363 "Command" : "kni_autotest",
364 "Func" : default_autotest,
370 "Prefix": "mempool_perf",
371 "Memory" : all_sockets(256),
375 "Name" : "Cycles autotest",
376 "Command" : "cycles_autotest",
377 "Func" : default_autotest,
381 "Name" : "Mempool performance autotest",
382 "Command" : "mempool_perf_autotest",
383 "Func" : default_autotest,
389 "Prefix": "memcpy_perf",
390 "Memory" : all_sockets(512),
394 "Name" : "Memcpy performance autotest",
395 "Command" : "memcpy_perf_autotest",
396 "Func" : default_autotest,
402 "Prefix": "hash_perf",
403 "Memory" : all_sockets(512),
407 "Name" : "Hash performance autotest",
408 "Command" : "hash_perf_autotest",
409 "Func" : default_autotest,
416 "Memory" : all_sockets(512),
420 "Name" : "Power autotest",
421 "Command" : "power_autotest",
422 "Func" : default_autotest,
428 "Prefix" : "power_acpi_cpufreq",
429 "Memory" : all_sockets(512),
433 "Name" : "Power ACPI cpufreq autotest",
434 "Command" : "power_acpi_cpufreq_autotest",
435 "Func" : default_autotest,
441 "Prefix" : "power_kvm_vm",
446 "Name" : "Power KVM VM autotest",
447 "Command" : "power_kvm_vm_autotest",
448 "Func" : default_autotest,
459 "Name" : "LPM6 autotest",
460 "Command" : "lpm6_autotest",
461 "Func" : default_autotest,
467 "Prefix": "timer_perf",
468 "Memory" : all_sockets(512),
472 "Name" : "Timer performance autotest",
473 "Command" : "timer_perf_autotest",
474 "Func" : default_autotest,
481 # Please always make sure that ring_perf is the last test!
484 "Prefix": "ring_perf",
485 "Memory" : all_sockets(512),
489 "Name" : "Ring performance autotest",
490 "Command" : "ring_perf_autotest",
491 "Func" : default_autotest,