selftests/bpf: Add BPF_CORE_READ and BPF_CORE_READ_STR_INTO macro tests
authorAndrii Nakryiko <andriin@fb.com>
Tue, 8 Oct 2019 17:59:42 +0000 (10:59 -0700)
committerDaniel Borkmann <daniel@iogearbox.net>
Tue, 8 Oct 2019 21:16:04 +0000 (23:16 +0200)
commitee2eb063d330dc8dbe71041a1dae3cea889fdcb5
treeb0b3c485a950387adf3d4eff04a21b41e11620fe
parent7db3822ab99157e16c41caa5e7d788834d5a3c7c
selftests/bpf: Add BPF_CORE_READ and BPF_CORE_READ_STR_INTO macro tests

Validate BPF_CORE_READ correctness and handling of up to 9 levels of
nestedness using cyclic task->(group_leader->)*->tgid chains.

Also add a test of maximum-dpeth BPF_CORE_READ_STR_INTO() macro.

Signed-off-by: Andrii Nakryiko <andriin@fb.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Acked-by: John Fastabend <john.fastabend@gmail.com>
Acked-by: Song Liu <songliubraving@fb.com>
Link: https://lore.kernel.org/bpf/20191008175942.1769476-8-andriin@fb.com
tools/testing/selftests/bpf/prog_tests/core_reloc.c
tools/testing/selftests/bpf/progs/core_reloc_types.h
tools/testing/selftests/bpf/progs/test_core_reloc_kernel.c