tests: cover wrapper allocation failures for placed resources #2732

Merged
RonLogic merged 1 commit from upstream-pr/2740 into main 2026-11-26 05:02:39 +00:00
RonLogic commented 2026-11-26 04:52:42 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by RonLogic on 2026-11-26T04:52:42Z.


Change

Refs #2653 and #2656. Extend the existing startup_wrap_allocation fixture to exercise both slot 133 resource creation paths. The test uses a committed synthetic page, a 256-byte buffer at a deliberately unaligned address, and a 4×4 RGBA8 texture. After the desktop resource is created, the existing injected wrapper failure must return E_OUTOFMEMORY with a null output. A retry at the same address must return a valid resource.

Verification

Tested 056ea9f5 on Windows 26300.10075, MSVC 19.52 x64. The allocation fixture uses in-box WARP (10.0.26100.10068) and its registered debug-layer setting of off.

cmake --build --preset dev --target startup_wrap_allocation
ctest --preset dev --no-tests=error -j 1 -R '^startup_wrap_allocation' --output-on-failure
cmake --build --preset release --target startup_wrap_allocation startup_stream_consumer
$env:XBOX2WINDOWS_ADAPTER = 'RTX 4070'
ctest --preset release --no-tests=error -j 1 -R '^(startup_wrap_allocation|startup_memory_srv_diag)' -V

Debug 2/2 and Release 5/5 passed without skips. The Release group included the memory-SRV diagnostics on WARP and RTX 4070 (32.0.16.2124). The existing unarmed control reported both slot 133 failures with S_OK and a non-null output, proving the injected result is required. git diff --check was clean and the branch merged cleanly against a766f287.

The buffer case exercises the desktop stand-in for an unaligned placement. I used Codex to prepare the change and ran the verification locally.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:issue:6619781028 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/2740). Originally posted by [RonLogic](https://github.com/RonLogic) on 2026-11-26T04:52:42Z. --- ## Change Refs #2653 and #2656. Extend the existing `startup_wrap_allocation` fixture to exercise both slot 133 resource creation paths. The test uses a committed synthetic page, a 256-byte buffer at a deliberately unaligned address, and a 4×4 RGBA8 texture. After the desktop resource is created, the existing injected wrapper failure must return `E_OUTOFMEMORY` with a null output. A retry at the same address must return a valid resource. ## Verification Tested `056ea9f5` on Windows `26300.10075`, MSVC 19.52 x64. The allocation fixture uses in-box WARP (`10.0.26100.10068`) and its registered debug-layer setting of off. ```powershell cmake --build --preset dev --target startup_wrap_allocation ctest --preset dev --no-tests=error -j 1 -R '^startup_wrap_allocation' --output-on-failure cmake --build --preset release --target startup_wrap_allocation startup_stream_consumer $env:XBOX2WINDOWS_ADAPTER = 'RTX 4070' ctest --preset release --no-tests=error -j 1 -R '^(startup_wrap_allocation|startup_memory_srv_diag)' -V ``` Debug 2/2 and Release 5/5 passed without skips. The Release group included the memory-SRV diagnostics on WARP and RTX 4070 (`32.0.16.2124`). The existing unarmed control reported both slot 133 failures with `S_OK` and a non-null output, proving the injected result is required. `git diff --check` was clean and the branch merged cleanly against `a766f287`. The buffer case exercises the desktop stand-in for an unaligned placement. I used Codex to prepare the change and ran the verification locally.
upstream-sync closed this pull request 2026-11-26 06:02:00 +00:00
R0Y00 commented 2026-11-26 06:02:00 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by R0Y00 on 2026-11-26T05:02:30Z.

Review: APPROVED


I independently ran the two Release startup_wrap_allocation WARP entries on 056ea9f5. Both passed, including the unarmed negative that reports a successful non-null output for the deliberately unaligned buffer and the placed texture. With injection both return E_OUTOFMEMORY and null, and retry at the original address succeeds. This is focused slot-133 coverage with no runtime change.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:review:6068797391 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/2740#pullrequestreview-6068797391). Originally posted by [R0Y00](https://github.com/R0Y00) on 2026-11-26T05:02:30Z. **Review:** APPROVED --- I independently ran the two Release startup_wrap_allocation WARP entries on 056ea9f5. Both passed, including the unarmed negative that reports a successful non-null output for the deliberately unaligned buffer and the placed texture. With injection both return E_OUTOFMEMORY and null, and retry at the original address succeeds. This is focused slot-133 coverage with no runtime change.
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
R0Y00/Xbox2Windows!2732
No description provided.