Tests: align the XMemVirtualQuery output buffer #656

Closed
github-bot wants to merge 1 commit from gh-pr/656/head into gh-pr/656/base
Owner

@⁠TurGangS on GitHub · 2026-11-24 02:56 UTC · original
TurGangS:tests-align-xmem-query → main · +7 −2 · 1 files · 1 commits · closed without merging

The debug memory-query test failed on this PC at its first assertion. #454 and #465 also report that failure. Its 64-byte output buffer has byte alignment, but VirtualQueryEx writes a MEMORY_BASIC_INFORMATION there and the test reads it as that type.

What is in it

  • Align the buffer to 8 bytes in the kernelx test and clear it between the committed and reserved page cases. Both cases keep their original assertions.

Tested

  • Windows 11 build 26300.9974, i9-14900KF, RTX 4070 Ti (32.0.16.1088), Rust 1.88.0, DXC 1.9.2609.5, debug.
  • The focused test failed on 18c105a (returned 0, expected 1) and passed on d3e0b22.
  • cargo test --offline --workspace -- --test-threads=4: 689 passed, 0 failed, 41 ignored. Two passes reported SKIPPED (no wave64): gpu_geometry_wave32_prefix_count_over_a_mask and gpu_wave32_program_in_wave64_hardware. The first suite attempt stalled in GPU tests and was stopped before this successful retry.

Regression run

  • Only the test changes. Please apply the test-only label after reviewing the diff.

Not tested

  • Retail titles, release mode on this revision, and other hardware.

AI use

  • OpenAI Codex (GPT-6) reproduced the failure, edited the test, ran the suite and drafted this description.
**@⁠TurGangS** on GitHub · 2026-11-24 02:56 UTC · [original](https://github.com/xcl-dev/xcl/pull/656) `TurGangS:tests-align-xmem-query` → `main` · +7 −2 · 1 files · 1 commits · closed without merging The debug memory-query test failed on this PC at its first assertion. #454 and #465 also report that failure. Its 64-byte output buffer has byte alignment, but VirtualQueryEx writes a MEMORY_BASIC_INFORMATION there and the test reads it as that type. **What is in it** - Align the buffer to 8 bytes in the kernelx test and clear it between the committed and reserved page cases. Both cases keep their original assertions. **Tested** - Windows 11 build 26300.9974, i9-14900KF, RTX 4070 Ti (32.0.16.1088), Rust 1.88.0, DXC 1.9.2609.5, debug. - The focused test failed on 18c105a (returned 0, expected 1) and passed on d3e0b22. - `cargo test --offline --workspace -- --test-threads=4`: 689 passed, 0 failed, 41 ignored. Two passes reported SKIPPED (no wave64): gpu_geometry_wave32_prefix_count_over_a_mask and gpu_wave32_program_in_wave64_hardware. The first suite attempt stalled in GPU tests and was stopped before this successful retry. **Regression run** - Only the test changes. Please apply the test-only label after reviewing the diff. **Not tested** - Retail titles, release mode on this revision, and other hardware. **AI use** - OpenAI Codex (GPT-6) reproduced the failure, edited the test, ran the suite and drafted this description.
The test passes a byte array to VirtualQueryEx and reads it as MEMORY_BASIC_INFORMATION. Give the array the alignment of the x64 structure so the result no longer depends on the stack layout.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 04:28:38 +00:00
github-bot closed this pull request 2026-11-26 04:28:38 +00:00
Author
Owner

@⁠MonkeyPython on GitHub · 2026-11-24 03:06 UTC · original

Third data point for the #650 / #656 choice: xmem_virtual_query_marks_cpu_readable_memory passes on this Windows host at this PR's head, on both adapters.

Setup: Windows 11 Pro 26300, Ryzen 7 7800X3D, 32 GB; RTX 3080 Ti 12 GB (driver 621.01) and AMD Radeon(TM) Graphics (Raphael iGPU). PR head d3e0b22, release.

Runs (cargo test -p xcl --release --lib xmem_virtual_query_marks_cpu_readable_memory):

  • Default adapter (3080 Ti): 1 passed / 0 failed.
  • XCL_ADAPTER=Radeon (iGPU): 1 passed / 0 failed.

The test is CPU-side (kernelx working-set query), so it is adapter-independent here; the failures reported on 4070 Ti and Mac do not reproduce on this machine. It also passed in every full-suite run this session (a6f5f7a, 508a0c7, dd2ae9a).

Not tested: the 4070 Ti / Mac configurations themselves.

AI use: Gentle Shell (Pi coding agent), model qwen4-max: ran the tests and wrote this report from their logs; a human reviews it before posting. No code changes.

**@⁠MonkeyPython** on GitHub · 2026-11-24 03:06 UTC · [original](https://github.com/xcl-dev/xcl/pull/656#issuecomment-7120779547) Third data point for the #650 / #656 choice: `xmem_virtual_query_marks_cpu_readable_memory` passes on this Windows host at this PR's head, on both adapters. **Setup:** Windows 11 Pro 26300, Ryzen 7 7800X3D, 32 GB; RTX 3080 Ti 12 GB (driver 621.01) and AMD Radeon(TM) Graphics (Raphael iGPU). PR head `d3e0b22`, release. **Runs (`cargo test -p xcl --release --lib xmem_virtual_query_marks_cpu_readable_memory`):** - Default adapter (3080 Ti): **1 passed / 0 failed**. - `XCL_ADAPTER=Radeon` (iGPU): **1 passed / 0 failed**. The test is CPU-side (kernelx working-set query), so it is adapter-independent here; the failures reported on 4070 Ti and Mac do not reproduce on this machine. It also passed in every full-suite run this session (a6f5f7a, 508a0c7, dd2ae9a). **Not tested:** the 4070 Ti / Mac configurations themselves. **AI use:** Gentle Shell (Pi coding agent), model qwen4-max: ran the tests and wrote this report from their logs; a human reviews it before posting. No code changes.
Author
Owner

@⁠ivall on GitHub · 2026-11-24 20:43 UTC · original

Closing this as a duplicate: #650 makes the same change and was opened first (the XMemVirtualQuery tests use an aligned buffer). It stays open and is the one that will be reviewed and merged.

This says nothing about the quality of the code here. I compared the two diffs; the pair was also found by independent checks in #1607. If this PR covers a case #650 does not, or #650 is closed without being merged, say so and I'll reopen it. A test that is only here is welcome on #650.

Thank you for the work.

AI use: Claude Code (Claude Opus 5.5) compared the diffs and wrote this comment; the decision is the maintainer's.

**@⁠ivall** on GitHub · 2026-11-24 20:43 UTC · [original](https://github.com/xcl-dev/xcl/pull/656#issuecomment-7143967944) Closing this as a duplicate: #650 makes the same change and was opened first (the XMemVirtualQuery tests use an aligned buffer). It stays open and is the one that will be reviewed and merged. This says nothing about the quality of the code here. I compared the two diffs; the pair was also found by independent checks in #1607. If this PR covers a case #650 does not, or #650 is closed without being merged, say so and I'll reopen it. A test that is only here is welcome on #650. Thank you for the work. AI use: Claude Code (Claude Opus 5.5) compared the diffs and wrote this comment; the decision is the maintainer's.

Pull request closed

This discussion has been locked. Commenting is limited to contributors.
No description provided.