selftests/bpf: Add BPF ringbuf selftests
authorAndrii Nakryiko <andriin@fb.com>
Fri, 29 May 2020 07:54:22 +0000 (00:54 -0700)
committerAlexei Starovoitov <ast@kernel.org>
Mon, 1 Jun 2020 21:38:22 +0000 (14:38 -0700)
commitcb1c9ddd552520abd49031d47397c6e95bad882e
treef3a8313d99afc70a079e8659b96274d8f6ea7210
parentbf99c936f9478a05d51e9f101f90de70bee9a89c
selftests/bpf: Add BPF ringbuf selftests

Both singleton BPF ringbuf and BPF ringbuf with map-in-map use cases are tested.
Also reserve+submit/discards and output variants of API are validated.

Signed-off-by: Andrii Nakryiko <andriin@fb.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Link: https://lore.kernel.org/bpf/20200529075424.3139988-4-andriin@fb.com
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
tools/testing/selftests/bpf/prog_tests/ringbuf.c [new file with mode: 0644]
tools/testing/selftests/bpf/prog_tests/ringbuf_multi.c [new file with mode: 0644]
tools/testing/selftests/bpf/progs/test_ringbuf.c [new file with mode: 0644]
tools/testing/selftests/bpf/progs/test_ringbuf_multi.c [new file with mode: 0644]