linux-trace-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Steven Rostedt <rostedt@goodmis.org>
To: "Masami Hiramatsu (Google)" <mhiramat@kernel.org>
Cc: Shuah Khan <shuah@kernel.org>, Yipeng Zou <zouyipeng@huawei.com>,
	linux-kernel@vger.kernel.org, linux-trace-kernel@vger.kernel.org,
	linux-kselftest@vger.kernel.org,
	Shuah Khan <skhan@linuxfoundation.org>
Subject: Re: [PATCH] selftests/ftrace: Fix bash specific "==" operator
Date: Tue, 24 Jan 2023 19:16:37 -0500	[thread overview]
Message-ID: <20230124191637.0b2b8785@gandalf.local.home> (raw)
In-Reply-To: <167434397083.3069767.14730152459198287532.stgit@devnote3>

On Sun, 22 Jan 2023 08:32:50 +0900
"Masami Hiramatsu (Google)" <mhiramat@kernel.org> wrote:

> From: Masami Hiramatsu (Google) <mhiramat@kernel.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@kernel.org>

Reviewed-by: Steven Rostedt (Google) <rostedt@goodmis.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


  reply	other threads:[~2023-01-25  0:16 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-01-21 23:32 [PATCH] selftests/ftrace: Fix bash specific "==" operator Masami Hiramatsu (Google)
2023-01-25  0:16 ` Steven Rostedt [this message]
2023-02-03 16:56   ` Shuah Khan

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230124191637.0b2b8785@gandalf.local.home \
    --to=rostedt@goodmis.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-kselftest@vger.kernel.org \
    --cc=linux-trace-kernel@vger.kernel.org \
    --cc=mhiramat@kernel.org \
    --cc=shuah@kernel.org \
    --cc=skhan@linuxfoundation.org \
    --cc=zouyipeng@huawei.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).