Skip to content

Commit 33fe7c0

Browse files
James-A-Clarknamhyung
authored andcommitted
perf tests: Fix test_arm_callgraph_fp variable expansion
$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: 1bb17b4 ("perf tests arm_callgraph_fp: Address shellcheck warnings about signal names and adding double quotes for expression") Signed-off-by: James Clark <[email protected]> Acked-by: Namhyung Kim <[email protected]> Cc: Mark Rutland <[email protected]> Cc: Ian Rogers <[email protected]> Cc: [email protected] Cc: Peter Zijlstra <[email protected]> Cc: Adrian Hunter <[email protected]> Cc: Arnaldo Carvalho de Melo <[email protected]> Cc: Jiri Olsa <[email protected]> Cc: Kajol Jain <[email protected]> Cc: Alexander Shishkin <[email protected]> Cc: Athira Rajeev <[email protected]> Cc: Ingo Molnar <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Namhyung Kim <[email protected]>
1 parent 765be32 commit 33fe7c0

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

tools/perf/tests/shell/test_arm_callgraph_fp.sh

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,8 @@ cleanup_files()
1515
trap cleanup_files EXIT TERM INT
1616

1717
# Add a 1 second delay to skip samples that are not in the leaf() function
18-
perf record -o "$PERF_DATA" --call-graph fp -e cycles//u -D 1000 --user-callchains -- "$TEST_PROGRAM" 2> /dev/null &
18+
# shellcheck disable=SC2086
19+
perf record -o "$PERF_DATA" --call-graph fp -e cycles//u -D 1000 --user-callchains -- $TEST_PROGRAM 2> /dev/null &
1920
PID=$!
2021

2122
echo " + Recording (PID=$PID)..."
@@ -33,8 +34,8 @@ wait $PID
3334
# 76c leafloop
3435
# ...
3536

36-
perf script -i $PERF_DATA -F comm,ip,sym | head -n4
37-
perf script -i $PERF_DATA -F comm,ip,sym | head -n4 | \
37+
perf script -i "$PERF_DATA" -F comm,ip,sym | head -n4
38+
perf script -i "$PERF_DATA" -F comm,ip,sym | head -n4 | \
3839
awk '{ if ($2 != "") sym[i++] = $2 } END { if (sym[0] != "leaf" ||
3940
sym[1] != "parent" ||
4041
sym[2] != "leafloop") exit 1 }'

0 commit comments

Comments
 (0)