From: Leon Hwang <leon.hwang@linux.dev>
To: bpf@vger.kernel.org
Cc: ast@kernel.org, andrii@kernel.org, daniel@iogearbox.net,
martin.lau@linux.dev, eddyz87@gmail.com, song@kernel.org,
yonghong.song@linux.dev, leon.hwang@linux.dev,
kernel-patches-bot@fb.com
Subject: [PATCH bpf-next 2/2] selftests/bpf: Add case to test bpf_in_interrupt kfunc
Date: Fri, 22 Aug 2025 22:17:21 +0800 [thread overview]
Message-ID: <20250822141722.25318-3-leon.hwang@linux.dev> (raw)
In-Reply-To: <20250822141722.25318-1-leon.hwang@linux.dev>
cd tools/testing/selftests/bpf
./test_progs -t irq
#143/29 irq/in_interrupt:OK
#143 irq:OK
Summary: 1/34 PASSED, 0 SKIPPED, 0 FAILED
Signed-off-by: Leon Hwang <leon.hwang@linux.dev>
---
tools/testing/selftests/bpf/progs/irq.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/tools/testing/selftests/bpf/progs/irq.c b/tools/testing/selftests/bpf/progs/irq.c
index 74d912b22de90..65a796fd1d615 100644
--- a/tools/testing/selftests/bpf/progs/irq.c
+++ b/tools/testing/selftests/bpf/progs/irq.c
@@ -563,4 +563,11 @@ int irq_wrong_kfunc_class_2(struct __sk_buff *ctx)
return 0;
}
+SEC("?tc")
+__success
+int in_interrupt(struct __sk_buff *ctx)
+{
+ return bpf_in_interrupt();
+}
+
char _license[] SEC("license") = "GPL";
--
2.50.1
prev parent reply other threads:[~2025-08-22 14:18 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-08-22 14:17 [PATCH bpf-next 0/2] bpf: Introduce bpf_in_interrupt kfunc Leon Hwang
2025-08-22 14:17 ` [PATCH bpf-next 1/2] " Leon Hwang
2025-08-23 8:24 ` kernel test robot
2025-08-22 14:17 ` Leon Hwang [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20250822141722.25318-3-leon.hwang@linux.dev \
--to=leon.hwang@linux.dev \
--cc=andrii@kernel.org \
--cc=ast@kernel.org \
--cc=bpf@vger.kernel.org \
--cc=daniel@iogearbox.net \
--cc=eddyz87@gmail.com \
--cc=kernel-patches-bot@fb.com \
--cc=martin.lau@linux.dev \
--cc=song@kernel.org \
--cc=yonghong.song@linux.dev \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.