@@ -474,7 +474,7 @@ mod tests {
474
474
}
475
475
476
476
// ---- Test ReadVolatile for File ----
477
- #[ cfg( feature = "rawfd" ) ]
477
+ #[ cfg( all ( feature = "rawfd" , not ( miri ) ) ) ]
478
478
fn read_4_bytes_from_file ( source : Vec < u8 > , expected_output : [ u8 ; 5 ] ) {
479
479
let mut temp_file = TempFile :: new ( ) . unwrap ( ) . into_file ( ) ;
480
480
temp_file. write_all ( source. as_ref ( ) ) . unwrap ( ) ;
@@ -518,7 +518,7 @@ mod tests {
518
518
519
519
for ( input, output) in test_cases {
520
520
read_4_bytes_to_5_byte_memory ( input. clone ( ) , output) ;
521
- #[ cfg( feature = "rawfd" ) ]
521
+ #[ cfg( all ( feature = "rawfd" , not ( miri ) ) ) ]
522
522
read_4_bytes_from_file ( input, output) ;
523
523
}
524
524
}
@@ -559,7 +559,7 @@ mod tests {
559
559
}
560
560
561
561
// ---- Test ẂriteVolatile for File works ----
562
- #[ cfg( feature = "rawfd" ) ]
562
+ #[ cfg( all ( feature = "rawfd" , not ( miri ) ) ) ]
563
563
fn write_5_bytes_to_file ( mut source : Vec < u8 > ) {
564
564
// Test write_volatile for File works
565
565
let mut temp_file = TempFile :: new ( ) . unwrap ( ) . into_file ( ) ;
@@ -603,7 +603,7 @@ mod tests {
603
603
604
604
for ( input, output) in test_cases {
605
605
write_4_bytes_to_5_byte_vec ( input. clone ( ) , output) ;
606
- #[ cfg( feature = "rawfd" ) ]
606
+ #[ cfg( all ( feature = "rawfd" , not ( miri ) ) ) ]
607
607
write_5_bytes_to_file ( input) ;
608
608
}
609
609
}
0 commit comments