-
Notifications
You must be signed in to change notification settings - Fork 13.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
move reject with isolation for fcntl under F_FULLFSYNC
- Loading branch information
1 parent
8a36889
commit 0e2e617
Showing
7 changed files
with
26 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
12 changes: 12 additions & 0 deletions
12
src/tools/miri/tests/pass-dep/shims/fcntl_f-fullfsync_apple.rs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
//@only-target-apple: F_FULLFSYNC only on apple systems | ||
//@compile-flags: -Zmiri-isolation-error=warn-nobacktrace | ||
|
||
use std::io::Error; | ||
|
||
fn main() { | ||
// test `fcntl(F_FULLFSYNC)` | ||
unsafe { | ||
assert_eq!(libc::fcntl(1, libc::F_FULLFSYNC, 0), -1); | ||
assert_eq!(Error::last_os_error().raw_os_error(), Some(libc::EPERM)); | ||
} | ||
} |
2 changes: 2 additions & 0 deletions
2
src/tools/miri/tests/pass-dep/shims/fcntl_f-fullfsync_apple.stderr
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
warning: `fcntl` was made to return an error due to isolation | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 0 additions & 2 deletions
2
src/tools/miri/tests/pass-dep/shims/libc-fs-with-isolation.stderr
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters