FilmCraft: An open-source, nonlinear video editor written by scratch in pure Rust
Review follow-up: drop the 1.5 GB end-to-end max-size test; report every skipped seed
Logan Jennings0fd76d55e8a0
diff --git a/crates/av1/tests/fuzz_hostile.rs b/crates/av1/tests/fuzz_hostile.rsindex 47476b941..b4cf6a023 100644--- a/crates/av1/tests/fuzz_hostile.rs+++ b/crates/av1/tests/fuzz_hostile.rs@@ -100,6 +100,7 @@ fn hostile_streams_never_panic() {continue;};if seed.is_empty() {+ filmcraft_testkit::skip("AV1 fuzz", &format!("the {name} seed has no frames"));continue;}// truncate each of the first frames at every lengthdiff --git a/crates/av1/tests/hostile_dims.rs b/crates/av1/tests/hostile_dims.rsindex 41a5adb2f..c0d76e51b 100644--- a/crates/av1/tests/hostile_dims.rs+++ b/crates/av1/tests/hostile_dims.rs@@ -112,17 +112,10 @@ fn huge_frames_are_refused_without_allocating() {refused(30000, 30000);}-/// A conforming level 6.3 maximum-size frame is past the size check (this stream's tiles are junk, so decoding-/// may fail later, but not with the "frame size" error); one row more is refused.+/// One row past level 6.3 (16384 x 8704) is refused. A frame of exactly 16384 x 8704 is accepted: that boundary is+/// unit-tested on `frame_size_allowed` in `decoder.rs`, because decoding such a frame end to end allocates ~1.5 GB.#[test]-fn level_6_3_maximum_frame_passes_the_size_check() {- let mut dec = Decoder::new();- let r = dec.decode(&stream(16384, 8704)).and_then(|_| dec.flush_result());- assert!(- !matches!(&r, Err(Error::Invalid(m)) if m.contains("frame size")),- "16384x8704 must not be refused as too large, got {:?}",- r.as_ref().map(|p| p.len())- );+fn one_row_past_level_6_3_is_refused() {refused(16384, 8705);}diff --git a/crates/mpeg2v/tests/fuzz_hostile.rs b/crates/mpeg2v/tests/fuzz_hostile.rsindex 500d95977..d3f804090 100644--- a/crates/mpeg2v/tests/fuzz_hostile.rs+++ b/crates/mpeg2v/tests/fuzz_hostile.rs@@ -86,7 +86,7 @@ fn hostile_streams_never_panic() {let Some(ff) = filmcraft_testkit::ffmpeg_or_skip("mpeg2v fuzz") else { return };for spec in &SPECS {let Some(path) = common::make(&ff, spec) else {- filmcraft_testkit::skip("mpeg2v fuzz", &format!("ffmpeg could not encode the {} seed", spec.name));+ filmcraft_testkit::skip("mpeg2v fuzz", &format!("ffmpeg could not encode the {} seed (encoder missing?)", spec.name));continue;};fuzz(&std::fs::read(path).unwrap());diff --git a/crates/vp8/tests/fuzz_hostile.rs b/crates/vp8/tests/fuzz_hostile.rsindex 8befebf41..7869f330a 100644--- a/crates/vp8/tests/fuzz_hostile.rs+++ b/crates/vp8/tests/fuzz_hostile.rs@@ -102,6 +102,7 @@ fn hostile_streams_never_panic() {continue;};if seed.is_empty() {+ filmcraft_testkit::skip("VP8 fuzz", &format!("the {name} seed has no frames"));continue;}// truncate each of the first frames at every lengthdiff --git a/crates/vp9/tests/fuzz_hostile.rs b/crates/vp9/tests/fuzz_hostile.rsindex 91516d132..ec591ae02 100644--- a/crates/vp9/tests/fuzz_hostile.rs+++ b/crates/vp9/tests/fuzz_hostile.rs@@ -105,6 +105,7 @@ fn hostile_streams_never_panic() {continue;};if seed.is_empty() {+ filmcraft_testkit::skip("VP9 fuzz", &format!("the {name} seed has no frames"));continue;}// truncate each of the first frames at every length