[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAM9d7ch3sN3gubQjdqUj=SQ7MQ4aCGs7YqpKyeyE3j=G0jzVJg@mail.gmail.com>
Date: Thu, 22 Jun 2023 22:00:21 -0700
From: Namhyung Kim <namhyung@...nel.org>
To: James Clark <james.clark@....com>
Cc: linux-perf-users@...r.kernel.org, spoorts2@...ibm.com,
Peter Zijlstra <peterz@...radead.org>,
Ingo Molnar <mingo@...hat.com>,
Arnaldo Carvalho de Melo <acme@...nel.org>,
Mark Rutland <mark.rutland@....com>,
Alexander Shishkin <alexander.shishkin@...ux.intel.com>,
Jiri Olsa <jolsa@...nel.org>, Ian Rogers <irogers@...gle.com>,
Adrian Hunter <adrian.hunter@...el.com>,
Athira Rajeev <atrajeev@...ux.vnet.ibm.com>,
Kajol Jain <kjain@...ux.ibm.com>, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] perf tests: Fix test_arm_callgraph_fp variable expansion
Hi James,
On Thu, Jun 22, 2023 at 3:18 AM James Clark <james.clark@....com> wrote:
>
> $TEST_PROGRAM is a command with spaces so it's supposed to be word
> split. The referenced fix to fix the shellcheck warnings incorrectly
> quoted this string so unquote it to fix the test.
>
> At the same time silence the shellcheck warning for that line and fix
> two more shellcheck errors at the end of the script.
>
> Fixes: 1bb17b4c6c91 ("perf tests arm_callgraph_fp: Address shellcheck warnings about signal names and adding double quotes for expression")
> Signed-off-by: James Clark <james.clark@....com>
Acked-by: Namhyung Kim <namhyung@...nel.org>
Thanks,
Namhyung
> ---
> tools/perf/tests/shell/test_arm_callgraph_fp.sh | 7 ++++---
> 1 file changed, 4 insertions(+), 3 deletions(-)
>
> diff --git a/tools/perf/tests/shell/test_arm_callgraph_fp.sh b/tools/perf/tests/shell/test_arm_callgraph_fp.sh
> index 1380e0d12dce..66dfdfdad553 100755
> --- a/tools/perf/tests/shell/test_arm_callgraph_fp.sh
> +++ b/tools/perf/tests/shell/test_arm_callgraph_fp.sh
> @@ -15,7 +15,8 @@ cleanup_files()
> trap cleanup_files EXIT TERM INT
>
> # Add a 1 second delay to skip samples that are not in the leaf() function
> -perf record -o "$PERF_DATA" --call-graph fp -e cycles//u -D 1000 --user-callchains -- "$TEST_PROGRAM" 2> /dev/null &
> +# shellcheck disable=SC2086
> +perf record -o "$PERF_DATA" --call-graph fp -e cycles//u -D 1000 --user-callchains -- $TEST_PROGRAM 2> /dev/null &
> PID=$!
>
> echo " + Recording (PID=$PID)..."
> @@ -33,8 +34,8 @@ wait $PID
> # 76c leafloop
> # ...
>
> -perf script -i $PERF_DATA -F comm,ip,sym | head -n4
> -perf script -i $PERF_DATA -F comm,ip,sym | head -n4 | \
> +perf script -i "$PERF_DATA" -F comm,ip,sym | head -n4
> +perf script -i "$PERF_DATA" -F comm,ip,sym | head -n4 | \
> awk '{ if ($2 != "") sym[i++] = $2 } END { if (sym[0] != "leaf" ||
> sym[1] != "parent" ||
> sym[2] != "leafloop") exit 1 }'
> --
> 2.34.1
>
Powered by blists - more mailing lists