2018-01-08 15:48:18 +00:00
|
|
|
From 893e01cf24b29a01dcf8640e24a070d606c7fae7 Mon Sep 17 00:00:00 2001
|
2018-01-07 21:54:23 +00:00
|
|
|
From: Igor Gnatenko <ignatenko@redhat.com>
|
|
|
|
Date: Fri, 5 Jan 2018 21:47:15 +0100
|
|
|
|
Subject: [PATCH 6/6] deps: update loopdev to 0.2
|
|
|
|
|
|
|
|
Signed-off-by: Igor Gnatenko <ignatenko@redhat.com>
|
|
|
|
---
|
|
|
|
Cargo.toml | 2 +-
|
|
|
|
src/engine/strat_engine/tests/loopbacked.rs | 9 +++------
|
|
|
|
2 files changed, 4 insertions(+), 7 deletions(-)
|
|
|
|
|
|
|
|
diff --git a/Cargo.toml b/Cargo.toml
|
|
|
|
index 3991ba0..3be1eb1 100644
|
|
|
|
--- a/Cargo.toml
|
|
|
|
+++ b/Cargo.toml
|
|
|
|
@@ -32,4 +32,4 @@ features = ["serde", "v4"]
|
|
|
|
|
|
|
|
[dev-dependencies]
|
|
|
|
quickcheck = "0.6"
|
|
|
|
-loopdev = "0.1.1"
|
|
|
|
+loopdev = "0.2"
|
|
|
|
diff --git a/src/engine/strat_engine/tests/loopbacked.rs b/src/engine/strat_engine/tests/loopbacked.rs
|
|
|
|
index 129c4ca..8d92c55 100644
|
|
|
|
--- a/src/engine/strat_engine/tests/loopbacked.rs
|
|
|
|
+++ b/src/engine/strat_engine/tests/loopbacked.rs
|
|
|
|
@@ -50,12 +50,9 @@ impl LoopTestDev {
|
|
|
|
f.flush().unwrap();
|
|
|
|
|
|
|
|
let ld = lc.next_free().unwrap();
|
|
|
|
- ld.attach(path, 0).unwrap();
|
|
|
|
+ ld.attach_file(path).unwrap();
|
|
|
|
// Wipe 1 MiB at the beginning, as data sits around on the files.
|
|
|
|
- wipe_sectors(&ld.get_path().unwrap(),
|
|
|
|
- Sectors(0),
|
|
|
|
- Bytes(IEC::Mi).sectors())
|
|
|
|
- .unwrap();
|
|
|
|
+ wipe_sectors(&ld.path().unwrap(), Sectors(0), Bytes(IEC::Mi).sectors()).unwrap();
|
|
|
|
|
|
|
|
LoopTestDev { ld: ld }
|
|
|
|
}
|
|
|
|
@@ -104,7 +101,7 @@ pub fn test_with_spec<F>(limits: DeviceLimits, test: F) -> ()
|
|
|
|
let loop_devices: Vec<LoopTestDev> = get_devices(count, &tmpdir);
|
|
|
|
let device_paths: Vec<PathBuf> = loop_devices
|
|
|
|
.iter()
|
|
|
|
- .map(|x| x.ld.get_path().unwrap())
|
|
|
|
+ .map(|x| x.ld.path().unwrap())
|
|
|
|
.collect();
|
|
|
|
let device_paths: Vec<&Path> = device_paths.iter().map(|x| x.as_path()).collect();
|
|
|
|
|
|
|
|
--
|
|
|
|
2.15.1
|
|
|
|
|