Tests: gpu adapter selector parse/fallback and env override contract #1664
No reviewers
Labels
No labels
accessibility
bug
documentation
duplicate
enhancement
goal:world-load
good first issue
help wanted
invalid
keep-open
off-goal
question
stale
test-only
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/xcl-dev--xcl!1664
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-1664"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
@amazedturnip on GitHub · 2026-11-24 18:57 UTC · original
amazedturnip:xcl/tests-gpu-adapter-selector-parsing-and-matching-183357→main· +150 −0 · 1 files · 1 commits · openAdds an integration test file covering the public
Selectorcontract:parse(empty/auto, warp, positional index, leading-zeros never positional, non-digit/overflow names, lowercased names),from_env_orprecedence (XCL_ADAPTERwhen set and non-blank, configured fallback otherwise),allows(Auto/Warp/Index/Name direct rules), andDisplayrendering. Env-touching tests serialize on a process-global mutex with restore-on-drop. No production code changed; pure parser coverage, GPU-independent.What is in it
crates/xcl/tests/gpu_adapter.rs: new integration test file coveringxcl::gpu::adapter::Selectorparse/fallback (auto/empty, warp, digit positional index, leading-zeros never positional, non-digit names, lowercased names,u64/overflow degrades toName)crates/xcl/tests/gpu_adapter.rs:from_env_orcontract — usesXCL_ADAPTERwhen set and non-blank, otherwise falls back to the configured string; blank/whitespace env values fall backcrates/xcl/tests/gpu_adapter.rs:allows—Automatches every position,Warpmatches nothing,Indexmatches only its position,Namematches case-insensitively by substringcrates/xcl/tests/gpu_adapter.rs:Display—auto/warp/{n}/"{s}"rendering for each variantENV_LOCKmutex +EnvGuard(restores previousXCL_ADAPTERon drop) so env-touching tests cannot leak process stateTested
AMD Radeon(TM) Graphics (driver 32.0.21043.19003, DXC 1.9.2609, native wave64),XCL_ADAPTER=radeon):cargo test --workspace -- --test-threads=2— 868 passed, 0 failed, 42 ignored (SKIPPED GPU tests: 1 (no heap windows))crates/xcl/src/gpu/adapter.rsline 39;cargo test --test gpu_adapterfailed 3/10 (parse_leading_zeros_are_never_a_positional_index,from_env_or_prefers_env_when_set_and_non_blank,from_env_or_falls_back_to_configured_when_unset_or_blank); reverted viagit checkout -- crates/xcl/src/gpu/adapter.rsand re-ran 10/10 passed.Not tested
pub(crate)DXGI device-creation /Selector::select_indiceshardware paths (covered by inline tests incrates/xcl/src/gpu/adapter_tests.rs)AI use
@DavidM1911 on GitHub · 2026-11-24 21:26 UTC · original
Verification on RTX 3060 Ti (Windows 11), branch merged with current
main:cargo test -p xcl --lib: all passed, 0 failed, ~22 ignored.Thanks!
@JJAutoCompare on GitHub · 2026-11-25 04:44 UTC · original
XCL PR #1664 — Windows / Intel Arc A770 verification
Tested clean, detached head
48702fb268a74de9528a833a6c57d4159ec94e8eon STOR-WINLAB. Intel Arc A770 (driver 32.0.101.9175), AMD Ryzen 7 3800X, Windows 11 Enterprise Evaluation build 26200. DXC 1.9.2609.5, verified withdxc.exe --version. Rust 1.100.0 (0ef1bc386, x86_64-pc-windows-msvc). Cargo dev/test profiles were unoptimized with debug info and incremental compilation disabled.Tested
cargo build --workspacepassed.cargo test --workspace --no-runcompiled 20 test binaries. Both ran outside the Arc mutex.cargo test -p xcl --test gpu_adapterwithXCL_ADAPTER=NONE_CPU_ONLYran outside the mutex. 10 passed, 0 failed, 0 ignored, 0 skipped. The only changed file,crates/xcl/tests/gpu_adapter.rs, covers auto/WARP and name normalization, positional indices, leading-zero and overflow name fallback, nonblank environment override and unset/blank configuration fallback, direct index and name matching, and display formatting. These tests use no DXGI calls.cargo test --workspace --no-fail-fast -- --test-threads=4ran once insideInvoke-ArcTest.ps1withXCL_ADAPTER=A770andRUST_TEST_NOCAPTURE=1. Exit 101. All 21 result lines (20 binaries and one doc-test run) sum to 850 passed, 18 failed, and 42 ignored. All 10 selector tests passed again.Workspace failures and skips
test_title_runs_and_game_folder_is_untouchedreported blue where theRSSetDepthBiasXcheck expected green.SKIPPEDmarkers already appear in the harness pass tally and provide no coverage. Two reported no wave64, two reported missing D3D12 debug-layer support, one reported tiled tier below 2, and one reported no heap windows.Not tested
Matched main baseline, retail-title smoke run, other adapters, and sample-backed paths gated by unset
XCL_SAMPLE_*variables.AI use
T3 Code / Codex (gpt-6.2-sol, reasoningEffort: high) ran the build and verification. Coordinator #2 (T3 Code / Antigravity, gemini-4-neon) verified counts against
pr1664-suite.logand published.View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.