From: Thomas Richter <tmricht@linux.ibm.com>
To: linux-kernel@vger.kernel.org, linux-s390@vger.kernel.org,
linux-perf-users@vger.kernel.org, acme@kernel.org,
namhyung@kernel.org, ctshao@google.com
Cc: agordeev@linux.ibm.com, gor@linux.ibm.com,
sumanthk@linux.ibm.com, hca@linux.ibm.com, japo@linux.ibm.com,
Thomas Richter <tmricht@linux.ibm.com>
Subject: [PATCH] perf test: Skip stat uniquifying test if unavailable
Date: Tue, 10 Jun 2025 16:45:07 +0200 [thread overview]
Message-ID: <20250610144507.2839326-1-tmricht@linux.ibm.com> (raw)
Commit cb422594d6206 ("perf test: Add stat uniquifying test")
introduced a new test case which uses an event named clockticks
which is exported as sysfs file .../uncore_imc_0/clockticks.
This file does not exist on s390 and causes the test case to
always fail.
Check for the existence of file clockticks and skip this
test if the event does not exist.
Output before:
# perf test 87
87: perf stat events uniquifying : FAILED!
# ./perf stat -e clockticks -A
event syntax error: 'clockticks'
\___ Bad event name
...
#
Output after:
# perf test 87
87: perf stat events uniquifying : Skip
#
Fixes: cb422594d6206 ("perf test: Add stat uniquifying test")
Signed-off-by: Thomas Richter <tmricht@linux.ibm.com>
Acked-by: Sumanth Korikkar <sumanthk@linux.ibm.com>
Cc: Chun-Tse Shao <ctshao@google.com>
---
tools/perf/tests/shell/stat+event_uniquifying.sh | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/tools/perf/tests/shell/stat+event_uniquifying.sh b/tools/perf/tests/shell/stat+event_uniquifying.sh
index 5ec35c52b7d9..485ee6e8f574 100755
--- a/tools/perf/tests/shell/stat+event_uniquifying.sh
+++ b/tools/perf/tests/shell/stat+event_uniquifying.sh
@@ -49,6 +49,11 @@ test_event_uniquifying() {
uniquified_event_array+=("${uniquified_event}")
done < <(${perf_tool} list -v ${event} | grep "\[Kernel PMU event\]")
+ if [ -z "$uniquified_event" ]
+ then
+ err=2
+ return
+ fi
perf_command="${perf_tool} stat -e $event -A -o ${stat_output} -- true"
$perf_command
--
2.49.0
next reply other threads:[~2025-06-10 14:45 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-06-10 14:45 Thomas Richter [this message]
2025-06-10 15:58 ` [PATCH] perf test: Skip stat uniquifying test if unavailable Chun-Tse Shao
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=20250610144507.2839326-1-tmricht@linux.ibm.com \
--to=tmricht@linux.ibm.com \
--cc=acme@kernel.org \
--cc=agordeev@linux.ibm.com \
--cc=ctshao@google.com \
--cc=gor@linux.ibm.com \
--cc=hca@linux.ibm.com \
--cc=japo@linux.ibm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-perf-users@vger.kernel.org \
--cc=linux-s390@vger.kernel.org \
--cc=namhyung@kernel.org \
--cc=sumanthk@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