* [PATCH] perf tests: Fix coresight `perf test` failure.
@ 2022-04-28 15:19 Jeremy Linton
2022-04-28 16:14 ` James Clark
0 siblings, 1 reply; 3+ messages in thread
From: Jeremy Linton @ 2022-04-28 15:19 UTC (permalink / raw)
To: linux-perf-users
Cc: james.clark, peterz, mingo, acme, mark.rutland,
alexander.shishkin, jolsa, namhyung, irogers, leo.yan,
linux-kernel, Jeremy Linton
Currently the `perf test` always fails the coresight test like:
89: Check Arm CoreSight trace data recording and synthesized samples: FAILED!
That is because the test_arm_coresight.sh is attempting to SIGINT the
parent but is using $$ rather than $PPID and it sigint's itself when
run under the perf test framework. Since this is done in a trap clause
it ends up returning a non zero return. Since $PPID is a bash ism and
not all distros are linking /bin/sh to bash, the alternative
parent pid lookups are uglier than just dropping the kill, and its
not strictly needed, lets pick the simple solution and drop the sigint.
Fixes: 133fe2e617e4 ("perf tests: Improve temp file cleanup in test_arm_coresight.sh")
Cc: James Clark <james.clark@arm.com>
Signed-off-by: Jeremy Linton <jeremy.linton@arm.com>
---
tools/perf/tests/shell/test_arm_coresight.sh | 1 -
1 file changed, 1 deletion(-)
diff --git a/tools/perf/tests/shell/test_arm_coresight.sh b/tools/perf/tests/shell/test_arm_coresight.sh
index 6de53b7ef5ff..e4cb4f1806ff 100755
--- a/tools/perf/tests/shell/test_arm_coresight.sh
+++ b/tools/perf/tests/shell/test_arm_coresight.sh
@@ -29,7 +29,6 @@ cleanup_files()
rm -f ${file}
rm -f "${perfdata}.old"
trap - exit term int
- kill -2 $$
exit $glb_err
}
--
2.35.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] perf tests: Fix coresight `perf test` failure.
2022-04-28 15:19 [PATCH] perf tests: Fix coresight `perf test` failure Jeremy Linton
@ 2022-04-28 16:14 ` James Clark
2022-04-30 15:34 ` Arnaldo Carvalho de Melo
0 siblings, 1 reply; 3+ messages in thread
From: James Clark @ 2022-04-28 16:14 UTC (permalink / raw)
To: Jeremy Linton, linux-perf-users, acme
Cc: peterz, mingo, mark.rutland, alexander.shishkin, jolsa, namhyung,
irogers, leo.yan, linux-kernel, Leo Yan
On 28/04/2022 16:19, Jeremy Linton wrote:
> Currently the `perf test` always fails the coresight test like:
>
> 89: Check Arm CoreSight trace data recording and synthesized samples: FAILED!
>
> That is because the test_arm_coresight.sh is attempting to SIGINT the
> parent but is using $$ rather than $PPID and it sigint's itself when
> run under the perf test framework. Since this is done in a trap clause
> it ends up returning a non zero return. Since $PPID is a bash ism and
> not all distros are linking /bin/sh to bash, the alternative
> parent pid lookups are uglier than just dropping the kill, and its
> not strictly needed, lets pick the simple solution and drop the sigint.
>
> Fixes: 133fe2e617e4 ("perf tests: Improve temp file cleanup in test_arm_coresight.sh")
> Cc: James Clark <james.clark@arm.com>
> Signed-off-by: Jeremy Linton <jeremy.linton@arm.com>
> ---
> tools/perf/tests/shell/test_arm_coresight.sh | 1 -
> 1 file changed, 1 deletion(-)
>
> diff --git a/tools/perf/tests/shell/test_arm_coresight.sh b/tools/perf/tests/shell/test_arm_coresight.sh
> index 6de53b7ef5ff..e4cb4f1806ff 100755
> --- a/tools/perf/tests/shell/test_arm_coresight.sh
> +++ b/tools/perf/tests/shell/test_arm_coresight.sh
> @@ -29,7 +29,6 @@ cleanup_files()
> rm -f ${file}
> rm -f "${perfdata}.old"
> trap - exit term int
> - kill -2 $$
> exit $glb_err
> }
>
Reviewed-by: James Clark <james.clark@arm.com>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] perf tests: Fix coresight `perf test` failure.
2022-04-28 16:14 ` James Clark
@ 2022-04-30 15:34 ` Arnaldo Carvalho de Melo
0 siblings, 0 replies; 3+ messages in thread
From: Arnaldo Carvalho de Melo @ 2022-04-30 15:34 UTC (permalink / raw)
To: James Clark
Cc: Jeremy Linton, linux-perf-users, peterz, mingo, mark.rutland,
alexander.shishkin, jolsa, namhyung, irogers, leo.yan,
linux-kernel
Em Thu, Apr 28, 2022 at 05:14:09PM +0100, James Clark escreveu:
>
>
> On 28/04/2022 16:19, Jeremy Linton wrote:
> > Currently the `perf test` always fails the coresight test like:
> >
> > 89: Check Arm CoreSight trace data recording and synthesized samples: FAILED!
> >
> > That is because the test_arm_coresight.sh is attempting to SIGINT the
> > parent but is using $$ rather than $PPID and it sigint's itself when
> > run under the perf test framework. Since this is done in a trap clause
> > it ends up returning a non zero return. Since $PPID is a bash ism and
> > not all distros are linking /bin/sh to bash, the alternative
> > parent pid lookups are uglier than just dropping the kill, and its
> > not strictly needed, lets pick the simple solution and drop the sigint.
> >
> > Fixes: 133fe2e617e4 ("perf tests: Improve temp file cleanup in test_arm_coresight.sh")
> > Cc: James Clark <james.clark@arm.com>
> > Signed-off-by: Jeremy Linton <jeremy.linton@arm.com>
> > ---
> > tools/perf/tests/shell/test_arm_coresight.sh | 1 -
> > 1 file changed, 1 deletion(-)
> >
> > diff --git a/tools/perf/tests/shell/test_arm_coresight.sh b/tools/perf/tests/shell/test_arm_coresight.sh
> > index 6de53b7ef5ff..e4cb4f1806ff 100755
> > --- a/tools/perf/tests/shell/test_arm_coresight.sh
> > +++ b/tools/perf/tests/shell/test_arm_coresight.sh
> > @@ -29,7 +29,6 @@ cleanup_files()
> > rm -f ${file}
> > rm -f "${perfdata}.old"
> > trap - exit term int
> > - kill -2 $$
> > exit $glb_err
> > }
> >
>
> Reviewed-by: James Clark <james.clark@arm.com>
Thanks, applied.
- Arnaldo
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2022-04-30 15:34 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-04-28 15:19 [PATCH] perf tests: Fix coresight `perf test` failure Jeremy Linton
2022-04-28 16:14 ` James Clark
2022-04-30 15:34 ` Arnaldo Carvalho de Melo
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).