* [PATCH] selftests/ftrace: Add test case for a symbol in a module without module name
@ 2023-10-28 3:34 Masami Hiramatsu (Google)
2026-07-14 14:42 ` Steven Rostedt
0 siblings, 1 reply; 4+ messages in thread
From: Masami Hiramatsu (Google) @ 2023-10-28 3:34 UTC (permalink / raw)
To: Steven Rostedt, Shuah Khan
Cc: Andrii Nakryiko, linux-trace-kernel, bpf, Francis Laniel,
linux-kselftest, Masami Hiramatsu
From: Masami Hiramatsu (Google) <mhiramat@kernel.org>
Add a test case for probing on a symbol in a module without module name.
When probing on a symbol in a module, ftrace accepts both the syntax that
<MODNAME>:<SYMBOL> and <SYMBOL>. Current test case only checks the former
syntax. This adds a test for the latter one.
Signed-off-by: Masami Hiramatsu (Google) <mhiramat@kernel.org>
---
.../ftrace/test.d/kprobe/kprobe_module.tc | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/tools/testing/selftests/ftrace/test.d/kprobe/kprobe_module.tc b/tools/testing/selftests/ftrace/test.d/kprobe/kprobe_module.tc
index 7e74ee11edf9..4b32e1b9a8d3 100644
--- a/tools/testing/selftests/ftrace/test.d/kprobe/kprobe_module.tc
+++ b/tools/testing/selftests/ftrace/test.d/kprobe/kprobe_module.tc
@@ -13,6 +13,12 @@ fi
MOD=trace_printk
FUNC=trace_printk_irq_work
+:;: "Add an event on a module function without module name" ;:
+
+echo "p:event0 $FUNC" > kprobe_events
+test -d events/kprobes/event0 || exit_failure
+echo "-:kprobes/event0" >> kprobe_events
+
:;: "Add an event on a module function without specifying event name" ;:
echo "p $MOD:$FUNC" > kprobe_events
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] selftests/ftrace: Add test case for a symbol in a module without module name
2023-10-28 3:34 [PATCH] selftests/ftrace: Add test case for a symbol in a module without module name Masami Hiramatsu (Google)
@ 2026-07-14 14:42 ` Steven Rostedt
2026-07-15 1:55 ` Masami Hiramatsu
2026-07-15 1:58 ` Masami Hiramatsu
0 siblings, 2 replies; 4+ messages in thread
From: Steven Rostedt @ 2026-07-14 14:42 UTC (permalink / raw)
To: Masami Hiramatsu (Google)
Cc: Shuah Khan, Andrii Nakryiko, linux-trace-kernel, bpf,
Francis Laniel, linux-kselftest
Is this still a think, or can we remove it from patchwork?
https://patchwork.kernel.org/project/linux-trace-kernel/patch/169846405196.88147.17766692778800222203.stgit@devnote2/
-- Steve
On Sat, 28 Oct 2023 12:34:12 +0900
"Masami Hiramatsu (Google)" <mhiramat@kernel.org> wrote:
> From: Masami Hiramatsu (Google) <mhiramat@kernel.org>
>
> Add a test case for probing on a symbol in a module without module name.
> When probing on a symbol in a module, ftrace accepts both the syntax that
> <MODNAME>:<SYMBOL> and <SYMBOL>. Current test case only checks the former
> syntax. This adds a test for the latter one.
>
> Signed-off-by: Masami Hiramatsu (Google) <mhiramat@kernel.org>
> ---
> .../ftrace/test.d/kprobe/kprobe_module.tc | 6 ++++++
> 1 file changed, 6 insertions(+)
>
> diff --git a/tools/testing/selftests/ftrace/test.d/kprobe/kprobe_module.tc b/tools/testing/selftests/ftrace/test.d/kprobe/kprobe_module.tc
> index 7e74ee11edf9..4b32e1b9a8d3 100644
> --- a/tools/testing/selftests/ftrace/test.d/kprobe/kprobe_module.tc
> +++ b/tools/testing/selftests/ftrace/test.d/kprobe/kprobe_module.tc
> @@ -13,6 +13,12 @@ fi
> MOD=trace_printk
> FUNC=trace_printk_irq_work
>
> +:;: "Add an event on a module function without module name" ;:
> +
> +echo "p:event0 $FUNC" > kprobe_events
> +test -d events/kprobes/event0 || exit_failure
> +echo "-:kprobes/event0" >> kprobe_events
> +
> :;: "Add an event on a module function without specifying event name" ;:
>
> echo "p $MOD:$FUNC" > kprobe_events
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] selftests/ftrace: Add test case for a symbol in a module without module name
2026-07-14 14:42 ` Steven Rostedt
@ 2026-07-15 1:55 ` Masami Hiramatsu
2026-07-15 1:58 ` Masami Hiramatsu
1 sibling, 0 replies; 4+ messages in thread
From: Masami Hiramatsu @ 2026-07-15 1:55 UTC (permalink / raw)
To: Steven Rostedt
Cc: Shuah Khan, Andrii Nakryiko, linux-trace-kernel, bpf,
Francis Laniel, linux-kselftest
On Tue, 14 Jul 2026 10:42:10 -0400
Steven Rostedt <rostedt@goodmis.org> wrote:
>
> Is this still a think, or can we remove it from patchwork?
>
> https://patchwork.kernel.org/project/linux-trace-kernel/patch/169846405196.88147.17766692778800222203.stgit@devnote2/
Oops, thanks for reminding. Let me check.
>
> -- Steve
>
>
> On Sat, 28 Oct 2023 12:34:12 +0900
> "Masami Hiramatsu (Google)" <mhiramat@kernel.org> wrote:
>
> > From: Masami Hiramatsu (Google) <mhiramat@kernel.org>
> >
> > Add a test case for probing on a symbol in a module without module name.
> > When probing on a symbol in a module, ftrace accepts both the syntax that
> > <MODNAME>:<SYMBOL> and <SYMBOL>. Current test case only checks the former
> > syntax. This adds a test for the latter one.
> >
> > Signed-off-by: Masami Hiramatsu (Google) <mhiramat@kernel.org>
> > ---
> > .../ftrace/test.d/kprobe/kprobe_module.tc | 6 ++++++
> > 1 file changed, 6 insertions(+)
> >
> > diff --git a/tools/testing/selftests/ftrace/test.d/kprobe/kprobe_module.tc b/tools/testing/selftests/ftrace/test.d/kprobe/kprobe_module.tc
> > index 7e74ee11edf9..4b32e1b9a8d3 100644
> > --- a/tools/testing/selftests/ftrace/test.d/kprobe/kprobe_module.tc
> > +++ b/tools/testing/selftests/ftrace/test.d/kprobe/kprobe_module.tc
> > @@ -13,6 +13,12 @@ fi
> > MOD=trace_printk
> > FUNC=trace_printk_irq_work
> >
> > +:;: "Add an event on a module function without module name" ;:
> > +
> > +echo "p:event0 $FUNC" > kprobe_events
> > +test -d events/kprobes/event0 || exit_failure
> > +echo "-:kprobes/event0" >> kprobe_events
> > +
> > :;: "Add an event on a module function without specifying event name" ;:
> >
> > echo "p $MOD:$FUNC" > kprobe_events
>
--
Masami Hiramatsu (Google) <mhiramat@kernel.org>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] selftests/ftrace: Add test case for a symbol in a module without module name
2026-07-14 14:42 ` Steven Rostedt
2026-07-15 1:55 ` Masami Hiramatsu
@ 2026-07-15 1:58 ` Masami Hiramatsu
1 sibling, 0 replies; 4+ messages in thread
From: Masami Hiramatsu @ 2026-07-15 1:58 UTC (permalink / raw)
To: Steven Rostedt
Cc: Shuah Khan, Andrii Nakryiko, linux-trace-kernel, bpf,
Francis Laniel, linux-kselftest
OK, this seems good to me, and tested. Let me pick it to probes/for-next.
Thanks!
On Tue, 14 Jul 2026 10:42:10 -0400
Steven Rostedt <rostedt@goodmis.org> wrote:
>
> Is this still a think, or can we remove it from patchwork?
>
> https://patchwork.kernel.org/project/linux-trace-kernel/patch/169846405196.88147.17766692778800222203.stgit@devnote2/
>
> -- Steve
>
>
> On Sat, 28 Oct 2023 12:34:12 +0900
> "Masami Hiramatsu (Google)" <mhiramat@kernel.org> wrote:
>
> > From: Masami Hiramatsu (Google) <mhiramat@kernel.org>
> >
> > Add a test case for probing on a symbol in a module without module name.
> > When probing on a symbol in a module, ftrace accepts both the syntax that
> > <MODNAME>:<SYMBOL> and <SYMBOL>. Current test case only checks the former
> > syntax. This adds a test for the latter one.
> >
> > Signed-off-by: Masami Hiramatsu (Google) <mhiramat@kernel.org>
> > ---
> > .../ftrace/test.d/kprobe/kprobe_module.tc | 6 ++++++
> > 1 file changed, 6 insertions(+)
> >
> > diff --git a/tools/testing/selftests/ftrace/test.d/kprobe/kprobe_module.tc b/tools/testing/selftests/ftrace/test.d/kprobe/kprobe_module.tc
> > index 7e74ee11edf9..4b32e1b9a8d3 100644
> > --- a/tools/testing/selftests/ftrace/test.d/kprobe/kprobe_module.tc
> > +++ b/tools/testing/selftests/ftrace/test.d/kprobe/kprobe_module.tc
> > @@ -13,6 +13,12 @@ fi
> > MOD=trace_printk
> > FUNC=trace_printk_irq_work
> >
> > +:;: "Add an event on a module function without module name" ;:
> > +
> > +echo "p:event0 $FUNC" > kprobe_events
> > +test -d events/kprobes/event0 || exit_failure
> > +echo "-:kprobes/event0" >> kprobe_events
> > +
> > :;: "Add an event on a module function without specifying event name" ;:
> >
> > echo "p $MOD:$FUNC" > kprobe_events
>
--
Masami Hiramatsu (Google) <mhiramat@kernel.org>
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2026-07-15 1:58 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-10-28 3:34 [PATCH] selftests/ftrace: Add test case for a symbol in a module without module name Masami Hiramatsu (Google)
2026-07-14 14:42 ` Steven Rostedt
2026-07-15 1:55 ` Masami Hiramatsu
2026-07-15 1:58 ` Masami Hiramatsu
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox