selftests/bpf: Test pinning bpf timer to a core
authorDavid Vernet <void@manifault.com>
Wed, 4 Oct 2023 16:23:39 +0000 (11:23 -0500)
committerDaniel Borkmann <daniel@iogearbox.net>
Mon, 9 Oct 2023 14:29:06 +0000 (16:29 +0200)
commit0d7ae06860753bb30b3731302b994da071120d00
tree8079375f21629e5cb73952c99bea46a4342c0a44
parentd6247ecb6c1e17d7a33317090627f5bfe563cbb2
selftests/bpf: Test pinning bpf timer to a core

Now that we support pinning a BPF timer to the current core, we should
test it with some selftests. This patch adds two new testcases to the
timer suite, which verifies that a BPF timer both with and without
BPF_F_TIMER_ABS, can be pinned to the calling core with BPF_F_TIMER_CPU_PIN.

Signed-off-by: David Vernet <void@manifault.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Acked-by: Song Liu <song@kernel.org>
Acked-by: Hou Tao <houtao1@huawei.com>
Link: https://lore.kernel.org/bpf/20231004162339.200702-3-void@manifault.com
tools/testing/selftests/bpf/prog_tests/timer.c
tools/testing/selftests/bpf/progs/timer.c