perf test: test_intel_pt.sh: Stop using expr
authorAdrian Hunter <adrian.hunter@intel.com>
Mon, 12 Sep 2022 08:34:05 +0000 (11:34 +0300)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Tue, 4 Oct 2022 11:55:23 +0000 (08:55 -0300)
As suggested by shellcheck, stop using expr.

Signed-off-by: Adrian Hunter <adrian.hunter@intel.com>
Acked-by: Namhyung Kim <namhyung@kernel.org>
Cc: Ian Rogers <irogers@google.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Link: https://lore.kernel.org/r/20220912083412.7058-5-adrian.hunter@intel.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/perf/tests/shell/test_intel_pt.sh

index 6e40ee7..2be8cb0 100755 (executable)
@@ -64,14 +64,14 @@ test_system_wide_side_band()
 count_result()
 {
        if [ $1 -eq 2 ] ; then
-               skip_cnt=`expr ${skip_cnt} \+ 1`
+               skip_cnt=$((skip_cnt + 1))
                return
        fi
        if [ $1 -eq 0 ] ; then
-               ok_cnt=`expr ${ok_cnt} \+ 1`
+               ok_cnt=$((ok_cnt + 1))
                return
        fi
-       err_cnt=`expr ${err_cnt} \+ 1`
+       err_cnt=$((err_cnt + 1))
 }
 
 test_system_wide_side_band