]> git.baikalelectronics.ru Git - kernel.git/commit
selftests/bpf: Add selftest for calling global functions from freplace
authorToke Høiland-Jørgensen <toke@redhat.com>
Mon, 6 Jun 2022 07:52:52 +0000 (09:52 +0200)
committerAlexei Starovoitov <ast@kernel.org>
Tue, 7 Jun 2022 17:41:20 +0000 (10:41 -0700)
commit1390388c379d9a5b0717e073126a5ab4483244a2
treed1a8f9aa36309f7678a94e58b53bf9987e457091
parent0f4d2443a69a06a03a02ab97cf9dab16b05da49d
selftests/bpf: Add selftest for calling global functions from freplace

Add a selftest that calls a global function with a context object parameter
from an freplace function to check that the program context type is
correctly converted to the freplace target when fetching the context type
from the kernel BTF.

v2:
- Trim includes
- Get rid of global function
- Use __noinline

Signed-off-by: Toke Høiland-Jørgensen <toke@redhat.com>
Link: https://lore.kernel.org/r/20220606075253.28422-2-toke@redhat.com
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
tools/testing/selftests/bpf/prog_tests/fexit_bpf2bpf.c
tools/testing/selftests/bpf/progs/freplace_global_func.c [new file with mode: 0644]