Repository navigation
fix(libkernel): share guest rename semantics with sceKernelRename - #6484
Conversation
|
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.
|
jotitadev
left a comment
There was a problem hiding this comment.
Linux run at the updated head, since the description says Linux was not rerun there.
Ubuntu 26.04, i7-8700, gcc 15.2, Release, BUILD_TESTING=ON, full build. Head 1719a0f1f applied on main 03c4cb5 (its merge base).
- Test only (the PR's
GuestFilesystem.cpponmain's source):guest_filesystemfails, but not where it fails on Windows. On Linuxmainalready replaces the empty directory, becauserename(2)does, so that check passes. The first failure is line 533: renaming toabsent/targetreturns0x80020005instead of0x80020002, becausemain'ssceKernelRenameturns every native failure intoEIO. So on Linux the new block covers the errno translation, and the directory replacement part only fails on Windows. - With the PR:
guest_filesystem,guest_kernel_renameand the other rename, directory, realpath, path-case andguest_kernel_systests (11) pass 5 times in a row. - Non-GPU suite (649 tests,
-E "^agc|gpu|vulkan|video_out",-j8): same result asmain. Onlyfile_writer_binaryandfile_writer_textfail, onmaintoo (this host's coreutils rejects the command they run). In one of the two suite runsguest_pthread_starttimed out under-j8load. It passed in the other run and 10 of 10 times on its own.
Written with AI assistance (Claude Code). I ran the builds and tests above on my machine.
|
Windows run. Windows 11, WinLibs GCC 15.2.0 r7 (MinGW), Release,
Not tested: a negative control on Windows. AI-assisted: yes (Claude Code) |
|
Rebase handoff — rebased onto current Verified on Linux (CachyOS, kernel 7.2.9, GCC 16.2.1, Ninja, Release,
To pick it up: Head is |
886d647 to
6bf2ce4
Compare
|
Re-anchored rebase handoff — Verified on Linux (CachyOS, kernel 7.2.9, GCC 16.2.1, Ninja, Release,
To pick it up: Head is |
6bf2ce4 to
8e1f06b
Compare
What
On Windows,
sceKernelRenamerejects replacement of an empty directory and collapses distinct filesystem failures to EIO. I route it through the existing guest rename helper and translate its guest errno to the kernel error result. The rebase preserves current main'sEFAULTresult for null source or destination paths, including all three null combinations covered byguest_posix_scalar_io.The shared Windows helper replaces an empty directory using the existing atomic
FileRenameInfoExoperation, opening directory handles withFILE_FLAG_BACKUP_SEMANTICS. It no longer deletes the destination before attempting the rename. A failed operation preserves both source and destination. The regression covers libc and kernel routes, moved contents and specific kernel errors.The eligibility test retains startup, input-read and completion markers and reports captured output on timeout. It preserves main's existing 90-second subprocess limit; the cause of the earlier unreproduced CI stall remains unknown.
All three existing commits and their authorship are preserved. The inherited #6452 fixture is already in main. The agreed order is #6484 before #6583; #6583 declares
Depends on: #6484and will adapt the failure diagnostics to its persistent harness.Tested
Exact head:
8e1f06b51134e52d64837c450b1a7eecf9deb98d. Base:66702f1cffd3646f2d674ed093fde0a85a70761f.Windows (native host): Windows 11 Pro 10.0.26300, AMD Ryzen 9 7900X, 32 GB RAM, NVIDIA GeForce RTX 4070 Ti SUPER. WinLibs MinGW-w64 GCC 15.2.0 r7, CMake 4.3.1, Ninja 1.13.2, Release, bundled dependencies,
BUILD_TESTING=ON, Python 3.14.7, Node 24.20.0. Graphics: not exercised.cmake --build build-team-worker-2-runtime --parallel 2.--parallel 2 --timeout 30. The symbolic-link subcases insideguest_kernel_sysreported unavailable and remain untested on Windows.Linux (VirtualBox): Ubuntu 24.04.5 LTS, kernel 7.0.0-38-generic, GCC 13.3.0, CMake 3.28.3, Ninja 1.11.1, Release, bundled dependencies,
BUILD_TESTING=ON, Python 3.12.3. VirtualBox 7.2.20 r175154 on the Windows host above, 4 vCPU, 8 GiB RAM, native ext4. Graphics: not exercised. Node 24.20.0 is an official portable runtime added only to the test subprocess PATH.cmake --build build --parallel 2.--parallel 1. The three directory-buffer/rewind/close tests are registered only on Windows.The Windows selection is
patched_libraries,guest_kernel_sys,file_position,guest_working_directory,guest_realpath,guest_path_case,guest_directory,file_streams,guest_posix_filesystem,guest_file_timestamps,guest_filesystem,guest_kernel_rename,guest_dup,guest_directory_buffer,guest_directory_rewind,guest_directory_close,guest_kernel_fcntl,build_eligibility,guest_pthread_cancel,guest_posix_scalar_io. Linux uses the same filter except the three Windows-only tests. The scalar-I/O test verifies the EFAULT behavior retained during this rebase.Conventions, whitespace and main-sync checks pass. Before execution, static review covered the complete five-file PR diff and all 159 files in the upstream delta
673f7406c5ceedffc48bd2054d02c48096bb258a..66702f1cffd3646f2d674ed093fde0a85a70761f, including build/test code and new files.Earlier before/after API control, retained from the preceding revision: Linux (VirtualBox), Ubuntu 24.04.5 LTS, kernel 7.0.0-31-generic. An independent probe loads the real unpatched
libkernel.prxand checks ownership ofsceKernelRenamewithdladdr. The before variant rebuilt the three rename-related implementation files frombf2053816976bb9c821e37df58ef64a7362b81c7; the after variant used fix6bf2ce4714bed96acfc31354cb255561d83b97aeon base673f7406c5ceedffc48bd2054d02c48096bb258a. One invocation per variant, four filesystem cases, the same environment and fixtures, with paths and marker contents checked. This historical probe was not repeated for the current rebase; the current CTests above cover the integrated behavior.0x80020005(EIO)0x80020002(ENOENT)0x80020005(EIO)0x80020015(EISDIR)0x80020005(EIO)0x80020042(ENOTEMPTY)00The earlier base probe matched 1/4 expected results; the fixed probe matched 4/4, with expected data preserved. The base regression process aborted without an assertion diagnostic; the table uses the separate ownership-checked API probe and does not assign that abort to a particular assertion.
Linux graphics/Vulkan tests: NOT RUN — intentionally excluded from VirtualBox validation. Native/bare-metal Linux was not tested. Native Linux GPU validation: not tested. No full CTest suite, console or retail-title run is claimed. Full hosted Windows/Linux builds require collaborator dispatch under CONTRIBUTING.md; the full builds above are local.
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)