ci: Improve test_snapshot_restore with multiple vCPUs

Extend the existing integration test test_snapshot_restore by testing
with more than one vCPU.

Signed-off-by: Sebastien Boeuf <sebastien.boeuf@intel.com>
This commit is contained in:
Sebastien Boeuf 2020-06-30 09:17:30 +02:00 committed by Rob Bradford
parent e35d4c5b28
commit 514978b54a

View File

@ -4516,7 +4516,7 @@ mod tests {
let mut child = GuestCommand::new(&guest)
.args(&["--api-socket", &api_socket])
.args(&["--cpus", "boot=1"])
.args(&["--cpus", "boot=4"])
.args(&["--memory", "size=4G"])
.args(&["--kernel", kernel_path.to_str().unwrap()])
.args(&[
@ -4538,7 +4538,7 @@ mod tests {
thread::sleep(std::time::Duration::new(20, 0));
// Check the number of vCPUs
aver_eq!(tb, guest.get_cpu_count().unwrap_or_default(), 1);
aver_eq!(tb, guest.get_cpu_count().unwrap_or_default(), 4);
// Check the guest RAM
aver!(tb, guest.get_total_memory().unwrap_or_default() > 3_968_000);
// Check block devices are readable
@ -4646,7 +4646,7 @@ mod tests {
aver!(tb, remote_command(&api_socket, "resume", None));
// Perform same checks to validate VM has been properly restored
aver_eq!(tb, guest.get_cpu_count().unwrap_or_default(), 1);
aver_eq!(tb, guest.get_cpu_count().unwrap_or_default(), 4);
aver!(tb, guest.get_total_memory().unwrap_or_default() > 3_968_000);
aver!(
tb,