diff options
author | 2020-12-29 22:54:48 +0100 | |
---|---|---|
committer | 2020-12-29 22:54:48 +0100 | |
commit | 27a0f9ca6e01b953805684eff535a14eaff937d0 (patch) | |
tree | 41ec3f1a111eadfd43b1ab5e5caf984d5f542991 /tests/test_bytes.rs | |
parent | ed71a7beb3fd0cc67cad08da2643cff2732f6b52 (diff) | |
download | bytes-27a0f9ca6e01b953805684eff535a14eaff937d0.tar.gz bytes-27a0f9ca6e01b953805684eff535a14eaff937d0.tar.zst bytes-27a0f9ca6e01b953805684eff535a14eaff937d0.zip |
CI: run test suite in Miri (#456)
Diffstat (limited to 'tests/test_bytes.rs')
-rw-r--r-- | tests/test_bytes.rs | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/tests/test_bytes.rs b/tests/test_bytes.rs index 78be4b7..b9e6ce4 100644 --- a/tests/test_bytes.rs +++ b/tests/test_bytes.rs @@ -461,6 +461,7 @@ fn reserve_allocates_at_least_original_capacity() { } #[test] +#[cfg_attr(miri, ignore)] // Miri is too slow fn reserve_max_original_capacity_value() { const SIZE: usize = 128 * 1024; @@ -608,15 +609,15 @@ fn advance_past_len() { #[test] // Only run these tests on little endian systems. CI uses qemu for testing -// little endian... and qemu doesn't really support threading all that well. -#[cfg(target_endian = "little")] +// big endian... and qemu doesn't really support threading all that well. +#[cfg(any(miri, target_endian = "little"))] fn stress() { // Tests promoting a buffer from a vec -> shared in a concurrent situation use std::sync::{Arc, Barrier}; use std::thread; const THREADS: usize = 8; - const ITERS: usize = 1_000; + const ITERS: usize = if cfg!(miri) { 100 } else { 1_000 }; for i in 0..ITERS { let data = [i as u8; 256]; |