hadoop-common-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Leo Leung (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HADOOP-9585) unit test failure :org.apache.hadoop.fs.TestFsShellReturnCode.testChgrp
Date Thu, 20 Jun 2013 20:18:20 GMT

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

Leo Leung commented on HADOOP-9585:
-----------------------------------

Current test case assumes jenkins (or the test runner) is part of the "admin" group.
Suggest to change test case to add 
1) positive test scenario that includes the users' group
2) and negative scenario that includes none-existing-group. (invalid group)

something like:
+    String[] groups = UserGroupInformation.getCurrentUser().getGroupNames();
-    String argv[] = { "-chgrp", "admin", f1 };
-    verify(fs, "-chgrp", argv, 1, fsShell, 0);
+    for (String member : groups)
+    {
+      String argv[] = { "-chgrp", member, f1 };
+      verify(fs, "-chgrp", argv, 1, fsShell, 0);
+    }
-    // Test 2: exit code for chgrp on non existing path is 1
+    // Test 2: exit code for non-existing group on existing file
+    String argv1[] = { "-chgrp", "groupdoesnotexist", f1 };
+    verify(fs, "-chgrp", argv1, 1, fsShell, 1);



                
> unit test failure :org.apache.hadoop.fs.TestFsShellReturnCode.testChgrp
> -----------------------------------------------------------------------
>
>                 Key: HADOOP-9585
>                 URL: https://issues.apache.org/jira/browse/HADOOP-9585
>             Project: Hadoop Common
>          Issue Type: Bug
>          Components: test
>    Affects Versions: 1.3.0
>         Environment: https://builds.apache.org/job/Hadoop-branch1/lastCompletedBuild/testReport/org.apache.hadoop.fs/TestFsShellReturnCode/testChgrp/
>            Reporter: Giridharan Kesavan
>
> Standard Error
> chmod: could not get status for '/home/jenkins/jenkins-slave/workspace/Hadoop-branch1/trunk/build/test/data/testChmod/fileDoesNotExist':
File /home/jenkins/jenkins-slave/workspace/Hadoop-branch1/trunk/build/test/data/testChmod/fileDoesNotExist
does not exist.
> chmod: could not get status for '/home/jenkins/jenkins-slave/workspace/Hadoop-branch1/trunk/build/test/data/testChmod/nonExistingfiles*'
> chown: could not get status for '/home/jenkins/jenkins-slave/workspace/Hadoop-branch1/trunk/build/test/data/testChown/fileDoesNotExist':
File /home/jenkins/jenkins-slave/workspace/Hadoop-branch1/trunk/build/test/data/testChown/fileDoesNotExist
does not exist.
> chown: could not get status for '/home/jenkins/jenkins-slave/workspace/Hadoop-branch1/trunk/build/test/data/testChown/nonExistingfiles*'
> chgrp: failed on 'file:/home/jenkins/jenkins-slave/workspace/Hadoop-branch1/trunk/build/test/data/testChgrp/fileExists':
chgrp: changing group of `/home/jenkins/jenkins-slave/workspace/Hadoop-branch1/trunk/build/test/data/testChgrp/fileExists':
Operation not permitted

--
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

Mime
View raw message