aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/tools/testing/selftests/ftrace/ftracetest
diff options
context:
space:
mode:
authorPeter Zijlstra <peterz@infradead.org>2020-07-08 11:38:59 +0200
committerPeter Zijlstra <peterz@infradead.org>2020-07-08 11:38:59 +0200
commitfaa2fd7cbad4609d06d7904c0a80cf2f8cd23678 (patch)
tree3a5bfcc8879b719aec97cb73ed6e020cde502546 /tools/testing/selftests/ftrace/ftracetest
parentsched/core: Remove mmdrop() definition (diff)
parentsched: Fix unreliable rseq cpu_id for new tasks (diff)
downloadwireguard-linux-faa2fd7cbad4609d06d7904c0a80cf2f8cd23678.tar.xz
wireguard-linux-faa2fd7cbad4609d06d7904c0a80cf2f8cd23678.zip
Merge branch 'sched/urgent'
Diffstat (limited to 'tools/testing/selftests/ftrace/ftracetest')
-rwxr-xr-xtools/testing/selftests/ftrace/ftracetest11
1 files changed, 9 insertions, 2 deletions
diff --git a/tools/testing/selftests/ftrace/ftracetest b/tools/testing/selftests/ftrace/ftracetest
index a4605b5ee66d..8ec1922e974e 100755
--- a/tools/testing/selftests/ftrace/ftracetest
+++ b/tools/testing/selftests/ftrace/ftracetest
@@ -263,10 +263,16 @@ CASENO=0
testcase() { # testfile
CASENO=$((CASENO+1))
- desc=`grep "^#[ \t]*description:" $1 | cut -f2 -d:`
+ desc=`grep "^#[ \t]*description:" $1 | cut -f2- -d:`
prlog -n "[$CASENO]$INSTANCE$desc"
}
+checkreq() { # testfile
+ requires=`grep "^#[ \t]*requires:" $1 | cut -f2- -d:`
+ # Use eval to pass quoted-patterns correctly.
+ eval check_requires "$requires"
+}
+
test_on_instance() { # testfile
grep -q "^#[ \t]*flags:.*instance" $1
}
@@ -356,7 +362,8 @@ trap 'SIG_RESULT=$XFAIL' $SIG_XFAIL
__run_test() { # testfile
# setup PID and PPID, $$ is not updated.
- (cd $TRACING_DIR; read PID _ < /proc/self/stat; set -e; set -x; initialize_ftrace; . $1)
+ (cd $TRACING_DIR; read PID _ < /proc/self/stat; set -e; set -x;
+ checkreq $1; initialize_ftrace; . $1)
[ $? -ne 0 ] && kill -s $SIG_FAIL $SIG_PID
}