Tests: the poke guard and the early member's settle test print the attempt that asserted
every_device_pokes_the_submit_thread_for_a_completion_that_leaves_room asserts X's hold only on an attempt where S was not seen complete first (1b4595dea9). An attempt where it was goes again, up to four. The fourth fails, so a pass always has one attempt that asserted the hold. The failure now says the hold was never observed. The pass line names the attempt that asserted it, so each run shows the hold was checked and on which attempt. every_device_settles_an_early_members_shared_writes_at_its_own_completion's line names its attempt as well. Test only.
This commit is contained in:
1 parent
cd6797fb47
commit
b9da46258e
1 file changed
+13
-3
@@ -5168,7 +5168,8 @@ pub(crate) mod on_device {
|
||||
calls(&held, &at_l),
|
||||
);
|
||||
println!(
|
||||
"{name}: atom {atom:?}; flushes, flushed bytes, invalidates, invalidated bytes and \
|
||||
"{name}: attempt {attempt}, atom {atom:?}; flushes, flushed bytes, invalidates, \
|
||||
invalidated bytes and \
|
||||
failures since the group was held: at A's handler {a_calls:?}, {} ns before L's \
|
||||
GPU end; at A's status {status_calls:?}, {} ns before it; at L's handler \
|
||||
{l_calls:?}",
|
||||
@@ -5288,9 +5289,18 @@ pub(crate) mod on_device {
|
||||
drop((s, a, l, y, x, queue));
|
||||
continue;
|
||||
}
|
||||
assert!(!early, "{name}: S seen complete before X was held");
|
||||
// Only an attempt that asserted X's hold comes past here: the fourth fails where
|
||||
// S was seen complete first.
|
||||
assert!(
|
||||
!early,
|
||||
"{name}: S seen complete before X was held in all {attempt} attempts: the \
|
||||
hold was never observed"
|
||||
);
|
||||
let poked = at_last.load(Ordering::SeqCst) - before;
|
||||
println!("{name}: {poked} pokes of the submit thread from X's hold to L's handler");
|
||||
println!(
|
||||
"{name}: attempt {attempt} asserted X's hold; {poked} pokes of the submit \
|
||||
thread from X's hold to L's handler"
|
||||
);
|
||||
assert_eq!(
|
||||
poked, 1,
|
||||
"{name}: the group's last completion alone poked it"
|
||||
|
||||
Reference in new issue
Block a user