diff options
Diffstat (limited to 'tests/fs_file.rs')
-rw-r--r-- | tests/fs_file.rs | 21 |
1 files changed, 0 insertions, 21 deletions
diff --git a/tests/fs_file.rs b/tests/fs_file.rs index 1f4760e..bf2f1d7 100644 --- a/tests/fs_file.rs +++ b/tests/fs_file.rs @@ -22,27 +22,6 @@ async fn basic_read() { assert_eq!(n, HELLO.len()); assert_eq!(&buf[..n], HELLO); - - // Drop the data from the cache to stimulate uncached codepath on Linux (see preadv2 in - // file.rs) - #[cfg(target_os = "linux")] - { - use std::os::unix::io::AsRawFd; - nix::unistd::fsync(tempfile.as_raw_fd()).unwrap(); - nix::fcntl::posix_fadvise( - tempfile.as_raw_fd(), - 0, - 0, - nix::fcntl::PosixFadviseAdvice::POSIX_FADV_DONTNEED, - ) - .unwrap(); - } - - let mut file = File::open(tempfile.path()).await.unwrap(); - let n = file.read(&mut buf).await.unwrap(); - - assert_eq!(n, HELLO.len()); - assert_eq!(&buf[..n], HELLO); } #[tokio::test] |