From c44b7679cf68f96e3190a57470197ed9b5fa814f Mon Sep 17 00:00:00 2001 From: Muminul Islam Date: Thu, 5 Mar 2026 17:57:21 -0800 Subject: [PATCH] tests: Add virtio vsock test for confidential VMs Add test_virtio_vsock to the common_cvm integration test module to verify that virtio vsock functionality works correctly in confidential guest environments. The test creates an Ubuntu Jammy-based confidential VM using GuestFactory and delegates to the existing _test_virtio_vsock helper with hotplug disabled. Signed-off-by: Muminul Islam --- cloud-hypervisor/tests/integration.rs | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/cloud-hypervisor/tests/integration.rs b/cloud-hypervisor/tests/integration.rs index 144a8706d..47c3c1f04 100644 --- a/cloud-hypervisor/tests/integration.rs +++ b/cloud-hypervisor/tests/integration.rs @@ -14938,4 +14938,12 @@ mod common_cvm { GuestFactory::new_confidential_guest_factory().create_guest(Box::new(disk_config)); _test_power_button(&guest); } + + #[test] + fn test_virtio_vsock() { + let disk_config = UbuntuDiskConfig::new(JAMMY_IMAGE_NAME.to_string()); + let guest = + GuestFactory::new_confidential_guest_factory().create_guest(Box::new(disk_config)); + _test_virtio_vsock(&guest, false); + } }