]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
selftests/bpf: Add overwrite mode test for BPF ring buffer
authorXu Kuohai <xukuohai@huawei.com>
Sat, 18 Oct 2025 03:57:37 +0000 (11:57 +0800)
committerAndrii Nakryiko <andrii@kernel.org>
Tue, 28 Oct 2025 02:46:32 +0000 (19:46 -0700)
commit8f7a86ecde429709da5851043ab2e0b8236cfd29
treeddc1b1628cefd5636652c4fa5c0f444fc62ccbf3
parentfeeaf1346f80ffb181b6f9b739628103aa73b067
selftests/bpf: Add overwrite mode test for BPF ring buffer

Add overwrite mode test for BPF ring buffer. The test creates a BPF ring
buffer in overwrite mode, then repeatedly reserves and commits records
to check if the ring buffer works as expected both before and after
overwriting occurs.

Signed-off-by: Xu Kuohai <xukuohai@huawei.com>
Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Link: https://lore.kernel.org/bpf/20251018035738.4039621-3-xukuohai@huaweicloud.com
tools/testing/selftests/bpf/Makefile
tools/testing/selftests/bpf/prog_tests/ringbuf.c
tools/testing/selftests/bpf/progs/test_ringbuf_overwrite.c [new file with mode: 0644]