Re: [PATCH v3 12/12] perf test: improve pmu event metric testing

From: John Garry
Date: Thu Apr 30 2020 - 13:54:16 EST


On 30/04/2020 15:31, Ian Rogers wrote:
On Thu, Apr 30, 2020 at 4:44 AM John Garry <john.garry@xxxxxxxxxx> wrote:

On 30/04/2020 08:51, Ian Rogers wrote:
Add a basic floating point number test to expr.
Break pmu-events test into 2 and add a test to verify that all pmu metric
expressions simply parse.

Could we add also add something in jevents to ensure this?

I think it is an interesting possibility. Instead of strings we could
also parse the metrics into C functions, that could cause build time
errors at least for the simple expressions. An issue I've faced is
that if jevents fails, such as a json parse error, it has an exit code
of 0 and creates an empty map file. This allows the build to proceed
but with the pmu-events functionality broken. I'd prefer a build to
fail as early as possible.

Yeah, the idea is to allow perf to continue to build even when we have broken JSONs, but without aliases. It's been that way since day one, so maybe that can be turned off now.

Thanks,
John