From c3d1bd7d554ade974f47981d17d1160d3c3a250d Mon Sep 17 00:00:00 2001 From: Tiago Leal <183942127+tiagonleal@users.noreply.github.com> Date: Sun, 29 Nov 2026 22:12:43 +0000 Subject: [PATCH] Tests: serialise the stale-blob pipeline test with library builds a_stale_blob_the_driver_takes_is_made_with_one_create_and_replaced makes two pipelines through Pipelines::make_with_cache_path, and every successful make reaches pipeline_library::store. It did not hold BUILD_TEST, so when it ran while a locked test had a build active (between begin and finish), its pipeline was stored into that test's library and the entry count came out one higher than asserted (#3180). It is the only test in the lib binary that reaches store without the lock: the other makes are in tests that already hold it, the pipeline_library tests that do not lock use NativeLibrary directly, and the real.rs two-pass test returns before store. --- crates/xcl/src/shaders.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/crates/xcl/src/shaders.rs b/crates/xcl/src/shaders.rs index a2a0157716..2868bf7453 100644 --- a/crates/xcl/src/shaders.rs +++ b/crates/xcl/src/shaders.rs @@ -2111,6 +2111,8 @@ mod pipeline_cap_tests { use super::{Pipelines, recomp, Ordering}; use std::time::{SystemTime, UNIX_EPOCH}; use windows::Win32::Graphics::Direct3D12::*; + // its pipelines go into any library build another test has active + let _serial = crate::shaders::pipeline_library::BUILD_TEST.lock().unwrap_or_else(|e| e.into_inner()); struct Scratch(std::path::PathBuf); impl Drop for Scratch {