selftests/bpf: Add a test for attaching BPF prog to another BPF prog and subprog
authorAlexei Starovoitov <ast@kernel.org>
Thu, 14 Nov 2019 18:57:20 +0000 (10:57 -0800)
committerDaniel Borkmann <daniel@iogearbox.net>
Fri, 15 Nov 2019 22:46:09 +0000 (23:46 +0100)
commitd6f39601ec5e708fb666a2ad437c7bef4cfab39b
treef22e546f59369fa17873ef1ec30cc40399460de7
parent4c0963243c5f56bffe8eaba6acc5b076d51797f4
selftests/bpf: Add a test for attaching BPF prog to another BPF prog and subprog

Add a test that attaches one FEXIT program to main sched_cls networking program
and two other FEXIT programs to subprograms. All three tracing programs
access return values and skb->len of networking program and subprograms.

Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Acked-by: Song Liu <songliubraving@fb.com>
Acked-by: Andrii Nakryiko <andriin@fb.com>
Link: https://lore.kernel.org/bpf/20191114185720.1641606-21-ast@kernel.org
tools/testing/selftests/bpf/prog_tests/fexit_bpf2bpf.c [new file with mode: 0644]
tools/testing/selftests/bpf/progs/fexit_bpf2bpf.c [new file with mode: 0644]