[ 
https://issues.apache.org/jira/browse/HADOOP-6563?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12861685#action_12861685
 ] 

Suresh Srinivas commented on HADOOP-6563:
-----------------------------------------

Modified the table you have a little bit. Hopefully it has more clarity:
||Source||Dest||Result||
|fileA|fileB|fileB is removed. fileA is renamed fileB|
| |dirB|Fails: both need to be file or directory|
| |linkB|linkB is removed (regardles of what it points to). fileA is renamed 
linkB|
|dirA|fileB|Fails: both need to be file or directory|
| |dirB|dirB is deleted(if empty). dirA is renamed to dirB|
| |linkB|Fails: if Source is a directory, then Dest must be a directory|
|linkA|fileB|fileB is deleted. linkA renamed to fileB|
| |dirB|if Dest is a directory then Source must be a directory|
| |linkB|linkB is removed (regardless of what it points to. linkA is renamed to 
linkB|

Comments:
# typo danling
# testRenameSymlinkToFileItLinksTo - when rename fails, should the test check 
for exception? Is this part of another jira?
# Why is creating dangling links allowed?
# Tests are hard to follow without additional descprition in the test methods 
what is being tested and what is expected. It took me a while to follow the 
tests.



> Add more tests to FileContextSymlinkBaseTest that cover intermediate symlinks 
> in paths
> --------------------------------------------------------------------------------------
>
>                 Key: HADOOP-6563
>                 URL: https://issues.apache.org/jira/browse/HADOOP-6563
>             Project: Hadoop Common
>          Issue Type: Test
>          Components: fs, test
>    Affects Versions: 0.22.0
>            Reporter: Eli Collins
>            Assignee: Eli Collins
>             Fix For: 0.22.0
>
>         Attachments: hadoop-6563-1.patch, hadoop-6563-2.patch, 
> hadoop-6563-3.patch, hadoop-6563-4.patch
>
>
> Intermediate symlinks in paths are covered by the tests that use 
> /linkToDir/file, /linkToDir/subDir, etc  eg testCreateVia* in 
> FileContextSymlinkBaseTest. I'll add additional tests to cover other basic 
> operations on paths like /dir/linkToSomeDir/file beyond create() and open().

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to