Author: szetszwo
Date: Fri Mar 16 00:27:40 2012
New Revision: 1301295

URL: http://svn.apache.org/viewvc?rev=1301295&view=rev
Log:
HDFS-3098. Update and add tests for HADOOP-8173. Contributed by Daryn Sharp

Modified:
    hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
    
hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/test/resources/testHDFSConf.xml

Modified: hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
URL: 
http://svn.apache.org/viewvc/hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt?rev=1301295&r1=1301294&r2=1301295&view=diff
==============================================================================
--- hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt (original)
+++ hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt Fri Mar 16 
00:27:40 2012
@@ -652,6 +652,8 @@ Release 0.23.2 - UNRELEASED 
 
     HDFS-2985. Improve logging when replicas are marked as corrupt. (todd)
 
+    HDFS-3098. Update and add tests for HADOOP-8173. (Daryn Sharp via szetszwo)
+
   OPTIMIZATIONS
 
   BUG FIXES

Modified: 
hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/test/resources/testHDFSConf.xml
URL: 
http://svn.apache.org/viewvc/hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/test/resources/testHDFSConf.xml?rev=1301295&r1=1301294&r2=1301295&view=diff
==============================================================================
--- 
hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/test/resources/testHDFSConf.xml
 (original)
+++ 
hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/test/resources/testHDFSConf.xml
 Fri Mar 16 00:27:40 2012
@@ -893,7 +893,7 @@
     </test>
 
     <test> <!-- TESTED -->
-      <description>ls: Test for /*/* globbing </description>
+      <description>ls: Negative test for quoted /*/* globbing </description>
       <test-commands>
         <command>-fs NAMENODE -mkdir /dir0</command>
         <command>-fs NAMENODE -mkdir /dir0/dir1</command>
@@ -905,6 +905,51 @@
       </cleanup-commands>
       <comparators>
         <comparator>
+          <type>TokenComparator</type>
+          <expected-output>ls: `/*/*': No such file or 
directory</expected-output>
+        </comparator>
+      </comparators>
+    </test>
+
+    <test> <!-- TESTED -->
+      <description>ls: Test for quoted globbing </description>
+      <test-commands>
+        <command>-fs NAMENODE -mkdir /dir0</command>
+        <command>-fs NAMENODE -mkdir /dir0/\*</command>
+        <command>-fs NAMENODE -touchz /dir0/\*/file</command>
+        <command>-fs NAMENODE -touchz /dir0/dir1/file1</command>
+        <command>-fs NAMENODE -ls -R /dir0/\*</command>
+      </test-commands>
+      <cleanup-commands>
+        <command>-fs NAMENODE -rm -r /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,}( 
)*/dir0/\*/file</expected-output>
+        </comparator>
+      </comparators>
+    </test>
+
+    <test> <!-- TESTED -->
+      <description>rm: Test for quoted globbing </description>
+      <test-commands>
+        <command>-fs NAMENODE -mkdir /dir0</command>
+        <command>-fs NAMENODE -mkdir /dir0/\*</command>
+        <command>-fs NAMENODE -touchz /dir0/\*/file</command>
+        <command>-fs NAMENODE -touchz /dir0/dir1/file1</command>
+        <command>-fs NAMENODE -rm -r /dir0/\*</command>
+        <command>-fs NAMENODE -ls -R /dir0</command>
+      </test-commands>
+      <cleanup-commands>
+        <command>-fs NAMENODE -rm -r /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,}( 
)*/dir0/dir1</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,}( 
)*/dir0/dir1/file1</expected-output>
         </comparator>


Reply via email to