All of lore.kernel.org
 help / color / mirror / Atom feed
From: Luis Henriques <luis.henriques@canonical.com>
To: Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com>
Cc: Shuah Khan <shuah.kh@samsung.com>,
	Tom Zanussi <tom.zanussi@linux.intel.com>,
	Yoshihiro YUNOMAE <yoshihiro.yunomae.ez@hitachi.com>,
	Oleg Nesterov <oleg@redhat.com>,
	Steven Rostedt <rostedt@goodmis.org>,
	Namhyung Kim <namhyung@kernel.org>,
	Ingo Molnar <mingo@kernel.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: [RFC PATCH v2 1/4] ftracetest: Initial commit for ftracetest
Date: Wed, 27 Aug 2014 16:54:56 +0100	[thread overview]
Message-ID: <20140827155456.GH10937@hercules> (raw)
In-Reply-To: <20140826111518.5711.71441.stgit@kbuild-fedora.novalocal>

Hi,

Not really a complete review, but just 2 comments on this script:

On Tue, Aug 26, 2014 at 11:15:18AM +0000, Masami Hiramatsu wrote:
...
> +prlog() { # messages
> +  echo $@ | tee -a $LOG_FILE
> +}
> +catlog() { #file
> +  cat $1 | tee -a $LOG_FILE
> +}
> +
> +# Testcase management
> +PASSED_CASES=
> +FAILED_CASES=
> +CASENO=0
> +testcase() { # testfile
> +  CASENO=$((CASENO+1))
> +  prlog -n "[$CASENO]"`grep "^#[ \t]*description:" $1 | cut -f2 -d:`
> +}
> +failed() {
> +  prlog -e "\t[FAIL]"
> +  FAILED_CASES="$FAILED_CASES $CASENO"
> +}
> +passed() {
> +  prlog -e "\t[PASS]"
> +  PASSED_CASES="$PASSED_CASES $CASENO"
> +}

What I see here is a '-e' being echo'ed and not really a '-e' switch
being used to 'echo'.  (Also, I'm not sure if this is a standard
switch...).

This applies to all the other 'prlog -e'.

> +
> +
> +# Run one test case
> +run_test() { # testfile
> +  local testname=`basename $1`
> +  local testlog=`mktemp --tmpdir=$LOG_DIR ${testname}-XXXXXX.log`
> +  testcase $1
> +  echo "execute: "$1 > $testlog
> +  (cd $TRACING_DIR; set -x ; source $t) >> $testlog 2>&1
> +  ret=$?

I believe the usage of 'source' is a bashism, and '.' should be used
instead.  In my environment, 'source' results in ret=127.  Replacing
it by '.' fixes it.

Cheers,
--
Luís

  reply	other threads:[~2014-08-27 15:55 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-08-26 11:15 [RFC PATCH v2 0/4] ftrace: Add a ftrace test collection Masami Hiramatsu
2014-08-26 11:15 ` [RFC PATCH v2 1/4] ftracetest: Initial commit for ftracetest Masami Hiramatsu
2014-08-27 15:54   ` Luis Henriques [this message]
2014-08-28  8:40     ` Masami Hiramatsu
2014-08-28 10:37       ` Luis Henriques
2014-08-26 11:15 ` [RFC PATCH v2 2/4] ftracetest: Add ftrace basic testcases Masami Hiramatsu
2014-08-26 11:15 ` [RFC PATCH v2 3/4] ftracetest: Add kprobe " Masami Hiramatsu
2014-08-26 11:15 ` [RFC PATCH v2 4/4] ftracetest: Add XFAIL/XPASS/UNSUPPORTED as result code Masami Hiramatsu
2014-08-29  1:05   ` Shuah Khan
2014-09-01  3:17     ` Masami Hiramatsu
2014-09-01 11:23   ` 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=20140827155456.GH10937@hercules \
    --to=luis.henriques@canonical.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=masami.hiramatsu.pt@hitachi.com \
    --cc=mingo@kernel.org \
    --cc=namhyung@kernel.org \
    --cc=oleg@redhat.com \
    --cc=rostedt@goodmis.org \
    --cc=shuah.kh@samsung.com \
    --cc=tom.zanussi@linux.intel.com \
    --cc=yoshihiro.yunomae.ez@hitachi.com \
    /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.