From bac762e4726c3a5a9c73eec8fea14262b190bc2f Mon Sep 17 00:00:00 2001 From: Rob Bradford Date: Mon, 21 Oct 2024 11:43:33 +0100 Subject: [PATCH] performance-metrics: Reap child process The snapshot/restore test didn't wait on the child being spawned: warning: spawned process is never `wait()`ed on --> performance-metrics/src/performance_tests.rs:495:25 | 495 | let mut child = GuestCommand::new(&guest) | _________________________^ 496 | | .args(["--api-socket", &api_socket_source]) 497 | | .args([ 498 | | "--cpus", ... | 507 | | .spawn() 508 | | .unwrap(); | |_____________________^ | = note: consider calling `.wait()` = note: not doing so might leave behind zombie processes = note: see https://doc.rust-lang.org/stable/std/process/struct.Child.html#warning = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#zombie_processes = note: `#[warn(clippy::zombie_processes)]` on by default Signed-off-by: Rob Bradford --- performance-metrics/src/performance_tests.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/performance-metrics/src/performance_tests.rs b/performance-metrics/src/performance_tests.rs index 75cfeff30..557075f2d 100644 --- a/performance-metrics/src/performance_tests.rs +++ b/performance-metrics/src/performance_tests.rs @@ -518,6 +518,7 @@ pub fn performance_restore_latency(control: &PerformanceTestControl) -> f64 { )); let _ = child.kill(); + child.wait().unwrap(); let event_path = String::from(guest.tmp_dir.as_path().join("event.json").to_str().unwrap()); let mut cmd = GuestCommand::new(&guest);