OSDN Git Service

bpf, tests: Add tail call test suite
authorJohan Almbladh <johan.almbladh@anyfinetworks.com>
Mon, 9 Aug 2021 09:18:29 +0000 (11:18 +0200)
committerDaniel Borkmann <daniel@iogearbox.net>
Tue, 10 Aug 2021 09:33:37 +0000 (11:33 +0200)
commit874be05f525e87768daf0f47b494dc83b9537243
tree33cb75c4f8696fde389ef87f87ae5a30f9ebb9a9
parent6a3b24ca489ea01d5b4d5a2539e75dfb5e1e18be
bpf, tests: Add tail call test suite

While BPF_CALL instructions were tested implicitly by the cBPF-to-eBPF
translation, there has not been any tests for BPF_TAIL_CALL instructions.
The new test suite includes tests for tail call chaining, tail call count
tracking and error paths. It is mainly intended for JIT development and
testing.

Signed-off-by: Johan Almbladh <johan.almbladh@anyfinetworks.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Acked-by: Yonghong Song <yhs@fb.com>
Link: https://lore.kernel.org/bpf/20210809091829.810076-15-johan.almbladh@anyfinetworks.com
lib/test_bpf.c