aboutsummaryrefslogtreecommitdiff
path: root/tools/testing/selftests/bpf/progs/percpu_alloc_array.c
diff options
context:
space:
mode:
authorDave Marchevsky <davemarchevsky@fb.com>2023-10-13 13:44:25 -0700
committerAndrii Nakryiko <andrii@kernel.org>2023-10-13 15:48:58 -0700
commite0e1a7a5fc377d54bd792c6368a375d41fc316ef (patch)
treef8e5d4265acfb8d1a0d074ca8188cbd8e86c4105 /tools/testing/selftests/bpf/progs/percpu_alloc_array.c
parent4ac4546821584736798aaa9e97da9f6eaf689ea3 (diff)
selftests/bpf: Add tests for open-coded task_vma iter
The open-coded task_vma iter added earlier in this series allows for natural iteration over a task's vmas using existing open-coded iter infrastructure, specifically bpf_for_each. This patch adds a test demonstrating this pattern and validating correctness. The vma->vm_start and vma->vm_end addresses of the first 1000 vmas are recorded and compared to /proc/PID/maps output. As expected, both see the same vmas and addresses - with the exception of the [vsyscall] vma - which is explained in a comment in the prog_tests program. Signed-off-by: Dave Marchevsky <davemarchevsky@fb.com> Signed-off-by: Andrii Nakryiko <andrii@kernel.org> Link: https://lore.kernel.org/bpf/20231013204426.1074286-5-davemarchevsky@fb.com
Diffstat (limited to 'tools/testing/selftests/bpf/progs/percpu_alloc_array.c')
0 files changed, 0 insertions, 0 deletions