From 22e54171f8a9053465315b4132d8891c7c0ec1da Mon Sep 17 00:00:00 2001 From: Ralf Jung Date: Fri, 22 Nov 2019 22:50:42 +0100 Subject: [PATCH 1/3] Miri can catch panics now --- ci/miri.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ci/miri.sh b/ci/miri.sh index 5528bbce3a..6b95c2d97b 100644 --- a/ci/miri.sh +++ b/ci/miri.sh @@ -12,4 +12,4 @@ rustup default "$MIRI_NIGHTLY" rustup component add miri cargo miri setup -cargo miri test -- -- -Zunstable-options --exclude-should-panic +cargo miri test From 3ad7eec5416896dbbfbf7e4244bc39dea3f646a0 Mon Sep 17 00:00:00 2001 From: Ralf Jung Date: Fri, 6 Dec 2019 08:39:42 +0100 Subject: [PATCH 2/3] update Miri comments --- src/map.rs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/map.rs b/src/map.rs index 29d1949b02..ba8bdd747f 100644 --- a/src/map.rs +++ b/src/map.rs @@ -2883,7 +2883,7 @@ mod test_map { } #[test] - #[cfg(not(miri))] // FIXME: https://github.com/rust-lang/miri/issues/654 + #[cfg(not(miri))] // FIXME: takes too long fn test_lots_of_insertions() { let mut m = HashMap::new(); @@ -3377,7 +3377,6 @@ mod test_map { let mut m = HashMap::new(); - // FIXME: https://github.com/rust-lang/miri/issues/653 let mut rng = { let seed = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16]; SmallRng::from_seed(seed) @@ -3491,7 +3490,7 @@ mod test_map { } #[test] - #[cfg(not(miri))] // FIXME: https://github.com/rust-lang/miri/issues/655 + #[cfg(not(miri))] // FIXME: no OOM signalling (https://github.com/rust-lang/miri/issues/613) fn test_try_reserve() { let mut empty_bytes: HashMap = HashMap::new(); From 4ccc1a2cad2b92f57184995834a51fd6bdad4d61 Mon Sep 17 00:00:00 2001 From: Ralf Jung Date: Sat, 7 Dec 2019 11:36:13 +0100 Subject: [PATCH 3/3] use cfg_attr-ignore instead of cfg(not) --- src/map.rs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/map.rs b/src/map.rs index ba8bdd747f..fcd0e53d5a 100644 --- a/src/map.rs +++ b/src/map.rs @@ -2625,7 +2625,6 @@ mod test_map { use super::DefaultHashBuilder; use super::Entry::{Occupied, Vacant}; use super::{HashMap, RawEntryMut}; - #[cfg(not(miri))] use crate::CollectionAllocErr::*; use rand::{rngs::SmallRng, Rng, SeedableRng}; use std::cell::RefCell; @@ -2883,7 +2882,7 @@ mod test_map { } #[test] - #[cfg(not(miri))] // FIXME: takes too long + #[cfg_attr(miri, ignore)] // FIXME: takes too long fn test_lots_of_insertions() { let mut m = HashMap::new(); @@ -3490,7 +3489,7 @@ mod test_map { } #[test] - #[cfg(not(miri))] // FIXME: no OOM signalling (https://github.com/rust-lang/miri/issues/613) + #[cfg_attr(miri, ignore)] // FIXME: no OOM signalling (https://github.com/rust-lang/miri/issues/613) fn test_try_reserve() { let mut empty_bytes: HashMap = HashMap::new();