All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH bpf-next] selftests/bpf: Skip timer_interrupt case when bpf_timer is not supported
@ 2025-09-15 12:16 Leon Hwang
  2025-09-15 17:30 ` patchwork-bot+netdevbpf
  0 siblings, 1 reply; 2+ messages in thread
From: Leon Hwang @ 2025-09-15 12:16 UTC (permalink / raw)
  To: bpf
  Cc: ast, andrii, daniel, martin.lau, eddyz87, song, yonghong.song,
	memxor, yepeilin, joshdon, brho, leon.hwang, kernel-patches-bot

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>
---
 tools/testing/selftests/bpf/prog_tests/timer.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/tools/testing/selftests/bpf/prog_tests/timer.c b/tools/testing/selftests/bpf/prog_tests/timer.c
index 86425939527c8..34f9ccce26029 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;
 
-- 
2.50.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH bpf-next] selftests/bpf: Skip timer_interrupt case when bpf_timer is not supported
  2025-09-15 12:16 [PATCH bpf-next] selftests/bpf: Skip timer_interrupt case when bpf_timer is not supported Leon Hwang
@ 2025-09-15 17:30 ` patchwork-bot+netdevbpf
  0 siblings, 0 replies; 2+ messages in thread
From: patchwork-bot+netdevbpf @ 2025-09-15 17:30 UTC (permalink / raw)
  To: Leon Hwang
  Cc: bpf, ast, andrii, daniel, martin.lau, eddyz87, song,
	yonghong.song, memxor, yepeilin, joshdon, brho,
	kernel-patches-bot

Hello:

This patch was applied to bpf/bpf-next.git (master)
by Martin KaFai Lau <martin.lau@kernel.org>:

On Mon, 15 Sep 2025 20:16:57 +0800 you wrote:
> 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
> 
> [...]

Here is the summary with links:
  - [bpf-next] selftests/bpf: Skip timer_interrupt case when bpf_timer is not supported
    https://git.kernel.org/bpf/bpf-next/c/f7528e441213

You are awesome, thank you!
-- 
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2025-09-15 17:30 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-09-15 12:16 [PATCH bpf-next] selftests/bpf: Skip timer_interrupt case when bpf_timer is not supported Leon Hwang
2025-09-15 17:30 ` patchwork-bot+netdevbpf

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.