Skip to content

Commit a39a5f8

Browse files
committed
Disable posix_fadvise test on macOS, not in libc
1 parent 2a2dde1 commit a39a5f8

File tree

1 file changed

+12
-6
lines changed

1 file changed

+12
-6
lines changed

tests/run-pass/libc.rs

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,14 @@
55

66
extern crate libc;
77

8-
use std::convert::TryInto;
9-
use std::env::temp_dir;
10-
use std::fs::{File, remove_file};
11-
use std::io::Write;
12-
use std::os::unix::io::AsRawFd;
8+
#[cfg(not(target_os = "macos"))]
9+
fn test_posix_fadvise() {
10+
use std::convert::TryInto;
11+
use std::env::temp_dir;
12+
use std::fs::{File, remove_file};
13+
use std::io::Write;
14+
use std::os::unix::io::AsRawFd;
1315

14-
fn main() {
1516
let path = temp_dir().join("miri_test_libc.txt");
1617
// Cleanup before test
1718
remove_file(&path).ok();
@@ -34,3 +35,8 @@ fn main() {
3435
remove_file(&path).unwrap();
3536
assert_eq!(result, 0);
3637
}
38+
39+
fn main() {
40+
#[cfg(not(target_os = "macos"))]
41+
test_posix_fadvise();
42+
}

0 commit comments

Comments
 (0)