From ab147ed2d19745054074eb0b6369ed5083cc1caf Mon Sep 17 00:00:00 2001 From: Andy Leiserson Date: Wed, 4 Dec 2024 10:18:42 -0800 Subject: [PATCH] Include slow unit tests in CI --- .github/workflows/check.yml | 3 +++ ipa-core/src/protocol/context/dzkp_validator.rs | 2 +- ipa-core/src/protocol/hybrid/breakdown_reveal.rs | 2 +- ipa-core/src/protocol/ipa_prf/aggregation/breakdown_reveal.rs | 2 +- ipa-core/src/protocol/ipa_prf/aggregation/mod.rs | 2 +- ipa-core/src/test_fixture/mod.rs | 3 +++ 6 files changed, 10 insertions(+), 4 deletions(-) diff --git a/.github/workflows/check.yml b/.github/workflows/check.yml index 552fd8b49..e6a61bbd3 100644 --- a/.github/workflows/check.yml +++ b/.github/workflows/check.yml @@ -172,6 +172,9 @@ jobs: target/ key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.toml') }} + - name: Slow Unit Tests + run: cargo test -p ipa-core --lib -- mpc_proptest semi_honest_with_dp_slow gen_binomial_noise_16_breakdowns + - name: Integration Tests - Compact Gate run: cargo test --release --test "compact_gate" --no-default-features --features "cli web-app real-world-infra test-fixture compact-gate" diff --git a/ipa-core/src/protocol/context/dzkp_validator.rs b/ipa-core/src/protocol/context/dzkp_validator.rs index 0b0d280d2..b5386997c 100644 --- a/ipa-core/src/protocol/context/dzkp_validator.rs +++ b/ipa-core/src/protocol/context/dzkp_validator.rs @@ -1332,7 +1332,7 @@ mod tests { proptest! { #![proptest_config(mpc_proptest_config())] #[test] - fn batching_proptest( + fn batching_mpc_proptest( (record_count, max_multiplications_per_gate) in batching(), protocol in 0..8, ) { diff --git a/ipa-core/src/protocol/hybrid/breakdown_reveal.rs b/ipa-core/src/protocol/hybrid/breakdown_reveal.rs index 9e1ad9487..d94bf001c 100644 --- a/ipa-core/src/protocol/hybrid/breakdown_reveal.rs +++ b/ipa-core/src/protocol/hybrid/breakdown_reveal.rs @@ -616,7 +616,7 @@ mod proptests { proptest! { #![proptest_config(mpc_proptest_config_with_cases(100))] #[test] - fn breakdown_reveal_proptest( + fn breakdown_reveal_mpc_proptest( input_struct in inputs(PROP_MAX_INPUT_LEN), seed in any::(), ) { diff --git a/ipa-core/src/protocol/ipa_prf/aggregation/breakdown_reveal.rs b/ipa-core/src/protocol/ipa_prf/aggregation/breakdown_reveal.rs index 107c2a451..a850e4807 100644 --- a/ipa-core/src/protocol/ipa_prf/aggregation/breakdown_reveal.rs +++ b/ipa-core/src/protocol/ipa_prf/aggregation/breakdown_reveal.rs @@ -598,7 +598,7 @@ pub mod tests { #[test] #[ignore] // This test is similar enough to the one in hybrid::breakdown_reveal // that it is not worth running both. - fn breakdown_reveal_proptest( + fn breakdown_reveal_mpc_proptest( input_struct in inputs(PROP_MAX_INPUT_LEN), seed in any::(), ) { diff --git a/ipa-core/src/protocol/ipa_prf/aggregation/mod.rs b/ipa-core/src/protocol/ipa_prf/aggregation/mod.rs index e5f96868d..0e8f43ed6 100644 --- a/ipa-core/src/protocol/ipa_prf/aggregation/mod.rs +++ b/ipa-core/src/protocol/ipa_prf/aggregation/mod.rs @@ -537,7 +537,7 @@ pub mod tests { proptest! { #![proptest_config(mpc_proptest_config())] #[test] - fn aggregate_values_proptest( + fn aggregate_values_mpc_proptest( input_struct in arb_aggregate_values_inputs(PROP_MAX_INPUT_LEN), seed in any::(), ) { diff --git a/ipa-core/src/test_fixture/mod.rs b/ipa-core/src/test_fixture/mod.rs index 660c812ca..878e4a827 100644 --- a/ipa-core/src/test_fixture/mod.rs +++ b/ipa-core/src/test_fixture/mod.rs @@ -199,6 +199,9 @@ pub fn bits_to_field(x: &[F]) -> F { } /// Useful proptest configuration when testing MPC protocols. +/// +/// If you are using this config in a test, consider putting `mpc_proptest` in the name +/// of the test, so it is included in the CI run of slow tests. #[cfg(test)] #[must_use] pub fn mpc_proptest_config() -> proptest::prelude::ProptestConfig {