aboutsummaryrefslogtreecommitdiffstats
path: root/tools/testing/selftests/bpf/prog_tests/tracing_struct.c
diff options
context:
space:
mode:
authorNamhyung Kim <[email protected]>2024-10-30 22:28:19 +0000
committerAlexei Starovoitov <[email protected]>2024-11-01 18:08:32 +0000
commite5e4799e2ac3619a10a9e6db7d2a51d7cc6a69ef (patch)
treebf899a7b857c5dc592cecb81b5dca72a5ba7afbf /tools/testing/selftests/bpf/prog_tests/tracing_struct.c
parentbpf: Add open coded version of kmem_cache iterator (diff)
downloadkernel-e5e4799e2ac3619a10a9e6db7d2a51d7cc6a69ef.tar.gz
kernel-e5e4799e2ac3619a10a9e6db7d2a51d7cc6a69ef.zip
selftests/bpf: Add a test for open coded kmem_cache iter
The new subtest runs with bpf_prog_test_run_opts() as a syscall prog. It iterates the kmem_cache using bpf_for_each loop and count the number of entries. Finally it checks it with the number of entries from the regular iterator. $ ./vmtest.sh -- ./test_progs -t kmem_cache_iter ... #130/1 kmem_cache_iter/check_task_struct:OK #130/2 kmem_cache_iter/check_slabinfo:OK #130/3 kmem_cache_iter/open_coded_iter:OK #130 kmem_cache_iter:OK Summary: 1/3 PASSED, 0 SKIPPED, 0 FAILED Also simplify the code by using attach routine of the skeleton. Signed-off-by: Namhyung Kim <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Alexei Starovoitov <[email protected]>
Diffstat (limited to 'tools/testing/selftests/bpf/prog_tests/tracing_struct.c')
0 files changed, 0 insertions, 0 deletions