[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAP-5=fWAy-agZ=21_uzOWJfD9Da6XVJ05spoXQ8XTLQiE1LmLA@mail.gmail.com>
Date: Fri, 8 Jul 2022 08:39:11 -0700
From: Ian Rogers <irogers@...gle.com>
To: Thomas Richter <tmricht@...ux.ibm.com>
Cc: Peter Zijlstra <peterz@...radead.org>,
Ingo Molnar <mingo@...hat.com>,
Arnaldo Carvalho de Melo <acme@...nel.org>,
Mark Rutland <mark.rutland@....com>,
Alexander Shishkin <alexander.shishkin@...ux.intel.com>,
Jiri Olsa <jolsa@...nel.org>,
Namhyung Kim <namhyung@...nel.org>,
Kan Liang <kan.liang@...ux.intel.com>,
Zhengjun Xing <zhengjun.xing@...ux.intel.com>,
Sandipan Das <sandipan.das@....com>,
Claire Jensen <cjense@...gle.com>, Alyssa Ross <hi@...ssa.is>,
Like Xu <likexu@...cent.com>,
James Clark <james.clark@....com>,
Florian Fischer <florian.fischer@...q.space>,
linux-kernel@...r.kernel.org, linux-perf-users@...r.kernel.org,
Claire Jensen <clairej735@...il.com>,
Stephane Eranian <eranian@...gle.com>
Subject: Re: [PATCH v6 2/2] perf test: Json format checking
On Fri, Jul 8, 2022 at 1:31 AM Thomas Richter <tmricht@...ux.ibm.com> wrote:
>
> On 7/7/22 22:12, Ian Rogers wrote:
> > From: Claire Jensen <cjense@...gle.com>
> >
> > Add field checking tests for perf stat JSON output.
> > Sanity checks the expected number of fields are present, that the
> > expected keys are present and they have the correct values.
> >
> > Signed-off-by: Claire Jensen <cjense@...gle.com>
> > Signed-off-by: Ian Rogers <irogers@...gle.com>
> > ---
> > .../tests/shell/lib/perf_json_output_lint.py | 95 +++++++++++
> > tools/perf/tests/shell/stat+json_output.sh | 147 ++++++++++++++++++
> > 2 files changed, 242 insertions(+)
> > create mode 100644 tools/perf/tests/shell/lib/perf_json_output_lint.py
> > create mode 100755 tools/perf/tests/shell/stat+json_output.sh
> >
> ....
> I wonder if it is really necessary to have a python file to post process the
> perf stat output?
>
> With
> commit 7473ee56dbc9 ("perf test: Add checking for perf stat CSV output.")
> the same approach was done which led to issues on s390 and required an additional
> patch to fix this:
> commit ec906102e5b7 ("perf test: Fix "perf stat CSV output linter" test on s390").
>
> I wonder if you can do the perf stat output checking using bash/linux tools as it
> was done in commit ec906102e5b7. This would make maintenance much easier.
>
> Just me 2 cents...
Hi Thomas,
In this case using python avoids writing a JSON decoder, which would
be harder to do in bash although there is perhaps a linter or some
such we could use. That'd wind up being another dependency :-/
Thanks,
Ian
> --
> Thomas Richter, Dept 3303, IBM s390 Linux Development, Boeblingen, Germany
> --
> Vorsitzender des Aufsichtsrats: Gregor Pillen
> Geschäftsführung: David Faller
> Sitz der Gesellschaft: Böblingen / Registergericht: Amtsgericht Stuttgart, HRB 243294
Powered by blists - more mailing lists