mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2026-08-05 02:19:16 +00:00
unit tests: Fix broken AArch64 unit tests
https://github.com/cloud-hypervisor/cloud-hypervisor/pull/1225 introduces a hypervisor abstraction crate, which breaks some of the unit test cases on AArch64. This commit fixes related test cases. Signed-off-by: Henry Wang <henry.wang@arm.com>
This commit is contained in:
@@ -531,7 +531,7 @@ mod tests {
|
||||
use super::*;
|
||||
use crate::aarch64::gic::create_gic;
|
||||
use crate::aarch64::layout;
|
||||
use kvm_ioctls::Kvm;
|
||||
use std::sync::Arc;
|
||||
|
||||
const LEN: u64 = 4096;
|
||||
|
||||
@@ -585,8 +585,10 @@ mod tests {
|
||||
.iter()
|
||||
.cloned()
|
||||
.collect();
|
||||
let kvm = Kvm::new().unwrap();
|
||||
let vm = kvm.create_vm().unwrap();
|
||||
|
||||
let kvm = hypervisor::kvm::KvmHypervisor::new().unwrap();
|
||||
let hv: Arc<dyn hypervisor::Hypervisor> = Arc::new(kvm);
|
||||
let vm = hv.create_vm().unwrap();
|
||||
let gic = create_gic(&vm, 1).unwrap();
|
||||
assert!(create_fdt(
|
||||
&mem,
|
||||
|
||||
Reference in New Issue
Block a user