Tests: pin gpu::adapter name() DXGI DESC1 extraction contract #1721
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/1731"
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?
Imported from ivall/xcl. Originally posted by amazedturnip on 2026-11-24T20:00:47Z.
Adds crates/xcl/tests/gpu_adapter_desc.rs: an integration test pinning adapter::name() to return exactly the UTF-16 prefix of DXGI_ADAPTER_DESC1::Description up to the first NUL, capped at the 128-code-unit array. Constructs only default/NUL-padded descriptions (no device, no GPU); verifies trailing-NUL padding, 127/128-unit boundary truncation, NUL-in-middle, all-NUL/empty, NUL-first, and non-ASCII code units. No production code changed.
What is in it
Tested
AMD Radeon(TM) Graphics (driver 32.0.21043.19003, DXC 1.9.2609, native wave64),XCL_ADAPTER=radeon):cargo test --workspace -- --test-threads=2— 864 passed, 0 failed, 42 ignored (SKIPPED GPU tests: 1 (no heap windows))Not tested
AI use
Imported from ivall/xcl. Originally posted by DavidM1911 on 2026-11-24T22:37:47Z.
Verification on RTX 3060 Ti (Windows 11), branch merged with current
main:cargo test -p xcl --lib: all passed, 0 failed, ~23 ignored.Thanks!
Imported from ivall/xcl. Originally posted by JJAutoCompare on 2026-11-25T04:04:14Z.
XCL PR #1731 verification
Head
86c3eb9fe59dad01fb76c5f09c8f9146bb72b69a. Clean detached worktree on STOR-WINLAB. The diff adds onlycrates/xcl/tests/gpu_adapter_desc.rs.AMD Ryzen 7 3800X, Intel Arc A770 (driver 32.0.101.9175), Windows 11 Enterprise Evaluation x64 (build 26200), DXC 1.9.2609.5, rustc 1.100.0 (0ef1bc386, x86_64-pc-windows-msvc). Cargo dev/test profiles had debug info and incremental compilation disabled.
Tested
cargo build --workspaceandcargo test --workspace --no-runboth succeeded outside the Arc mutex. The latter built 20 test binaries.cargo test -p xcl --test gpu_adapter_descwithXCL_ADAPTER=NONE_CPU_ONLYoutside the mutex reported 6 passed, 0 failed, 0 ignored, 0 skipped. The tests construct in-memory DXGI descriptors and verify trailing NUL padding, an interior or leading NUL, all-zero descriptions, the 127/128 UTF-16 code-unit boundary, and non-ASCII BMP characters (® and ™). They require no DXGI factory or GPU device.cargo test --workspace --no-fail-fast -- --test-threads=4ran once insideInvoke-ArcTest.ps1withXCL_ADAPTER=A770andRUST_TEST_NOCAPTURE=1. The log confirms the A770 backend. The 21 result summaries (20 test binaries and one doctest target) report 863 passed, 18 failed, 42 ignored. Cargo exited 101. The six PR tests passed again.Workspace failures and skips
CreateComputePipelineStateerror0x80070057. Four reported mismatches in FMA overflow, implicit mip LOD sampling, f16 high-half preservation, or wave64 pixel reductions.test_title_runs_and_game_folder_is_untouched. The top-right pixel was blue where green was expected.pr1731-suite.loghas 7 lines beginning withSKIPPED, already included in Cargo's pass count. Reasons were no wave64 (2), no D3D12 debug layer (2), tiled tier below 2, inability to disable the driver cache, and no heap windows. These skips provide no coverage.Not tested
Matched main run, retail-title smoke, sample game data, or AMD/NVIDIA GPUs.
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
pr1731-suite.logand published.upstream-sync referenced this pull request2026-11-26 13:04:54 +00:00
Imported from ivall/xcl. Originally posted by github-actions[bot] on 2026-11-28T20:17:40Z.
Nothing has happened on this PR for 3 days, so it is marked
staleand will be closed in 4 days. A push or a comment takes the mark off: rebase it ontomainif it conflicts, and say in one line what it still fixes. If it only waits for a maintainer, a comment saying so is enough.Imported from ivall/xcl. Originally posted by amazedturnip on 2026-11-28T20:36:44Z.
Still merges cleanly onto main (
765b2c5b) with passing checks; pins gpu::adapter::name() UTF-16 DXGI_ADAPTER_DESC1 extraction and NUL truncation contracts — waiting on maintainer / post-goal review.Imported from ivall/xcl. Originally posted by Foniass on 2026-12-01T06:36:52Z.
Triage (#1607) – head
86c3eb9No open or merged PR tests
gpu::adapter::name; main has no test of it (adapter_tests.rsdoes not cover it).Nits: CONTRIBUTING puts unit tests of a function in the file's test module (
crates/xcl/src/gpu/adapter_tests.rs) rather than a new integration test binary;name_with_non_bmp_code_units_round_tripsonly uses BMP characters (®, ™), so it does not test surrogate pairs as its name says.Recommendation: keep open.
AI review: Claude Code (Claude Opus 5.5), diffs read only, not built or run; not checked by a human.
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.Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.