lkml.org 
[lkml]   [2018]   [May]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 01/11] perf tests parse-events: Add intel_pt parse test
Em Thu, May 17, 2018 at 05:54:10PM -0500, Kim Phillips escreveu:
> On Thu, 17 May 2018 22:58:11 +0200
> Jiri Olsa <jolsa@redhat.com> wrote:
>
> > On Thu, May 17, 2018 at 05:15:53PM -0300, Arnaldo Carvalho de Melo wrote:
> > > So parse_state->error == NULL, Jiri, ideas?
> >
> > yep, we don't use it in tests.. and when trying intel_pt on
> > system without that pmu, the parse_events_add_pmu fails
> > and store the error to NULL.. we should check on that err pointer
> >
> > wrt to the test itself, how about we add callback
> > to check if the test is valid before we run it,
> > something like below

As Kim says, that is ok, but then, I think that the test would better
reflect reality if it tested all the error paths, i.e. if it, in the
face of a missing PMU, would fill in the error structs, that would then
be checked for validity, etc.

So if instead of checking if the intel_pt PMU is present to perform the
test it would run the test, with te error struct passed as expected,
then, when it fails, check that the failure indicates that indeed, that
PMU is not there by checking that routine you used to bypass the test,
huh?

Thanks,

- Arnaldo

> > jirka
>
> That diff makes this test pass again on x86 without an intel_pt, and
> on Arm32/64 (the intel_pt test gets skipped on those machines):
>
> Tested-by: Kim Phillips <kim.phillips@arm.com>
>
> Thanks,
>
> Kim

\
 
 \ /
  Last update: 2018-05-18 16:14    [W:0.059 / U:0.720 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site