[PATCH 6.18 013/752] perf tests sched: Avoid error in cleanup on loaded machines

Sasha Levin
2026-02-28T17:48:17Z

From: Ian Rogers <irogers@google.com>

[ Upstream commit c5e47e4d00fbc15f2390bb6ed8d9c21836363291 ]

The stop_noploops function will kill the noploop processes that are
running for 10 seconds.

On a loaded machine they may have already terminated meaning the kill
will return an error of no such process.

This doesn't matter and so ignore the error to avoid the test
terminating in the cleanup.

Fixes: 0e22c5ca44e68798 ("perf test: Add sched latency and script shell tests")
Signed-off-by: Ian Rogers <irogers@google.com>
Tested-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Ian Rogers <irogers@google.com>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: James Clark <james.clark@linaro.org>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
tools/perf/tests/shell/sched.sh | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/perf/tests/shell/sched.sh b/tools/perf/tests/shell/sched.sh
index b9b81eaf856e6..b9637069adb1f 100755
--- a/tools/perf/tests/shell/sched.sh
+++ b/tools/perf/tests/shell/sched.sh
@@ -53,7 +53,7 @@ start_noploops() {
}

cleanup_noploops() {
- kill "$PID1" "$PID2"
+ kill "$PID1" "$PID2" || true
}

test_sched_record() {
--
2.51.0