From 9b2a324ba50283ecfbfd5656fb8ce8cb82cd80c5 Mon Sep 17 00:00:00 2001 From: Tsz-wo Sze Date: Fri, 16 Mar 2012 00:27:40 +0000 Subject: [PATCH] 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 --- hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt | 2 + .../src/test/resources/testHDFSConf.xml | 47 ++++++++++++++++++- 2 files changed, 48 insertions(+), 1 deletion(-) diff --git a/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt b/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt index 37176a76bfb..22b8e570c4f 100644 --- a/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt +++ b/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt @@ -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 diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/test/resources/testHDFSConf.xml b/hadoop-hdfs-project/hadoop-hdfs/src/test/resources/testHDFSConf.xml index 1fce1817a10..ad26ae0c3ba 100644 --- a/hadoop-hdfs-project/hadoop-hdfs/src/test/resources/testHDFSConf.xml +++ b/hadoop-hdfs-project/hadoop-hdfs/src/test/resources/testHDFSConf.xml @@ -893,7 +893,7 @@ - ls: Test for /*/* globbing + ls: Negative test for quoted /*/* globbing -fs NAMENODE -mkdir /dir0 -fs NAMENODE -mkdir /dir0/dir1 @@ -904,6 +904,51 @@ -fs NAMENODE -rm -r /dir0 + + TokenComparator + ls: `/*/*': No such file or directory + + + + + + ls: Test for quoted globbing + + -fs NAMENODE -mkdir /dir0 + -fs NAMENODE -mkdir /dir0/\* + -fs NAMENODE -touchz /dir0/\*/file + -fs NAMENODE -touchz /dir0/dir1/file1 + -fs NAMENODE -ls -R /dir0/\* + + + -fs NAMENODE -rm -r /dir0 + + + + RegexpComparator + ^-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 + + + + + + rm: Test for quoted globbing + + -fs NAMENODE -mkdir /dir0 + -fs NAMENODE -mkdir /dir0/\* + -fs NAMENODE -touchz /dir0/\*/file + -fs NAMENODE -touchz /dir0/dir1/file1 + -fs NAMENODE -rm -r /dir0/\* + -fs NAMENODE -ls -R /dir0 + + + -fs NAMENODE -rm -r /dir0 + + + + RegexpComparator + ^drwxr-xr-x( )*-( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1 + RegexpComparator ^-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