[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20230124191637.0b2b8785@gandalf.local.home>
Date: Tue, 24 Jan 2023 19:16:37 -0500
From: Steven Rostedt <rostedt@...dmis.org>
To: "Masami Hiramatsu (Google)" <mhiramat@...nel.org>
Cc: Shuah Khan <shuah@...nel.org>, Yipeng Zou <zouyipeng@...wei.com>,
linux-kernel@...r.kernel.org, linux-trace-kernel@...r.kernel.org,
linux-kselftest@...r.kernel.org,
Shuah Khan <skhan@...uxfoundation.org>
Subject: Re: [PATCH] selftests/ftrace: Fix bash specific "==" operator
On Sun, 22 Jan 2023 08:32:50 +0900
"Masami Hiramatsu (Google)" <mhiramat@...nel.org> wrote:
> From: Masami Hiramatsu (Google) <mhiramat@...nel.org>
>
> Since commit a1d6cd88c897 ("selftests/ftrace: event_triggers: wait
> longer for test_event_enable") introduced bash specific "=="
> comparation operator, that test will fail when we run it on a
> posix-shell. `checkbashisms` warned it as below.
>
> possible bashism in ftrace/func_event_triggers.tc line 45 (should be 'b = a'):
> if [ "$e" == $val ]; then
>
> This replaces it with "=".
>
> Fixes: a1d6cd88c897 ("selftests/ftrace: event_triggers: wait longer for test_event_enable")
> Signed-off-by: Masami Hiramatsu (Google) <mhiramat@...nel.org>
Reviewed-by: Steven Rostedt (Google) <rostedt@...dmis.org>
Shuah,
Care to pull this through your tree?
-- Steve
> ---
> .../ftrace/test.d/ftrace/func_event_triggers.tc | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/tools/testing/selftests/ftrace/test.d/ftrace/func_event_triggers.tc b/tools/testing/selftests/ftrace/test.d/ftrace/func_event_triggers.tc
> index 3eea2abf68f9..2ad7d4b501cc 100644
> --- a/tools/testing/selftests/ftrace/test.d/ftrace/func_event_triggers.tc
> +++ b/tools/testing/selftests/ftrace/test.d/ftrace/func_event_triggers.tc
> @@ -42,7 +42,7 @@ test_event_enabled() {
>
> while [ $check_times -ne 0 ]; do
> e=`cat $EVENT_ENABLE`
> - if [ "$e" == $val ]; then
> + if [ "$e" = $val ]; then
> return 0
> fi
> sleep $SLEEP_TIME
Powered by blists - more mailing lists