All of lore.kernel.org
 help / color / mirror / Atom feed
From: Tom Zanussi <zanussi@kernel.org>
To: Masami Hiramatsu <mhiramat@kernel.org>
Cc: rostedt@goodmis.org, tglx@linutronix.de, namhyung@kernel.org,
	bigeasy@linutronix.de, joel@joelfernandes.org,
	linux-kernel@vger.kernel.org, linux-rt-users@vger.kernel.org
Subject: Re: [PATCH v4 11/11] selftests/ftrace: Change stderr redirection for probe error_log testcase
Date: Sat, 23 Mar 2019 08:14:17 -0500	[thread overview]
Message-ID: <1553346857.2307.11.camel@kernel.org> (raw)
In-Reply-To: <20190323192851.ea9f26822f6572fafc946b74@kernel.org>

Hi Masami,

On Sat, 2019-03-23 at 19:28 +0900, Masami Hiramatsu wrote:
> On Fri, 22 Mar 2019 10:34:37 -0500
> Tom Zanussi <zanussi@kernel.org> wrote:
> 
> > From: Tom Zanussi <tom.zanussi@linux.intel.com>
> > 
> > On my system, /bin/sh is symlinked to dash, which doesn't
> > understand
> > the >& syntax, so the kprobe and uprobe error cases fail, with this
> > in
> > the log:
> > 
> > ./ftracetest: 26:
> > tools/testing/selftests/ftrace/test.d/kprobe/kprobe_syntax_errors.t
> > c:
> > Syntax error: Bad fd number
> > 
> > Changing >& to 2> does work though, and should work in any shell.
> 
> Ah, I missed this patch.
> 
> This looks good to me.
> 
> Acked-by: Masami Hiramatsu <mhiramat@kernel.org>
> 

OK, thanks, will merge it with the original testcase.

> BTW, where is my checkbashisms testcase ...

Haha, yeah, seems to be a problem with recent testcases.

Tom

> 
> > 
> > Signed-off-by: Tom Zanussi <tom.zanussi@linux.intel.com>
> > ---
> >  tools/testing/selftests/ftrace/test.d/kprobe/kprobe_syntax_errors.
> > tc | 2 +-
> >  tools/testing/selftests/ftrace/test.d/kprobe/uprobe_syntax_errors.
> > tc | 2 +-
> >  2 files changed, 2 insertions(+), 2 deletions(-)
> > 
> > diff --git
> > a/tools/testing/selftests/ftrace/test.d/kprobe/kprobe_syntax_errors
> > .tc
> > b/tools/testing/selftests/ftrace/test.d/kprobe/kprobe_syntax_errors
> > .tc
> > index 281665b1348c..7eb577b1d222 100644
> > ---
> > a/tools/testing/selftests/ftrace/test.d/kprobe/kprobe_syntax_errors
> > .tc
> > +++
> > b/tools/testing/selftests/ftrace/test.d/kprobe/kprobe_syntax_errors
> > .tc
> > @@ -11,7 +11,7 @@ pos=$(echo -n "${1%^*}" | wc -c) # error position
> >  command=$(echo "$1" | tr -d ^)
> >  echo "Test command: $command"
> >  echo > error_log
> > -(! echo "$command" > kprobe_events ) >& /dev/null
> > +(! echo "$command" > kprobe_events ) 2> /dev/null
> >  grep "trace_kprobe: error:" -A 3 error_log
> >  N=$(tail -n 1 error_log | wc -c)
> >  # "  Command: " and "^\n" => 13
> > diff --git
> > a/tools/testing/selftests/ftrace/test.d/kprobe/uprobe_syntax_errors
> > .tc
> > b/tools/testing/selftests/ftrace/test.d/kprobe/uprobe_syntax_errors
> > .tc
> > index 957011300bb7..ec7389b7934b 100644
> > ---
> > a/tools/testing/selftests/ftrace/test.d/kprobe/uprobe_syntax_errors
> > .tc
> > +++
> > b/tools/testing/selftests/ftrace/test.d/kprobe/uprobe_syntax_errors
> > .tc
> > @@ -11,7 +11,7 @@ pos=$(echo -n "${1%^*}" | wc -c) # error position
> >  command=$(echo "$1" | tr -d ^)
> >  echo "Test command: $command"
> >  echo > error_log
> > -(! echo "$command" > uprobe_events ) >& /dev/null
> > +(! echo "$command" > uprobe_events ) 2> /dev/null
> >  grep "trace_uprobe: error:" -A 3 error_log
> >  N=$(tail -n 1 error_log | wc -c)
> >  # "  Command: " and "^\n" => 13
> > -- 
> > 2.14.1
> > 
> 
> 

  reply	other threads:[~2019-03-23 13:14 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-03-22 15:34 [PATCH v4 00/11] tracing: common error_log for ftrace Tom Zanussi
2019-03-22 15:34 ` [PATCH v4 01/11] tracing: Add tracing error log Tom Zanussi
2019-03-26  8:22   ` Masami Hiramatsu
2019-03-22 15:34 ` [PATCH v4 02/11] tracing: Save the last hist command's associated event name Tom Zanussi
2019-03-22 15:34 ` [PATCH v4 03/11] tracing: Use tracing error_log with hist triggers Tom Zanussi
2019-03-22 15:34 ` [PATCH v4 04/11] tracing: Use tracing error_log with trace event filters Tom Zanussi
2019-03-25 11:37   ` Namhyung Kim
2019-03-25 14:28     ` Steven Rostedt
2019-03-22 15:34 ` [PATCH v4 05/11] tracing: Use tracing error_log with probe events Tom Zanussi
2019-03-22 15:34 ` [PATCH v4 06/11] selftests/ftrace: Add error_log testcase for probe errors Tom Zanussi
2019-03-23 10:22   ` Masami Hiramatsu
2019-03-23 13:11     ` Tom Zanussi
2019-03-24 10:11       ` Masami Hiramatsu
2019-03-22 15:34 ` [PATCH v4 07/11] tracing: Remove trigger-extended-error-support testcase Tom Zanussi
2019-03-23 10:13   ` Masami Hiramatsu
2019-03-23 13:08     ` Tom Zanussi
2019-03-22 15:34 ` [PATCH v4 08/11] selftests/ftrace: Add tracing/error_log testcase Tom Zanussi
2019-03-23 12:08   ` Masami Hiramatsu
2019-03-23 13:17     ` Tom Zanussi
2019-03-22 15:34 ` [PATCH v4 09/11] tracing: Add tracing/error_log Documentation Tom Zanussi
2019-03-22 15:34 ` [PATCH v4 10/11] tracing: Add error_log to README Tom Zanussi
2019-03-22 15:34 ` [PATCH v4 11/11] selftests/ftrace: Change stderr redirection for probe error_log testcase Tom Zanussi
2019-03-23 10:28   ` Masami Hiramatsu
2019-03-23 13:14     ` Tom Zanussi [this message]
2019-03-23 10:14 ` [PATCH v4 00/11] tracing: common error_log for ftrace Masami Hiramatsu

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=1553346857.2307.11.camel@kernel.org \
    --to=zanussi@kernel.org \
    --cc=bigeasy@linutronix.de \
    --cc=joel@joelfernandes.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-rt-users@vger.kernel.org \
    --cc=mhiramat@kernel.org \
    --cc=namhyung@kernel.org \
    --cc=rostedt@goodmis.org \
    --cc=tglx@linutronix.de \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.