Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove O_DIRECT from basic_read_test #114

Merged
merged 1 commit into from
Feb 24, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 2 additions & 11 deletions s3-file-connector/tests/fuse_tests/mount_test.rs
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
use std::fs::{read_dir, File, OpenOptions};
use std::fs::{read_dir, File};
use std::io::{Read as _, Seek, SeekFrom};

#[cfg(target_os = "linux")]
use std::os::unix::fs::OpenOptionsExt;

use fuser::BackgroundSession;
use rand::RngCore;
use rand::SeedableRng as _;
Expand Down Expand Up @@ -45,13 +42,7 @@ where

// We could do this with std::io::copy into the digest, but we'd like to control the buffer size
// so we can make it weird.
let mut bin = {
let mut open = OpenOptions::new();
open.read(true);
#[cfg(target_os = "linux")]
open.custom_flags(libc::O_DIRECT);
open.open(files[1].path()).unwrap()
};
let mut bin = File::open(files[1].path()).unwrap();
let mut two_mib_read = Vec::with_capacity(2 * 1024 * 1024);
let mut bytes_read = 0usize;
let mut buf = vec![0; 70000]; // weird size just to test alignment and the like
Expand Down