12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082 |
- <?xml version="1.0" encoding="UTF-8"?>
- <?xml-stylesheet type="text/xsl" href="testConf.xsl"?>
- <!--
- 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.
- -->
- <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 help -->
- <test> <!-- TESTED -->
- <description>help: check if fs help message is shown</description>
- <test-commands>
- <command>-help</command>
- </test-commands>
- <cleanup-commands>
- </cleanup-commands>
- <comparators>
- <comparator>
- <type>SubstringComparator</type>
- <expected-output>Usage: hadoop fs [generic options]</expected-output>
- </comparator>
- </comparators>
- </test>
- <test> <!-- TESTED -->
- <description>help: help for ls</description>
- <test-commands>
- <command>-help ls</command>
- </test-commands>
- <cleanup-commands>
- </cleanup-commands>
- <comparators>
- <comparator>
- <type>RegexpComparator</type>
- <expected-output>^-ls \[-C\] \[-d\] \[-h\] \[-R\] \[-t\] \[-S\] \[-r\] \[-u\] \[<path> \.\.\.\] :( |\t)*</expected-output>
- </comparator>
- <comparator>
- <type>RegexpComparator</type>
- <expected-output>^\s*List the contents that match the specified file pattern. If path is not</expected-output>
- </comparator>
- <comparator>
- <type>RegexpComparator</type>
- <expected-output>^\s*specified, the contents of /user/<currentUser> will be listed. For a directory a( )*</expected-output>
- </comparator>
- <comparator>
- <type>RegexpComparator</type>
- <expected-output>^( |\t)*list of its direct children is returned \(unless -d option is specified\).*</expected-output>
- </comparator>
- <comparator>
- <type>RegexpComparator</type>
- <expected-output>^( |\t)*Directory entries are of the form:( )*</expected-output>
- </comparator>
- <comparator>
- <type>RegexpComparator</type>
- <expected-output>^\s*permissions - userId groupId sizeOfDirectory\(in bytes\)( )*</expected-output>
- </comparator>
- <comparator>
- <type>RegexpComparator</type>
- <expected-output>^\s*modificationDate\(yyyy-MM-dd HH:mm\) directoryName( )*</expected-output>
- </comparator>
- <comparator>
- <type>RegexpComparator</type>
- <expected-output>^\s*and file entries are of the form:( )*</expected-output>
- </comparator>
- <comparator>
- <type>RegexpComparator</type>
- <expected-output>^\s*permissions numberOfReplicas userId groupId sizeOfFile\(in bytes\)( )*</expected-output>
- </comparator>
- <comparator>
- <type>RegexpComparator</type>
- <expected-output>^\s*modificationDate\(yyyy-MM-dd HH:mm\) fileName( )*</expected-output>
- </comparator>
- <comparator>
- <type>RegexpComparator</type>
- <expected-output>^\s*-C\s+Display the paths of files and directories only\.( )*</expected-output>
- </comparator>
- <comparator>
- <type>RegexpComparator</type>
- <expected-output>^\s*-d\s+Directories are listed as plain files\.( )*</expected-output>
- </comparator>
- <comparator>
- <type>RegexpComparator</type>
- <expected-output>^\s*-h\s+Formats the sizes of files in a human-readable fashion( )*</expected-output>
- </comparator>
- <comparator>
- <type>RegexpComparator</type>
- <expected-output>^\s*rather than a number of bytes\.( )*</expected-output>
- </comparator>
- <comparator>
- <type>RegexpComparator</type>
- <expected-output>^\s*-R\s+Recursively list the contents of directories\.( )*</expected-output>
- </comparator>
- <comparator>
- <type>RegexpComparator</type>
- <expected-output>^( |\t)*-t\s+Sort files by modification time \(most recent first\)\.</expected-output>
- </comparator>
- <comparator>
- <type>RegexpComparator</type>
- <expected-output>^( |\t)*-S\s+Sort files by size\.</expected-output>
- </comparator>
- <comparator>
- <type>RegexpComparator</type>
- <expected-output>^( |\t)*-r\s+Reverse the order of the sort\.</expected-output>
- </comparator>
- <comparator>
- <type>RegexpComparator</type>
- <expected-output>^( |\t)*-u\s+Use time of last access instead of modification for</expected-output>
- </comparator>
- <comparator>
- <type>RegexpComparator</type>
- <expected-output>^( |\t)*display and sorting\.</expected-output>
- </comparator>
- </comparators>
- </test>
- <test> <!-- TESTED -->
- <description>help: help for lsr</description>
- <test-commands>
- <command>-help lsr</command>
- </test-commands>
- <cleanup-commands>
- </cleanup-commands>
- <comparators>
- <comparator>
- <type>RegexpComparator</type>
- <expected-output>^-lsr :\s*</expected-output>
- </comparator>
- <comparator>
- <type>RegexpComparator</type>
- <expected-output>^\s+\(DEPRECATED\) Same as 'ls -R'</expected-output>
- </comparator>
- </comparators>
- </test>
- <test> <!-- TESTED -->
- <description>help: help for get</description>
- <test-commands>
- <command>-help get</command>
- </test-commands>
- <cleanup-commands>
- <!-- No cleanup -->
- </cleanup-commands>
- <comparators>
- <comparator>
- <type>RegexpComparator</type>
- <expected-output>^-get( )*\[-p\]( )*\[-ignoreCrc\]( )*\[-crc\]( )*<src> \.\.\. <localdst> :\s*</expected-output>
- </comparator>
- <comparator>
- <type>RegexpComparator</type>
- <expected-output>\s*Copy files that match the file pattern <src> to the local name. <src> is kept.\s*</expected-output>
- </comparator>
- <comparator>
- <type>RegexpComparator</type>
- <expected-output>\s*When copying multiple files, the destination must be a directory. Passing -p\s*</expected-output>
- </comparator>
- <comparator>
- <type>RegexpComparator</type>
- <expected-output>^( |\t)*preserves access and modification times, ownership and the mode.*</expected-output>
- </comparator>
- </comparators>
- </test>
- <test> <!-- TESTED -->
- <description>help: help for du</description>
- <test-commands>
- <command>-help du</command>
- </test-commands>
- <cleanup-commands>
- </cleanup-commands>
- <comparators>
- <comparator>
- <type>RegexpComparator</type>
- <expected-output>^-du \[-s\] \[-h\] <path> \.\.\. :\s*</expected-output>
- </comparator>
- <comparator>
- <type>RegexpComparator</type>
- <expected-output>^\s*Show the amount of space, in bytes, used by the files that match the specified\s*</expected-output>
- </comparator>
- <comparator>
- <type>RegexpComparator</type>
- <expected-output>^\s*file pattern. The following flags are optional:\s*</expected-output>
- </comparator>
- <comparator>
- <type>RegexpComparator</type>
- <expected-output>^\s*-s\s*Rather than showing the size of each individual file that matches the\s*</expected-output>
- </comparator>
- <comparator>
- <type>RegexpComparator</type>
- <expected-output>^\s*pattern, shows the total \(summary\) size.\s*</expected-output>
- </comparator>
- <comparator>
- <type>RegexpComparator</type>
- <expected-output>^\s*-h\s*Formats the sizes of files in a human-readable fashion rather than a number\s*</expected-output>
- </comparator>
- <comparator>
- <type>RegexpComparator</type>
- <expected-output>\s*of bytes.\s*</expected-output>
- </comparator>
- <comparator>
- <type>RegexpComparator</type>
- <expected-output>^\s*Note that, even without the -s option, this only shows size summaries one level\s*</expected-output>
- </comparator>
- <comparator>
- <type>RegexpComparator</type>
- <expected-output>^\s*deep into a directory.</expected-output>
- </comparator>
- <comparator>
- <type>RegexpComparator</type>
- <expected-output>^\s*The output is in the form </expected-output>
- </comparator>
- <comparator>
- <type>RegexpComparator</type>
- <expected-output>^\s*size\s+name\(full path\)\s*</expected-output>
- </comparator>
- </comparators>
- </test>
- <test> <!-- TESTED -->
- <description>help: help for dus</description>
- <test-commands>
- <command>-help dus</command>
- </test-commands>
- <cleanup-commands>
- </cleanup-commands>
- <comparators>
- <comparator>
- <type>RegexpComparator</type>
- <expected-output>^-dus :</expected-output>
- </comparator>
- <comparator>
- <type>RegexpComparator</type>
- <expected-output>^\s*\(DEPRECATED\) Same as 'du -s'</expected-output>
- </comparator>
- </comparators>
- </test>
- <test> <!-- TESTED -->
- <description>help: help for count</description>
- <test-commands>
- <command>-help count</command>
- </test-commands>
- <cleanup-commands>
- </cleanup-commands>
- <comparators>
- <comparator>
- <type>RegexpComparator</type>
- <expected-output>^-count \[-q\] \[-h\] \[-v\] \[-t \[<storage type>\]\] <path> \.\.\. :( )*</expected-output>
- </comparator>
- <comparator>
- <type>RegexpComparator</type>
- <expected-output>^\s*Count the number of directories, files and bytes under the paths( )*</expected-output>
- </comparator>
- <comparator>
- <type>RegexpComparator</type>
- <expected-output>^( |\t)*that match the specified file pattern. The output columns are:( )*</expected-output>
- </comparator>
- <comparator>
- <type>RegexpComparator</type>
- <expected-output>^( |\t)*DIR_COUNT FILE_COUNT CONTENT_SIZE PATHNAME( )*</expected-output>
- </comparator>
- <comparator>
- <type>RegexpComparator</type>
- <expected-output>^( |\t)*or, with the -q option:( )*</expected-output>
- </comparator>
- <comparator>
- <type>RegexpComparator</type>
- <expected-output>^( |\t)*QUOTA REM_QUOTA SPACE_QUOTA REM_SPACE_QUOTA( )*</expected-output>
- </comparator>
- <comparator>
- <type>RegexpComparator</type>
- <expected-output>^( |\t)*DIR_COUNT FILE_COUNT CONTENT_SIZE PATHNAME( )*</expected-output>
- </comparator>
- <comparator>
- <type>RegexpComparator</type>
- <expected-output>^( |\t)*The -h option shows file sizes in human readable format.( )*</expected-output>
- </comparator>
- <comparator>
- <type>RegexpComparator</type>
- <expected-output>^( |\t)*The -v option displays a header line.( )*</expected-output>
- </comparator>
- </comparators>
- </test>
- <test> <!-- TESTED -->
- <description>help: help for mv</description>
- <test-commands>
- <command>-help mv</command>
- </test-commands>
- <cleanup-commands>
- </cleanup-commands>
- <comparators>
- <comparator>
- <type>RegexpComparator</type>
- <expected-output>^-mv <src> \.\.\. <dst> :\s*</expected-output>
- </comparator>
- <comparator>
- <type>RegexpComparator</type>
- <expected-output>\s*Move files that match the specified file pattern <src> to a destination <dst>.( )*</expected-output>
- </comparator>
- <comparator>
- <type>RegexpComparator</type>
- <expected-output>^( |\t)*When moving multiple files, the destination must be a directory.( )*</expected-output>
- </comparator>
- </comparators>
- </test>
- <test> <!-- TESTED -->
- <description>help: help for cp</description>
- <test-commands>
- <command>-help cp</command>
- </test-commands>
- <cleanup-commands>
- </cleanup-commands>
- <comparators>
- <comparator>
- <type>RegexpComparator</type>
- <expected-output>^-cp \[-f\] \[-p \| -p\[topax\]\] <src> \.\.\. <dst> :\s*</expected-output>
- </comparator>
- <comparator>
- <type>RegexpComparator</type>
- <expected-output>^\s*Copy files that match the file pattern <src> to a destination. When copying( )*</expected-output>
- </comparator>
- <comparator>
- <type>RegexpComparator</type>
- <expected-output>^( |\t)*multiple files, the destination must be a directory.( )*Passing -p preserves status( )*</expected-output>
- </comparator>
- <comparator>
- <type>RegexpComparator</type>
- <expected-output>^( |\t)*\[topax\] \(timestamps, ownership, permission, ACLs, XAttr\). If -p is specified( )*</expected-output>
- </comparator>
- <comparator>
- <type>RegexpComparator</type>
- <expected-output>^( |\t)*with no <arg>, then preserves timestamps, ownership, permission. If -pa is( )*</expected-output>
- </comparator>
- <comparator>
- <type>RegexpComparator</type>
- <expected-output>^( |\t)*specified, then preserves permission also because ACL is a super-set of( )*</expected-output>
- </comparator>
- <comparator>
- <type>RegexpComparator</type>
- <expected-output>^( |\t)*permission. Passing -f overwrites the destination if it already exists. raw( )*</expected-output>
- </comparator>
- <comparator>
- <type>RegexpComparator</type>
- <expected-output>^( |\t)*namespace extended attributes are preserved if \(1\) they are supported \(HDFS( )*</expected-output>
- </comparator>
- <comparator>
- <type>RegexpComparator</type>
- <expected-output>^( |\t)*only\) and, \(2\) all of the source and target pathnames are in the \/\.reserved\/raw( )*</expected-output>
- </comparator>
- <comparator>
- <type>RegexpComparator</type>
- <expected-output>^( |\t)*hierarchy. raw namespace xattr preservation is determined solely by the presence( )*</expected-output>
- </comparator>
- <comparator>
- <type>RegexpComparator</type>
- <expected-output>^\s*\(or absence\) of the \/\.reserved\/raw prefix and not by the -p option.( )*</expected-output>
- </comparator>
- </comparators>
- </test>
- <test> <!-- TESTED -->
- <description>help: help for rm</description>
- <test-commands>
- <command>-help rm</command>
- </test-commands>
- <cleanup-commands>
- </cleanup-commands>
- <comparators>
- <comparator>
- <type>RegexpComparator</type>
- <expected-output>^-rm \[-f\] \[-r\|-R\] \[-skipTrash\] \[-safely\] <src> \.\.\. :\s*</expected-output>
- </comparator>
- <comparator>
- <type>RegexpComparator</type>
- <expected-output>^\s*Delete all files that match the specified file pattern. Equivalent to the Unix( )*</expected-output>
- </comparator>
- <comparator>
- <type>RegexpComparator</type>
- <expected-output>^\s*command "rm <src>"( )*</expected-output>
- </comparator>
- <comparator>
- <type>RegexpComparator</type>
- <expected-output>^\s*-skipTrash\s+option bypasses trash, if enabled, and immediately deletes <src>\.( )*</expected-output>
- </comparator>
- <comparator>
- <type>RegexpComparator</type>
- <expected-output>^\s+-f\s+If the file does not exist, do not display a diagnostic message or\s*</expected-output>
- </comparator>
- <comparator>
- <type>RegexpComparator</type>
- <expected-output>^\s+modify the exit status to reflect an error\.\s*</expected-output>
- </comparator>
- <comparator>
- <type>RegexpComparator</type>
- <expected-output>^\s+-\[rR\]\s+Recursively deletes directories\.\s*</expected-output>
- </comparator>
- </comparators>
- </test>
- <test> <!-- TESTED -->
- <description>help: help for rmdir</description>
- <test-commands>
- <command>-help rmdir</command>
- </test-commands>
- <cleanup-commands>
- </cleanup-commands>
- <comparators>
- <comparator>
- <type>RegexpComparator</type>
- <expected-output>^-rmdir \[--ignore-fail-on-non-empty\] <dir> \.\.\. :\s*</expected-output>
- </comparator>
- <comparator>
- <type>RegexpComparator</type>
- <expected-output>\s+Removes the directory entry specified by each directory argument, provided it is\s*</expected-output>
- </comparator>
- <comparator>
- <type>RegexpComparator</type>
- <expected-output>\s+empty\.\s*</expected-output>
- </comparator>
- </comparators>
- </test>
- <test> <!-- TESTED -->
- <description>help: help for rmr</description>
- <test-commands>
- <command>-help rmr</command>
- </test-commands>
- <cleanup-commands>
- </cleanup-commands>
- <comparators>
- <comparator>
- <type>RegexpComparator</type>
- <expected-output>^-rmr :\s*</expected-output>
- </comparator>
- <comparator>
- <type>RegexpComparator</type>
- <expected-output>^\s*\(DEPRECATED\) Same as '-rm -r'\s*</expected-output>
- </comparator>
- </comparators>
- </test>
- <test> <!-- TESTED -->
- <description>help: help for put</description>
- <test-commands>
- <command>-help put</command>
- </test-commands>
- <cleanup-commands>
- </cleanup-commands>
- <comparators>
- <comparator>
- <type>RegexpComparator</type>
- <expected-output>^-put \[-f\] \[-p\] \[-l\] <localsrc> \.\.\. <dst> :( )*</expected-output>
- </comparator>
- <comparator>
- <type>RegexpComparator</type>
- <expected-output>^\s*Copy files from the local file system into fs.( )*Copying fails if the file already( )*</expected-output>
- </comparator>
- <comparator>
- <type>RegexpComparator</type>
- <expected-output>^\s*exists, unless the -f flag is given.( )*</expected-output>
- </comparator>
- <comparator>
- <type>RegexpComparator</type>
- <expected-output>^\s*Flags:( )*</expected-output>
- </comparator>
- <comparator>
- <type>RegexpComparator</type>
- <expected-output>^\s*-p Preserves access and modification times, ownership and the mode.( )*</expected-output>
- </comparator>
- <comparator>
- <type>RegexpComparator</type>
- <expected-output>^\s*-f Overwrites the destination if it already exists.( )*</expected-output>
- </comparator>
- <comparator>
- <type>RegexpComparator</type>
- <expected-output>^\s*-l Allow DataNode to lazily persist the file to disk. Forces( )*</expected-output>
- </comparator>
- <comparator>
- <type>RegexpComparator</type>
- <expected-output>^\s*replication factor of 1. This flag will result in reduced( )*</expected-output>
- </comparator>
- <comparator>
- <type>RegexpComparator</type>
- <expected-output>^\s*durability. Use with care.( )*</expected-output>
- </comparator>
- </comparators>
- </test>
- <test> <!-- TESTED -->
- <description>help: help for copyFromLocal</description>
- <test-commands>
- <command>-help copyFromLocal</command>
- </test-commands>
- <cleanup-commands>
- </cleanup-commands>
- <comparators>
- <comparator>
- <type>RegexpComparator</type>
- <expected-output>^-copyFromLocal \[-f\] \[-p\] \[-l\] <localsrc> \.\.\. <dst> :\s*</expected-output>
- </comparator>
- <comparator>
- <type>RegexpComparator</type>
- <expected-output>^\s*Identical to the -put command\.\s*</expected-output>
- </comparator>
- </comparators>
- </test>
- <test> <!-- TESTED -->
- <description>help: help for moveFromLocal</description>
- <test-commands>
- <command>-help moveFromLocal</command>
- </test-commands>
- <cleanup-commands>
- </cleanup-commands>
- <comparators>
- <comparator>
- <type>RegexpComparator</type>
- <expected-output>^-moveFromLocal <localsrc> \.\.\. <dst> :\s*</expected-output>
- </comparator>
- <comparator>
- <type>RegexpComparator</type>
- <expected-output>^( |\t)*Same as -put, except that the source is deleted after it's copied.</expected-output>
- </comparator>
- </comparators>
- </test>
- <test> <!-- TESTED -->
- <description>help: help for get</description>
- <test-commands>
- <command>-help get</command>
- </test-commands>
- <cleanup-commands>
- <!-- No cleanup -->
- </cleanup-commands>
- <comparators>
- <comparator>
- <type>RegexpComparator</type>
- <expected-output>^-get( )*\[-p\]( )*\[-ignoreCrc\]( )*\[-crc\]( )*<src> \.\.\. <localdst> :\s*</expected-output>
- </comparator>
- <comparator>
- <type>RegexpComparator</type>
- <expected-output>^( |\t)*Copy files that match the file pattern <src> to the local name.( )*<src> is kept.( )*</expected-output>
- </comparator>
- <comparator>
- <type>RegexpComparator</type>
- <expected-output>^( |\t)*When copying multiple files, the destination must be a directory. Passing -p( )*</expected-output>
- </comparator>
- <comparator>
- <type>RegexpComparator</type>
- <expected-output>^( |\t)*preserves access and modification times, ownership and the mode.( )*</expected-output>
- </comparator>
- </comparators>
- </test>
- <test> <!-- TESTED -->
- <description>help: help for getmerge</description>
- <test-commands>
- <command>-help getmerge</command>
- </test-commands>
- <cleanup-commands>
- </cleanup-commands>
- <comparators>
- <comparator>
- <type>RegexpComparator</type>
- <expected-output>^-getmerge \[-nl\] <src> <localdst> :\s*</expected-output>
- </comparator>
- <comparator>
- <type>RegexpComparator</type>
- <expected-output>^( |\t)*Get all the files in the directories that match the source file pattern and( )*</expected-output>
- </comparator>
- <comparator>
- <type>RegexpComparator</type>
- <expected-output>^( |\t)*merge and sort them to only one file on local fs. <src> is kept.( )*</expected-output>
- </comparator>
- <comparator>
- <type>RegexpComparator</type>
- <expected-output>^( |\t)*-nl\s+Add a newline character at the end of each file.( )*</expected-output>
- </comparator>
- </comparators>
- </test>
- <test> <!-- TESTED -->
- <description>help: help for cat</description>
- <test-commands>
- <command>-help cat</command>
- </test-commands>
- <cleanup-commands>
- <!-- No cleanup -->
- </cleanup-commands>
- <comparators>
- <comparator>
- <type>RegexpComparator</type>
- <expected-output>^-cat \[-ignoreCrc\] <src> \.\.\. :\s*</expected-output>
- </comparator>
- <comparator>
- <type>RegexpComparator</type>
- <expected-output>^\s*Fetch all files that match the file pattern <src> and display their content on\s*</expected-output>
- </comparator>
- <comparator>
- <type>RegexpComparator</type>
- <expected-output>^\s*stdout.</expected-output>
- </comparator>
- </comparators>
- </test>
- <test> <!-- TESTED -->
- <description>help: help for checksum</description>
- <test-commands>
- <command>-help checksum</command>
- </test-commands>
- <cleanup-commands>
- <!-- No cleanup -->
- </cleanup-commands>
- <comparators>
- <comparator>
- <type>RegexpComparator</type>
- <expected-output>^-checksum <src> \.\.\. :\s*</expected-output>
- </comparator>
- <comparator>
- <type>RegexpComparator</type>
- <expected-output>^\s*Dump checksum information for files that match the file pattern <src> to stdout\.\s*</expected-output>
- </comparator>
- <comparator>
- <type>RegexpComparator</type>
- <expected-output>^\s*Note that this requires a round-trip to a datanode storing each block of the\s*</expected-output>
- </comparator>
- <comparator>
- <type>RegexpComparator</type>
- <expected-output>^\s*file, and thus is not efficient to run on a large number of files\. The checksum\s*</expected-output>
- </comparator>
- <comparator>
- <type>RegexpComparator</type>
- <expected-output>^\s*of a file depends on its content, block size and the checksum algorithm and\s*</expected-output>
- </comparator>
- <comparator>
- <type>RegexpComparator</type>
- <expected-output>^\s*parameters used for creating the file\.\s*</expected-output>
- </comparator>
- </comparators>
- </test>
- <test> <!-- TESTED -->
- <description>help: help for copyToLocal</description>
- <test-commands>
- <command>-help copyToLocal</command>
- </test-commands>
- <cleanup-commands>
- </cleanup-commands>
- <comparators>
- <comparator>
- <type>RegexpComparator</type>
- <expected-output>^-copyToLocal \[-p\] \[-ignoreCrc\] \[-crc\] <src> \.\.\. <localdst> :\s*</expected-output>
- </comparator>
- <comparator>
- <type>RegexpComparator</type>
- <expected-output>^\s*Identical to the -get command.\s*</expected-output>
- </comparator>
- </comparators>
- </test>
- <test> <!-- TESTED -->
- <description>help: help for moveToLocal</description>
- <test-commands>
- <command>-help moveToLocal</command>
- </test-commands>
- <cleanup-commands>
- </cleanup-commands>
- <comparators>
- <comparator>
- <type>RegexpComparator</type>
- <expected-output>^-moveToLocal <src> <localdst> :\s*</expected-output>
- </comparator>
- <comparator>
- <type>RegexpComparator</type>
- <expected-output>^\s*Not implemented yet</expected-output>
- </comparator>
- </comparators>
- </test>
- <test> <!-- TESTED -->
- <description>help: help for mkdir</description>
- <test-commands>
- <command>-help mkdir</command>
- </test-commands>
- <cleanup-commands>
- </cleanup-commands>
- <comparators>
- <comparator>
- <type>RegexpComparator</type>
- <expected-output>^-mkdir \[-p\] <path> \.\.\. :\s*</expected-output>
- </comparator>
- <comparator>
- <type>RegexpComparator</type>
- <expected-output>^\s*Create a directory in specified location.( )*</expected-output>
- </comparator>
- <comparator>
- <type>TokenComparator</type>
- <expected-output>-p Do not fail if the directory already exists</expected-output>
- </comparator>
- </comparators>
- </test>
- <test> <!-- TESTED -->
- <description>help: help for setrep</description>
- <test-commands>
- <command>-help setrep</command>
- </test-commands>
- <cleanup-commands>
- </cleanup-commands>
- <comparators>
- <comparator>
- <type>RegexpComparator</type>
- <expected-output>^-setrep \[-R\] \[-w\] <rep> <path> \.\.\. :\s*</expected-output>
- </comparator>
- <comparator>
- <type>RegexpComparator</type>
- <expected-output>^\s*Set the replication level of a file. If <path> is a directory then the command( )*</expected-output>
- </comparator>
- <comparator>
- <type>RegexpComparator</type>
- <expected-output>^\s*recursively changes the replication factor of all files under the directory tree( )*</expected-output>
- </comparator>
- <comparator>
- <type>RegexpComparator</type>
- <expected-output>^\s*rooted at <path>\.( )*</expected-output>
- </comparator>
- <comparator>
- <type>RegexpComparator</type>
- <expected-output>^\s*-w\s+It requests that the command waits for the replication to complete\. This( )*</expected-output>
- </comparator>
- <comparator>
- <type>RegexpComparator</type>
- <expected-output>^( |\t)*can potentially take a very long time\.( )*</expected-output>
- </comparator>
- <comparator>
- <type>RegexpComparator</type>
- <expected-output>^( |\t)*-R\s+It is accepted for backwards compatibility\. It has no effect\.( )*</expected-output>
- </comparator>
- </comparators>
- </test>
- <test> <!-- TESTED -->
- <description>help: help for touchz</description>
- <test-commands>
- <command>-help touchz</command>
- </test-commands>
- <cleanup-commands>
- </cleanup-commands>
- <comparators>
- <comparator>
- <type>RegexpComparator</type>
- <expected-output>^-touchz <path> \.\.\. :( )*</expected-output>
- </comparator>
- <comparator>
- <type>RegexpComparator</type>
- <expected-output>^( |\t)*Creates a file of zero length at <path> with current time as the timestamp of( )*</expected-output>
- </comparator>
- <comparator>
- <type>RegexpComparator</type>
- <expected-output>^( |\t)* that <path>\. An error is returned if the file exists with non-zero length( )*</expected-output>
- </comparator>
- </comparators>
- </test>
- <test> <!-- TESTED -->
- <description>help: help for test</description>
- <test-commands>
- <command>-help test</command>
- </test-commands>
- <cleanup-commands>
- </cleanup-commands>
- <comparators>
- <comparator>
- <type>RegexpComparator</type>
- <expected-output>^-test -\[defsz\] <path> :\s*</expected-output>
- </comparator>
- <comparator>
- <type>RegexpComparator</type>
- <expected-output>^\s*Answer various questions about <path>, with result via exit status.</expected-output>
- </comparator>
- <comparator>
- <type>RegexpComparator</type>
- <expected-output>^\s*-[defsz]\s+return 0 if .*</expected-output>
- </comparator>
- </comparators>
- </test>
- <test> <!-- TESTED -->
- <description>help: help for stat</description>
- <test-commands>
- <command>-help stat</command>
- </test-commands>
- <cleanup-commands>
- </cleanup-commands>
- <comparators>
- <comparator>
- <type>RegexpComparator</type>
- <expected-output>^-stat \[format\] <path> \.\.\. :\s*</expected-output>
- </comparator>
- <comparator>
- <type>RegexpComparator</type>
- <expected-output>^( |\t)*Print statistics about the file/directory at <path>( )*</expected-output>
- </comparator>
- <comparator>
- <type>RegexpComparator</type>
- <expected-output>^( |\t)*in the specified format. Format accepts filesize in( )*</expected-output>
- </comparator>
- <comparator>
- <type>RegexpComparator</type>
- <expected-output>^( |\t)*blocks \(%b\), type \(%F\), group name of owner \(%g\),( )*</expected-output>
- </comparator>
- <comparator>
- <type>RegexpComparator</type>
- <expected-output>^( |\t)*name \(%n\), block size \(%o\), replication \(%r\), user name( )*</expected-output>
- </comparator>
- <comparator>
- <type>RegexpComparator</type>
- <expected-output>^( |\t)*of owner \(%u\), modification date \(%y, %Y\).( )*</expected-output>
- </comparator>
- <comparator>
- <type>RegexpComparator</type>
- <expected-output>^( |\t)*%y shows UTC date as "yyyy-MM-dd HH:mm:ss" and( )*</expected-output>
- </comparator>
- <comparator>
- <type>RegexpComparator</type>
- <expected-output>^( |\t)*%Y shows milliseconds since January 1, 1970 UTC.( )*</expected-output>
- </comparator>
- <comparator>
- <type>RegexpComparator</type>
- <expected-output>^( |\t)*If the format is not specified, %y is used by default.( )*</expected-output>
- </comparator>
- </comparators>
- </test>
- <test> <!-- TESTED -->
- <description>help: help for tail</description>
- <test-commands>
- <command>-help tail</command>
- </test-commands>
- <cleanup-commands>
- </cleanup-commands>
- <comparators>
- <comparator>
- <type>RegexpComparator</type>
- <expected-output>^-tail \[-f\] <file> :\s*</expected-output>
- </comparator>
- <comparator>
- <type>RegexpComparator</type>
- <expected-output>^\s*Show the last 1KB of the file.( )*</expected-output>
- </comparator>
- <comparator>
- <type>RegexpComparator</type>
- <expected-output>^( |\t)*-f\s+Shows appended data as the file grows.( )*</expected-output>
- </comparator>
- </comparators>
- </test>
- <test> <!-- TESTED -->
- <description>help: help for chmod</description>
- <test-commands>
- <command>-help chmod</command>
- </test-commands>
- <cleanup-commands>
- </cleanup-commands>
- <comparators>
- <comparator>
- <type>RegexpComparator</type>
- <expected-output>^-chmod \[-R\] <MODE\[,MODE\]... \| OCTALMODE> PATH... :\s*</expected-output>
- </comparator>
- <comparator>
- <type>RegexpComparator</type>
- <expected-output>^( |\t)*Changes permissions of a file. This works similar to the shell's chmod command( )*</expected-output>
- </comparator>
- <comparator>
- <type>RegexpComparator</type>
- <expected-output>^( |\t)*with a few exceptions.( )*</expected-output>
- </comparator>
- <comparator>
- <type>RegexpComparator</type>
- <expected-output>^( |\t)*-R\s*modifies the files recursively. This is the only option currently( )*</expected-output>
- </comparator>
- <comparator>
- <type>RegexpComparator</type>
- <expected-output>^( |\t)*supported.( )*</expected-output>
- </comparator>
- <comparator>
- <type>RegexpComparator</type>
- <expected-output>^( |\t)*<MODE>\s*Mode is the same as mode used for the shell's command. The only( )*</expected-output>
- </comparator>
- <comparator>
- <type>RegexpComparator</type>
- <expected-output>^( |\t)*letters recognized are 'rwxXt', e\.g\. \+t,a\+r,g-w,\+rwx,o=r\.( )*</expected-output>
- </comparator>
- <comparator>
- <type>RegexpComparator</type>
- <expected-output>^( |\t)*<OCTALMODE>\s+Mode specifed in 3 or 4 digits. If 4 digits, the first may be 1 or( )*</expected-output>
- </comparator>
- <comparator>
- <type>RegexpComparator</type>
- <expected-output>^( |\t)*0 to turn the sticky bit on or off, respectively.( )*Unlike( |\t)*the( )*</expected-output>
- </comparator>
- <comparator>
- <type>RegexpComparator</type>
- <expected-output>^( |\t)*shell command, it is not possible to specify only part of the( )*</expected-output>
- </comparator>
- <comparator>
- <type>RegexpComparator</type>
- <expected-output>^( |\t)*mode, e\.g\. 754 is same as u=rwx,g=rx,o=r\.( )*</expected-output>
- </comparator>
- <comparator>
- <type>RegexpComparator</type>
- <expected-output>^( |\t)*If none of 'augo' is specified, 'a' is assumed and unlike the shell command, no( )*</expected-output>
- </comparator>
- <comparator>
- <type>RegexpComparator</type>
- <expected-output>^( |\t)*umask is applied.( )*</expected-output>
- </comparator>
- </comparators>
- </test>
- <test> <!-- TESTED -->
- <description>help: help for chown</description>
- <test-commands>
- <command>-help chown</command>
- </test-commands>
- <cleanup-commands>
- </cleanup-commands>
- <comparators>
- <comparator>
- <type>RegexpComparator</type>
- <expected-output>^-chown \[-R\] \[OWNER\]\[:\[GROUP\]\] PATH... :\s*</expected-output>
- </comparator>
- <comparator>
- <type>RegexpComparator</type>
- <expected-output>^\s*Changes owner and group of a file\. This is similar to the shell's chown command( )*</expected-output>
- </comparator>
- <comparator>
- <type>RegexpComparator</type>
- <expected-output>^( |\t)*with a few exceptions.( )*</expected-output>
- </comparator>
- <comparator>
- <type>RegexpComparator</type>
- <expected-output>^( |\t)*-R( |\t)*modifies the files recursively. This is the only option currently( )*</expected-output>
- </comparator>
- <comparator>
- <type>RegexpComparator</type>
- <expected-output>^( |\t)*supported.( )*</expected-output>
- </comparator>
- <comparator>
- <type>RegexpComparator</type>
- <expected-output>^( |\t)*If only the owner or group is specified, then only the owner or group is( )*</expected-output>
- </comparator>
- <comparator>
- <type>RegexpComparator</type>
- <expected-output>^( |\t)*modified. The owner and group names may only consist of digits, alphabet, and( )*</expected-output>
- </comparator>
- <comparator>
- <type>RegexpComparator</type>
- <expected-output>^( |\t)*any of .+?. The names are case sensitive.( )*</expected-output>
- </comparator>
- <comparator>
- <type>RegexpComparator</type>
- <expected-output>^( |\t)*WARNING: Avoid using '.' to separate user name and group though Linux allows it.( )*</expected-output>
- </comparator>
- <comparator>
- <type>RegexpComparator</type>
- <expected-output>^( |\t)*If user names have dots in them and you are using local file system, you might( )*</expected-output>
- </comparator>
- <comparator>
- <type>RegexpComparator</type>
- <expected-output>^( |\t)*see surprising results since the shell command 'chown' is used for local files.( )*</expected-output>
- </comparator>
- </comparators>
- </test>
- <test> <!-- TESTED -->
- <description>help: help for chgrp</description>
- <test-commands>
- <command>-help chgrp</command>
- </test-commands>
- <cleanup-commands>
- </cleanup-commands>
- <comparators>
- <comparator>
- <type>RegexpComparator</type>
- <expected-output>^-chgrp \[-R\] GROUP PATH... :( )*</expected-output>
- </comparator>
- <comparator>
- <type>RegexpComparator</type>
- <expected-output>^( |\t)*This is equivalent to -chown ... :GROUP ...( )*</expected-output>
- </comparator>
- </comparators>
- </test>
- <test> <!-- TESTED -->
- <description>help: help for find</description>
- <test-commands>
- <command>-help find</command>
- </test-commands>
- <cleanup-commands>
- </cleanup-commands>
- <comparators>
- <comparator>
- <type>RegexpAcrossOutputComparator</type>
- <expected-output>-find <path> \.\.\. <expression> \.\.\. :
- Finds all files that match the specified expression and
- applies selected actions to them\. If no <path> is specified
- then defaults to the current working directory\. If no
- expression is specified then defaults to -print\.
-
- The following primary expressions are recognised:
- -name pattern
- -iname pattern
- Evaluates as true if the basename of the file matches the
- pattern using standard file system globbing\.
- If -iname is used then the match is case insensitive\.
-
- -print
- -print0
- Always evaluates to true. Causes the current pathname to be
- written to standard output followed by a newline. If the -print0
- expression is used then an ASCII NULL character is appended rather
- than a newline.
-
- The following operators are recognised:
- expression -a expression
- expression -and expression
- expression expression
- Logical AND operator for joining two expressions\. Returns
- true if both child expressions return true\. Implied by the
- juxtaposition of two expressions and so does not need to be
- explicitly specified\. The second expression will not be
- applied if the first fails\.
- </expected-output>
- </comparator>
- </comparators>
- </test>
- <test> <!-- TESTED -->
- <description>help: help for help</description>
- <test-commands>
- <command>-help help</command>
- </test-commands>
- <cleanup-commands>
- </cleanup-commands>
- <comparators>
- <comparator>
- <type>RegexpComparator</type>
- <expected-output>^-help \[cmd ...\] :( )*</expected-output>
- </comparator>
- <comparator>
- <type>RegexpComparator</type>
- <expected-output>^( |\t)*Displays help for given command or all commands if none is specified.( )*</expected-output>
- </comparator>
- </comparators>
- </test>
- </tests>
- </configuration>
|