Skip to contentSkip to conversation

perf test: Stat std output don't fail metric only

PATCH Applied Ian Rogers 2 participants 2 messages Sep 14, 2025 – Oct 2, 2025 perf events

lore
Share & tools
lore

Ian Rogers

author reviewer
#0 lore raw

PATCH 1/1 perf test: Stat std output don't fail metric only

When running on a hypervisor the expected IPC metric may be missing as the events may fail to be read. Don't expect metric output for this test to avoid it failing.

---
 tools/perf/tests/shell/stat+std_output.sh | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)
tools/perf/tests/shell/stat+std_output.sh +5 -1
index 6fee67693ba7..ec41f24299d9 100755
@@ -90,7 +90,11 @@ function commachecker()
 		}
 	done < "${stat_output}"
 
-	[ $metric_only -eq 1 ] && exit 1
+	if [ $metric_only -ne 1 ]
+	then
+		echo "Missing metric only output in:"
+		cat "${stat_output}"
+	fi
 	return 0
 }
 
Signature · 1 line
2.51.0.384.g4c02a37b29-goog
maintainer Applied
#1 lore raw
Quoted 3 lines · Ian Rogers

When running on a hypervisor the expected IPC metric may be missing as the events may fail to be read. Don't expect metric output for this test to avoid it failing.

Thanks, applied to perf-tools-next,

- Arnaldo

Quoted 25 lines
---
 tools/perf/tests/shell/stat+std_output.sh | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)
tools/perf/tests/shell/stat+std_output.sh +5 -1
index 6fee67693ba7..ec41f24299d9 100755
@@ -90,7 +90,11 @@ function commachecker()
 		}
 	done < "${stat_output}"
 
-	[ $metric_only -eq 1 ] && exit 1
+	if [ $metric_only -ne 1 ]
+	then
+		echo "Missing metric only output in:"
+		cat "${stat_output}"
+	fi
 	return 0
 }
 
Signature · 1 line
2.51.0.384.g4c02a37b29-goog