-
Notifications
You must be signed in to change notification settings - Fork 346
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
add ratime mount_setattr test #2658
base: main
Are you sure you want to change the base?
Conversation
|
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## main #2658 +/- ##
=======================================
Coverage 65.21% 65.21%
=======================================
Files 133 133
Lines 16981 16981
=======================================
+ Hits 11074 11075 +1
+ Misses 5907 5906 -1 |
009eeb3
to
c8cc081
Compare
Hey @lengrongfu , I have also encountered somewhat similar errors in other mount tests when I was running locally. The Root Cause for them was that the Can you check if this issue also has same RC? |
ok, i will to check. |
@YJDoc2 I found that it has nothing to do with the /tmp directory. It may be related to the mount option. |
Hey, yes that's what I meant : the |
Hey @lengrongfu , did you find out anything on this? |
Sorry, I didn't find any more information. |
c8cc081
to
e296040
Compare
cc7c436
to
4fe3fd0
Compare
Signed-off-by: lengrongfu <[email protected]>
4fe3fd0
to
7d1f5bd
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.
Hey, @lengrongfu , the PR looks good, one very minor nitpick .
Also may I ask you for one change : Instead of adding the ratime bugfix in libcontainer in this PR, can you open a separate one just containing that fix, and then rebase this on top of it after merge? The reason I'm asking is so that in changelog, it gets properly added as a bug fix, and does not hide under tests, as this PR will go under test category.
two_metadata.mtime(), | ||
std::time::SystemTime::now() | ||
); | ||
if one_metadata.atime() == two_metadata.atime() { |
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.
if one_metadata.atime() == two_metadata.atime() { | |
if one_metadata.atime() >= two_metadata.atime() { |
Original ==
check should be enough, but we can be extra cautious and expect the new atime to be strictly greater than old, as we are sleeping in between.
return Err(std::io::Error::new( | ||
std::io::ErrorKind::Other, | ||
format!( | ||
"update access time for file {:?}, expected update", |
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.
"update access time for file {:?}, expected update", | |
"expected old access time to be less than new access time after update for file {:?}, found old : {old}, new {new} ", |
I'm not sure if this is correct, because |
Yes, you are right. From what I checked it seems that the mount options are dependent on the specific flag being ORed or not ORed . for if for time we are ORing the flag SET_ATIME (suppose) , then for noatime we simply do not OR that flag in the argument. I believe our setup regarding this particular part is similar to runc, so the original code should be correct. What do you think? |
@lengrongfu ping! |
I'm thinking, maybe mount doesn't have a ratime option, because setting |
@lengrongfu Yes, you're right. |
@utam0k So, we should don't need this test PR? |
No, we need this test. |
Fixes: #1534