Skip to content

Commit

Permalink
Disable weak memory emulation on scheduler-dependent data race tests
Browse files Browse the repository at this point in the history
  • Loading branch information
cbeuw committed May 7, 2022
1 parent acf696b commit 20db949
Show file tree
Hide file tree
Showing 11 changed files with 11 additions and 6 deletions.
1 change: 1 addition & 0 deletions tests/compile-fail/data_race/alloc_read_race.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
// ignore-windows: Concurrency on Windows is not supported yet.
// compile-flags: -Zmiri-disable-weak-memory-emulation
#![feature(new_uninit)]

use std::thread::spawn;
Expand Down
1 change: 1 addition & 0 deletions tests/compile-fail/data_race/alloc_write_race.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
// ignore-windows: Concurrency on Windows is not supported yet.
// compile-flags: -Zmiri-disable-weak-memory-emulation
#![feature(new_uninit)]

use std::thread::spawn;
Expand Down
2 changes: 1 addition & 1 deletion tests/compile-fail/data_race/dealloc_read_race_stack.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// ignore-windows: Concurrency on Windows is not supported yet.
// compile-flags: -Zmiri-disable-isolation
// compile-flags: -Zmiri-disable-isolation -Zmiri-disable-weak-memory-emulation

use std::thread::{spawn, sleep};
use std::ptr::null_mut;
Expand Down
2 changes: 1 addition & 1 deletion tests/compile-fail/data_race/dealloc_write_race_stack.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// ignore-windows: Concurrency on Windows is not supported yet.
// compile-flags: -Zmiri-disable-isolation
// compile-flags: -Zmiri-disable-isolation -Zmiri-disable-weak-memory-emulation

use std::thread::{spawn, sleep};
use std::ptr::null_mut;
Expand Down
2 changes: 1 addition & 1 deletion tests/compile-fail/data_race/read_write_race_stack.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// ignore-windows: Concurrency on Windows is not supported yet.
// compile-flags: -Zmiri-disable-isolation -Zmir-opt-level=0
// compile-flags: -Zmiri-disable-isolation -Zmir-opt-level=0 -Zmiri-disable-weak-memory-emulation

// Note: mir-opt-level set to 0 to prevent the read of stack_var in thread 1
// from being optimized away and preventing the detection of the data-race.
Expand Down
1 change: 1 addition & 0 deletions tests/compile-fail/data_race/relax_acquire_race.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
// ignore-windows: Concurrency on Windows is not supported yet.
// compile-flags: -Zmiri-disable-weak-memory-emulation

use std::thread::spawn;
use std::sync::atomic::{AtomicUsize, Ordering};
Expand Down
2 changes: 1 addition & 1 deletion tests/compile-fail/data_race/release_seq_race.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// ignore-windows: Concurrency on Windows is not supported yet.
// compile-flags: -Zmiri-disable-isolation
// compile-flags: -Zmiri-disable-isolation -Zmiri-disable-weak-memory-emulation

use std::thread::{spawn, sleep};
use std::sync::atomic::{AtomicUsize, Ordering};
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// ignore-windows: Concurrency on Windows is not supported yet.
// compile-flags: -Zmiri-disable-isolation
// compile-flags: -Zmiri-disable-isolation -Zmiri-disable-weak-memory-emulation

use std::thread::spawn;
use std::sync::atomic::{AtomicUsize, Ordering};
Expand Down
1 change: 1 addition & 0 deletions tests/compile-fail/data_race/rmw_race.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
// ignore-windows: Concurrency on Windows is not supported yet.
// compile-flags: -Zmiri-disable-weak-memory-emulation

use std::thread::spawn;
use std::sync::atomic::{AtomicUsize, Ordering};
Expand Down
2 changes: 1 addition & 1 deletion tests/compile-fail/data_race/write_write_race_stack.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// ignore-windows: Concurrency on Windows is not supported yet.
// compile-flags: -Zmiri-disable-isolation
// compile-flags: -Zmiri-disable-isolation -Zmiri-disable-weak-memory-emulation

use std::thread::{spawn, sleep};
use std::ptr::null_mut;
Expand Down
1 change: 1 addition & 0 deletions tests/run-pass/concurrency/data_race.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
// ignore-windows: Concurrency on Windows is not supported yet.
// compile-flags: -Zmiri-disable-weak-memory-emulation


use std::sync::atomic::{AtomicUsize, fence, Ordering};
Expand Down

0 comments on commit 20db949

Please sign in to comment.