mirror of
https://github.com/torvalds/linux.git
synced 2026-11-30 02:23:05 +00:00
perf tests arm_callgraph_fp: Address shellcheck warnings about signal names and adding double quotes for expression
Running shellcheck -S on test_arm_calligraph_fp throws warnings SC2086 and SC3049,
$shellcheck -S warning tests/shell/test_arm_callgraph_fp.sh
rm -f $PERF_DATA
: Double quote to prevent globbing and word splitting.
trap cleanup_files exit term int
: In POSIX sh, using lower/mixed case for signal names is undefined.
After fixing the warnings,
$shellcheck tests/shell/test_arm_callgraph_fp.sh
$ echo $?
0
To address the POSIX shell warnings added changes to convert Lowercase
signal names to uppercase in the script and double quoted the
command substitutions($fix to "$fix") to solve Globbing warnings.
Signed-off-by: Spoorthy S<[email protected]>
Cc: Disha Goel <[email protected]>
Cc: Ian Rogers <[email protected]>
Cc: Jiri Olsa <[email protected]>
Cc: John Garry <[email protected]>
Cc: Madhavan Srinivasan <[email protected]>
Cc: Namhyung Kim <[email protected]>
Cc: Ravi Bangoria <[email protected]>
Cc: [email protected]
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Athira Rajeev <[email protected]>
Signed-off-by: Kajol Jain <[email protected]>
Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
This commit is contained in:
committed by
Arnaldo Carvalho de Melo
parent
b3839ff1f4
commit
1bb17b4c6c
@@ -9,13 +9,13 @@ TEST_PROGRAM="perf test -w leafloop"
|
||||
|
||||
cleanup_files()
|
||||
{
|
||||
rm -f $PERF_DATA
|
||||
rm -f "$PERF_DATA"
|
||||
}
|
||||
|
||||
trap cleanup_files exit term int
|
||||
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 &
|
||||
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)..."
|
||||
|
||||
Reference in New Issue
Block a user