* [PATCH v9 3/6] selftests/ftrace: Fix requirement check of README file
[not found] <20210820204644.546662591@goodmis.org>
@ 2021-08-20 20:46 ` Steven Rostedt
2021-08-21 1:43 ` Masami Hiramatsu
0 siblings, 1 reply; 2+ messages in thread
From: Steven Rostedt @ 2021-08-20 20:46 UTC (permalink / raw)
To: linux-kernel, linux-trace-devel
Cc: Ingo Molnar, Andrew Morton, Masami Hiramatsu, Tzvetomir Stoyanov,
Tom Zanussi, Shuah Khan, Shuah Khan, linux-kselftest, stable
From: "Steven Rostedt (VMware)" <rostedt@goodmis.org>
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.
Cc: Shuah Khan <shuah@kernel.org>
Cc: Shuah Khan <skhan@linuxfoundation.org>
Cc: linux-kselftest@vger.kernel.org
Cc: stable@vger.kernel.org
Fixes: 1b8eec510ba64 ("selftests/ftrace: Support ":README" suffix for requires")
Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
---
tools/testing/selftests/ftrace/test.d/functions | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
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
--
2.30.2
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH v9 3/6] selftests/ftrace: Fix requirement check of README file
2021-08-20 20:46 ` [PATCH v9 3/6] selftests/ftrace: Fix requirement check of README file Steven Rostedt
@ 2021-08-21 1:43 ` Masami Hiramatsu
0 siblings, 0 replies; 2+ messages in thread
From: Masami Hiramatsu @ 2021-08-21 1:43 UTC (permalink / raw)
To: Steven Rostedt
Cc: linux-kernel, linux-trace-devel, Ingo Molnar, Andrew Morton,
Masami Hiramatsu, Tzvetomir Stoyanov, Tom Zanussi, Shuah Khan,
Shuah Khan, linux-kselftest, stable
On Fri, 20 Aug 2021 16:46:47 -0400
Steven Rostedt <rostedt@goodmis.org> wrote:
> From: "Steven Rostedt (VMware)" <rostedt@goodmis.org>
>
> 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.
Oops, good catch!
Acked-by: Masami Hiramatsu <mhiramat@kernel.org>
Thank you!
>
> Cc: Shuah Khan <shuah@kernel.org>
> Cc: Shuah Khan <skhan@linuxfoundation.org>
> Cc: linux-kselftest@vger.kernel.org
> Cc: stable@vger.kernel.org
> Fixes: 1b8eec510ba64 ("selftests/ftrace: Support ":README" suffix for requires")
> Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
> ---
> tools/testing/selftests/ftrace/test.d/functions | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> 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
> --
> 2.30.2
--
Masami Hiramatsu <mhiramat@kernel.org>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-08-21 1:43 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <20210820204644.546662591@goodmis.org>
2021-08-20 20:46 ` [PATCH v9 3/6] selftests/ftrace: Fix requirement check of README file Steven Rostedt
2021-08-21 1:43 ` Masami Hiramatsu
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox