From: Namhyung Kim <namhyung@kernel.org>
To: Qiao Zhao <qzhao@redhat.com>
Cc: Veronika Molnarova <vmolnaro@redhat.com>,
irogers@google.com, linux-perf-users@vger.kernel.org,
acme@kernel.org, acme@redhat.com, mpetlan@redhat.com,
peterz@infradead.org, mingo@redhat.com, mark.rutland@arm.com,
alexander.shishkin@linux.intel.com, jolsa@kernel.org,
kan.liang@linux.intel.com
Subject: Re: [PATCH] perf test stat_all_pmu.sh: Correctly check 'perf stat' result
Date: Mon, 24 Feb 2025 15:40:50 -0800 [thread overview]
Message-ID: <Z70DgrMlgS_nqYHM@google.com> (raw)
In-Reply-To: <CAATMXfmtSghSj1J91SVimNTLWdi-=--xpyhFn6RwY2b12y+UmQ@mail.gmail.com>
Hello,
On Mon, Feb 24, 2025 at 05:34:15PM +0800, Qiao Zhao wrote:
> On Mon, Feb 24, 2025 at 2:59 PM Qiao Zhao <qzhao@redhat.com> wrote:
> >
> > On Sun, Jan 19, 2025 at 2:15 AM Namhyung Kim <namhyung@kernel.org> wrote:
> > >
> > > Hello,
> > >
> > > On Thu, Jan 16, 2025 at 01:31:21PM +0100, Veronika Molnarova wrote:
> > > >
> > > >
> > > > On 12/10/24 16:20, Veronika Molnarova wrote:
> > > > >
> > > > >
> > > > > On 11/23/24 00:12, vmolnaro@redhat.com wrote:
> > > > >> From: Veronika Molnarova <vmolnaro@redhat.com>
> > > > >>
> > > > >> Test case "stat_all_pmu.sh" is not correctly checking 'perf stat' output
> > > > >> due to a poor design. Firstly, having the 'set -e' option with a trap
> > > > >> catching the sigexit causes the shell to exit immediately if 'perf stat' ends
> > > > >> with any non-zero value, which is then caught by the trap reporting an
> > > > >> unexpected signal. This causes events that should be parsed by the if-else
> > > > >> statement to be caught by the trap handler and are reported as errors:
> > > > >>
> > > > >> $ perf test -vv "perf all pmu"
> > > > >> Testing i915/actual-frequency/
> > > > >> Unexpected signal in main
> > > > >> Error:
> > > > >> Access to performance monitoring and observability operations is limited.
> > > > >>
> > > > >> Secondly, the if-else branches are not exclusive as the checking if the
> > > > >> event is present in the output log covers also the "<not supported>"
> > > > >> events, which should be accepted, and also the "Bad name events", which
> > > > >> should be rejected.
> > > > >>
> > > > >> Remove the "set -e" option from the test case, correctly parse the
> > > > >> "perf stat" output log and check its return value. Add the missing
> > > > >> outputs for the 'perf stat' result and also add logs messages to
> > > > >> report the branch that parsed the event for more info.
> > > > >
> > > > > Hi Ian,
> > > > >
> > > > > is there anything that I am missing? If so would be great to know the idea
> > > > > of your patch. This issue is getting quite old so would be great to get a proper
> > > > > fix together.
> > > > >
> > > > > Thanks,
> > > > > Veronika
> > > >
> > > > Hello,
> > > >
> > > > just wanted to ping the patch. Would be great to sort it out and close the issue.
> > >
> > > Ian, are you ok with this?
> > >
> >
> > Just ping again for this patch, can this fix be acked?
> >
> > And I already tested this patch and it works well on the ppc64le system.
> >
> > Tested-by: Qiao Zhao <qzhao@redhat.com>
>
> Revert the Tested-by, and when more tests on Intel EMR system, and show other
> "Bad event name" and " value too big for format (umask)" errors.
> This patch needs more tests and rewrites.
Thanks for the test, though!
Namhyung
next prev parent reply other threads:[~2025-02-24 23:40 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-11-22 23:12 [PATCH] perf test stat_all_pmu.sh: Correctly check 'perf stat' result vmolnaro
2024-12-10 15:20 ` Veronika Molnarova
2025-01-16 12:31 ` Veronika Molnarova
2025-01-18 18:15 ` Namhyung Kim
2025-02-24 6:59 ` Qiao Zhao
2025-02-24 9:34 ` Qiao Zhao
2025-02-24 23:40 ` Namhyung Kim [this message]
2025-03-03 6:14 ` Qiao Zhao
2025-03-12 1:48 ` Qiao Zhao
2025-03-14 17:43 ` Namhyung Kim
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=Z70DgrMlgS_nqYHM@google.com \
--to=namhyung@kernel.org \
--cc=acme@kernel.org \
--cc=acme@redhat.com \
--cc=alexander.shishkin@linux.intel.com \
--cc=irogers@google.com \
--cc=jolsa@kernel.org \
--cc=kan.liang@linux.intel.com \
--cc=linux-perf-users@vger.kernel.org \
--cc=mark.rutland@arm.com \
--cc=mingo@redhat.com \
--cc=mpetlan@redhat.com \
--cc=peterz@infradead.org \
--cc=qzhao@redhat.com \
--cc=vmolnaro@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.