]> git.baikalelectronics.ru Git - kernel.git/commit
selftests/bpf: Add tests for u[ret]probe attach by name
authorAlan Maguire <alan.maguire@oracle.com>
Wed, 30 Mar 2022 15:26:39 +0000 (16:26 +0100)
committerAndrii Nakryiko <andrii@kernel.org>
Mon, 4 Apr 2022 02:56:00 +0000 (19:56 -0700)
commit950db7707b2c3d5c8874ae2369baf3e2c0cc2792
tree4dc538d047e46b7e79ca6e050db6fd0b90d3be3f
parenta9bb3d9dd8288c54abbfdc1b51274ec510183df9
selftests/bpf: Add tests for u[ret]probe attach by name

add tests that verify attaching by name for

1. local functions in a program
2. library functions in a shared object

...succeed for uprobe and uretprobes using new "func_name"
option for bpf_program__attach_uprobe_opts().  Also verify
auto-attach works where uprobe, path to binary and function
name are specified, but fails with -EOPNOTSUPP with a SEC
name that does not specify binary path/function.

Signed-off-by: Alan Maguire <alan.maguire@oracle.com>
Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Link: https://lore.kernel.org/bpf/1648654000-21758-5-git-send-email-alan.maguire@oracle.com
tools/testing/selftests/bpf/prog_tests/attach_probe.c
tools/testing/selftests/bpf/progs/test_attach_probe.c