Skip to content

Commit e43bd82

Browse files
JBYoshiJonathanWoollett-Light
authored andcommitted
[Test code] ARM64: Decrease sizes of some values
These values can be changed to smaller types without causing problems. I've done this in a separate commit because my dev setup doesn't use ARM. In case something ARM-specific breaks in CI, I'd like to be able to keep those changes in their own commit so I can debug more easily. Signed-off-by: Jonathan Browne <[email protected]>
1 parent 46c9482 commit e43bd82

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/vmm/src/arch/aarch64/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ mod tests {
129129
let regions = arch_memory_regions(1usize << 41);
130130
assert_eq!(1, regions.len());
131131
assert_eq!(GuestAddress(super::layout::DRAM_MEM_START), regions[0].0);
132-
assert_eq!(super::layout::DRAM_MEM_MAX_SIZE, regions[0].1 as u64);
132+
assert_eq!(super::layout::DRAM_MEM_MAX_SIZE, regions[0].1);
133133
}
134134

135135
#[test]

src/vmm/src/arch/aarch64/regs.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -779,7 +779,7 @@ mod tests {
779779
let bytes = 69_u64.to_le_bytes();
780780
let reg_ref = Aarch64RegisterRef::new(KVM_REG_SIZE_U64, &bytes);
781781

782-
assert_eq!(u64::from(reg_ref.size()), 8);
782+
assert_eq!(reg_ref.size(), 8);
783783
assert_eq!(reg_ref.value::<u64, 8>(), 69);
784784
}
785785

@@ -808,7 +808,7 @@ mod tests {
808808
let mut bytes = 69_u64.to_le_bytes();
809809
let mut reg_ref = Aarch64RegisterRefMut::new(KVM_REG_SIZE_U64, &mut bytes);
810810

811-
assert_eq!(u64::from(reg_ref.size()), 8);
811+
assert_eq!(reg_ref.size(), 8);
812812
assert_eq!(reg_ref.value::<u64, 8>(), 69);
813813
reg_ref.set_value(reg_ref.value::<u64, 8>() + 1);
814814
assert_eq!(reg_ref.value::<u64, 8>(), 70);

0 commit comments

Comments
 (0)