]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
selftests/bpf: Add test for unpinning htab with internal timer struct
authorKaFai Wan <kafai.wan@linux.dev>
Wed, 8 Oct 2025 10:26:27 +0000 (18:26 +0800)
committerAlexei Starovoitov <ast@kernel.org>
Fri, 10 Oct 2025 17:10:08 +0000 (10:10 -0700)
commitaccb9a7e87f096a12eb21256107b9c8e343f8019
tree9fd6319c9b396ef35ecac148ed69701ee584192f
parent4f375ade6aa9f37fd72d7a78682f639772089eed
selftests/bpf: Add test for unpinning htab with internal timer struct

Add test to verify that unpinning hash tables containing internal timer
structures does not trigger context warnings.

Each subtest (timer_prealloc and timer_no_prealloc) can trigger the
context warning when unpinning, but the warning cannot be triggered
twice within a short time interval (a HZ), which is expected behavior.

Signed-off-by: KaFai Wan <kafai.wan@linux.dev>
Acked-by: Yonghong Song <yonghong.song@linux.dev>
Link: https://lore.kernel.org/r/20251008102628.808045-3-kafai.wan@linux.dev
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
tools/testing/selftests/bpf/prog_tests/pinning_htab.c [new file with mode: 0644]
tools/testing/selftests/bpf/progs/test_pinning_htab.c [new file with mode: 0644]