[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20190704104345.3aaa736c4db0d9c78845fb87@kernel.org>
Date: Thu, 4 Jul 2019 10:43:45 +0900
From: Masami Hiramatsu <mhiramat@...nel.org>
To: Steven Rostedt <rostedt@...dmis.org>
Cc: linux-kernel@...r.kernel.org,
Masami Hiramatsu <mhiramat@...nel.org>,
shuah <shuah@...nel.org>, Ingo Molnar <mingo@...nel.org>,
Andrew Morton <akpm@...ux-foundation.org>
Subject: Re: [PATCH 2/2] ftrace/selftest: Test if set_event/ftrace_pid
exists before writing
On Wed, 03 Jul 2019 15:50:01 -0400
Steven Rostedt <rostedt@...dmis.org> wrote:
> From: "Steven Rostedt (VMware)" <rostedt@...dmis.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.
>
Oops, I've missed it.
> Other files test for existance before writing to them. Do the same for
> set_event_pid and set_ftrace_pid.
Looks good to me,
Acked-by: Masami Hiramatsu <mhiramat@...nel.org>
Thank you!
>
> Signed-off-by: Steven Rostedt (VMware) <rostedt@...dmis.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
> + [ -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
> --
> 2.20.1
>
>
--
Masami Hiramatsu <mhiramat@...nel.org>
Powered by blists - more mailing lists