[PATCH V2 23/26] tools/shell/coresight: Fix shellcheck warning for thread_loop_check_tid_2.sh shell script

Athira Rajeev atrajeev at linux.vnet.ibm.com
Mon Jul 10 04:27:57 AEST 2023


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

Running shellcheck on thread_loop_check_tid_2.sh throws below warning:

In tests/shell/coresight/thread_loop_check_tid_2.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.

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

diff --git a/tools/perf/tests/shell/coresight/thread_loop_check_tid_2.sh b/tools/perf/tests/shell/coresight/thread_loop_check_tid_2.sh
index a067145af43c..6346fd5e87c8 100755
--- a/tools/perf/tests/shell/coresight/thread_loop_check_tid_2.sh
+++ b/tools/perf/tests/shell/coresight/thread_loop_check_tid_2.sh
@@ -5,7 +5,7 @@
 # Carsten Haitzler <carsten.haitzler at arm.com>, 2021
 
 TEST="thread_loop"
-. $(dirname $0)/../lib/coresight.sh
+. "$(dirname $0)"/../lib/coresight.sh
 ARGS="2 20"
 DATV="check-tid-2th"
 DATA="$DATD/perf-$TEST-$DATV.data"
-- 
2.39.1



More information about the Linuxppc-dev mailing list