From c7a152ee7950005ca6e20e775226e23f640382f6 Mon Sep 17 00:00:00 2001 From: Anirudh Rayabharam Date: Thu, 16 Apr 2026 10:02:00 +0000 Subject: [PATCH] performance-metrics: fix overly broad process cleanup Drop the -f flag from the process termination command in cleanup_stale_processes() so it matches by process name only, not the full command line. This prevents terminating unrelated processes whose arguments happen to contain target strings (e.g., the test runner invoked with --report-file /cloud-hypervisor/report.json). Use the truncated name 'cloud-hyperviso' because Linux limits process names to 15 characters. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Signed-off-by: Anirudh Rayabharam --- performance-metrics/src/main.rs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/performance-metrics/src/main.rs b/performance-metrics/src/main.rs index 622d8793c..c18ef70dc 100644 --- a/performance-metrics/src/main.rs +++ b/performance-metrics/src/main.rs @@ -1297,8 +1297,9 @@ fn run_test_with_timeout( } fn cleanup_stale_processes() { - for proc in &["cloud-hypervisor", "iperf3", "ethr"] { - let _ = Command::new("pkill").args(["-9", "-f", proc]).status(); + // "cloud-hyperviso" - process name truncated to 15 chars by the kernel + for proc in &["cloud-hyperviso", "iperf3", "ethr"] { + let _ = Command::new("pkill").args(["-9", proc]).status(); } thread::sleep(Duration::from_secs(2)); }