[PATCH v1 2/2] perf test annotate: Dump trapping test in trap handler
From: Ian Rogers
Date: Tue Aug 13 2024 - 00:06:39 EST
Help to better identify the location of test failures but dumping the
failing test in the trap handler.
Signed-off-by: Ian Rogers <irogers@xxxxxxxxxx>
---
tools/perf/tests/shell/annotate.sh | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/tools/perf/tests/shell/annotate.sh b/tools/perf/tests/shell/annotate.sh
index b072d9b97387..2ccf4f1d46b6 100755
--- a/tools/perf/tests/shell/annotate.sh
+++ b/tools/perf/tests/shell/annotate.sh
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/bin/bash
# perf annotate basic tests
# SPDX-License-Identifier: GPL-2.0
@@ -28,6 +28,7 @@ cleanup() {
}
trap_cleanup() {
+ echo "Unexpected signal in ${FUNCNAME[1]}"
cleanup
exit 1
}
--
2.46.0.76.ge559c4bf1a-goog