test(libs): give patched_libraries the MinGW runtime on its PATH #10101
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/10101"
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 JJenkx on 2026-10-23T09:07:42Z.
What
patched_librariesloads each patched.prxwithLoadLibraryExW(..., LOAD_WITH_ALTERED_SEARCH_PATH). With that flag, Windows resolves a library's own dependencies (libstdc++-6.dll,libgcc_s_seh-1.dll,libwinpthread-1.dll) from the.prx's directory and thenPATH. It does not use the test executable's directory, which is where the build copies the MinGW runtime.So the test passes only when the caller's
PATHstarts with the toolchain'sbin. Run from any other shell, it fails, or it loads whicheverlibstdc++comes first onPATH.On MinGW the test now prepends the compiler's directory to its
PATHthroughENVIRONMENT_MODIFICATION, as other tests incore/libs/CMakeLists.txtdo for the directories their libraries load from. Linux and macOS are unchanged.Tested
Windows 11 Enterprise 22H2 (10.0.22621), MinGW-w64 GCC 15.2 UCRT r7, Release.
ctest -R '^patched_libraries$', run once withPATHset to only the Windows system directories, PowerShell and CMake, then once with the toolchain'sbinprepended:PATHPATHmain513ca7e558libc.prx: LoadLibraryEx failed with error 126, likewiselibkernel.prx,libkernel_sys.prxand otherseef6cb8061(rebased on513ca7e558)tools/check_conventions.pypasses. Not tested: Clang/MSVC builds (the change is underif(MINGW)), Linux and macOS (unchanged).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)Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-23T10:33:02Z.
Review: DISMISSED
The test change matches the failure mechanism described:
patched_librariesloads the.prxwithLOAD_WITH_ALTERED_SEARCH_PATH, and on MinGW this update prepends the compiler's runtime directory to that test'sPATH. The author's controlled Windows results distinguish the system-only path from the toolchain path. The exact-head conventions check andgit diff --checkpass; hosted eligibility, intake, conventions and labels pass. Build jobs are skipped by repository policy.Please update this branch from current
mainand rerunpatched_librarieswith both controlledPATHsetups on the refreshed base. The exact-head sync check reports 1 ahead/56 behind, andcore/libs/CMakeLists.txtchanged on both sides since the merge base (including #9037 and #9141). The pairwise merge is currently clean, but the PR's reported comparison uses main21554447d0, not the current merged CMake context, and its checklist says it is based on current main. Please correct that line after refreshing. I could not run the MinGW/Windows regression from this Linux environment.Imported from boykopovar/AnyPS5. Originally posted by THEMANnt on 2026-10-25T07:24:56Z.
Review: APPROVED
Reviewed
eef6cb8061b3be28f942c9ff96b466aaf9f78aecagainst author merge base513ca7e5585edd6e84b47e61328729588a7afe9d.Approve. No actionable findings in the MinGW test-environment change.
The compiler directory is derived from the configured C++ compiler and prepended to PATH only for patched_libraries under MinGW. This supplies runtime dependencies to libraries loaded by the test without changing its executable arguments or non-MinGW configurations. Reviewed the complete patch and surrounding registration.
Validation: four real CMake/CTest fixture configurations used the exact head/baseline property blocks and a compiler-directory path containing spaces. Both head configurations passed their conditional PATH assertions; baseline MinGW failed the missing-prefix assertion as expected and baseline non-MinGW passed. Conventions, whitespace and registration passed. These fixtures validate CTest environment wiring, not actual patched-library DLL loading; no full pinned library/application run is claimed. Hosted native jobs were skipped.