From 2a10cb5ab5152ac7283e1e96ee6f65a9e25a398d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ahmet=20Kaan=20G=C3=BCm=C3=BC=C5=9F?= Date: Wed, 16 Sep 2026 14:20:32 +0300 Subject: [PATCH] vp9kf: scratch_synth skips when its tmpfs fixture is gone The probe parses /tmp/synth-kf-frame.bin, a dump produced ad hoc in an earlier session with no recorded generator. With tmpfs wiped it panicked, which made a scratch harness look like a regression in every workspace run. Print a SKIP line instead; the probe still runs whenever the dump exists. --- crates/ec-vp9/tests/scratch_synth.rs | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/crates/ec-vp9/tests/scratch_synth.rs b/crates/ec-vp9/tests/scratch_synth.rs index 9786d62a..a3918a61 100644 --- a/crates/ec-vp9/tests/scratch_synth.rs +++ b/crates/ec-vp9/tests/scratch_synth.rs @@ -1,10 +1,21 @@ +//! [scratch] Parse a synthetic keyframe header dump. +//! +//! The dump was produced ad hoc in an earlier session and lives in tmpfs +//! (`/tmp/synth-kf-frame.bin`), so the test skips - loudly - when it is gone: +//! a missing tmpfs fixture is not a regression. use ec_vp9_syntax::Vp9Parser; #[test] fn synth() { - let frame = std::fs::read("/tmp/synth-kf-frame.bin").unwrap(); + let Ok(frame) = std::fs::read("/tmp/synth-kf-frame.bin") else { + println!("SKIP: /tmp/synth-kf-frame.bin absent (tmpfs fixture)"); + return; + }; let mut p = Vp9Parser::new(); match p.parse_frame(&frame) { - Ok(h) => println!("w={} h={} uhs={} hsib={}", h.width, h.height, h.uncompressed_header_size, h.header_size_in_bytes), + Ok(h) => println!( + "w={} h={} uhs={} hsib={}", + h.width, h.height, h.uncompressed_header_size, h.header_size_in_bytes + ), Err(e) => println!("ERR {e}"), } }