]> git.ipfire.org Git - people/ms/linux.git/commit
selftests/bpf: Skip verifier tests that fail to load with ENOTSUPP
authorIlya Leoshkevich <iii@linux.ibm.com>
Thu, 7 Oct 2021 17:33:28 +0000 (19:33 +0200)
committerAndrii Nakryiko <andrii@kernel.org>
Sat, 9 Oct 2021 03:07:05 +0000 (20:07 -0700)
commit5319255b8df9271474bc9027cabf82253934f28d
tree7bba86f8ff87713a78ad8dfd10f7390022562a62
parente52a8b96c5ade8007ffc5f2fc8142b40e45c325c
selftests/bpf: Skip verifier tests that fail to load with ENOTSUPP

The verifier tests added in commit c48e51c8b07a ("bpf: selftests: Add
selftests for module kfunc support") fail on s390, since the JIT does
not support calling kernel functions. This is most likely an issue for
all the other non-Intel arches, as well as on Intel with
!CONFIG_DEBUG_INFO_BTF or !CONFIG_BPF_JIT.

Trying to check for messages from all the possible add_kfunc_call()
failure cases in test_verifier looks pointless, so do a much simpler
thing instead: just like it's already done in do_prog_test_run(), skip
the tests that fail to load with ENOTSUPP.

Signed-off-by: Ilya Leoshkevich <iii@linux.ibm.com>
Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Acked-by: Song Liu <songliubraving@fb.com>
Link: https://lore.kernel.org/bpf/20211007173329.381754-1-iii@linux.ibm.com
tools/testing/selftests/bpf/test_verifier.c