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