public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Namhyung Kim <namhyung@kernel.org>
To: Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com>
Cc: Steven Rostedt <rostedt@goodmis.org>,
	Andrew Morton <akpm@linux-foundation.org>,
	Theodore Tso <tytso@mit.edu>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	Ingo Molnar <mingo@kernel.org>
Subject: Re: [PATCH 2/2] ftracetest: Add --verbose option for showing echo output
Date: Fri, 5 Dec 2014 14:52:45 +0900	[thread overview]
Message-ID: <20141205055245.GB18217@sejong> (raw)
In-Reply-To: <5481414B.5090805@hitachi.com>

On Fri, Dec 05, 2014 at 02:23:23PM +0900, Masami Hiramatsu wrote:
> (2014/12/05 14:08), Namhyung Kim wrote:
> > On Thu, Dec 04, 2014 at 02:41:23PM -0500, Masami Hiramatsu wrote:
> >> Add --verbose/-v option for showing echo output in testcases.
> >> This is good for checking the progress of testcases which
> >> take a longer time to run.
> >>
> >> To implement this feature, all the testcase failures are
> >> captured in ftracetest and send signal to set SIG_RESULT=FAIL.
> >>
> >> Signed-off-by: Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com>
> >> ---
> > 
> > [SNIP]
> >> -  # setup PID and PPID, $$ is not updated.
> >> -  (cd $TRACING_DIR; read PID _ < /proc/self/stat ;
> >> -   set -e; set -x; . $1) >> $testlog 2>&1
> >> -  eval_result $? $SIG_RESULT
> >> +  if [ $VERBOSE -ne 0 ]; then
> >> +    __run_test $1 2>> $testlog | tee -a $testlog
> > 
> > Shouldn't it be
> > 
> >        __run_test $1 2>&1 | tee -a $testlog
> > 
> > ?
> 
> No, that outputs both stdout and stderr to $testlog and console.
> What I'd like to do above is only stdout to $testlog and console and
> stderr goes only to $testlog. (Note that __run_test set -x which outputs
> every executed command to stderr)

Hmm.. so the actual output of the failing command is not shown on
console even when -v option is given, right?

Anyway I worried about that the order of messages might be mixed..

  echo msg1 > /dev/stdout
  echo msg2 > /dev/stderr
  echo msg3 > /dev/stdout
  echo msg4 > /dev/stderr

So the output in this case can be like msg2, msg4, msg1, and msg3..?

Thanks,
Namhyung

  reply	other threads:[~2014-12-05  5:52 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-12-04 19:41 [PATCH 0/2] ftracetest: ftracetest updates Masami Hiramatsu
2014-12-04 19:41 ` [PATCH 1/2] ftracetest: Fix to show descriptions on dash Masami Hiramatsu
2014-12-04 19:41 ` [PATCH 2/2] ftracetest: Add --verbose option for showing echo output Masami Hiramatsu
2014-12-05  5:08   ` Namhyung Kim
2014-12-05  5:23     ` Masami Hiramatsu
2014-12-05  5:52       ` Namhyung Kim [this message]
2014-12-05  6:34         ` 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=20141205055245.GB18217@sejong \
    --to=namhyung@kernel.org \
    --cc=akpm@linux-foundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=masami.hiramatsu.pt@hitachi.com \
    --cc=mingo@kernel.org \
    --cc=rostedt@goodmis.org \
    --cc=tytso@mit.edu \
    /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