Repository navigation
tools: compare XCL's synthetic test title under gta6rt and under XCL (TEST-845) - #3878
mariuslozo-boop wants to merge 4 commits into
Conversation
tools/xcl_compare.py starts XCL's fake console executable under gta6rt --run and under XCL, records each check's result, the unimplemented imports it hit, and the thread stacks of a hung check (cdb), restarts after a hang with that check skipped, and writes report.json; --gui shows the checks live. It holds no XCL code: it only runs binaries from a separate XCL checkout. docs/xcl_compare.md has the licence boundary, how to run it, and the first result (XCL 50/50, gta6rt 5 pass, 43 fail, 2 hang), with each difference mapped to an open item or recorded as a lead. Both hangs are the documented deadlock of XTaskQueueTerminate(wait = true) from a manual queue's dispatching thread, not a runtime bug. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Tested 87d608f on Windows, CPython 3.14.7, CPU only (no GPU, no game files, no external runtime, no GUI). One small thing, reproduced: import gc, os, sys, tracemalloc
sys.path.insert(0, "tools")
import xcl_compare as x
class Sink:
def put(self, event): pass
for n in (1000, 4000, 16000):
r = x.Run("synthetic")
gc.collect(); tracemalloc.start()
cmd = [sys.executable, "-I", "-c", f"for i in range({n}): print('a'*256)"]
x.run_title(cmd, os.environ, os.getcwd(), r, [], 15, None, Sink(), [])
gc.collect(); before = tracemalloc.get_traced_memory()[0]
count = len(r.log); r.log.clear(); gc.collect()
print(count, before - tracemalloc.get_traced_memory()[0], r.exit_code)
tracemalloc.stop()Clearing the list frees 305,736, 1,220,960 and 4,888,544 bytes for 1,000, 4,000 and 16,000 lines of 256 characters (about 300 bytes a line, growing with the title's output). Dropping the list and the append, or writing the lines to a file if a transcript is wanted, removes it. Non-blocking. AI-assisted. |
Run.log collected every line a title printed and nothing read it. The lines now go to xcl_output.txt and leonida_output.txt in the work folder (named in report.json), and Run keeps none of them. A test checks the transcript and that Run has no log. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Thanks, fixed in c4806f5. Tested: AI-assisted (Claude Code). |
tests/test_tool_stdout_encoding.py requires every tool's __main__ block to start with sys.stdout.reconfigure(errors="replace"); the tool did it inside main() instead, so the check failed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Tested on Windows 11 / Python 3.13.0: the 9 new tests pass, the docs-area tests 18/18, The comparison is scoped correctly: check names/statuses/reasons/unimplemented imports/stacks only, no game data, nothing copied into the repo, and it records Minor:
Pass with those. AI-assisted review, no game files, no GPU. |
…ces, restart tests) - Create the --out parent folder before writing the report. - Close the title's stdout pipe when the reader thread finishes. - Count a check as different when the status or the reason differs. - Move the hang restart loop into run_with_restarts and test it with a stand-in title. - kill_tree falls back to Popen.kill outside Windows. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Thanks @tupacfan04, all four are fixed in 8aa2579:
|
Claimed in the coordination issue as: TEST-845 (claim).
What and why
tools/xcl_compare.pyruns XCL's synthetic console executable (its test title: kernelx, xgameruntime, xmem, d3d12_xs and a bundled game DLL, about 50 checks) undergta6rt --runand under XCL, and reports where the two runtimes disagree. XCL already runs retail Xbox Series titles, so a check that passes there and fails here is a lead for the loader, the shims or the D3D12 layer.cdb -pvfrom the Windows SDK debugging tools).report.json. With--guiit shows the checks live in a window (tkinter).python -Iand writes text with LF line endings.docs/xcl_compare.mdcovers the licence boundary, how to run the tool, and the first result: XCL 50 pass; gta6rt 5 pass, 43 fail, 2 hang. Each difference is either mapped to an existing item or recorded as a lead:Both hangs: not a runtime bug. They are
XTaskQueueTerminate(queue, wait = true)on a manual queue, called from the thread that dispatches it. The stack ends inTaskQueueImpl::Terminate, waiting on its condition variable. Microsoft's documentation warns that this can deadlock, and ourthird_party/xtaskqueuebehaves the same way. XCL returns there instead.Already covered elsewhere:
G:\andT:\: RT-218Leads, not filed as findings:
kernelx.dllnames ofXMemAllocand related functionsGetConsoleType, thread names,DStorageGetFactoryD3D12CreateDeviceond3d12_xs.dll(the runtime servesD3D12XboxCreateDevice)None of these is in the measured imports of the shipped modules, and the executable isn't available to measure.
Licence and provenance: XCL is GPL-2.0-only. This PR holds no XCL code, headers, tables or output. The tool only starts binaries built in a separate XCL checkout. I read XCL's README, its HANDOFF.md and its test title's source, to learn what each check does and how to run it. Two small local changes to the test title's
checkfunction (a[RUN]line and a skip variable) are described in the doc, not included here.Tested
f847748c. XCL at055b0ad.--guiwas checked by eye on the same run.python -I tests/test_xcl_compare.py(8 tests) passes.test_docs_links.py,test_docs_repo_paths.py,test_docs_list_items.py,test_text_write_line_endings.py,test_i18n_index.py,test_docs_design_rows.py, andpython -m compileall.Checklist
docs/design.md, with how it was confirmed. (No translator change.)AI-assisted (Claude Code).
🤖 Generated with Claude Code