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: Masami Hiramatsu <mhiramat@kernel.org>
Acked-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
Signed-off-by: Shuah Khan <shuahkh@osg.samsung.com>
This commit is contained in:
Masami Hiramatsu
2017-11-04 04:38:41 +09:00
committed by Shuah Khan
parent f737b8f4d3
commit 42534b1f58
28 changed files with 35 additions and 28 deletions

View File

@@ -222,7 +222,14 @@ SIG_RESULT=
SIG_BASE=36 # Use realtime signals
SIG_PID=$$
exit_pass () {
exit 0
}
SIG_FAIL=$((SIG_BASE + FAIL))
exit_fail () {
exit 1
}
trap 'SIG_RESULT=$FAIL' $SIG_FAIL
SIG_UNRESOLVED=$((SIG_BASE + UNRESOLVED))