From: K Prateek Nayak <kprateek.nayak@amd.com>
To: Namhyung Kim <namhyung@kernel.org>,
Arnaldo Carvalho de Melo <acme@kernel.org>,
Jiri Olsa <jolsa@kernel.org>
Cc: Ian Rogers <irogers@google.com>,
Adrian Hunter <adrian.hunter@intel.com>,
Peter Zijlstra <peterz@infradead.org>,
Ingo Molnar <mingo@kernel.org>,
LKML <linux-kernel@vger.kernel.org>,
linux-perf-users@vger.kernel.org
Subject: Re: [PATCH] perf test: Fix perf stat JSON output test
Date: Thu, 25 May 2023 08:31:09 +0530 [thread overview]
Message-ID: <d06cac04-00b5-651d-14af-378fc25f37c4@amd.com> (raw)
In-Reply-To: <20230524210600.3095830-1-namhyung@kernel.org>
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@amd.com>
> Cc: K Prateek Nayak <kprateek.nayak@amd.com>
> Signed-off-by: Namhyung Kim <namhyung@kernel.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
next prev parent reply other threads:[~2023-05-25 3:01 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-05-24 21:06 [PATCH] perf test: Fix perf stat JSON output test Namhyung Kim
2023-05-25 3:01 ` K Prateek Nayak [this message]
2023-05-26 22:41 ` Ian Rogers
2023-05-27 1:48 ` Arnaldo Carvalho de Melo
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=d06cac04-00b5-651d-14af-378fc25f37c4@amd.com \
--to=kprateek.nayak@amd.com \
--cc=acme@kernel.org \
--cc=adrian.hunter@intel.com \
--cc=irogers@google.com \
--cc=jolsa@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-perf-users@vger.kernel.org \
--cc=mingo@kernel.org \
--cc=namhyung@kernel.org \
--cc=peterz@infradead.org \
/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 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).