[PATCH 10/17] tools/perf/tests: fix test_arm_spe.sh signal case issues

Athira Rajeev atrajeev at linux.vnet.ibm.com
Wed Jun 14 02:41:38 AEST 2023


From: Abhirup Deb <abhirupdeb at 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 <atrajeev at linux.vnet.ibm.com>
Signed-off-by: Kajol Jain <kjain at linux.ibm.com>
Signed-off-by: Abhirup Deb <abhirupdeb at linux.vnet.ibm.com>
Signed-off-by: Ojaswin Mujoo <ojaswin.mujoo at ibm.com>
Signed-off-by: Piyush Sachdeva <Piyush.Sachdeva at ibm.com>
Signed-off-by: Mukesh Chaurasiya <mukesh.chaurasiya at 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



More information about the Linuxppc-dev mailing list