forge
Explore
Log in

Don't you dare go Hollow

vp9kf: scratch_synth skips when its tmpfs fixture is gone

Browse files at this commit

2a10cb5ab5152ac7283e1e96ee6f65a9e25a398dAhmet Kaan GümüşParent: fcfe947
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.rsmodified+13 -2
@@ -1,10 +1,21 @@
1+//! [scratch] Parse a synthetic keyframe header dump.
2+//!
3+//! The dump was produced ad hoc in an earlier session and lives in tmpfs
4+//! (`/tmp/synth-kf-frame.bin`), so the test skips - loudly - when it is gone:
5+//! a missing tmpfs fixture is not a regression.
16 use ec_vp9_syntax::Vp9Parser;
27 #[test]
38 fn synth() {
4- let frame = std::fs::read("/tmp/synth-kf-frame.bin").unwrap();
9+ let Ok(frame) = std::fs::read("/tmp/synth-kf-frame.bin") else {
10+ println!("SKIP: /tmp/synth-kf-frame.bin absent (tmpfs fixture)");
11+ return;
12+ };
513 let mut p = Vp9Parser::new();
614 match p.parse_frame(&frame) {
7- Ok(h) => println!("w={} h={} uhs={} hsib={}", h.width, h.height, h.uncompressed_header_size, h.header_size_in_bytes),
15+ Ok(h) => println!(
16+ "w={} h={} uhs={} hsib={}",
17+ h.width, h.height, h.uncompressed_header_size, h.header_size_in_bytes
18+ ),
819 Err(e) => println!("ERR {e}"),
920 }
1021 }