Skip to content

Commit 126eb28

Browse files
antiguruclaude
andauthored
clusterd-test-driver: ignore lowering tests under miri (#37149)
### Motivation The `mz-clusterd-test-driver` crate (added in #37008) is not in the miri exclude list, so its unit tests run under nightly miri. Every `dataflow::tests::*` test drives MIR-to-LIR lowering, which reaches `mz_ore::stack::maybe_grow` -> `stacker` -> `psm::stack_pointer`, a foreign function miri cannot call. The tests therefore abort under miri (`unsupported operation: can't call foreign function rust_psm_stack_pointer on OS linux`). ### Description Mark the six lowering tests `#[cfg_attr(miri, ignore)]`, matching the existing convention in `mz-expr` (e.g. `src/expr/src/visit.rs`, `scalar.rs`, `relation/join_input_mapper.rs`), rather than excluding the crate or shimming `mz_ore::stack`. ### Verification `CARGO_TARGET_DIR=$PWD/miri-target MIRIFLAGS="-Zmiri-disable-isolation -Zmiri-strict-provenance" cargo +nightly miri nextest run -p mz-clusterd-test-driver dataflow::tests` skips them (exit 0); a normal `cargo nextest run` still runs all of them. Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
1 parent 3e16e96 commit 126eb28

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

src/clusterd-test-driver/src/dataflow.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -646,6 +646,7 @@ mod tests {
646646
/// source import, a single object building `Get(source) -> ArrangeBy(key)`,
647647
/// and a single index export over the source.
648648
#[mz_ore::test]
649+
#[cfg_attr(miri, ignore)] // error: unsupported operation: can't call foreign function `rust_psm_stack_pointer` on OS `linux`
649650
fn index_dataflow_structure() {
650651
let desc = crate::data::sample_desc();
651652
let loc = PersistLocation {
@@ -719,6 +720,7 @@ mod tests {
719720
/// arrange must lower to two distinct objects, and the index export must
720721
/// reference the built object rather than the source.
721722
#[mz_ore::test]
723+
#[cfg_attr(miri, ignore)] // error: unsupported operation: can't call foreign function `rust_psm_stack_pointer` on OS `linux`
722724
fn build_computed_object_lowers() {
723725
let desc = crate::data::sample_desc();
724726
let loc = PersistLocation {
@@ -766,6 +768,7 @@ mod tests {
766768
/// MIR optimizer first, which fills the implementation, so the same dataflow
767769
/// then lowers. This is exactly what the `optimize` flag buys.
768770
#[mz_ore::test]
771+
#[cfg_attr(miri, ignore)] // error: unsupported operation: can't call foreign function `rust_psm_stack_pointer` on OS `linux`
769772
fn join_lowers_only_with_optimize() {
770773
let loc = PersistLocation {
771774
blob_uri: "mem://".parse().unwrap(),
@@ -817,6 +820,7 @@ mod tests {
817820
/// same built object (binding). Both exports reference that object; the index
818821
/// arranges it and the MV sink writes it to a target shard.
819822
#[mz_ore::test]
823+
#[cfg_attr(miri, ignore)] // error: unsupported operation: can't call foreign function `rust_psm_stack_pointer` on OS `linux`
820824
fn index_and_mv_same_binding() {
821825
let desc = crate::data::sample_desc();
822826
let loc = PersistLocation {
@@ -881,6 +885,7 @@ mod tests {
881885
/// import and no source imports, is the proof the index information reached the
882886
/// optimizer.
883887
#[mz_ore::test]
888+
#[cfg_attr(miri, ignore)] // error: unsupported operation: can't call foreign function `rust_psm_stack_pointer` on OS `linux`
884889
fn optimize_uses_imported_index() {
885890
let desc = crate::data::sample_desc();
886891
let on_type = ReprRelationType::from(desc.typ());
@@ -913,6 +918,7 @@ mod tests {
913918
/// A count-over-index dataflow imports the index (no storage source), builds
914919
/// the reduce and its arrange as two objects, and exports the count index.
915920
#[mz_ore::test]
921+
#[cfg_attr(miri, ignore)] // error: unsupported operation: can't call foreign function `rust_psm_stack_pointer` on OS `linux`
916922
fn count_over_index_structure() {
917923
let desc = crate::data::sample_desc();
918924
let on_type = ReprRelationType::from(desc.typ());

0 commit comments

Comments
 (0)