Skip to contentSkip to conversation

perf tests sched: Avoid error in cleanup on loaded machines

PATCH Applied Ian Rogers 2 participants 2 messages Jan 22 – Jan 23 perf events

lore
Share & tools
lore

Ian Rogers

author reviewer
#0 lore raw

PATCH 1/1 perf tests sched: Avoid error in cleanup on loaded machines

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 0e22c5ca44e6 ("perf test: Add sched latency and script shell tests")
---
 tools/perf/tests/shell/sched.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
tools/perf/tests/shell/sched.sh +1 -1
index b9b81eaf856e..b9637069adb1 100755
@@ -53,7 +53,7 @@ start_noploops() {
 }
 
 cleanup_noploops() {
-  kill "$PID1" "$PID2"
+  kill "$PID1" "$PID2" || true
 }
 
 test_sched_record() {
Signature · 1 line
2.52.0.457.g6b5491de43-goog
maintainer Applied
#1 lore raw
Quoted 7 lines · Ian Rogers

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 0e22c5ca44e6 ("perf test: Add sched latency and script shell tests")

Thanks, applied to perf-tools-next,

- Arnaldo

Quoted 20 lines
---
 tools/perf/tests/shell/sched.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
tools/perf/tests/shell/sched.sh +1 -1
index b9b81eaf856e..b9637069adb1 100755
@@ -53,7 +53,7 @@ start_noploops() {
 }
 
 cleanup_noploops() {
-  kill "$PID1" "$PID2"
+  kill "$PID1" "$PID2" || true
 }
 
 test_sched_record() {
Signature · 1 line
2.52.0.457.g6b5491de43-goog