XTaskQueue/XAsync: 60 conformance scenarios as tests (57 pass on the real PC runtime, 36 on main, 24 differences listed) #48
No reviewers
Labels
No labels
accessibility
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
library
question
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/omonkeyz--xbox-emulator!48
Loading…
Reference in a new issue
No description provided.
Delete branch "gh-pr/48/head"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
@QuentinDanblon on GitHub · 2026-11-21 20:03 UTC · original
QuentinDanblon:test/xtaskqueue-conformance→main· +2502 −0 · 3 files · 104 commits · closed without mergingLibrary / area: compat-common tests for the emulated XTaskQueue / XAsync (interface 073b7dcb). Tests only:
gdk/rt.rsis not changed.Exports changed (exports.txt rows): none
Source of the behaviour: Microsoft libHttpClient (MIT, commit c5007fd), the reference implementation of this API:
Tests/UnitTests/Tests/TaskQueueTests.cppandAsyncBlockTests.cpp. Behaviour ported, no C++ code. Four scenarios come from #28 by zerkend.Re-scoped on
51f5319This PR used to replace most of
rt.rs. Main has kept developing its ownrt.rssince, so the replacement is dropped and only the scenarios remain. Three new files, nothing else touched:tests/support/xtq.rs: 60 scenarios, each citing its libHttpClient test or saying it has none. They call the 073b7dcb vtable throughQueryApiImpl, the way a title does.tests/gdk_xtaskqueue_conformance.rs: runs them against the emulator.tests/gdk_xtaskqueue_conformance_real.rs: runs the same scenarios against the PC Gaming Runtime'sxgameruntime.dllloaded from System32 (skipped when Gaming Services is absent).Results
xgameruntime.dll10.0.26100.9656rt.rsof main51f5319The 24 are listed in
DIFFERSingdk_xtaskqueue_conformance.rs, each with the result the emulator returned. They are skipped by default so the suite is green;TOMBOX_XTQ_ALL=1runs them. Measured one scenario per process with a 25 s limit: 23 fail, none hangs. The 24th,verify_wait_for_completion, passes alone and with--test-threads=1and fails when the scenarios run in parallel (3 runs of 3).The 24 differences
51f5319verify_begin_after_terminateverify_cancellation,verify_cleanup_waits_for_work,verify_cleanup_waits_for_work_distributedverify_wait_for_completion(parallel runs only)verify_cant_schedule_twiceverify_close_keeps_queued_callbacksverify_dispatch_on_pool_portverify_duplicate_queue_handleverify_failed_begin_completesverify_failure_in_do_workverify_get_async_status_no_deadlockverify_global_queueverify_multithread_manual_dispatchverify_queue_monitor_has_correct_portsverify_queue_termination,verify_register_with_auto_reset,verify_termination_of_composite_queue,verify_shared_port_queue_rundown_keeps_other_waiters,verify_shared_port_queue_rundown_drops_its_wait_handlesverify_result_buffer_checksverify_terminate_waits_for_async_in_flightverify_termination_of_base_queue_keeps_compositesverify_thread_pool_callbacks_can_blockThe reference is libHttpClient and the PC runtime. None of this was measured on a console. Where the console is known to differ, the scenario should assert the console result instead, as
verify_global_queuealready does for terminating the process queue (your non-closable-queue check, xgameruntime 0x6d0d8). So the table is a list of differences from the PC side, not a list of 24 bugs.Tests
cargo test -p compat-common --release --test gdk_xtaskqueue_conformance: 60 pass (24 of them skipped as listed), 5 runs of 5.cargo test -p compat-common --release --test gdk_xtaskqueue_conformance_real -- --test-threads=1: 60 pass (3 of them skipped as above).Not run against a title.
No game or console files and no binaries included
No fake success: a skipped scenario prints
SKIP:with the difference🤖 Generated with Claude Code
@QuentinDanblon on GitHub · 2026-11-21 22:02 UTC · original
Rebased onto
0fc7295, with the targeted tests re-run on the new base. #49 keeps the fused f16 FMA at VOP2 0x36-0x38 (gfx1013 v_fmac/fmamk/fmaak_f16) and updates the upstream ISA-sweep cases to the fused model. #36 adapts to upstream's TB_CEN_Q centroid qualifier. #48 now also includes the 4 regression scenarios from #28, credited.@QuentinDanblon on GitHub · 2026-11-22 00:54 UTC · original
@omonkeyz rebased on
285a165(round 3). Two measurements on the real PC runtime that concern your round-3 changes, in case they are useful whatever you do with this PR.I ran your two new
gdk_verifier_fixesscenarios againstxgameruntime.dll10.0.26100.9656 (System32, loaded directly, same harness asgdk_xtaskqueue_conformance_real):285a165XTaskQueueCreateCompositeon the same portsXTaskQueueTerminate(own queue, wait = true)Both match the libHttpClient source: the Active / Canceled / Terminating / Terminated status lives on the port context, one per queue, not on the port (
TaskQueue.cpp538, 706, 1837-1839), and terminations are only signalled when no callback is running on the port (824-826). So the BLOCKERS note that calls the port-level E_ABORT the "libHttpClient model" does not match what libHttpClient does.This is the PC runtime, not a console. The process queue already showed the two can differ (E_ACCESSDENIED on console, S_OK on PC), so if you traced these on the console DLL, yours is right and I'll align this branch. If the round-3 behaviour came from reading the code rather than from a console trace, the composite part is the one I would revert: a title that keeps a composite queue on the ports of a queue it terminated gets E_ABORT on main and S_OK on the PC runtime. The self-terminate part is harmless either way (a title cannot depend on a hang).
State of this branch, details in the description:
verify_termination_of_base_queue_keeps_composites): 60 pass here, 57 pass + 3 skipped on the PC runtime.rt.rs: 34 pass, 25 fail, 1 does not finish (verify_get_async_status_no_deadlock). The names are in the description. Most are not about terminate: slots 20/21/23/24/26 still return E_NOTIMPL,XTaskQueueDuplicateHandlereturns the same handle, and several XAsync cases.gdk_verifier_fixes: 12 of 14 pass with this branch'srt.rs. The 2 that fail are the two round-3 tests above. I left them untouched rather than edit your tests.@omonkeyz on GitHub · 2026-11-22 13:12 UTC · original
Main's history was rewritten, which auto-closed this PR (sorry for the noise). Please strip the comment lines and rerun against the current rt.rs. Some DIFFERS entries may be stale now. To resubmit:
git fetchthis repo, branch from the currentmain, cherry-pick only your own commits (the old branch is based on the previous history and cannot be merged), and open a new PR.Pull request closed