summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xtools/perf/tests/shell/trace_summary.sh13
1 files changed, 9 insertions, 4 deletions
diff --git a/tools/perf/tests/shell/trace_summary.sh b/tools/perf/tests/shell/trace_summary.sh
index d5da1d7d8d88..273199a29a20 100755
--- a/tools/perf/tests/shell/trace_summary.sh
+++ b/tools/perf/tests/shell/trace_summary.sh
@@ -27,10 +27,15 @@ test_perf_trace() {
count=$(grep -E -c -m 3 "${search}" ${OUTPUT})
if [ "${count}" != "3" ]; then
- echo "Error: cannot find enough pattern ${search} in the output"
- cat ${OUTPUT}
- rm -f ${OUTPUT}
- exit 1
+ echo "Error: cannot find enough pattern ${search} (count=${count}) in output of:"
+ echo "Error: perf trace ${args} -- ${workload}"
+ echo "Error: matched lines:"
+ grep -E "${search}" ${OUTPUT} || echo "none"
+ echo "Error: last 20 lines of output:"
+ # The summary comes last, after any -S trace output.
+ tail -n 20 ${OUTPUT}
+ rm -f ${OUTPUT}
+ exit 1
fi
}