You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-issues@hadoop.apache.org by "Colin Patrick McCabe (JIRA)" <ji...@apache.org> on 2013/01/18 21:00:13 UTC

[jira] [Commented] (HADOOP-9227) FileSystemContractBaseTest doesn't test filesystem's mkdir/isDirectory() logic rigorously enough

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

Colin Patrick McCabe commented on HADOOP-9227:
----------------------------------------------

Hi Steve,

Thanks for looking at this.  I agree that we should test even more things in these tests if possible.

One thing to note: the s3 filesystems don't implement permissions, so testing umask there would be quite impossible.
                
> 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