From febe70ae369e8290832bbf22e94a760d95e7af1a Mon Sep 17 00:00:00 2001 From: Anatol Belski Date: Tue, 14 Jul 2026 22:08:13 +0200 Subject: [PATCH] performance-metrics: Abort the run when a guest survives cleanup When a test process group cannot be reaped, the host is left with an orphaned guest whose ports and interfaces block later tests. Continuing produces cascading failures that hide the original issue. Treat a failed cleanup as a test error. By default the runner aborts, and under --continue-on-failure it records the failure and keeps going. Signed-off-by: Anatol Belski --- performance-metrics/src/main.rs | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/performance-metrics/src/main.rs b/performance-metrics/src/main.rs index f570a3109..156c0f9b4 100644 --- a/performance-metrics/src/main.rs +++ b/performance-metrics/src/main.rs @@ -26,6 +26,8 @@ enum Error { TestTimeout, #[error("Error: test failed")] TestFailed, + #[error("Error: guest process group survived cleanup")] + OrphanedGuest, } #[derive(Deserialize, Serialize)] @@ -1757,9 +1759,17 @@ fn run_test_with_timeout( }) .and_then(|r| r); - ProcessRegistry::cleanup(test.name); + let cleanup = ProcessRegistry::cleanup(test.name); - result + // Keep the test own error, else abort on a group that survived cleanup. + match (result, cleanup) { + (Err(e), _) => Err(e), + (Ok(_), Err(e)) => { + eprintln!("[Error] {e}"); + Err(Error::OrphanedGuest) + } + (Ok(r), Ok(())) => Ok(r), + } } fn settle_host() {