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)
committerDaniel Borkmann <daniel@iogearbox.net>
Thu, 31 Jan 2019 09:13:21 +0000 (10:13 +0100)
commit8184d44c9a577a2f1842ed6cc844bfd4a9981d8e
tree09b6fdb3472d8bfb64e9c86cfc919c2207df17ca
parente8ddbfb4bcb2254acb71f2ad9008d736f45273a7
selftests/bpf: skip verifier tests for unsupported program types

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>
tools/testing/selftests/bpf/test_verifier.c