Re: [PATCH RFC bpf-next v2 15/18] selftests/bpf: Add stress tests for resizable hash get_next_key

Alexei Starovoitov
2026-04-12T23:20:03Z

On Wed, Apr 8, 2026 at 8:11 AM Mykyta Yatsenko
<mykyta.yatsenko5@gmail.com> wrote:
>
> From: Mykyta Yatsenko <yatsenko@meta.com>
>
> Test get_next_key behavior under concurrent modification:
> * Resize test: verify all elements visited after resize trigger
> * Stress test: concurrent iterators and modifiers to detect races
>
> Signed-off-by: Mykyta Yatsenko <yatsenko@meta.com>
> ---
> tools/testing/selftests/bpf/prog_tests/rhash.c | 181 +++++++++++++++++++++++++
> tools/testing/selftests/bpf/progs/rhash.c | 8 ++
> 2 files changed, 189 insertions(+)

I don't like this either. It's a test of rhashtable internals.
If you really feel like testing it, it shouldn't be in selftests/bpf