]> www.infradead.org Git - nvme.git/commit
selftests/bpf: Add test for kfunc module order
authorSimon Sundberg <simon.sundberg@kau.se>
Thu, 10 Oct 2024 13:27:09 +0000 (15:27 +0200)
committerAlexei Starovoitov <ast@kernel.org>
Thu, 10 Oct 2024 17:44:03 +0000 (10:44 -0700)
commitf91b256644ea6f7628580029c5a223573f55d98c
treed4b574daade59bf0cb9fdbd5f76fbb680c34abf6
parent4192bb294f80928bc2257c7a2ff6c86a27de6807
selftests/bpf: Add test for kfunc module order

Add a test case for kfuncs from multiple external modules, checking
that the correct kfuncs are called regardless of which order they're
called in. Specifically, check that calling the kfuncs in an order
different from the one the modules' BTF are loaded in works.

Signed-off-by: Simon Sundberg <simon.sundberg@kau.se>
Acked-by: Kumar Kartikeya Dwivedi <memxor@gmail.com>
Signed-off-by: Toke Høiland-Jørgensen <toke@redhat.com>
Link: https://lore.kernel.org/r/20241010-fix-kfunc-btf-caching-for-modules-v2-3-745af6c1af98@redhat.com
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
tools/testing/selftests/bpf/Makefile
tools/testing/selftests/bpf/bpf_test_modorder_x/Makefile [new file with mode: 0644]
tools/testing/selftests/bpf/bpf_test_modorder_x/bpf_test_modorder_x.c [new file with mode: 0644]
tools/testing/selftests/bpf/bpf_test_modorder_y/Makefile [new file with mode: 0644]
tools/testing/selftests/bpf/bpf_test_modorder_y/bpf_test_modorder_y.c [new file with mode: 0644]
tools/testing/selftests/bpf/prog_tests/kfunc_module_order.c [new file with mode: 0644]
tools/testing/selftests/bpf/progs/kfunc_module_order.c [new file with mode: 0644]