lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <Y4pH8NEzfAPGkyW7@kernel.org>
Date:   Fri, 2 Dec 2022 15:46:08 -0300
From:   Arnaldo Carvalho de Melo <acme@...nel.org>
To:     Ian Rogers <irogers@...gle.com>
Cc:     James Clark <james.clark@....com>,
        linux-perf-users@...r.kernel.org, namhyung@...nel.org,
        linux-kernel@...r.kernel.org,
        Peter Zijlstra <peterz@...radead.org>,
        Ingo Molnar <mingo@...hat.com>,
        Mark Rutland <mark.rutland@....com>,
        Alexander Shishkin <alexander.shishkin@...ux.intel.com>,
        Jiri Olsa <jolsa@...nel.org>
Subject: Re: [PATCH 1/2] perf tests: Fix "perf stat JSON output linter" test
 for new output

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@....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@....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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ