[PATCH 1/6] perf test attr: Propagate the return value from the test to the wrapper

From: Arnaldo Carvalho de Melo

Date: Tue Oct 06 2026 - 12:13:44 EST


From: Michael Petlan <mpetlan@xxxxxxxxxx>

Currently it does not matter what the python script actually returns,
the test always passes, as the $err variable is always 0.

Fix that.

Fixes: 8519e4f44c2af722 ("perf test: Add a shell wrapper for "Setup struct perf_event_attr"")
Signed-off-by: Michael Petlan <mpetlan@xxxxxxxxxx>
Acked-by: Namhyung Kim <namhyung@xxxxxxxxxx>
Tested-by: Arnaldo Carvalho de Melo <acme@xxxxxxxxxx>
Signed-off-by: Arnaldo Carvalho de Melo <acme@xxxxxxxxxx>
---
tools/perf/tests/shell/attr.sh | 1 +
1 file changed, 1 insertion(+)

diff --git a/tools/perf/tests/shell/attr.sh b/tools/perf/tests/shell/attr.sh
index 5a4e43b2471de811..307e1535795a34dc 100755
--- a/tools/perf/tests/shell/attr.sh
+++ b/tools/perf/tests/shell/attr.sh
@@ -18,5 +18,6 @@ trap trap_cleanup EXIT TERM INT
shelldir=$(dirname "$0")
perf_path=$(which perf)
python "${shelldir}"/lib/attr.py -d "${shelldir}"/attr -v -p "$perf_path"
+err=$?
cleanup
exit $err
--
2.55.0