summaryrefslogtreecommitdiff
path: root/tools/testing/selftests/bpf/verifier
diff options
context:
space:
mode:
authorLorenz Bauer <lmb@cloudflare.com>2021-03-03 10:18:16 +0000
committerAlexei Starovoitov <ast@kernel.org>2021-03-04 19:11:30 -0800
commitb4f894633fa14d7d46ba7676f950b90a401504bb (patch)
tree84687bd50bbab7707d0fbace6e3b848e58ae031b /tools/testing/selftests/bpf/verifier
parentabab306ff04b570e817be3f026068fe9a5d99fbb (diff)
selftests: bpf: Don't run sk_lookup in verifier tests
sk_lookup doesn't allow setting data_in for bpf_prog_run. This doesn't play well with the verifier tests, since they always set a 64 byte input buffer. Allow not running verifier tests by setting bpf_test.runs to a negative value and don't run the ctx access case for sk_lookup. We have dedicated ctx access tests so skipping here doesn't reduce coverage. Signed-off-by: Lorenz Bauer <lmb@cloudflare.com> Signed-off-by: Alexei Starovoitov <ast@kernel.org> Link: https://lore.kernel.org/bpf/20210303101816.36774-6-lmb@cloudflare.com
Diffstat (limited to 'tools/testing/selftests/bpf/verifier')
-rw-r--r--tools/testing/selftests/bpf/verifier/ctx_sk_lookup.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/tools/testing/selftests/bpf/verifier/ctx_sk_lookup.c b/tools/testing/selftests/bpf/verifier/ctx_sk_lookup.c
index fb13ca2d5606..d78627be060f 100644
--- a/tools/testing/selftests/bpf/verifier/ctx_sk_lookup.c
+++ b/tools/testing/selftests/bpf/verifier/ctx_sk_lookup.c
@@ -239,6 +239,7 @@
.result = ACCEPT,
.prog_type = BPF_PROG_TYPE_SK_LOOKUP,
.expected_attach_type = BPF_SK_LOOKUP,
+ .runs = -1,
},
/* invalid 8-byte reads from a 4-byte fields in bpf_sk_lookup */
{