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 # Assign given number to each socket
47 # e.g. 32 becomes 32,32 or 32,32,32,32
49 return ",".join([str(num)] * num_sockets())
51 # groups of tests that can be run in parallel
52 # the grouping has been found largely empirically
53 parallel_test_group_list = [
57 "Memory" : per_sockets(8),
61 "Name" : "Timer autotest",
62 "Command" : "timer_autotest",
63 "Func" : timer_autotest,
67 "Name" : "Debug autotest",
68 "Command" : "debug_autotest",
69 "Func" : default_autotest,
73 "Name" : "Errno autotest",
74 "Command" : "errno_autotest",
75 "Func" : default_autotest,
79 "Name" : "Meter autotest",
80 "Command" : "meter_autotest",
81 "Func" : default_autotest,
85 "Name" : "Common autotest",
86 "Command" : "common_autotest",
87 "Func" : default_autotest,
91 "Name" : "Dump log history",
92 "Command" : "dump_log_history",
93 "Func" : dump_autotest,
97 "Name" : "Dump rings",
98 "Command" : "dump_ring",
99 "Func" : dump_autotest,
103 "Name" : "Dump mempools",
104 "Command" : "dump_mempool",
105 "Func" : dump_autotest,
116 "Name" : "Memory autotest",
117 "Command" : "memory_autotest",
118 "Func" : memory_autotest,
122 "Name" : "Read/write lock autotest",
123 "Command" : "rwlock_autotest",
124 "Func" : rwlock_autotest,
128 "Name" : "Logs autotest",
129 "Command" : "logs_autotest",
130 "Func" : logs_autotest,
134 "Name" : "CPU flags autotest",
135 "Command" : "cpuflags_autotest",
136 "Func" : default_autotest,
140 "Name" : "Version autotest",
141 "Command" : "version_autotest",
142 "Func" : default_autotest,
146 "Name" : "EAL filesystem autotest",
147 "Command" : "eal_fs_autotest",
148 "Func" : default_autotest,
152 "Name" : "EAL flags autotest",
153 "Command" : "eal_flags_autotest",
154 "Func" : default_autotest,
158 "Name" : "Hash autotest",
159 "Command" : "hash_autotest",
160 "Func" : default_autotest,
167 "Memory" : per_sockets(1024),
171 "Name" : "LPM autotest",
172 "Command" : "lpm_autotest",
173 "Func" : default_autotest,
177 "Name" : "IVSHMEM autotest",
178 "Command" : "ivshmem_autotest",
179 "Func" : default_autotest,
183 "Name" : "Memcpy autotest",
184 "Command" : "memcpy_autotest",
185 "Func" : default_autotest,
189 "Name" : "Memzone autotest",
190 "Command" : "memzone_autotest",
191 "Func" : default_autotest,
195 "Name" : "String autotest",
196 "Command" : "string_autotest",
197 "Func" : default_autotest,
201 "Name" : "Alarm autotest",
202 "Command" : "alarm_autotest",
203 "Func" : default_autotest,
210 "Memory" : per_sockets(128),
214 "Name" : "PCI autotest",
215 "Command" : "pci_autotest",
216 "Func" : default_autotest,
220 "Name" : "Malloc autotest",
221 "Command" : "malloc_autotest",
222 "Func" : default_autotest,
226 "Name" : "Multi-process autotest",
227 "Command" : "multiprocess_autotest",
228 "Func" : default_autotest,
232 "Name" : "Mbuf autotest",
233 "Command" : "mbuf_autotest",
234 "Func" : default_autotest,
238 "Name" : "Per-lcore autotest",
239 "Command" : "per_lcore_autotest",
240 "Func" : default_autotest,
244 "Name" : "Ring autotest",
245 "Command" : "ring_autotest",
246 "Func" : default_autotest,
257 "Name" : "Spinlock autotest",
258 "Command" : "spinlock_autotest",
259 "Func" : spinlock_autotest,
263 "Name" : "Byte order autotest",
264 "Command" : "byteorder_autotest",
265 "Func" : default_autotest,
269 "Name" : "TAILQ autotest",
270 "Command" : "tailq_autotest",
271 "Func" : default_autotest,
275 "Name" : "Command-line autotest",
276 "Command" : "cmdline_autotest",
277 "Func" : default_autotest,
281 "Name" : "Interrupts autotest",
282 "Command" : "interrupt_autotest",
283 "Func" : default_autotest,
290 "Memory" : per_sockets(620),
294 "Name" : "Function reentrancy autotest",
295 "Command" : "func_reentrancy_autotest",
296 "Func" : default_autotest,
300 "Name" : "Mempool autotest",
301 "Command" : "mempool_autotest",
302 "Func" : default_autotest,
306 "Name" : "Atomics autotest",
307 "Command" : "atomic_autotest",
308 "Func" : default_autotest,
312 "Name" : "Prefetch autotest",
313 "Command" : "prefetch_autotest",
314 "Func" : default_autotest,
318 "Name" :"Red autotest",
319 "Command" : "red_autotest",
320 "Func" :default_autotest,
326 "Prefix" : "group_7",
331 "Name" : "PMD ring autotest",
332 "Command" : "ring_pmd_autotest",
333 "Func" : default_autotest,
337 "Name" : "Access list control autotest",
338 "Command" : "acl_autotest",
339 "Func" : default_autotest,
343 "Name" :"Sched autotest",
344 "Command" : "sched_autotest",
345 "Func" :default_autotest,
352 # tests that should not be run when any other tests are running
353 non_parallel_test_group_list = [
361 "Name" : "KNI autotest",
362 "Command" : "kni_autotest",
363 "Func" : default_autotest,
369 "Prefix": "mempool_perf",
370 "Memory" : per_sockets(256),
374 "Name" : "Cycles autotest",
375 "Command" : "cycles_autotest",
376 "Func" : default_autotest,
380 "Name" : "Mempool performance autotest",
381 "Command" : "mempool_perf_autotest",
382 "Func" : default_autotest,
388 "Prefix": "memcpy_perf",
389 "Memory" : per_sockets(512),
393 "Name" : "Memcpy performance autotest",
394 "Command" : "memcpy_perf_autotest",
395 "Func" : default_autotest,
401 "Prefix": "hash_perf",
402 "Memory" : per_sockets(512),
406 "Name" : "Hash performance autotest",
407 "Command" : "hash_perf_autotest",
408 "Func" : default_autotest,
415 "Memory" : per_sockets(512),
419 "Name" : "Power autotest",
420 "Command" : "power_autotest",
421 "Func" : default_autotest,
427 "Prefix" : "power_acpi_cpufreq",
428 "Memory" : per_sockets(512),
432 "Name" : "Power ACPI cpufreq autotest",
433 "Command" : "power_acpi_cpufreq_autotest",
434 "Func" : default_autotest,
440 "Prefix" : "power_kvm_vm",
445 "Name" : "Power KVM VM autotest",
446 "Command" : "power_kvm_vm_autotest",
447 "Func" : default_autotest,
458 "Name" : "LPM6 autotest",
459 "Command" : "lpm6_autotest",
460 "Func" : default_autotest,
466 "Prefix": "timer_perf",
467 "Memory" : per_sockets(512),
471 "Name" : "Timer performance autotest",
472 "Command" : "timer_perf_autotest",
473 "Func" : default_autotest,
480 # Please always make sure that ring_perf is the last test!
483 "Prefix": "ring_perf",
484 "Memory" : per_sockets(512),
488 "Name" : "Ring performance autotest",
489 "Command" : "ring_perf_autotest",
490 "Func" : default_autotest,