test(libSceFont): cover sceFontGetLibrary and sceFontSetFontsOpenMode #12757
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/12757"
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?
Imported from boykopovar/AnyPS5. Originally posted by legendary-cookie on 2026-10-29T08:25:52Z.
What
Adds
sceFontGetLibraryandsceFontSetFontsOpenModechecks toGuestFont.cpp:GetLibrarywith a null output returnsSCE_FONT_ERROR_INVALID_PARAMETERand with an open font returns the library it was opened from;SetFontsOpenModereturnsSCE_FONT_ERROR_INVALID_LIBRARYfor a null and a zero-initialisedFontLibNative,SCE_FONT_ERROR_INVALID_PARAMETERfor mode 3, andSCE_FONT_OKfor modes 0 to 2.Source: the null-output error and owning library of
GetLibraryand all ofSetFontsOpenModefollow the shadPS4 port (GetLibrary, SetFontsOpenMode), not a console measurement.docs/dev/debt/libSceFont.mdgets a Silent stubs entry forSetFontsOpenMode, which validates the mode but stores nothing, and an Unknown function info entry forGetLibrary.GetLibrary's invalid-handle path, which clears the output here but not in shadPS4, is left untested because nothing records its source.Tested
Windows 11, WinLibs GCC 15.2.0 UCRT r7 (the CI toolchain), Release,
BUILD_TESTING=ON, onmain4c7d275bef:ctest -R ^guest_font$passes, and all 10 font tests pass. Mutation-checked: returning a null library from a valid font, or accepting mode 3 or rejecting mode 2, each makes the test fail.tools/check_conventions.py --base origin/mainpasses;tools/pr_overlap.pyreports no overlap. Not run on Linux or macOS.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)\U0001F916 Generated with Claude Code