From 97080193129d2736ad0d4f402bc23b1c836ef3eb Mon Sep 17 00:00:00 2001 From: Michael Zhao Date: Wed, 16 Jun 2021 16:02:55 +0800 Subject: [PATCH] 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 --- tests/integration.rs | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/tests/integration.rs b/tests/integration.rs index 60ab47f67..a351123dd 100644 --- a/tests/integration.rs +++ b/tests/integration.rs @@ -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); });