diff options
author | Michael Ellerman <mpe@ellerman.id.au> | 2015-03-30 01:21:00 -0400 |
---|---|---|
committer | Shuah Khan <shuahkh@osg.samsung.com> | 2015-03-31 12:15:46 -0400 |
commit | 44164c4ba98c3dd3560d929ba66da51b5170ff1c (patch) | |
tree | efc0a82b3dc7bdfdf1e0e49295b3614790c6c1c8 /tools/testing | |
parent | a05ffdce7155769ea5ac3409e1490fb9116dbaed (diff) |
ftracetest: Convert exit -1 to exit $FAIL
POSIX says that exit takes an unsigned integer between 0 and 255, so
using -1 doesn't work on POSIX shells.
There is already a well-defined failure code, $FAIL (1), so use that.
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Acked-by: Steven Rostedt <rostedt@goodmis.org>
Signed-off-by: Shuah Khan <shuahkh@osg.samsung.com>
Diffstat (limited to 'tools/testing')
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..aa51f6c17359 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 @@ | |||
2 | # description: Basic event tracing check | 2 | # description: Basic event tracing check |
3 | test -f available_events -a -f set_event -a -d events | 3 | test -f available_events -a -f set_event -a -d events |
4 | # check scheduler events are available | 4 | # check scheduler events are available |
5 | grep -q sched available_events && exit 0 || exit -1 \ No newline at end of file | 5 | grep -q sched available_events && exit 0 || exit $FAIL |
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..dbddb7836f73 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() { | |||
9 | fail() { #msg | 9 | fail() { #msg |
10 | do_reset | 10 | do_reset |
11 | echo $1 | 11 | echo $1 |
12 | exit -1 | 12 | exit $FAIL |
13 | } | 13 | } |
14 | 14 | ||
15 | if [ ! -f set_event -o ! -d events/sched ]; then | 15 | 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..ef9b95dc10c5 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() { | |||
9 | fail() { #msg | 9 | fail() { #msg |
10 | do_reset | 10 | do_reset |
11 | echo $1 | 11 | echo $1 |
12 | exit -1 | 12 | exit $FAIL |
13 | } | 13 | } |
14 | 14 | ||
15 | if [ ! -f set_event -o ! -d events/sched ]; then | 15 | 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..af8cf01fc3a7 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() { | |||
9 | fail() { #msg | 9 | fail() { #msg |
10 | do_reset | 10 | do_reset |
11 | echo $1 | 11 | echo $1 |
12 | exit -1 | 12 | exit $FAIL |
13 | } | 13 | } |
14 | 14 | ||
15 | if [ ! -f available_events -o ! -f set_event -o ! -d events ]; then | 15 | 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 3b1cf20cf6d8..15c2dba06ea2 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 | |||
@@ -27,7 +27,7 @@ do_reset() { | |||
27 | fail() { # msg | 27 | fail() { # msg |
28 | do_reset | 28 | do_reset |
29 | echo $1 | 29 | echo $1 |
30 | exit -1 | 30 | exit $FAIL |
31 | } | 31 | } |
32 | 32 | ||
33 | disable_tracing | 33 | 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..0ab2189613ef 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() { | |||
17 | fail() { # msg | 17 | fail() { # msg |
18 | do_reset | 18 | do_reset |
19 | echo $1 | 19 | echo $1 |
20 | exit -1 | 20 | exit $FAIL |
21 | } | 21 | } |
22 | 22 | ||
23 | disable_tracing | 23 | 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..7808336d6f50 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 | |||
31 | reset_tracer | 31 | reset_tracer |
32 | echo > set_ftrace_filter | 32 | echo > set_ftrace_filter |
33 | echo $1 | 33 | echo $1 |
34 | exit -1 | 34 | exit $FAIL |
35 | } | 35 | } |
36 | 36 | ||
37 | echo "Testing function tracer with profiler:" | 37 | echo "Testing function tracer with profiler:" |