From 833d1d39a5a6f87fdfe7ba9066d0b8c3674853ce Mon Sep 17 00:00:00 2001 From: Muminul Islam Date: Sat, 21 Mar 2026 18:53:59 -0700 Subject: [PATCH] tests: add CVM test for memory_overhead Add a CVM integration test for memory_overhead that validates the same functionality using a confidential guest with the basic_cvm_guest macro and custom memory size. Signed-off-by: Muminul Islam --- cloud-hypervisor/tests/integration_cvm.rs | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/cloud-hypervisor/tests/integration_cvm.rs b/cloud-hypervisor/tests/integration_cvm.rs index c28ecc810..41cd75192 100644 --- a/cloud-hypervisor/tests/integration_cvm.rs +++ b/cloud-hypervisor/tests/integration_cvm.rs @@ -254,4 +254,12 @@ mod common_cvm { let guest = basic_cvm_guest!(JAMMY_IMAGE_NAME); _test_pci_bar_reprogramming(&guest); } + + #[test] + fn test_memory_overhead() { + let guest_memory_size_kb: u32 = 512 * 1024; + let guest = + basic_cvm_guest!(JAMMY_IMAGE_NAME).with_memory(&format!("{guest_memory_size_kb}K")); + _test_memory_overhead(&guest, guest_memory_size_kb); + } }