From ed715b7ff671129d55fee7bcc7665dfbb51ec963 Mon Sep 17 00:00:00 2001 From: Matthew Jackson <1085847+MattJackson@users.noreply.github.com> Date: Mon, 28 Sep 2026 12:26:20 -0700 Subject: [PATCH] test: fvi pipeline tests hold the Drive-holder lock; the lock exists under loom too --- src/halt.rs | 3 ++- src/mux/fvi_pipeline_tests.rs | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/halt.rs b/src/halt.rs index cd1e375b..f7771e89 100644 --- a/src/halt.rs +++ b/src/halt.rs @@ -538,7 +538,8 @@ pub fn live_drive_holders() -> usize { } // Every test that spawns a Drive holder or reads the process-wide count holds this. -#[cfg(all(test, not(loom)))] +#[cfg(test)] +#[cfg_attr(loom, allow(dead_code))] pub(crate) static DRIVE_HOLDER_TEST_LOCK: std::sync::Mutex<()> = std::sync::Mutex::new(()); /// A thread that holds the Drive (ยง2.5): the op joins it before returning. In debug diff --git a/src/mux/fvi_pipeline_tests.rs b/src/mux/fvi_pipeline_tests.rs index 4509adee..9e83b001 100644 --- a/src/mux/fvi_pipeline_tests.rs +++ b/src/mux/fvi_pipeline_tests.rs @@ -171,6 +171,7 @@ fn two_gop_image() -> Vec { /// Drive the real highway and write every frame into the `fvi://` sink. fn run_to_fvi(image: Vec, title: DiscTitle, path: &std::path::Path) { + let _drive = crate::sector::prefetched::holder_test_lock(); let mut input = build_iso_pipeline( MemSource { data: image }, title.clone(),