conformance test: a ledger row of two answers covers either and no third (red)
The CI's ubuntu leg at da37e9e5df (run 46984549568) failed its conformance replay on an x86-64
AVX-512 runner, llvmpipe of Mesa 26.2.4 and LLVM 23.1.1: five sites gave the counts
known-gaps-rt.tsv records under the AVX2 venue (6304 elements at the x3 and x3-depth sites of
fetch-ordered-bgra8unorm-srgb and fetch-ordered-rgba8unorm-srgb, 81 at blend-interaction-format-
srgb8's one-one-subtract), where runs 46969176610 and 46974578786, on AVX-512 runners of the same
image, gave the AVX-512 rows' 6496 and 78. The property that decides the count is finer than the
host's widest vector set the venue states, and a row holds one answer.
The test: a row of the ledger's own format listing two answers with ` | ` between them covers a
run that answers either; a third answer is a new gap and reads the row as no longer held; a run
that no longer diverges reads it as fixed; a row of one answer covers that answer alone, as
before.
Red here: the ledger compares the whole answer field, so neither answer of the two-answer row
matches it.
This commit is contained in:
1 parent
b12d57dc98
commit
dc6ab2fda7
1 file changed
+81
@@ -4115,6 +4115,87 @@ fn a_divergence_row_is_held_in_both_directions() {
|
||||
assert!(printed.contains("drop the row"), "{printed}");
|
||||
}
|
||||
|
||||
/// A row may list more than one answer at its site, with ` | ` between them, for a venue whose
|
||||
/// hosts answer the site differently by a property its description does not state: llvmpipe of
|
||||
/// one Mesa and LLVM stores the `x3` sites of `fetch-ordered-*-srgb` at 6,304 elements on some
|
||||
/// x86-64 AVX-512 hosts and at 6,496 on others. The row covers each answer it lists and no other,
|
||||
/// and is held while the run answers any of them; a row of one answer is held as before.
|
||||
#[test]
|
||||
fn a_ledger_row_of_two_answers_covers_either_and_no_third() {
|
||||
use crate::known_gaps::{against, parse, Expectation, Now};
|
||||
let case = LedgerCase::new("ledger-two-answers");
|
||||
let recording = recording_of(&case, case.metal(7), 3);
|
||||
let answering = |ours: u32| {
|
||||
let mut side = StubSide::new(words(&[ours]));
|
||||
let row = replay_against(&case, &mut side, &recording).unwrap();
|
||||
let found = against(std::slice::from_ref(&row), &[]);
|
||||
let [Expectation::Unlisted { site, answer, .. }] = found.as_slice() else {
|
||||
panic!("{found:?}");
|
||||
};
|
||||
(row, site.clone(), answer.clone())
|
||||
};
|
||||
let (nine, site, first) = answering(9);
|
||||
let (eight, at, second) = answering(8);
|
||||
let (six, _, third) = answering(6);
|
||||
assert_eq!(at, site);
|
||||
assert!(first != second && second != third && first != third);
|
||||
let row = |answers: &str| {
|
||||
parse(&format!(
|
||||
"{}\t*\tdivergent\t{site}\t{answers}\ta difference this test writes down on purpose\n",
|
||||
case.name()
|
||||
))
|
||||
.unwrap()
|
||||
};
|
||||
|
||||
// Either listed answer is the row's, so neither run is a surprise.
|
||||
let two = row(&format!("{first} | {second}"));
|
||||
assert_eq!(two.len(), 1, "{two:?}");
|
||||
assert_eq!(against(std::slice::from_ref(&nine), &two), Vec::new());
|
||||
assert_eq!(against(std::slice::from_ref(&eight), &two), Vec::new());
|
||||
|
||||
// A third answer is a new gap, and the row, none of whose answers the run held, looks fixed.
|
||||
let found = against(std::slice::from_ref(&six), &two);
|
||||
assert!(
|
||||
matches!(
|
||||
found.as_slice(),
|
||||
[
|
||||
Expectation::Unlisted { answer, listed: Some(_), .. },
|
||||
Expectation::NoLongerHeld { now: Now::Differs, .. },
|
||||
] if *answer == third
|
||||
),
|
||||
"{found:?}"
|
||||
);
|
||||
// A run that no longer diverges reads the row as fixed, whichever answer it listed.
|
||||
let mut fixed = StubSide::new(words(&[7]));
|
||||
let exact = replay_against(&case, &mut fixed, &recording).unwrap();
|
||||
let found = against(std::slice::from_ref(&exact), &two);
|
||||
assert!(
|
||||
matches!(
|
||||
found.as_slice(),
|
||||
[Expectation::NoLongerHeld {
|
||||
now: Now::Matches,
|
||||
..
|
||||
}]
|
||||
),
|
||||
"{found:?}"
|
||||
);
|
||||
|
||||
// A row of one answer covers that answer alone, in both directions, as before.
|
||||
let one = row(&first);
|
||||
assert_eq!(against(std::slice::from_ref(&nine), &one), Vec::new());
|
||||
let found = against(std::slice::from_ref(&eight), &one);
|
||||
assert!(
|
||||
matches!(
|
||||
found.as_slice(),
|
||||
[
|
||||
Expectation::Unlisted { answer, .. },
|
||||
Expectation::NoLongerHeld { now: Now::Differs, .. },
|
||||
] if *answer == second
|
||||
),
|
||||
"{found:?}"
|
||||
);
|
||||
}
|
||||
|
||||
/// A divergence never launders a refusal of the same case: the verdict carries both, and the
|
||||
/// ledger holds a refusal row against a case that also diverges.
|
||||
///
|
||||
|
||||
Reference in new issue
Block a user