tools/bpf: add a test for bpf_get_stack with tracepoint prog
The test_stacktrace_map and test_stacktrace_build_id are enhanced to call bpf_get_stack in the helper to get the stack trace as well. The stack traces from bpf_get_stack and bpf_get_stackid are compared to ensure that for the same stack as represented as the same hash, their ip addresses or build id's must be the same. Acked-by:Alexei Starovoitov <ast@kernel.org> Signed-off-by:
Yonghong Song <yhs@fb.com> Signed-off-by:
Alexei Starovoitov <ast@kernel.org>
Showing
- tools/testing/selftests/bpf/test_progs.c 64 additions, 6 deletionstools/testing/selftests/bpf/test_progs.c
- tools/testing/selftests/bpf/test_stacktrace_build_id.c 18 additions, 2 deletionstools/testing/selftests/bpf/test_stacktrace_build_id.c
- tools/testing/selftests/bpf/test_stacktrace_map.c 16 additions, 3 deletionstools/testing/selftests/bpf/test_stacktrace_map.c
Loading
Please register or sign in to comment