aboutsummaryrefslogtreecommitdiffstats
path: root/tools/bpf/bpftool/prog.c
diff options
context:
space:
mode:
authorJohan Almbladh <[email protected]>2021-07-21 10:38:22 +0000
committerAndrii Nakryiko <[email protected]>2021-07-24 00:21:39 +0000
commit2b7e9f25e590726cca76700ebdb10e92a7a72ca1 (patch)
treec88344e18d7ab7299083fd311c52ed9b03d03a5e /tools/bpf/bpftool/prog.c
parentbpf/tests: Fix copy-and-paste error in double word test (diff)
downloadkernel-2b7e9f25e590726cca76700ebdb10e92a7a72ca1.tar.gz
kernel-2b7e9f25e590726cca76700ebdb10e92a7a72ca1.zip
bpf/tests: Do not PASS tests without actually testing the result
Each test case can have a set of sub-tests, where each sub-test can run the cBPF/eBPF test snippet with its own data_size and expected result. Before, the end of the sub-test array was indicated by both data_size and result being zero. However, most or all of the internal eBPF tests has a data_size of zero already. When such a test also had an expected value of zero, the test was never run but reported as PASS anyway. Now the test runner always runs the first sub-test, regardless of the data_size and result values. The sub-test array zero-termination only applies for any additional sub-tests. There are other ways fix it of course, but this solution at least removes the surprise of eBPF tests with a zero result always succeeding. Signed-off-by: Johan Almbladh <[email protected]> Signed-off-by: Andrii Nakryiko <[email protected]> Link: https://lore.kernel.org/bpf/[email protected]
Diffstat (limited to 'tools/bpf/bpftool/prog.c')
0 files changed, 0 insertions, 0 deletions