test(libs): give the pwrite, process export and patched AvPlayer tests the MinGW runtime on their PATH #17014
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/17014"
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-11-08T06:17:34Z.
What
On Windows, five tests fail when
ctestruns from a shell whose PATH puts another MinGW runtime ahead of the toolchain's, such as Git Bash, whereC:\Program Files\Git\mingw64\bincomes first:guest_kernel_sys_pwriteguest_kernel_sys_pwrite_patchedguest_kernel_process_exportsguest_kernel_process_exports_patchedavplayer_http_patched_modulesThe cause is the one #12426 fixed for the
guest_kernel_sys_threadsandnet_ipv6only_patchedtests:libkernel.prxfromlibs/unpatchedorlibswithLoadLibraryExW(..., LOAD_WITH_ALTERED_SEARCH_PATH). Windows then looks forlibstdc++-6.dllandlibgcc_s_seh-1.dllnext to the.prxand then on PATH, not in the test output directory, where the build copies the runtime. With Git's olderlibstdc++-6.dllfirst, the load fails and the test stops atRequire(module != nullptr), exiting with 0xc0000409.AvPlayerHttpModules.cmakecopies the owner test into a staging directory and runs it with the stage prepended to the inherited PATH. That directory has no runtime either, so the run fails withPatched module ownership failed: Exit code 0xc0000139(entry point not found).On MinGW, this gives these tests the compiler's directory at the front of PATH, as #10101 and #12426 did for the other prx loader tests.
guest_kernel_process_exportsalready prepended its library directory, so the runtime directory is added to that list.Tested
Windows 11 Enterprise 22621, WinLibs GCC 15.2.0 UCRT r7, Release.
ctestwas run from Git Bash, wherewhich libstdc++-6.dllgives/mingw64/bin/libstdc++-6.dll(Git's) before the toolchain's.988ee6d3db(ctest -j 16, Vulkan ICD hidden): 4604 of 4609 tests pass. The 5 failures are exactly the tests above.4c12105e22with the same build and shell: all 5 fail in 3 of 3 runs. The pwrite tests printKernel sys pwrite check failed at line 38, the process-export tests printKernel process export check failed at line 28, andavplayer_http_patched_modulesprintsExit code 0xc0000139.binput first on PATH, the same 5 tests pass on main too, which confirms the runtime lookup is the only cause.I did not rerun the whole suite on this change; it only changes test properties for these five tests.
Validated by others
windows-2022(heada9d736ad, ycbuzi/AnyPS5 run 42965316284): the stage has no MinGW runtime, the owner exits0xC0000135with a cleanPATH, and it passes when the compiler runtime directory is onPATH. They closed their own PR for the same fix in favour of this one. In that run's 41 failures, the five tests this PR fixes are the only ones it covers (closing note, suite breakdown).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)