[PATCH 11/22] tools/perf/tests: Fix shellcheck warning for asm_pure_loop.sh shell script

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


From: Kajol Jain <kjain at linux.ibm.com>

Running shellcheck on asm_pure_loop.sh throws below warning:

In coresight/asm_pure_loop.sh line 8:
. $(dirname $0)/../lib/coresight.sh
  ^-----------^ SC2046 (warning): Quote this to prevent word splitting.

Fixed the warning by adding quotes to avoid word splitting.

ShellCheck result with patch:
    # shellcheck -S warning coresight/asm_pure_loop.sh
    #

Signed-off-by: Athira Rajeev <atrajeev at linux.vnet.ibm.com>
Signed-off-by: Kajol Jain <kjain at linux.ibm.com>
---
 tools/perf/tests/shell/coresight/asm_pure_loop.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/perf/tests/shell/coresight/asm_pure_loop.sh b/tools/perf/tests/shell/coresight/asm_pure_loop.sh
index 569e9d46162b..779bc8608e1e 100755
--- a/tools/perf/tests/shell/coresight/asm_pure_loop.sh
+++ b/tools/perf/tests/shell/coresight/asm_pure_loop.sh
@@ -5,7 +5,7 @@
 # Carsten Haitzler <carsten.haitzler at arm.com>, 2021
 
 TEST="asm_pure_loop"
-. $(dirname $0)/../lib/coresight.sh
+. "$(dirname $0)"/../lib/coresight.sh
 ARGS=""
 DATV="out"
 DATA="$DATD/perf-$TEST-$DATV.data"
-- 
2.39.1



More information about the Linuxppc-dev mailing list