From: Steven Rostedt <rostedt@goodmis.org>
To: Linux Trace Devel <linux-trace-devel@vger.kernel.org>
Subject: [PATCH] libtracefs utest: Do not test kprobe interface if there's no kprobes
Date: Tue, 20 Aug 2024 17:45:17 -0400 [thread overview]
Message-ID: <20240820174517.152e4404@gandalf.local.home> (raw)
From: "Steven Rostedt (Google)" <rostedt@goodmis.org>
If the kernel does not support kprobes, do not bother testing the kprobe
interface.
Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>
---
utest/tracefs-utest.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/utest/tracefs-utest.c b/utest/tracefs-utest.c
index b295253..5bfd665 100644
--- a/utest/tracefs-utest.c
+++ b/utest/tracefs-utest.c
@@ -2280,6 +2280,11 @@ static void test_kprobes_instance(struct tracefs_instance *instance)
int ret;
int i;
+ if (!tracefs_file_exists(NULL, "kprobe_events")) {
+ printf("[KERNEL DOES NOT HAVE KPROBE EVENTS] ...");
+ return;
+ }
+
tep = tep_alloc();
CU_TEST(tep != NULL);
--
2.43.0
reply other threads:[~2024-08-20 21:44 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20240820174517.152e4404@gandalf.local.home \
--to=rostedt@goodmis.org \
--cc=linux-trace-devel@vger.kernel.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).