From 03e450deb1150382b108835059aab5b4e3ceaf53 Mon Sep 17 00:00:00 2001 From: Taiki Endo Date: Tue, 30 Jul 2019 23:11:46 +0900 Subject: [PATCH] sync: switch branch of loom dev-dependency to master (#1367) * sync: switch branch of loom dev-dependency to master * replace loom::fuzz with loom::model --- tokio-sync/Cargo.toml | 2 +- tokio-sync/tests/fuzz_atomic_waker.rs | 2 +- tokio-sync/tests/fuzz_list.rs | 2 +- tokio-sync/tests/fuzz_mpsc.rs | 2 +- tokio-sync/tests/fuzz_oneshot.rs | 6 +++--- tokio-sync/tests/fuzz_semaphore.rs | 8 ++++---- 6 files changed, 11 insertions(+), 11 deletions(-) diff --git a/tokio-sync/Cargo.toml b/tokio-sync/Cargo.toml index a3f482dd3..64c7af839 100644 --- a/tokio-sync/Cargo.toml +++ b/tokio-sync/Cargo.toml @@ -35,4 +35,4 @@ env_logger = { version = "0.5", default-features = false } pin-utils = "0.1.0-alpha.4" tokio = { version = "*", path = "../tokio" } tokio-test = { version = "0.2.0", path = "../tokio-test" } -loom = { git = "https://github.com/carllerche/loom", branch = "std-future2", features = ["futures"] } +loom = { git = "https://github.com/carllerche/loom", features = ["futures"] } diff --git a/tokio-sync/tests/fuzz_atomic_waker.rs b/tokio-sync/tests/fuzz_atomic_waker.rs index 1a2ef1cc5..3aebe280d 100644 --- a/tokio-sync/tests/fuzz_atomic_waker.rs +++ b/tokio-sync/tests/fuzz_atomic_waker.rs @@ -25,7 +25,7 @@ struct Chan { fn basic_notification() { const NUM_NOTIFY: usize = 2; - loom::fuzz(|| { + loom::model(|| { let chan = Arc::new(Chan { num: AtomicUsize::new(0), task: AtomicWaker::new(), diff --git a/tokio-sync/tests/fuzz_list.rs b/tokio-sync/tests/fuzz_list.rs index 4edd21d7f..acfc6109d 100644 --- a/tokio-sync/tests/fuzz_list.rs +++ b/tokio-sync/tests/fuzz_list.rs @@ -29,7 +29,7 @@ fn smoke() { const NUM_TX: usize = 2; const NUM_MSG: usize = 2; - loom::fuzz(|| { + loom::model(|| { let (tx, mut rx) = list::channel(); let tx = Arc::new(tx); diff --git a/tokio-sync/tests/fuzz_mpsc.rs b/tokio-sync/tests/fuzz_mpsc.rs index 57074ea83..0951d88c6 100644 --- a/tokio-sync/tests/fuzz_mpsc.rs +++ b/tokio-sync/tests/fuzz_mpsc.rs @@ -25,7 +25,7 @@ use loom::thread; #[test] fn closing_tx() { - loom::fuzz(|| { + loom::model(|| { let (mut tx, mut rx) = mpsc::channel(16); thread::spawn(move || { diff --git a/tokio-sync/tests/fuzz_oneshot.rs b/tokio-sync/tests/fuzz_oneshot.rs index eb4dfcde4..b0191f209 100644 --- a/tokio-sync/tests/fuzz_oneshot.rs +++ b/tokio-sync/tests/fuzz_oneshot.rs @@ -14,7 +14,7 @@ use std::task::Poll::{Pending, Ready}; #[test] fn smoke() { - loom::fuzz(|| { + loom::model(|| { let (tx, rx) = oneshot::channel(); thread::spawn(move || { @@ -28,7 +28,7 @@ fn smoke() { #[test] fn changing_rx_task() { - loom::fuzz(|| { + loom::model(|| { let (tx, mut rx) = oneshot::channel(); thread::spawn(move || { @@ -83,7 +83,7 @@ impl<'a> Future for OnClose<'a> { #[test] fn changing_tx_task() { - loom::fuzz(|| { + loom::model(|| { let (mut tx, rx) = oneshot::channel::(); thread::spawn(move || { diff --git a/tokio-sync/tests/fuzz_semaphore.rs b/tokio-sync/tests/fuzz_semaphore.rs index 55d6bf0d7..f54b99a70 100644 --- a/tokio-sync/tests/fuzz_semaphore.rs +++ b/tokio-sync/tests/fuzz_semaphore.rs @@ -55,7 +55,7 @@ fn basic_usage() { } } - loom::fuzz(|| { + loom::model(|| { let shared = Arc::new(Shared { semaphore: Semaphore::new(NUM), active: AtomicUsize::new(0), @@ -81,7 +81,7 @@ fn basic_usage() { #[test] fn release() { - loom::fuzz(|| { + loom::model(|| { let semaphore = Arc::new(Semaphore::new(1)); { @@ -107,7 +107,7 @@ fn release() { fn basic_closing() { const NUM: usize = 2; - loom::fuzz(|| { + loom::model(|| { let semaphore = Arc::new(Semaphore::new(1)); for _ in 0..NUM { @@ -136,7 +136,7 @@ fn basic_closing() { fn concurrent_close() { const NUM: usize = 3; - loom::fuzz(|| { + loom::model(|| { let semaphore = Arc::new(Semaphore::new(1)); for _ in 0..NUM {