From cfb4730f07eb4975807257493c1bb5b8c678cbaa Mon Sep 17 00:00:00 2001 From: crastinator Date: Tue, 24 Nov 2026 21:19:30 +0200 Subject: [PATCH] Tests: XCL_REQUIRE_GPU does not fail the heap-window opt-in skip (#1651) heap_window_out_of_memory_falls_back_to_the_switch_form skips when there are no heap windows: they are opt-in (XCL_HEAP_WINDOWS=1), and even then a setup without the shared heap's window views has none. It skipped through runner::skip_test("no heap windows"), and skip_test turns every reason but the hardware one it is not asked about into a panic under XCL_REQUIRE_GPU, so the test failed in every XCL_REQUIRE_GPU run with the default config. Neither case is a missing GPU feature, so the test now prints skip_test's "SKIPPED : " line itself (uncaptured stderr, the line scripts/test.ps1 counts) and returns. --- crates/xcl/tests/gpu_compute_e2e.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/crates/xcl/tests/gpu_compute_e2e.rs b/crates/xcl/tests/gpu_compute_e2e.rs index 0d37e0b84e..9b98d985e9 100644 --- a/crates/xcl/tests/gpu_compute_e2e.rs +++ b/crates/xcl/tests/gpu_compute_e2e.rs @@ -250,7 +250,10 @@ fn heap_window_out_of_memory_falls_back_to_the_switch_form() { let dev = unsafe { ID3D12Device::from_raw_borrowed(&raw) }.unwrap().clone(); if xcl::gpu::recomp::pso::mem_windows() & xcl::gpu::recomp::HEAP_WINDOWS == 0 { println!("no heap windows (opt-in: XCL_HEAP_WINDOWS=1; or no shared heap) – skipping"); - runner::skip_test("no heap windows"); + // not a missing GPU feature, so not runner::skip_test, which panics under XCL_REQUIRE_GPU for + // every reason but its hardware ones (#1651); same line format as skip_test, so test.ps1 counts it + use std::io::Write; + let _ = writeln!(std::io::stderr(), "SKIPPED heap_window_out_of_memory_falls_back_to_the_switch_form: no heap windows (opt-in: XCL_HEAP_WINDOWS=1; or no shared heap)"); return; } struct StopInjecting;