From e5d7cd70e22d6e4fe244f43528b0d66cfe1fe569 Mon Sep 17 00:00:00 2001 From: Anees Iqbal Date: Sun, 8 Nov 2026 06:50:21 -0800 Subject: [PATCH] HostRam device tests: settle the submission checks before reading the device's allocations tests::host_ram_device::the_ahead_thread_leaves_the_allocation_limit_to_the_objects failed on the Radeon 780M (homelab-um790-xtx-1, RADV, Mesa 26.2.6) in a run of 41 host RAM tests in parallel, at its check that the device's live allocations stand at the limit less its margin once the thread stopped (host_ram_device.rs:575), and passed alone five times and with host_ram_device's 20 tests. The test picks the allocation limit from the live allocations it reads first; the device's submission checks (submit_check.rs) hold imports of their own while they run (TAX_IMPORTS), off the test's thread, and a test that read the live count while they held them saw the count drop once they let go. ahead_device now waits for the checks to answer, as host_residency's device does, so no test of the file reads counts or a limit the checks move. Verified: cargo fmt; the 780M runs follow. (cherry picked from commit 6ccb33ed88c3650b6014666a7e386c2b3312550c) --- crates/metal2vulkan-runtime/src/tests/host_ram_device.rs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/crates/metal2vulkan-runtime/src/tests/host_ram_device.rs b/crates/metal2vulkan-runtime/src/tests/host_ram_device.rs index d8ecfc48c..1f0565840 100644 --- a/crates/metal2vulkan-runtime/src/tests/host_ram_device.rs +++ b/crates/metal2vulkan-runtime/src/tests/host_ram_device.rs @@ -176,6 +176,12 @@ pub(super) fn ahead_device() -> Option { // Asked now, by an import of one page released at once, so that no test's counts or // allocation limit meet that import ([`fresh_ram`] reads the answer). device.imports_shared_host_pointers().unwrap(); + // The submission checks' imports, held while they run (`submit_check.rs`), likewise: a + // test that read the device's live allocations while they ran saw them go later. + assert!( + device.settle_submit_checks(crate::tests::SETTLE), + "the submission checks never answered" + ); Some(device) }