tests: cover wrapper allocation failures for placed resources #2740

Manually merged
github merged 1 commit from gh-pr/2740/head into gh-pr/2740/base 2026-11-27 01:19:28 +00:00
Owner

@⁠RonLogic on GitHub · 2026-11-26 04:52 UTC · original
RonLogic:test/placed-resource-wrapper-oom → main · +29 −1 · 2 files · 1 commits · merged 2026-11-26 05:02 UTC

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.

**@⁠RonLogic** on GitHub · 2026-11-26 04:52 UTC · [original](https://github.com/R0Y00/Xbox2Windows/pull/2740) `RonLogic:test/placed-resource-wrapper-oom` → `main` · +29 −1 · 2 files · 1 commits · merged 2026-11-26 05:02 UTC ## 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.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-27 01:19:26 +00:00
github manually merged commit 056ea9f525 into gh-pr/2740/base 2026-11-27 01:19:28 +00:00
Author
Owner

@⁠R0Y00 on GitHub · 2026-11-26 05:02 UTC · original · approved these changes

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.

**@⁠R0Y00** on GitHub · 2026-11-26 05:02 UTC · [original](https://github.com/R0Y00/Xbox2Windows/pull/2740#pullrequestreview-6068797391) · **approved these changes** 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.
This discussion has been locked. Commenting is limited to contributors.
No description provided.