Skip to content

Commit ad6c780

Browse files
committed
Add miri test
Signed-off-by: Moritz Hoffmann <[email protected]>
1 parent d0ea86f commit ad6c780

File tree

5 files changed

+31
-7
lines changed

5 files changed

+31
-7
lines changed

.github/workflows/miri.yml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
name: "Test Suite (miri)"
2+
on:
3+
push:
4+
branches:
5+
- master
6+
pull_request:
7+
8+
jobs:
9+
test:
10+
name: cargo miri test on ubuntu, rust nightly
11+
runs-on: ubuntu-latest
12+
steps:
13+
- uses: actions/checkout@v4
14+
- uses: actions-rust-lang/setup-rust-toolchain@v1
15+
with:
16+
toolchain: nightly
17+
- name: Cargo test
18+
run: cargo miri test

timely/src/dataflow/operators/core/capture/capture.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,7 @@ pub trait Capture<T: Timestamp, C: Container + Data> {
7676
/// let (send0, recv0) = ::std::sync::mpsc::channel();
7777
/// let send0 = Arc::new(Mutex::new(send0));
7878
///
79+
/// # #[cfg_attr(miri, ignore)]
7980
/// timely::execute(timely::Config::thread(), move |worker| {
8081
///
8182
/// // this is only to validate the output.

timely/src/dataflow/operators/core/capture/event.rs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,9 +116,13 @@ pub mod link {
116116

117117
#[test]
118118
fn avoid_stack_overflow_in_drop() {
119+
#[cfg(miri)]
120+
let limit = 1_000;
121+
#[cfg(not(miri))]
122+
let limit = 1_000_000;
119123
let mut event1 = Rc::new(EventLink::<(),()>::new());
120124
let _event2 = event1.clone();
121-
for _ in 0 .. 1_000_000 {
125+
for _ in 0 .. limit {
122126
event1.push(Event::Progress(vec![]));
123127
}
124128
}

timely/src/dataflow/operators/core/capture/mod.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
//! use timely::dataflow::operators::{Capture, ToStream, Inspect};
2525
//! use timely::dataflow::operators::capture::{EventLink, Replay};
2626
//!
27+
//! # #[cfg_attr(miri, ignore)]
2728
//! timely::execute(timely::Config::thread(), |worker| {
2829
//! let handle1 = Rc::new(EventLink::new());
2930
//! let handle2 = Some(handle1.clone());

timely/tests/shape_scaling.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@ use timely::Config;
66
#[test] fn operator_scaling_1() { operator_scaling(1); }
77
#[test] fn operator_scaling_10() { operator_scaling(10); }
88
#[test] fn operator_scaling_100() { operator_scaling(100); }
9-
#[test] fn operator_scaling_1000() { operator_scaling(1000); }
10-
#[test] fn operator_scaling_10000() { operator_scaling(10000); }
11-
#[test] fn operator_scaling_100000() { operator_scaling(100000); }
9+
#[test] #[cfg_attr(miri, ignore)] fn operator_scaling_1000() { operator_scaling(1000); }
10+
#[test] #[cfg_attr(miri, ignore)] fn operator_scaling_10000() { operator_scaling(10000); }
11+
#[test] #[cfg_attr(miri, ignore)] fn operator_scaling_100000() { operator_scaling(100000); }
1212

1313
fn operator_scaling(scale: u64) {
1414
timely::execute(Config::thread(), move |worker| {
@@ -54,9 +54,9 @@ fn operator_scaling(scale: u64) {
5454
#[test] fn subgraph_scaling_1() { subgraph_scaling(1); }
5555
#[test] fn subgraph_scaling_10() { subgraph_scaling(10); }
5656
#[test] fn subgraph_scaling_100() { subgraph_scaling(100); }
57-
#[test] fn subgraph_scaling_1000() { subgraph_scaling(1000); }
58-
#[test] fn subgraph_scaling_10000() { subgraph_scaling(10000); }
59-
#[test] fn subgraph_scaling_100000() { subgraph_scaling(100000); }
57+
#[test] #[cfg_attr(miri, ignore)] fn subgraph_scaling_1000() { subgraph_scaling(1000); }
58+
#[test] #[cfg_attr(miri, ignore)] fn subgraph_scaling_10000() { subgraph_scaling(10000); }
59+
#[test] #[cfg_attr(miri, ignore)] fn subgraph_scaling_100000() { subgraph_scaling(100000); }
6060

6161
fn subgraph_scaling(scale: u64) {
6262
timely::execute(Config::thread(), move |worker| {

0 commit comments

Comments
 (0)