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:   Tue, 1 Feb 2022 10:39:02 +0000
From:   John Garry <john.garry@...wei.com>
To:     Ian Rogers <irogers@...gle.com>,
        Kan Liang <kan.liang@...ux.intel.com>,
        Zhengjun Xing <zhengjun.xing@...ux.intel.com>,
        Peter Zijlstra <peterz@...radead.org>,
        Ingo Molnar <mingo@...hat.com>,
        "Arnaldo Carvalho de Melo" <acme@...nel.org>,
        Mark Rutland <mark.rutland@....com>,
        "Alexander Shishkin" <alexander.shishkin@...ux.intel.com>,
        Jiri Olsa <jolsa@...hat.com>,
        Namhyung Kim <namhyung@...nel.org>,
        Maxime Coquelin <mcoquelin.stm32@...il.com>,
        Alexandre Torgue <alexandre.torgue@...s.st.com>,
        Andi Kleen <ak@...ux.intel.com>,
        James Clark <james.clark@....com>,
        <linux-kernel@...r.kernel.org>, <linux-perf-users@...r.kernel.org>
CC:     Stephane Eranian <eranian@...gle.com>
Subject: Re: [PATCH v2 01/26] perf test: Allow skip for all metrics test

On 01/02/2022 01:58, Ian Rogers wrote:

nit: the subject is a bit ambiguous, as it implies skipping all the 
tests, when we just may skip some now

> Some Intel TMA metrics compute a ratio that may divide by 0, which
> causes the metric not to print. This happens for metrics with FP_ARITH
> events. If we see these events in the result and would otherwise fail,
> then switch to a skip.
> Also, don't early exit when processing metrics.
> 
> Reviewed-by: Kan Liang <kan.liang@...ux.intel.com>
> Signed-off-by: Ian Rogers <irogers@...gle.com>

Reviewed-by: John Garry <john.garry@...wei.com>

> ---
>   tools/perf/tests/shell/stat_all_metrics.sh | 10 ++++++++--
>   1 file changed, 8 insertions(+), 2 deletions(-)
> 
> diff --git a/tools/perf/tests/shell/stat_all_metrics.sh b/tools/perf/tests/shell/stat_all_metrics.sh
> index 7f4ba3cad632..e7c59e5a7a98 100755
> --- a/tools/perf/tests/shell/stat_all_metrics.sh
> +++ b/tools/perf/tests/shell/stat_all_metrics.sh
> @@ -4,6 +4,7 @@
>   
>   set -e
>   
> +err=0
>   for m in $(perf list --raw-dump metrics); do
>     echo "Testing $m"
>     result=$(perf stat -M "$m" true 2>&1)
> @@ -14,9 +15,14 @@ for m in $(perf list --raw-dump metrics); do
>       if [[ ! "$result" =~ "$m" ]]; then
>         echo "Metric '$m' not printed in:"
>         echo "$result"
> -      exit 1
> +      if [[ "$result" =~ "FP_ARITH" && "$err" != "1" ]]; then
> +        echo "Skip, not fail, for FP issues"
> +        err=2
> +      else
> +        err=1
> +      fi
>       fi
>     fi
>   done
>   
> -exit 0
> +exit "$err"
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ