5 # Copyright(c) 2010-2013 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 result = len(glob("/sys/devices/system/node/node*"))
47 # multiply given number for all sockets
48 # e.g. 32 becomes 32,32 or 32,32,32,32 etc.
50 mem_per_socket = num / num_sockets()
51 return ",".join([str(mem_per_socket)] * num_sockets())
53 # groups of tests that can be run in parallel
54 # the grouping has been found largely empirically
55 parallel_test_group_list = [
63 "Name" : "Timer autotest",
64 "Command" : "timer_autotest",
65 "Func" : timer_autotest,
69 "Name" : "Debug autotest",
70 "Command" : "debug_autotest",
71 "Func" : default_autotest,
75 "Name" : "Errno autotest",
76 "Command" : "errno_autotest",
77 "Func" : default_autotest,
81 "Name" : "Dump log history",
82 "Command" : "dump_log_history",
83 "Func" : dump_autotest,
87 "Name" : "Dump rings",
88 "Command" : "dump_ring",
89 "Func" : dump_autotest,
93 "Name" : "Dump mempools",
94 "Command" : "dump_mempool",
95 "Func" : dump_autotest,
106 "Name" : "Memory autotest",
107 "Command" : "memory_autotest",
108 "Func" : memory_autotest,
112 "Name" : "Read/write lock autotest",
113 "Command" : "rwlock_autotest",
114 "Func" : rwlock_autotest,
118 "Name" : "Logs autotest",
119 "Command" : "logs_autotest",
120 "Func" : logs_autotest,
124 "Name" : "CPU flags autotest",
125 "Command" : "cpuflags_autotest",
126 "Func" : default_autotest,
130 "Name" : "Version autotest",
131 "Command" : "version_autotest",
132 "Func" : default_autotest,
136 "Name" : "EAL filesystem autotest",
137 "Command" : "eal_fs_autotest",
138 "Func" : default_autotest,
142 "Name" : "EAL flags autotest",
143 "Command" : "eal_flags_autotest",
144 "Func" : default_autotest,
148 "Name" : "Hash autotest",
149 "Command" : "hash_autotest",
150 "Func" : default_autotest,
157 "Memory" : all_sockets(256),
161 "Name" : "LPM autotest",
162 "Command" : "lpm_autotest",
163 "Func" : default_autotest,
167 "Name" : "Memcpy autotest",
168 "Command" : "memcpy_autotest",
169 "Func" : default_autotest,
173 "Name" : "Memzone autotest",
174 "Command" : "memzone_autotest",
175 "Func" : default_autotest,
179 "Name" : "String autotest",
180 "Command" : "string_autotest",
181 "Func" : default_autotest,
185 "Name" : "Alarm autotest",
186 "Command" : "alarm_autotest",
187 "Func" : default_autotest,
194 "Memory" : all_sockets(128),
198 "Name" : "PCI autotest",
199 "Command" : "pci_autotest",
200 "Func" : default_autotest,
204 "Name" : "Malloc autotest",
205 "Command" : "malloc_autotest",
206 "Func" : default_autotest,
210 "Name" : "Multi-process autotest",
211 "Command" : "multiprocess_autotest",
212 "Func" : default_autotest,
216 "Name" : "Mbuf autotest",
217 "Command" : "mbuf_autotest",
218 "Func" : default_autotest,
222 "Name" : "Per-lcore autotest",
223 "Command" : "per_lcore_autotest",
224 "Func" : default_autotest,
235 "Name" : "Spinlock autotest",
236 "Command" : "spinlock_autotest",
237 "Func" : spinlock_autotest,
241 "Name" : "Byte order autotest",
242 "Command" : "byteorder_autotest",
243 "Func" : default_autotest,
247 "Name" : "TAILQ autotest",
248 "Command" : "tailq_autotest",
249 "Func" : default_autotest,
253 "Name" : "Command-line autotest",
254 "Command" : "cmdline_autotest",
255 "Func" : default_autotest,
259 "Name" : "Interrupts autotest",
260 "Command" : "interrupt_autotest",
261 "Func" : default_autotest,
268 "Memory" : all_sockets(588),
272 "Name" : "Function reentrancy autotest",
273 "Command" : "func_reentrancy_autotest",
274 "Func" : default_autotest,
278 "Name" : "Mempool autotest",
279 "Command" : "mempool_autotest",
280 "Func" : default_autotest,
284 "Name" : "Atomics autotest",
285 "Command" : "atomic_autotest",
286 "Func" : default_autotest,
290 "Name" : "Prefetch autotest",
291 "Command" : "prefetch_autotest",
292 "Func" : default_autotest,
298 "Prefix" : "group_7",
303 "Name" : "Access list control autotest",
304 "Command" : "acl_autotest",
305 "Func" : default_autotest,
309 "Name" : "Pattern match autotest",
310 "Command" : "pm_autotest",
311 "Func" : default_autotest,
318 # tests that should not be run when any other tests are running
319 non_parallel_test_group_list = [
322 "Prefix": "mempool_perf",
323 "Memory" : all_sockets(256),
327 "Name" : "Cycles autotest",
328 "Command" : "cycles_autotest",
329 "Func" : default_autotest,
333 "Name" : "Mempool performance autotest",
334 "Command" : "mempool_perf_autotest",
335 "Func" : default_autotest,
341 "Prefix": "memcpy_perf",
342 "Memory" : all_sockets(512),
346 "Name" : "Memcpy performance autotest",
347 "Command" : "memcpy_perf_autotest",
348 "Func" : default_autotest,
354 "Prefix": "hash_perf",
355 "Memory" : all_sockets(512),
359 "Name" : "Hash performance autotest",
360 "Command" : "hash_perf_autotest",
361 "Func" : default_autotest,
372 "Name" : "LPM6 autotest",
373 "Command" : "lpm6_autotest",
374 "Func" : default_autotest,
380 "Prefix": "ring_perf",
381 "Memory" : all_sockets(512),
385 "Name" : "Ring autotest",
386 "Command" : "ring_autotest",
387 "Func" : ring_autotest,