aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/tools/testing/selftests/bpf/prog_tests/kfree_skb.c
diff options
context:
space:
mode:
authorAndrii Nakryiko <andrii@kernel.org>2021-10-20 18:44:04 -0700
committerAlexei Starovoitov <ast@kernel.org>2021-10-21 17:10:11 -0700
commit4f2511e1990985103929ab799fb3ebca81969b77 (patch)
tree788f588b995b81fe8bcc9c639fefc8b6f866a379 /tools/testing/selftests/bpf/prog_tests/kfree_skb.c
parentlibbpf: Simplify look up by name of internal maps (diff)
downloadwireguard-linux-4f2511e1990985103929ab799fb3ebca81969b77.tar.xz
wireguard-linux-4f2511e1990985103929ab799fb3ebca81969b77.zip
selftests/bpf: Switch to ".bss"/".rodata"/".data" lookups for internal maps
Utilize libbpf's feature of allowing to lookup internal maps by their ELF section names. No need to guess or calculate the exact truncated prefix taken from the object name. Signed-off-by: Andrii Nakryiko <andrii@kernel.org> Signed-off-by: Alexei Starovoitov <ast@kernel.org> Acked-by: Song Liu <songliubraving@fb.com> Link: https://lore.kernel.org/bpf/20211021014404.2635234-11-andrii@kernel.org
Diffstat (limited to 'tools/testing/selftests/bpf/prog_tests/kfree_skb.c')
-rw-r--r--tools/testing/selftests/bpf/prog_tests/kfree_skb.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/testing/selftests/bpf/prog_tests/kfree_skb.c b/tools/testing/selftests/bpf/prog_tests/kfree_skb.c
index 032a322d51f2..01e51d16c8b8 100644
--- a/tools/testing/selftests/bpf/prog_tests/kfree_skb.c
+++ b/tools/testing/selftests/bpf/prog_tests/kfree_skb.c
@@ -93,7 +93,7 @@ void serial_test_kfree_skb(void)
if (CHECK(!fexit, "find_prog", "prog eth_type_trans not found\n"))
goto close_prog;
- global_data = bpf_object__find_map_by_name(obj2, "kfree_sk.bss");
+ global_data = bpf_object__find_map_by_name(obj2, ".bss");
if (CHECK(!global_data, "find global data", "not found\n"))
goto close_prog;