Skip to content

Commit

Permalink
Make the test file non-empty.
Browse files Browse the repository at this point in the history
  • Loading branch information
sunfishcode committed Jul 31, 2023
1 parent 2f23420 commit 4adad49
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions tests/fs/fcntl.rs
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,10 @@ fn test_fcntl_apple() {
)
.unwrap();

// It appears `fsync_rdadvise` at offset 0 length 0 doesn't work if the
// file has size zero, so write in some bytes.
assert_eq!(rustix::io::write(&foo, b"data").expect("write"), 4, "write failed");

rustix::fs::fcntl_rdadvise(&foo, 0, 0).unwrap();
rustix::fs::fcntl_fullfsync(&foo).unwrap();
rustix::fs::fcntl_nocache(&foo, true).unwrap();
Expand Down

0 comments on commit 4adad49

Please sign in to comment.