lkml.org 
[lkml]   [2019]   [Jul]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 2/2] ftrace/selftest: Test if set_event/ftrace_pid exists before writing
On Wed, 3 Jul 2019 16:00:09 -0400
Steven Rostedt <rostedt@goodmis.org> wrote:

> On Wed, 03 Jul 2019 15:50:01 -0400
> Steven Rostedt <rostedt@goodmis.org> wrote:
>
> > From: "Steven Rostedt (VMware)" <rostedt@goodmis.org>
> >
> > While testing on a very old kernel (3.5), the tests failed because the write
> > to set_event_pid in the setup code, did not exist. The tests themselves
> > could pass, but the setup failed causing an error.
> >
> > Other files test for existance before writing to them. Do the same for
> > set_event_pid and set_ftrace_pid.
> >
> > Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
> > ---
> > tools/testing/selftests/ftrace/test.d/functions | 4 ++--
> > 1 file changed, 2 insertions(+), 2 deletions(-)
> >
> > diff --git a/tools/testing/selftests/ftrace/test.d/functions b/tools/testing/selftests/ftrace/test.d/functions
> > index 779ec11f61bd..a7b06291e32c 100644
> > --- a/tools/testing/selftests/ftrace/test.d/functions
> > +++ b/tools/testing/selftests/ftrace/test.d/functions
> > @@ -91,8 +91,8 @@ initialize_ftrace() { # Reset ftrace to initial-state
> > reset_events_filter
> > reset_ftrace_filter
> > disable_events
> > - echo > set_event_pid # event tracer is always on
> > - echo > set_ftrace_pid
> > + [ -f set_event_pid ] && echo > set_event_pid # event tracer is always on
>
> I probably should remove that comment, because I believe that was why
> it wasn't tested :-/

Hmm, OK. I think this comment means "the event tracer is always on if clearing
set_event_pid filter". Would this need to be removed?

Thank you,

>
> -- Steve
>
>
> > + [ -f set_ftrace_pid ] && echo > set_ftrace_pid
> > [ -f set_ftrace_filter ] && echo | tee set_ftrace_*
> > [ -f set_graph_function ] && echo | tee set_graph_*
> > [ -f stack_trace_filter ] && echo > stack_trace_filter
>


--
Masami Hiramatsu <mhiramat@kernel.org>

\
 
 \ /
  Last update: 2019-07-04 03:52    [W:0.046 / U:9.980 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site