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:
Henry Wang
2020-06-28 17:36:23 +08:00
committed by Rob Bradford
parent 462c58d58b
commit d824d55562
3 changed files with 15 additions and 16 deletions
+5 -3
View File
@@ -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,