Hadoop Common
  1. Hadoop Common
  2. HADOOP-6327

Fix build error for one of the FileContext Tests

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 0.21.0
    • Component/s: test
    • Labels:
      None
    • Hadoop Flags:
      Reviewed

      Description

      The build fails in Hudson
      org.apache.hadoop.fs.TestLocalFSFileContextMainOperations.testWorkingDirectory (from TestLocalFSFileContextMainOperations)
      Failing for the past 5 builds (Since Failed#272 )
      Took 88 ms.
      add description
      Error Message

      chmod: changing permissions of `/tmp/existingDir': Operation not permitted

      Stacktrace

      org.apache.hadoop.util.Shell$ExitCodeException: chmod: changing permissions of `/tmp/existingDir': Operation not permitted

      at org.apache.hadoop.util.Shell.runCommand(Shell.java:243)
      at org.apache.hadoop.util.Shell.run(Shell.java:170)
      at org.apache.hadoop.util.Shell$ShellCommandExecutor.execute(Shell.java:363)
      at org.apache.hadoop.util.Shell.execCommand(Shell.java:449)
      at org.apache.hadoop.util.Shell.execCommand(Shell.java:432)
      at org.apache.hadoop.fs.RawLocalFileSystem.execCommand(RawLocalFileSystem.java:545)
      at org.apache.hadoop.fs.RawLocalFileSystem.setPermission(RawLocalFileSystem.java:537)
      at org.apache.hadoop.fs.RawLocalFileSystem.mkdirs(RawLocalFileSystem.java:347)
      at org.apache.hadoop.fs.FilterFileSystem.mkdirs(FilterFileSystem.java:184)
      at org.apache.hadoop.fs.FileSystem.primitiveMkdir(FileSystem.java:769)
      at org.apache.hadoop.fs.FileContext.mkdir(FileContext.java:539)
      at org.apache.hadoop.fs.FileContextMainOperationsBaseTest.testWorkingDirectory(FileContextMainOperationsBaseTest.java:170)

        Issue Links

          Activity

          Hide
          Sanjay Radia added a comment -

          The test fails probably because of left over from a previous runs of the same test which does not cleanup /tmp/existingDir

          There is another problem with the test. It replies on the system property test.build.data - in its absence it sets the default
          test dir to /tmp like many of our other tests.
          The default should really be build/test/data relative to the working dir.

          The attached patch fixes this and cleans up the testWorkingDir.
          While testing this patch I ran into another bug in TEST_X_FILTER which is also fixed in the patch.

          This path REQUIRES a minior fix to the HDFS test that uses the same base class.
          The attached patch should be followed by patch to HDFS (see attached).

          Show
          Sanjay Radia added a comment - The test fails probably because of left over from a previous runs of the same test which does not cleanup /tmp/existingDir There is another problem with the test. It replies on the system property test.build.data - in its absence it sets the default test dir to /tmp like many of our other tests. The default should really be build/test/data relative to the working dir. The attached patch fixes this and cleans up the testWorkingDir. While testing this patch I ran into another bug in TEST_X_FILTER which is also fixed in the patch. This path REQUIRES a minior fix to the HDFS test that uses the same base class. The attached patch should be followed by patch to HDFS (see attached).
          Hide
          Hadoop QA added a comment -

          +1 overall. Here are the results of testing the latest attachment
          http://issues.apache.org/jira/secure/attachment/12422880/buildError.patch
          against trunk revision 828181.

          +1 @author. The patch does not contain any @author tags.

          +1 tests included. The patch appears to include 10 new or modified tests.

          +1 javadoc. The javadoc tool did not generate any warning messages.

          +1 javac. The applied patch does not increase the total number of javac compiler warnings.

          +1 findbugs. The patch does not introduce any new Findbugs warnings.

          +1 release audit. The applied patch does not increase the total number of release audit warnings.

          +1 core tests. The patch passed core unit tests.

          +1 contrib tests. The patch passed contrib unit tests.

          Test results: http://hudson.zones.apache.org/hudson/job/Hadoop-Patch-h4.grid.sp2.yahoo.net/99/testReport/
          Findbugs warnings: http://hudson.zones.apache.org/hudson/job/Hadoop-Patch-h4.grid.sp2.yahoo.net/99/artifact/trunk/build/test/findbugs/newPatchFindbugsWarnings.html
          Checkstyle results: http://hudson.zones.apache.org/hudson/job/Hadoop-Patch-h4.grid.sp2.yahoo.net/99/artifact/trunk/build/test/checkstyle-errors.html
          Console output: http://hudson.zones.apache.org/hudson/job/Hadoop-Patch-h4.grid.sp2.yahoo.net/99/console

          This message is automatically generated.

          Show
          Hadoop QA added a comment - +1 overall. Here are the results of testing the latest attachment http://issues.apache.org/jira/secure/attachment/12422880/buildError.patch against trunk revision 828181. +1 @author. The patch does not contain any @author tags. +1 tests included. The patch appears to include 10 new or modified tests. +1 javadoc. The javadoc tool did not generate any warning messages. +1 javac. The applied patch does not increase the total number of javac compiler warnings. +1 findbugs. The patch does not introduce any new Findbugs warnings. +1 release audit. The applied patch does not increase the total number of release audit warnings. +1 core tests. The patch passed core unit tests. +1 contrib tests. The patch passed contrib unit tests. Test results: http://hudson.zones.apache.org/hudson/job/Hadoop-Patch-h4.grid.sp2.yahoo.net/99/testReport/ Findbugs warnings: http://hudson.zones.apache.org/hudson/job/Hadoop-Patch-h4.grid.sp2.yahoo.net/99/artifact/trunk/build/test/findbugs/newPatchFindbugsWarnings.html Checkstyle results: http://hudson.zones.apache.org/hudson/job/Hadoop-Patch-h4.grid.sp2.yahoo.net/99/artifact/trunk/build/test/checkstyle-errors.html Console output: http://hudson.zones.apache.org/hudson/job/Hadoop-Patch-h4.grid.sp2.yahoo.net/99/console This message is automatically generated.
          Hide
          Tsz Wo Nicholas Sze added a comment -

          +1 patch looks good.

          Show
          Tsz Wo Nicholas Sze added a comment - +1 patch looks good.
          Hide
          Tsz Wo Nicholas Sze added a comment -

          I have committed this to 0.21 and above. Thanks, Sanjay!

          Show
          Tsz Wo Nicholas Sze added a comment - I have committed this to 0.21 and above. Thanks, Sanjay!
          Hide
          Hudson added a comment -

          Integrated in Hadoop-Common-trunk-Commit #68 (See http://hudson.zones.apache.org/hudson/job/Hadoop-Common-trunk-Commit/68/)
          . FileContext tests should not use /tmp and should clean up files. Contributed by Sanjay Radia

          Show
          Hudson added a comment - Integrated in Hadoop-Common-trunk-Commit #68 (See http://hudson.zones.apache.org/hudson/job/Hadoop-Common-trunk-Commit/68/ ) . FileContext tests should not use /tmp and should clean up files. Contributed by Sanjay Radia
          Hide
          Hudson added a comment -

          Integrated in Hadoop-Common-trunk #136 (See http://hudson.zones.apache.org/hudson/job/Hadoop-Common-trunk/136/)
          . FileContext tests should not use /tmp and should clean up files. Contributed by Sanjay Radia

          Show
          Hudson added a comment - Integrated in Hadoop-Common-trunk #136 (See http://hudson.zones.apache.org/hudson/job/Hadoop-Common-trunk/136/ ) . FileContext tests should not use /tmp and should clean up files. Contributed by Sanjay Radia
          Hide
          Hudson added a comment -

          Integrated in Hadoop-Hdfs-trunk-Commit #80 (See http://hudson.zones.apache.org/hudson/job/Hadoop-Hdfs-trunk-Commit/80/)
          HDFS-725. Support the build error fix for . Contributed by Sanjay Radia

          Show
          Hudson added a comment - Integrated in Hadoop-Hdfs-trunk-Commit #80 (See http://hudson.zones.apache.org/hudson/job/Hadoop-Hdfs-trunk-Commit/80/ ) HDFS-725 . Support the build error fix for . Contributed by Sanjay Radia
          Hide
          Hudson added a comment -

          Integrated in Hdfs-Patch-h2.grid.sp2.yahoo.net #59 (See http://hudson.zones.apache.org/hudson/job/Hdfs-Patch-h2.grid.sp2.yahoo.net/59/)

          Show
          Hudson added a comment - Integrated in Hdfs-Patch-h2.grid.sp2.yahoo.net #59 (See http://hudson.zones.apache.org/hudson/job/Hdfs-Patch-h2.grid.sp2.yahoo.net/59/ )
          Hide
          Hudson added a comment -

          Integrated in Hadoop-Hdfs-trunk #120 (See http://hudson.zones.apache.org/hudson/job/Hadoop-Hdfs-trunk/120/)

          Show
          Hudson added a comment - Integrated in Hadoop-Hdfs-trunk #120 (See http://hudson.zones.apache.org/hudson/job/Hadoop-Hdfs-trunk/120/ )
          Hide
          Hudson added a comment -

          Integrated in Hdfs-Patch-h5.grid.sp2.yahoo.net #78 (See http://hudson.zones.apache.org/hudson/job/Hdfs-Patch-h5.grid.sp2.yahoo.net/78/)

          Show
          Hudson added a comment - Integrated in Hdfs-Patch-h5.grid.sp2.yahoo.net #78 (See http://hudson.zones.apache.org/hudson/job/Hdfs-Patch-h5.grid.sp2.yahoo.net/78/ )

            People

            • Assignee:
              Sanjay Radia
              Reporter:
              Sanjay Radia
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development