Disable posix_fadvise test on macOS, not in libc
This commit is contained in:
parent
2a2dde1494
commit
a39a5f8189
1 changed files with 12 additions and 6 deletions
|
|
@ -5,13 +5,14 @@
|
|||
|
||||
extern crate libc;
|
||||
|
||||
use std::convert::TryInto;
|
||||
use std::env::temp_dir;
|
||||
use std::fs::{File, remove_file};
|
||||
use std::io::Write;
|
||||
use std::os::unix::io::AsRawFd;
|
||||
#[cfg(not(target_os = "macos"))]
|
||||
fn test_posix_fadvise() {
|
||||
use std::convert::TryInto;
|
||||
use std::env::temp_dir;
|
||||
use std::fs::{File, remove_file};
|
||||
use std::io::Write;
|
||||
use std::os::unix::io::AsRawFd;
|
||||
|
||||
fn main() {
|
||||
let path = temp_dir().join("miri_test_libc.txt");
|
||||
// Cleanup before test
|
||||
remove_file(&path).ok();
|
||||
|
|
@ -34,3 +35,8 @@ fn main() {
|
|||
remove_file(&path).unwrap();
|
||||
assert_eq!(result, 0);
|
||||
}
|
||||
|
||||
fn main() {
|
||||
#[cfg(not(target_os = "macos"))]
|
||||
test_posix_fadvise();
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue