diff options
author | Steven Rostedt (VMware) <[email protected]> | 2021-08-20 16:46:47 -0400 |
---|---|---|
committer | Steven Rostedt (VMware) <[email protected]> | 2021-08-21 10:25:00 -0400 |
commit | 210f9df02611cbe641ced3239122b270fd907d86 (patch) | |
tree | 0926bf863610cb44c823ecf548bc83ff13ed75a5 | |
parent | aaac2820a36707a8f44adbd2774c623b4e21031c (diff) |
selftests/ftrace: Fix requirement check of README file
The selftest for ftrace checks some features by checking if the README has
text that states the feature is supported by that kernel. Unfortunately,
this check gives false positives because it many not be checked if there's
spaces in the string to check. This is due to the compare between the
required variable with the ":README" string stripped, because neither has
quotes around them.
Link: https://lkml.kernel.org/r/[email protected]
Cc: "Tzvetomir Stoyanov" <[email protected]>
Cc: Tom Zanussi <[email protected]>
Cc: Shuah Khan <[email protected]>
Cc: Shuah Khan <[email protected]>
Cc: [email protected]
Cc: [email protected]
Fixes: 1b8eec510ba64 ("selftests/ftrace: Support ":README" suffix for requires")
Acked-by: Masami Hiramatsu <[email protected]>
Signed-off-by: Steven Rostedt (VMware) <[email protected]>
-rw-r--r-- | tools/testing/selftests/ftrace/test.d/functions | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/testing/selftests/ftrace/test.d/functions b/tools/testing/selftests/ftrace/test.d/functions index f68d336b961b..000fd05e84b1 100644 --- a/tools/testing/selftests/ftrace/test.d/functions +++ b/tools/testing/selftests/ftrace/test.d/functions @@ -137,7 +137,7 @@ check_requires() { # Check required files and tracers echo "Required tracer $t is not configured." exit_unsupported fi - elif [ $r != $i ]; then + elif [ "$r" != "$i" ]; then if ! grep -Fq "$r" README ; then echo "Required feature pattern \"$r\" is not in README." exit_unsupported |