diff options
author | Masami Hiramatsu <mhiramat@kernel.org> | 2020-06-03 11:41:09 +0900 |
---|---|---|
committer | Shuah Khan <skhan@linuxfoundation.org> | 2020-06-16 10:42:47 -0600 |
commit | 1b8eec510ba641418573eacc98a7e9c07726af30 (patch) | |
tree | cddf870013d6620c166ae8bd913505bef81135bc /tools/testing/selftests/ftrace/test.d/functions | |
parent | selftests/ftrace: Support ":tracer" suffix for requires (diff) | |
download | wireguard-linux-1b8eec510ba641418573eacc98a7e9c07726af30.tar.xz wireguard-linux-1b8eec510ba641418573eacc98a7e9c07726af30.zip |
selftests/ftrace: Support ":README" suffix for requires
Add ":README" suffix support for the requires list, so that
the testcase can list up the required string for README file
to the requires list.
Note that the required string is treated as a fixed string,
instead of regular expression. Also, the testcase can specify
a string containing spaces with quotes. E.g.
# requires: "place: [<module>:]<symbol>":README
Signed-off-by: Masami Hiramatsu <mhiramat@kernel.org>
Reviewed-by: Tom Zanussi <zanussi@kernel.org>
Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
Diffstat (limited to 'tools/testing/selftests/ftrace/test.d/functions')
-rw-r--r-- | tools/testing/selftests/ftrace/test.d/functions | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/tools/testing/selftests/ftrace/test.d/functions b/tools/testing/selftests/ftrace/test.d/functions index 35de6bc9613b..c5dec55b7d95 100644 --- a/tools/testing/selftests/ftrace/test.d/functions +++ b/tools/testing/selftests/ftrace/test.d/functions @@ -107,13 +107,19 @@ initialize_ftrace() { # Reset ftrace to initial-state } check_requires() { # Check required files and tracers - for i in $* ; do + for i in "$@" ; do + r=${i%:README} 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 [ $r != $i ]; then + if ! grep -Fq "$r" README ; then + echo "Required feature pattern \"$r\" is not in README." + exit_unsupported + fi elif [ ! -e $i ]; then echo "Required feature interface $i doesn't exist." exit_unsupported |