Patch "selftests/ftrace: Fix bash specific "==" operator" has been added to the 5.15-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

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

to the 5.15-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     selftests-ftrace-fix-bash-specific-operator.patch
and it can be found in the queue-5.15 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit 5d4f2b25ab40acae70e1c92d3fd5c2c4cdd125a6
Author: Masami Hiramatsu (Google) <mhiramat@xxxxxxxxxx>
Date:   Sun Jan 22 08:32:50 2023 +0900

    selftests/ftrace: Fix bash specific "==" operator
    
    [ Upstream commit 1e6b485c922fbedf41d5a9f4e6449c5aeb923a32 ]
    
    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@xxxxxxxxxx>
    Reviewed-by: Steven Rostedt (Google) <rostedt@xxxxxxxxxxx>
    Signed-off-by: Shuah Khan <skhan@xxxxxxxxxxxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

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 27a68bbe778be..d9b8127950771 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



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux