Skip to content

Commit c9b56b9

Browse files
committed
miri: disable test_downgrade_observe test on macOS
1 parent 4e4c20d commit c9b56b9

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

library/std/src/sync/rwlock/tests.rs

+4-1
Original file line numberDiff line numberDiff line change
@@ -511,12 +511,15 @@ fn test_downgrade_basic() {
511511
}
512512

513513
#[test]
514+
// FIXME: On macOS we use a provenance-incorrect implementation and Miri catches that issue.
515+
// See <https://github.com/rust-lang/rust/issues/121950> for details.
516+
#[cfg_attr(all(miri, target_os = "macos"), ignore)]
514517
fn test_downgrade_observe() {
515518
// Taken from the test `test_rwlock_downgrade` from:
516519
// https://github.com/Amanieu/parking_lot/blob/master/src/rwlock.rs
517520

518521
const W: usize = 20;
519-
const N: usize = 100;
522+
const N: usize = if cfg!(miri) { 40 } else { 100 };
520523

521524
// This test spawns `W` writer threads, where each will increment a counter `N` times, ensuring
522525
// that the value they wrote has not changed after downgrading.

0 commit comments

Comments
 (0)