All of lore.kernel.org
 help / color / mirror / Atom feed
From: Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com>
To: Michael Ellerman <mpe@ellerman.id.au>
Cc: shuahkh@osg.samsung.com, rostedt@goodmis.org,
	linux-kernel@vger.kernel.org, davej@codemonkey.org.uk,
	namhyung@kernel.org
Subject: Re: [PATCH] ftracetest: Don't use non-POSIX exit -1
Date: Thu, 05 Mar 2015 11:40:13 +0900	[thread overview]
Message-ID: <54F7C20D.7040100@hitachi.com> (raw)
In-Reply-To: <1425521042-30251-1-git-send-email-mpe@ellerman.id.au>

(2015/03/05 11:04), Michael Ellerman wrote:
> POSIX says that exit takes an unsigned integer between 0 and 255.
> 
> Convert exit -1 to exit 255.

Good catch :)

Acked-by: Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com>

Thanks!

> 
> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
> ---
>  tools/testing/selftests/ftrace/test.d/00basic/basic4.tc             | 2 +-
>  tools/testing/selftests/ftrace/test.d/event/event-enable.tc         | 2 +-
>  tools/testing/selftests/ftrace/test.d/event/subsystem-enable.tc     | 2 +-
>  tools/testing/selftests/ftrace/test.d/event/toplevel-enable.tc      | 2 +-
>  tools/testing/selftests/ftrace/test.d/ftrace/fgraph-filter-stack.tc | 2 +-
>  tools/testing/selftests/ftrace/test.d/ftrace/fgraph-filter.tc       | 2 +-
>  tools/testing/selftests/ftrace/test.d/ftrace/func_profiler.tc       | 2 +-
>  7 files changed, 7 insertions(+), 7 deletions(-)
> 
> diff --git a/tools/testing/selftests/ftrace/test.d/00basic/basic4.tc b/tools/testing/selftests/ftrace/test.d/00basic/basic4.tc
> index fd9c49a13612..f6b9fc323ee0 100644
> --- a/tools/testing/selftests/ftrace/test.d/00basic/basic4.tc
> +++ b/tools/testing/selftests/ftrace/test.d/00basic/basic4.tc
> @@ -2,4 +2,4 @@
>  # description: Basic event tracing check
>  test -f available_events -a -f set_event -a -d events
>  # check scheduler events are available
> -grep -q sched available_events && exit 0 || exit -1
> \ No newline at end of file
> +grep -q sched available_events && exit 0 || exit 255
> \ No newline at end of file
> diff --git a/tools/testing/selftests/ftrace/test.d/event/event-enable.tc b/tools/testing/selftests/ftrace/test.d/event/event-enable.tc
> index 668616d9bb03..59a352408284 100644
> --- a/tools/testing/selftests/ftrace/test.d/event/event-enable.tc
> +++ b/tools/testing/selftests/ftrace/test.d/event/event-enable.tc
> @@ -9,7 +9,7 @@ do_reset() {
>  fail() { #msg
>      do_reset
>      echo $1
> -    exit -1
> +    exit 255
>  }
>  
>  if [ ! -f set_event -o ! -d events/sched ]; then
> diff --git a/tools/testing/selftests/ftrace/test.d/event/subsystem-enable.tc b/tools/testing/selftests/ftrace/test.d/event/subsystem-enable.tc
> index 655c415b6e7f..1e4dbf06d690 100644
> --- a/tools/testing/selftests/ftrace/test.d/event/subsystem-enable.tc
> +++ b/tools/testing/selftests/ftrace/test.d/event/subsystem-enable.tc
> @@ -9,7 +9,7 @@ do_reset() {
>  fail() { #msg
>      do_reset
>      echo $1
> -    exit -1
> +    exit 255
>  }
>  
>  if [ ! -f set_event -o ! -d events/sched ]; then
> diff --git a/tools/testing/selftests/ftrace/test.d/event/toplevel-enable.tc b/tools/testing/selftests/ftrace/test.d/event/toplevel-enable.tc
> index 480845774007..6b6a12cba387 100644
> --- a/tools/testing/selftests/ftrace/test.d/event/toplevel-enable.tc
> +++ b/tools/testing/selftests/ftrace/test.d/event/toplevel-enable.tc
> @@ -9,7 +9,7 @@ do_reset() {
>  fail() { #msg
>      do_reset
>      echo $1
> -    exit -1
> +    exit 255
>  }
>  
>  if [ ! -f available_events -o ! -f set_event -o ! -d events ]; then
> diff --git a/tools/testing/selftests/ftrace/test.d/ftrace/fgraph-filter-stack.tc b/tools/testing/selftests/ftrace/test.d/ftrace/fgraph-filter-stack.tc
> index c15e018e0220..7320344072ec 100644
> --- a/tools/testing/selftests/ftrace/test.d/ftrace/fgraph-filter-stack.tc
> +++ b/tools/testing/selftests/ftrace/test.d/ftrace/fgraph-filter-stack.tc
> @@ -25,7 +25,7 @@ do_reset() {
>  fail() { # msg
>      do_reset
>      echo $1
> -    exit -1
> +    exit 255
>  }
>  
>  disable_tracing
> diff --git a/tools/testing/selftests/ftrace/test.d/ftrace/fgraph-filter.tc b/tools/testing/selftests/ftrace/test.d/ftrace/fgraph-filter.tc
> index 6af5f6360b18..9f63b8081f7c 100644
> --- a/tools/testing/selftests/ftrace/test.d/ftrace/fgraph-filter.tc
> +++ b/tools/testing/selftests/ftrace/test.d/ftrace/fgraph-filter.tc
> @@ -17,7 +17,7 @@ do_reset() {
>  fail() { # msg
>      do_reset
>      echo $1
> -    exit -1
> +    exit 255
>  }
>  
>  disable_tracing
> diff --git a/tools/testing/selftests/ftrace/test.d/ftrace/func_profiler.tc b/tools/testing/selftests/ftrace/test.d/ftrace/func_profiler.tc
> index 2e719cb1fc4d..e01ea0a9764e 100644
> --- a/tools/testing/selftests/ftrace/test.d/ftrace/func_profiler.tc
> +++ b/tools/testing/selftests/ftrace/test.d/ftrace/func_profiler.tc
> @@ -31,7 +31,7 @@ fail() { # mesg
>      reset_tracer
>      echo > set_ftrace_filter
>      echo $1
> -    exit -1
> +    exit 255
>  }
>  
>  echo "Testing function tracer with profiler:"
> 


-- 
Masami HIRAMATSU
Software Platform Research Dept. Linux Technology Center
Hitachi, Ltd., Yokohama Research Laboratory
E-mail: masami.hiramatsu.pt@hitachi.com



      parent reply	other threads:[~2015-03-05  2:40 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-03-05  2:04 [PATCH] ftracetest: Don't use non-POSIX exit -1 Michael Ellerman
2015-03-05  2:26 ` Steven Rostedt
2015-03-05  2:56   ` Michael Ellerman
2015-03-05 14:04     ` Steven Rostedt
2015-03-05  2:40 ` Masami Hiramatsu [this message]

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=54F7C20D.7040100@hitachi.com \
    --to=masami.hiramatsu.pt@hitachi.com \
    --cc=davej@codemonkey.org.uk \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mpe@ellerman.id.au \
    --cc=namhyung@kernel.org \
    --cc=rostedt@goodmis.org \
    --cc=shuahkh@osg.samsung.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.