forge
Explore
Log in

Don't you dare go Hollow

ec-av1: the census child test skips in a normal suite run instead of reddening it

Browse files at this commit

0cd363dd52c6ff5f47281404bdaf319a9c92fcf8Ahmet Kaan GümüşParent: 310e784
lane/unwritten-dep's child helper opens with an unconditional assert that
EC_AV1_PLANE_SENTINEL is set, and the test is in the crate's default test list, so every
full suite would fail on it. The parent already catches the case the assert wanted (it
panics when the child prints no census line), and the child's own non-census path below
the assert returns deliberately -- so the entry condition now returns when neither
UWDEP_CENSUS_SYNTHETIC nor UWDEP_CENSUS_FIXTURE is set, printing that it skipped rather
than passing silently. Swept the class: the five other tests that assert an env var at
entry are the EC_AV1_REQUIRE_* skip idiom, which is correct.
crates/ec-av1/src/stream.rsmodified+13 -0
@@ -48501,6 +48501,19 @@ exit 0
4850148501 /// in-process counter -- which no external binary could read.
4850248502 #[test]
4850348503 fn uwdep_child_unwritten_census() {
48504+ // Reached with NEITHER variable set means a normal suite run: the parent
48505+ // invokes this test BY NAME with the variable set, so there is nothing to
48506+ // measure here. Asserting the fill instead made every full suite red
48507+ // (`stream::tests::uwdep_child_unwritten_census` is in the default test
48508+ // list), and the run it wanted to catch is already caught on the parent's
48509+ // side, which panics when the child prints no census line. A standalone
48510+ // run SAYS it skipped rather than passing silently.
48511+ if std::env::var_os("UWDEP_CENSUS_SYNTHETIC").is_none()
48512+ && std::env::var_os("UWDEP_CENSUS_FIXTURE").is_none()
48513+ {
48514+ println!("UWDEP_CENSUS skipped: not invoked as a census child");
48515+ return;
48516+ }
4850448517 assert!(
4850548518 std::env::var_os("EC_AV1_PLANE_SENTINEL").is_some(),
4850648519 "the census child ran without EC_AV1_PLANE_SENTINEL, so the fill was never live \