Extend the basic VM command test to assert that GPU configuration includes the expected crosvm vhost-user GPU socket path. This adds coverage for the generated GPU service wiring without requiring a full VM boot. Signed-off-by: colbyt <colby@colbyt.com> --- tools/start-vmm/tests/vm_command-basic.rs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tools/start-vmm/tests/vm_command-basic.rs b/tools/start-vmm/tests/vm_command-basic.rs index 2e9ad0c..80937ef 100644 --- a/tools/start-vmm/tests/vm_command-basic.rs +++ b/tools/start-vmm/tests/vm_command-basic.rs @@ -32,6 +32,11 @@ fn main() -> std::io::Result<()> { let expected = "/run/service/vm-services/instance/testvm/data/service/vhost-user-fs/env/virtiofsd.sock"; assert_eq!(fs1.socket, expected); + assert_eq!(config.gpu.len(), 1); + let gpu1 = &config.gpu[0]; + let expected = + "/run/service/vm-services/instance/testvm/data/service/vhost-user-gpu/env/crosvm.sock"; + assert_eq!(gpu1.socket, expected); assert_eq!(PathBuf::from(config.payload.kernel), kernel_path); #[cfg(target_arch = "x86_64")] assert_eq!(config.payload.cmdline, "console=ttyS0 root=PARTLABEL=root"); -- 2.54.0