HDFS-3098. Update and add tests for HADOOP-8173. Contributed by Daryn Sharp

git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/trunk@1301295 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Tsz-wo Sze 2012-03-16 00:27:40 +00:00
parent 7e5b60116e
commit 9b2a324ba5
2 changed files with 48 additions and 1 deletions

View File

@ -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

View File

@ -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>
@ -904,6 +904,51 @@
<command>-fs NAMENODE -rm -r /dir0</command>
</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>