* [PATCH] libtracefs utest: Do not test kprobe interface if there's no kprobes
@ 2024-08-20 21:45 Steven Rostedt
0 siblings, 0 replies; only message in thread
From: Steven Rostedt @ 2024-08-20 21:45 UTC (permalink / raw)
To: Linux Trace Devel
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
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2024-08-20 21:44 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-08-20 21:45 [PATCH] libtracefs utest: Do not test kprobe interface if there's no kprobes Steven Rostedt
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).