mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2024-12-22 13:45:20 +00:00
tests: Remove unnecessary sleeps and kill on clean shutdown tests
On tests that expect a clean shutdown there is no need to try and kill the child after wait() has returned as the process has already exited. Further there is no need to sleep before wait() as wait will block until the VM and VMM shutdown is complete. Signed-off-by: Rob Bradford <robert.bradford@intel.com>
This commit is contained in:
parent
c98949bdd3
commit
5ade9d4610
@ -2398,13 +2398,10 @@ mod tests {
|
||||
.ssh_command("sudo shutdown -h now")
|
||||
.unwrap_or_default();
|
||||
|
||||
thread::sleep(std::time::Duration::new(20, 0));
|
||||
|
||||
// Check that the cloud-hypervisor binary actually terminated
|
||||
if let Ok(status) = child.wait() {
|
||||
aver_eq!(tb, status.success(), true);
|
||||
}
|
||||
let _ = child.kill();
|
||||
let _ = child.wait();
|
||||
});
|
||||
Ok(())
|
||||
@ -2460,7 +2457,6 @@ mod tests {
|
||||
if let Ok(status) = child.wait() {
|
||||
aver_eq!(tb, status.success(), true);
|
||||
}
|
||||
let _ = child.kill();
|
||||
let _ = child.wait();
|
||||
Ok(())
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user