All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Jérémie Galarneau" <jeremie.galarneau@efficios.com>
To: Julien Desfossez <jdesfossez@efficios.com>
Cc: "lttng-dev@lists.lttng.org" <lttng-dev@lists.lttng.org>
Subject: Re: [PATCH lttng-tools v3 3/3] Create a dedicated test suite for Perf
Date: Mon, 12 Sep 2016 15:10:26 -0400	[thread overview]
Message-ID: <CA+jJMxvDddxtUB0nr0b-AcCFyiG+Dz_0ZGdCAAp5KrX7cBh_JA__43747.3796344877$1473707440$gmane$org@mail.gmail.com> (raw)
In-Reply-To: <CA+jJMxtSQ_SU4tR8-WoZjcZsSv_-TiTWk-+0pfMmKkXbrNy=gQ@mail.gmail.com>

Have you had a chance to look into this since then?

Jérémie

On Fri, Jul 8, 2016 at 4:57 PM, Jérémie Galarneau
<jeremie.galarneau@efficios.com> wrote:
> On Fri, Jul 8, 2016 at 4:41 PM, Julien Desfossez
> <jdesfossez@efficios.com> wrote:
>>> >> have_libpfm should be used to set an automake variable and enable the test
>>> >> conditionally. Similar to what is done here:
>>> >>
>>> >> https://github.com/lttng/lttng-tools/blob/master/tests/regression/Makefile.am#L44
>>> >
>>> > Hum, the intent here is to make the tests fail if the dependency is not
>>> > available, but we do not want to enforce it as a dependency since most
>>> > deployments cannot run these tests. What we want here if for the test to
>>> > fail if a user tries to run it without the dependency installed, then
>>> > they will install the dependency and run it again. Having a transparent
>>> > way to disable these tests would render them useless because we will
>>> > think they passed.
>>>
>>> Agreed to not include them in the standard test suite. However, the
>>> test should be skipped if the dependency is not found on the system,
>>> along with a message explaining why.
>>>
>>> Currently the test will fail with the following output if run without
>>> libpfm4 installed on the system.
>>>
>>> $ ./tests/perf/test_perf_raw
>>> 1..20
>>> # Perf counters
>>> ok 1 - Start session daemon
>>> ./tests/perf/test_perf_raw: line 50: ./tests/perf//find_event: No such
>>> file or directory
>>> not ok 2 - Find PMU UNHALTED_REFERENCE_CYCLES
>> [...]
>>>
>>> This does't make it obvious why the test is failing.
>>>
>>> >
>>> > There may be a better way of doing it, but we should avoid using magical
>>> > "skip" in this case, these tests should fail if the target architecture
>>> > does not support all the Perf-related features we support.
>>>
>>> I want to make it clear to the user that the test is failing because
>>> of a missing dependency, and not because his HW doesn't have the
>>> capabilities needed.
>>>
>>> Skip with a clear error message seems appropriate here, especially
>>> since the test will not be run automatically.
>>
>> How about having a first step in the test that checks if the dependency
>> is present and fails if not ? This would make it clear that the
>> dependency is needed to run the test, and it would not magically pass if
>> run in the background or in batch.
>>
>> I am really worried that skipping here will confuse users, I see this
>> test suite as a way to guarantee that perf-related features all work on
>> their system if the test returns 0 at the end.
>
> That's fair. Feel free to have a look at how we use autoconf to generate
> the test scripts based on configure-time results in Babeltrace [1][2].
>
> You should be able to export "LTTNG_TOOLS_BUILD_WITH_LIBPFM",
> check its value in the script and bail out with an explanation.
>
> [1] https://github.com/efficios/babeltrace/blob/master/tests/lib/test_ctf_writer_complete.in
> [2] https://github.com/efficios/babeltrace/blob/master/configure.ac#L363
>
> Jeremie
>>
>> Thanks,
>>
>> Julien
>> _______________________________________________
>> lttng-dev mailing list
>> lttng-dev@lists.lttng.org
>> https://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev
>
>
>
> --
> Jérémie Galarneau
> EfficiOS Inc.
> http://www.efficios.com



-- 
Jérémie Galarneau
EfficiOS Inc.
http://www.efficios.com
_______________________________________________
lttng-dev mailing list
lttng-dev@lists.lttng.org
https://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev

      parent reply	other threads:[~2016-09-12 19:11 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1467733848-18128-1-git-send-email-jdesfossez@efficios.com>
2016-07-05 15:50 ` [PATCH lttng-tools v3 2/3] Test the parsing of perf raw context Julien Desfossez
2016-07-05 15:50 ` [PATCH lttng-tools v3 3/3] Create a dedicated test suite for Perf Julien Desfossez
     [not found] ` <1467733848-18128-3-git-send-email-jdesfossez@efficios.com>
2016-07-06 16:06   ` Julien Desfossez
2016-07-08 19:56   ` Jérémie Galarneau
     [not found]   ` <CA+jJMxv06zCw2wRaG+d5prs9BRJ6TG65k-9g4e6zKZQP+SLihQ@mail.gmail.com>
2016-07-08 20:07     ` Julien Desfossez
     [not found]     ` <5780080D.4090902@efficios.com>
2016-07-08 20:28       ` Jérémie Galarneau
     [not found]       ` <CA+jJMxsyOzNFPyST3i17BbWuAuBhd_ao-DYY2qLeRaiBaScEHw@mail.gmail.com>
2016-07-08 20:41         ` Julien Desfossez
     [not found]         ` <20160708204158.GA3372@sinkpad.home.lan>
2016-07-08 20:57           ` Jérémie Galarneau
     [not found]           ` <CA+jJMxtSQ_SU4tR8-WoZjcZsSv_-TiTWk-+0pfMmKkXbrNy=gQ@mail.gmail.com>
2016-09-12 19:10             ` Jérémie Galarneau [this message]

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='CA+jJMxvDddxtUB0nr0b-AcCFyiG+Dz_0ZGdCAAp5KrX7cBh_JA__43747.3796344877$1473707440$gmane$org@mail.gmail.com' \
    --to=jeremie.galarneau@efficios.com \
    --cc=jdesfossez@efficios.com \
    --cc=lttng-dev@lists.lttng.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.