aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xtools/testing/selftests/ftrace/ftracetest1
-rw-r--r--tools/testing/selftests/ftrace/test.d/selftest/bashisms.tc21
2 files changed, 22 insertions, 0 deletions
diff --git a/tools/testing/selftests/ftrace/ftracetest b/tools/testing/selftests/ftrace/ftracetest
index 136387422b00..7da5e31fa0ed 100755
--- a/tools/testing/selftests/ftrace/ftracetest
+++ b/tools/testing/selftests/ftrace/ftracetest
@@ -318,6 +318,7 @@ run_test() { # testfile
318 local testlog=/proc/self/fd/1 318 local testlog=/proc/self/fd/1
319 fi 319 fi
320 export TMPDIR=`mktemp -d /tmp/ftracetest-dir.XXXXXX` 320 export TMPDIR=`mktemp -d /tmp/ftracetest-dir.XXXXXX`
321 export FTRACETEST_ROOT=$TOP_DIR
321 echo "execute$INSTANCE: "$1 > $testlog 322 echo "execute$INSTANCE: "$1 > $testlog
322 SIG_RESULT=0 323 SIG_RESULT=0
323 if [ $VERBOSE -eq -1 ]; then 324 if [ $VERBOSE -eq -1 ]; then
diff --git a/tools/testing/selftests/ftrace/test.d/selftest/bashisms.tc b/tools/testing/selftests/ftrace/test.d/selftest/bashisms.tc
new file mode 100644
index 000000000000..1b081e910e14
--- /dev/null
+++ b/tools/testing/selftests/ftrace/test.d/selftest/bashisms.tc
@@ -0,0 +1,21 @@
1#!/bin/sh
2# SPDX-License-Identifier: GPL-2.0
3# description: Meta-selftest: Checkbashisms
4
5if [ ! -f $FTRACETEST_ROOT/ftracetest ]; then
6 echo "Hmm, we can not find ftracetest"
7 exit_unresolved
8fi
9
10if ! which checkbashisms > /dev/null 2>&1 ; then
11 echo "No checkbashisms found. skipped."
12 exit_unresolved
13fi
14
15checkbashisms $FTRACETEST_ROOT/ftracetest
16checkbashisms $FTRACETEST_ROOT/test.d/functions
17for t in $(find $FTRACETEST_ROOT/test.d -name \*.tc); do
18 checkbashisms $t
19done
20
21exit 0