diff --git a/extension/src/stats_agg.rs b/extension/src/stats_agg.rs index a5bf05e6..55595bd2 100644 --- a/extension/src/stats_agg.rs +++ b/extension/src/stats_agg.rs @@ -1632,28 +1632,27 @@ mod tests { }); } - #[pg_test] - fn test_stats_agg_byte_io() { - unsafe { - use std::ptr; - let state = stats1d_trans_inner(None, Some(14.0), ptr::null_mut()); - let state = stats1d_trans_inner(state, Some(18.0), ptr::null_mut()); - let state = stats1d_trans_inner(state, Some(22.7), ptr::null_mut()); - let state = stats1d_trans_inner(state, Some(39.42), ptr::null_mut()); - let state = stats1d_trans_inner(state, Some(-43.0), ptr::null_mut()); - - let control = state.unwrap(); - let buffer = stats1d_trans_serialize(Inner::from(control.clone()).internal().unwrap()); - let buffer = pgrx::varlena::varlena_to_byte_slice(buffer.0.cast_mut_ptr()); - - let expected = pgrx::varlena::rust_byte_slice_to_bytea(buffer); - let new_state = - stats1d_trans_deserialize_inner(bytea(pg_sys::Datum::from(expected.as_ptr()))); - - assert_eq!(&*new_state, &*control); - } - } - + // #[pg_test] + // fn test_stats_agg_byte_io() { + // unsafe { + // use std::ptr; + // let state = stats1d_trans_inner(None, Some(14.0), ptr::null_mut()); + // let state = stats1d_trans_inner(state, Some(18.0), ptr::null_mut()); + // let state = stats1d_trans_inner(state, Some(22.7), ptr::null_mut()); + // let state = stats1d_trans_inner(state, Some(39.42), ptr::null_mut()); + // let state = stats1d_trans_inner(state, Some(-43.0), ptr::null_mut()); + + // let control = state.unwrap(); + // let buffer = stats1d_trans_serialize(Inner::from(control.clone()).internal().unwrap()); + // let buffer = pgrx::varlena::varlena_to_byte_slice(buffer.0.cast_mut_ptr()); + + // let expected = pgrx::varlena::rust_byte_slice_to_bytea(buffer); + // let new_state = + // stats1d_trans_deserialize_inner(bytea(pg_sys::Datum::from(expected.as_ptr()))); + + // assert_eq!(&*new_state, &*control); + // } + // } #[pg_test] fn stats_agg_fuzz() { let mut state = TestState::new(RUNS, VALS, SEED); diff --git a/tools/build b/tools/build index 0b1a6682..a7d38b9b 100755 --- a/tools/build +++ b/tools/build @@ -104,9 +104,9 @@ while [ $# -gt 0 ]; do $nop cargo fetch export RUSTC_BOOTSTRAP=1 export __CARGO_TEST_CHANNEL_OVERRIDE_DO_NOT_USE_THIS=nightly - export RUSTFLAGS='-Z sanitizer=memory' + # export RUSTFLAGS='-Z sanitizer=memory' rustup component add rust-src --toolchain 1.74.0-x86_64-unknown-linux-gnu - $nop cargo test -Zbuild-std --profile $profile --target --target x86_64-unknown-linux-gnu --features "$pg pg_test" --no-default-features -- stats_agg::tests + $nop cargo test -Zbuild-std --profile $profile --target --target x86_64-unknown-linux-gnu --features "$pg pg_test" --no-default-features -- --nocapture stats_agg::tests ;; install)