Tests: align the XMemVirtualQuery output buffer #651

Closed
TurGangS wants to merge 1 commit from upstream-pr/656 into main
TurGangS commented 2026-11-24 02:56:49 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by TurGangS on 2026-11-24T02:56:49Z.


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.
<!-- greyfinch-sync:ivall/xcl:issue:6573582171 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/656). Originally posted by [TurGangS](https://github.com/TurGangS) on 2026-11-24T02:56:49Z. --- 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.
MonkeyPython commented 2026-11-24 07:05:45 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by MonkeyPython on 2026-11-24T03:06:36Z.


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.

<!-- greyfinch-sync:ivall/xcl:comment:7120779547 --> Imported from [ivall/xcl](https://github.com/ivall/xcl/pull/656#issuecomment-7120779547). Originally posted by [MonkeyPython](https://github.com/MonkeyPython) on 2026-11-24T03:06:36Z. --- 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.
upstream-sync closed this pull request 2026-11-24 21:04:16 +00:00
ivall commented 2026-11-24 21:09:38 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by ivall on 2026-11-24T20:43:20Z.


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.

<!-- greyfinch-sync:ivall/xcl:comment:7143967944 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/656#issuecomment-7143967944). Originally posted by [ivall](https://github.com/ivall) on 2026-11-24T20:43:20Z. --- 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

Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
xcl-dev/xcl!651
No description provided.