]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commit975ea35c7dd720b218e00e434f88d5577a67df52
treecae0fe762d981c3965aab29479d0c7af319ce73c
parent526a3ab7ec39cf306361825563adf87c4b27408e
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]