File tree Expand file tree Collapse file tree 1 file changed +3
-6
lines changed
crates/std_detect/src/detect/os/linux Expand file tree Collapse file tree 1 file changed +3
-6
lines changed Original file line number Diff line number Diff line change @@ -318,16 +318,13 @@ mod tests {
318
318
}
319
319
320
320
#[ test]
321
- #[ should_panic]
322
321
fn linux_macos_vb( ) {
323
322
let file = concat!( env!( "CARGO_MANIFEST_DIR" ) , "/src/detect/test_data/macos-virtualbox-linux-x86-4850HQ.auxv" ) ;
324
323
println!( "file: {}" , file) ;
324
+ // The file contains HWCAP but not HWCAP2. In that case, we treat HWCAP2 as zero.
325
325
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 ) ;
331
328
}
332
329
} else if #[ cfg( target_arch = "aarch64" ) ] {
333
330
#[ test]
You can’t perform that action at this time.
0 commit comments