All of lore.kernel.org
 help / color / mirror / Atom feed
From: Steven Rostedt <rostedt@goodmis.org>
To: David Laight <David.Laight@ACULAB.COM>
Cc: 'Masami Hiramatsu' <mhiramat@kernel.org>,
	Shuah Khan <shuah@kernel.org>,
	"linux-kselftest@vger.kernel.org"
	<linux-kselftest@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	Tom Zanussi <tom.zanussi@linux.intel.com>,
	Li Philip <philip.li@intel.com>,
	Liu Yiding <yidingx.liu@intel.com>,
	Xiao Yang <yangx.jy@cn.fujitsu.com>,
	Andreas Schwab <schwab@linux-m68k.org>
Subject: Re: [PATCH v2] selftests/ftrace: Use printf for backslash included command
Date: Mon, 11 May 2020 16:28:42 -0400	[thread overview]
Message-ID: <20200511162842.7c198741@gandalf.local.home> (raw)
In-Reply-To: <f61eda03333941958d62f9df93ba534b@AcuMS.aculab.com>

On Mon, 11 May 2020 14:59:20 +0000
David Laight <David.Laight@ACULAB.COM> wrote:

> > >      echo "Test command: $command"
> > >      echo > error_log
> > > -    (! echo "$command" >> "$3" ) 2> /dev/null
> > > +    (! printf "%s" "$command" >> "$3" ) 2> /dev/null  
> 
> WTF is the (! for ??
> The (...) is a subshell.
> And ! inverts the exit status.
> Neither is needed at all.

This is done because the scripts are run with '-e' and will exit the script
on any error.

This particular test is examining errors in the error log. The command
being written into $3 is going to fail, and return an exit code. The
"(! ..)" is needed, otherwise that failure will exit out the script.

-- Steve

  reply	other threads:[~2020-05-11 20:28 UTC|newest]

Thread overview: 38+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-01 13:37 [PATCH 0/3] selftests/ftrace: Fix ftracetest testcases for dash, etc Masami Hiramatsu
2020-05-01 13:37 ` [PATCH 1/3] selftests/ftrace: Make XFAIL green color Masami Hiramatsu
2020-05-01 14:15   ` Steven Rostedt
2020-05-01 13:37 ` [PATCH 2/3] selftests/ftrace: Pick only the first kprobe event to test Masami Hiramatsu
2020-05-01 14:17   ` Steven Rostedt
2020-05-01 15:38     ` shuah
2020-05-01 16:20       ` Steven Rostedt
2020-05-01 16:30         ` Shuah Khan
2020-05-02  3:05       ` Masami Hiramatsu
2020-05-01 13:38 ` [PATCH 3/3] selftests/ftrace: Use /bin/echo instead of built-in echo Masami Hiramatsu
2020-05-01 14:19   ` Steven Rostedt
2020-05-02  3:08     ` Masami Hiramatsu
2020-05-07 13:12       ` Steven Rostedt
2020-05-07 15:50         ` Masami Hiramatsu
2020-05-07 17:25           ` Steven Rostedt
2020-05-07 20:32             ` Zanussi, Tom
2020-05-08  7:11               ` Masami Hiramatsu
2020-05-07  6:45   ` Xiao Yang
2020-05-07  9:15     ` Masami Hiramatsu
2020-05-11  7:22       ` Xiao Yang
2020-05-11  9:27         ` Masami Hiramatsu
2020-05-11 10:34           ` David Laight
2020-05-11 12:01           ` [PATCH] selftests/ftrace: Use /bin/echo for backslash included command Masami Hiramatsu
2020-05-11 12:19             ` Andreas Schwab
2020-05-11 13:36               ` [PATCH v2] selftests/ftrace: Use printf " Masami Hiramatsu
2020-05-11 13:38                 ` Masami Hiramatsu
2020-05-11 13:46                   ` David Laight
2020-05-11 14:05                     ` Masami Hiramatsu
2020-05-11 14:59                   ` David Laight
2020-05-11 20:28                     ` Steven Rostedt [this message]
2020-05-11 13:42                 ` Andreas Schwab
2020-05-11 13:58                   ` Masami Hiramatsu
2020-05-25  9:59                 ` Masami Hiramatsu
2020-05-28 16:24                   ` Shuah Khan
2020-05-07  9:22   ` [PATCH 3/3] selftests/ftrace: Use /bin/echo instead of built-in echo Andreas Schwab
2020-05-07 15:52     ` Masami Hiramatsu
2020-05-01 14:21 ` [PATCH 0/3] selftests/ftrace: Fix ftracetest testcases for dash, etc Steven Rostedt
2020-05-01 14:28   ` Shuah Khan

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=20200511162842.7c198741@gandalf.local.home \
    --to=rostedt@goodmis.org \
    --cc=David.Laight@ACULAB.COM \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-kselftest@vger.kernel.org \
    --cc=mhiramat@kernel.org \
    --cc=philip.li@intel.com \
    --cc=schwab@linux-m68k.org \
    --cc=shuah@kernel.org \
    --cc=tom.zanussi@linux.intel.com \
    --cc=yangx.jy@cn.fujitsu.com \
    --cc=yidingx.liu@intel.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.