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

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


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

Running shellcheck on memcpy_thread_16k_10.sh throws below warning:

In memcpy_thread_16k_10.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/memcpy_thread_16k_10.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/memcpy_thread_16k_10.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/perf/tests/shell/coresight/memcpy_thread_16k_10.sh b/tools/perf/tests/shell/coresight/memcpy_thread_16k_10.sh
index d21ba8545938..08a44e52ce9b 100755
--- a/tools/perf/tests/shell/coresight/memcpy_thread_16k_10.sh
+++ b/tools/perf/tests/shell/coresight/memcpy_thread_16k_10.sh
@@ -5,7 +5,7 @@
 # Carsten Haitzler <carsten.haitzler at arm.com>, 2021
 
 TEST="memcpy_thread"
-. $(dirname $0)/../lib/coresight.sh
+. "$(dirname $0)"/../lib/coresight.sh
 ARGS="16 10 1"
 DATV="16k_10"
 DATA="$DATD/perf-$TEST-$DATV.data"
-- 
2.39.1



More information about the Linuxppc-dev mailing list