mirror of
https://chromium.googlesource.com/crosvm/crosvm
synced 2024-12-27 05:43:43 +00:00
kvm: add tests for get_supported_cpuid() and get_emulated_cpuid()
TEST=cargo test -p kvm BUG=None Change-Id: I2af245cb94d68faf091bf6788842c1932240df3d Signed-off-by: Dmitry Torokhov <dtor@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/947320 Reviewed-by: Zach Reizner <zachr@chromium.org>
This commit is contained in:
parent
532a94c1c8
commit
8da6543e74
1 changed files with 14 additions and 0 deletions
|
@ -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();
|
||||
|
|
Loading…
Reference in a new issue