From: jeremie.galarneau@efficios.com (Jérémie Galarneau)
Subject: [lttng-dev] [PATCH lttng-tools] Fix: tests: skip UST perf tests if not root
Date: Mon, 21 Sep 2015 12:19:45 -0400 [thread overview]
Message-ID: <CA+jJMxuewpOdRPxZCSdWJNOVqTWk_e1bHhyJuT7QG2DnV_NFfQ@mail.gmail.com> (raw)
In-Reply-To: <1442513450-8013-1-git-send-email-mathieu.desnoyers@efficios.com>
Merged in master and stable-2.7.
I have also moved the test from the "fast_regression" to
"root_regression" test list.
Thanks!
J?r?mie
On Thu, Sep 17, 2015 at 2:10 PM, Mathieu Desnoyers
<mathieu.desnoyers at efficios.com> wrote:
> Some distributions like Debian (e.g. Debian kernel 4.1.0-2-amd64) have
> some grsecurity options enabled, such as CONFIG_GRKERNSEC_PERF_HARDEN.
>
> Unfortunately, this option makes it impossible to use the SW page-fault
> perf event as a normal user. It only leaves some HW events. However, we
> can only use SW events within virtual machines.
>
> Therefore, only run this test as root for now until we find a better
> approach.
>
> Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers at efficios.com>
> ---
> tests/regression/ust/test_event_perf | 15 ++++++++++++---
> 1 file changed, 12 insertions(+), 3 deletions(-)
>
> diff --git a/tests/regression/ust/test_event_perf b/tests/regression/ust/test_event_perf
> index 7fb37ed..7dc2168 100755
> --- a/tests/regression/ust/test_event_perf
> +++ b/tests/regression/ust/test_event_perf
> @@ -90,8 +90,17 @@ plan_tests $NUM_TESTS
>
> print_test_banner "$TEST_DESC"
>
> -start_lttng_sessiond
> +if [ "$(id -u)" == "0" ]; then
> + isroot=1
> +else
> + isroot=0
> +fi
> +
> +skip $isroot "Root access is needed. Skipping UST perf tests." ${NUM_TESTS} ||
> +{
> + start_lttng_sessiond
>
> -test_event_basic
> + test_event_basic
>
> -stop_lttng_sessiond
> + stop_lttng_sessiond
> +}
> --
> 2.1.4
>
--
J?r?mie Galarneau
EfficiOS Inc.
http://www.efficios.com
parent reply other threads:[~2015-09-21 16:19 UTC|newest]
Thread overview: expand[flat|nested] mbox.gz Atom feed
[parent not found: <1442513450-8013-1-git-send-email-mathieu.desnoyers@efficios.com>]
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+jJMxuewpOdRPxZCSdWJNOVqTWk_e1bHhyJuT7QG2DnV_NFfQ@mail.gmail.com \
--to=jeremie.galarneau@efficios.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