From: Abhirup Deb <abhirup...@linux.vnet.ibm.com>

Running shellcheck -S on test_arm_spe.sh throws below warnings:

 #shellcheck -S warning tests/shell/test_arm_spe.sh
In tests/shell/test_arm_spe.sh line 30:
trap cleanup_files exit term int
                   ^--^ SC3049 (warning): In POSIX sh, using lower/mixed case 
for signal names is undefined.
                        ^--^ SC3049 (warning): In POSIX sh, using lower/mixed 
case for signal names is undefined.
                             ^-^ SC3049 (warning): In POSIX sh, using 
lower/mixed case for signal names is undefined.

Fixed this issue by using uppercase for "EXIT", "TERM" and
"INIT" signals to avoid using lower/mixed case for signal
names as input.

Signed-off-by: Athira Rajeev <atraj...@linux.vnet.ibm.com>
Signed-off-by: Kajol Jain <kj...@linux.ibm.com>
Signed-off-by: Abhirup Deb <abhirup...@linux.vnet.ibm.com>
Signed-off-by: Ojaswin Mujoo <ojaswin.mu...@ibm.com>
Signed-off-by: Piyush Sachdeva <piyush.sachd...@ibm.com>
Signed-off-by: Mukesh Chaurasiya <mukesh.chauras...@ibm.com>
---
 tools/perf/tests/shell/test_arm_spe.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/perf/tests/shell/test_arm_spe.sh 
b/tools/perf/tests/shell/test_arm_spe.sh
index aa094d71f5b4..03d5c7d12ee5 100755
--- a/tools/perf/tests/shell/test_arm_spe.sh
+++ b/tools/perf/tests/shell/test_arm_spe.sh
@@ -27,7 +27,7 @@ cleanup_files()
        exit $glb_err
 }
 
-trap cleanup_files exit term int
+trap cleanup_files EXIT TERM INT
 
 arm_spe_report() {
        if [ $2 = 0 ]; then
-- 
2.39.1

Reply via email to