]> www.infradead.org Git - users/dwmw2/linux.git/commit
selftests: bpf: Don't run sk_lookup in verifier tests
authorLorenz Bauer <lmb@cloudflare.com>
Mon, 1 Aug 2022 07:29:16 +0000 (15:29 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 3 Aug 2022 10:00:52 +0000 (12:00 +0200)
commit4bfc9dc60873923ffa64ee77084bac55031a30a0
treeb811b27442b90ba7f0d6ddf88d9735c1125fa1ee
parent6d3fad2b44eb9d226a896d1c93909f0fd2e1b9ea
selftests: bpf: Don't run sk_lookup in verifier tests

commit b4f894633fa14d7d46ba7676f950b90a401504bb upstream.

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
Signed-off-by: Tianchen Ding <dtcccc@linux.alibaba.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
tools/testing/selftests/bpf/test_verifier.c
tools/testing/selftests/bpf/verifier/ctx_sk_lookup.c