diff --git a/ci-test.sh b/ci-test.sh index a33dd07..881790f 100644 --- a/ci-test.sh +++ b/ci-test.sh @@ -70,9 +70,9 @@ std) 2>&1 | ts -i '%.s ' echo "::endgroup::" done - # "sleep" has a thread leak that we have to ignore + # Test the remaining modules only on Linux. echo "::group::Testing remaining std (all except for $SKIP, ignore leaks)" - MIRIFLAGS="$DEFAULTFLAGS -Zmiri-ignore-leaks -Zmiri-disable-isolation" \ + MIRIFLAGS="$DEFAULTFLAGS -Zmiri-disable-isolation" \ ./run-test.sh std --lib --tests \ -- $(for M in $CORE; do echo "--skip $M "; done) $(for M in $SKIP; do echo "--skip $M "; done) \ 2>&1 | ts -i '%.s ' diff --git a/rust-src.diff b/rust-src.diff index 66b0aa1..12a8307 100644 --- a/rust-src.diff +++ b/rust-src.diff @@ -11,6 +11,21 @@ index 638f343fb24..0561f49c967 100644 #![feature(btree_extract_if)] #![feature(iter_next_chunk)] #![feature(repr_simd)] +diff --git a/library/alloc/src/sync.rs b/library/alloc/src/sync.rs +index 4dea27221b7..6ae52cc7827 100644 +--- a/library/alloc/src/sync.rs ++++ b/library/alloc/src/sync.rs +@@ -1062,7 +1062,9 @@ pub fn try_unwrap(this: Self) -> Result { + /// + /// // Create a long list and clone it + /// let mut x = LinkedList::new(); +- /// for i in 0..100000 { ++ /// let size = 100000; ++ /// # let size = if cfg!(miri) { 100 } else { size }; ++ /// for i in 0..size { + /// x.push(i); // Adds i to the front of x + /// } + /// let y = x.clone(); diff --git a/library/core/benches/lib.rs b/library/core/benches/lib.rs index 4d14b930e41..32d15c386cb 100644 --- a/library/core/benches/lib.rs @@ -55,3 +70,17 @@ index 27f3e8a9b96..a80f24fcb19 100644 use std::fs::File; use std::io::{Read, Write}; +diff --git a/library/std/tests/thread.rs b/library/std/tests/thread.rs +index 4ce81f2846e..79a981d0b0d 100644 +--- a/library/std/tests/thread.rs ++++ b/library/std/tests/thread.rs +@@ -5,7 +5,8 @@ + + #[test] + #[cfg_attr(target_os = "emscripten", ignore)] +-fn sleep() { ++#[cfg_attr(miri, ignore)] // Miri does not like the thread leak ++fn sleep_very_long() { + let finished = Arc::new(Mutex::new(false)); + let t_finished = finished.clone(); + thread::spawn(move || {