tests: call the saved QueryApiImpl through load_real_query() #2196

Merged
MasterDomino merged 1 commit from upstream-pr/2204 into main 2026-11-25 04:43:58 +00:00
MasterDomino commented 2026-11-25 04:37:45 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by MasterDomino on 2026-11-25T04:37:45Z.


What

tests/startup_gamesave_read_async.cpp and tests/startup_gamesave_submit.cpp now call the saved QueryApiImpl through load_real_query() instead of calling real_query directly.

Why

#2166 made real_query a std::atomic<QueryApi> in src/startup_stubs/runtime_proxy.cpp. Calling an atomic function pointer directly is ambiguous on MSVC 19.44 (Visual Studio 2022 17.14). Both the volatile and the non-volatile conversion operators of std::atomic are candidates, so the release build of current main stops with:

tests\startup_gamesave_read_async.cpp(231): error C3066: call to an object of this type is ambiguous
tests\startup_gamesave_submit.cpp(106): error C3066: call to an object of this type is ambiguous

load_real_query() is the acquire load that the proxy already uses for every other call. Behaviour is unchanged.

Tests

Windows 11 build 26300, MSVC 19.44.35221, release preset. Base: main at 19e04be9.

cmake --build --preset release --target startup_gamesave_read_async startup_gamesave_submit
ctest --preset release --no-tests=error -R '^startup_gamesave_(read_async|submit)' --output-on-failure
  • Before: the build fails with the two C3066 errors above.
  • After: both targets build, and 4 of 4 tests pass: startup_gamesave_submit_{controlled,system} and startup_gamesave_read_async_{controlled,system}. The system cases ran against the installed gaming runtime (Gaming Services 39.118.30001.0) and were not skipped.

Refs #2166

🤖 Generated with Claude Code

<!-- greyfinch-sync:R0Y00/Xbox2Windows:issue:6597320654 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/2204). Originally posted by [MasterDomino](https://github.com/MasterDomino) on 2026-11-25T04:37:45Z. --- ## What `tests/startup_gamesave_read_async.cpp` and `tests/startup_gamesave_submit.cpp` now call the saved `QueryApiImpl` through `load_real_query()` instead of calling `real_query` directly. ## Why #2166 made `real_query` a `std::atomic<QueryApi>` in `src/startup_stubs/runtime_proxy.cpp`. Calling an atomic function pointer directly is ambiguous on MSVC 19.44 (Visual Studio 2022 17.14). Both the `volatile` and the non-`volatile` conversion operators of `std::atomic` are candidates, so the release build of current `main` stops with: ``` tests\startup_gamesave_read_async.cpp(231): error C3066: call to an object of this type is ambiguous tests\startup_gamesave_submit.cpp(106): error C3066: call to an object of this type is ambiguous ``` `load_real_query()` is the acquire load that the proxy already uses for every other call. Behaviour is unchanged. ## Tests Windows 11 build 26300, MSVC 19.44.35221, `release` preset. Base: `main` at `19e04be9`. ```powershell cmake --build --preset release --target startup_gamesave_read_async startup_gamesave_submit ctest --preset release --no-tests=error -R '^startup_gamesave_(read_async|submit)' --output-on-failure ``` - **Before:** the build fails with the two C3066 errors above. - **After:** both targets build, and 4 of 4 tests pass: `startup_gamesave_submit_{controlled,system}` and `startup_gamesave_read_async_{controlled,system}`. The system cases ran against the installed gaming runtime (Gaming Services 39.118.30001.0) and were not skipped. Refs #2166 🤖 Generated with [Claude Code](https://claude.com/claude-code)
upstream-sync closed this pull request 2026-11-25 05:04:54 +00:00
tedin7 commented 2026-11-25 05:04:54 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by tedin7 on 2026-11-25T04:43:17Z.

Review: COMMENTED


Review of head 1d82ff22ce8bfec7343b6459169801316c1514c4: 0 P1, 0 P2.

  • real_query is std::atomic<QueryApi>. Calling it directly is ambiguous on MSVC (C3066). load_real_query() is the acquire load already used by the proxy, so behaviour is unchanged and the two edits match the sibling call sites.
  • No other open PR touches these lines.

Commands executed locally:

  • python3 tests/docs_links_check.py: pass (405 links)
  • python3 tests/bidi_controls_check.py: pass
  • git diff --check origin/main...HEAD: clean
  • Windows Server 2025, dev and release /O2: x2w_pipe.py win2025 2204 --scope direct --targets startup_gamesave_submit,startup_gamesave_read_async --regex '^startup_gamesave_(read_async|submit)_': both builds PASS, controlled tests pass. The _system variants skip (capability skip, not counted as a pass).
  • Mutation: restored the direct real_query(...) call in tests/startup_gamesave_submit.cpp and ran the same target on Windows: build fails with error C3066: call to an object of this type is ambiguous. Reverted.
  • CI Build and test on Windows: pass.

AI-assisted; commands listed were executed locally.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:review:6051969857 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/2204#pullrequestreview-6051969857). Originally posted by [tedin7](https://github.com/tedin7) on 2026-11-25T04:43:17Z. **Review:** COMMENTED --- Review of head `1d82ff22ce8bfec7343b6459169801316c1514c4`: 0 P1, 0 P2. - `real_query` is `std::atomic<QueryApi>`. Calling it directly is ambiguous on MSVC (C3066). `load_real_query()` is the acquire load already used by the proxy, so behaviour is unchanged and the two edits match the sibling call sites. - No other open PR touches these lines. Commands executed locally: - `python3 tests/docs_links_check.py`: pass (405 links) - `python3 tests/bidi_controls_check.py`: pass - `git diff --check origin/main...HEAD`: clean - Windows Server 2025, dev and release /O2: `x2w_pipe.py win2025 2204 --scope direct --targets startup_gamesave_submit,startup_gamesave_read_async --regex '^startup_gamesave_(read_async|submit)_'`: both builds PASS, controlled tests pass. The `_system` variants skip (capability skip, not counted as a pass). - Mutation: restored the direct `real_query(...)` call in `tests/startup_gamesave_submit.cpp` and ran the same target on Windows: build fails with `error C3066: call to an object of this type is ambiguous`. Reverted. - CI `Build and test on Windows`: pass. AI-assisted; commands listed were executed locally.
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!2196
No description provided.