Dragonball: fix test_handler_insert_region

the mmap region start guest addr hard-code a value and later there
 would be check whether the mentioned addr is larger than or equal
 to mem_end (default to host_phy_mem >> 1) in order to satisfy the
 requirement for DaxMemory. Since github virt machine phy_mem is larger
 than previous CI machine we use, the hard-code value could no longer be
 worked. To fix this, we change the address to mem_end in unit test to
 avoid the influence of host machine change.

fixes: #9207
Signed-off-by: Chao Wu <chaowu@linux.alibaba.com>
This commit is contained in:
Chao Wu
2024-03-03 23:34:06 +08:00
parent daab76de36
commit 253fe72435

View File

@@ -1429,11 +1429,7 @@ mod tests {
Some(vm.vm_config().clone()), Some(vm.vm_config().clone()),
vm.shared_info().clone(), vm.shared_info().clone(),
); );
#[cfg(target_arch = "x86_64")] let guest_addr = GuestAddress(*dbs_boot::layout::GUEST_MEM_END);
let guest_addr = GuestAddress(0x200000000000);
// TODO: #7290 - https://github.com/kata-containers/kata-containers/issues/7290
#[cfg(target_arch = "aarch64")]
let guest_addr = GuestAddress(0xF800000000);
let cache_len = 1024 * 1024 * 1024; let cache_len = 1024 * 1024 * 1024;
let mmap_region = MmapRegion::build( let mmap_region = MmapRegion::build(