feat(libkernel): implement lutimes #4622
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/4622"
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 jagrat04 on 2026-10-12T16:55:09Z.
What
Implement
lutimes(PmZfv0lup1c) inlibkernel:followLinkparameter toNativeUtimes(defaulting totrueforutimesandfutimes).FILE_FLAG_OPEN_REPARSE_POINTwhenfollowLinkis false so timestamps are set on the symbolic link or reparse point itself rather than the target file.::lutimeswhenfollowLinkis false.lutimes_nid_postfixwith standard path validation, invalid microsecond checks, and path resolution.GuestFileTimestampsfor fractional timestamps, invalid microseconds, null/empty/missing paths, and symbolic links.Tested
GuestFileTimestampstest suite: verified fractional timestamps, invalid microsecond rejection, error reporting (EFAULT,ENOENT,EINVAL), and symlink timestamp modification without altering target file times.python tools/check_conventions.py --base origin/mainpassed cleanly.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)Imported from boykopovar/AnyPS5. Originally posted by github-actions[bot] on 2026-10-12T17:34:11Z.
Progress report (
510a218→8d08caa)➖ System libraries: 87.92% (+0.0%, +1 implemented functions)
✅ 1 implemented
lutimes_nid_postfixImported from boykopovar/AnyPS5. Originally posted by adriadam10 on 2026-10-12T21:06:30Z.
Review: CHANGES_REQUESTED
Thanks for the PR. The implementation of
lutimes_nid_postfixlooks right, but the test aborts on Linux:core/libs/tests/GuestFileTimestamps.cpp:152:CheckTimes(path, fd, second)usesfd, which was closed at line 129 (close fixture descriptor).guest_file_timestampsaborts withFillFileStat: fstat failed for fd 6. Check the target withstat_nid_postfix(path...)instead, or reopen it.stat/lstatthe link itself and require its mtime to befirst, otherwise nothing shows the link was modified.mainindocs/dev/debt/libkernel.md(the "Windows file timestamps" line); please rebase.Please rerun
ctest -R guest_file_timestampslocally after the fix.Imported from boykopovar/AnyPS5. Originally posted by jagrat04 on 2026-10-13T01:01:26Z.
@adriadam10 Thanks for the review! Updated as requested:
origin/mainresolving the debt doc conflict.core/libs/tests/GuestFileTimestamps.cpp: verified the target file timestamps usingstat_nid_postfix(path.c_str(), &targetStatus)rather than the closed file descriptor, and verified the symlink's own mtime was updated tofirstusinglstat_nid_postfixon Linux / reparse point query on Windows.ctest -R guest_file_timestamps(passed) andtools/check_conventions.py --base origin/main.Imported from boykopovar/AnyPS5. Originally posted by github-actions[bot] on 2026-10-13T05:51:36Z.
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.
main)docs/dev/debt/libkernel.mdL97-98Imported from boykopovar/AnyPS5. Originally posted by adriadam10 on 2026-10-13T07:48:04Z.
Review: APPROVED
Checked the build and
guest_file_timestampson Linux merged onto current main (full libs ctest green), and that the new test fails without the change; the symlink checks (target untouched, link mtime updated) and the error cases matchutimes. Merging.