Repository navigation
test(libSceFont): cover the sceFontRebindRenderer return codes - #12585
Conversation
sceFontRebindRenderer had no test. The new one opens a font without a renderer and checks every return it reports: a null handle and a block with a zero handle magic give SCE_FONT_ERROR_INVALID_FONT_HANDLE, an unbound font gives SCE_FONT_ERROR_NOT_BOUND_RENDERER, a bound font gives SCE_FONT_OK (twice), and the font reports NOT_BOUND_RENDERER again after sceFontUnbindRenderer. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
|
@xXPBSXx Thanks for the coverage; the cases are well chosen and the mutation checks are useful. One thing before this can go in: every expectation comes from our current Could you do one of these?
Everything else (registration, the Windows unwind and PATH handling, allocation accounting) looks right. |
…S4 port The return codes of sceFontRebindRenderer come from our shadPS4-based port and are unmeasured; the new test pins them, so the debt file now says so. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
|
Other open pull requests touch the same code. Merging one will break the other, or both implement the same thing. If this one builds on them, list them in Depends on.
Some comparisons could not be completed because a pull request conflicts with the base branch. Review these shared files manually before concluding that there is no overlap.
|
|
Thanks for the review. I have no console measurement or disassembly of these codes, so I took the second option: the new commit 75bb8cb adds an "Unknown function info" entry for AI-assisted (Claude Code). |
What
Adds a test for
sceFontRebindRenderer, which had none. The test opens a font without a renderer and checks each return the function has: a null handle and a block whose handle magic is zero giveSCE_FONT_ERROR_INVALID_FONT_HANDLE, an unbound font givesSCE_FONT_ERROR_NOT_BOUND_RENDERER, a bound font givesSCE_FONT_OK(twice in a row), and aftersceFontUnbindRendererthe font reportsNOT_BOUND_RENDERERagain.The first commit adds the test; the library code is unchanged. The second commit adds an entry for
sceFontRebindRendererto the libSceFont technical debt: the function follows the shadPS4 port and its return codes are unmeasured. Three of the local titles import the function (imported, not measured as called). TheSCE_FONT_ERROR_FATALbranch (a renderer with a wrong magic) and the style copy done on success are not covered: the first needs a corrupted renderer, the second cannot be observed through the public API.Tested
Windows 10 (MinGW GCC 15.2, Release) and WSL2 Ubuntu 24.04 (GCC 13.3, Release; virtualised kernel, not bare-metal), on the first commit (head
9634513788) overmaine4da19a:ctest -R guest_font_rebind_renderer --repeat until-fail:3passes 3 of 3 on both.SCE_FONT_OK, and the bound path returningSCE_FONT_ERROR_NOT_BOUND_RENDERER. The code was restored afterwards.guest_font*tests pass on Windows (9 of 9, including this one).tools/check_conventions.py --base upstream/mainpasses.tools/check_conventions.py --base upstream/mainpasses on the new head.Not tested: macOS.
Overlap
I took the changed files of each of the 1410 open pull requests from
git diff --name-onlyagainst its merge base. Five other open pull requests changedcore/libs/prx/libSceFont/CMakeLists.txtwhen I measured: #12018, #12025, #8250, #12012 and #11547 (the last two have since been merged). Three open pull requests changedocs/dev/debt/libSceFont.md: #12528, #8250 and #5209; none touches the new entry or the "Unknown function info" heading.git merge-treeagainstmain319621b: this head alone merges cleanly, and so does each pair of this head with #12018, #12025, #12528, #5209, #12012 or #11547. The pair with #8250 conflicts, but #8250 conflicts withmainon its own, so the conflict is not caused by this PR. Againstmain3a2b919, which includes #12012 and #11547, this head merges cleanly. The PR is based onmaine4da19a.Checklist
main; no other open PR implements the same functionsNotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt file.mdfiles or images added to the repository (attach them to this PR)AI-assisted (Claude Code).
🤖 Generated with Claude Code