Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 42534b1f authored by Masami Hiramatsu's avatar Masami Hiramatsu Committed by Shuah Khan
Browse files

selftests/ftrace: Introduce exit_pass and exit_fail



As same as other results, introduce exit_pass and exit_fail
functions so that we can easily understand what will happen.

Signed-off-by: default avatarMasami Hiramatsu <mhiramat@kernel.org>
Acked-by: default avatarSteven Rostedt (VMware) <rostedt@goodmis.org>
Signed-off-by: default avatarShuah Khan <shuahkh@osg.samsung.com>
parent f737b8f4
Loading
Loading
Loading
Loading
+7 −0
Original line number Original line Diff line number Diff line
@@ -222,7 +222,14 @@ SIG_RESULT=
SIG_BASE=36	# Use realtime signals
SIG_BASE=36	# Use realtime signals
SIG_PID=$$
SIG_PID=$$


exit_pass () {
  exit 0
}

SIG_FAIL=$((SIG_BASE + FAIL))
SIG_FAIL=$((SIG_BASE + FAIL))
exit_fail () {
  exit 1
}
trap 'SIG_RESULT=$FAIL' $SIG_FAIL
trap 'SIG_RESULT=$FAIL' $SIG_FAIL


SIG_UNRESOLVED=$((SIG_BASE + UNRESOLVED))
SIG_UNRESOLVED=$((SIG_BASE + UNRESOLVED))
+1 −1
Original line number Original line Diff line number Diff line
@@ -2,4 +2,4 @@
# description: Basic event tracing check
# description: Basic event tracing check
test -f available_events -a -f set_event -a -d events
test -f available_events -a -f set_event -a -d events
# check scheduler events are available
# check scheduler events are available
grep -q sched available_events && exit 0 || exit $FAIL
grep -q sched available_events && exit_pass || exit_fail
+1 −1
Original line number Original line Diff line number Diff line
@@ -11,7 +11,7 @@ do_reset() {
fail() { #msg
fail() { #msg
    do_reset
    do_reset
    echo $1
    echo $1
    exit $FAIL
    exit_fail
}
}


yield() {
yield() {
+1 −1
Original line number Original line Diff line number Diff line
@@ -13,7 +13,7 @@ do_reset() {
fail() { #msg
fail() { #msg
    do_reset
    do_reset
    echo $1
    echo $1
    exit $FAIL
    exit_fail
}
}


yield() {
yield() {
+1 −1
Original line number Original line Diff line number Diff line
@@ -11,7 +11,7 @@ do_reset() {
fail() { #msg
fail() { #msg
    do_reset
    do_reset
    echo $1
    echo $1
    exit $FAIL
    exit_fail
}
}


yield() {
yield() {
Loading