selftests/bpf: Add load_kallsyms_refresh function
authorJiri Olsa <jolsa@kernel.org>
Tue, 25 Oct 2022 13:41:45 +0000 (15:41 +0200)
committerAlexei Starovoitov <ast@kernel.org>
Tue, 25 Oct 2022 17:14:51 +0000 (10:14 -0700)
commit10705b2b7a8e4eb46ab5bf1b9ee354cb9a929428
tree28ea808e4c2038d55d61ab9b0df5b4e3a3e33c08
parente22061b2d3095c12f90336479f24bf5eeb70e1bd
selftests/bpf: Add load_kallsyms_refresh function

Adding load_kallsyms_refresh function to re-read symbols from
/proc/kallsyms file.

This will be needed to get proper functions addresses from
bpf_testmod.ko module, which is loaded/unloaded several times
during the tests run, so symbols might be already old when
we need to use them.

Acked-by: Song Liu <song@kernel.org>
Signed-off-by: Jiri Olsa <jolsa@kernel.org>
Link: https://lore.kernel.org/r/20221025134148.3300700-6-jolsa@kernel.org
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
tools/testing/selftests/bpf/trace_helpers.c
tools/testing/selftests/bpf/trace_helpers.h