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
This commit is contained in:
Xu Kuohai 2025-10-18 11:57:37 +08:00 • committed by Andrii Nakryiko
commit 8f7a86ecde
3 changed files with 165 additions and 1 deletions