mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2025-02-22 11:22:26 +00:00
tests: clean up snapshot dir after restore
The snapshot_dir is not needed anymore fter the guest is restored. Hence, remove it. This will potentially avoid transient failures caused due to insufficient disk space. Signed-off-by: Purna Pavan Chandra <paekkaladevi@linux.microsoft.com>
This commit is contained in:
parent
1aeaee221d
commit
1a94c6c932
@ -2344,7 +2344,10 @@ fn make_guest_panic(guest: &Guest) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
mod common_parallel {
|
mod common_parallel {
|
||||||
use std::{fs::OpenOptions, io::SeekFrom};
|
use std::{
|
||||||
|
fs::{remove_dir_all, OpenOptions},
|
||||||
|
io::SeekFrom,
|
||||||
|
};
|
||||||
|
|
||||||
use crate::*;
|
use crate::*;
|
||||||
|
|
||||||
@ -6229,6 +6232,9 @@ mod common_parallel {
|
|||||||
&event_path_restored
|
&event_path_restored
|
||||||
));
|
));
|
||||||
|
|
||||||
|
// Remove the snapshot dir
|
||||||
|
let _ = remove_dir_all(snapshot_dir.as_str());
|
||||||
|
|
||||||
let r = std::panic::catch_unwind(|| {
|
let r = std::panic::catch_unwind(|| {
|
||||||
// Resume the VM
|
// Resume the VM
|
||||||
assert!(remote_command(&api_socket_restored, "resume", None));
|
assert!(remote_command(&api_socket_restored, "resume", None));
|
||||||
|
Loading…
x
Reference in New Issue
Block a user