log: deprecate history dump
[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" :       "Cycles autotest",
62                  "Command" :    "cycles_autotest",
63                  "Func" :       default_autotest,
64                  "Report" :     None,
65                 },
66                 {
67                  "Name" :       "Timer autotest",
68                  "Command" :    "timer_autotest",
69                  "Func" :       timer_autotest,
70                  "Report" :     None,
71                 },
72                 {
73                  "Name" :       "Debug autotest",
74                  "Command" :    "debug_autotest",
75                  "Func" :       default_autotest,
76                  "Report" :     None,
77                 },
78                 {
79                  "Name" :       "Errno autotest",
80                  "Command" :    "errno_autotest",
81                  "Func" :       default_autotest,
82                  "Report" :     None,
83                 },
84                 {
85                  "Name" :       "Meter autotest",
86                  "Command" :    "meter_autotest",
87                  "Func" :       default_autotest,
88                  "Report" :     None,
89                 },
90                 {
91                  "Name" :       "Common autotest",
92                  "Command" :    "common_autotest",
93                  "Func" :       default_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" :      "16",
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(390),
168         "Tests" :
169         [
170                 {
171                  "Name" :       "LPM autotest",
172                  "Command" :    "lpm_autotest",
173                  "Func" :       default_autotest,
174                  "Report" :     None,
175                 },
176                 {
177                         "Name" :    "LPM6 autotest",
178                         "Command" : "lpm6_autotest",
179                         "Func" :    default_autotest,
180                         "Report" :  None,
181                 },
182                 {
183                  "Name" :       "IVSHMEM autotest",
184                  "Command" :    "ivshmem_autotest",
185                  "Func" :       default_autotest,
186                  "Report" :     None,
187                 },
188                 {
189                  "Name" :       "Memcpy autotest",
190                  "Command" :    "memcpy_autotest",
191                  "Func" :       default_autotest,
192                  "Report" :     None,
193                 },
194                 {
195                  "Name" :       "Memzone autotest",
196                  "Command" :    "memzone_autotest",
197                  "Func" :       default_autotest,
198                  "Report" :     None,
199                 },
200                 {
201                  "Name" :       "String autotest",
202                  "Command" :    "string_autotest",
203                  "Func" :       default_autotest,
204                  "Report" :     None,
205                 },
206                 {
207                  "Name" :       "Alarm autotest",
208                  "Command" :    "alarm_autotest",
209                  "Func" :       default_autotest,
210                  "Report" :     None,
211                 },
212         ]
213 },
214 {
215         "Prefix":       "group_4",
216         "Memory" :      per_sockets(128),
217         "Tests" :
218         [
219                 {
220                  "Name" :       "PCI autotest",
221                  "Command" :    "pci_autotest",
222                  "Func" :       default_autotest,
223                  "Report" :     None,
224                 },
225                 {
226                  "Name" :       "Malloc autotest",
227                  "Command" :    "malloc_autotest",
228                  "Func" :       default_autotest,
229                  "Report" :     None,
230                 },
231                 {
232                  "Name" :       "Multi-process autotest",
233                  "Command" :    "multiprocess_autotest",
234                  "Func" :       default_autotest,
235                  "Report" :     None,
236                 },
237                 {
238                  "Name" :       "Mbuf autotest",
239                  "Command" :    "mbuf_autotest",
240                  "Func" :       default_autotest,
241                  "Report" :     None,
242                 },
243                 {
244                  "Name" :       "Per-lcore autotest",
245                  "Command" :    "per_lcore_autotest",
246                  "Func" :       default_autotest,
247                  "Report" :     None,
248                 },
249                 {
250                  "Name" :       "Ring autotest",
251                  "Command" :    "ring_autotest",
252                  "Func" :       default_autotest,
253                  "Report" :     None,
254                 },
255         ]
256 },
257 {
258         "Prefix":       "group_5",
259         "Memory" :      "32",
260         "Tests" :
261         [
262                 {
263                  "Name" :       "Spinlock autotest",
264                  "Command" :    "spinlock_autotest",
265                  "Func" :       spinlock_autotest,
266                  "Report" :     None,
267                 },
268                 {
269                  "Name" :       "Byte order autotest",
270                  "Command" :    "byteorder_autotest",
271                  "Func" :       default_autotest,
272                  "Report" :     None,
273                 },
274                 {
275                  "Name" :       "TAILQ autotest",
276                  "Command" :    "tailq_autotest",
277                  "Func" :       default_autotest,
278                  "Report" :     None,
279                 },
280                 {
281                  "Name" :       "Command-line autotest",
282                  "Command" :    "cmdline_autotest",
283                  "Func" :       default_autotest,
284                  "Report" :     None,
285                 },
286                 {
287                  "Name" :       "Interrupts autotest",
288                  "Command" :    "interrupt_autotest",
289                  "Func" :       default_autotest,
290                  "Report" :     None,
291                 },
292         ]
293 },
294 {
295         "Prefix":       "group_6",
296         "Memory" :      per_sockets(128),
297         "Tests" :
298         [
299                 {
300                  "Name" :       "Function reentrancy autotest",
301                  "Command" :    "func_reentrancy_autotest",
302                  "Func" :       default_autotest,
303                  "Report" :     None,
304                 },
305                 {
306                  "Name" :       "Mempool autotest",
307                  "Command" :    "mempool_autotest",
308                  "Func" :       default_autotest,
309                  "Report" :     None,
310                 },
311                 {
312                  "Name" :       "Atomics autotest",
313                  "Command" :    "atomic_autotest",
314                  "Func" :       default_autotest,
315                  "Report" :     None,
316                 },
317                 {
318                  "Name" :       "Prefetch autotest",
319                  "Command" :    "prefetch_autotest",
320                  "Func" :       default_autotest,
321                  "Report" :     None,
322                  },
323                 {
324                  "Name" :"Red autotest",
325                  "Command" : "red_autotest",
326                  "Func" :default_autotest,
327                  "Report" :None,
328                  },
329         ]
330 },
331 {
332         "Prefix" :      "group_7",
333         "Memory" :      "64",
334         "Tests" :
335         [
336                 {
337                  "Name" :       "PMD ring autotest",
338                  "Command" :    "ring_pmd_autotest",
339                  "Func" :       default_autotest,
340                  "Report" :     None,
341                 },
342                 {
343                  "Name" :       "Access list control autotest",
344                  "Command" :    "acl_autotest",
345                  "Func" :       default_autotest,
346                  "Report" :     None,
347                 },
348                  {
349                  "Name" :"Sched autotest",
350                  "Command" : "sched_autotest",
351                  "Func" :default_autotest,
352                  "Report" :None,
353                  },
354         ]
355 },
356 ]
357
358 # tests that should not be run when any other tests are running
359 non_parallel_test_group_list = [
360
361 {
362         "Prefix" :      "kni",
363         "Memory" :      "512",
364         "Tests" :
365         [
366                 {
367                  "Name" :       "KNI autotest",
368                  "Command" :    "kni_autotest",
369                  "Func" :       default_autotest,
370                  "Report" :     None,
371                 },
372         ]
373 },
374 {
375         "Prefix":       "mempool_perf",
376         "Memory" :      per_sockets(256),
377         "Tests" :
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" :      "16",
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" :      "16",
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" :      "16",
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":       "timer_perf",
454         "Memory" :      per_sockets(512),
455         "Tests" :
456         [
457                 {
458                  "Name" :       "Timer performance autotest",
459                  "Command" :    "timer_perf_autotest",
460                  "Func" :       default_autotest,
461                  "Report" :     None,
462                 },
463         ]
464 },
465
466 #
467 # Please always make sure that ring_perf is the last test!
468 #
469 {
470         "Prefix":       "ring_perf",
471         "Memory" :      per_sockets(512),
472         "Tests" :
473         [
474                 {
475                  "Name" :       "Ring performance autotest",
476                  "Command" :    "ring_perf_autotest",
477                  "Func" :       default_autotest,
478                  "Report" :     None,
479                 },
480         ]
481 },
482 ]