Thread (40 messages) 40 messages, 7 authors, 2023-07-13

Re: [PATCH 15/17] perf tests task_analyzer: fix bad substitution ${$1}

From: Namhyung Kim <namhyung@kernel.org>
Date: 2023-06-21 00:48:54
Also in: linux-perf-users

Hello,

On Tue, Jun 13, 2023 at 1:06 PM Arnaldo Carvalho de Melo
[off-list ref] wrote:
Em Tue, Jun 13, 2023 at 10:11:43PM +0530, Athira Rajeev escreveu:
quoted
From: Aditya Gupta <redacted>

${$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.
Nicely spotted!

Please add the people that last touched the problem to the cc list,
specially when it fixes a bug.

Thanks for adding a Fixes tag, that helps the stable@kernel.org guys to
get this propagated to supported kernel releases.

I've added the test author to the CC list in this message.

thanks!

- Arnaldo
quoted
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: e8478b84d6ba ("perf test: add new task-analyzer tests")
Signed-off-by: Athira Rajeev <redacted>
Signed-off-by: Kajol Jain <redacted>
Signed-off-by: Aditya Gupta <redacted>
---
I'm seeing a different error even after this fix.
Can you please take a look?

Thanks,
Namhyung


$ sudo ./perf test -v task
114: perf script task-analyzer tests                                 :
--- start ---
test child forked, pid 1771042
Please specify a valid report script(see 'perf script -l' for listing)
FAIL: "invocation of perf command failed" Error message: ""
FAIL: "test_basic" Error message: "Failed to find required string:'Comm'."
Please specify a valid report script(see 'perf script -l' for listing)
FAIL: "invocation of perf command failed" Error message: ""
FAIL: "test_ns_rename" Error message: "Failed to find required string:'Comm'."
...
test child finished with -1
---- end ----
perf script task-analyzer tests: FAILED!
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help