Uploaded image for project: 'Hadoop Common'
  1. Hadoop Common
  2. HADOOP-9719

Branch-1-win TestFsShellReturnCode#testChgrp() failed caused by incorrect exit codes

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • 1-win
    • 1-win
    • test
    • Reviewed

    Description

      TestFsShellReturnCode#testChgrp() failed when we try to use "-chgrp" to change group association of files to "admin".

      // Test 1: exit code for chgrp on existing file is 0
          String argv[] = { "-chgrp", "admin", f1 };
          verify(fs, "-chgrp", argv, 1, fsShell, 0);
      

      On Windows, this is the error information:
      org.apache.hadoop.util.Shell$ExitCodeException: GetSidFromAcctName error (1332): No mapping between account names and security IDs was done.
      Invalid group name: admin
      This test case passed previously, but it looks like this test case incorrectly passed because of another bug in FsShell@runCmdHandler (https://issues.apache.org/jira/browse/HADOOP-9502). The original code in FsShell#runCmdHandler may not return error exit codes for some exceptions (see private static int runCmdHandler(CmdHandler handler, FileStatus stat, FileSystem srcFs, boolean recursive) throws IOException {}). Therefore, in previous Branch-1-win if even if admin is not a valid group, there is no error caught. The fix of HADOOP-9502 makes this test fail.

      This test also failed on Linux

      Attachments

        1. HADOOP-9719.patch
          2 kB
          Douma Fang

        Activity

          People

            xifang Douma Fang
            xifang Douma Fang
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: