aboutsummaryrefslogtreecommitdiffstats
path: root/tools/testing/selftests/bpf/prog_tests/timer_mim.c
diff options
context:
space:
mode:
authorAndrii Nakryiko <[email protected]>2022-05-12 22:07:13 +0000
committerDaniel Borkmann <[email protected]>2022-05-13 13:15:21 +0000
commitb2531d4bdce19f28364b45aac9132e153b1f23a4 (patch)
tree27503123979708af060a30162c296b4917c5ca89 /tools/testing/selftests/bpf/prog_tests/timer_mim.c
parentlibbpf: Add safer high-level wrappers for map operations (diff)
downloadkernel-b2531d4bdce19f28364b45aac9132e153b1f23a4.tar.gz
kernel-b2531d4bdce19f28364b45aac9132e153b1f23a4.zip
selftests/bpf: Convert some selftests to high-level BPF map APIs
Convert a bunch of selftests to using newly added high-level BPF map APIs. This change exposed that map_kptr selftests allocated too big buffer, which is fixed in this patch as well. Signed-off-by: Andrii Nakryiko <[email protected]> Signed-off-by: Daniel Borkmann <[email protected]> Link: https://lore.kernel.org/bpf/[email protected]
Diffstat (limited to 'tools/testing/selftests/bpf/prog_tests/timer_mim.c')
-rw-r--r--tools/testing/selftests/bpf/prog_tests/timer_mim.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/testing/selftests/bpf/prog_tests/timer_mim.c b/tools/testing/selftests/bpf/prog_tests/timer_mim.c
index 2ee5f5ae11d4..9ff7843909e7 100644
--- a/tools/testing/selftests/bpf/prog_tests/timer_mim.c
+++ b/tools/testing/selftests/bpf/prog_tests/timer_mim.c
@@ -35,7 +35,7 @@ static int timer_mim(struct timer_mim *timer_skel)
ASSERT_EQ(timer_skel->bss->ok, 1 | 2, "ok");
close(bpf_map__fd(timer_skel->maps.inner_htab));
- err = bpf_map_delete_elem(bpf_map__fd(timer_skel->maps.outer_arr), &key1);
+ err = bpf_map__delete_elem(timer_skel->maps.outer_arr, &key1, sizeof(key1), 0);
ASSERT_EQ(err, 0, "delete inner map");
/* check that timer_cb[12] are no longer running */