Skip to content

Commit 20db949

Browse files
committed
Disable weak memory emulation on scheduler-dependent data race tests
1 parent acf696b commit 20db949

11 files changed

+11
-6
lines changed

tests/compile-fail/data_race/alloc_read_race.rs

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
// ignore-windows: Concurrency on Windows is not supported yet.
2+
// compile-flags: -Zmiri-disable-weak-memory-emulation
23
#![feature(new_uninit)]
34

45
use std::thread::spawn;

tests/compile-fail/data_race/alloc_write_race.rs

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
// ignore-windows: Concurrency on Windows is not supported yet.
2+
// compile-flags: -Zmiri-disable-weak-memory-emulation
23
#![feature(new_uninit)]
34

45
use std::thread::spawn;

tests/compile-fail/data_race/dealloc_read_race_stack.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// ignore-windows: Concurrency on Windows is not supported yet.
2-
// compile-flags: -Zmiri-disable-isolation
2+
// compile-flags: -Zmiri-disable-isolation -Zmiri-disable-weak-memory-emulation
33

44
use std::thread::{spawn, sleep};
55
use std::ptr::null_mut;

tests/compile-fail/data_race/dealloc_write_race_stack.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// ignore-windows: Concurrency on Windows is not supported yet.
2-
// compile-flags: -Zmiri-disable-isolation
2+
// compile-flags: -Zmiri-disable-isolation -Zmiri-disable-weak-memory-emulation
33

44
use std::thread::{spawn, sleep};
55
use std::ptr::null_mut;

tests/compile-fail/data_race/read_write_race_stack.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// ignore-windows: Concurrency on Windows is not supported yet.
2-
// compile-flags: -Zmiri-disable-isolation -Zmir-opt-level=0
2+
// compile-flags: -Zmiri-disable-isolation -Zmir-opt-level=0 -Zmiri-disable-weak-memory-emulation
33

44
// Note: mir-opt-level set to 0 to prevent the read of stack_var in thread 1
55
// from being optimized away and preventing the detection of the data-race.

tests/compile-fail/data_race/relax_acquire_race.rs

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
// ignore-windows: Concurrency on Windows is not supported yet.
2+
// compile-flags: -Zmiri-disable-weak-memory-emulation
23

34
use std::thread::spawn;
45
use std::sync::atomic::{AtomicUsize, Ordering};

tests/compile-fail/data_race/release_seq_race.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// ignore-windows: Concurrency on Windows is not supported yet.
2-
// compile-flags: -Zmiri-disable-isolation
2+
// compile-flags: -Zmiri-disable-isolation -Zmiri-disable-weak-memory-emulation
33

44
use std::thread::{spawn, sleep};
55
use std::sync::atomic::{AtomicUsize, Ordering};

tests/compile-fail/data_race/release_seq_race_same_thread.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// ignore-windows: Concurrency on Windows is not supported yet.
2-
// compile-flags: -Zmiri-disable-isolation
2+
// compile-flags: -Zmiri-disable-isolation -Zmiri-disable-weak-memory-emulation
33

44
use std::thread::spawn;
55
use std::sync::atomic::{AtomicUsize, Ordering};

tests/compile-fail/data_race/rmw_race.rs

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
// ignore-windows: Concurrency on Windows is not supported yet.
2+
// compile-flags: -Zmiri-disable-weak-memory-emulation
23

34
use std::thread::spawn;
45
use std::sync::atomic::{AtomicUsize, Ordering};

tests/compile-fail/data_race/write_write_race_stack.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// ignore-windows: Concurrency on Windows is not supported yet.
2-
// compile-flags: -Zmiri-disable-isolation
2+
// compile-flags: -Zmiri-disable-isolation -Zmiri-disable-weak-memory-emulation
33

44
use std::thread::{spawn, sleep};
55
use std::ptr::null_mut;

tests/run-pass/concurrency/data_race.rs

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
// ignore-windows: Concurrency on Windows is not supported yet.
2+
// compile-flags: -Zmiri-disable-weak-memory-emulation
23

34

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

0 commit comments

Comments
 (0)