Commit 4192bb29 authored by Simon Sundberg's avatar Simon Sundberg Committed by Alexei Starovoitov
Browse files

selftests/bpf: Provide a generic [un]load_module helper



Generalize the previous [un]load_bpf_testmod() helpers (in
testing_helpers.c) to the more generic [un]load_module(), which can
load an arbitrary kernel module by name. This allows future selftests
to more easily load custom kernel modules other than bpf_testmod.ko.
Refactor [un]load_bpf_testmod() to wrap this new helper.

Signed-off-by: default avatarSimon Sundberg <simon.sundberg@kau.se>
Acked-by: default avatarJiri Olsa <jolsa@kernel.org>
Acked-by: default avatarKumar Kartikeya Dwivedi <memxor@gmail.com>
Signed-off-by: default avatarToke Høiland-Jørgensen <toke@redhat.com>
Link: https://lore.kernel.org/r/20241010-fix-kfunc-btf-caching-for-modules-v2-2-745af6c1af98@redhat.com


Signed-off-by: default avatarAlexei Starovoitov <ast@kernel.org>
parent 6cb86a0f
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment