* [PATCH] selftests/ftrace: avoid failure when trying to probe a notrace function
@ 2019-07-08 18:19 Thadeu Lima de Souza Cascardo
2019-07-08 18:56 ` Steven Rostedt
0 siblings, 1 reply; 3+ messages in thread
From: Thadeu Lima de Souza Cascardo @ 2019-07-08 18:19 UTC (permalink / raw)
To: linux-kselftest
Cc: linux-kernel, Steven Rostedt, Ingo Molnar,
Thadeu Lima de Souza Cascardo
Check that the function is on available_filter_functions. If it's not,
mark the test as unresolved, instead of failing it.
Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo@canonical.com>
---
tools/testing/selftests/ftrace/test.d/kprobe/kprobe_eventname.tc | 1 +
1 file changed, 1 insertion(+)
diff --git a/tools/testing/selftests/ftrace/test.d/kprobe/kprobe_eventname.tc b/tools/testing/selftests/ftrace/test.d/kprobe/kprobe_eventname.tc
index 3fb70e01b1fe..e4dff034da12 100644
--- a/tools/testing/selftests/ftrace/test.d/kprobe/kprobe_eventname.tc
+++ b/tools/testing/selftests/ftrace/test.d/kprobe/kprobe_eventname.tc
@@ -26,6 +26,7 @@ test -d events/kprobes2/event2 || exit_failure
FUNC=`grep -m 10 " [tT] .*\.isra\..*$" /proc/kallsyms | tail -n 1 | cut -f 3 -d " "`
[ "x" != "x$FUNC" ] || exit_unresolved
+grep -n "$FUNC" available_filter_functions || exit_unresolved
echo "p $FUNC" > kprobe_events
EVENT=`grep $FUNC kprobe_events | cut -f 1 -d " " | cut -f 2 -d:`
[ "x" != "x$EVENT" ] || exit_failure
--
2.20.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] selftests/ftrace: avoid failure when trying to probe a notrace function
2019-07-08 18:19 [PATCH] selftests/ftrace: avoid failure when trying to probe a notrace function Thadeu Lima de Souza Cascardo
@ 2019-07-08 18:56 ` Steven Rostedt
2019-07-08 19:06 ` Thadeu Lima de Souza Cascardo
0 siblings, 1 reply; 3+ messages in thread
From: Steven Rostedt @ 2019-07-08 18:56 UTC (permalink / raw)
To: Thadeu Lima de Souza Cascardo
Cc: linux-kselftest, linux-kernel, Ingo Molnar, Masami Hiramatsu,
Shuah Khan
On Mon, 8 Jul 2019 15:19:33 -0300
Thadeu Lima de Souza Cascardo <cascardo@canonical.com> wrote:
> Check that the function is on available_filter_functions. If it's not,
> mark the test as unresolved, instead of failing it.
>
Actually, I sent this out a while ago:
http://lkml.kernel.org/r/20190322150923.1b58eca5@gandalf.local.home
Does that fix it for you?
-- Steve
> Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo@canonical.com>
> ---
> tools/testing/selftests/ftrace/test.d/kprobe/kprobe_eventname.tc | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/tools/testing/selftests/ftrace/test.d/kprobe/kprobe_eventname.tc b/tools/testing/selftests/ftrace/test.d/kprobe/kprobe_eventname.tc
> index 3fb70e01b1fe..e4dff034da12 100644
> --- a/tools/testing/selftests/ftrace/test.d/kprobe/kprobe_eventname.tc
> +++ b/tools/testing/selftests/ftrace/test.d/kprobe/kprobe_eventname.tc
> @@ -26,6 +26,7 @@ test -d events/kprobes2/event2 || exit_failure
>
> FUNC=`grep -m 10 " [tT] .*\.isra\..*$" /proc/kallsyms | tail -n 1 | cut -f 3 -d " "`
> [ "x" != "x$FUNC" ] || exit_unresolved
> +grep -n "$FUNC" available_filter_functions || exit_unresolved
> echo "p $FUNC" > kprobe_events
> EVENT=`grep $FUNC kprobe_events | cut -f 1 -d " " | cut -f 2 -d:`
> [ "x" != "x$EVENT" ] || exit_failure
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] selftests/ftrace: avoid failure when trying to probe a notrace function
2019-07-08 18:56 ` Steven Rostedt
@ 2019-07-08 19:06 ` Thadeu Lima de Souza Cascardo
0 siblings, 0 replies; 3+ messages in thread
From: Thadeu Lima de Souza Cascardo @ 2019-07-08 19:06 UTC (permalink / raw)
To: Steven Rostedt
Cc: linux-kselftest, linux-kernel, Ingo Molnar, Masami Hiramatsu,
Shuah Khan
On Mon, Jul 08, 2019 at 02:56:18PM -0400, Steven Rostedt wrote:
> On Mon, 8 Jul 2019 15:19:33 -0300
> Thadeu Lima de Souza Cascardo <cascardo@canonical.com> wrote:
>
> > Check that the function is on available_filter_functions. If it's not,
> > mark the test as unresolved, instead of failing it.
> >
>
> Actually, I sent this out a while ago:
>
> http://lkml.kernel.org/r/20190322150923.1b58eca5@gandalf.local.home
>
> Does that fix it for you?
>
> -- Steve
Yes, that fix it for me, let me reply to the original message.
Thanks!
Cascardo.
>
>
> > Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo@canonical.com>
> > ---
> > tools/testing/selftests/ftrace/test.d/kprobe/kprobe_eventname.tc | 1 +
> > 1 file changed, 1 insertion(+)
> >
> > diff --git a/tools/testing/selftests/ftrace/test.d/kprobe/kprobe_eventname.tc b/tools/testing/selftests/ftrace/test.d/kprobe/kprobe_eventname.tc
> > index 3fb70e01b1fe..e4dff034da12 100644
> > --- a/tools/testing/selftests/ftrace/test.d/kprobe/kprobe_eventname.tc
> > +++ b/tools/testing/selftests/ftrace/test.d/kprobe/kprobe_eventname.tc
> > @@ -26,6 +26,7 @@ test -d events/kprobes2/event2 || exit_failure
> >
> > FUNC=`grep -m 10 " [tT] .*\.isra\..*$" /proc/kallsyms | tail -n 1 | cut -f 3 -d " "`
> > [ "x" != "x$FUNC" ] || exit_unresolved
> > +grep -n "$FUNC" available_filter_functions || exit_unresolved
> > echo "p $FUNC" > kprobe_events
> > EVENT=`grep $FUNC kprobe_events | cut -f 1 -d " " | cut -f 2 -d:`
> > [ "x" != "x$EVENT" ] || exit_failure
>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2019-07-08 19:07 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-07-08 18:19 [PATCH] selftests/ftrace: avoid failure when trying to probe a notrace function Thadeu Lima de Souza Cascardo
2019-07-08 18:56 ` Steven Rostedt
2019-07-08 19:06 ` Thadeu Lima de Souza Cascardo
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox