Skip to content

Commit 82c80a6

Browse files
compiler-errorsgitbot
authored and
gitbot
committed
Rollup merge of rust-lang#133435 - RalfJung:test_downgrade_observe, r=tgross35
miri: disable test_downgrade_observe test on macOS Due to rust-lang#121950, this test can fail on Miri. The test is also quite slow on Miri (taking more than 30s) due to the high iteration count (a total of 2000), so let's reduce that a little. Fixes rust-lang#133421
2 parents 28606a6 + c7977be commit 82c80a6

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

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)