]> git.hungrycats.org Git - linux/commit
selftests/bpf: Add testcase for updating attached freplace prog to prog_array map
authorLeon Hwang <leon.hwang@linux.dev>
Sun, 28 Jul 2024 11:46:12 +0000 (19:46 +0800)
committerAlexei Starovoitov <ast@kernel.org>
Thu, 22 Aug 2024 20:28:19 +0000 (13:28 -0700)
commit7559a7a84ef83a2dd86caf623430b8d834843cec
tree40480ff2bd10a9af89f0fe3798e783b0f2e034ce
parent50c374c6d1a43db9444cb74cc09552c817db2a9b
selftests/bpf: Add testcase for updating attached freplace prog to prog_array map

Add a selftest to confirm the issue, which gets -EINVAL when update
attached freplace prog to prog_array map, has been fixed.

cd tools/testing/selftests/bpf; ./test_progs -t tailcalls
328/25  tailcalls/tailcall_freplace:OK
328     tailcalls:OK
Summary: 1/25 PASSED, 0 SKIPPED, 0 FAILED

Acked-by: Yonghong Song <yonghong.song@linux.dev>
Signed-off-by: Leon Hwang <leon.hwang@linux.dev>
Link: https://lore.kernel.org/r/20240728114612.48486-3-leon.hwang@linux.dev
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
tools/testing/selftests/bpf/prog_tests/tailcalls.c
tools/testing/selftests/bpf/progs/tailcall_freplace.c [new file with mode: 0644]
tools/testing/selftests/bpf/progs/tc_bpf2bpf.c [new file with mode: 0644]