selftests/bpf: Use __failure macro in task kfunc testsuite
authorDavid Vernet <void@manifault.com>
Fri, 20 Jan 2023 02:18:44 +0000 (20:18 -0600)
committerDaniel Borkmann <daniel@iogearbox.net>
Mon, 23 Jan 2023 19:32:20 +0000 (20:32 +0100)
commit7525daeefc8c20902bac63f89603096c76808fe0
tree3b49a334c308aecda56e9b29becb2b0426b594cf
parent74d23931f4096efcdef1bc12cc828585e49e99ce
selftests/bpf: Use __failure macro in task kfunc testsuite

In commit 537c3f66eac1 ("selftests/bpf: add generic BPF program tester-loader"),
a new mechanism was added to the BPF selftest framework to allow testsuites to
use macros to define expected failing testcases.

This allows any testsuite which tests verification failure to remove a good
amount of boilerplate code. This patch updates the task_kfunc selftest suite
to use these new macros.

Signed-off-by: David Vernet <void@manifault.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Acked-by: Yonghong Song <yhs@fb.com>
Link: https://lore.kernel.org/bpf/20230120021844.3048244-1-void@manifault.com
tools/testing/selftests/bpf/prog_tests/task_kfunc.c
tools/testing/selftests/bpf/progs/task_kfunc_failure.c