[PATCH V2 25/26] tools/perf/tests/shell: Fix shellcheck warning for stat+std_output.sh testcase

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


Running shellcheck on stat+csv_output.sh throws below
warning:

   In tests/shell/stat+csv_output.sh line 9:
   . $(dirname $0)/lib/stat_output.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>
---
 tools/perf/tests/shell/stat+csv_output.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/perf/tests/shell/stat+csv_output.sh b/tools/perf/tests/shell/stat+csv_output.sh
index 34a0701fee05..d890eb26e914 100755
--- a/tools/perf/tests/shell/stat+csv_output.sh
+++ b/tools/perf/tests/shell/stat+csv_output.sh
@@ -6,7 +6,7 @@
 
 set -e
 
-. $(dirname $0)/lib/stat_output.sh
+. "$(dirname $0)"/lib/stat_output.sh
 
 csv_sep=@
 
-- 
2.39.1



More information about the Linuxppc-dev mailing list