3 # Copyright(c) 2010-2014 Intel Corporation. All rights reserved.
6 # Redistribution and use in source and binary forms, with or without
7 # modification, are permitted provided that the following conditions
10 # * Redistributions of source code must retain the above copyright
11 # notice, this list of conditions and the following disclaimer.
12 # * Redistributions in binary form must reproduce the above copyright
13 # notice, this list of conditions and the following disclaimer in
14 # the documentation and/or other materials provided with the
16 # * Neither the name of Intel Corporation nor the names of its
17 # contributors may be used to endorse or promote products derived
18 # from this software without specific prior written permission.
20 # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
21 # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
22 # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
23 # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
24 # OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
25 # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
26 # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
27 # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
28 # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
29 # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
30 # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
32 # Test data for autotests
35 from autotest_test_funcs import *
38 # quick and dirty function to find out number of sockets
40 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 = [
56 "Memory": per_sockets(8),
60 "Name": "Cycles autotest",
61 "Command": "cycles_autotest",
62 "Func": default_autotest,
66 "Name": "Timer autotest",
67 "Command": "timer_autotest",
68 "Func": timer_autotest,
72 "Name": "Debug autotest",
73 "Command": "debug_autotest",
74 "Func": default_autotest,
78 "Name": "Errno autotest",
79 "Command": "errno_autotest",
80 "Func": default_autotest,
84 "Name": "Meter autotest",
85 "Command": "meter_autotest",
86 "Func": default_autotest,
90 "Name": "Common autotest",
91 "Command": "common_autotest",
92 "Func": default_autotest,
96 "Name": "Resource autotest",
97 "Command": "resource_autotest",
98 "Func": default_autotest,
109 "Name": "Memory autotest",
110 "Command": "memory_autotest",
111 "Func": memory_autotest,
115 "Name": "Read/write lock autotest",
116 "Command": "rwlock_autotest",
117 "Func": rwlock_autotest,
121 "Name": "Logs autotest",
122 "Command": "logs_autotest",
123 "Func": logs_autotest,
127 "Name": "CPU flags autotest",
128 "Command": "cpuflags_autotest",
129 "Func": default_autotest,
133 "Name": "Version autotest",
134 "Command": "version_autotest",
135 "Func": default_autotest,
139 "Name": "EAL filesystem autotest",
140 "Command": "eal_fs_autotest",
141 "Func": default_autotest,
145 "Name": "EAL flags autotest",
146 "Command": "eal_flags_autotest",
147 "Func": default_autotest,
151 "Name": "Hash autotest",
152 "Command": "hash_autotest",
153 "Func": default_autotest,
160 "Memory": per_sockets(512),
164 "Name": "LPM autotest",
165 "Command": "lpm_autotest",
166 "Func": default_autotest,
170 "Name": "LPM6 autotest",
171 "Command": "lpm6_autotest",
172 "Func": default_autotest,
176 "Name": "Memcpy autotest",
177 "Command": "memcpy_autotest",
178 "Func": default_autotest,
182 "Name": "Memzone autotest",
183 "Command": "memzone_autotest",
184 "Func": default_autotest,
188 "Name": "String autotest",
189 "Command": "string_autotest",
190 "Func": default_autotest,
194 "Name": "Alarm autotest",
195 "Command": "alarm_autotest",
196 "Func": default_autotest,
203 "Memory": per_sockets(128),
207 "Name": "PCI autotest",
208 "Command": "pci_autotest",
209 "Func": default_autotest,
213 "Name": "Malloc autotest",
214 "Command": "malloc_autotest",
215 "Func": default_autotest,
219 "Name": "Multi-process autotest",
220 "Command": "multiprocess_autotest",
221 "Func": default_autotest,
225 "Name": "Mbuf autotest",
226 "Command": "mbuf_autotest",
227 "Func": default_autotest,
231 "Name": "Per-lcore autotest",
232 "Command": "per_lcore_autotest",
233 "Func": default_autotest,
237 "Name": "Ring autotest",
238 "Command": "ring_autotest",
239 "Func": default_autotest,
250 "Name": "Spinlock autotest",
251 "Command": "spinlock_autotest",
252 "Func": spinlock_autotest,
256 "Name": "Byte order autotest",
257 "Command": "byteorder_autotest",
258 "Func": default_autotest,
262 "Name": "TAILQ autotest",
263 "Command": "tailq_autotest",
264 "Func": default_autotest,
268 "Name": "Command-line autotest",
269 "Command": "cmdline_autotest",
270 "Func": default_autotest,
274 "Name": "Interrupts autotest",
275 "Command": "interrupt_autotest",
276 "Func": default_autotest,
283 "Memory": per_sockets(512),
287 "Name": "Function reentrancy autotest",
288 "Command": "func_reentrancy_autotest",
289 "Func": default_autotest,
293 "Name": "Mempool autotest",
294 "Command": "mempool_autotest",
295 "Func": default_autotest,
299 "Name": "Atomics autotest",
300 "Command": "atomic_autotest",
301 "Func": default_autotest,
305 "Name": "Prefetch autotest",
306 "Command": "prefetch_autotest",
307 "Func": default_autotest,
311 "Name": "Red autotest",
312 "Command": "red_autotest",
313 "Func": default_autotest,
324 "Name": "PMD ring autotest",
325 "Command": "ring_pmd_autotest",
326 "Func": default_autotest,
330 "Name": "Access list control autotest",
331 "Command": "acl_autotest",
332 "Func": default_autotest,
336 "Name": "Sched autotest",
337 "Command": "sched_autotest",
338 "Func": default_autotest,
345 # tests that should not be run when any other tests are running
346 non_parallel_test_group_list = [
354 "Name": "KNI autotest",
355 "Command": "kni_autotest",
356 "Func": default_autotest,
362 "Prefix": "mempool_perf",
363 "Memory": per_sockets(256),
367 "Name": "Mempool performance autotest",
368 "Command": "mempool_perf_autotest",
369 "Func": default_autotest,
375 "Prefix": "memcpy_perf",
376 "Memory": per_sockets(512),
380 "Name": "Memcpy performance autotest",
381 "Command": "memcpy_perf_autotest",
382 "Func": default_autotest,
388 "Prefix": "hash_perf",
389 "Memory": per_sockets(512),
393 "Name": "Hash performance autotest",
394 "Command": "hash_perf_autotest",
395 "Func": default_autotest,
406 "Name": "Power autotest",
407 "Command": "power_autotest",
408 "Func": default_autotest,
414 "Prefix": "power_acpi_cpufreq",
419 "Name": "Power ACPI cpufreq autotest",
420 "Command": "power_acpi_cpufreq_autotest",
421 "Func": default_autotest,
427 "Prefix": "power_kvm_vm",
432 "Name": "Power KVM VM autotest",
433 "Command": "power_kvm_vm_autotest",
434 "Func": default_autotest,
440 "Prefix": "timer_perf",
441 "Memory": per_sockets(512),
445 "Name": "Timer performance autotest",
446 "Command": "timer_perf_autotest",
447 "Func": default_autotest,
454 # Please always make sure that ring_perf is the last test!
457 "Prefix": "ring_perf",
458 "Memory": per_sockets(512),
462 "Name": "Ring performance autotest",
463 "Command": "ring_perf_autotest",
464 "Func": default_autotest,