about summary refs log tree commit diff
path: root/library/std/src/sync
diff options
context:
space:
mode:
authorRalf Jung <post@ralfj.de>2024-11-25 08:00:22 +0100
committerRalf Jung <post@ralfj.de>2024-11-25 08:00:22 +0100
commitc9b56b9694c57dcf41a148e73384702f103b137f (patch)
treec7a4a0a43f9da72aa82fdce9c0ab3d9b577535d3 /library/std/src/sync
parent4e4c20d2abe6a218991152b735800fbaf51aedd6 (diff)
downloadrust-c9b56b9694c57dcf41a148e73384702f103b137f.tar.gz
rust-c9b56b9694c57dcf41a148e73384702f103b137f.zip
miri: disable test_downgrade_observe test on macOS
Diffstat (limited to 'library/std/src/sync')
-rw-r--r--library/std/src/sync/rwlock/tests.rs5
1 files changed, 4 insertions, 1 deletions
diff --git a/library/std/src/sync/rwlock/tests.rs b/library/std/src/sync/rwlock/tests.rs
index 29cad4400f1..48d442921f7 100644
--- a/library/std/src/sync/rwlock/tests.rs
+++ b/library/std/src/sync/rwlock/tests.rs
@@ -511,12 +511,15 @@ fn test_downgrade_basic() {
 }
 
 #[test]
+// FIXME: On macOS we use a provenance-incorrect implementation and Miri catches that issue.
+// See <https://github.com/rust-lang/rust/issues/121950> for details.
+#[cfg_attr(all(miri, target_os = "macos"), ignore)]
 fn test_downgrade_observe() {
     // Taken from the test `test_rwlock_downgrade` from:
     // https://github.com/Amanieu/parking_lot/blob/master/src/rwlock.rs
 
     const W: usize = 20;
-    const N: usize = 100;
+    const N: usize = if cfg!(miri) { 40 } else { 100 };
 
     // This test spawns `W` writer threads, where each will increment a counter `N` times, ensuring
     // that the value they wrote has not changed after downgrading.