mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Michael Petlan <mpetlan@redhat.com>
To: Arnaldo Carvalho de Melo <acme@kernel.org>
Cc: "Kim Phillips" <kim.phillips@arm.com>,
	linux-kernel@vger.kernel.org,
	"Peter Zijlstra" <peterz@infradead.org>,
	"Ingo Molnar" <mingo@redhat.com>,
	"Alexander Shishkin" <alexander.shishkin@linux.intel.com>,
	"Jiri Olsa" <jolsa@redhat.com>,
	"Namhyung Kim" <namhyung@kernel.org>,
	"Thomas Richter" <tmricht@linux.vnet.ibm.com>,
	"Hendrik Brückner" <brueckner@linux.vnet.ibm.com>,
	"Sandipan Das" <sandipan@linux.vnet.ibm.com>
Subject: Re: [PATCH 2/2] perf test shell: make perf inet_pton test more portable
Date: Thu, 28 Jun 2018 22:36:36 +0200 (CEST)	[thread overview]
Message-ID: <alpine.DEB.2.20.1806262331000.29977@Enrico> (raw)
In-Reply-To: <20180621151800.GU20477@kernel.org>

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@kernel.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
>
[...]

  parent reply	other threads:[~2018-06-28 20:36 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-06-19 23:49 Kim Phillips
2018-06-20  6:59 ` Thomas-Mich Richter
2018-06-20 13:46 ` Arnaldo Carvalho de Melo
2018-06-21  0:45   ` Kim Phillips
2018-06-21 14:19     ` Arnaldo Carvalho de Melo
2018-06-21 15:18       ` Arnaldo Carvalho de Melo
2018-06-21 20:32         ` Kim Phillips
2018-06-29 15:21           ` Arnaldo Carvalho de Melo
2018-06-29 16:11             ` Kim Phillips
2018-06-28 20:36         ` Michael Petlan [this message]
2018-06-29 16:21           ` Kim Phillips

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=alpine.DEB.2.20.1806262331000.29977@Enrico \
    --to=mpetlan@redhat.com \
    --cc=acme@kernel.org \
    --cc=alexander.shishkin@linux.intel.com \
    --cc=brueckner@linux.vnet.ibm.com \
    --cc=jolsa@redhat.com \
    --cc=kim.phillips@arm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=namhyung@kernel.org \
    --cc=peterz@infradead.org \
    --cc=sandipan@linux.vnet.ibm.com \
    --cc=tmricht@linux.vnet.ibm.com \
    /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

all inboxes | Powered by JetHome®