Re: [PATCH v2] selftests/bpf: trampoline_count: use dedicated target function

From: Paul Chaignon

Date: Tue Mar 17 2026 - 06:54:50 EST


On Tue, Mar 17, 2026 at 09:02:09AM +0800, Sun Jian wrote:
> trampoline_count fills all trampoline attachment slots for a single
> target function and verifies that one extra attach fails with -E2BIG.
>
> It currently targets bpf_modify_return_test, which is also used by
> modify_return and get_func_ip_test. When those tests run in parallel,
> they can contend for the same per-function trampoline quota and
> cause unexpected attach failures. This issue is currently masked by
> harness serialization.
>
> Add a dedicated bpf_trampoline_count_test target and switch
> trampoline_count to use it. This keeps the test semantics unchanged
> while isolating it from other modify_return-based selftests, so it no
> longer needs to run in serial mode. Remove the TODO comment as
> well.
>
> Tested:
> ./test_progs -t trampoline_count -vv
> ./test_progs -t modify_return -vv
> ./test_progs -t get_func_ip_test -vv
> ./test_progs -j$(nproc) -t trampoline_count -vv
> ./test_progs -j$(nproc) -t
> trampoline_count,modify_return,get_func_ip_test -vv
>
> Tested-by: Paul Chaignon <paul.chaignon@xxxxxxxxx>
> Signed-off-by: Sun Jian <sun.jian.kdev@xxxxxxxxx>
> ---
>
> v2:
> - add Paul's Tested-by

FYI, in general, unless there are merge conflicts, you don't need to
resend just for the tags. Maintainers can apply those when they merge.

[...]