[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <alpine.DEB.2.20.1806262331000.29977@Enrico>
Date: Thu, 28 Jun 2018 22:36:36 +0200 (CEST)
From: Michael Petlan <mpetlan@...hat.com>
To: Arnaldo Carvalho de Melo <acme@...nel.org>
cc: Kim Phillips <kim.phillips@....com>, linux-kernel@...r.kernel.org,
Peter Zijlstra <peterz@...radead.org>,
Ingo Molnar <mingo@...hat.com>,
Alexander Shishkin <alexander.shishkin@...ux.intel.com>,
Jiri Olsa <jolsa@...hat.com>,
Namhyung Kim <namhyung@...nel.org>,
Thomas Richter <tmricht@...ux.vnet.ibm.com>,
Hendrik Brückner <brueckner@...ux.vnet.ibm.com>,
Sandipan Das <sandipan@...ux.vnet.ibm.com>
Subject: Re: [PATCH 2/2] perf test shell: make perf inet_pton test more
portable
On Thu, 21 Jun 2018, Arnaldo Carvalho de Melo wrote:
> Em Thu, Jun 21, 2018 at 11:19:15AM -0300, Arnaldo Carvalho de Melo escreveu:
>> Em Wed, Jun 20, 2018 at 07:45:46PM -0500, Kim Phillips escreveu:
>>> On Wed, 20 Jun 2018 10:46:22 -0300
>>> Arnaldo Carvalho de Melo <acme@...nel.org> wrote:
[...]
>
> Would be good if we had some utility that given a two files, one with
> regexps, could tell if, line by line, those expressions matched, better,
> one that is present in all these OSes...
>
I have struggled with this too [1], [2]. I use perl, not sure if it is
all-distro-compliant, probably not, but anyway...
To have:
- regexps generic enough (e.g. to parse "casual perf-script output line")
- regexps adjustable to concrete needs
- regexps to be understandable as much as possible
---> I have $RE_SOMETHING, e.g. RE_LINE_REPORT_CONTENT, such as in [2],
and some primitives which I make the more concrete regexps from, such
as $RE_EVENT_ANY, $RE_PATH, etc. going into e.g.:
REGEXP_STAT_LINE="^\s+$RE_NUMBER\s+$RE_EVENT_ANY\s*"
- various utilities:
- all output lines matched some regexp in the file
- all regexps in the file were matched by something in the output
- at least one of the patterns found in output
- none of the patterns found in the output
- ...
---> I had to write these and few more scripts to handle the parsing
of perf output, as in [1], however it still is not ideal...
[1] https://github.com/rfmvh/perftool-testsuite/tree/master/common
[2] https://github.com/rfmvh/perftool-testsuite/blob/master/common/patterns.sh
Cheers,
Michael
P.S. Could anyone try whether my suite would work on the dash (or any other
"non-fedora" environment)? I haven't had problems with this so far, but
of course I haven't tried many...
> - Arnaldo
>
[...]
Powered by blists - more mailing lists