]> git.baikalelectronics.ru Git - kernel.git/commit
selftests/bpf: Make bpf_user_ringbuf_drain() selftest callback return 1
authorDavid Vernet <void@manifault.com>
Wed, 12 Oct 2022 23:20:15 +0000 (18:20 -0500)
committerAndrii Nakryiko <andrii@kernel.org>
Thu, 13 Oct 2022 15:27:38 +0000 (08:27 -0700)
commit0e1fc25289f5f1b1fc399b6bb52350cf5c3f02f3
treebc4231cfacdb6fb9493d576ea718775f325086a0
parent6fa86f66d73c5d7c96343846bcfa04dead4be24a
selftests/bpf: Make bpf_user_ringbuf_drain() selftest callback return 1

In commit 6ec39f76ece6 ("bpf: Add verifier support for custom callback
return range"), the verifier was updated to require callbacks to BPF
helpers to explicitly specify the range of values that can be returned.
bpf_user_ringbuf_drain() was merged after this in commit 63de7fba60cc
("bpf: Add bpf_user_ringbuf_drain() helper"), and this change in default
behavior was missed. This patch updates the BPF_MAP_TYPE_USER_RINGBUF
selftests to also return 1 from a bpf_user_ringbuf_drain() callback so
as to properly test this going forward.

Signed-off-by: David Vernet <void@manifault.com>
Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Link: https://lore.kernel.org/bpf/20221012232015.1510043-3-void@manifault.com
tools/testing/selftests/bpf/progs/user_ringbuf_success.c