selftests/bpf: Dynptr tests
authorJoanne Koong <joannelkoong@gmail.com>
Mon, 23 May 2022 21:07:12 +0000 (14:07 -0700)
committerAndrii Nakryiko <andrii@kernel.org>
Mon, 23 May 2022 21:31:29 +0000 (14:31 -0700)
commit0cf7052a55128f7fd7905f6ae6eb995d6db76b52
treecae0fe762d981c3965aab29479d0c7af319ce73c
parent34d4ef5775f776ec4b0d53a02d588bf3195cada6
selftests/bpf: Dynptr tests

This patch adds tests for dynptrs, which include cases that the
verifier needs to reject (for example, a bpf_ringbuf_reserve_dynptr
without a corresponding bpf_ringbuf_submit/discard_dynptr) as well
as cases that should successfully pass.

Signed-off-by: Joanne Koong <joannelkoong@gmail.com>
Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Acked-by: Andrii Nakryiko <andrii@kernel.org>
Link: https://lore.kernel.org/bpf/20220523210712.3641569-7-joannelkoong@gmail.com
tools/testing/selftests/bpf/prog_tests/dynptr.c [new file with mode: 0644]
tools/testing/selftests/bpf/progs/dynptr_fail.c [new file with mode: 0644]
tools/testing/selftests/bpf/progs/dynptr_success.c [new file with mode: 0644]