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>
# 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 $FAIL
fail() { #msg
do_reset
echo $1
- exit -1
+ exit $FAIL
}
if [ ! -f set_event -o ! -d events/sched ]; then
fail() { #msg
do_reset
echo $1
- exit -1
+ exit $FAIL
}
if [ ! -f set_event -o ! -d events/sched ]; then
fail() { #msg
do_reset
echo $1
- exit -1
+ exit $FAIL
}
if [ ! -f available_events -o ! -f set_event -o ! -d events ]; then
fail() { # msg
do_reset
echo $1
- exit -1
+ exit $FAIL
}
disable_tracing
fail() { # msg
do_reset
echo $1
- exit -1
+ exit $FAIL
}
disable_tracing
reset_tracer
echo > set_ftrace_filter
echo $1
- exit -1
+ exit $FAIL
}
echo "Testing function tracer with profiler:"