Commit 35578a55 authored by Athira Rajeev's avatar Athira Rajeev Committed by Arnaldo Carvalho de Melo
Browse files

perf tests stat+std_output: Fix shellcheck warnings about word...


perf tests stat+std_output: Fix shellcheck warnings about word splitting/quoting and local variables

Running shellcheck on stat_std_output testcase throws
below warning:

   In tests/shell/stat+std_output.sh line 9:
   . $(dirname $0)/lib/stat_output.sh
     ^-----------^ SC2046 (warning): Quote this to prevent word splitting.

   In tests/shell/stat+std_output.sh line 32:
   	   local -i cnt=0
                    ^-^ SC2034 (warning): cnt appears unused. Verify use (or export if used externally).

Fixed the warning by adding quotes to avoid word splitting
and removed unused variable "cnt" at line 32.

Signed-off-by: default avatarAthira Rajeev <atrajeev@linux.vnet.ibm.com>
Acked-by: default avatarIan Rogers <irogers@google.com>
Cc: Disha Goel <disgoel@linux.vnet.ibm.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Kajol Jain <kjain@linux.ibm.com>
Cc: Madhavan Srinivasan <maddy@linux.ibm.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: linuxppc-dev@lists.ozlabs.org
Link: https://lore.kernel.org/r/20230709182800.53002-27-atrajeev@linux.vnet.ibm.com


Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
parent 8439b44a
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -6,7 +6,7 @@

set -e

. $(dirname $0)/lib/stat_output.sh
. "$(dirname $0)"/lib/stat_output.sh

stat_output=$(mktemp /tmp/__perf_test.stat_output.std.XXXXX)

@@ -28,7 +28,6 @@ trap trap_cleanup EXIT TERM INT

function commachecker()
{
	local -i cnt=0
	local prefix=1

	case "$1"