linux/tools
Sun Jian 7f5b0a60a8 selftests/bpf: move trampoline_count to dedicated bpf_testmod target
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
other selftests such as modify_return, get_func_ip_test, and
get_func_args_test. When such 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.

Move trampoline_count to a dedicated bpf_testmod target and register it
for fmod_ret attachment. Also route the final trigger through
trigger_module_test_read(), so the execution path exercises the same
dedicated target.

This keeps the test semantics unchanged while isolating it from other
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 -j$(nproc) -t trampoline_count -vv
  ./test_progs -j$(nproc) -t \
    trampoline_count,modify_return,get_func_ip_test,get_func_args_test -vv
  20 runs of:
    ./test_progs -j$(nproc) -t \
      trampoline_count,modify_return,get_func_ip_test,get_func_args_test

Signed-off-by: Sun Jian <sun.jian.kdev@gmail.com>
Acked-by: Jiri Olsa <jolsa@kernel.org>
Link: https://lore.kernel.org/r/20260324044949.869801-1-sun.jian.kdev@gmail.com
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
2026-03-24 13:39:32 -07:00
..
accounting
arch tools headers UAPI: Update tools' copy of linux/coresight-pmu.h 2026-03-05 17:28:44 -03:00
bootconfig tools/bootconfig: fix fd leak in load_xbc_file() on fstat failure 2026-03-19 08:43:06 +09:00
bpf bpftool: Enable aarch64 ISA extensions for JIT disassembly 2026-03-24 08:44:29 -07:00
build tools build: Fix rust cross compilation 2026-03-04 11:37:30 -03:00
certs
cgroup
counter
crypto
debugging
dma
docs
firewire
firmware
gpio
hv
iio
include perf tools fixes for v7.0: 2026-03-13 14:24:15 -07:00
kvm/kvm_stat
laptop
leds
lib libbpf: Introduce bpf_program__clone() 2026-03-21 13:17:13 -07:00
memory-model
mm
net
objtool objtool: Fix Clang jump table detection 2026-03-16 15:31:25 -07:00
pcmcia
perf perf synthetic-events: Fix stale build ID in module MMAP2 records 2026-03-11 17:47:42 -03:00
power cpupower: Add intel_pstate turbo boost support for Intel platforms 2026-03-03 11:18:53 -07:00
rcu
sched
sched_ext tools/sched_ext: Add -fms-extensions to bpf build flags 2026-03-02 22:00:23 -10:00
scripts tools headers: Update the syscall tables and unistd.h, to support the new 'rseq_slice_yield' syscall 2026-03-05 17:20:23 -03:00
sound
spi
testing selftests/bpf: move trampoline_count to dedicated bpf_testmod target 2026-03-24 13:39:32 -07:00
thermal
time
tracing
usb
verification
virtio
wmi
workqueue
writeback
Makefile