From 1f517a05efdb76b13744ffc1b7a48be3270029b4 Mon Sep 17 00:00:00 2001 From: bmjask <11672696+bmjask@users.noreply.github.com> Date: Sun, 29 Nov 2026 19:11:17 -0500 Subject: [PATCH] Tests: account for deferred stand-in pipeline release The concurrent stand-in test expected the winning pipeline to be released synchronously with its last shell. Production intentionally routes that pipeline through late_release, so the assertion raced the deferred release and failed in no-GPU CI. Capture the deferred release deterministically, verify the winning reference, and release it before checking final counts. Assisted-by: Codex (GPT-5) --- crates/xcl/src/hle/d3d12x/standin.rs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/crates/xcl/src/hle/d3d12x/standin.rs b/crates/xcl/src/hle/d3d12x/standin.rs index 636617c6c4..13b828f29a 100644 --- a/crates/xcl/src/hle/d3d12x/standin.rs +++ b/crates/xcl/src/hle/d3d12x/standin.rs @@ -455,8 +455,13 @@ mod tests { assert!(s1 != s2 && d1 == d2); let (winner, loser) = if d1 == at(p1) { (p1, p2) } else { (p2, p1) }; assert_eq!((refs(winner), refs(loser), refs(rs)), (1, 0, 2)); + let_go_taken(); unsafe { release(s1 as *mut c_void); release(s2 as *mut c_void); } + assert_eq!((refs(winner), refs(loser), refs(rs)), (1, 0, 1), "the winner waits for late release"); + assert_eq!(let_go_taken(), vec![at(winner)]); + unsafe { unref(at(winner)); } assert_eq!((refs(p1), refs(p2), refs(rs)), (0, 0, 1)); + LET_GO.with(|l| l.borrow_mut().take()); } #[test]