All of lore.kernel.org
 help / color / mirror / Atom feed
From: Arnaldo Carvalho de Melo <acme@kernel.org>
To: Namhyung Kim <namhyung@kernel.org>
Cc: Chun-Tse Shao <ctshao@google.com>,
	Adrian Hunter <adrian.hunter@intel.com>,
	Alexander Shishkin <alexander.shishkin@linux.intel.com>,
	Andi Kleen <ak@linux.intel.com>,
	"Dr. David Alan Gilbert" <linux@treblig.org>,
	Howard Chu <howardchu95@gmail.com>,
	Ian Rogers <irogers@google.com>, Ingo Molnar <mingo@redhat.com>,
	James Clark <james.clark@linaro.org>,
	Jiri Olsa <jolsa@kernel.org>,
	Kan Liang <kan.liang@linux.intel.com>,
	Levi Yun <yeoreum.yun@arm.com>,
	Mark Rutland <mark.rutland@arm.com>,
	Peter Zijlstra <peterz@infradead.org>,
	Weilin Wang <weilin.wang@intel.com>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	linux-perf-users@vger.kernel.org
Subject: Re: [PATCH 1/1 v6.16] perf test event_uniquifying: Skip test on platforms without 'clockticks' events
Date: Fri, 6 Jun 2025 17:25:18 -0300	[thread overview]
Message-ID: <aENOrmDxKPYAaYNR@x1> (raw)
In-Reply-To: <aENM_KGb-x14pHRX@x1>

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@number:~# perf test uniqu
 93: perf stat events uniquifying                                    : Skip
root@number:~#

Instead of the misleading:

root@number:~# perf test uniqu
 93: perf stat events uniquifying                                    : Ok
root@number:~# 

With -vv and the fix:

root@number:~# 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@number:~#

- Arnaldo

  reply	other threads:[~2025-06-06 20:25 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-06-05 19:22 [PATCH 1/1 v6.16] perf test event_uniquifying: Skip test on platforms without 'clockticks' events Arnaldo Carvalho de Melo
2025-06-06 17:52 ` Namhyung Kim
2025-06-06 20:18   ` Arnaldo Carvalho de Melo
2025-06-06 20:25     ` Arnaldo Carvalho de Melo [this message]
2025-06-07  2:55       ` Chun-Tse Shao
2025-06-09 15:18         ` Arnaldo Carvalho de Melo

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=aENOrmDxKPYAaYNR@x1 \
    --to=acme@kernel.org \
    --cc=adrian.hunter@intel.com \
    --cc=ak@linux.intel.com \
    --cc=alexander.shishkin@linux.intel.com \
    --cc=ctshao@google.com \
    --cc=howardchu95@gmail.com \
    --cc=irogers@google.com \
    --cc=james.clark@linaro.org \
    --cc=jolsa@kernel.org \
    --cc=kan.liang@linux.intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-perf-users@vger.kernel.org \
    --cc=linux@treblig.org \
    --cc=mark.rutland@arm.com \
    --cc=mingo@redhat.com \
    --cc=namhyung@kernel.org \
    --cc=peterz@infradead.org \
    --cc=weilin.wang@intel.com \
    --cc=yeoreum.yun@arm.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.