diff --git a/kvm/src/lib.rs b/kvm/src/lib.rs index 2ab3a97484..970452f737 100644 --- a/kvm/src/lib.rs +++ b/kvm/src/lib.rs @@ -1095,6 +1095,20 @@ mod tests { assert!(!vm.check_extension(Cap::S390UserSigp)); } + #[test] + fn get_supported_cpuid() { + let kvm = Kvm::new().unwrap(); + let mut cpuid = kvm.get_supported_cpuid().unwrap(); + let cpuid_entries = cpuid.mut_entries_slice(); + assert!(cpuid_entries.len() > 0); + } + + #[test] + fn get_emulated_cpuid() { + let kvm = Kvm::new().unwrap(); + kvm.get_emulated_cpuid().unwrap(); + } + #[test] fn add_memory() { let kvm = Kvm::new().unwrap();