lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Wed, 27 Jul 2022 10:27:37 +0100
From:   James Clark <james.clark@....com>
To:     Thomas Richter <tmricht@...ux.ibm.com>
Cc:     svens@...ux.ibm.com, gor@...ux.ibm.com, sumanthk@...ux.ibm.com,
        hca@...ux.ibm.com, linux-kernel@...r.kernel.org,
        linux-perf-users@...r.kernel.org, acme@...nel.org,
        german.gomez@....com
Subject: Re: [PATCH] perf/tests: Fix test case 95 Check branch stack sampling
 on s390



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@...ux.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@....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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ