]> git.ipfire.org Git - thirdparty/linux.git/commit
selftests/bpf: Add tracing multi attach rollback tests
authorJiri Olsa <jolsa@kernel.org>
Sat, 6 Jun 2026 12:39:54 +0000 (14:39 +0200)
committerAlexei Starovoitov <ast@kernel.org>
Sun, 7 Jun 2026 18:03:05 +0000 (11:03 -0700)
commitb349efe49a123f032e54d7e894d708ea5daa10d2
tree32c71ce153aaeecfe26cadafdf9592a396af93d4
parent4db8f60b6baf64f4f405bc8eb92a36315b353481
selftests/bpf: Add tracing multi attach rollback tests

Adding tests for the rollback code when the tracing_multi
link won't get attached, covering 2 reasons:

  - wrong btf id passed by user, where all previously allocated
    trampolines will be released
  - trampoline for requested function is fully attached (has already
    maximum programs attached) and the link fails, the rollback code
    needs to release all previously link-ed trampolines and release
    them

We need the bpf_fentry_test* unattached for the tests to pass,
so the rollback tests are serial.

Signed-off-by: Jiri Olsa <jolsa@kernel.org>
Link: https://lore.kernel.org/r/20260606123955.345967-30-jolsa@kernel.org
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
tools/testing/selftests/bpf/prog_tests/tracing_multi.c
tools/testing/selftests/bpf/progs/tracing_multi_rollback.c [new file with mode: 0644]