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