selftests/ftrace: Fix checkbashisms errors
authorMasami Hiramatsu (Google) <mhiramat@kernel.org>
Sat, 4 May 2024 00:33:19 +0000 (09:33 +0900)
committerShuah Khan <skhan@linuxfoundation.org>
Wed, 8 May 2024 22:49:20 +0000 (16:49 -0600)
Fix the below checkbashisms errors. Because of these errors, these tests
will fail on dash shell.

possible bashism in test.d/kprobe/kretprobe_entry_arg.tc line 14 ('function' is useless):
function streq() {
possible bashism in test.d/dynevent/fprobe_entry_arg.tc line 14 ('function' is useless):
function streq() {

Fixes: f6e2253a617c ("selftests/ftrace: Add test cases for entry args at function exit")
Cc: stable@vger.kernel.org
Signed-off-by: Masami Hiramatsu (Google) <mhiramat@kernel.org>
Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
tools/testing/selftests/ftrace/test.d/dynevent/fprobe_entry_arg.tc
tools/testing/selftests/ftrace/test.d/kprobe/kretprobe_entry_arg.tc

index d183b8a8ecf82c3911f3f13aec04656ac57a71ec..1e251ce2998ea6d294c46d670084bbae02620898 100644 (file)
@@ -11,7 +11,7 @@ echo 1 > events/tests/enable
 echo > trace
 cat trace > /dev/null
 
-function streq() {
+streq() {
        test $1 = $2
 }
 
index 53b82f36a1d012bee2090938e9ea31805af2c3e2..e50470b531648ddb31328034619d0aac6d288d22 100644 (file)
@@ -11,7 +11,7 @@ echo 1 > events/kprobes/enable
 echo > trace
 cat trace > /dev/null
 
-function streq() {
+streq() {
        test $1 = $2
 }