From f4bcef11136922e17eb7d202ebe76d28e6b4e7d4 Mon Sep 17 00:00:00 2001 From: JCTyBlaidd Date: Mon, 7 Dec 2020 18:58:31 +0000 Subject: [PATCH] Increase sleep times for the scheduler --- tests/compile-fail/data_race/dangling_thread_async_race.rs | 2 +- tests/compile-fail/data_race/dangling_thread_race.rs | 2 +- tests/compile-fail/data_race/dealloc_read_race_stack.rs | 2 +- tests/compile-fail/data_race/dealloc_read_race_stack_drop.rs | 2 +- tests/compile-fail/data_race/dealloc_write_race_stack.rs | 2 +- tests/compile-fail/data_race/dealloc_write_race_stack_drop.rs | 2 +- tests/compile-fail/data_race/read_write_race_stack.rs | 2 +- tests/compile-fail/data_race/release_seq_race.rs | 4 ++-- tests/compile-fail/data_race/write_write_race_stack.rs | 2 +- 9 files changed, 10 insertions(+), 10 deletions(-) diff --git a/tests/compile-fail/data_race/dangling_thread_async_race.rs b/tests/compile-fail/data_race/dangling_thread_async_race.rs index d8b5d82f8304..ece831685287 100644 --- a/tests/compile-fail/data_race/dangling_thread_async_race.rs +++ b/tests/compile-fail/data_race/dangling_thread_async_race.rs @@ -26,7 +26,7 @@ fn main() { // Detatch the thread and sleep until it terminates mem::drop(join); - sleep(Duration::from_millis(100)); + sleep(Duration::from_millis(1000)); // Spawn and immediately join a thread // to execute the join code-path diff --git a/tests/compile-fail/data_race/dangling_thread_race.rs b/tests/compile-fail/data_race/dangling_thread_race.rs index 172b05bd4f0b..873d10b788f1 100644 --- a/tests/compile-fail/data_race/dangling_thread_race.rs +++ b/tests/compile-fail/data_race/dangling_thread_race.rs @@ -26,7 +26,7 @@ fn main() { // Detatch the thread and sleep until it terminates mem::drop(join); - sleep(Duration::from_millis(100)); + sleep(Duration::from_millis(1000)); // Spawn and immediately join a thread // to execute the join code-path diff --git a/tests/compile-fail/data_race/dealloc_read_race_stack.rs b/tests/compile-fail/data_race/dealloc_read_race_stack.rs index 67eda4d431e6..95d7acea2660 100644 --- a/tests/compile-fail/data_race/dealloc_read_race_stack.rs +++ b/tests/compile-fail/data_race/dealloc_read_race_stack.rs @@ -36,7 +36,7 @@ pub fn main() { pointer.store(&mut stack_var as *mut _, Ordering::Release); - sleep(Duration::from_millis(100)); + sleep(Duration::from_millis(1000)); } //~ ERROR Data race }); diff --git a/tests/compile-fail/data_race/dealloc_read_race_stack_drop.rs b/tests/compile-fail/data_race/dealloc_read_race_stack_drop.rs index 81ad50c44a05..ecdd841965e9 100644 --- a/tests/compile-fail/data_race/dealloc_read_race_stack_drop.rs +++ b/tests/compile-fail/data_race/dealloc_read_race_stack_drop.rs @@ -36,7 +36,7 @@ pub fn main() { pointer.store(&mut stack_var as *mut _, Ordering::Release); - sleep(Duration::from_millis(100)); + sleep(Duration::from_millis(1000)); // NOTE: the race is also detected with thread 0, and so reported for thread 0 instead of 2, unsure of the cause. drop(stack_var); diff --git a/tests/compile-fail/data_race/dealloc_write_race_stack.rs b/tests/compile-fail/data_race/dealloc_write_race_stack.rs index cda6e317aaeb..8008b6cdb91e 100644 --- a/tests/compile-fail/data_race/dealloc_write_race_stack.rs +++ b/tests/compile-fail/data_race/dealloc_write_race_stack.rs @@ -36,7 +36,7 @@ pub fn main() { pointer.store(&mut stack_var as *mut _, Ordering::Release); - sleep(Duration::from_millis(100)); + sleep(Duration::from_millis(1000)); } //~ ERROR Data race }); diff --git a/tests/compile-fail/data_race/dealloc_write_race_stack_drop.rs b/tests/compile-fail/data_race/dealloc_write_race_stack_drop.rs index 9a633518a214..733cdb7b1f04 100644 --- a/tests/compile-fail/data_race/dealloc_write_race_stack_drop.rs +++ b/tests/compile-fail/data_race/dealloc_write_race_stack_drop.rs @@ -36,7 +36,7 @@ pub fn main() { pointer.store(&mut stack_var as *mut _, Ordering::Release); - sleep(Duration::from_millis(100)); + sleep(Duration::from_millis(1000)); drop(stack_var); //~ ERROR Data race }); diff --git a/tests/compile-fail/data_race/read_write_race_stack.rs b/tests/compile-fail/data_race/read_write_race_stack.rs index 1762e12c28f0..fcd8a0606bae 100644 --- a/tests/compile-fail/data_race/read_write_race_stack.rs +++ b/tests/compile-fail/data_race/read_write_race_stack.rs @@ -38,7 +38,7 @@ pub fn main() { pointer.store(&mut stack_var as *mut _, Ordering::Release); - sleep(Duration::from_millis(100)); + sleep(Duration::from_millis(1000)); //read stack_var //~ ERROR Data race diff --git a/tests/compile-fail/data_race/release_seq_race.rs b/tests/compile-fail/data_race/release_seq_race.rs index 59263cb71204..d0d625a6ce17 100644 --- a/tests/compile-fail/data_race/release_seq_race.rs +++ b/tests/compile-fail/data_race/release_seq_race.rs @@ -30,7 +30,7 @@ pub fn main() { let j1 = spawn(move || { *c.0 = 1; SYNC.store(1, Ordering::Release); - sleep(Duration::from_millis(100)); + sleep(Duration::from_millis(1000)); SYNC.store(3, Ordering::Relaxed); }); @@ -40,7 +40,7 @@ pub fn main() { }); let j3 = spawn(move || { - sleep(Duration::from_millis(1000)); + sleep(Duration::from_millis(5000)); if SYNC.load(Ordering::Acquire) == 3 { *c.0 //~ ERROR Data race } else { diff --git a/tests/compile-fail/data_race/write_write_race_stack.rs b/tests/compile-fail/data_race/write_write_race_stack.rs index 9acc26685d89..46d0911be189 100644 --- a/tests/compile-fail/data_race/write_write_race_stack.rs +++ b/tests/compile-fail/data_race/write_write_race_stack.rs @@ -38,7 +38,7 @@ pub fn main() { pointer.store(&mut stack_var as *mut _, Ordering::Release); - sleep(Duration::from_millis(100)); + sleep(Duration::from_millis(1000)); stack_var = 1usize; //~ ERROR Data race