diff mbox series

[SRU,J] UBUNTU: SAUCE: Fix ftrace/Meta-selftests bashism check

Message ID 20230228093146.20343-1-stefan.bader@canonical.com
State New
Headers show
Series [SRU,J] UBUNTU: SAUCE: Fix ftrace/Meta-selftests bashism check | expand

Commit Message

Stefan Bader Feb. 28, 2023, 9:31 a.m. UTC
BugLink: https://bugs.launchpad.net/bugs/2006453

Upstream commit a1d6cd88c897 "selftests/ftrace: event_triggers: wait longer for
test_event_enable" introduces a test which is considered a bashism and
as a result causes the Meta-selftests subtest to fail.  Fix up the "=="
to be "=" in order to avoid this.

Fixes: a1d6cd88c897 "selftests/ftrace: event_triggers: wait longer for test_event_enable"
Signed-off-by: Stefan Bader <stefan.bader@canonical.com>
---

The same upstream stable fix now also causes the bashism check in Jammy
to fail (was Focal before).

-Stefan

 .../selftests/ftrace/test.d/ftrace/func_event_triggers.tc       | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Roxana Nicolescu Feb. 28, 2023, 10:17 a.m. UTC | #1
On 28-02-2023 10:31, Stefan Bader wrote:
> BugLink: https://bugs.launchpad.net/bugs/2006453
>
> Upstream commit a1d6cd88c897 "selftests/ftrace: event_triggers: wait longer for
> test_event_enable" introduces a test which is considered a bashism and
> as a result causes the Meta-selftests subtest to fail.  Fix up the "=="
> to be "=" in order to avoid this.
>
> Fixes: a1d6cd88c897 "selftests/ftrace: event_triggers: wait longer for test_event_enable"
> Signed-off-by: Stefan Bader <stefan.bader@canonical.com>
> ---
>
> The same upstream stable fix now also causes the bashism check in Jammy
> to fail (was Focal before).
>
> -Stefan
>
>   .../selftests/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 27a68bbe778b..d9b812795077 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

Small question: Did we push the fix in upstream as well?

Acked-by: Roxana Nicolescu <roxana.nicolescu@canonical.com>
Masahiro Yamada Feb. 28, 2023, 12:37 p.m. UTC | #2
On Tue, Feb 28, 2023 at 7:18 PM Roxana Nicolescu
<roxana.nicolescu@canonical.com> wrote:
>
>
> On 28-02-2023 10:31, Stefan Bader wrote:
> > BugLink: https://bugs.launchpad.net/bugs/2006453
> >
> > Upstream commit a1d6cd88c897 "selftests/ftrace: event_triggers: wait longer for
> > test_event_enable" introduces a test which is considered a bashism and
> > as a result causes the Meta-selftests subtest to fail.  Fix up the "=="
> > to be "=" in order to avoid this.
> >
> > Fixes: a1d6cd88c897 "selftests/ftrace: event_triggers: wait longer for test_event_enable"
> > Signed-off-by: Stefan Bader <stefan.bader@canonical.com>
> > ---
> >
> > The same upstream stable fix now also causes the bashism check in Jammy
> > to fail (was Focal before).
> >
> > -Stefan
> >
> >   .../selftests/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 27a68bbe778b..d9b812795077 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
>
> Small question: Did we push the fix in upstream as well?


The upstream was already fixed in the same way.


Dropping "UBUNTU: SAUCE:" and having the following tag
would be better.


commit 1e6b485c922fbedf41d5a9f4e6449c5aeb923a32 upstream.











>
> Acked-by: Roxana Nicolescu <roxana.nicolescu@canonical.com>
>
> --
> kernel-team mailing list
> kernel-team@lists.ubuntu.com
> https://lists.ubuntu.com/mailman/listinfo/kernel-team
Tim Gardner Feb. 28, 2023, 1:40 p.m. UTC | #3
On 2/28/23 2:31 AM, Stefan Bader wrote:
> BugLink: https://bugs.launchpad.net/bugs/2006453
> 
> Upstream commit a1d6cd88c897 "selftests/ftrace: event_triggers: wait longer for
> test_event_enable" introduces a test which is considered a bashism and
> as a result causes the Meta-selftests subtest to fail.  Fix up the "=="
> to be "=" in order to avoid this.
> 
> Fixes: a1d6cd88c897 "selftests/ftrace: event_triggers: wait longer for test_event_enable"
> Signed-off-by: Stefan Bader <stefan.bader@canonical.com>
> ---
> 
> The same upstream stable fix now also causes the bashism check in Jammy
> to fail (was Focal before).
> 
> -Stefan
> 
>   .../selftests/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 27a68bbe778b..d9b812795077 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
Acked-by: Tim Gardner <tim.gardner@canonical.com>
Stefan Bader March 1, 2023, 9:07 a.m. UTC | #4
On 28.02.23 13:37, Masahiro Yamada wrote:
> On Tue, Feb 28, 2023 at 7:18 PM Roxana Nicolescu
> <roxana.nicolescu@canonical.com> wrote:
>>
>>
>> On 28-02-2023 10:31, Stefan Bader wrote:
>>> BugLink: https://bugs.launchpad.net/bugs/2006453
>>>
>>> Upstream commit a1d6cd88c897 "selftests/ftrace: event_triggers: wait longer for
>>> test_event_enable" introduces a test which is considered a bashism and
>>> as a result causes the Meta-selftests subtest to fail.  Fix up the "=="
>>> to be "=" in order to avoid this.
>>>
>>> Fixes: a1d6cd88c897 "selftests/ftrace: event_triggers: wait longer for test_event_enable"
>>> Signed-off-by: Stefan Bader <stefan.bader@canonical.com>
>>> ---
>>>
>>> The same upstream stable fix now also causes the bashism check in Jammy
>>> to fail (was Focal before).
>>>
>>> -Stefan
>>>
>>>    .../selftests/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 27a68bbe778b..d9b812795077 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
>>
>> Small question: Did we push the fix in upstream as well?
> 
> 
> The upstream was already fixed in the same way.
> 
> 
> Dropping "UBUNTU: SAUCE:" and having the following tag
> would be better.
> 
> 
> commit 1e6b485c922fbedf41d5a9f4e6449c5aeb923a32 upstream.

Agreed, thanks for the pointer. I would then apply a pick from upstream 
with the acks gathered.

-Stefan
Stefan Bader March 1, 2023, 10:19 a.m. UTC | #5
On 28.02.23 10:31, Stefan Bader wrote:
> BugLink: https://bugs.launchpad.net/bugs/2006453
> 
> Upstream commit a1d6cd88c897 "selftests/ftrace: event_triggers: wait longer for
> test_event_enable" introduces a test which is considered a bashism and
> as a result causes the Meta-selftests subtest to fail.  Fix up the "=="
> to be "=" in order to avoid this.
> 
> Fixes: a1d6cd88c897 "selftests/ftrace: event_triggers: wait longer for test_event_enable"
> Signed-off-by: Stefan Bader <stefan.bader@canonical.com>
> ---

Applied the upstream cherry pick to jammy:linux/master-next. Thanks.

-Stefan

Commit: 1e6b485c922fbedf41d5a9f4e6449c5aeb923a32
Author: Masami Hiramatsu (Google) <mhiramat@kernel.org>
Date: Sun Jan 22 08:32:50 2023 +0900

     selftests/ftrace: Fix bash specific "==" operator

>
> The same upstream stable fix now also causes the bashism check in Jammy
> to fail (was Focal before).
> 
> -Stefan
> 
>   .../selftests/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 27a68bbe778b..d9b812795077 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
diff mbox series

Patch

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 27a68bbe778b..d9b812795077 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