rt places test: the long-block free test waits for the free's record, not only the gauge

free_idle lowers the allocation gauge in free_allocation (memory.rs 2735), counts
AllocationsFreed, and only then pushes the record core.pool.frees() returns (2720). The test
waited for the gauge's fall and read frees() at once, so it could read between the two:
"one free", left 0, right 1, on the Radeon 780M Hawk Point (RADV) in round 306d357141
(m3-max-66137), green on the same card in the four rounds before and on every other card. It now
also waits until the record is there; the record cannot come before the gauge, as its time is
taken after the free. Test only; the next round shows it.
This commit is contained in:
Anees Iqbal committed 2026-11-21 23:09:49 -08:00
1 parent 0df3725022
commit 626cbd9846
1 file changed
+4
@@ -486,6 +486,10 @@ mod on_device {
wait_until("the long block's allocation freed", || {
counters.gauges().private_allocation_bytes == allocated - held
});
// The free lowers the gauge before it pushes its record, so the record is waited for too.
wait_until("the long block's free recorded", || {
core.pool.frees().len() > frees
});
let freed = core.pool.frees();
assert_eq!(freed.len(), frees + 1, "{name}: one free");
let (since, began, _) = freed[frees];