[PATCH 06/22] tools/perf/tests: fix test_arm_spe_fork.sh signal case issues

Athira Rajeev atrajeev at linux.vnet.ibm.com
Wed Jun 21 18:30:05 AEST 2023


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

   In tests/shell/test_arm_spe_fork.sh line 25:
   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>
---
 tools/perf/tests/shell/test_arm_spe_fork.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/perf/tests/shell/test_arm_spe_fork.sh b/tools/perf/tests/shell/test_arm_spe_fork.sh
index fad361675a1d..1a7e6a82d0e3 100755
--- a/tools/perf/tests/shell/test_arm_spe_fork.sh
+++ b/tools/perf/tests/shell/test_arm_spe_fork.sh
@@ -22,7 +22,7 @@ cleanup_files()
 	rm -f ${PERF_DATA}
 }
 
-trap cleanup_files exit term int
+trap cleanup_files EXIT TERM INT
 
 echo "Recording workload..."
 perf record -o ${PERF_DATA} -e arm_spe/period=65536/ -vvv -- $TEST_PROGRAM > ${PERF_RECORD_LOG} 2>&1 &
-- 
2.39.1



More information about the Linuxppc-dev mailing list