[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAP-5=fVMR0Y1=_W2scQBg_uWceOHrHaZ2GMwOai4Veq7OaGJ4A@mail.gmail.com>
Date: Fri, 26 May 2023 15:41:29 -0700
From: Ian Rogers <irogers@...gle.com>
To: K Prateek Nayak <kprateek.nayak@....com>
Cc: Namhyung Kim <namhyung@...nel.org>,
Arnaldo Carvalho de Melo <acme@...nel.org>,
Jiri Olsa <jolsa@...nel.org>,
Adrian Hunter <adrian.hunter@...el.com>,
Peter Zijlstra <peterz@...radead.org>,
Ingo Molnar <mingo@...nel.org>,
LKML <linux-kernel@...r.kernel.org>,
linux-perf-users@...r.kernel.org
Subject: Re: [PATCH] perf test: Fix perf stat JSON output test
On Wed, May 24, 2023 at 8:01 PM K Prateek Nayak <kprateek.nayak@....com> wrote:
>
> Hello Namhyung,
>
> On 5/25/2023 2:36 AM, Namhyung Kim wrote:
> > The recent --per-cache option test caused a problem. According to
> > the option name, I think it should check args.per_cache instead of
> > args.per_cache_instance.
> >
> > $ sudo ./perf test -v 99
> > 99: perf stat JSON output linter :
> > --- start ---
> > test child forked, pid 3086101
> > Checking json output: no args [Success]
> > Checking json output: system wide [Success]
> > Checking json output: interval [Success]
> > Checking json output: event [Success]
> > Checking json output: per thread [Success]
> > Checking json output: per node [Success]
> > Checking json output: system wide no aggregation [Success]
> > Checking json output: per core [Success]
> > Checking json output: per cache_instance Test failed for input:
> > ...
> > Traceback (most recent call last):
> > File "linux/tools/perf/tests/shell/lib/perf_json_output_lint.py", line 88, in <module>
> > elif args.per_core or args.per_socket or args.per_node or args.per_die or args.per_cache_instance:
> > AttributeError: 'Namespace' object has no attribute 'per_cache_instance'
> > test child finished with -1
> > ---- end ----
> > perf stat JSON output linter: FAILED!
> >
> > Fixes: bfce728db317 ("pert tests: Add tests for new "perf stat --per-cache" aggregation option")
>
> Another oversight on my part. Thank you for fixing this :)
>
> $ sudo perf test -v 99
> 99: perf stat JSON output linter :
> --- start ---
> test child forked, pid 25046
> Checking json output: no args [Success]
> Checking json output: system wide [Success]
> Checking json output: interval [Success]
> Checking json output: event [Success]
> Checking json output: per thread [Success]
> Checking json output: per node [Success]
> Checking json output: system wide no aggregation [Success]
> Checking json output: per core [Success]
> Checking json output: per cache_instance [Success]
> Checking json output: per die [Success]
> Checking json output: per socket [Success]
> test child finished with 0
> ---- end ----
> perf stat JSON output linter: Ok
>
> Tested-by: K Prateek Nayak <kprateek.nayak@....com>
Thanks Namhyung and Prateek, Arnaldo could we get this in
perf-tools-next so that the failing test goes away?
Acked-by: Ian Rogers <irogers@...gle.com>
> > Cc: K Prateek Nayak <kprateek.nayak@....com>
> > Signed-off-by: Namhyung Kim <namhyung@...nel.org>
> > ---
> > tools/perf/tests/shell/lib/perf_json_output_lint.py | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/tools/perf/tests/shell/lib/perf_json_output_lint.py b/tools/perf/tests/shell/lib/perf_json_output_lint.py
> > index 4acaaed5560d..b81582a89d36 100644
> > --- a/tools/perf/tests/shell/lib/perf_json_output_lint.py
> > +++ b/tools/perf/tests/shell/lib/perf_json_output_lint.py
> > @@ -85,7 +85,7 @@ Lines = args.file.readlines()
> > expected_items = 7
> > elif args.interval or args.per_thread or args.system_wide_no_aggr:
> > expected_items = 8
> > - elif args.per_core or args.per_socket or args.per_node or args.per_die or args.per_cache_instance:
> > + elif args.per_core or args.per_socket or args.per_node or args.per_die or args.per_cache:
> > expected_items = 9
> > else:
> > # If no option is specified, don't check the number of items.
>
> --
> Thanks and Regards,
> Prateek
Powered by blists - more mailing lists