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

Steve Loughran commented on HADOOP-9227:
----------------------------------------

I know about s3 -a separate issue there is that the "don't test umasks" logic 
is in the base class -which stops other filesystems opting out except by 
overriding the test. There should be an override method "FS supports umask"
                
> FileSystemContractBaseTest doesn't test filesystem's mkdir/isDirectory() 
> logic rigorously enough
> ------------------------------------------------------------------------------------------------
>
>                 Key: HADOOP-9227
>                 URL: https://issues.apache.org/jira/browse/HADOOP-9227
>             Project: Hadoop Common
>          Issue Type: Improvement
>          Components: fs
>    Affects Versions: 3.0.0
>            Reporter: Steve Loughran
>            Priority: Trivial
>
> The {{FileSystemContractBaseTest.mkdirs()}} asserts that a newly created 
> directory is true, but way of {{FileStatus.isFile()}}, but doesn't assert 
> that the directory is a dir by way of {{FileStatus.isDir()}}.
> The assertion used is slightly weaker, as the {{isFile()}} test is actually
> {{!isdir && !isSymlink()}}. if an implementation of {{FileSystem.mkdirs()}} 
> created symlinks then the test would still pass.
> There is one test that looks at the {{isDirectory()}} logic, 
> {{testMkdirsWithUmask()}} -but as that test is skipped for the s3 
> filesystems, it is possible for those filesystems (or similar) to not have 
> their directory creation logic stressed enough.
> The fix would be a trivial single line.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to