On Fri, Nov 22, 2019 at 12:08 PM Daniel Borkmann <daniel@xxxxxxxxxxxxx> wrote: > > Add several BPF kselftest cases for tail calls which test the various > patch directions, and that multiple locations are patched in same and > different programs. > > # ./test_progs -n 45 > #45/1 tailcall_1:OK > #45/2 tailcall_2:OK > #45/3 tailcall_3:OK > #45/4 tailcall_4:OK > #45/5 tailcall_5:OK > #45 tailcalls:OK > Summary: 1/5 PASSED, 0 SKIPPED, 0 FAILED > > I've also verified the JITed dump after each of the rewrite cases that > it matches expectations. > > Also regular test_verifier suite passes fine which contains further tail > call tests: > > # ./test_verifier > [...] > Summary: 1563 PASSED, 0 SKIPPED, 0 FAILED > > Checked under JIT, interpreter and JIT + hardening. > > Signed-off-by: Daniel Borkmann <daniel@xxxxxxxxxxxxx> > --- LGTM. Thanks for adding more tests! Acked-by: Andrii Nakryiko <andriin@xxxxxx> > .../selftests/bpf/prog_tests/tailcalls.c | 487 ++++++++++++++++++ > tools/testing/selftests/bpf/progs/tailcall1.c | 48 ++ > tools/testing/selftests/bpf/progs/tailcall2.c | 59 +++ > tools/testing/selftests/bpf/progs/tailcall3.c | 31 ++ > tools/testing/selftests/bpf/progs/tailcall4.c | 33 ++ > tools/testing/selftests/bpf/progs/tailcall5.c | 40 ++ > 6 files changed, 698 insertions(+) > create mode 100644 tools/testing/selftests/bpf/prog_tests/tailcalls.c > create mode 100644 tools/testing/selftests/bpf/progs/tailcall1.c > create mode 100644 tools/testing/selftests/bpf/progs/tailcall2.c > create mode 100644 tools/testing/selftests/bpf/progs/tailcall3.c > create mode 100644 tools/testing/selftests/bpf/progs/tailcall4.c > create mode 100644 tools/testing/selftests/bpf/progs/tailcall5.c > [...]