aboutsummaryrefslogtreecommitdiffstats
path: root/tools/testing/selftests/bpf/prog_tests/timer.c
diff options
context:
space:
mode:
authorLeon Hwang <leon.hwang@linux.dev>2025-09-15 20:16:57 +0800
committerMartin KaFai Lau <martin.lau@kernel.org>2025-09-15 10:22:58 -0700
commitf7528e4412138699d69946d2a811feb319268f6b (patch)
tree5c01e57867f4efcf7480c370da83e6d0dfa40e47 /tools/testing/selftests/bpf/prog_tests/timer.c
parentbpftool: Search for tracefs at /sys/kernel/tracing first (diff)
downloadlinux-f7528e4412138699d69946d2a811feb319268f6b.tar.gz
linux-f7528e4412138699d69946d2a811feb319268f6b.zip
selftests/bpf: Skip timer_interrupt case when bpf_timer is not supported
Like commit fbdd61c94bcb ("selftests/bpf: Skip timer cases when bpf_timer is not supported"), 'timer_interrupt' test case should be skipped if verifier rejects bpf_timer with returning -EOPNOTSUPP. cd tools/testing/selftests/bpf ./test_progs -t timer 461 timer_interrupt:SKIP Summary: 6/0 PASSED, 7 SKIPPED, 0 FAILED Signed-off-by: Leon Hwang <leon.hwang@linux.dev> Signed-off-by: Martin KaFai Lau <martin.lau@kernel.org> Link: https://patch.msgid.link/20250915121657.28084-1-leon.hwang@linux.dev
Diffstat (limited to 'tools/testing/selftests/bpf/prog_tests/timer.c')
-rw-r--r--tools/testing/selftests/bpf/prog_tests/timer.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/tools/testing/selftests/bpf/prog_tests/timer.c b/tools/testing/selftests/bpf/prog_tests/timer.c
index 86425939527c..34f9ccce2602 100644
--- a/tools/testing/selftests/bpf/prog_tests/timer.c
+++ b/tools/testing/selftests/bpf/prog_tests/timer.c
@@ -108,6 +108,10 @@ void test_timer_interrupt(void)
LIBBPF_OPTS(bpf_test_run_opts, opts);
skel = timer_interrupt__open_and_load();
+ if (!skel && errno == EOPNOTSUPP) {
+ test__skip();
+ return;
+ }
if (!ASSERT_OK_PTR(skel, "timer_interrupt__open_and_load"))
return;