test(font): move the console font aside instead of deleting it while its face is mapped #1172
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/1172"
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 emaurel on 2026-10-07T16:27:38Z.
What
guest_system_fontfails on Windows 10 (build 19045): the process ends with an uncaughtstd::filesystem::filesystem_error(exit code0x20474343).The test removes
SST-Bold.otfwhilefont, opened from that file, is still open, to check that the nextEuropeanBoldopen falls back toNotoSans-Bold.ttf.sceFontOpenFontSetopens the file throughFT_New_Face, and FreeType's Windows stream (builds/windows/ftsystem.c) keeps a mapped view of it for the life of the face. Windows refuses to delete a file with a mapped view (ERROR_ACCESS_DENIED), sostd::filesystem::removethrows. Linux allows the unlink, and the Windows CI runner (windows-latest) passes.The test now moves the file out of the font directory instead of deleting it. Windows allows renaming a file with a mapped view. Nothing is left at the original path, so the test still checks that:
The library is unchanged.
Tested
x86_64-ucrt-posix-sehr7, Release,BUILD_TESTING=ON:main4e742835:guest_system_fontfails 10 of 10 runs; the other 392 tests pass.guest_system_fontpasses 10 of 10 runs (--repeat until-fail:10); fullctestonmain2b8f0b21with this change: 394 of 394.ftsystem.cdoes (view kept, file and mapping handles closed) cannot delete it (error 5), can rename it, and can delete it right afterUnmapViewOfFile.guest_system_fontpasses before and after the change (10 of 10 runs after).Checklist
main; no other open PR implements the same functionsNotImplemented_nid_no_patch); silent stubs are listed in TechnicalDebt.mdfiles or images added to the repository (attach them to this PR)🤖 Generated with Claude Code