mbuf: fix performance with 128-byte cache line
[dpdk.git] / app / test / autotest_data.py
1 #!/usr/bin/python
2
3 #   BSD LICENSE
4 #
5 #   Copyright(c) 2010-2014 Intel Corporation. All rights reserved.
6 #   All rights reserved.
7 #
8 #   Redistribution and use in source and binary forms, with or without
9 #   modification, are permitted provided that the following conditions
10 #   are met:
11 #
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
17 #       distribution.
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.
21 #
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.
33
34 # Test data for autotests
35
36 from glob import glob
37 from autotest_test_funcs import *
38
39 # quick and dirty function to find out number of sockets
40 def num_sockets():
41         result = len(glob("/sys/devices/system/node/node*"))
42         if result == 0:
43                 return 1
44         return result
45
46 # Assign given number to each socket
47 # e.g. 32 becomes 32,32 or 32,32,32,32
48 def per_sockets(num):
49     return ",".join([str(num)] * num_sockets())
50
51 # groups of tests that can be run in parallel
52 # the grouping has been found largely empirically
53 parallel_test_group_list = [
54
55 {
56         "Prefix":       "group_1",
57         "Memory" :      per_sockets(8),
58         "Tests" :
59         [
60                 {
61                  "Name" :       "Timer autotest",
62                  "Command" :    "timer_autotest",
63                  "Func" :       timer_autotest,
64                  "Report" :     None,
65                 },
66                 {
67                  "Name" :       "Debug autotest",
68                  "Command" :    "debug_autotest",
69                  "Func" :       default_autotest,
70                  "Report" :     None,
71                 },
72                 {
73                  "Name" :       "Errno autotest",
74                  "Command" :    "errno_autotest",
75                  "Func" :       default_autotest,
76                  "Report" :     None,
77                 },
78                 {
79                  "Name" :       "Meter autotest",
80                  "Command" :    "meter_autotest",
81                  "Func" :       default_autotest,
82                  "Report" :     None,
83                 },
84                 {
85                  "Name" :       "Common autotest",
86                  "Command" :    "common_autotest",
87                  "Func" :       default_autotest,
88                  "Report" :     None,
89                 },
90                 {
91                  "Name" :       "Dump log history",
92                  "Command" :    "dump_log_history",
93                  "Func" :       dump_autotest,
94                  "Report" :     None,
95                 },
96                 {
97                  "Name" :       "Dump rings",
98                  "Command" :    "dump_ring",
99                  "Func" :       dump_autotest,
100                  "Report" :     None,
101                 },
102                 {
103                  "Name" :       "Dump mempools",
104                  "Command" :    "dump_mempool",
105                  "Func" :       dump_autotest,
106                  "Report" :     None,
107                 },
108         ]
109 },
110 {
111         "Prefix":       "group_2",
112         "Memory" :      "64",
113         "Tests" :
114         [
115                 {
116                  "Name" :       "Memory autotest",
117                  "Command" :    "memory_autotest",
118                  "Func" :       memory_autotest,
119                  "Report" :     None,
120                 },
121                 {
122                  "Name" :       "Read/write lock autotest",
123                  "Command" :    "rwlock_autotest",
124                  "Func" :       rwlock_autotest,
125                  "Report" :     None,
126                 },
127                 {
128                  "Name" :       "Logs autotest",
129                  "Command" :    "logs_autotest",
130                  "Func" :       logs_autotest,
131                  "Report" :     None,
132                 },
133                 {
134                  "Name" :       "CPU flags autotest",
135                  "Command" :    "cpuflags_autotest",
136                  "Func" :       default_autotest,
137                  "Report" :     None,
138                 },
139                 {
140                  "Name" :       "Version autotest",
141                  "Command" :    "version_autotest",
142                  "Func" :       default_autotest,
143                  "Report" :     None,
144                 },
145                 {
146                  "Name" :       "EAL filesystem autotest",
147                  "Command" :    "eal_fs_autotest",
148                  "Func" :       default_autotest,
149                  "Report" :     None,
150                 },
151                 {
152                  "Name" :       "EAL flags autotest",
153                  "Command" :    "eal_flags_autotest",
154                  "Func" :       default_autotest,
155                  "Report" :     None,
156                 },
157                 {
158                  "Name" :       "Hash autotest",
159                  "Command" :    "hash_autotest",
160                  "Func" :       default_autotest,
161                  "Report" :     None,
162                 },
163         ],
164 },
165 {
166         "Prefix":       "group_3",
167         "Memory" :      per_sockets(1024),
168         "Tests" :
169         [
170                 {
171                  "Name" :       "LPM autotest",
172                  "Command" :    "lpm_autotest",
173                  "Func" :       default_autotest,
174                  "Report" :     None,
175                 },
176                 {
177                  "Name" :       "IVSHMEM autotest",
178                  "Command" :    "ivshmem_autotest",
179                  "Func" :       default_autotest,
180                  "Report" :     None,
181                 },
182                 {
183                  "Name" :       "Memcpy autotest",
184                  "Command" :    "memcpy_autotest",
185                  "Func" :       default_autotest,
186                  "Report" :     None,
187                 },
188                 {
189                  "Name" :       "Memzone autotest",
190                  "Command" :    "memzone_autotest",
191                  "Func" :       default_autotest,
192                  "Report" :     None,
193                 },
194                 {
195                  "Name" :       "String autotest",
196                  "Command" :    "string_autotest",
197                  "Func" :       default_autotest,
198                  "Report" :     None,
199                 },
200                 {
201                  "Name" :       "Alarm autotest",
202                  "Command" :    "alarm_autotest",
203                  "Func" :       default_autotest,
204                  "Report" :     None,
205                 },
206         ]
207 },
208 {
209         "Prefix":       "group_4",
210         "Memory" :      per_sockets(128),
211         "Tests" :
212         [
213                 {
214                  "Name" :       "PCI autotest",
215                  "Command" :    "pci_autotest",
216                  "Func" :       default_autotest,
217                  "Report" :     None,
218                 },
219                 {
220                  "Name" :       "Malloc autotest",
221                  "Command" :    "malloc_autotest",
222                  "Func" :       default_autotest,
223                  "Report" :     None,
224                 },
225                 {
226                  "Name" :       "Multi-process autotest",
227                  "Command" :    "multiprocess_autotest",
228                  "Func" :       default_autotest,
229                  "Report" :     None,
230                 },
231                 {
232                  "Name" :       "Mbuf autotest",
233                  "Command" :    "mbuf_autotest",
234                  "Func" :       default_autotest,
235                  "Report" :     None,
236                 },
237                 {
238                  "Name" :       "Per-lcore autotest",
239                  "Command" :    "per_lcore_autotest",
240                  "Func" :       default_autotest,
241                  "Report" :     None,
242                 },
243                 {
244                  "Name" :       "Ring autotest",
245                  "Command" :    "ring_autotest",
246                  "Func" :       default_autotest,
247                  "Report" :     None,
248                 },
249         ]
250 },
251 {
252         "Prefix":       "group_5",
253         "Memory" :      "32",
254         "Tests" :
255         [
256                 {
257                  "Name" :       "Spinlock autotest",
258                  "Command" :    "spinlock_autotest",
259                  "Func" :       spinlock_autotest,
260                  "Report" :     None,
261                 },
262                 {
263                  "Name" :       "Byte order autotest",
264                  "Command" :    "byteorder_autotest",
265                  "Func" :       default_autotest,
266                  "Report" :     None,
267                 },
268                 {
269                  "Name" :       "TAILQ autotest",
270                  "Command" :    "tailq_autotest",
271                  "Func" :       default_autotest,
272                  "Report" :     None,
273                 },
274                 {
275                  "Name" :       "Command-line autotest",
276                  "Command" :    "cmdline_autotest",
277                  "Func" :       default_autotest,
278                  "Report" :     None,
279                 },
280                 {
281                  "Name" :       "Interrupts autotest",
282                  "Command" :    "interrupt_autotest",
283                  "Func" :       default_autotest,
284                  "Report" :     None,
285                 },
286         ]
287 },
288 {
289         "Prefix":       "group_6",
290         "Memory" :      per_sockets(620),
291         "Tests" :
292         [
293                 {
294                  "Name" :       "Function reentrancy autotest",
295                  "Command" :    "func_reentrancy_autotest",
296                  "Func" :       default_autotest,
297                  "Report" :     None,
298                 },
299                 {
300                  "Name" :       "Mempool autotest",
301                  "Command" :    "mempool_autotest",
302                  "Func" :       default_autotest,
303                  "Report" :     None,
304                 },
305                 {
306                  "Name" :       "Atomics autotest",
307                  "Command" :    "atomic_autotest",
308                  "Func" :       default_autotest,
309                  "Report" :     None,
310                 },
311                 {
312                  "Name" :       "Prefetch autotest",
313                  "Command" :    "prefetch_autotest",
314                  "Func" :       default_autotest,
315                  "Report" :     None,
316                  },
317                 {
318                  "Name" :"Red autotest",
319                  "Command" : "red_autotest",
320                  "Func" :default_autotest,
321                  "Report" :None,
322                  },
323         ]
324 },
325 {
326         "Prefix" :      "group_7",
327         "Memory" :      "400",
328         "Tests" :
329         [
330                 {
331                  "Name" :       "PMD ring autotest",
332                  "Command" :    "ring_pmd_autotest",
333                  "Func" :       default_autotest,
334                  "Report" :     None,
335                 },
336                 {
337                  "Name" :       "Access list control autotest",
338                  "Command" :    "acl_autotest",
339                  "Func" :       default_autotest,
340                  "Report" :     None,
341                 },
342                  {
343                  "Name" :"Sched autotest",
344                  "Command" : "sched_autotest",
345                  "Func" :default_autotest,
346                  "Report" :None,
347                  },
348         ]
349 },
350 ]
351
352 # tests that should not be run when any other tests are running
353 non_parallel_test_group_list = [
354
355 {
356         "Prefix" :      "kni",
357         "Memory" :      "512",
358         "Tests" :
359         [
360                 {
361                  "Name" :       "KNI autotest",
362                  "Command" :    "kni_autotest",
363                  "Func" :       default_autotest,
364                  "Report" :     None,
365                 },
366         ]
367 },
368 {
369         "Prefix":       "mempool_perf",
370         "Memory" :      per_sockets(256),
371         "Tests" :
372         [
373                 {
374                  "Name" :       "Cycles autotest",
375                  "Command" :    "cycles_autotest",
376                  "Func" :       default_autotest,
377                  "Report" :     None,
378                 },
379                 {
380                  "Name" :       "Mempool performance autotest",
381                  "Command" :    "mempool_perf_autotest",
382                  "Func" :       default_autotest,
383                  "Report" :     None,
384                 },
385         ]
386 },
387 {
388         "Prefix":       "memcpy_perf",
389         "Memory" :      per_sockets(512),
390         "Tests" :
391         [
392                 {
393                  "Name" :       "Memcpy performance autotest",
394                  "Command" :    "memcpy_perf_autotest",
395                  "Func" :       default_autotest,
396                  "Report" :     None,
397                 },
398         ]
399 },
400 {
401         "Prefix":       "hash_perf",
402         "Memory" :      per_sockets(512),
403         "Tests" :
404         [
405                 {
406                  "Name" :       "Hash performance autotest",
407                  "Command" :    "hash_perf_autotest",
408                  "Func" :       default_autotest,
409                  "Report" :     None,
410                 },
411         ]
412 },
413 {
414         "Prefix" :      "power",
415         "Memory" :      per_sockets(512),
416         "Tests" :
417         [
418                 {
419                  "Name" :       "Power autotest",
420                  "Command" :    "power_autotest",
421                  "Func" :       default_autotest,
422                  "Report" :     None,
423                 },
424         ]
425 },
426 {
427         "Prefix" :      "power_acpi_cpufreq",
428         "Memory" :      per_sockets(512),
429         "Tests" :
430         [
431                 {
432                  "Name" :       "Power ACPI cpufreq autotest",
433                  "Command" :    "power_acpi_cpufreq_autotest",
434                  "Func" :       default_autotest,
435                  "Report" :     None,
436                 },
437         ]
438 },
439 {
440         "Prefix" :      "power_kvm_vm",
441         "Memory" :      "512",
442         "Tests" :
443         [
444                 {
445                  "Name" :       "Power KVM VM  autotest",
446                  "Command" :    "power_kvm_vm_autotest",
447                  "Func" :       default_autotest,
448                  "Report" :     None,
449                 },
450         ]
451 },
452 {
453         "Prefix" :      "lpm6",
454         "Memory" :      "512",
455         "Tests" :
456         [
457                 {
458                  "Name" :       "LPM6 autotest",
459                  "Command" :    "lpm6_autotest",
460                  "Func" :       default_autotest,
461                  "Report" :     None,
462                 },
463         ]
464 },
465 {
466         "Prefix":       "timer_perf",
467         "Memory" :      per_sockets(512),
468         "Tests" :
469         [
470                 {
471                  "Name" :       "Timer performance autotest",
472                  "Command" :    "timer_perf_autotest",
473                  "Func" :       default_autotest,
474                  "Report" :     None,
475                 },
476         ]
477 },
478
479 #
480 # Please always make sure that ring_perf is the last test!
481 #
482 {
483         "Prefix":       "ring_perf",
484         "Memory" :      per_sockets(512),
485         "Tests" :
486         [
487                 {
488                  "Name" :       "Ring performance autotest",
489                  "Command" :    "ring_perf_autotest",
490                  "Func" :       default_autotest,
491                  "Report" :     None,
492                 },
493         ]
494 },
495 ]