You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@bigtop.apache.org by rv...@apache.org on 2011/10/18 20:57:57 UTC

svn commit: r1185798 [2/2] - /incubator/bigtop/branches/hadoop-0.22/bigtop-packages/src/common/hadoop/patch

Modified: incubator/bigtop/branches/hadoop-0.22/bigtop-packages/src/common/hadoop/patch
URL: http://svn.apache.org/viewvc/incubator/bigtop/branches/hadoop-0.22/bigtop-packages/src/common/hadoop/patch?rev=1185798&r1=1185797&r2=1185798&view=diff
==============================================================================
--- incubator/bigtop/branches/hadoop-0.22/bigtop-packages/src/common/hadoop/patch (original)
+++ incubator/bigtop/branches/hadoop-0.22/bigtop-packages/src/common/hadoop/patch Tue Oct 18 18:57:57 2011
@@ -1,3630 +0,0 @@
-diff --git mapreduce/src/java/org/apache/hadoop/mapreduce/ContextFactory.java mapreduce/src/java/org/apache/hadoop/mapreduce/ContextFactory.java
-new file mode 100644
-index 0000000..1b1a85b
---- /dev/null
-+++ mapreduce/src/java/org/apache/hadoop/mapreduce/ContextFactory.java
-@@ -0,0 +1,241 @@
-+/**
-+ * Licensed to the Apache Software Foundation (ASF) under one
-+ * or more contributor license agreements.  See the NOTICE file
-+ * distributed with this work for additional information
-+ * regarding copyright ownership.  The ASF licenses this file
-+ * to you under the Apache License, Version 2.0 (the
-+ * "License"); you may not use this file except in compliance
-+ * with the License.  You may obtain a copy of the License at
-+ *
-+ *     http://www.apache.org/licenses/LICENSE-2.0
-+ *
-+ * Unless required by applicable law or agreed to in writing, software
-+ * distributed under the License is distributed on an "AS IS" BASIS,
-+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-+ * See the License for the specific language governing permissions and
-+ * limitations under the License.
-+ */
-+
-+package org.apache.hadoop.mapreduce;
-+ 
-+import java.io.IOException;
-+import java.lang.reflect.Constructor;
-+import java.lang.reflect.Field;
-+import java.lang.reflect.InvocationTargetException;
-+
-+import org.apache.hadoop.conf.Configuration;
-+ 
-+/**
-+ * A factory to allow applications to deal with inconsistencies between
-+ * MapReduce Context Objects API between hadoop-0.20 and later versions.
-+ */
-+public class ContextFactory {
-+
-+  private static final Constructor<?> JOB_CONTEXT_CONSTRUCTOR;
-+  private static final Constructor<?> TASK_CONTEXT_CONSTRUCTOR;
-+  private static final Constructor<?> MAP_CONTEXT_CONSTRUCTOR;
-+  private static final Constructor<?> MAP_CONTEXT_IMPL_CONSTRUCTOR;
-+  private static final boolean useV21;
-+  
-+  private static final Field REPORTER_FIELD;
-+  private static final Field READER_FIELD;
-+  private static final Field WRITER_FIELD;
-+  private static final Field OUTER_MAP_FIELD;
-+  private static final Field WRAPPED_CONTEXT_FIELD;
-+  
-+  static {
-+    boolean v21 = true;
-+    final String PACKAGE = "org.apache.hadoop.mapreduce";
-+    try {
-+      Class.forName(PACKAGE + ".task.JobContextImpl");
-+    } catch (ClassNotFoundException cnfe) {
-+      v21 = false;
-+    }
-+    useV21 = v21;
-+    Class<?> jobContextCls;
-+    Class<?> taskContextCls;
-+    Class<?> taskIOContextCls;
-+    Class<?> mapCls;
-+    Class<?> mapContextCls;
-+    Class<?> innerMapContextCls;
-+    try {
-+      if (v21) {
-+        jobContextCls = 
-+          Class.forName(PACKAGE+".task.JobContextImpl");
-+        taskContextCls = 
-+          Class.forName(PACKAGE+".task.TaskAttemptContextImpl");
-+        taskIOContextCls = 
-+          Class.forName(PACKAGE+".task.TaskInputOutputContextImpl");
-+        mapContextCls = Class.forName(PACKAGE + ".task.MapContextImpl");
-+        mapCls = Class.forName(PACKAGE + ".lib.map.WrappedMapper");
-+        innerMapContextCls = 
-+          Class.forName(PACKAGE+".lib.map.WrappedMapper$Context");
-+      } else {
-+        jobContextCls = 
-+          Class.forName(PACKAGE+".JobContext");
-+        taskContextCls = 
-+          Class.forName(PACKAGE+".TaskAttemptContext");
-+        taskIOContextCls = 
-+          Class.forName(PACKAGE+".TaskInputOutputContext");
-+        mapContextCls = Class.forName(PACKAGE + ".MapContext");
-+        mapCls = Class.forName(PACKAGE + ".Mapper");
-+        innerMapContextCls = 
-+          Class.forName(PACKAGE+".Mapper$Context");      
-+      }
-+    } catch (ClassNotFoundException e) {
-+      throw new IllegalArgumentException("Can't find class", e);
-+    }
-+    try {
-+      JOB_CONTEXT_CONSTRUCTOR = 
-+        jobContextCls.getConstructor(Configuration.class, JobID.class);
-+      JOB_CONTEXT_CONSTRUCTOR.setAccessible(true);
-+      TASK_CONTEXT_CONSTRUCTOR = 
-+        taskContextCls.getConstructor(Configuration.class, 
-+                                      TaskAttemptID.class);
-+      TASK_CONTEXT_CONSTRUCTOR.setAccessible(true);
-+      if (useV21) {
-+        MAP_CONTEXT_CONSTRUCTOR = 
-+          innerMapContextCls.getConstructor(mapCls,
-+                                            MapContext.class);
-+        MAP_CONTEXT_IMPL_CONSTRUCTOR =
-+          mapContextCls.getDeclaredConstructor(Configuration.class, 
-+                                               TaskAttemptID.class,
-+                                               RecordReader.class,
-+                                               RecordWriter.class,
-+                                               OutputCommitter.class,
-+                                               StatusReporter.class,
-+                                               InputSplit.class);
-+        MAP_CONTEXT_IMPL_CONSTRUCTOR.setAccessible(true);
-+        WRAPPED_CONTEXT_FIELD = 
-+          innerMapContextCls.getDeclaredField("mapContext");
-+        WRAPPED_CONTEXT_FIELD.setAccessible(true);
-+      } else {
-+        MAP_CONTEXT_CONSTRUCTOR = 
-+          innerMapContextCls.getConstructor(mapCls,
-+                                            Configuration.class, 
-+                                            TaskAttemptID.class,
-+                                            RecordReader.class,
-+                                            RecordWriter.class,
-+                                            OutputCommitter.class,
-+                                            StatusReporter.class,
-+                                            InputSplit.class);
-+        MAP_CONTEXT_IMPL_CONSTRUCTOR = null;
-+        WRAPPED_CONTEXT_FIELD = null;
-+      }
-+      MAP_CONTEXT_CONSTRUCTOR.setAccessible(true);
-+      REPORTER_FIELD = taskIOContextCls.getDeclaredField("reporter");
-+      REPORTER_FIELD.setAccessible(true);
-+      READER_FIELD = mapContextCls.getDeclaredField("reader");
-+      READER_FIELD.setAccessible(true);
-+      WRITER_FIELD = taskIOContextCls.getDeclaredField("output");
-+      WRITER_FIELD.setAccessible(true);
-+      OUTER_MAP_FIELD = innerMapContextCls.getDeclaredField("this$0");
-+      OUTER_MAP_FIELD.setAccessible(true);
-+    } catch (SecurityException e) {
-+      throw new IllegalArgumentException("Can't run constructor ", e);
-+    } catch (NoSuchMethodException e) {
-+      throw new IllegalArgumentException("Can't find constructor ", e);
-+    } catch (NoSuchFieldException e) {
-+      throw new IllegalArgumentException("Can't find field ", e);
-+    }
-+  }
-+
-+  /**
-+   * Clone a job or task attempt context with a new configuration.
-+   * @param original the original context
-+   * @param conf the new configuration
-+   * @return a new context object
-+   * @throws InterruptedException 
-+   * @throws IOException 
-+   */
-+  @SuppressWarnings("unchecked")
-+  public static JobContext cloneContext(JobContext original,
-+                                        Configuration conf
-+                                        ) throws IOException, 
-+                                                 InterruptedException {
-+    try {
-+      if (original instanceof MapContext<?,?,?,?>) {
-+        return cloneMapContext((Mapper.Context) original, conf, null, null);        
-+      } else if (original instanceof ReduceContext<?,?,?,?>) {
-+        throw new IllegalArgumentException("can't clone ReduceContext");
-+      } else if (original instanceof TaskAttemptContext) {
-+        TaskAttemptContext spec = (TaskAttemptContext) original;
-+        return (JobContext) 
-+          TASK_CONTEXT_CONSTRUCTOR.newInstance(conf, spec.getTaskAttemptID());
-+      } else {
-+        return (JobContext) 
-+        JOB_CONTEXT_CONSTRUCTOR.newInstance(conf, original.getJobID());           
-+      }
-+    } catch (InstantiationException e) {
-+      throw new IllegalArgumentException("Can't clone object", e);
-+    } catch (IllegalAccessException e) {
-+      throw new IllegalArgumentException("Can't clone object", e);
-+    } catch (InvocationTargetException e) {
-+      throw new IllegalArgumentException("Can't clone object", e);
-+    }
-+  }
-+  
-+  /**
-+   * Copy a mapper context, optionally replacing the input and output.
-+   * @param <K1> input key type
-+   * @param <V1> input value type
-+   * @param <K2> output key type
-+   * @param <V2> output value type
-+   * @param context the context to clone
-+   * @param conf a new configuration
-+   * @param reader Reader to read from. Null means to clone from context.
-+   * @param writer Writer to write to. Null means to clone from context.
-+   * @return a new context. it will not be the same class as the original.
-+   * @throws IOException
-+   * @throws InterruptedException
-+   */
-+  @SuppressWarnings("unchecked")
-+  public static <K1,V1,K2,V2> Mapper<K1,V1,K2,V2>.Context 
-+       cloneMapContext(MapContext<K1,V1,K2,V2> context,
-+                       Configuration conf,
-+                       RecordReader<K1,V1> reader,
-+                       RecordWriter<K2,V2> writer
-+                      ) throws IOException, InterruptedException {
-+    try {
-+      // get the outer object pointer
-+      Object outer = OUTER_MAP_FIELD.get(context);
-+      // if it is a wrapped 21 context, unwrap it
-+      if ("org.apache.hadoop.mapreduce.lib.map.WrappedMapper$Context".equals
-+            (context.getClass().getName())) {
-+        context = (MapContext<K1,V1,K2,V2>) WRAPPED_CONTEXT_FIELD.get(context);
-+      }
-+      // if the reader or writer aren't given, use the same ones
-+      if (reader == null) {
-+        reader = (RecordReader<K1,V1>) READER_FIELD.get(context);
-+      }
-+      if (writer == null) {
-+        writer = (RecordWriter<K2,V2>) WRITER_FIELD.get(context);
-+      }
-+      if (useV21) {
-+        Object basis = 
-+          MAP_CONTEXT_IMPL_CONSTRUCTOR.newInstance(conf, 
-+                                                   context.getTaskAttemptID(),
-+                                                   reader, writer,
-+                                                   context.getOutputCommitter(),
-+                                                   REPORTER_FIELD.get(context),
-+                                                   context.getInputSplit());
-+        return (Mapper.Context) 
-+          MAP_CONTEXT_CONSTRUCTOR.newInstance(outer, basis);
-+      } else {
-+        return (Mapper.Context)
-+          MAP_CONTEXT_CONSTRUCTOR.newInstance(outer,
-+                                              conf, context.getTaskAttemptID(),
-+                                              reader, writer,
-+                                              context.getOutputCommitter(),
-+                                              REPORTER_FIELD.get(context),
-+                                              context.getInputSplit());
-+      }
-+    } catch (IllegalAccessException e) {
-+      throw new IllegalArgumentException("Can't access field", e);
-+    } catch (InstantiationException e) {
-+      throw new IllegalArgumentException("Can't create object", e);
-+    } catch (InvocationTargetException e) {
-+      throw new IllegalArgumentException("Can't invoke constructor", e);
-+    }
-+  }
-+}
-diff --git common/src/test/core/org/apache/hadoop/cli/CLITestHelper.java common/src/test/core/org/apache/hadoop/cli/CLITestHelper.java
-index 5df10b2..f7f25e5 100644
---- common/src/test/core/org/apache/hadoop/cli/CLITestHelper.java
-+++ common/src/test/core/org/apache/hadoop/cli/CLITestHelper.java
-@@ -59,7 +59,9 @@ public class CLITestHelper {
-   public static final String TESTMODE_NOCOMPARE = "nocompare";
-   public static final String TEST_CACHE_DATA_DIR =
-     System.getProperty("test.cache.data", "build/test/cache");
--  
-+  public static final String TEST_DIR_ABSOLUTE = "/tmp/testcli";
-+  protected static String testDirAbsolute = TEST_DIR_ABSOLUTE;
-+
-   //By default, run the tests. The other mode is to run the commands and not
-   // compare the output
-   protected String testMode = TESTMODE_TEST;
-@@ -72,7 +74,7 @@ public class CLITestHelper {
-   protected Configuration conf = null;
-   protected String clitestDataDir = null;
-   protected String username = null;
--  
-+
-   /**
-    * Read the test config file - testConfig.xml
-    */
-@@ -80,10 +82,16 @@ public class CLITestHelper {
-     String testConfigFile = getTestFile();
-     if (testsFromConfigFile == null) {
-       boolean success = false;
--      testConfigFile = TEST_CACHE_DATA_DIR + File.separator + testConfigFile;
-+      String configFile = System.getProperty("test.cli.config");
-+      if (configFile == null) {
-+        testConfigFile = TEST_CACHE_DATA_DIR + File.separator + testConfigFile;
-+      } else {
-+        testConfigFile = configFile;
-+      }
-       try {
-         SAXParser p = (SAXParserFactory.newInstance()).newSAXParser();
-         p.parse(testConfigFile, new TestConfigFileParser());
-+        LOG.info("Using test config file " + testConfigFile);
-         success = true;
-       } catch (Exception e) {
-         LOG.info("File: " + testConfigFile + " not found");
-@@ -110,6 +118,8 @@ public class CLITestHelper {
- 
-     clitestDataDir = new File(TEST_CACHE_DATA_DIR).
-     toURI().toString().replace(' ', '+');
-+    // Many of the tests expect a replication value of 1 in the output
-+    conf.setInt("dfs.replication", 1);
-   }
-   
-   /**
-@@ -128,7 +138,8 @@ public class CLITestHelper {
-     String expCmd = cmd;
-     expCmd = expCmd.replaceAll("CLITEST_DATA", clitestDataDir);
-     expCmd = expCmd.replaceAll("USERNAME", username);
--    
-+    expCmd = expCmd.replaceAll("TEST_DIR_ABSOLUTE", testDirAbsolute);
-+
-     return expCmd;
-   }
-   
-diff --git common/src/test/core/org/apache/hadoop/cli/util/CommandExecutor.java common/src/test/core/org/apache/hadoop/cli/util/CommandExecutor.java
-index a250e24..50afe05 100644
---- common/src/test/core/org/apache/hadoop/cli/util/CommandExecutor.java
-+++ common/src/test/core/org/apache/hadoop/cli/util/CommandExecutor.java
-@@ -43,6 +43,8 @@ public abstract class CommandExecutor {
-       args[i] = args[i].replaceAll("CLITEST_DATA", 
-         new File(CLITestHelper.TEST_CACHE_DATA_DIR).
-         toURI().toString().replace(' ', '+'));
-+      args[i] = args[i].replaceAll("TEST_DIR_ABSOLUTE",
-+        CLITestHelper.TEST_DIR_ABSOLUTE);
-       args[i] = args[i].replaceAll("USERNAME", System.getProperty("user.name"));
- 
-       i++;
-diff --git hdfs/build.xml hdfs/build.xml
-index 4f55064..3ddb60a 100644
---- hdfs/build.xml
-+++ hdfs/build.xml
-@@ -636,6 +636,9 @@
-         <syspropertyset id="FaultProbabilityProperties">
-           <propertyref regex="fi.*"/>
-         </syspropertyset>
-+        <syspropertyset id="TestCLIProperties">
-+          <propertyref regex="test.cli.*" />
-+        </syspropertyset>
-         <sysproperty key="test.system.hdrc.deployed.hadoopconfdir"
-                      value="@{hadoop.conf.dir.deployed}" />
-         <formatter type="${test.junit.output.format}" />
-diff --git hdfs/src/test/hdfs/org/apache/hadoop/cli/TestHDFSCLI.java hdfs/src/test/hdfs/org/apache/hadoop/cli/TestHDFSCLI.java
-index 895c863..1043f61 100644
---- hdfs/src/test/hdfs/org/apache/hadoop/cli/TestHDFSCLI.java
-+++ hdfs/src/test/hdfs/org/apache/hadoop/cli/TestHDFSCLI.java
-@@ -21,6 +21,7 @@ package org.apache.hadoop.cli;
- import org.apache.hadoop.cli.util.CLITestData.TestCmd;
- import org.apache.hadoop.cli.util.CommandExecutor.Result;
- import org.apache.hadoop.fs.FileSystem;
-+import org.apache.hadoop.fs.Path;
- import org.apache.hadoop.hdfs.DFSConfigKeys;
- import org.apache.hadoop.hdfs.DistributedFileSystem;
- import org.apache.hadoop.hdfs.HDFSPolicyProvider;
-@@ -36,7 +37,7 @@ public class TestHDFSCLI extends CLITestHelper {
-   protected MiniDFSCluster dfsCluster = null;
-   protected DistributedFileSystem dfs = null;
-   protected String namenode = null;
--  
-+
-   @Before
-   @Override
-   public void setUp() throws Exception {
-@@ -52,16 +53,24 @@ public class TestHDFSCLI extends CLITestHelper {
-                         "/rack2", "/rack3", "/rack4", "/rack4" };
-     String [] hosts = {"host1", "host2", "host3", "host4",
-                        "host5", "host6", "host7", "host8" };
--    dfsCluster = new MiniDFSCluster.Builder(conf).numDataNodes(8)
--                                                 .racks(racks)
--                                                 .hosts(hosts)
--                                                 .build();
--    
--    namenode = conf.get(DFSConfigKeys.FS_DEFAULT_NAME_KEY, "file:///");
--    
-+
-+    FileSystem fs;
-+    namenode = System.getProperty("test.cli.fs.default.name");
-+    if (namenode == null) {
-+      // Start up the mini dfs cluster
-+      dfsCluster = new MiniDFSCluster.Builder(conf).numDataNodes(8)
-+                                                   .racks(racks)
-+                                                   .hosts(hosts)
-+                                                   .build();
-+      namenode = conf.get(DFSConfigKeys.FS_DEFAULT_NAME_KEY, "file:///");
-+      fs = dfsCluster.getFileSystem();
-+    } else {
-+      conf.set(DFSConfigKeys.FS_DEFAULT_NAME_KEY, namenode);
-+      fs = FileSystem.get(conf);
-+    }
-+
-     username = System.getProperty("user.name");
- 
--    FileSystem fs = dfsCluster.getFileSystem();
-     assertTrue("Not a HDFS: "+fs.getUri(),
-                fs instanceof DistributedFileSystem);
-     dfs = (DistributedFileSystem) fs;
-@@ -75,10 +84,16 @@ public class TestHDFSCLI extends CLITestHelper {
-   @After
-   @Override
-   public void tearDown() throws Exception {
--    dfs.close();
--    dfsCluster.shutdown();
--    Thread.sleep(2000);
--    super.tearDown();
-+    dfs.delete(new Path(testDirAbsolute), true);
-+    if (dfsCluster != null) {
-+      boolean success = false;
-+      dfs.close();
-+      dfsCluster.shutdown();
-+      success = true;
-+      Thread.sleep(2000);
-+      assertTrue("Error tearing down Mini DFS cluster", success);
-+      super.tearDown();
-+    }
-   }
- 
-   @Override
-diff --git hdfs/src/test/org/apache/hadoop/cli/testConfCluster.xml hdfs/src/test/org/apache/hadoop/cli/testConfCluster.xml
-new file mode 100644
-index 0000000..bbed80f
---- /dev/null
-+++ hdfs/src/test/org/apache/hadoop/cli/testConfCluster.xml
-@@ -0,0 +1,3154 @@
-+<?xml version="1.0" encoding="UTF-8"?>
-+<?xml-stylesheet type="text/xsl" href="testConf.xsl"?>
-+
-+<configuration>
-+  <!-- Normal mode is test. To run just the commands and dump the output
-+       to the log, set it to nocompare -->
-+  <mode>test</mode>
-+  
-+  <!--  Comparator types:
-+           ExactComparator
-+           SubstringComparator
-+           RegexpComparator
-+           TokenComparator
-+           -->
-+  <tests>
-+    <!-- Tests for ls -->
-+    <test> <!-- TESTED -->
-+      <description>ls: file using absolute path</description>
-+      <test-commands>
-+        <command>-fs NAMENODE -touchz TEST_DIR_ABSOLUTE/file1</command>
-+        <command>-fs NAMENODE -ls TEST_DIR_ABSOLUTE/file1</command>
-+      </test-commands>
-+      <cleanup-commands>
-+        <command>-fs NAMENODE -rm TEST_DIR_ABSOLUTE/file1</command>
-+      </cleanup-commands>
-+      <comparators>
-+        <comparator>
-+          <type>TokenComparator</type>
-+          <expected-output>Found 1 items</expected-output>
-+        </comparator>
-+        <comparator>
-+          <type>RegexpComparator</type>
-+          <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/tmp/testcli/file1</expected-output>
-+        </comparator>
-+      </comparators>
-+    </test>
-+    
-+    <test> <!-- TESTED -->
-+      <description>ls: file using relative path</description>
-+      <test-commands>
-+        <command>-fs NAMENODE -touchz file1</command>
-+        <command>-fs NAMENODE -ls file1</command>
-+      </test-commands>
-+      <cleanup-commands>
-+        <command>-fs NAMENODE -rm file1</command>
-+      </cleanup-commands>
-+      <comparators>
-+        <comparator>
-+          <type>TokenComparator</type>
-+          <expected-output>Found 1 items</expected-output>
-+        </comparator>
-+        <comparator>
-+          <type>RegexpComparator</type>
-+          <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/user/[a-z]*/file1</expected-output>
-+        </comparator>
-+      </comparators>
-+    </test>
-+    
-+    <test> <!-- TESTED -->
-+      <description>ls: files using globbing</description>
-+      <test-commands>
-+        <command>-fs NAMENODE -touchz file1</command>
-+        <command>-fs NAMENODE -touchz file2</command>
-+        <command>-fs NAMENODE -touchz file3</command>
-+        <command>-fs NAMENODE -touchz file4</command>
-+        <command>-fs NAMENODE -ls file*</command>
-+      </test-commands>
-+      <cleanup-commands>
-+        <command>-fs NAMENODE -rmr file*</command>
-+      </cleanup-commands>
-+      <comparators>
-+        <comparator>
-+          <type>RegexpComparator</type>
-+          <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/user/[a-z]*/file1</expected-output>
-+        </comparator>
-+        <comparator>
-+          <type>RegexpComparator</type>
-+          <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/user/[a-z]*/file2</expected-output>
-+        </comparator>
-+        <comparator>
-+          <type>RegexpComparator</type>
-+          <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/user/[a-z]*/file3</expected-output>
-+        </comparator>
-+        <comparator>
-+          <type>RegexpComparator</type>
-+          <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/user/[a-z]*/file4</expected-output>
-+        </comparator>
-+      </comparators>
-+    </test>
-+    
-+    <test> <!-- TESTED -->
-+      <description>ls: directory using absolute path</description>
-+      <test-commands>
-+        <command>-fs NAMENODE -mkdir TEST_DIR_ABSOLUTE/dir1/dir2</command>
-+        <command>-fs NAMENODE -ls TEST_DIR_ABSOLUTE/dir1</command>
-+      </test-commands>
-+      <cleanup-commands>
-+        <command>-fs NAMENODE -rmr TEST_DIR_ABSOLUTE/dir1/dir2</command>
-+      </cleanup-commands>
-+      <comparators>
-+        <comparator>
-+          <type>TokenComparator</type>
-+          <expected-output>Found 1 items</expected-output>
-+        </comparator>
-+        <comparator>
-+          <type>RegexpComparator</type>
-+          <expected-output>^drwxr-xr-x( )*-( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/tmp/testcli/dir1/dir2</expected-output>
-+        </comparator>
-+      </comparators>
-+    </test>
-+    
-+    <test> <!-- TESTED -->
-+      <description>ls: directory using relative path</description>
-+      <test-commands>
-+        <command>-fs NAMENODE -mkdir dir0/dir1</command>
-+        <command>-fs NAMENODE -ls dir0</command>
-+      </test-commands>
-+      <cleanup-commands>
-+        <command>-fs NAMENODE -rmr dir0</command>
-+      </cleanup-commands>
-+      <comparators>
-+        <comparator>
-+          <type>TokenComparator</type>
-+          <expected-output>Found 1 items</expected-output>
-+        </comparator>
-+        <comparator>
-+          <type>RegexpComparator</type>
-+          <expected-output>^drwxr-xr-x( )*-( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/user/[a-z]*/dir0/dir1</expected-output>
-+        </comparator>
-+      </comparators>
-+    </test>
-+    
-+    <test> <!-- TESTED -->
-+      <description>ls: directory using globbing</description>
-+      <test-commands>
-+        <command>-fs NAMENODE -mkdir dir1</command>
-+        <command>-fs NAMENODE -mkdir dir2</command>
-+        <command>-fs NAMENODE -mkdir dir3</command>
-+        <command>-fs NAMENODE -mkdir dir4</command>
-+        <command>-fs NAMENODE -ls </command>
-+      </test-commands>
-+      <cleanup-commands>
-+        <command>-fs NAMENODE -rmr dir*</command>
-+      </cleanup-commands>
-+      <comparators>
-+        <comparator>
-+          <type>RegexpComparator</type>
-+          <expected-output>^drwxr-xr-x( )*-( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/user/[a-z]*/dir1</expected-output>
-+        </comparator>
-+        <comparator>
-+          <type>RegexpComparator</type>
-+          <expected-output>^drwxr-xr-x( )*-( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/user/[a-z]*/dir2</expected-output>
-+        </comparator>
-+        <comparator>
-+          <type>RegexpComparator</type>
-+          <expected-output>^drwxr-xr-x( )*-( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/user/[a-z]*/dir3</expected-output>
-+        </comparator>
-+        <comparator>
-+          <type>RegexpComparator</type>
-+          <expected-output>^drwxr-xr-x( )*-( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/user/[a-z]*/dir4</expected-output>
-+        </comparator>
-+      </comparators>
-+    </test>
-+    
-+    <test> <!-- TESTED -->
-+      <description>ls: file/directory that does not exist in /</description>
-+      <test-commands>
-+        <command>-fs NAMENODE -ls /file1</command>
-+      </test-commands>
-+      <cleanup-commands>
-+      </cleanup-commands>
-+      <comparators>
-+        <comparator>
-+          <type>RegexpComparator</type>
-+          <expected-output>^ls: Cannot access /file1: No such file or directory.</expected-output>
-+        </comparator>
-+      </comparators>
-+    </test>
-+    
-+    <test> <!-- TESTED -->
-+      <description>ls: file/directory that does not exist in home directory (/user/username)</description>
-+      <test-commands>
-+        <command>-fs NAMENODE -ls /user/username</command>
-+      </test-commands>
-+      <cleanup-commands>
-+      </cleanup-commands>
-+      <comparators>
-+        <comparator>
-+          <type>RegexpComparator</type>
-+          <expected-output>^ls: Cannot access /user/username: No such file or directory.</expected-output>
-+        </comparator>
-+      </comparators>
-+    </test>
-+    
-+    <!-- Tests for lsr -->
-+    <test> <!-- TESTED -->
-+      <description>lsr: files/directories using absolute path</description>
-+      <test-commands>
-+        <command>-fs NAMENODE -mkdir TEST_DIR_ABSOLUTE/dir0</command>
-+        <command>-fs NAMENODE -mkdir TEST_DIR_ABSOLUTE/dir0/dir1</command>
-+        <command>-fs NAMENODE -mkdir TEST_DIR_ABSOLUTE/dir0/dir1/dir1</command>
-+        <command>-fs NAMENODE -mkdir TEST_DIR_ABSOLUTE/dir0/dir1/dir2</command>
-+        <command>-fs NAMENODE -mkdir TEST_DIR_ABSOLUTE/dir0/dir2</command>
-+        <command>-fs NAMENODE -mkdir TEST_DIR_ABSOLUTE/dir0/dir2/dir1</command>
-+        <command>-fs NAMENODE -mkdir TEST_DIR_ABSOLUTE/dir0/dir2/dir2</command>
-+        <command>-fs NAMENODE -touchz TEST_DIR_ABSOLUTE/dir0/file0</command>
-+        <command>-fs NAMENODE -touchz TEST_DIR_ABSOLUTE/dir0/dir1/file1</command>
-+        <command>-fs NAMENODE -touchz TEST_DIR_ABSOLUTE/dir0/dir1/file2</command>
-+        <command>-fs NAMENODE -touchz TEST_DIR_ABSOLUTE/dir0/dir2/file1</command>
-+        <command>-fs NAMENODE -touchz TEST_DIR_ABSOLUTE/dir0/dir2/file2</command>
-+        <command>-fs NAMENODE -touchz TEST_DIR_ABSOLUTE/dir0/dir1/dir1/file1</command>
-+        <command>-fs NAMENODE -touchz TEST_DIR_ABSOLUTE/dir0/dir1/dir1/file2</command>
-+        <command>-fs NAMENODE -touchz TEST_DIR_ABSOLUTE/dir0/dir2/dir2/file1</command>
-+        <command>-fs NAMENODE -touchz TEST_DIR_ABSOLUTE/dir0/dir2/dir2/file2</command>
-+        <command>-fs NAMENODE -lsr TEST_DIR_ABSOLUTE/dir0</command>
-+      </test-commands>
-+      <cleanup-commands>
-+        <command>-fs NAMENODE -rmr TEST_DIR_ABSOLUTE/dir0</command>
-+      </cleanup-commands>
-+      <comparators>
-+        <comparator>
-+          <type>RegexpComparator</type>
-+          <expected-output>^drwxr-xr-x( )*-( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/tmp/testcli/dir0/dir1</expected-output>
-+        </comparator>
-+        <comparator>
-+          <type>RegexpComparator</type>
-+          <expected-output>^drwxr-xr-x( )*-( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/tmp/testcli/dir0/dir2</expected-output>
-+        </comparator>
-+        <comparator>
-+          <type>RegexpComparator</type>
-+          <expected-output>^drwxr-xr-x( )*-( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/tmp/testcli/dir0/dir1/dir1</expected-output>
-+        </comparator>
-+        <comparator>
-+          <type>RegexpComparator</type>
-+          <expected-output>^drwxr-xr-x( )*-( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/tmp/testcli/dir0/dir1/dir2</expected-output>
-+        </comparator>
-+        <comparator>
-+          <type>RegexpComparator</type>
-+          <expected-output>^drwxr-xr-x( )*-( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/tmp/testcli/dir0/dir2/dir1</expected-output>
-+        </comparator>
-+        <comparator>
-+          <type>RegexpComparator</type>
-+          <expected-output>^drwxr-xr-x( )*-( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/tmp/testcli/dir0/dir2/dir2</expected-output>
-+        </comparator>
-+        <comparator>
-+          <type>RegexpComparator</type>
-+          <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/tmp/testcli/dir0/file0</expected-output>
-+        </comparator>
-+        <comparator>
-+          <type>RegexpComparator</type>
-+          <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/tmp/testcli/dir0/dir1/file1</expected-output>
-+        </comparator>
-+        <comparator>
-+          <type>RegexpComparator</type>
-+          <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/tmp/testcli/dir0/dir1/file2</expected-output>
-+        </comparator>
-+        <comparator>
-+          <type>RegexpComparator</type>
-+          <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/tmp/testcli/dir0/dir2/file1</expected-output>
-+        </comparator>
-+        <comparator>
-+          <type>RegexpComparator</type>
-+          <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/tmp/testcli/dir0/dir2/file2</expected-output>
-+        </comparator>
-+        <comparator>
-+          <type>RegexpComparator</type>
-+          <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/tmp/testcli/dir0/dir1/dir1/file1</expected-output>
-+        </comparator>
-+        <comparator>
-+          <type>RegexpComparator</type>
-+          <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/tmp/testcli/dir0/dir1/dir1/file2</expected-output>
-+        </comparator>
-+        <comparator>
-+          <type>RegexpComparator</type>
-+          <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/tmp/testcli/dir0/dir2/dir2/file1</expected-output>
-+        </comparator>
-+        <comparator>
-+          <type>RegexpComparator</type>
-+          <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/tmp/testcli/dir0/dir2/dir2/file2</expected-output>
-+        </comparator>
-+      </comparators>
-+    </test>
-+    
-+    <test> <!-- TESTED -->
-+      <description>lsr: files/directories using relative path</description>
-+      <test-commands>
-+        <command>-fs NAMENODE -mkdir dir0</command>
-+        <command>-fs NAMENODE -mkdir dir0/dir1</command>
-+        <command>-fs NAMENODE -mkdir dir0/dir1/dir1</command>
-+        <command>-fs NAMENODE -mkdir dir0/dir1/dir2</command>
-+        <command>-fs NAMENODE -mkdir dir0/dir2</command>
-+        <command>-fs NAMENODE -mkdir dir0/dir2/dir1</command>
-+        <command>-fs NAMENODE -mkdir dir0/dir2/dir2</command>
-+        <command>-fs NAMENODE -touchz dir0/file0</command>
-+        <command>-fs NAMENODE -touchz dir0/dir1/file1</command>
-+        <command>-fs NAMENODE -touchz dir0/dir1/file2</command>
-+        <command>-fs NAMENODE -touchz dir0/dir2/file1</command>
-+        <command>-fs NAMENODE -touchz dir0/dir2/file2</command>
-+        <command>-fs NAMENODE -touchz dir0/dir1/dir1/file1</command>
-+        <command>-fs NAMENODE -touchz dir0/dir1/dir1/file2</command>
-+        <command>-fs NAMENODE -touchz dir0/dir2/dir2/file1</command>
-+        <command>-fs NAMENODE -touchz dir0/dir2/dir2/file2</command>
-+        <command>-fs NAMENODE -lsr dir0</command>
-+      </test-commands>
-+      <cleanup-commands>
-+        <command>-fs NAMENODE -rmr dir0</command>
-+      </cleanup-commands>
-+      <comparators>
-+        <comparator>
-+          <type>RegexpComparator</type>
-+          <expected-output>^drwxr-xr-x( )*-( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/user/[a-z]*/dir0/dir1</expected-output>
-+        </comparator>
-+        <comparator>
-+          <type>RegexpComparator</type>
-+          <expected-output>^drwxr-xr-x( )*-( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/user/[a-z]*/dir0/dir2</expected-output>
-+        </comparator>
-+        <comparator>
-+          <type>RegexpComparator</type>
-+          <expected-output>^drwxr-xr-x( )*-( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/user/[a-z]*/dir0/dir1/dir1</expected-output>
-+        </comparator>
-+        <comparator>
-+          <type>RegexpComparator</type>
-+          <expected-output>^drwxr-xr-x( )*-( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/user/[a-z]*/dir0/dir1/dir2</expected-output>
-+        </comparator>
-+        <comparator>
-+          <type>RegexpComparator</type>
-+          <expected-output>^drwxr-xr-x( )*-( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/user/[a-z]*/dir0/dir2/dir1</expected-output>
-+        </comparator>
-+        <comparator>
-+          <type>RegexpComparator</type>
-+          <expected-output>^drwxr-xr-x( )*-( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/user/[a-z]*/dir0/dir2/dir2</expected-output>
-+        </comparator>
-+        <comparator>
-+          <type>RegexpComparator</type>
-+          <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/user/[a-z]*/dir0/file0</expected-output>
-+        </comparator>
-+        <comparator>
-+          <type>RegexpComparator</type>
-+          <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/user/[a-z]*/dir0/dir1/file1</expected-output>
-+        </comparator>
-+        <comparator>
-+          <type>RegexpComparator</type>
-+          <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/user/[a-z]*/dir0/dir1/file2</expected-output>
-+        </comparator>
-+        <comparator>
-+          <type>RegexpComparator</type>
-+          <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/user/[a-z]*/dir0/dir2/file1</expected-output>
-+        </comparator>
-+        <comparator>
-+          <type>RegexpComparator</type>
-+          <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/user/[a-z]*/dir0/dir2/file2</expected-output>
-+        </comparator>
-+        <comparator>
-+          <type>RegexpComparator</type>
-+          <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/user/[a-z]*/dir0/dir1/dir1/file1</expected-output>
-+        </comparator>
-+        <comparator>
-+          <type>RegexpComparator</type>
-+          <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/user/[a-z]*/dir0/dir1/dir1/file2</expected-output>
-+        </comparator>
-+        <comparator>
-+          <type>RegexpComparator</type>
-+          <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/user/[a-z]*/dir0/dir2/dir2/file1</expected-output>
-+        </comparator>
-+        <comparator>
-+          <type>RegexpComparator</type>
-+          <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/user/[a-z]*/dir0/dir2/dir2/file2</expected-output>
-+        </comparator>
-+      </comparators>
-+    </test>
-+    
-+    <test> <!-- TESTED -->
-+      <description>lsr: files/directories using globbing</description>
-+      <test-commands>
-+        <command>-fs NAMENODE -mkdir dir0</command>
-+        <command>-fs NAMENODE -mkdir dir0/dir1</command>
-+        <command>-fs NAMENODE -mkdir dir0/dir1/dir1</command>
-+        <command>-fs NAMENODE -mkdir dir0/dir1/dir2</command>
-+        <command>-fs NAMENODE -mkdir dir0/dir2</command>
-+        <command>-fs NAMENODE -mkdir dir0/dir2/dir1</command>
-+        <command>-fs NAMENODE -mkdir dir0/dir2/dir2</command>
-+        <command>-fs NAMENODE -touchz dir0/file0</command>
-+        <command>-fs NAMENODE -touchz dir0/dir1/file1</command>
-+        <command>-fs NAMENODE -touchz dir0/dir1/file2</command>
-+        <command>-fs NAMENODE -touchz dir0/dir2/file1</command>
-+        <command>-fs NAMENODE -touchz dir0/dir2/file2</command>
-+        <command>-fs NAMENODE -touchz dir0/dir1/dir1/file1</command>
-+        <command>-fs NAMENODE -touchz dir0/dir1/dir1/file2</command>
-+        <command>-fs NAMENODE -touchz dir0/dir2/dir2/file1</command>
-+        <command>-fs NAMENODE -touchz dir0/dir2/dir2/file2</command>
-+        <command>-fs NAMENODE -lsr dir0/*</command>
-+      </test-commands>
-+      <cleanup-commands>
-+        <command>-fs NAMENODE -rmr dir0</command>
-+      </cleanup-commands>
-+      <comparators>
-+        <!-- JIRA?
-+        <comparator>
-+          <type>RegexpComparator</type>
-+          <expected-output>^/user/[a-z]*/dir0/dir1</expected-output>
-+        </comparator>
-+        <comparator>
-+          <type>RegexpComparator</type>
-+          <expected-output>^/user/[a-z]*/dir0/dir2</expected-output>
-+        </comparator>
-+       -->
-+        <comparator>
-+          <type>RegexpComparator</type>
-+          <expected-output>^drwxr-xr-x( )*-( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/user/[a-z]*/dir0/dir1/dir1</expected-output>
-+        </comparator>
-+        <comparator>
-+          <type>RegexpComparator</type>
-+          <expected-output>^drwxr-xr-x( )*-( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/user/[a-z]*/dir0/dir1/dir2</expected-output>
-+        </comparator>
-+        <comparator>
-+          <type>RegexpComparator</type>
-+          <expected-output>^drwxr-xr-x( )*-( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/user/[a-z]*/dir0/dir2/dir1</expected-output>
-+        </comparator>
-+        <comparator>
-+          <type>RegexpComparator</type>
-+          <expected-output>^drwxr-xr-x( )*-( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/user/[a-z]*/dir0/dir2/dir2</expected-output>
-+        </comparator>
-+        <comparator>
-+          <type>RegexpComparator</type>
-+          <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/user/[a-z]*/dir0/file0</expected-output>
-+        </comparator>
-+        <comparator>
-+          <type>RegexpComparator</type>
-+          <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/user/[a-z]*/dir0/dir1/file1</expected-output>
-+        </comparator>
-+        <comparator>
-+          <type>RegexpComparator</type>
-+          <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/user/[a-z]*/dir0/dir1/file2</expected-output>
-+        </comparator>
-+        <comparator>
-+          <type>RegexpComparator</type>
-+          <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/user/[a-z]*/dir0/dir2/file1</expected-output>
-+        </comparator>
-+        <comparator>
-+          <type>RegexpComparator</type>
-+          <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/user/[a-z]*/dir0/dir2/file2</expected-output>
-+        </comparator>
-+        <comparator>
-+          <type>RegexpComparator</type>
-+          <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/user/[a-z]*/dir0/dir1/dir1/file1</expected-output>
-+        </comparator>
-+        <comparator>
-+          <type>RegexpComparator</type>
-+          <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/user/[a-z]*/dir0/dir1/dir1/file2</expected-output>
-+        </comparator>
-+        <comparator>
-+          <type>RegexpComparator</type>
-+          <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/user/[a-z]*/dir0/dir2/dir2/file1</expected-output>
-+        </comparator>
-+        <comparator>
-+          <type>RegexpComparator</type>
-+          <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/user/[a-z]*/dir0/dir2/dir2/file2</expected-output>
-+        </comparator>
-+      </comparators>
-+    </test>
-+    
-+    <test> <!-- TESTED -->
-+      <description>lsr: file/directory that does not exist in /tmp/testcli/</description>
-+      <test-commands>
-+        <command>-fs NAMENODE -lsr TEST_DIR_ABSOLUTE/file1</command>
-+      </test-commands>
-+      <cleanup-commands>
-+      </cleanup-commands>
-+      <comparators>
-+        <comparator>
-+          <type>RegexpComparator</type>
-+          <expected-output>^lsr: Cannot access /tmp/testcli/file1: No such file or directory.</expected-output>
-+        </comparator>
-+      </comparators>
-+    </test>
-+    
-+    <test> <!-- TESTED -->
-+      <description>lsr: file/directory that does not exist in home directory (/user/username)</description>
-+      <test-commands>
-+        <command>-fs NAMENODE -lsr /user/username</command>
-+      </test-commands>
-+      <cleanup-commands>
-+      </cleanup-commands>
-+      <comparators>
-+        <comparator>
-+          <type>RegexpComparator</type>
-+          <expected-output>^lsr: Cannot access /user/username: No such file or directory.</expected-output>
-+        </comparator>
-+      </comparators>
-+    </test>
-+    
-+    <!-- Tests for du -->
-+    <test> <!-- TESTED -->
-+      <description>du: file using absolute path</description>
-+      <test-commands>
-+        <command>-fs NAMENODE -put CLITEST_DATA/data15bytes TEST_DIR_ABSOLUTE/data15bytes</command>
-+        <command>-fs NAMENODE -du TEST_DIR_ABSOLUTE/data15bytes</command>
-+      </test-commands>
-+      <cleanup-commands>
-+        <command>-fs NAMENODE -rm TEST_DIR_ABSOLUTE/data15bytes</command>
-+      </cleanup-commands>
-+      <comparators>
-+        <comparator>
-+          <type>TokenComparator</type>
-+          <expected-output>Found 1 items</expected-output>
-+        </comparator>
-+        <comparator>
-+          <type>RegexpComparator</type>
-+          <expected-output>^15( |\t)*hdfs://\w+[.a-z]*:[0-9]*/tmp/testcli/data15bytes</expected-output>
-+        </comparator>
-+      </comparators>
-+    </test>
-+    
-+    <test> <!-- TESTED -->
-+      <description>du: file using relative path</description>
-+      <test-commands>
-+        <command>-fs NAMENODE -put CLITEST_DATA/data15bytes data15bytes</command>
-+        <command>-fs NAMENODE -du data15bytes</command>
-+      </test-commands>
-+      <cleanup-commands>
-+        <command>-fs NAMENODE -rmr data15bytes</command>
-+      </cleanup-commands>
-+      <comparators>
-+        <comparator>
-+          <type>TokenComparator</type>
-+          <expected-output>Found 1 items</expected-output>
-+        </comparator>
-+        <comparator>
-+          <type>RegexpComparator</type>
-+          <expected-output>^15( |\t)*hdfs://\w+[.a-z]*:[0-9]*/user/[a-z]*/data15bytes</expected-output>
-+        </comparator>
-+      </comparators>
-+    </test>
-+    
-+    <test> <!-- TESTED -->
-+      <description>du: files using globbing</description>
-+      <test-commands>
-+        <command>-fs NAMENODE -put CLITEST_DATA/data15bytes data15bytes</command>
-+        <command>-fs NAMENODE -put CLITEST_DATA/data30bytes data30bytes</command>
-+        <command>-fs NAMENODE -put CLITEST_DATA/data60bytes data60bytes</command>
-+        <command>-fs NAMENODE -put CLITEST_DATA/data120bytes data120bytes</command>
-+        <command>-fs NAMENODE -du data*</command>
-+      </test-commands>
-+      <cleanup-commands>
-+        <command>-fs NAMENODE -rmr data*</command>
-+      </cleanup-commands>
-+      <comparators>
-+        <comparator>
-+          <type>TokenComparator</type>
-+          <expected-output>Found 4 items</expected-output>
-+        </comparator>
-+        <comparator>
-+          <type>RegexpComparator</type>
-+          <expected-output>^15( |\t)*hdfs://\w+[.a-z]*:[0-9]*/user/[a-z]*/data15bytes</expected-output>
-+        </comparator>
-+        <comparator>
-+          <type>RegexpComparator</type>
-+          <expected-output>^30( |\t)*hdfs://\w+[.a-z]*:[0-9]*/user/[a-z]*/data30bytes</expected-output>
-+        </comparator>
-+        <comparator>
-+          <type>RegexpComparator</type>
-+          <expected-output>^60( |\t)*hdfs://\w+[.a-z]*:[0-9]*/user/[a-z]*/data60bytes</expected-output>
-+        </comparator>
-+        <comparator>
-+          <type>RegexpComparator</type>
-+          <expected-output>^120( |\t)*hdfs://\w+[.a-z]*:[0-9]*/user/[a-z]*/data120bytes</expected-output>
-+        </comparator>
-+      </comparators>
-+    </test>
-+    
-+    <test> <!-- TESTED -->
-+      <description>du: directory using absolute path</description>
-+      <test-commands>
-+        <command>-fs NAMENODE -mkdir TEST_DIR_ABSOLUTE/dir0</command>
-+        <command>-fs NAMENODE -put CLITEST_DATA/data15bytes TEST_DIR_ABSOLUTE/dir0/data15bytes</command>
-+        <command>-fs NAMENODE -du TEST_DIR_ABSOLUTE/dir0</command>
-+      </test-commands>
-+      <cleanup-commands>
-+        <command>-fs NAMENODE -rmr TEST_DIR_ABSOLUTE/dir0</command>
-+      </cleanup-commands>
-+      <comparators>
-+        <comparator>
-+          <type>TokenComparator</type>
-+          <expected-output>Found 1 items</expected-output>
-+        </comparator>
-+        <comparator>
-+          <type>RegexpComparator</type>
-+          <expected-output>^15( |\t)*hdfs://\w+[.a-z]*:[0-9]*/tmp/testcli/dir0/data15bytes</expected-output>
-+        </comparator>
-+      </comparators>
-+    </test>
-+    
-+    <test> <!-- TESTED -->
-+      <description>du: directory using relative path</description>
-+      <test-commands>
-+        <command>-fs NAMENODE -mkdir dir0</command>
-+        <command>-fs NAMENODE -put CLITEST_DATA/data15bytes dir0/data15bytes</command>
-+        <command>-fs NAMENODE -du dir0</command>
-+      </test-commands>
-+      <cleanup-commands>
-+        <command>-fs NAMENODE -rmr dir0</command>
-+      </cleanup-commands>
-+      <comparators>
-+        <comparator>
-+          <type>TokenComparator</type>
-+          <expected-output>Found 1 items</expected-output>
-+        </comparator>
-+        <comparator>
-+          <type>RegexpComparator</type>
-+          <expected-output>^15( |\t)*hdfs://\w+[.a-z]*:[0-9]*/user/[a-z]*/dir0/data15bytes</expected-output>
-+        </comparator>
-+      </comparators>
-+    </test>
-+    
-+    <test> <!-- TESTED -->
-+      <description>du: directory using globbing</description>
-+      <test-commands>
-+        <command>-fs NAMENODE -mkdir TEST_DIR_ABSOLUTE/dir0</command>
-+        <command>-fs NAMENODE -put CLITEST_DATA/data15bytes TEST_DIR_ABSOLUTE/dir0/data15bytes</command>
-+        <command>-fs NAMENODE -put CLITEST_DATA/data30bytes TEST_DIR_ABSOLUTE/dir0/data30bytes</command>
-+        <command>-fs NAMENODE -put CLITEST_DATA/data60bytes TEST_DIR_ABSOLUTE/dir0/data60bytes</command>
-+        <command>-fs NAMENODE -put CLITEST_DATA/data120bytes TEST_DIR_ABSOLUTE/dir0/data120bytes</command>
-+        <command>-fs NAMENODE -du TEST_DIR_ABSOLUTE/dir0/*</command>
-+      </test-commands>
-+      <cleanup-commands>
-+        <command>-fs NAMENODE -rmr TEST_DIR_ABSOLUTE/dir0</command>
-+      </cleanup-commands>
-+      <comparators>
-+        <comparator>
-+          <type>TokenComparator</type>
-+          <expected-output>Found 4 items</expected-output>
-+        </comparator>
-+        <comparator>
-+          <type>RegexpComparator</type>
-+          <expected-output>^15( |\t)*hdfs://\w+[.a-z]*:[0-9]*/tmp/testcli/dir0/data15bytes</expected-output>
-+        </comparator>
-+        <comparator>
-+          <type>RegexpComparator</type>
-+          <expected-output>^30( |\t)*hdfs://\w+[.a-z]*:[0-9]*/tmp/testcli/dir0/data30bytes</expected-output>
-+        </comparator>
-+        <comparator>
-+          <type>RegexpComparator</type>
-+          <expected-output>^60( |\t)*hdfs://\w+[.a-z]*:[0-9]*/tmp/testcli/dir0/data60bytes</expected-output>
-+        </comparator>
-+        <comparator>
-+          <type>RegexpComparator</type>
-+          <expected-output>^120( |\t)*hdfs://\w+[.a-z]*:[0-9]*/tmp/testcli/dir0/data120bytes</expected-output>
-+        </comparator>
-+      </comparators>
-+    </test>
-+    
-+    <!-- Tests for dus -->
-+    <test> <!-- TESTED -->
-+      <description>dus: directories/files using absolute path</description>
-+      <test-commands>
-+        <command>-fs NAMENODE -mkdir TEST_DIR_ABSOLUTE/dir0</command>
-+        <command>-fs NAMENODE -mkdir TEST_DIR_ABSOLUTE/dir0/dir1</command>
-+        <command>-fs NAMENODE -mkdir TEST_DIR_ABSOLUTE/dir0/dir1/dir1</command>
-+        <command>-fs NAMENODE -mkdir TEST_DIR_ABSOLUTE/dir0/dir1/dir2</command>
-+        <command>-fs NAMENODE -mkdir TEST_DIR_ABSOLUTE/dir0/dir2</command>
-+        <command>-fs NAMENODE -mkdir TEST_DIR_ABSOLUTE/dir0/dir2/dir1</command>
-+        <command>-fs NAMENODE -mkdir TEST_DIR_ABSOLUTE/dir0/dir2/dir2</command>
-+        <command>-fs NAMENODE -touchz TEST_DIR_ABSOLUTE/dir0/file0</command>
-+        <command>-fs NAMENODE -put CLITEST_DATA/data15bytes TEST_DIR_ABSOLUTE/dir0/dir1/data15bytes</command>
-+        <command>-fs NAMENODE -put CLITEST_DATA/data30bytes TEST_DIR_ABSOLUTE/dir0/dir1/data30bytes</command>
-+        <command>-fs NAMENODE -put CLITEST_DATA/data15bytes TEST_DIR_ABSOLUTE/dir0/dir2/data15bytes</command>
-+        <command>-fs NAMENODE -put CLITEST_DATA/data30bytes TEST_DIR_ABSOLUTE/dir0/dir2/data30bytes</command>
-+        <command>-fs NAMENODE -put CLITEST_DATA/data60bytes TEST_DIR_ABSOLUTE/dir0/dir1/dir1/data60bytes</command>
-+        <command>-fs NAMENODE -put CLITEST_DATA/data120bytes TEST_DIR_ABSOLUTE/dir0/dir1/dir2/data120bytes</command>
-+        <command>-fs NAMENODE -put CLITEST_DATA/data60bytes TEST_DIR_ABSOLUTE/dir0/dir2/dir1/data60bytes</command>
-+        <command>-fs NAMENODE -put CLITEST_DATA/data120bytes TEST_DIR_ABSOLUTE/dir0/dir2/dir2/data120bytes</command>
-+        <command>-fs NAMENODE -dus TEST_DIR_ABSOLUTE/dir0</command>
-+      </test-commands>
-+      <cleanup-commands>
-+        <command>-fs NAMENODE -rmr TEST_DIR_ABSOLUTE/dir0</command>
-+      </cleanup-commands>
-+      <comparators>
-+        <comparator>
-+          <type>RegexpComparator</type>
-+          <expected-output>^hdfs://\w+[.a-z]*:[0-9]*/tmp/testcli/dir0( |\t)*450</expected-output>
-+        </comparator>
-+      </comparators>
-+    </test>
-+    
-+    <test> <!-- TESTED -->
-+      <description>dus: directories/files using relative path</description>
-+      <test-commands>
-+        <command>-fs NAMENODE -mkdir dir0</command>
-+        <command>-fs NAMENODE -mkdir dir0/dir1</command>
-+        <command>-fs NAMENODE -mkdir dir0/dir1/dir1</command>
-+        <command>-fs NAMENODE -mkdir dir0/dir1/dir2</command>
-+        <command>-fs NAMENODE -mkdir dir0/dir2</command>
-+        <command>-fs NAMENODE -mkdir dir0/dir2/dir1</command>
-+        <command>-fs NAMENODE -mkdir dir0/dir2/dir2</command>
-+        <command>-fs NAMENODE -touchz dir0/file0</command>
-+        <command>-fs NAMENODE -put CLITEST_DATA/data15bytes dir0/dir1/data15bytes</command>
-+        <command>-fs NAMENODE -put CLITEST_DATA/data30bytes dir0/dir1/data30bytes</command>
-+        <command>-fs NAMENODE -put CLITEST_DATA/data15bytes dir0/dir2/data15bytes</command>
-+        <command>-fs NAMENODE -put CLITEST_DATA/data30bytes dir0/dir2/data30bytes</command>
-+        <command>-fs NAMENODE -put CLITEST_DATA/data60bytes dir0/dir1/dir1/data60bytes</command>
-+        <command>-fs NAMENODE -put CLITEST_DATA/data120bytes dir0/dir1/dir2/data120bytes</command>
-+        <command>-fs NAMENODE -put CLITEST_DATA/data60bytes dir0/dir2/dir1/data60bytes</command>
-+        <command>-fs NAMENODE -put CLITEST_DATA/data120bytes dir0/dir2/dir2/data120bytes</command>
-+        <command>-fs NAMENODE -dus dir0</command>
-+      </test-commands>
-+      <cleanup-commands>
-+        <command>-fs NAMENODE -rmr dir0</command>
-+      </cleanup-commands>
-+      <comparators>
-+        <comparator>
-+          <type>RegexpComparator</type>
-+          <expected-output>^hdfs://\w+[.a-z]*:[0-9]*/user/[a-z]*/dir0( |\t)*450</expected-output>
-+        </comparator>
-+      </comparators>
-+    </test>
-+    
-+    <test> <!-- TESTED -->
-+      <description>dus: directories/files using globbing</description>
-+      <test-commands>
-+        <command>-fs NAMENODE -mkdir TEST_DIR_ABSOLUTE/dir0</command>
-+        <command>-fs NAMENODE -mkdir TEST_DIR_ABSOLUTE/dir0/dir1</command>
-+        <command>-fs NAMENODE -mkdir TEST_DIR_ABSOLUTE/dir0/dir1/dir1</command>
-+        <command>-fs NAMENODE -mkdir TEST_DIR_ABSOLUTE/dir0/dir1/dir2</command>
-+        <command>-fs NAMENODE -mkdir TEST_DIR_ABSOLUTE/dir0/dir2</command>
-+        <command>-fs NAMENODE -mkdir TEST_DIR_ABSOLUTE/dir0/dir2/dir1</command>
-+        <command>-fs NAMENODE -mkdir TEST_DIR_ABSOLUTE/dir0/dir2/dir2</command>
-+        <command>-fs NAMENODE -touchz TEST_DIR_ABSOLUTE/dir0/file0</command>
-+        <command>-fs NAMENODE -put CLITEST_DATA/data15bytes TEST_DIR_ABSOLUTE/dir0/dir1/data15bytes</command>
-+        <command>-fs NAMENODE -put CLITEST_DATA/data30bytes TEST_DIR_ABSOLUTE/dir0/dir1/data30bytes</command>
-+        <command>-fs NAMENODE -put CLITEST_DATA/data15bytes TEST_DIR_ABSOLUTE/dir0/dir2/data15bytes</command>
-+        <command>-fs NAMENODE -put CLITEST_DATA/data30bytes TEST_DIR_ABSOLUTE/dir0/dir2/data30bytes</command>
-+        <command>-fs NAMENODE -put CLITEST_DATA/data60bytes TEST_DIR_ABSOLUTE/dir0/dir1/dir1/data60bytes</command>
-+        <command>-fs NAMENODE -put CLITEST_DATA/data120bytes TEST_DIR_ABSOLUTE/dir0/dir1/dir2/data120bytes</command>
-+        <command>-fs NAMENODE -put CLITEST_DATA/data60bytes TEST_DIR_ABSOLUTE/dir0/dir2/dir1/data60bytes</command>
-+        <command>-fs NAMENODE -put CLITEST_DATA/data120bytes TEST_DIR_ABSOLUTE/dir0/dir2/dir2/data120bytes</command>
-+        <command>-fs NAMENODE -mkdir TEST_DIR_ABSOLUTE/donotcountdir0</command>
-+        <command>-fs NAMENODE -put CLITEST_DATA/data15bytes TEST_DIR_ABSOLUTE/donotcountdir0/data15bytes</command>
-+        <command>-fs NAMENODE -put CLITEST_DATA/data15bytes TEST_DIR_ABSOLUTE/donotcountdir0/data15bytes</command>
-+        <command>-fs NAMENODE -put CLITEST_DATA/data15bytes TEST_DIR_ABSOLUTE/donotcountdir0/data15bytes</command>
-+        <command>-fs NAMENODE -put CLITEST_DATA/data15bytes TEST_DIR_ABSOLUTE/donotcountdir0/data15bytes</command>
-+        <command>-fs NAMENODE -dus TEST_DIR_ABSOLUTE/dir*</command>
-+      </test-commands>
-+      <cleanup-commands>
-+        <command>-fs NAMENODE -rmr TEST_DIR_ABSOLUTE/dir0</command>
-+        <command>-fs NAMENODE -rmr TEST_DIR_ABSOLUTE/donotcountdir0</command>
-+      </cleanup-commands>
-+      <comparators>
-+        <comparator>
-+          <type>RegexpComparator</type>
-+          <expected-output>^hdfs://\w+[.a-z]*:[0-9]*/tmp/testcli/dir0( |\t)*450</expected-output>
-+        </comparator>
-+      </comparators>
-+    </test>
-+    
-+    <!-- Tests for mv -->
-+    <test> <!-- TESTED -->
-+      <description>mv: file (absolute path) to file (absolute path)</description>
-+      <test-commands>
-+        <command>-fs NAMENODE -touchz TEST_DIR_ABSOLUTE/file1</command>
-+        <command>-fs NAMENODE -mv TEST_DIR_ABSOLUTE/file1 TEST_DIR_ABSOLUTE/file2</command>
-+        <command>-fs NAMENODE -ls TEST_DIR_ABSOLUTE/file*</command>        
-+      </test-commands>
-+      <cleanup-commands>
-+        <command>-fs NAMENODE -rm TEST_DIR_ABSOLUTE/file2</command>
-+      </cleanup-commands>:
-+      <comparators>
-+        <comparator>
-+          <type>TokenComparator</type>
-+          <expected-output>Found 1 items</expected-output>
-+        </comparator>
-+        <comparator>
-+          <type>RegexpComparator</type>
-+          <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/tmp/testcli/file2</expected-output>
-+        </comparator>
-+        <comparator>
-+          <type>RegexpComparator</type>
-+          <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/tmp/testcli/file[^1]</expected-output>
-+        </comparator>
-+      </comparators>
-+    </test>
-+    
-+    <test> <!-- TESTED -->
-+      <description>mv: file (absolute path) to file (relative path)</description>
-+      <test-commands>
-+        <command>-fs NAMENODE -touchz TEST_DIR_ABSOLUTE/file1</command>
-+        <command>-fs NAMENODE -mv TEST_DIR_ABSOLUTE/file1 file2</command>
-+        <command>-fs NAMENODE -ls file2</command>
-+      </test-commands>
-+      <cleanup-commands>
-+        <command>-fs NAMENODE -rmr file2</command>
-+      </cleanup-commands>
-+      <comparators>
-+        <comparator>
-+          <type>TokenComparator</type>
-+          <expected-output>Found 1 items</expected-output>
-+        </comparator>
-+        <comparator>
-+          <type>RegexpComparator</type>
-+          <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/user/[a-z]*/file2</expected-output>
-+        </comparator>
-+      </comparators>
-+    </test>
-+    
-+    <test> <!-- TESTED -->
-+      <description>mv: file (absolute path) to directory (absolute path); keep the same name at the destination</description>
-+      <test-commands>
-+        <command>-fs NAMENODE -touchz TEST_DIR_ABSOLUTE/file1</command>
-+        <command>-fs NAMENODE -mkdir TEST_DIR_ABSOLUTE/dir0</command>
-+        <command>-fs NAMENODE -mv TEST_DIR_ABSOLUTE/file1 TEST_DIR_ABSOLUTE/dir0</command>
-+        <command>-fs NAMENODE -lsr TEST_DIR_ABSOLUTE/dir0</command>        
-+      </test-commands>
-+      <cleanup-commands>
-+        <command>-fs NAMENODE -rmr TEST_DIR_ABSOLUTE/dir0</command>
-+      </cleanup-commands>
-+      <comparators>
-+        <comparator>
-+          <type>RegexpComparator</type>
-+          <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/tmp/testcli/dir0/file1</expected-output>
-+        </comparator>
-+      </comparators>
-+    </test>
-+    
-+    <test> <!-- TESTED -->
-+      <description>mv: file (absolute path) to directory (absolute path); keep the same name at the destination [ TIED to previous test ]</description>
-+      <test-commands>
-+        <command>-fs NAMENODE -ls TEST_DIR_ABSOLUTE/file1</command>        
-+      </test-commands>
-+      <cleanup-commands>
-+      </cleanup-commands>
-+      <comparators>
-+        <comparator>
-+          <type>TokenComparator</type>
-+          <expected-output>ls: Cannot access /tmp/testcli/file1: No such file or directory.</expected-output>
-+        </comparator>
-+      </comparators>
-+    </test>
-+    
-+    <test> <!-- TESTED -->
-+      <description>mv: file (absolute path) to directory (absolute path); change the name at the destination</description>
-+      <test-commands>
-+        <command>-fs NAMENODE -touchz TEST_DIR_ABSOLUTE/file1</command>
-+        <command>-fs NAMENODE -mkdir TEST_DIR_ABSOLUTE/dir0</command>
-+        <command>-fs NAMENODE -mv TEST_DIR_ABSOLUTE/file1 TEST_DIR_ABSOLUTE/dir0/file2</command>
-+        <command>-fs NAMENODE -ls TEST_DIR_ABSOLUTE/dir0</command>        
-+      </test-commands>
-+      <cleanup-commands>
-+        <command>-fs NAMENODE -rmr TEST_DIR_ABSOLUTE/dir0</command>
-+      </cleanup-commands>
-+      <comparators>
-+        <comparator>
-+          <type>RegexpComparator</type>
-+          <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/tmp/testcli/dir0/file2</expected-output>
-+        </comparator>
-+      </comparators>
-+    </test>
-+    
-+    <test> <!-- TESTED -->
-+      <description>mv: file (absolute path) to directory (absolute path); change the name at the destination [ TIED to previous test ]</description>
-+      <test-commands>
-+        <command>-fs NAMENODE -ls TEST_DIR_ABSOLUTE/file1</command>        
-+      </test-commands>
-+      <cleanup-commands>
-+      </cleanup-commands>
-+      <comparators>
-+        <comparator>
-+          <type>TokenComparator</type>
-+          <expected-output>ls: Cannot access /tmp/testcli/file1: No such file or directory.</expected-output>
-+        </comparator>
-+      </comparators>
-+    </test>
-+    
-+    <test> <!-- TESTED -->
-+      <description>mv: files (absolute path) to directory (absolute path) using globbing</description>
-+      <test-commands>
-+        <command>-fs NAMENODE -touchz TEST_DIR_ABSOLUTE/file1</command>
-+        <command>-fs NAMENODE -touchz TEST_DIR_ABSOLUTE/file2</command>
-+        <command>-fs NAMENODE -touchz TEST_DIR_ABSOLUTE/file3</command>
-+        <command>-fs NAMENODE -touchz TEST_DIR_ABSOLUTE/file4</command>
-+        <command>-fs NAMENODE -mkdir TEST_DIR_ABSOLUTE/dir0</command>
-+        <command>-fs NAMENODE -mv TEST_DIR_ABSOLUTE/file* TEST_DIR_ABSOLUTE/dir0</command>
-+        <command>-fs NAMENODE -lsr TEST_DIR_ABSOLUTE/*</command>        
-+      </test-commands>
-+      <cleanup-commands>
-+        <command>-fs NAMENODE -rmr TEST_DIR_ABSOLUTE/dir0 TEST_DIR_ABSOLUTE/file*</command>
-+      </cleanup-commands>
-+      <comparators>
-+        <comparator>
-+          <type>RegexpComparator</type>
-+          <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/tmp/testcli/dir0/file1</expected-output>
-+        </comparator>
-+        <comparator>
-+          <type>RegexpComparator</type>
-+          <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/tmp/testcli/dir0/file2</expected-output>
-+        </comparator>
-+        <comparator>
-+          <type>RegexpComparator</type>
-+          <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/tmp/testcli/dir0/file3</expected-output>
-+        </comparator>
-+        <comparator>
-+          <type>RegexpComparator</type>
-+          <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/tmp/testcli/dir0/file4</expected-output>
-+        </comparator>
-+      </comparators>
-+    </test>
-+    
-+    <test> <!-- TESTED -->
-+      <description>mv: files (absolute path) to directory (absolute path) using globbing [ TIED to previous test ]</description>
-+      <test-commands>
-+        <command>-fs NAMENODE -ls TEST_DIR_ABSOLUTE/file*</command>        
-+      </test-commands>
-+      <cleanup-commands>
-+      </cleanup-commands>
-+      <comparators>
-+        <comparator>
-+          <type>TokenComparator</type>
-+          <expected-output>ls: Cannot access /tmp/testcli/file*: No such file or directory.</expected-output>
-+        </comparator>
-+      </comparators>
-+    </test>
-+    
-+    <test> <!-- TESTED -->
-+      <description>mv: file (relative) to file (relative)</description>
-+      <test-commands>
-+        <command>-fs NAMENODE -touchz file1</command>
-+        <command>-fs NAMENODE -mv file1 file2</command>
-+        <command>-fs NAMENODE -ls file*</command>        
-+      </test-commands>
-+      <cleanup-commands>
-+        <command>-fs NAMENODE -rm file*</command>
-+      </cleanup-commands>
-+      <comparators>
-+        <comparator>
-+          <type>TokenComparator</type>
-+          <expected-output>Found 1 items</expected-output>
-+        </comparator>
-+        <comparator>
-+          <type>RegexpComparator</type>
-+          <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/user/[a-z]*/file2</expected-output>
-+        </comparator>
-+        <comparator>
-+          <type>RegexpComparator</type>
-+          <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/user/[a-z]*/file[^1]</expected-output>
-+        </comparator>
-+      </comparators>
-+    </test>
-+    
-+    <!-- Tests for cp-->
-+    <test> <!-- TESTED -->
-+      <description>cp: file (absolute path) to file (absolute path)</description>
-+      <test-commands>
-+        <command>-fs NAMENODE -touchz TEST_DIR_ABSOLUTE/file1</command>
-+        <command>-fs NAMENODE -cp TEST_DIR_ABSOLUTE/file1 TEST_DIR_ABSOLUTE/file2</command>
-+        <command>-fs NAMENODE -ls TEST_DIR_ABSOLUTE/file*</command>        
-+      </test-commands>
-+      <cleanup-commands>
-+        <command>-fs NAMENODE -rm TEST_DIR_ABSOLUTE/file*</command>
-+      </cleanup-commands>:
-+      <comparators>
-+        <comparator>
-+          <type>RegexpComparator</type>
-+          <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/tmp/testcli/file1</expected-output>
-+        </comparator>
-+        <comparator>
-+          <type>RegexpComparator</type>
-+          <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/tmp/testcli/file2</expected-output>
-+        </comparator>
-+      </comparators>
-+    </test>
-+    
-+    <test> <!-- TESTED -->
-+      <description>cp: file (absolute path) to file (relative path)</description>
-+      <test-commands>
-+        <command>-fs NAMENODE -touchz TEST_DIR_ABSOLUTE/file1</command>
-+        <command>-fs NAMENODE -cp TEST_DIR_ABSOLUTE/file1 file2</command>
-+        <command>-fs NAMENODE -ls TEST_DIR_ABSOLUTE/file1 file2</command>
-+      </test-commands>
-+      <cleanup-commands>
-+        <command>-fs NAMENODE -rmr TEST_DIR_ABSOLUTE/file1 file2</command>
-+      </cleanup-commands>
-+      <comparators>
-+        <comparator>
-+          <type>RegexpComparator</type>
-+          <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/tmp/testcli/file1</expected-output>
-+        </comparator>
-+        <comparator>
-+          <type>RegexpComparator</type>
-+          <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/user/[a-z]*/file2</expected-output>
-+        </comparator>
-+      </comparators>
-+    </test>
-+    
-+    <test> <!-- TESTED -->
-+      <description>cp: file (relative path) to file (absolute path)</description>
-+      <test-commands>
-+        <command>-fs NAMENODE -touchz file1</command>
-+        <command>-fs NAMENODE -cp file1 TEST_DIR_ABSOLUTE/file2</command>
-+        <command>-fs NAMENODE -ls file1 TEST_DIR_ABSOLUTE/file2</command>
-+      </test-commands>
-+      <cleanup-commands>
-+        <command>-fs NAMENODE -rmr file1 TEST_DIR_ABSOLUTE/file2</command>
-+      </cleanup-commands>
-+      <comparators>
-+        <comparator>
-+          <type>RegexpComparator</type>
-+          <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/user/[a-z]*/file1</expected-output>
-+        </comparator>
-+        <comparator>
-+          <type>RegexpComparator</type>
-+          <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/tmp/testcli/file2</expected-output>
-+        </comparator>
-+      </comparators>
-+    </test>
-+    
-+    <test> <!-- TESTED -->
-+      <description>cp: file (relative path) to file (relative path)</description>
-+      <test-commands>
-+        <command>-fs NAMENODE -touchz file1</command>
-+        <command>-fs NAMENODE -cp file1 file2</command>
-+        <command>-fs NAMENODE -ls file1 file2</command>
-+      </test-commands>
-+      <cleanup-commands>
-+        <command>-fs NAMENODE -rmr file1 file2</command>
-+      </cleanup-commands>
-+      <comparators>
-+        <comparator>
-+          <type>RegexpComparator</type>
-+          <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/user/[a-z]*/file1</expected-output>
-+        </comparator>
-+        <comparator>
-+          <type>RegexpComparator</type>
-+          <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/user/[a-z]*/file2</expected-output>
-+        </comparator>
-+      </comparators>
-+    </test>
-+    
-+    <test> <!-- TESTED -->
-+      <description>cp: file (absolute path) to directory (absolute path); keep the same name at the destination</description>
-+      <test-commands>
-+        <command>-fs NAMENODE -touchz TEST_DIR_ABSOLUTE/file1</command>
-+        <command>-fs NAMENODE -mkdir TEST_DIR_ABSOLUTE/dir0</command>
-+        <command>-fs NAMENODE -cp TEST_DIR_ABSOLUTE/file1 TEST_DIR_ABSOLUTE/dir0</command>
-+        <command>-fs NAMENODE -ls TEST_DIR_ABSOLUTE/file1 TEST_DIR_ABSOLUTE/dir0</command>        
-+      </test-commands>
-+      <cleanup-commands>
-+        <command>-fs NAMENODE -rmr TEST_DIR_ABSOLUTE/dir0</command>
-+      </cleanup-commands>
-+      <comparators>
-+        <comparator>
-+          <type>RegexpComparator</type>
-+          <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/tmp/testcli/file1</expected-output>
-+        </comparator>
-+        <comparator>
-+          <type>RegexpComparator</type>
-+          <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/tmp/testcli/dir0/file1</expected-output>
-+        </comparator>
-+      </comparators>
-+    </test>
-+    
-+    <test> <!-- TESTED -->
-+      <description>cp: file (absolute path) to directory (absolute path); change the name at the destination</description>
-+      <test-commands>
-+        <command>-fs NAMENODE -touchz TEST_DIR_ABSOLUTE/file1</command>
-+        <command>-fs NAMENODE -mkdir TEST_DIR_ABSOLUTE/dir0</command>
-+        <command>-fs NAMENODE -cp TEST_DIR_ABSOLUTE/file1 TEST_DIR_ABSOLUTE/dir0/file2</command>
-+        <command>-fs NAMENODE -ls TEST_DIR_ABSOLUTE/file1 TEST_DIR_ABSOLUTE/dir0</command>        
-+      </test-commands>
-+      <cleanup-commands>
-+        <command>-fs NAMENODE -rmr TEST_DIR_ABSOLUTE/dir0</command>
-+      </cleanup-commands>
-+      <comparators>
-+        <comparator>
-+          <type>RegexpComparator</type>
-+          <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/tmp/testcli/file1</expected-output>
-+        </comparator>
-+        <comparator>
-+          <type>RegexpComparator</type>
-+          <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/tmp/testcli/dir0/file2</expected-output>
-+        </comparator>
-+      </comparators>
-+    </test>
-+    
-+    <test> <!-- TESTED -->
-+      <description>cp: files to directory (absolute path) using globbing</description>
-+      <test-commands>
-+        <command>-fs NAMENODE -touchz TEST_DIR_ABSOLUTE/file1</command>
-+        <command>-fs NAMENODE -touchz TEST_DIR_ABSOLUTE/file2</command>
-+        <command>-fs NAMENODE -touchz TEST_DIR_ABSOLUTE/file3</command>
-+        <command>-fs NAMENODE -touchz TEST_DIR_ABSOLUTE/file4</command>
-+        <command>-fs NAMENODE -mkdir TEST_DIR_ABSOLUTE/dir0</command>
-+        <command>-fs NAMENODE -cp TEST_DIR_ABSOLUTE/file* TEST_DIR_ABSOLUTE/dir0</command>
-+        <command>-fs NAMENODE -lsr TEST_DIR_ABSOLUTE/*</command>        
-+      </test-commands>
-+      <cleanup-commands>
-+        <command>-fs NAMENODE -rmr TEST_DIR_ABSOLUTE/dir0</command>
-+      </cleanup-commands>
-+      <comparators>
-+        <comparator>
-+          <type>RegexpComparator</type>
-+          <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/tmp/testcli/file1</expected-output>
-+        </comparator>
-+        <comparator>
-+          <type>RegexpComparator</type>
-+          <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/tmp/testcli/file2</expected-output>
-+        </comparator>
-+        <comparator>
-+          <type>RegexpComparator</type>
-+          <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/tmp/testcli/file3</expected-output>
-+        </comparator>
-+        <comparator>
-+          <type>RegexpComparator</type>
-+          <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/tmp/testcli/file4</expected-output>
-+        </comparator>
-+        <comparator>
-+          <type>RegexpComparator</type>
-+          <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/tmp/testcli/dir0/file1</expected-output>
-+        </comparator>
-+        <comparator>
-+          <type>RegexpComparator</type>
-+          <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/tmp/testcli/dir0/file2</expected-output>
-+        </comparator>
-+        <comparator>
-+          <type>RegexpComparator</type>
-+          <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/tmp/testcli/dir0/file3</expected-output>
-+        </comparator>
-+        <comparator>
-+          <type>RegexpComparator</type>
-+          <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/tmp/testcli/dir0/file4</expected-output>
-+        </comparator>
-+      </comparators>
-+    </test>
-+    
-+    <test> <!-- TESTED -->
-+      <description>cp: files to directory (absolute path) without globbing</description>
-+      <test-commands>
-+        <command>-fs NAMENODE -touchz TEST_DIR_ABSOLUTE/file1</command>
-+        <command>-fs NAMENODE -touchz TEST_DIR_ABSOLUTE/file2</command>
-+        <command>-fs NAMENODE -touchz TEST_DIR_ABSOLUTE/file3</command>
-+        <command>-fs NAMENODE -touchz TEST_DIR_ABSOLUTE/file4</command>
-+        <command>-fs NAMENODE -mkdir TEST_DIR_ABSOLUTE/dir0</command>
-+        <command>-fs NAMENODE -cp TEST_DIR_ABSOLUTE/file1 TEST_DIR_ABSOLUTE/file2 TEST_DIR_ABSOLUTE/file3 TEST_DIR_ABSOLUTE/file4 TEST_DIR_ABSOLUTE/dir0</command>
-+        <command>-fs NAMENODE -lsr TEST_DIR_ABSOLUTE/*</command>
-+      </test-commands>
-+      <cleanup-commands>
-+        <command>-fs NAMENODE -rmr TEST_DIR_ABSOLUTE/dir0</command>
-+      </cleanup-commands>
-+      <comparators>
-+        <comparator>
-+          <type>RegexpComparator</type>
-+          <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/tmp/testcli/file1</expected-output>
-+        </comparator>
-+        <comparator>
-+          <type>RegexpComparator</type>
-+          <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/tmp/testcli/file2</expected-output>
-+        </comparator>
-+        <comparator>
-+          <type>RegexpComparator</type>
-+          <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/tmp/testcli/file3</expected-output>
-+        </comparator>
-+        <comparator>
-+          <type>RegexpComparator</type>
-+          <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/tmp/testcli/file4</expected-output>
-+        </comparator>
-+        <comparator>
-+          <type>RegexpComparator</type>
-+          <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/tmp/testcli/dir0/file1</expected-output>
-+        </comparator>
-+        <comparator>
-+          <type>RegexpComparator</type>
-+          <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/tmp/testcli/dir0/file2</expected-output>
-+        </comparator>
-+        <comparator>
-+          <type>RegexpComparator</type>
-+          <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/tmp/testcli/dir0/file3</expected-output>
-+        </comparator>
-+        <comparator>
-+          <type>RegexpComparator</type>
-+          <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/tmp/testcli/dir0/file4</expected-output>
-+        </comparator>
-+      </comparators>
-+    </test>
-+    
-+    <test> <!-- TESTED -->
-+      <description>cp: copying non existent file (absolute path)</description>
-+      <test-commands>
-+        <command>-fs NAMENODE -cp TEST_DIR_ABSOLUTE/file TEST_DIR_ABSOLUTE/file1</command>
-+      </test-commands>
-+      <cleanup-commands>
-+      </cleanup-commands>
-+      <comparators>
-+        <comparator>
-+          <type>RegexpComparator</type>
-+          <expected-output>^cp: File does not exist: /tmp/testcli/file</expected-output>
-+        </comparator>
-+      </comparators>
-+    </test>
-+    
-+    <test> <!-- TESTED -->
-+      <description>cp: copying non existent file (relative path)</description>
-+      <test-commands>
-+        <command>-fs NAMENODE -cp file1 file2</command>
-+      </test-commands>
-+      <cleanup-commands>
-+      </cleanup-commands>
-+      <comparators>
-+        <comparator>
-+          <type>RegexpComparator</type>
-+          <expected-output>^cp: File does not exist: file1</expected-output>
-+        </comparator>
-+      </comparators>
-+    </test>
-+    
-+    <test> <!-- TESTED -->
-+      <description>cp: files to an existent file using globbing</description>
-+      <test-commands>
-+        <command>-fs NAMENODE -touchz TEST_DIR_ABSOLUTE/file1</command>
-+        <command>-fs NAMENODE -touchz TEST_DIR_ABSOLUTE/file2</command>
-+        <command>-fs NAMENODE -touchz TEST_DIR_ABSOLUTE/file3</command>
-+        <command>-fs NAMENODE -touchz TEST_DIR_ABSOLUTE/file4</command>
-+        <command>-fs NAMENODE -touchz TEST_DIR_ABSOLUTE/file5</command>
-+        <command>-fs NAMENODE -cp TEST_DIR_ABSOLUTE/file* TEST_DIR_ABSOLUTE/file5</command>
-+      </test-commands>
-+      <cleanup-commands>
-+        <command>-fs NAMENODE -rmr TEST_DIR_ABSOLUTE/file*</command>
-+      </cleanup-commands>
-+      <comparators>
-+        <comparator>
-+          <type>RegexpComparator</type>
-+          <expected-output>^cp: When copying multiple files, destination should be a directory.</expected-output>
-+        </comparator>
-+      </comparators>
-+    </test>
-+    
-+    <test> <!-- TESTED -->
-+      <description>cp: files to an existent file without globbing</description>
-+      <test-commands>
-+        <command>-fs NAMENODE -touchz TEST_DIR_ABSOLUTE/file1</command>
-+        <command>-fs NAMENODE -touchz TEST_DIR_ABSOLUTE/file2</command>
-+        <command>-fs NAMENODE -touchz TEST_DIR_ABSOLUTE/file3</command>
-+        <command>-fs NAMENODE -touchz TEST_DIR_ABSOLUTE/file4</command>
-+        <command>-fs NAMENODE -touchz TEST_DIR_ABSOLUTE/file5</command>
-+        <command>-fs NAMENODE -cp TEST_DIR_ABSOLUTE/file1 TEST_DIR_ABSOLUTE/file2 TEST_DIR_ABSOLUTE/file3 TEST_DIR_ABSOLUTE/file4 TEST_DIR_ABSOLUTE/file5</command>
-+      </test-commands>
-+      <cleanup-commands>
-+        <command>-fs NAMENODE -rmr TEST_DIR_ABSOLUTE/file*</command>
-+      </cleanup-commands>
-+      <comparators>
-+        <comparator>
-+          <type>RegexpComparator</type>
-+          <expected-output>^cp: When copying multiple files, destination /tmp/testcli/file5 should be a directory.</expected-output>
-+        </comparator>
-+      </comparators>
-+    </test>
-+    
-+    <test> <!-- TESTED -->
-+      <description>cp: files to a non existent directory using globbing</description>
-+      <test-commands>
-+        <command>-fs NAMENODE -touchz TEST_DIR_ABSOLUTE/file1</command>
-+        <command>-fs NAMENODE -touchz TEST_DIR_ABSOLUTE/file2</command>
-+        <command>-fs NAMENODE -touchz TEST_DIR_ABSOLUTE/file3</command>
-+        <command>-fs NAMENODE -touchz TEST_DIR_ABSOLUTE/file4</command>
-+        <command>-fs NAMENODE -cp TEST_DIR_ABSOLUTE/file* dir</command>
-+      </test-commands>
-+      <cleanup-commands>
-+        <command>-fs NAMENODE -rmr TEST_DIR_ABSOLUTE/file*</command>
-+      </cleanup-commands>
-+      <comparators>
-+        <comparator>
-+          <type>RegexpComparator</type>
-+          <expected-output>^cp: When copying multiple files, destination should be a directory.</expected-output>
-+        </comparator>
-+      </comparators>
-+    </test>
-+    
-+    <test> <!-- TESTED -->
-+      <description>cp: files to a non existent directory without globbing</description>
-+      <test-commands>
-+        <command>-fs NAMENODE -touchz TEST_DIR_ABSOLUTE/file1</command>
-+        <command>-fs NAMENODE -touchz TEST_DIR_ABSOLUTE/file2</command>
-+        <command>-fs NAMENODE -touchz TEST_DIR_ABSOLUTE/file3</command>
-+        <command>-fs NAMENODE -touchz TEST_DIR_ABSOLUTE/file4</command>
-+        <command>-fs NAMENODE -cp TEST_DIR_ABSOLUTE/file1 TEST_DIR_ABSOLUTE/file2 TEST_DIR_ABSOLUTE/file3 TEST_DIR_ABSOLUTE/file4 dir</command>
-+      </test-commands>
-+      <cleanup-commands>
-+        <command>-fs NAMENODE -rmr TEST_DIR_ABSOLUTE/file*</command>
-+      </cleanup-commands>
-+      <comparators>
-+        <comparator>
-+          <type>RegexpComparator</type>
-+          <expected-output>^cp: When copying multiple files, destination dir should be a directory.</expected-output>
-+        </comparator>
-+      </comparators>
-+    </test>
-+    
-+    <!-- Tests for rm -->
-+    <test> <!-- TESTED -->
-+      <description>rm: removing a file (absolute path) </description>
-+      <test-commands>
-+        <command>-fs NAMENODE -touchz TEST_DIR_ABSOLUTE/dir0/file0</command>
-+        <command>-fs NAMENODE -rm TEST_DIR_ABSOLUTE/dir0/file0</command>
-+      </test-commands>
-+      <cleanup-commands>
-+        <command>-fs NAMENODE -rm TEST_DIR_ABSOLUTE/dir0</command>
-+      </cleanup-commands>
-+      <comparators>
-+        <comparator>
-+          <type>RegexpComparator</type>
-+          <expected-output>^Deleted hdfs://\w+[.a-z]*:[0-9]*/tmp/testcli/dir0/file0</expected-output>
-+        </comparator>
-+      </comparators>
-+    </test>
-+    
-+    <test> <!-- TESTED -->
-+      <description>rm: removing a file (relative path) </description>
-+      <test-commands>
-+        <command>-fs NAMENODE -touchz file0</command>
-+        <command>-fs NAMENODE -rm file0</command>
-+      </test-commands>
-+      <cleanup-commands>
-+        <command>-fs NAMENODE -rm file0</command>
-+      </cleanup-commands>
-+      <comparators>
-+        <comparator>
-+          <type>RegexpComparator</type>
-+          <expected-output>^Deleted hdfs://\w+[.a-z]*:[0-9]*/user/[a-z]*/file0</expected-output>
-+        </comparator>
-+      </comparators>
-+    </test>
-+    
-+    <test> <!-- TESTED -->
-+      <description>rm: removing files by globbing (absolute path) </description>
-+      <test-commands>
-+        <command>-fs NAMENODE -touchz TEST_DIR_ABSOLUTE/dir0/file0</command>
-+        <command>-fs NAMENODE -touchz TEST_DIR_ABSOLUTE/dir0/file1</command>
-+        <command>-fs NAMENODE -touchz TEST_DIR_ABSOLUTE/dir0/file2</command>
-+        <command>-fs NAMENODE -touchz TEST_DIR_ABSOLUTE/dir0/file3</command>
-+        <command>-fs NAMENODE -rm TEST_DIR_ABSOLUTE/dir0/file*</command>
-+      </test-commands>
-+      <cleanup-commands>
-+        <command>-fs NAMENODE -rm TEST_DIR_ABSOLUTE/dir0</command>
-+      </cleanup-commands>
-+      <comparators>
-+        <comparator>
-+          <type>RegexpComparator</type>
-+          <expected-output>^Deleted hdfs://\w+[.a-z]*:[0-9]*/tmp/testcli/dir0/file0</expected-output>
-+        </comparator>
-+        <comparator>
-+          <type>RegexpComparator</type>
-+          <expected-output>^Deleted hdfs://\w+[.a-z]*:[0-9]*/tmp/testcli/dir0/file1</expected-output>
-+        </comparator>
-+        <comparator>
-+          <type>RegexpComparator</type>
-+          <expected-output>^Deleted hdfs://\w+[.a-z]*:[0-9]*/tmp/testcli/dir0/file2</expected-output>
-+        </comparator>
-+        <comparator>
-+          <type>RegexpComparator</type>
-+          <expected-output>^Deleted hdfs://\w+[.a-z]*:[0-9]*/tmp/testcli/dir0/file3</expected-output>
-+        </comparator>
-+      </comparators>
-+    </test>
-+    
-+    <test> <!-- TESTED -->
-+      <description>rm: removing files by globbing (relative path) </description>
-+      <test-commands>
-+        <command>-fs NAMENODE -touchz file0</command>
-+        <command>-fs NAMENODE -touchz file1</command>
-+        <command>-fs NAMENODE -touchz file2</command>
-+        <command>-fs NAMENODE -touchz file3</command>
-+        <command>-fs NAMENODE -rm file*</command>
-+      </test-commands>
-+      <cleanup-commands>
-+        <command>-fs NAMENODE -rm file0</command>
-+      </cleanup-commands>
-+      <comparators>
-+        <comparator>
-+          <type>RegexpComparator</type>
-+          <expected-output>^Deleted hdfs://\w+[.a-z]*:[0-9]*/user/[a-z]*/file0</expected-output>
-+        </comparator>
-+        <comparator>
-+          <type>RegexpComparator</type>
-+          <expected-output>^Deleted hdfs://\w+[.a-z]*:[0-9]*/user/[a-z]*/file1</expected-output>
-+        </comparator>
-+        <comparator>
-+          <type>RegexpComparator</type>
-+          <expected-output>^Deleted hdfs://\w+[.a-z]*:[0-9]*/user/[a-z]*/file2</expected-output>
-+        </comparator>
-+        <comparator>
-+          <type>RegexpComparator</type>
-+          <expected-output>^Deleted hdfs://\w+[.a-z]*:[0-9]*/user/[a-z]*/file3</expected-output>
-+        </comparator>

[... 1826 lines stripped ...]