All of lore.kernel.org
 help / color / mirror / Atom feed
From: Arnaldo Carvalho de Melo <acme@kernel.org>
To: Ian Rogers <irogers@google.com>
Cc: James Clark <james.clark@arm.com>,
	linux-perf-users@vger.kernel.org, namhyung@kernel.org,
	linux-kernel@vger.kernel.org,
	Peter Zijlstra <peterz@infradead.org>,
	Ingo Molnar <mingo@redhat.com>,
	Mark Rutland <mark.rutland@arm.com>,
	Alexander Shishkin <alexander.shishkin@linux.intel.com>,
	Jiri Olsa <jolsa@kernel.org>
Subject: Re: [PATCH 1/2] perf tests: Fix "perf stat JSON output linter" test for new output
Date: Fri, 2 Dec 2022 15:46:08 -0300	[thread overview]
Message-ID: <Y4pH8NEzfAPGkyW7@kernel.org> (raw)
In-Reply-To: <CAP-5=fXAhs-xgOo9GPH-w5f1QxNBCt5pdzpC5Cr7K+ovPzdgzw@mail.gmail.com>

Em Wed, Nov 30, 2022 at 10:18:49AM -0800, Ian Rogers escreveu:
> On Wed, Nov 30, 2022 at 3:15 AM James Clark <james.clark@arm.com> wrote:
> >
> > Commit c4b41b83c250 ("perf stat: Rename "aggregate-number" to
> > "cpu-count" in JSON") renamed a field, so update the tests to reflect
> > this.
> >
> > This fixes the following failure:
> >
> >   $ sudo ./perf test "json output" -vvv
> >    96: perf stat JSON output linter                                    :
> >   --- start ---
> >   test child forked, pid 327720
> >   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 Test failed for input:
> >   ...
> >   Traceback (most recent call last):
> >     File "./tools/perf/tests/shell/lib/perf_json_output_lint.py", line 93, in <module>
> >       check_json_output(expected_items)
> >     File "./tools/perf/tests/shell/lib/perf_json_output_lint.py", line 78, in check_json_output
> >       raise RuntimeError(f'Unexpected key: key={key} value={value}')
> >   RuntimeError: Unexpected key: key=cpu-count value=16
> >   test child finished with -1
> >   ---- end ----
> >   perf stat JSON output linter: FAILED!
> >
> > Fixes: c4b41b83c250 ("perf stat: Rename "aggregate-number" to "cpu-count" in JSON")
> > Signed-off-by: James Clark <james.clark@arm.com>
> 
> Namhyung mentioned reverting change c4b41b83c250, in which case
> merging this would break the test again. I think the revert is better.

Applied the revert, with an Acked-by: you.
 
> Thanks,
> Ian
> 
> > ---
> >  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 d90f8d102eb9..9c073e257d33 100644
> > --- a/tools/perf/tests/shell/lib/perf_json_output_lint.py
> > +++ b/tools/perf/tests/shell/lib/perf_json_output_lint.py
> > @@ -54,7 +54,7 @@ def check_json_output(expected_items):
> >            raise RuntimeError(f'wrong number of fields. counted {count} expected {expected_items}'
> >                               f' in \'{line}\'')
> >    checks = {
> > -      'aggregate-number': lambda x: isfloat(x),
> > +      'cpu-count': lambda x: isfloat(x),
> >        'core': lambda x: True,
> >        'counter-value': lambda x: is_counter_value(x),
> >        'cgroup': lambda x: True,
> > --
> > 2.25.1
> >

-- 

- Arnaldo

      parent reply	other threads:[~2022-12-02 18:46 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-30 11:15 [PATCH 1/2] perf tests: Fix "perf stat JSON output linter" test for new output James Clark
2022-11-30 11:15 ` [PATCH 2/2] perf stat: Fix invalid output handle James Clark
2022-11-30 18:32   ` Namhyung Kim
2022-12-01 10:06     ` James Clark
2022-12-04 17:08       ` Athira Rajeev
2022-12-05 13:07         ` Arnaldo Carvalho de Melo
2022-11-30 18:18 ` [PATCH 1/2] perf tests: Fix "perf stat JSON output linter" test for new output Ian Rogers
2022-11-30 18:31   ` Namhyung Kim
2022-12-02 18:46   ` Arnaldo Carvalho de Melo [this message]

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=Y4pH8NEzfAPGkyW7@kernel.org \
    --to=acme@kernel.org \
    --cc=alexander.shishkin@linux.intel.com \
    --cc=irogers@google.com \
    --cc=james.clark@arm.com \
    --cc=jolsa@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-perf-users@vger.kernel.org \
    --cc=mark.rutland@arm.com \
    --cc=mingo@redhat.com \
    --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 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.