selftests/bpf: Refactor trace helper func load_kallsyms_local()

Refactor trace helper function load_kallsyms_local() such that
it invokes a common function with a compare function as input.
The common function will be used later for other local functions.

Signed-off-by: Yonghong Song <yonghong.song@linux.dev>
Link: https://lore.kernel.org/r/20240326041508.1199239-1-yonghong.song@linux.dev
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
This commit is contained in:
Yonghong Song 2024-03-25 21:15:08 -07:00 • committed by Alexei Starovoitov
commit 9475dacb75
2 changed files with 14 additions and 7 deletions