selftests/bpf: Add vmlinux.h selftest exercising tracing of syscalls
Add vmlinux.h generation to selftest/bpf's Makefile. Use it from newly added test_vmlinux to trace nanosleep syscall using 5 different types of programs: - tracepoint; - raw tracepoint; - raw tracepoint w/ direct memory reads (tp_btf); - kprobe; - fentry. These programs are realistic variants of real-life tracing programs, excercising vmlinux.h's usage with tracing applications. Signed-off-by:Andrii Nakryiko <andriin@fb.com> Signed-off-by:
Daniel Borkmann <daniel@iogearbox.net> Acked-by:
Martin KaFai Lau <kafai@fb.com> Link: https://lore.kernel.org/bpf/20200313172336.1879637-5-andriin@fb.com
Showing
- tools/testing/selftests/bpf/Makefile 6 additions, 1 deletiontools/testing/selftests/bpf/Makefile
- tools/testing/selftests/bpf/prog_tests/vmlinux.c 43 additions, 0 deletionstools/testing/selftests/bpf/prog_tests/vmlinux.c
- tools/testing/selftests/bpf/progs/test_vmlinux.c 84 additions, 0 deletionstools/testing/selftests/bpf/progs/test_vmlinux.c
Loading
Please register or sign in to comment