]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commit2049e05a07fed4f3a6724ce6bce06dd5ed936b24
tree09b6fdb3472d8bfb64e9c86cfc919c2207df17ca
parentcb547b6a8d48ff1b71b7cec8228b569afb3531e0
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