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] [day] [month] [year] [list]
Message-ID: <CAJpZYjU3o0uFbDNhttpRFOv4j+RfTfdJqeP_4bejp_-_qoUkDA@mail.gmail.com>
Date: Fri, 6 Jun 2025 19:55:54 -0700
From: Chun-Tse Shao <ctshao@...gle.com>
To: Arnaldo Carvalho de Melo <acme@...nel.org>
Cc: Namhyung Kim <namhyung@...nel.org>, Adrian Hunter <adrian.hunter@...el.com>, 
	Alexander Shishkin <alexander.shishkin@...ux.intel.com>, Andi Kleen <ak@...ux.intel.com>, 
	"Dr. David Alan Gilbert" <linux@...blig.org>, Howard Chu <howardchu95@...il.com>, 
	Ian Rogers <irogers@...gle.com>, Ingo Molnar <mingo@...hat.com>, 
	James Clark <james.clark@...aro.org>, Jiri Olsa <jolsa@...nel.org>, 
	Kan Liang <kan.liang@...ux.intel.com>, Levi Yun <yeoreum.yun@....com>, 
	Mark Rutland <mark.rutland@....com>, Peter Zijlstra <peterz@...radead.org>, 
	Weilin Wang <weilin.wang@...el.com>, 
	Linux Kernel Mailing List <linux-kernel@...r.kernel.org>, linux-perf-users@...r.kernel.org
Subject: Re: [PATCH 1/1 v6.16] perf test event_uniquifying: Skip test on
 platforms without 'clockticks' events

Thank you Arnaldo for finding this problem. Please feel free to amend your fix.

-CT

On Fri, Jun 6, 2025 at 1:25 PM Arnaldo Carvalho de Melo <acme@...nel.org> wrote:
>
> On Fri, Jun 06, 2025 at 05:18:07PM -0300, Arnaldo Carvalho de Melo wrote:
> > On Fri, Jun 06, 2025 at 10:52:02AM -0700, Namhyung Kim wrote:
> > > On Thu, Jun 05, 2025 at 04:22:40PM -0300, Arnaldo Carvalho de Melo wrote:
> > > > I'll add this to perf-tools for v6.16, please check.
>
> > > Plesae see
>
> > > https://lore.kernel.org/linux-perf-users/20250521224513.1104129-1-ctshao@google.com/
>
> > Oh, great, I'll drop my fix and get that one instead.
>
> Nope, that one returns ok if the test can't be performed, it should
> return 2 so that it is skipped and since we don't have a way to show the
> reason for skipping a shell test, when using 'perf test -vv' the warning
> that is there already (the needed PMU not being available) will be
> shown.
>
> So I'm amending this on top, ok?
>
> diff --git a/tools/perf/tests/shell/stat+event_uniquifying.sh b/tools/perf/tests/shell/stat+event_uniquifying.sh
> index 5a51fbaa13bb9b3c..c39d77ab4ad95bfc 100755
> --- a/tools/perf/tests/shell/stat+event_uniquifying.sh
> +++ b/tools/perf/tests/shell/stat+event_uniquifying.sh
> @@ -47,6 +47,7 @@ test_event_uniquifying() {
>    # Skip if the machine does not have `uncore_imc` device.
>    if ! ${perf_tool} list pmu | grep -q ${pmu}; then
>      echo "Target does not support pmu ${pmu} [Skipped]"
> +    err=2
>      return
>    fi
>
> Then we get:
> root@...ber:~# perf test uniqu
>  93: perf stat events uniquifying                                    : Skip
> root@...ber:~#
>
> Instead of the misleading:
>
> root@...ber:~# perf test uniqu
>  93: perf stat events uniquifying                                    : Ok
> root@...ber:~#
>
> With -vv and the fix:
>
> root@...ber:~# perf test -vv uniqu
>  93: perf stat events uniquifying:
> --- start ---
> test child forked, pid 94671
> stat event uniquifying test
> Target does not support PMU uncore_imc [Skipped]
> ---- end(-2) ----
>  93: perf stat events uniquifying                                    : Skip
> root@...ber:~#
>
> - Arnaldo

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ