diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 08828eb..87e5fa2 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -28,6 +28,9 @@ jobs: - name: Cache Rust dependencies uses: Swatinem/rust-cache@v2 + - name: Install cargo-audit + run: cargo install cargo-audit + - name: Cache apt packages if: contains(matrix.os, 'ubuntu') uses: actions/cache@v4 @@ -65,6 +68,9 @@ jobs: - name: Check formatting run: cargo fmt --check + - name: Audit dependencies + run: cargo audit + - name: Run Clippy run: cargo clippy --all-targets -- -D warnings diff --git a/src/engine/midi.rs b/src/engine/midi.rs index ec7d101..055188e 100644 --- a/src/engine/midi.rs +++ b/src/engine/midi.rs @@ -2165,6 +2165,10 @@ mod tests { use std::path::PathBuf; use std::sync::Arc; + #[cfg_attr( + all(miri, target_os = "freebsd"), + ignore = "Tokio runtime uses kqueue, which Miri does not support on FreeBSD" + )] #[test] fn midi_learn_monitor_toggle_flips_all_lanes() { let runtime = tokio::runtime::Runtime::new().expect("tokio runtime"); diff --git a/src/engine/mod.rs b/src/engine/mod.rs index a0e26ee..7cd52e0 100644 --- a/src/engine/mod.rs +++ b/src/engine/mod.rs @@ -548,6 +548,10 @@ mod tests { assert_eq!(handle.lock().rt.transport_sample, 1_256); } + #[cfg_attr( + all(miri, target_os = "freebsd"), + ignore = "Tokio runtime uses kqueue, which Miri does not support on FreeBSD" + )] #[tokio::test] async fn inline_completion_advances_without_replaying_startup_block() { for (inline, seek_pending, advances) in [ @@ -570,6 +574,10 @@ mod tests { } } + #[cfg_attr( + all(miri, target_os = "freebsd"), + ignore = "Tokio runtime uses kqueue, which Miri does not support on FreeBSD" + )] #[tokio::test] async fn inline_loop_wrap_reanchors_capture_without_silencing_audio() { let (mut engine, _client_rx) = make_engine_with_client(); @@ -612,6 +620,10 @@ mod tests { assert!(engine.inline_render.take_outcome().unwrap().stale); } + #[cfg_attr( + all(miri, target_os = "freebsd"), + ignore = "Tokio runtime uses kqueue, which Miri does not support on FreeBSD" + )] #[tokio::test] async fn recording_peaks_query_reports_real_take_bounds_and_channel_extrema() { let (mut engine, mut rx) = make_engine_with_client(); @@ -781,6 +793,10 @@ mod tests { assert!(!engine.rt_inline_enabled); } + #[cfg_attr( + all(miri, target_os = "freebsd"), + ignore = "Tokio runtime uses kqueue, which Miri does not support on FreeBSD" + )] #[tokio::test] async fn iodelay_calibration_applies_measured_total_and_blocks_during_recording() { let (mut engine, mut client_rx) = make_engine_with_client(); @@ -860,6 +876,10 @@ mod tests { assert_eq!(engine.recording.discard_remaining_frames, 0); } + #[cfg_attr( + all(miri, target_os = "freebsd"), + ignore = "Tokio runtime uses kqueue, which Miri does not support on FreeBSD" + )] #[tokio::test] async fn overlapping_added_clips_preserve_supplied_fades() { let (mut engine, _client_rx) = make_engine_with_client(); @@ -918,6 +938,10 @@ mod tests { } } + #[cfg_attr( + all(miri, target_os = "freebsd"), + ignore = "Tokio runtime uses kqueue, which Miri does not support on FreeBSD" + )] #[tokio::test] async fn enabled_fades_are_clamped_to_minimum_on_add_and_set() { let (mut engine, _client_rx) = make_engine_with_client(); @@ -1022,6 +1046,10 @@ mod tests { engine.publish_state_snapshot(); } + #[cfg_attr( + all(miri, target_os = "freebsd"), + ignore = "Tokio runtime uses kqueue, which Miri does not support on FreeBSD" + )] #[test] fn reset_meters_after_stop_decays_to_silence_over_one_second() { let (mut engine, _client_rx) = make_engine_with_client(); @@ -1074,6 +1102,10 @@ mod tests { ); } + #[cfg_attr( + all(miri, target_os = "freebsd"), + ignore = "Tokio runtime uses kqueue, which Miri does not support on FreeBSD" + )] #[tokio::test] async fn same_track_audio_connect_creates_internal_passthrough() { let (mut engine, _client_rx) = make_engine_with_client(); @@ -1095,6 +1127,10 @@ mod tests { ); } + #[cfg_attr( + all(miri, target_os = "freebsd"), + ignore = "Tokio runtime uses kqueue, which Miri does not support on FreeBSD" + )] #[tokio::test] async fn same_track_midi_connect_creates_internal_passthrough() { let (mut engine, _client_rx) = make_engine_with_client(); @@ -1116,6 +1152,10 @@ mod tests { ); } + #[cfg_attr( + all(miri, target_os = "freebsd"), + ignore = "Tokio runtime uses kqueue, which Miri does not support on FreeBSD" + )] #[tokio::test] async fn folder_inner_connections_restore_like_session_load() { use crate::connectable::ConnectableRef; @@ -1469,6 +1509,10 @@ mod tests { assert_eq!(engine.dispatch.pending_requests.len(), 1); } + #[cfg_attr( + all(miri, target_os = "freebsd"), + ignore = "Tokio runtime uses kqueue, which Miri does not support on FreeBSD" + )] #[tokio::test] async fn offline_bounce_queue_starts_only_one_stem_at_a_time() { let (mut engine, _client_rx) = make_engine_with_client(); @@ -1519,6 +1563,10 @@ mod tests { } } + #[cfg_attr( + all(miri, target_os = "freebsd"), + ignore = "Tokio runtime uses kqueue, which Miri does not support on FreeBSD" + )] #[tokio::test] async fn offline_bounce_queue_without_ready_worker_returns() { let (mut engine, _client_rx) = make_engine_with_client(); @@ -3467,6 +3515,10 @@ mod tests { false } + #[cfg_attr( + all(miri, target_os = "freebsd"), + ignore = "Tokio runtime uses kqueue, which Miri does not support on FreeBSD" + )] #[tokio::test] async fn moving_nested_folder_preserves_child_routes() { let (mut engine, _client_rx) = make_engine_with_client(); @@ -4039,6 +4091,10 @@ mod tests { /// and drains at the cycle boundary with the full silence broadcast: /// transport stops, hw worker receives HWSetPlaying(false) AND /// HWZeroFillBuffers. + #[cfg_attr( + all(miri, target_os = "freebsd"), + ignore = "Tokio runtime uses kqueue, which Miri does not support on FreeBSD" + )] #[tokio::test] async fn stop_is_queued_and_broadcasts_zero_fill_at_cycle_boundary() { let (mut engine, _client_rx) = make_engine_with_client(); @@ -4085,6 +4141,10 @@ mod tests { /// Without an active transport (nothing can schedule a hw cycle), the /// queued stop drains immediately. + #[cfg_attr( + all(miri, target_os = "freebsd"), + ignore = "Tokio runtime uses kqueue, which Miri does not support on FreeBSD" + )] #[tokio::test] async fn stop_without_active_transport_is_handled_immediately() { let (mut engine, _client_rx) = make_engine_with_client(); diff --git a/src/hw/oss/audio_core.rs b/src/hw/oss/audio_core.rs index 16323e1..c2967b4 100644 --- a/src/hw/oss/audio_core.rs +++ b/src/hw/oss/audio_core.rs @@ -696,6 +696,10 @@ mod tests { result } + #[cfg_attr( + all(miri, target_os = "freebsd"), + ignore = "Syscall open is not supported by Miri" + )] #[test] fn mapped_period_wraps_without_overwriting_other_frames() { let mut audio = mapped_audio(); @@ -707,6 +711,10 @@ mod tests { assert_eq!(write.write_position, 12); } + #[cfg_attr( + all(miri, target_os = "freebsd"), + ignore = "Syscall open is not supported by Miri" + )] #[test] fn late_write_keeps_the_unplayed_suffix() { let mut audio = mapped_audio(); @@ -717,6 +725,10 @@ mod tests { assert_eq!(ring(&audio), [3, 4, 0, 0, 0, 0, 0, 0]); } + #[cfg_attr( + all(miri, target_os = "freebsd"), + ignore = "Syscall open is not supported by Miri" + )] #[test] fn full_ring_retains_pending_output_until_space_opens() { let mut audio = mapped_audio(); @@ -734,6 +746,10 @@ mod tests { assert_eq!(ring(&audio), [0, 0, 0, 0, 1, 2, 3, 4]); } + #[cfg_attr( + all(miri, target_os = "freebsd"), + ignore = "Syscall open is not supported by Miri" + )] #[test] fn capture_prefetch_does_not_advance_primary_period() { let mut audio = mapped_audio(); diff --git a/src/hw/oss/mod.rs b/src/hw/oss/mod.rs index 0303597..0f506f0 100644 --- a/src/hw/oss/mod.rs +++ b/src/hw/oss/mod.rs @@ -949,6 +949,10 @@ mod tests { /// stop again. Readable proxies (the hardware refuses a ring read-back /// mapping): DMA advancing during stop, and post-resume cycles at block /// rate with no underrun accumulation. + #[cfg_attr( + all(miri, target_os = "freebsd"), + ignore = "Syscall open is not supported by Miri" + )] #[test] fn play_stop_play_stop_keeps_dma_healthy() { let device = std::env::var("OSS_TEST_DEVICE").unwrap_or_else(|_| "/dev/dsp5".to_string());