From: Namhyung Kim <namhyung@kernel.org>
To: Adrian Hunter <adrian.hunter@intel.com>, Ian Rogers <irogers@google.com>
Cc: Arnaldo Carvalho de Melo <acme@kernel.org>,
Jiri Olsa <jolsa@kernel.org>, Ingo Molnar <mingo@kernel.org>,
Peter Zijlstra <peterz@infradead.org>,
LKML <linux-kernel@vger.kernel.org>,
linux-perf-users@vger.kernel.org, Ammy Yi <ammy.yi@intel.com>
Subject: Re: [PATCH] perf test: Do not fail Intel-PT misc test w/o libpython
Date: Fri, 21 Oct 2022 09:25:15 -0700 [thread overview]
Message-ID: <CAM9d7chnXa8XEYQiUyn6fJp8MsS+cb+FhaZTQksQbrFqSF_JUQ@mail.gmail.com> (raw)
In-Reply-To: <0beb829f-82e7-9caa-806e-276adc8e697f@intel.com>
Hi Adrian and Ian,
On Thu, Oct 20, 2022 at 10:22 PM Adrian Hunter <adrian.hunter@intel.com> wrote:
>
> On 20/10/22 22:29, Namhyung Kim wrote:
> > The virtuall LBR test uses a python script to check the max size of
> > branch stack in the Intel-PT generated LBR. But it didn't check whether
> > python scripting is available (as it's optional).
> >
> > Let's skip the test if the python support is not available.
> >
> > Fixes: f77811a0f625 ("perf test: test_intel_pt.sh: Add 9 tests")
> > Cc: Ammy Yi <ammy.yi@intel.com>
> > Signed-off-by: Namhyung Kim <namhyung@kernel.org>
> > ---
> > tools/perf/tests/shell/test_intel_pt.sh | 6 ++++++
> > 1 file changed, 6 insertions(+)
> >
> > diff --git a/tools/perf/tests/shell/test_intel_pt.sh b/tools/perf/tests/shell/test_intel_pt.sh
> > index 4c0aabbe33bd..e66b7d977462 100755
> > --- a/tools/perf/tests/shell/test_intel_pt.sh
> > +++ b/tools/perf/tests/shell/test_intel_pt.sh
> > @@ -526,6 +526,12 @@ test_kernel_trace()
> > test_virtual_lbr()
> > {
> > echo "--- Test virtual LBR ---"
> > + # Check if python script is supported
> > + libpython=$(ldd $(which perf) | grep -c python)
>
> 'which' might not be installed. Don't about 'ldd'.
>
> Maybe 'perf version --build-options' can be used instead e.g.
>
> $ perf version --build-options | grep -i libpython | grep -vi off
> libpython: [ on ] # HAVE_LIBPYTHON_SUPPORT
Thanks for the suggestion, will change.
Thanks,
Namhyung
prev parent reply other threads:[~2022-10-21 16:25 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-10-20 19:29 [PATCH] perf test: Do not fail Intel-PT misc test w/o libpython Namhyung Kim
2022-10-20 23:44 ` Ian Rogers
2022-10-21 5:22 ` Adrian Hunter
2022-10-21 16:25 ` Namhyung Kim [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=CAM9d7chnXa8XEYQiUyn6fJp8MsS+cb+FhaZTQksQbrFqSF_JUQ@mail.gmail.com \
--to=namhyung@kernel.org \
--cc=acme@kernel.org \
--cc=adrian.hunter@intel.com \
--cc=ammy.yi@intel.com \
--cc=irogers@google.com \
--cc=jolsa@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-perf-users@vger.kernel.org \
--cc=mingo@kernel.org \
--cc=peterz@infradead.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).