selftests/bpf: skip verifier tests for unsupported map types
authorStanislav Fomichev <sdf@google.com>
Mon, 28 Jan 2019 17:21:17 +0000 (09:21 -0800)
committerDaniel Borkmann <daniel@iogearbox.net>
Thu, 31 Jan 2019 09:13:21 +0000 (10:13 +0100)
commit9acea337ef570faa14f13232d1b2fa6615aaf569
treebeab5ebbc6e9174d6c948912997de4d653ef6485
parent8184d44c9a577a2f1842ed6cc844bfd4a9981d8e
selftests/bpf: skip verifier tests for unsupported map types

Use recently introduced bpf_probe_map_type() to skip tests in the
test_verifier if map creation (create_map) fails. It's handled
explicitly for each fixup, i.e. if bpf_create_map returns negative fd,
we probe the kernel for the appropriate map support and skip the
test is map type is not supported.

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