]> www.infradead.org Git - users/dwmw2/linux.git/commit
selftests/bpf: Add testcases for tailcall hierarchy fixing
authorLeon Hwang <hffilwlqm@gmail.com>
Sun, 14 Jul 2024 12:39:02 +0000 (20:39 +0800)
committerAndrii Nakryiko <andrii@kernel.org>
Mon, 29 Jul 2024 19:53:42 +0000 (12:53 -0700)
commitb83b936f3e9a3c63896852198a1814e90e68eef5
tree10d1ec0094633d18d9931ff26437ea34ed24507c
parent66ff4d61dc124eafe9efaeaef696a09b7f236da2
selftests/bpf: Add testcases for tailcall hierarchy fixing

Add some test cases to confirm the tailcall hierarchy issue has been fixed.

On x64, the selftests result is:

cd tools/testing/selftests/bpf && ./test_progs -t tailcalls
327/18  tailcalls/tailcall_bpf2bpf_hierarchy_1:OK
327/19  tailcalls/tailcall_bpf2bpf_hierarchy_fentry:OK
327/20  tailcalls/tailcall_bpf2bpf_hierarchy_fexit:OK
327/21  tailcalls/tailcall_bpf2bpf_hierarchy_fentry_fexit:OK
327/22  tailcalls/tailcall_bpf2bpf_hierarchy_fentry_entry:OK
327/23  tailcalls/tailcall_bpf2bpf_hierarchy_2:OK
327/24  tailcalls/tailcall_bpf2bpf_hierarchy_3:OK
327     tailcalls:OK
Summary: 1/24 PASSED, 0 SKIPPED, 0 FAILED

On arm64, the selftests result is:

cd tools/testing/selftests/bpf && ./test_progs -t tailcalls
327/18  tailcalls/tailcall_bpf2bpf_hierarchy_1:OK
327/19  tailcalls/tailcall_bpf2bpf_hierarchy_fentry:OK
327/20  tailcalls/tailcall_bpf2bpf_hierarchy_fexit:OK
327/21  tailcalls/tailcall_bpf2bpf_hierarchy_fentry_fexit:OK
327/22  tailcalls/tailcall_bpf2bpf_hierarchy_fentry_entry:OK
327/23  tailcalls/tailcall_bpf2bpf_hierarchy_2:OK
327/24  tailcalls/tailcall_bpf2bpf_hierarchy_3:OK
327     tailcalls:OK
Summary: 1/24 PASSED, 0 SKIPPED, 0 FAILED

Acked-by: Eduard Zingerman <eddyz87@gmail.com>
Signed-off-by: Leon Hwang <hffilwlqm@gmail.com>
Link: https://lore.kernel.org/r/20240714123902.32305-4-hffilwlqm@gmail.com
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
tools/testing/selftests/bpf/prog_tests/tailcalls.c
tools/testing/selftests/bpf/progs/tailcall_bpf2bpf_hierarchy1.c [new file with mode: 0644]
tools/testing/selftests/bpf/progs/tailcall_bpf2bpf_hierarchy2.c [new file with mode: 0644]
tools/testing/selftests/bpf/progs/tailcall_bpf2bpf_hierarchy3.c [new file with mode: 0644]
tools/testing/selftests/bpf/progs/tailcall_bpf2bpf_hierarchy_fentry.c [new file with mode: 0644]
tools/testing/selftests/bpf/progs/tc_dummy.c [new file with mode: 0644]