* [PATCH] selftests: tracing: Update fprobe selftest for ftrace based fprobe
@ 2025-11-12 13:13 Masami Hiramatsu (Google)
2025-11-19 22:16 ` Shuah Khan
0 siblings, 1 reply; 4+ messages in thread
From: Masami Hiramatsu (Google) @ 2025-11-12 13:13 UTC (permalink / raw)
To: Steven Rostedt, Masami Hiramatsu, Shuah Khan, Heiko Carstens
Cc: Mathieu Desnoyers, linux-kernel, linux-trace-kernel,
linux-kselftest
From: Masami Hiramatsu (Google) <mhiramat@kernel.org>
Since the ftrace fprobe is both fgraph and ftrace based implemented,
the selftest needs to be updated. This does not count the actual
number of lines, but just check the differences.
Signed-off-by: Masami Hiramatsu (Google) <mhiramat@kernel.org>
---
.../ftrace/test.d/dynevent/add_remove_fprobe.tc | 18 ++++--------------
1 file changed, 4 insertions(+), 14 deletions(-)
diff --git a/tools/testing/selftests/ftrace/test.d/dynevent/add_remove_fprobe.tc b/tools/testing/selftests/ftrace/test.d/dynevent/add_remove_fprobe.tc
index 2506f464811b..47067a5e3cb0 100644
--- a/tools/testing/selftests/ftrace/test.d/dynevent/add_remove_fprobe.tc
+++ b/tools/testing/selftests/ftrace/test.d/dynevent/add_remove_fprobe.tc
@@ -28,25 +28,21 @@ test -d events/fprobes/myevent1
test -d events/fprobes/myevent2
echo 1 > events/fprobes/myevent1/enable
-# Make sure the event is attached and is the only one
+# Make sure the event is attached.
grep -q $PLACE enabled_functions
cnt=`cat enabled_functions | wc -l`
-if [ $cnt -ne $((ocnt + 1)) ]; then
+if [ $cnt -eq $ocnt ]; then
exit_fail
fi
echo 1 > events/fprobes/myevent2/enable
-# It should till be the only attached function
-cnt=`cat enabled_functions | wc -l`
-if [ $cnt -ne $((ocnt + 1)) ]; then
- exit_fail
-fi
+cnt2=`cat enabled_functions | wc -l`
echo 1 > events/fprobes/myevent3/enable
# If the function is different, the attached function should be increased
grep -q $PLACE2 enabled_functions
cnt=`cat enabled_functions | wc -l`
-if [ $cnt -ne $((ocnt + 2)) ]; then
+if [ $cnt -eq $cnt2 ]; then
exit_fail
fi
@@ -56,12 +52,6 @@ echo "-:myevent2" >> dynamic_events
grep -q myevent1 dynamic_events
! grep -q myevent2 dynamic_events
-# should still have 2 left
-cnt=`cat enabled_functions | wc -l`
-if [ $cnt -ne $((ocnt + 2)) ]; then
- exit_fail
-fi
-
echo 0 > events/fprobes/enable
echo > dynamic_events
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] selftests: tracing: Update fprobe selftest for ftrace based fprobe
2025-11-12 13:13 [PATCH] selftests: tracing: Update fprobe selftest for ftrace based fprobe Masami Hiramatsu (Google)
@ 2025-11-19 22:16 ` Shuah Khan
2025-11-19 22:34 ` Steven Rostedt
0 siblings, 1 reply; 4+ messages in thread
From: Shuah Khan @ 2025-11-19 22:16 UTC (permalink / raw)
To: Masami Hiramatsu (Google), Steven Rostedt, Shuah Khan,
Heiko Carstens
Cc: Mathieu Desnoyers, linux-kernel, linux-trace-kernel,
linux-kselftest, Shuah Khan
On 11/12/25 06:13, Masami Hiramatsu (Google) wrote:
> From: Masami Hiramatsu (Google) <mhiramat@kernel.org>
>
> Since the ftrace fprobe is both fgraph and ftrace based implemented,
> the selftest needs to be updated. This does not count the actual
> number of lines, but just check the differences.
>
> Signed-off-by: Masami Hiramatsu (Google) <mhiramat@kernel.org>
> ---
> .../ftrace/test.d/dynevent/add_remove_fprobe.tc | 18 ++++--------------
> 1 file changed, 4 insertions(+), 14 deletions(-)
>
Steve, do you want me to take this through my tree?
thanks,
-- Shuah
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] selftests: tracing: Update fprobe selftest for ftrace based fprobe
2025-11-19 22:16 ` Shuah Khan
@ 2025-11-19 22:34 ` Steven Rostedt
2025-11-19 22:56 ` Shuah Khan
0 siblings, 1 reply; 4+ messages in thread
From: Steven Rostedt @ 2025-11-19 22:34 UTC (permalink / raw)
To: Shuah Khan
Cc: Masami Hiramatsu (Google), Shuah Khan, Heiko Carstens,
Mathieu Desnoyers, linux-kernel, linux-trace-kernel,
linux-kselftest
On Wed, 19 Nov 2025 15:16:04 -0700
Shuah Khan <skhan@linuxfoundation.org> wrote:
> On 11/12/25 06:13, Masami Hiramatsu (Google) wrote:
> > From: Masami Hiramatsu (Google) <mhiramat@kernel.org>
> >
> > Since the ftrace fprobe is both fgraph and ftrace based implemented,
> > the selftest needs to be updated. This does not count the actual
> > number of lines, but just check the differences.
> >
> > Signed-off-by: Masami Hiramatsu (Google) <mhiramat@kernel.org>
> > ---
> > .../ftrace/test.d/dynevent/add_remove_fprobe.tc | 18 ++++--------------
> > 1 file changed, 4 insertions(+), 14 deletions(-)
> >
>
> Steve, do you want me to take this through my tree?
Yes please, unless Masami thinks otherwise.
-- Steve
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] selftests: tracing: Update fprobe selftest for ftrace based fprobe
2025-11-19 22:34 ` Steven Rostedt
@ 2025-11-19 22:56 ` Shuah Khan
0 siblings, 0 replies; 4+ messages in thread
From: Shuah Khan @ 2025-11-19 22:56 UTC (permalink / raw)
To: Steven Rostedt
Cc: Masami Hiramatsu (Google), Shuah Khan, Heiko Carstens,
Mathieu Desnoyers, linux-kernel, linux-trace-kernel,
linux-kselftest, Shuah Khan
On 11/19/25 15:34, Steven Rostedt wrote:
> On Wed, 19 Nov 2025 15:16:04 -0700
> Shuah Khan <skhan@linuxfoundation.org> wrote:
>
>> On 11/12/25 06:13, Masami Hiramatsu (Google) wrote:
>>> From: Masami Hiramatsu (Google) <mhiramat@kernel.org>
>>>
>>> Since the ftrace fprobe is both fgraph and ftrace based implemented,
>>> the selftest needs to be updated. This does not count the actual
>>> number of lines, but just check the differences.
>>>
>>> Signed-off-by: Masami Hiramatsu (Google) <mhiramat@kernel.org>
>>> ---
>>> .../ftrace/test.d/dynevent/add_remove_fprobe.tc | 18 ++++--------------
>>> 1 file changed, 4 insertions(+), 14 deletions(-)
>>>
>>
>> Steve, do you want me to take this through my tree?
>
> Yes please, unless Masami thinks otherwise.
>
Applied to linux-kselftest next for Linux 6.19-rc1.
thanks,
-- Shuah
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2025-11-19 22:56 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-11-12 13:13 [PATCH] selftests: tracing: Update fprobe selftest for ftrace based fprobe Masami Hiramatsu (Google)
2025-11-19 22:16 ` Shuah Khan
2025-11-19 22:34 ` Steven Rostedt
2025-11-19 22:56 ` Shuah Khan
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox