aboutsummaryrefslogtreecommitdiffstats
path: root/tools/testing/selftests/ftrace/test.d/functions
diff options
context:
space:
mode:
Diffstat (limited to 'tools/testing/selftests/ftrace/test.d/functions')
-rw-r--r--tools/testing/selftests/ftrace/test.d/functions10
1 files changed, 8 insertions, 2 deletions
diff --git a/tools/testing/selftests/ftrace/test.d/functions b/tools/testing/selftests/ftrace/test.d/functions
index cd2756c77ed9..35de6bc9613b 100644
--- a/tools/testing/selftests/ftrace/test.d/functions
+++ b/tools/testing/selftests/ftrace/test.d/functions
@@ -106,9 +106,15 @@ initialize_ftrace() { # Reset ftrace to initial-state
enable_tracing
}
-check_requires() { # Check required files
+check_requires() { # Check required files and tracers
for i in $* ; do
- if [ ! -e $i ]; then
+ t=${i%:tracer}
+ if [ $t != $i ]; then
+ if ! grep -wq $t available_tracers ; then
+ echo "Required tracer $t is not configured."
+ exit_unsupported
+ fi
+ elif [ ! -e $i ]; then
echo "Required feature interface $i doesn't exist."
exit_unsupported
fi