Subject: [PATCH 6.4 472/800] perf tests task_analyzer: Fix bad substitution ${$1}

From: Greg Kroah-Hartman <[email-masked]>
Date: Sun, 16 Jul 2023 21:45:25 +0200

From: Aditya Gupta <[email-masked]>

[ Upstream commit 5c4396efb53ef07d046a2e9456b240880e0c3076 ]

${$1} gives bad substitution error on sh, bash, and zsh. This seems like
a typo, and this patch modifies it to $1, since that is what it's usage
looks like from wherever `check_exec_0` is called.

This issue due to ${$1} caused all function calls to give error in
`find_str_or_fail` line, and so no test runs completely. But
'perf test "perf script task-analyzer tests"' wrongly reports
that tests passed with the status OK, which is wrong considering
the tests didn't even run completely

Fixes: e8478b84d6ba9ccf ("perf test: add new task-analyzer tests")
Signed-off-by: Aditya Gupta <[email-masked]>
Signed-off-by: Athira Rajeev <[email-masked]>
Signed-off-by: Kajol Jain <[email-masked]>
Cc: Disha Goel <[email-masked]>
Cc: Hagen Paul Pfeifer <[email-masked]>
Cc: Ian Rogers <[email-masked]>
Cc: Jiri Olsa <[email-masked]>
Cc: John Garry <[email-masked]>
Cc: Madhavan Srinivasan <[email-masked]>
Cc: Namhyung Kim <[email-masked]>
Cc: Petar Gligoric <[email-masked]>
Cc: Ravi Bangoria <[email-masked]>
Cc: [email-masked]
Link: https://lore.kernel.org/r/[email-masked]
Signed-off-by: Arnaldo Carvalho de Melo <[email-masked]>
Signed-off-by: Sasha Levin <[email-masked]>
---
 tools/perf/tests/shell/test_task_analyzer.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/perf/tests/shell/test_task_analyzer.sh b/tools/perf/tests/shell/test_task_analyzer.sh
index a98e4ab66040e..6b3343234a6b2 100755
--- a/tools/perf/tests/shell/test_task_analyzer.sh
+++ b/tools/perf/tests/shell/test_task_analyzer.sh
@@ -31,7 +31,7 @@ report() {
 
 check_exec_0() {
 	if [ $? != 0 ]; then
-		report 1 "invokation of ${$1} command failed"
+		report 1 "invocation of $1 command failed"
 	fi
 }
 
-- 
2.39.2