linux-perf-users.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: James Clark <james.clark@arm.com>
To: Thomas Richter <tmricht@linux.ibm.com>
Cc: svens@linux.ibm.com, gor@linux.ibm.com, sumanthk@linux.ibm.com,
	hca@linux.ibm.com, linux-kernel@vger.kernel.org,
	linux-perf-users@vger.kernel.org, acme@kernel.org,
	german.gomez@arm.com
Subject: Re: [PATCH] perf/tests: Fix test case 95 Check branch stack sampling on s390
Date: Wed, 27 Jul 2022 10:27:37 +0100	[thread overview]
Message-ID: <62efe3a0-21d7-dfee-2532-cf2090359548@arm.com> (raw)
In-Reply-To: <20220727071159.173360-1-tmricht@linux.ibm.com>



On 27/07/2022 08:11, Thomas Richter wrote:
> On linux-next tree perf test 95 was added recently.
> s390 does not support branch sampling at all. Therefore
> omit this test on s390 platform.
> 
> Output before:
>  # ./perf test -Fv 95
>  95: Check branch stack sampling                                     :
>  --- start ---
>  Testing user branch stack sampling
>  ---- end ----
>  Check branch stack sampling: FAILED!
>  #
> 
> Output after:
>  # ./perf test -Fv 95
>  95: Check branch stack sampling                                     :
>  --- start ---
>  ---- end ----
>  Check branch stack sampling: Skip
>  #
> 
> Signed-off-by: Thomas Richter <tmricht@linux.ibm.com>
> ---
>  tools/perf/tests/shell/test_brstack.sh | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/tools/perf/tests/shell/test_brstack.sh b/tools/perf/tests/shell/test_brstack.sh
> index 113ccd17bf03..dedaf74164dc 100755
> --- a/tools/perf/tests/shell/test_brstack.sh
> +++ b/tools/perf/tests/shell/test_brstack.sh
> @@ -4,6 +4,9 @@
>  # SPDX-License-Identifier: GPL-2.0
>  # German Gomez <german.gomez@arm.com>, 2022
>  
> +# s390 does not support branch sampling, omit
> +[ $(uname -m) = "s390" -o $(uname -m) = "s390x" ] && exit 2
> +

Hi Thomas,

Do you know why the below check doesn't cover this scenario? It seems
like it would be best to check if it's available wherever it's running
rather than enumerate every platform where it's not supported:

  # skip the test if the hardware doesn't support branch stack sampling
  perf record -b -o- -e dummy -B true > /dev/null 2>&1 || exit 2

Thanks
James

>  # we need a C compiler to build the test programs
>  # so bail if none is found
>  if ! [ -x "$(command -v cc)" ]; then

  reply	other threads:[~2022-07-27  9:27 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-07-27  7:11 [PATCH] perf/tests: Fix test case 95 Check branch stack sampling on s390 Thomas Richter
2022-07-27  9:27 ` James Clark [this message]
2022-07-27  9:54   ` Thomas Richter

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=62efe3a0-21d7-dfee-2532-cf2090359548@arm.com \
    --to=james.clark@arm.com \
    --cc=acme@kernel.org \
    --cc=german.gomez@arm.com \
    --cc=gor@linux.ibm.com \
    --cc=hca@linux.ibm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-perf-users@vger.kernel.org \
    --cc=sumanthk@linux.ibm.com \
    --cc=svens@linux.ibm.com \
    --cc=tmricht@linux.ibm.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;
as well as URLs for NNTP newsgroup(s).