-
Notifications
You must be signed in to change notification settings - Fork 171
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implement directory atime,ctime,mtime #100
Conversation
…tem is mounted. Signed-off-by: Ankit Saurabh <sauraank@amazon.co.uk>
2f2e739
to
e6a2dd1
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We want to broaden these changes to cover all directories and not just the root Inode.
Regarding testing, maybe we can perform a range check on the timestamp returned. We might say the date is within 5 seconds of a given timestamp we assert on, perhaps taken immediately before the superblock creation. You might need to separate the timestamp check from the main assert_inode_stat!
macro.
We should update these tests:
Signed-off-by: Ankit Saurabh <sauraank@amazon.co.uk>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this looks good!
It would be nice to add some tests to test_readdir
and then ready to merge I think.
Signed-off-by: Ankit Saurabh <sauraank@amazon.co.uk>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Almost ready to merge, I think we just need to expand a bit on the readdir test.
Signed-off-by: Ankit Saurabh <sauraank@amazon.co.uk>
Signed-off-by: Ankit Saurabh <sauraank@amazon.co.uk>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One small comment and then I think this is ready to merge.
Signed-off-by: Ankit Saurabh <sauraank@amazon.co.uk>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks for improving the existing tests that missed Readdir for file mtime as well.
FYI there was a flaky test run unrelated to this change, I opened #116. |
Changed the directory mtime, ctime, atime to the instant filesystem is mounted, i.e., when the superblock is created. Not sure how to check if its the right current time. Modified the test to include utc_now() in test, but dont think it solves the purpose.
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.