Skip to content
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

resolve error #653

Open
wants to merge 1 commit into
base: development
Choose a base branch
from
Open

resolve error #653

wants to merge 1 commit into from

Conversation

brandon-m-wang
Copy link
Contributor

Noticed that there were mtime change at every condition. I preserved the mtime change in the following cases:

  • Modifying a file within a directory should indeed change the parent directory's mtime

e.g.

We have dir/z

mv z y
stat y -> only ctime changed
stat dir -> ctime, mtime changed

And removed the mtime change in the following cases:

  • If renamedInode is a directory, renaming a directory shouldn't change directory mtime
  • If renamedInode is a file, renaming a file shouldn't change file's mtime

POSIX ctime/mtime test output:

+ TESTCASE=posix/ctime-mtime/rename-ctime-mtime.py
+ TESTCASE_STRIPPED=posix/ctime-mtime/rename-ctime-mtime
+ echo '@ posix/ctime-mtime/rename-ctime-mtime'
+ tee -a /home/swift/code/functional-tests/functional/tap/tmp_results.txt
@ posix/ctime-mtime/rename-ctime-mtime
+ mkdir -p /mnt/tap/posix/ctime-mtime/rename-ctime-mtime
+ start=0
+ sh
1..10
ok 1
ok 2
ok 3
ok 4
ok 5
ok 6
ok 7
ok 8
ok 9
ok 10
+ echo 'Elapsed time for posix/ctime-mtime/rename-ctime-mtime: 8 seconds'
Elapsed time for posix/ctime-mtime/rename-ctime-mtime: 8 seconds

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant