Re: [tip:perf/core] perf test shell: Install shell tests

From: Michael Petlan
Date: Mon Aug 14 2017 - 17:02:05 EST


On Mon, 14 Aug 2017, Arnaldo Carvalho de Melo wrote:
> Em Mon, Aug 14, 2017 at 08:44:14PM +0200, Michael Petlan escreveu:
> > Hi Arnaldo!
> >
> > Maybe this would be the right time to incorporate the shell-based
> > perftool-testsuite [1] into perf-test, wouldn't it?
>
> Perhaps its time, yes. Some questions:
>
> Do these tests assume that perf was built in some particular way, i.e.
> as it is packaged for RHEL?

Of course I run the testsuite most often on RHEL, but it should be
distro-agnostic, worked on Debian with their perf as well as with
vanilla kernel/perf build from Linus' repo...

It somehow assumes having kernel-debuginfo available (but this does
not necessarily mean kernel-debuginfo RHEL package). It runs against
'perf' from path or against $CMD_PERF if this variable is defined.

>
> One thing that came to mind from a report from Kim Phillips, that I
> addressed (to some extent) after this sending this first patchkit to
> Ingo was that perf can be built in many ways, for instance, without
> 'perf probe', or with 'perf probe' but without DWARF support, which will
> allow some features to be tested while others should cause the test
> needing not-builtin features to just return '2', that will make it be
> marked as "Skip" in the output.
>
It has mechanisms for skipping things if they aren't supported, but
definitely not *all*. E.g. it detects uprobe/kprobe support, POWER8
hv_24x7 events support, Intel uncore support, HW breakpoint events
availablitity, etc. But as I said, perf without perf-probe subcommand
would probably fail, because I wasn't aware of such possibility...

Anyway, it is easily fixable... The suite has a mechanism for skipping
particular tests. If there is a way to detect a feature support, it
is easy to use it as a condition. The dwarf support might be more
difficult, because afaik, there's no way to find out whether dwarf
support just does not work or is disabled on purpose...

Michael

> - Arnaldo
>
> > It already contains bunch of shell-based perf tests that cover
> > 25+ RH bugs...
> >
> > A little problem might be different design, since the testsuite
> > has multiple levels of hierarchy of sub-sub-sub-tests, like:
> >
[SNIP]