diff --git a/disk/src/qcow/mod.rs b/disk/src/qcow/mod.rs index 19a044c772..85b96c5048 100644 --- a/disk/src/qcow/mod.rs +++ b/disk/src/qcow/mod.rs @@ -2470,7 +2470,7 @@ mod tests { let _backing_file = OpenOptions::new() .read(true) .write(true) - .create(true) + .create_new(true) .open(&backing_file_path) .unwrap(); @@ -2478,7 +2478,7 @@ mod tests { let level1_qcow_file = OpenOptions::new() .read(true) .write(true) - .create(true) + .create_new(true) .open(&level1_qcow_file_path) .unwrap(); let _level1_qcow_file = QcowFile::new_from_backing( diff --git a/io_uring/tests/uring.rs b/io_uring/tests/uring.rs index bb3cd53e47..381bbbd845 100644 --- a/io_uring/tests/uring.rs +++ b/io_uring/tests/uring.rs @@ -308,8 +308,7 @@ fn fallocate_fsync() { let mut f = OpenOptions::new() .read(true) .write(true) - .create(true) - .truncate(true) + .create_new(true) .open(&file_path) .unwrap(); f.write_all(&buf).unwrap(); @@ -321,6 +320,7 @@ fn fallocate_fsync() { .read(true) .write(true) .create(true) + .truncate(false) .open(&file_path) .unwrap();