[PATCH 2/4] perf tests c2c: Report skip when the workload fails
From: Jiebin Sun
Date: Fri Aug 21 2026 - 01:50:22 EST
The workload path leaves err at 0 and returns, so the test exits 0 and is
reported as a pass even though nothing was recorded and neither report
invocation ran. The check_c2c_support() path above it already sets err=2.
Set err=2 there as well so a failing workload is reported as a skip.
Fixes: ac881007c4bf ("perf tests c2c: Add a basic c2c")
Signed-off-by: Jiebin Sun <jiebin.sun@xxxxxxxxx>
Cc: Dapeng Mi <dapeng1.mi@xxxxxxxxxxxxxxx>
Cc: Ian Rogers <irogers@xxxxxxxxxx>
Cc: James Clark <james.clark@xxxxxxxxxx>
Cc: Namhyung Kim <namhyung@xxxxxxxxxx>
Cc: Thomas Falcon <thomas.falcon@xxxxxxxxx>
Reviewed-by: Tianyou Li <tianyou.li@xxxxxxxxx>
Reviewed-by: Wangyang Guo <wangyang.guo@xxxxxxxxx>
---
tools/perf/tests/shell/c2c.sh | 1 +
1 file changed, 1 insertion(+)
diff --git a/tools/perf/tests/shell/c2c.sh b/tools/perf/tests/shell/c2c.sh
index 2471d44595c3..f5f223cbf9cc 100755
--- a/tools/perf/tests/shell/c2c.sh
+++ b/tools/perf/tests/shell/c2c.sh
@@ -39,6 +39,7 @@ test_c2c_record_report() {
# Run a workload that does some memory operations.
if ! perf c2c record -o "${perfdata}" -- perf test -w datasym 1 > /dev/null 2>&1 ; then
echo "c2c record and report test [Skipped: perf c2c record failed during workload]"
+ err=2
return
fi
--
2.52.0