]> git.baikalelectronics.ru Git - kernel.git/commit
bpf/tests: Allow different number of runs per test case
authorJohan Almbladh <johan.almbladh@anyfinetworks.com>
Tue, 14 Sep 2021 09:18:29 +0000 (11:18 +0200)
committerDaniel Borkmann <daniel@iogearbox.net>
Tue, 28 Sep 2021 07:26:27 +0000 (09:26 +0200)
commitc51ea0bc914bbb3a90d1ec396ba80970081ce2e3
tree52a54fe7adfd2f688a3cb7a8b3b71aa8716df051
parent46f5229a639d90fa2244492869a85fe7e4750ba3
bpf/tests: Allow different number of runs per test case

This patch allows a test cast to specify the number of runs to use. For
compatibility with existing test case definitions, the default value 0
is interpreted as MAX_TESTRUNS.

A reduced number of runs is useful for complex test programs where 1000
runs may take a very long time. Instead of reducing what is tested, one
can instead reduce the number of times the test is run.

Signed-off-by: Johan Almbladh <johan.almbladh@anyfinetworks.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Link: https://lore.kernel.org/bpf/20210914091842.4186267-2-johan.almbladh@anyfinetworks.com
lib/test_bpf.c