]> git.baikalelectronics.ru Git - kernel.git/commit
tools/bpf: add a test for bpf_get_stack with tracepoint prog
authorYonghong Song <yhs@fb.com>
Sun, 29 Apr 2018 05:28:16 +0000 (22:28 -0700)
committerAlexei Starovoitov <ast@kernel.org>
Sun, 29 Apr 2018 15:45:54 +0000 (08:45 -0700)
commit1334989aab24aaeeee8f9ab4fbdfccbb6912a5fe
tree6aeacaea9a6182914c6e79e073e9f279f57d7cf2
parent507801bf32d1b7953a5793cc52bee01599be5dce
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>
tools/testing/selftests/bpf/test_progs.c
tools/testing/selftests/bpf/test_stacktrace_build_id.c
tools/testing/selftests/bpf/test_stacktrace_map.c