tests: Enhance test_large_vm case

Enhanced the test case test_large_vm to check the number of total VCPUs
and on-line VCPUs.

Signed-off-by: Michael Zhao <michael.zhao@arm.com>
This commit is contained in:
Michael Zhao 2021-06-16 16:02:55 +08:00 committed by Sebastien Boeuf
parent 14c0e8424b
commit 9708019312

View File

@ -2077,6 +2077,17 @@ mod tests {
guest.wait_vm_boot(None).unwrap();
let r = std::panic::catch_unwind(|| {
assert_eq!(guest.get_cpu_count().unwrap_or_default(), 48);
assert_eq!(
guest
.ssh_command(
"lscpu | grep \"On-line\" | cut -f 2 -d \":\" | sed \"s# *##\""
)
.unwrap()
.trim(),
"0-47"
);
assert!(guest.get_total_memory().unwrap_or_default() > 5_000_000);
});