]> git.baikalelectronics.ru Git - kernel.git/commit
selftests: bpf: Don't run sk_lookup in verifier tests
authorLorenz Bauer <lmb@cloudflare.com>
Wed, 3 Mar 2021 10:18:16 +0000 (10:18 +0000)
committerAlexei Starovoitov <ast@kernel.org>
Fri, 5 Mar 2021 03:11:30 +0000 (19:11 -0800)
commit2230a757b60dc84672ce50203e9cd7b3d14e46fb
tree84687bd50bbab7707d0fbace6e3b848e58ae031b
parenteef2f75798a5e6e7a8f38acca31233c460e9fbb1
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
tools/testing/selftests/bpf/test_verifier.c
tools/testing/selftests/bpf/verifier/ctx_sk_lookup.c