Repository navigation
feat(libkernel): implement lutimes - #4622
Merged
Merged
Conversation
jagrat04
force-pushed
the
feat/libkernel-lutimes
branch
from
October 12, 2026 18:54
7f68ea1 to
de4ae5b
Compare
9 tasks done
jagrat04
force-pushed
the
feat/libkernel-lutimes
branch
from
October 12, 2026 20:19
de4ae5b to
9227bda
Compare
adriadam10
requested changes
Oct 12, 2026
adriadam10
left a comment
Collaborator
There was a problem hiding this comment.
Thanks for the PR. The implementation of lutimes_nid_postfix looks 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.- Same block: the symlink case only checks that the target is unchanged. Also
stat/lstatthe link itself and require its mtime to befirst, otherwise nothing shows the link was modified. - The branch conflicts with
mainindocs/dev/debt/libkernel.md(the "Windows file timestamps" line); please rebase.
Please rerun ctest -R guest_file_timestamps locally after the fix.
jagrat04
force-pushed
the
feat/libkernel-lutimes
branch
from
October 12, 2026 22:43
9227bda to
1ddf976
Compare
jagrat04
force-pushed
the
feat/libkernel-lutimes
branch
from
October 13, 2026 01:01
1ddf976 to
8d08caa
Compare
Contributor
Author
|
@adriadam10 Thanks for the review! Updated as requested:
|
11 tasks done
adriadam10
approved these changes
Oct 13, 2026
adriadam10
left a comment
Collaborator
There was a problem hiding this comment.
Checked the build and guest_file_timestamps on 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 match utimes. Merging.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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)