selftests/bpf: skip verifier tests for unsupported program types
authorStanislav Fomichev <sdf@google.com>
Mon, 28 Jan 2019 17:21:16 +0000 (09:21 -0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 5 Apr 2019 20:33:13 +0000 (22:33 +0200)
commit118d38a3577f7728278f6afda8436af05a6bec7f
tree530b8378eda9608ab6ce47e38fc0e0e6cc8a8be7
parentae92cf4760f8ee21db0297299be11cf3ed09bcc9
selftests/bpf: skip verifier tests for unsupported program types

[ Upstream commit 8184d44c9a577a2f1842ed6cc844bfd4a9981d8e ]

Use recently introduced bpf_probe_prog_type() to skip tests in the
test_verifier() if bpf_verify_program() fails. The skipped test is
indicated in the output.

Example:

...
679/p bpf_get_stack return R0 within range SKIP (unsupported program
type 5)
680/p ld_abs: invalid op 1 OK
...
Summary: 863 PASSED, 165 SKIPPED, 3 FAILED

Signed-off-by: Stanislav Fomichev <sdf@google.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
tools/testing/selftests/bpf/test_verifier.c