[PATCH] perf test: Fix test case 120 and 121 for s390
From: Thomas Richter
Date: Fri Mar 06 2026 - 02:12:05 EST
Perf tests
120: 'perf data convert --to-ctf' command test
121: 'perf data convert --to-json' command test
fail on s390. It is caused by selecting the default event cycles
which does not exist on s390 z/VM. Use software event cpu-clock
and specify it explicitly on the command line.
Output before:
❯ perf test 120 121
120: 'perf data convert --to-ctf' command test : FAILED!
121: 'perf data convert --to-json' command test : FAILED!
Output after:
❯ perf test 120 121
120: 'perf data convert --to-ctf' command test : Ok
121: 'perf data convert --to-json' command test : Ok
Signed-off-by: Thomas Richter <tmricht@xxxxxxxxxxxxx>
---
tools/perf/tests/shell/test_perf_data_converter_ctf.sh | 4 ++--
tools/perf/tests/shell/test_perf_data_converter_json.sh | 4 ++--
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/tools/perf/tests/shell/test_perf_data_converter_ctf.sh b/tools/perf/tests/shell/test_perf_data_converter_ctf.sh
index 334eebc9945e..1d404d404cea 100755
--- a/tools/perf/tests/shell/test_perf_data_converter_ctf.sh
+++ b/tools/perf/tests/shell/test_perf_data_converter_ctf.sh
@@ -37,7 +37,7 @@ test_ctf_converter_file()
{
echo "Testing Perf Data Conversion Command to CTF (File input)"
# Record some data
- if ! perf record -o "$perfdata" -F 99 -g -- perf test -w noploop
+ if ! perf record -o "$perfdata" -e cpu-clock -F 99 -g -- perf test -w noploop
then
echo "Failed to record perf data"
err=1
@@ -73,7 +73,7 @@ test_ctf_converter_pipe()
rm -rf "${ctf_dir}"
# Record to stdout and pipe to $perfdata file
- if ! perf record -o - -F 99 -g -- perf test -w noploop > "$perfdata"
+ if ! perf record -o - -e cpu-clock -F 99 -g -- perf test -w noploop > "$perfdata"
then
echo "Failed to record perf data"
err=1
diff --git a/tools/perf/tests/shell/test_perf_data_converter_json.sh b/tools/perf/tests/shell/test_perf_data_converter_json.sh
index 35d81e39a26c..7ee235b84a7d 100755
--- a/tools/perf/tests/shell/test_perf_data_converter_json.sh
+++ b/tools/perf/tests/shell/test_perf_data_converter_json.sh
@@ -31,7 +31,7 @@ trap trap_cleanup exit term int
test_json_converter_command()
{
echo "Testing Perf Data Conversion Command to JSON"
- perf record -o "$perfdata" -F 99 -g -- perf test -w noploop
+ perf record -o "$perfdata" -e cpu-clock -F 99 -g -- perf test -w noploop
perf data convert --to-json "$result" --force -i "$perfdata"
if [ "$(cat ${result} | wc -l)" -gt "0" ] ; then
echo "Perf Data Converter Command to JSON [SUCCESS]"
@@ -44,7 +44,7 @@ test_json_converter_command()
test_json_converter_pipe()
{
echo "Testing Perf Data Conversion Command to JSON (Pipe mode)"
- perf record -o - -F 99 -g -- perf test -w noploop > "$perfdata"
+ perf record -o - -e cpu-clock -F 99 -g -- perf test -w noploop > "$perfdata"
cat "$perfdata" | perf data convert --to-json "$result" --force -i -
if [ "$(cat ${result} | wc -l)" -gt "0" ] ; then
echo "Perf Data Converter Command to JSON (Pipe mode) [SUCCESS]"
--
2.53.0