[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <20161025185126.c0cf722d1d1d140bfb2f7ee0@kernel.org>
Date: Tue, 25 Oct 2016 18:51:26 +0900
From: Masami Hiramatsu <mhiramat@...nel.org>
To: Steven Rostedt <rostedt@...dmis.org>
Cc: Shuah Khan <shuah@...nel.org>, linux-kernel@...r.kernel.org,
Ingo Molnar <mingo@...hat.com>,
Namhyung Kim <namhyung@...nel.org>,
Tom Zanussi <tom.zanussi@...ux.intel.com>,
linux-kselftest@...r.kernel.org
Subject: Re: [PATCH 2/5] selftests: ftrace: Fix test cases to enable tracing
Hi Steve,
On Mon, 24 Oct 2016 15:50:27 -0400
Steven Rostedt <rostedt@...dmis.org> wrote:
> On Wed, 19 Oct 2016 13:53:46 +0900
> Masami Hiramatsu <mhiramat@...nel.org> wrote:
>
> > Fix some test cases to enable tracing before starting
> > trace test. This can avoid false-positive failure when
> > previous testcase fails while disabling tracing.
>
> I wonder if this would be better to do the enabling from the ftracetest
> script instead. Then the tests would need to worry about it.
Hm, sounds reasonable. Also some other options should be reset for
avoiding unexpected failure. I'll try that.
Thanks!
>
> -- Steve
>
>
> >
> > Signed-off-by: Masami Hiramatsu <mhiramat@...nel.org>
> > ---
> > .../selftests/ftrace/test.d/event/event-enable.tc | 1 +
> > .../selftests/ftrace/test.d/event/event-pid.tc | 1 +
> > .../ftrace/test.d/event/subsystem-enable.tc | 1 +
> > .../ftrace/test.d/event/toplevel-enable.tc | 1 +
> > .../ftrace/test.d/ftrace/func_profiler.tc | 1 +
> > .../ftrace/test.d/kprobe/kprobe_ftrace.tc | 1 +
> > 6 files changed, 6 insertions(+)
> >
> > diff --git a/tools/testing/selftests/ftrace/test.d/event/event-enable.tc b/tools/testing/selftests/ftrace/test.d/event/event-enable.tc
> > index 87eb9d6..ee7ea0a 100644
> > --- a/tools/testing/selftests/ftrace/test.d/event/event-enable.tc
> > +++ b/tools/testing/selftests/ftrace/test.d/event/event-enable.tc
> > @@ -23,6 +23,7 @@ fi
> >
> > reset_tracer
> > do_reset
> > +enable_tracing
> >
> > echo 'sched:sched_switch' > set_event
> >
> > diff --git a/tools/testing/selftests/ftrace/test.d/event/event-pid.tc b/tools/testing/selftests/ftrace/test.d/event/event-pid.tc
> > index d4ab27b..1477e5e 100644
> > --- a/tools/testing/selftests/ftrace/test.d/event/event-pid.tc
> > +++ b/tools/testing/selftests/ftrace/test.d/event/event-pid.tc
> > @@ -30,6 +30,7 @@ fi
> >
> > reset_tracer
> > do_reset
> > +enable_tracing
> >
> > echo 1 > events/sched/sched_switch/enable
> >
> > diff --git a/tools/testing/selftests/ftrace/test.d/event/subsystem-enable.tc b/tools/testing/selftests/ftrace/test.d/event/subsystem-enable.tc
> > index ced27ef..f4a64f9 100644
> > --- a/tools/testing/selftests/ftrace/test.d/event/subsystem-enable.tc
> > +++ b/tools/testing/selftests/ftrace/test.d/event/subsystem-enable.tc
> > @@ -23,6 +23,7 @@ fi
> >
> > reset_tracer
> > do_reset
> > +enable_tracing
> >
> > echo 'sched:*' > set_event
> >
> > diff --git a/tools/testing/selftests/ftrace/test.d/event/toplevel-enable.tc b/tools/testing/selftests/ftrace/test.d/event/toplevel-enable.tc
> > index 0bb5df3..037a82e 100644
> > --- a/tools/testing/selftests/ftrace/test.d/event/toplevel-enable.tc
> > +++ b/tools/testing/selftests/ftrace/test.d/event/toplevel-enable.tc
> > @@ -23,6 +23,7 @@ fi
> >
> > reset_tracer
> > do_reset
> > +enable_tracing
> >
> > echo '*:*' > set_event
> >
> > diff --git a/tools/testing/selftests/ftrace/test.d/ftrace/func_profiler.tc b/tools/testing/selftests/ftrace/test.d/ftrace/func_profiler.tc
> > index 7808336..d10d6e0 100644
> > --- a/tools/testing/selftests/ftrace/test.d/ftrace/func_profiler.tc
> > +++ b/tools/testing/selftests/ftrace/test.d/ftrace/func_profiler.tc
> > @@ -36,6 +36,7 @@ fail() { # mesg
> >
> > echo "Testing function tracer with profiler:"
> > echo "enable function tracer"
> > +enable_tracing
> > echo function > current_tracer
> > echo "enable profiler"
> > echo 1 > function_profile_enabled
> > diff --git a/tools/testing/selftests/ftrace/test.d/kprobe/kprobe_ftrace.tc b/tools/testing/selftests/ftrace/test.d/kprobe/kprobe_ftrace.tc
> > index d6f2f49..bdbd385 100644
> > --- a/tools/testing/selftests/ftrace/test.d/kprobe/kprobe_ftrace.tc
> > +++ b/tools/testing/selftests/ftrace/test.d/kprobe/kprobe_ftrace.tc
> > @@ -10,6 +10,7 @@ echo _do_fork > set_ftrace_filter
> > echo 0 > events/enable
> > echo > kprobe_events
> > echo 'p:testprobe _do_fork' > kprobe_events
> > +enable_tracing
> >
> > # kprobe on / ftrace off
> > echo 1 > events/kprobes/testprobe/enable
>
--
Masami Hiramatsu <mhiramat@...nel.org>
Powered by blists - more mailing lists