about summary refs log tree commit diff
path: root/src/liballoc/sync.rs
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2019-04-19 12:52:02 +0000
committerbors <bors@rust-lang.org>2019-04-19 12:52:02 +0000
commita2bbf7debaab60be33bd8008a71bca69576945a0 (patch)
treebf380d261dcaf281e9b606cd74117a1d406a07e0 /src/liballoc/sync.rs
parent22fa4bb0ebdfe9fcd7962f1fa6e758c036c878e6 (diff)
parent2bc8c547cdd9cd2e4f338477eea5860861879565 (diff)
downloadrust-a2bbf7debaab60be33bd8008a71bca69576945a0.tar.gz
rust-a2bbf7debaab60be33bd8008a71bca69576945a0.zip
Auto merge of #60077 - RalfJung:miri-alloc-tests, r=joshtriplett
make liballoc internal test suite mostly pass in Miri

I discovered, to my surprise, that liballoc has two test suites: `liballoc/tests`, and a bunch of stuff embedded directly within liballoc.  The latter was not covered by [miri-test-libstd](https://github.com/RalfJung/miri-test-libstd) yet.  This disables in Miri the tests that Miri cannot support or runs too slowly.
Diffstat (limited to 'src/liballoc/sync.rs')
-rw-r--r--src/liballoc/sync.rs2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/liballoc/sync.rs b/src/liballoc/sync.rs
index b7d7995b540..466e806663c 100644
--- a/src/liballoc/sync.rs
+++ b/src/liballoc/sync.rs
@@ -1678,6 +1678,7 @@ mod tests {
 
     #[test]
     #[cfg_attr(target_os = "emscripten", ignore)]
+    #[cfg(not(miri))] // Miri does not support threads
     fn manually_share_arc() {
         let v = vec![1, 2, 3, 4, 5, 6, 7, 8, 9, 10];
         let arc_v = Arc::new(v);
@@ -1982,6 +1983,7 @@ mod tests {
 
     #[test]
     #[cfg_attr(target_os = "emscripten", ignore)]
+    #[cfg(not(miri))] // Miri does not support threads
     fn test_weak_count_locked() {
         let mut a = Arc::new(atomic::AtomicBool::new(false));
         let a2 = a.clone();