compat-common: XTaskQueue / XAsync conformance scenarios as tests (resubmission of #48) #211

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

@⁠QuentinDanblon on GitHub · 2026-11-23 02:15 UTC · original
QuentinDanblon:pr/xtq-conformance → main · +2344 −0 · 4 files · 1 commits · closed without merging

Library / area: compat-common tests (XTaskQueue / XAsync). No runtime code.

Exports changed (exports.txt rows): none

Source of the behaviour: libHttpClient TaskQueueTests.cpp and AsyncBlockTests.cpp (MIT, @⁠c5007fd9), ported as scenarios against the public API, no code copied. Each scenario is also run against the PC xgameruntime.dll 10.0.26100.9656. This is the PC runtime, not a console.

Resubmission of #48, as you asked there: branched from the current main (ad24144), comment lines stripped (the one trailing comment too), rerun against the current rt.rs, DIFFERS rechecked entry by entry. Tests only: 3 new files and one THIRD_PARTY/CREDITS line, +2,344. I could not make it a few hundred lines without cutting scenarios; say if you want it in slices.

file role
tests/support/xtq.rs the 60 scenarios, written once against a small Api wrapper over the interface slots
tests/gdk_xtaskqueue_conformance.rs runs them on the emulated runtime; holds DIFFERS
tests/gdk_xtaskqueue_conformance_real.rs runs them on the PC runtime when Gaming Services is installed, skips itself otherwise

Results on ad24144

target pass skipped
PC runtime 57 3 (they check libHttpClient fixes newer than the installed runtime)
emulated, default run 35 25 (DIFFERS)

The default run is stable here: 4 runs out of 4 on this base, and 6 out of 6 earlier tonight on 2eda8b0 with the same rt.rs.

DIFFERS, rechecked on the current rt.rs

None of the 25 entries is stale. I ran each one alone 5 times with TOMBOX_XTQ_ALL=1 and compared the failure with the written reason:

  • 21 fail every time with the reason listed.
  • verify_get_async_status_no_deadlock does not finish (5 / 5, 40 s timeout).
  • verify_cancellation fails 4 / 5, verify_wait_for_completion 1 / 5, verify_no_write_after_get_status_race 0 / 5 alone (it failed under load before).

Reasons reworded after measuring the cause on the PC runtime:

  • the three cancel scenarios: XAsyncCancel completes the call itself with E_ABORT; the PC runtime leaves it pending until the provider completes it;
  • verify_get_async_status_no_deadlock: a call begun on a block whose previous call has just completed can lose its state;
  • verify_wait_for_completion: only a completed call with a result is affected.

Relation to #210

Independent, both are on main. With the rt.rs of #210, three entries pass (10 runs each, alone): verify_get_async_status_no_deadlock, verify_wait_for_completion, verify_no_write_after_get_status_race. The three cancel scenarios still fail, as #210 says. Whichever lands second, I will send the three-line follow-up that removes those entries from DIFFERS.

The 19 other entries, by area: XTaskQueueRegisterWaiter returns E_NOTIMPL (5), terminate and composite behaviour (4), XAsync return codes (5), and one each for XTaskQueueDuplicateHandle, dispatch on a pool port, close with queued callbacks, the monitor port and the pool size. The list is in the file with one line each.

No comment lines added (PR gate: 4 files checked, 0 problems).

  • cargo test -p compat-common --release --test gdk_xtaskqueue_conformance --test gdk_xtaskqueue_conformance_real passes
  • No game or console files and no binaries included
  • No fake success; anything not possible is left missing with a note

🤖 Generated with Claude Code

**@⁠QuentinDanblon** on GitHub · 2026-11-23 02:15 UTC · [original](https://github.com/omonkeyz/xbox-emulator/pull/211) `QuentinDanblon:pr/xtq-conformance` → `main` · +2344 −0 · 4 files · 1 commits · closed without merging **Library / area:** compat-common tests (XTaskQueue / XAsync). No runtime code. **Exports changed (exports.txt rows):** none **Source of the behaviour:** libHttpClient `TaskQueueTests.cpp` and `AsyncBlockTests.cpp` (MIT, @⁠c5007fd9), ported as scenarios against the public API, no code copied. Each scenario is also run against the PC `xgameruntime.dll` 10.0.26100.9656. This is the PC runtime, not a console. Resubmission of #48, as you asked there: branched from the current `main` (`ad24144`), comment lines stripped (the one trailing comment too), rerun against the current `rt.rs`, `DIFFERS` rechecked entry by entry. Tests only: 3 new files and one `THIRD_PARTY/CREDITS` line, +2,344. I could not make it a few hundred lines without cutting scenarios; say if you want it in slices. | file | role | |---|---| | `tests/support/xtq.rs` | the 60 scenarios, written once against a small `Api` wrapper over the interface slots | | `tests/gdk_xtaskqueue_conformance.rs` | runs them on the emulated runtime; holds `DIFFERS` | | `tests/gdk_xtaskqueue_conformance_real.rs` | runs them on the PC runtime when Gaming Services is installed, skips itself otherwise | ### Results on `ad24144` | target | pass | skipped | |---|---|---| | PC runtime | 57 | 3 (they check libHttpClient fixes newer than the installed runtime) | | emulated, default run | 35 | 25 (`DIFFERS`) | The default run is stable here: 4 runs out of 4 on this base, and 6 out of 6 earlier tonight on `2eda8b0` with the same `rt.rs`. ### `DIFFERS`, rechecked on the current `rt.rs` None of the 25 entries is stale. I ran each one alone 5 times with `TOMBOX_XTQ_ALL=1` and compared the failure with the written reason: - 21 fail every time with the reason listed. - `verify_get_async_status_no_deadlock` does not finish (5 / 5, 40 s timeout). - `verify_cancellation` fails 4 / 5, `verify_wait_for_completion` 1 / 5, `verify_no_write_after_get_status_race` 0 / 5 alone (it failed under load before). Reasons reworded after measuring the cause on the PC runtime: - the three cancel scenarios: `XAsyncCancel` completes the call itself with `E_ABORT`; the PC runtime leaves it pending until the provider completes it; - `verify_get_async_status_no_deadlock`: a call begun on a block whose previous call has just completed can lose its state; - `verify_wait_for_completion`: only a completed call with a result is affected. ### Relation to #210 Independent, both are on `main`. With the `rt.rs` of #210, three entries pass (10 runs each, alone): `verify_get_async_status_no_deadlock`, `verify_wait_for_completion`, `verify_no_write_after_get_status_race`. The three cancel scenarios still fail, as #210 says. Whichever lands second, I will send the three-line follow-up that removes those entries from `DIFFERS`. The 19 other entries, by area: `XTaskQueueRegisterWaiter` returns `E_NOTIMPL` (5), terminate and composite behaviour (4), `XAsync` return codes (5), and one each for `XTaskQueueDuplicateHandle`, dispatch on a pool port, close with queued callbacks, the monitor port and the pool size. The list is in the file with one line each. No comment lines added (PR gate: 4 files checked, 0 problems). - [x] `cargo test -p compat-common --release --test gdk_xtaskqueue_conformance --test gdk_xtaskqueue_conformance_real` passes - [x] No game or console files and no binaries included - [x] No fake success; anything not possible is left `missing` with a note 🤖 Generated with [Claude Code](https://claude.com/claude-code)
60 scenarios in tests/support/xtq.rs, written against the public API and
run through two harnesses:
- gdk_xtaskqueue_conformance.rs: the emulated runtime (gdk/rt.rs);
- gdk_xtaskqueue_conformance_real.rs: the PC xgameruntime.dll, when it is
  installed. It skips itself otherwise.

The behaviours come from libHttpClient's TaskQueueTests.cpp and
AsyncBlockTests.cpp (MIT), ported as scenarios, no code copied.

25 scenarios differ on the emulated runtime today. They are listed in
DIFFERS with the reason, checked one by one against the current rt.rs,
and skipped unless TOMBOX_XTQ_ALL=1. The other 35 pass.

Co-Authored-By: Claude Fable 5.2 <[email protected]>
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 06:14:04 +00:00
github-bot closed this pull request 2026-11-26 06:14:04 +00:00
Author
Owner

@⁠omonkeyz on GitHub · 2026-11-23 02:22 UTC · original

Applied in 9a782d2 (merged in a4c2355) with your authorship kept, thanks. Both conformance targets pass here (60/60 each). The PC-runtime target ran against the installed xgameruntime.dll. The 25 DIFFERS scenarios are now an OPEN entry in docs/BLOCKERS.md, so the gaps are tracked there too.

**@⁠omonkeyz** on GitHub · 2026-11-23 02:22 UTC · [original](https://github.com/omonkeyz/xbox-emulator/pull/211#issuecomment-7089892433) Applied in 9a782d2 (merged in a4c2355) with your authorship kept, thanks. Both conformance targets pass here (60/60 each). The PC-runtime target ran against the installed xgameruntime.dll. The 25 DIFFERS scenarios are now an OPEN entry in docs/BLOCKERS.md, so the gaps are tracked there too.

Pull request closed

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