mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2025-02-01 17:35:19 +00:00
tests: Re-enable AArch64 snapshot/restore test
Signed-off-by: Henry Wang <Henry.Wang@arm.com>
This commit is contained in:
parent
8744162a0e
commit
894a46f30c
@ -4679,7 +4679,6 @@ mod tests {
|
|||||||
// through each ssh command. There's no need to perform a dedicated test to
|
// through each ssh command. There's no need to perform a dedicated test to
|
||||||
// verify the migration went well for virtio-net.
|
// verify the migration went well for virtio-net.
|
||||||
#[test]
|
#[test]
|
||||||
#[cfg(target_arch = "x86_64")]
|
|
||||||
fn test_snapshot_restore() {
|
fn test_snapshot_restore() {
|
||||||
let focal = UbuntuDiskConfig::new(FOCAL_IMAGE_NAME.to_string());
|
let focal = UbuntuDiskConfig::new(FOCAL_IMAGE_NAME.to_string());
|
||||||
let guest = Guest::new(Box::new(focal));
|
let guest = Guest::new(Box::new(focal));
|
||||||
@ -4750,22 +4749,26 @@ mod tests {
|
|||||||
|
|
||||||
guest.ssh_command(&console_cmd).unwrap();
|
guest.ssh_command(&console_cmd).unwrap();
|
||||||
|
|
||||||
// We check that removing and adding back the virtio-net device
|
// x86_64: We check that removing and adding back the virtio-net device
|
||||||
// does not break the snapshot/restore support for virtio-pci.
|
// does not break the snapshot/restore support for virtio-pci.
|
||||||
// This is an important thing to test as the hotplug will
|
// This is an important thing to test as the hotplug will
|
||||||
// trigger a PCI BAR reprogramming, which is a good way of
|
// trigger a PCI BAR reprogramming, which is a good way of
|
||||||
// checking if the stored resources are correctly restored.
|
// checking if the stored resources are correctly restored.
|
||||||
// Unplug the virtio-net device
|
// Unplug the virtio-net device
|
||||||
assert!(remote_command(&api_socket, "remove-device", Some(net_id),));
|
// AArch64: Device hotplug is currently not supported, skipping here.
|
||||||
thread::sleep(std::time::Duration::new(10, 0));
|
#[cfg(target_arch = "x86_64")]
|
||||||
|
{
|
||||||
|
assert!(remote_command(&api_socket, "remove-device", Some(net_id),));
|
||||||
|
thread::sleep(std::time::Duration::new(10, 0));
|
||||||
|
|
||||||
// Plug the virtio-net device again
|
// Plug the virtio-net device again
|
||||||
assert!(remote_command(
|
assert!(remote_command(
|
||||||
&api_socket,
|
&api_socket,
|
||||||
"add-net",
|
"add-net",
|
||||||
Some(net_params.as_str()),
|
Some(net_params.as_str()),
|
||||||
));
|
));
|
||||||
thread::sleep(std::time::Duration::new(10, 0));
|
thread::sleep(std::time::Duration::new(10, 0));
|
||||||
|
}
|
||||||
|
|
||||||
// Pause the VM
|
// Pause the VM
|
||||||
assert!(remote_command(&api_socket, "pause", None));
|
assert!(remote_command(&api_socket, "pause", None));
|
||||||
|
Loading…
x
Reference in New Issue
Block a user