From: Steven Rostedt <rostedt@goodmis.org>
To: Masami Hiramatsu <mhiramat@kernel.org>
Cc: linux-kselftest@vger.kernel.org, shuah@kernel.org,
"Tom Zanussi" <zanussi@kernel.org>,
linux-kernel@vger.kernel.org,
"Daniel Díaz" <daniel.diaz@linaro.org>
Subject: Re: [PATCH] sefltests/ftrace: Use /bin/echo for output with options
Date: Thu, 29 Nov 2018 11:32:40 -0500 [thread overview]
Message-ID: <20181129113240.163cbfa9@gandalf.local.home> (raw)
In-Reply-To: <154350406317.4422.7595059658374071660.stgit@devbox>
On Fri, 30 Nov 2018 00:07:43 +0900
Masami Hiramatsu <mhiramat@kernel.org> wrote:
> Use /bin/echo for console output with options like non
> newline (-n) and/or backslash escape (-e).
>
> Tom Zanussi reported that when he tested ftracetest, it
> shows "-e" and "-n" options on the console, since a system
> which uses dash as the alias of /bin/sh, uses dash built-in
> echo command which doesn't accept "-e".
>
> To avoid this issue, use /bin/echo instead of echo for
> the output with options.
>
> Fixes: 8f381ac4d321 ("selftests/ftrace: Add color to the PASS / FAIL results")
> Link: http://lkml.kernel.org/r/cover.1542221862.git.tom.zanussi@linux.intel.com
> Reported-by: Tom Zanussi <zanussi@kernel.org>
> Suggested-by: Tom Zanussi <zanussi@kernel.org>
> Signed-off-by: Masami Hiramatsu <mhiramat@kernel.org>
> ---
> tools/testing/selftests/ftrace/ftracetest | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/tools/testing/selftests/ftrace/ftracetest b/tools/testing/selftests/ftrace/ftracetest
> index 75244db70331..ba670b452bdb 100755
> --- a/tools/testing/selftests/ftrace/ftracetest
> +++ b/tools/testing/selftests/ftrace/ftracetest
> @@ -173,8 +173,8 @@ strip_esc() {
> }
>
> prlog() { # messages
> - echo -e "$@"
> - [ "$LOG_FILE" ] && echo -e "$@" | strip_esc >> $LOG_FILE
> + /bin/echo -e "$@"
> + [ "$LOG_FILE" ] && /bin/echo -e "$@" | strip_esc >> $LOG_FILE
> }
> catlog() { #file
> cat $1
I'm fine with this change but I wonder if we should have a $ECHO that
is defined to something that can be overwritten if need be.
Acked-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
-- Steve
next prev parent reply other threads:[~2018-11-29 16:32 UTC|newest]
Thread overview: 37+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-11-14 20:17 [PATCH v7 00/16] tracing: Hist trigger snapshot and onchange additions Tom Zanussi
2018-11-14 20:17 ` [PATCH v7 01/16] tracing: Refactor hist trigger action code Tom Zanussi
2018-11-14 20:17 ` [PATCH v7 02/16] tracing: Make hist trigger Documentation better reflect actions/handlers Tom Zanussi
2018-11-14 20:18 ` [PATCH v7 03/16] tracing: Add hist trigger handler.action documentation to README Tom Zanussi
2018-11-14 20:18 ` [PATCH v7 04/16] tracing: Split up onmatch action data Tom Zanussi
2018-11-14 20:18 ` [PATCH v7 05/16] tracing: Generalize hist trigger onmax and save action Tom Zanussi
2018-11-23 2:50 ` Namhyung Kim
2018-12-03 22:22 ` Tom Zanussi
2018-12-04 7:25 ` Namhyung Kim
2018-12-04 19:53 ` Tom Zanussi
2018-11-23 7:01 ` Namhyung Kim
2018-11-27 22:48 ` Tom Zanussi
2018-11-14 20:18 ` [PATCH v7 06/16] tracing: Add conditional snapshot Tom Zanussi
2018-11-14 20:18 ` [PATCH v7 07/16] tracing: Add hist trigger snapshot() action Tom Zanussi
2018-11-14 20:18 ` [PATCH v7 08/16] tracing: Add hist trigger snapshot() action Documentation Tom Zanussi
2018-11-14 20:18 ` [PATCH v7 09/16] tracing: Add hist trigger snapshot() action test case Tom Zanussi
2018-11-26 13:03 ` Masami Hiramatsu
2018-11-27 22:53 ` Tom Zanussi
2018-11-28 2:15 ` Masami Hiramatsu
2018-11-29 1:12 ` Tom Zanussi
2018-12-04 19:59 ` Tom Zanussi
2018-11-14 20:18 ` [PATCH v7 10/16] tracing: Add hist trigger onchange() handler Tom Zanussi
2018-11-14 20:18 ` [PATCH v7 11/16] tracing: Add hist trigger onchange() handler Documentation Tom Zanussi
2018-11-14 20:18 ` [PATCH v7 12/16] tracing: Add hist trigger onchange() handler test case Tom Zanussi
2018-11-14 20:18 ` [PATCH v7 13/16] tracing: Add alternative synthetic event trace action syntax Tom Zanussi
2018-11-14 20:18 ` [PATCH v7 14/16] tracing: Add alternative synthetic event trace action test case Tom Zanussi
2018-11-14 20:18 ` [PATCH v7 15/16] tracing: Add hist trigger action 'expected fail' " Tom Zanussi
2018-11-14 20:18 ` [PATCH v7 16/16] tracing: Add SPDX license GPL-2.0 license identifier to inter-event testcases Tom Zanussi
2018-11-26 14:09 ` [PATCH v7 00/16] tracing: Hist trigger snapshot and onchange additions Masami Hiramatsu
2018-11-26 21:21 ` Tom Zanussi
2018-11-29 13:52 ` Masami Hiramatsu
2018-11-29 14:54 ` Masami Hiramatsu
2018-11-29 15:07 ` [PATCH] sefltests/ftrace: Use /bin/echo for output with options Masami Hiramatsu
2018-11-29 16:32 ` Steven Rostedt [this message]
2018-11-29 16:43 ` Tom Zanussi
2018-11-29 16:49 ` Steven Rostedt
2019-03-04 20:09 ` Tom Zanussi
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20181129113240.163cbfa9@gandalf.local.home \
--to=rostedt@goodmis.org \
--cc=daniel.diaz@linaro.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-kselftest@vger.kernel.org \
--cc=mhiramat@kernel.org \
--cc=shuah@kernel.org \
--cc=zanussi@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).