Skip to content

Commit 00ea554

Browse files
committed
+ Fix an AArch32 test.
1 parent db0b4f8 commit 00ea554

File tree

1 file changed

+3
-6
lines changed
  • crates/std_detect/src/detect/os/linux

1 file changed

+3
-6
lines changed

crates/std_detect/src/detect/os/linux/auxvec.rs

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -318,16 +318,13 @@ mod tests {
318318
}
319319

320320
#[test]
321-
#[should_panic]
322321
fn linux_macos_vb() {
323322
let file = concat!(env!("CARGO_MANIFEST_DIR"), "/src/detect/test_data/macos-virtualbox-linux-x86-4850HQ.auxv");
324323
println!("file: {}", file);
324+
// The file contains HWCAP but not HWCAP2. In that case, we treat HWCAP2 as zero.
325325
let v = auxv_from_file(file).unwrap();
326-
// this file is incomplete (contains hwcap but not hwcap2), we
327-
// want to fall back to /proc/cpuinfo in this case, so
328-
// reading should fail. assert_eq!(v.hwcap, 126614527);
329-
// assert_eq!(v.hwcap2, 0);
330-
let _ = v;
326+
assert_eq!(v.hwcap, 126614527);
327+
assert_eq!(v.hwcap2, 0);
331328
}
332329
} else if #[cfg(target_arch = "aarch64")] {
333330
#[test]

0 commit comments

Comments
 (0)