perf tests stat+shadow_stat.sh: Fix all POSIX sh warnings found using shellcheck
authorSpoorthy S <spoorts2@in.ibm.com>
Tue, 13 Jun 2023 16:41:42 +0000 (22:11 +0530)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Wed, 14 Jun 2023 02:40:34 +0000 (23:40 -0300)
commitc4a1a7763da3a7345f338e3666e3f7749b96b734
tree669eda932c885159d17b94ccfef83a7ac08e517f
parent3b3bf0d112163524e61d1d6456c65e2157aade74
perf tests stat+shadow_stat.sh: Fix all POSIX sh warnings found using shellcheck

Running shellcheck -S on stat+shadow_stat.sh testcase, generates
SC2046 and SC2034 warnings,

$ shellcheck -S warning tests/shell/stat+shadow_stat.sh
res=`printf "%.2f" $(echo "scale=6; $num / $cyc" | bc -q)`
   : Quote this to prevent word splitting

To address the POSIX shell warnings used quotes in the printf
expressions, to prevent word splitting.

Signed-off-by: Spoorthy S <spoorts2@in.ibm.com>
Cc: Disha Goel <disgoel@linux.vnet.ibm.com>
Cc: Ian Rogers <irogers@google.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: John Garry <john.g.garry@oracle.com>
Cc: Madhavan Srinivasan <maddy@linux.ibm.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Ravi Bangoria <ravi.bangoria@amd.com>
Cc: linuxppc-dev@lists.ozlabs.org
Link: https://lore.kernel.org/r/20230613164145.50488-15-atrajeev@linux.vnet.ibm.com
Signed-off-by: Athira Rajeev <atrajeev@linux.vnet.ibm.com>
Signed-off-by: Kajol Jain <kjain@linux.ibm.com>
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/perf/tests/shell/stat+shadow_stat.sh