Skip to content

Commit

Permalink
Fixed virt_to_phys test failing due to uninitialized GUEST_ADDRESS
Browse files Browse the repository at this point in the history
  • Loading branch information
jounathaen committed Sep 18, 2024
1 parent 89ea5a6 commit 258784a
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/arch/x86_64/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,10 @@ mod tests {
.is_test(true)
.try_init();

use crate::vm::GUEST_ADDRESS;
let guest_address = GuestPhysAddr::new(0x11111000);
let _ = *GUEST_ADDRESS.get_or_init(|| guest_address);

let mem = MmapMemory::new(
0,
align_up!(MIN_PHYSMEM_SIZE * 2, 0x20_0000),
Expand Down

0 comments on commit 258784a

Please sign in to comment.