testHDFSConf.xml 780 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547354835493550355135523553355435553556355735583559356035613562356335643565356635673568356935703571357235733574357535763577357835793580358135823583358435853586358735883589359035913592359335943595359635973598359936003601360236033604360536063607360836093610361136123613361436153616361736183619362036213622362336243625362636273628362936303631363236333634363536363637363836393640364136423643364436453646364736483649365036513652365336543655365636573658365936603661366236633664366536663667366836693670367136723673367436753676367736783679368036813682368336843685368636873688368936903691369236933694369536963697369836993700370137023703370437053706370737083709371037113712371337143715371637173718371937203721372237233724372537263727372837293730373137323733373437353736373737383739374037413742374337443745374637473748374937503751375237533754375537563757375837593760376137623763376437653766376737683769377037713772377337743775377637773778377937803781378237833784378537863787378837893790379137923793379437953796379737983799380038013802380338043805380638073808380938103811381238133814381538163817381838193820382138223823382438253826382738283829383038313832383338343835383638373838383938403841384238433844384538463847384838493850385138523853385438553856385738583859386038613862386338643865386638673868386938703871387238733874387538763877387838793880388138823883388438853886388738883889389038913892389338943895389638973898389939003901390239033904390539063907390839093910391139123913391439153916391739183919392039213922392339243925392639273928392939303931393239333934393539363937393839393940394139423943394439453946394739483949395039513952395339543955395639573958395939603961396239633964396539663967396839693970397139723973397439753976397739783979398039813982398339843985398639873988398939903991399239933994399539963997399839994000400140024003400440054006400740084009401040114012401340144015401640174018401940204021402240234024402540264027402840294030403140324033403440354036403740384039404040414042404340444045404640474048404940504051405240534054405540564057405840594060406140624063406440654066406740684069407040714072407340744075407640774078407940804081408240834084408540864087408840894090409140924093409440954096409740984099410041014102410341044105410641074108410941104111411241134114411541164117411841194120412141224123412441254126412741284129413041314132413341344135413641374138413941404141414241434144414541464147414841494150415141524153415441554156415741584159416041614162416341644165416641674168416941704171417241734174417541764177417841794180418141824183418441854186418741884189419041914192419341944195419641974198419942004201420242034204420542064207420842094210421142124213421442154216421742184219422042214222422342244225422642274228422942304231423242334234423542364237423842394240424142424243424442454246424742484249425042514252425342544255425642574258425942604261426242634264426542664267426842694270427142724273427442754276427742784279428042814282428342844285428642874288428942904291429242934294429542964297429842994300430143024303430443054306430743084309431043114312431343144315431643174318431943204321432243234324432543264327432843294330433143324333433443354336433743384339434043414342434343444345434643474348434943504351435243534354435543564357435843594360436143624363436443654366436743684369437043714372437343744375437643774378437943804381438243834384438543864387438843894390439143924393439443954396439743984399440044014402440344044405440644074408440944104411441244134414441544164417441844194420442144224423442444254426442744284429443044314432443344344435443644374438443944404441444244434444444544464447444844494450445144524453445444554456445744584459446044614462446344644465446644674468446944704471447244734474447544764477447844794480448144824483448444854486448744884489449044914492449344944495449644974498449945004501450245034504450545064507450845094510451145124513451445154516451745184519452045214522452345244525452645274528452945304531453245334534453545364537453845394540454145424543454445454546454745484549455045514552455345544555455645574558455945604561456245634564456545664567456845694570457145724573457445754576457745784579458045814582458345844585458645874588458945904591459245934594459545964597459845994600460146024603460446054606460746084609461046114612461346144615461646174618461946204621462246234624462546264627462846294630463146324633463446354636463746384639464046414642464346444645464646474648464946504651465246534654465546564657465846594660466146624663466446654666466746684669467046714672467346744675467646774678467946804681468246834684468546864687468846894690469146924693469446954696469746984699470047014702470347044705470647074708470947104711471247134714471547164717471847194720472147224723472447254726472747284729473047314732473347344735473647374738473947404741474247434744474547464747474847494750475147524753475447554756475747584759476047614762476347644765476647674768476947704771477247734774477547764777477847794780478147824783478447854786478747884789479047914792479347944795479647974798479948004801480248034804480548064807480848094810481148124813481448154816481748184819482048214822482348244825482648274828482948304831483248334834483548364837483848394840484148424843484448454846484748484849485048514852485348544855485648574858485948604861486248634864486548664867486848694870487148724873487448754876487748784879488048814882488348844885488648874888488948904891489248934894489548964897489848994900490149024903490449054906490749084909491049114912491349144915491649174918491949204921492249234924492549264927492849294930493149324933493449354936493749384939494049414942494349444945494649474948494949504951495249534954495549564957495849594960496149624963496449654966496749684969497049714972497349744975497649774978497949804981498249834984498549864987498849894990499149924993499449954996499749984999500050015002500350045005500650075008500950105011501250135014501550165017501850195020502150225023502450255026502750285029503050315032503350345035503650375038503950405041504250435044504550465047504850495050505150525053505450555056505750585059506050615062506350645065506650675068506950705071507250735074507550765077507850795080508150825083508450855086508750885089509050915092509350945095509650975098509951005101510251035104510551065107510851095110511151125113511451155116511751185119512051215122512351245125512651275128512951305131513251335134513551365137513851395140514151425143514451455146514751485149515051515152515351545155515651575158515951605161516251635164516551665167516851695170517151725173517451755176517751785179518051815182518351845185518651875188518951905191519251935194519551965197519851995200520152025203520452055206520752085209521052115212521352145215521652175218521952205221522252235224522552265227522852295230523152325233523452355236523752385239524052415242524352445245524652475248524952505251525252535254525552565257525852595260526152625263526452655266526752685269527052715272527352745275527652775278527952805281528252835284528552865287528852895290529152925293529452955296529752985299530053015302530353045305530653075308530953105311531253135314531553165317531853195320532153225323532453255326532753285329533053315332533353345335533653375338533953405341534253435344534553465347534853495350535153525353535453555356535753585359536053615362536353645365536653675368536953705371537253735374537553765377537853795380538153825383538453855386538753885389539053915392539353945395539653975398539954005401540254035404540554065407540854095410541154125413541454155416541754185419542054215422542354245425542654275428542954305431543254335434543554365437543854395440544154425443544454455446544754485449545054515452545354545455545654575458545954605461546254635464546554665467546854695470547154725473547454755476547754785479548054815482548354845485548654875488548954905491549254935494549554965497549854995500550155025503550455055506550755085509551055115512551355145515551655175518551955205521552255235524552555265527552855295530553155325533553455355536553755385539554055415542554355445545554655475548554955505551555255535554555555565557555855595560556155625563556455655566556755685569557055715572557355745575557655775578557955805581558255835584558555865587558855895590559155925593559455955596559755985599560056015602560356045605560656075608560956105611561256135614561556165617561856195620562156225623562456255626562756285629563056315632563356345635563656375638563956405641564256435644564556465647564856495650565156525653565456555656565756585659566056615662566356645665566656675668566956705671567256735674567556765677567856795680568156825683568456855686568756885689569056915692569356945695569656975698569957005701570257035704570557065707570857095710571157125713571457155716571757185719572057215722572357245725572657275728572957305731573257335734573557365737573857395740574157425743574457455746574757485749575057515752575357545755575657575758575957605761576257635764576557665767576857695770577157725773577457755776577757785779578057815782578357845785578657875788578957905791579257935794579557965797579857995800580158025803580458055806580758085809581058115812581358145815581658175818581958205821582258235824582558265827582858295830583158325833583458355836583758385839584058415842584358445845584658475848584958505851585258535854585558565857585858595860586158625863586458655866586758685869587058715872587358745875587658775878587958805881588258835884588558865887588858895890589158925893589458955896589758985899590059015902590359045905590659075908590959105911591259135914591559165917591859195920592159225923592459255926592759285929593059315932593359345935593659375938593959405941594259435944594559465947594859495950595159525953595459555956595759585959596059615962596359645965596659675968596959705971597259735974597559765977597859795980598159825983598459855986598759885989599059915992599359945995599659975998599960006001600260036004600560066007600860096010601160126013601460156016601760186019602060216022602360246025602660276028602960306031603260336034603560366037603860396040604160426043604460456046604760486049605060516052605360546055605660576058605960606061606260636064606560666067606860696070607160726073607460756076607760786079608060816082608360846085608660876088608960906091609260936094609560966097609860996100610161026103610461056106610761086109611061116112611361146115611661176118611961206121612261236124612561266127612861296130613161326133613461356136613761386139614061416142614361446145614661476148614961506151615261536154615561566157615861596160616161626163616461656166616761686169617061716172617361746175617661776178617961806181618261836184618561866187618861896190619161926193619461956196619761986199620062016202620362046205620662076208620962106211621262136214621562166217621862196220622162226223622462256226622762286229623062316232623362346235623662376238623962406241624262436244624562466247624862496250625162526253625462556256625762586259626062616262626362646265626662676268626962706271627262736274627562766277627862796280628162826283628462856286628762886289629062916292629362946295629662976298629963006301630263036304630563066307630863096310631163126313631463156316631763186319632063216322632363246325632663276328632963306331633263336334633563366337633863396340634163426343634463456346634763486349635063516352635363546355635663576358635963606361636263636364636563666367636863696370637163726373637463756376637763786379638063816382638363846385638663876388638963906391639263936394639563966397639863996400640164026403640464056406640764086409641064116412641364146415641664176418641964206421642264236424642564266427642864296430643164326433643464356436643764386439644064416442644364446445644664476448644964506451645264536454645564566457645864596460646164626463646464656466646764686469647064716472647364746475647664776478647964806481648264836484648564866487648864896490649164926493649464956496649764986499650065016502650365046505650665076508650965106511651265136514651565166517651865196520652165226523652465256526652765286529653065316532653365346535653665376538653965406541654265436544654565466547654865496550655165526553655465556556655765586559656065616562656365646565656665676568656965706571657265736574657565766577657865796580658165826583658465856586658765886589659065916592659365946595659665976598659966006601660266036604660566066607660866096610661166126613661466156616661766186619662066216622662366246625662666276628662966306631663266336634663566366637663866396640664166426643664466456646664766486649665066516652665366546655665666576658665966606661666266636664666566666667666866696670667166726673667466756676667766786679668066816682668366846685668666876688668966906691669266936694669566966697669866996700670167026703670467056706670767086709671067116712671367146715671667176718671967206721672267236724672567266727672867296730673167326733673467356736673767386739674067416742674367446745674667476748674967506751675267536754675567566757675867596760676167626763676467656766676767686769677067716772677367746775677667776778677967806781678267836784678567866787678867896790679167926793679467956796679767986799680068016802680368046805680668076808680968106811681268136814681568166817681868196820682168226823682468256826682768286829683068316832683368346835683668376838683968406841684268436844684568466847684868496850685168526853685468556856685768586859686068616862686368646865686668676868686968706871687268736874687568766877687868796880688168826883688468856886688768886889689068916892689368946895689668976898689969006901690269036904690569066907690869096910691169126913691469156916691769186919692069216922692369246925692669276928692969306931693269336934693569366937693869396940694169426943694469456946694769486949695069516952695369546955695669576958695969606961696269636964696569666967696869696970697169726973697469756976697769786979698069816982698369846985698669876988698969906991699269936994699569966997699869997000700170027003700470057006700770087009701070117012701370147015701670177018701970207021702270237024702570267027702870297030703170327033703470357036703770387039704070417042704370447045704670477048704970507051705270537054705570567057705870597060706170627063706470657066706770687069707070717072707370747075707670777078707970807081708270837084708570867087708870897090709170927093709470957096709770987099710071017102710371047105710671077108710971107111711271137114711571167117711871197120712171227123712471257126712771287129713071317132713371347135713671377138713971407141714271437144714571467147714871497150715171527153715471557156715771587159716071617162716371647165716671677168716971707171717271737174717571767177717871797180718171827183718471857186718771887189719071917192719371947195719671977198719972007201720272037204720572067207720872097210721172127213721472157216721772187219722072217222722372247225722672277228722972307231723272337234723572367237723872397240724172427243724472457246724772487249725072517252725372547255725672577258725972607261726272637264726572667267726872697270727172727273727472757276727772787279728072817282728372847285728672877288728972907291729272937294729572967297729872997300730173027303730473057306730773087309731073117312731373147315731673177318731973207321732273237324732573267327732873297330733173327333733473357336733773387339734073417342734373447345734673477348734973507351735273537354735573567357735873597360736173627363736473657366736773687369737073717372737373747375737673777378737973807381738273837384738573867387738873897390739173927393739473957396739773987399740074017402740374047405740674077408740974107411741274137414741574167417741874197420742174227423742474257426742774287429743074317432743374347435743674377438743974407441744274437444744574467447744874497450745174527453745474557456745774587459746074617462746374647465746674677468746974707471747274737474747574767477747874797480748174827483748474857486748774887489749074917492749374947495749674977498749975007501750275037504750575067507750875097510751175127513751475157516751775187519752075217522752375247525752675277528752975307531753275337534753575367537753875397540754175427543754475457546754775487549755075517552755375547555755675577558755975607561756275637564756575667567756875697570757175727573757475757576757775787579758075817582758375847585758675877588758975907591759275937594759575967597759875997600760176027603760476057606760776087609761076117612761376147615761676177618761976207621762276237624762576267627762876297630763176327633763476357636763776387639764076417642764376447645764676477648764976507651765276537654765576567657765876597660766176627663766476657666766776687669767076717672767376747675767676777678767976807681768276837684768576867687768876897690769176927693769476957696769776987699770077017702770377047705770677077708770977107711771277137714771577167717771877197720772177227723772477257726772777287729773077317732773377347735773677377738773977407741774277437744774577467747774877497750775177527753775477557756775777587759776077617762776377647765776677677768776977707771777277737774777577767777777877797780778177827783778477857786778777887789779077917792779377947795779677977798779978007801780278037804780578067807780878097810781178127813781478157816781778187819782078217822782378247825782678277828782978307831783278337834783578367837783878397840784178427843784478457846784778487849785078517852785378547855785678577858785978607861786278637864786578667867786878697870787178727873787478757876787778787879788078817882788378847885788678877888788978907891789278937894789578967897789878997900790179027903790479057906790779087909791079117912791379147915791679177918791979207921792279237924792579267927792879297930793179327933793479357936793779387939794079417942794379447945794679477948794979507951795279537954795579567957795879597960796179627963796479657966796779687969797079717972797379747975797679777978797979807981798279837984798579867987798879897990799179927993799479957996799779987999800080018002800380048005800680078008800980108011801280138014801580168017801880198020802180228023802480258026802780288029803080318032803380348035803680378038803980408041804280438044804580468047804880498050805180528053805480558056805780588059806080618062806380648065806680678068806980708071807280738074807580768077807880798080808180828083808480858086808780888089809080918092809380948095809680978098809981008101810281038104810581068107810881098110811181128113811481158116811781188119812081218122812381248125812681278128812981308131813281338134813581368137813881398140814181428143814481458146814781488149815081518152815381548155815681578158815981608161816281638164816581668167816881698170817181728173817481758176817781788179818081818182818381848185818681878188818981908191819281938194819581968197819881998200820182028203820482058206820782088209821082118212821382148215821682178218821982208221822282238224822582268227822882298230823182328233823482358236823782388239824082418242824382448245824682478248824982508251825282538254825582568257825882598260826182628263826482658266826782688269827082718272827382748275827682778278827982808281828282838284828582868287828882898290829182928293829482958296829782988299830083018302830383048305830683078308830983108311831283138314831583168317831883198320832183228323832483258326832783288329833083318332833383348335833683378338833983408341834283438344834583468347834883498350835183528353835483558356835783588359836083618362836383648365836683678368836983708371837283738374837583768377837883798380838183828383838483858386838783888389839083918392839383948395839683978398839984008401840284038404840584068407840884098410841184128413841484158416841784188419842084218422842384248425842684278428842984308431843284338434843584368437843884398440844184428443844484458446844784488449845084518452845384548455845684578458845984608461846284638464846584668467846884698470847184728473847484758476847784788479848084818482848384848485848684878488848984908491849284938494849584968497849884998500850185028503850485058506850785088509851085118512851385148515851685178518851985208521852285238524852585268527852885298530853185328533853485358536853785388539854085418542854385448545854685478548854985508551855285538554855585568557855885598560856185628563856485658566856785688569857085718572857385748575857685778578857985808581858285838584858585868587858885898590859185928593859485958596859785988599860086018602860386048605860686078608860986108611861286138614861586168617861886198620862186228623862486258626862786288629863086318632863386348635863686378638863986408641864286438644864586468647864886498650865186528653865486558656865786588659866086618662866386648665866686678668866986708671867286738674867586768677867886798680868186828683868486858686868786888689869086918692869386948695869686978698869987008701870287038704870587068707870887098710871187128713871487158716871787188719872087218722872387248725872687278728872987308731873287338734873587368737873887398740874187428743874487458746874787488749875087518752875387548755875687578758875987608761876287638764876587668767876887698770877187728773877487758776877787788779878087818782878387848785878687878788878987908791879287938794879587968797879887998800880188028803880488058806880788088809881088118812881388148815881688178818881988208821882288238824882588268827882888298830883188328833883488358836883788388839884088418842884388448845884688478848884988508851885288538854885588568857885888598860886188628863886488658866886788688869887088718872887388748875887688778878887988808881888288838884888588868887888888898890889188928893889488958896889788988899890089018902890389048905890689078908890989108911891289138914891589168917891889198920892189228923892489258926892789288929893089318932893389348935893689378938893989408941894289438944894589468947894889498950895189528953895489558956895789588959896089618962896389648965896689678968896989708971897289738974897589768977897889798980898189828983898489858986898789888989899089918992899389948995899689978998899990009001900290039004900590069007900890099010901190129013901490159016901790189019902090219022902390249025902690279028902990309031903290339034903590369037903890399040904190429043904490459046904790489049905090519052905390549055905690579058905990609061906290639064906590669067906890699070907190729073907490759076907790789079908090819082908390849085908690879088908990909091909290939094909590969097909890999100910191029103910491059106910791089109911091119112911391149115911691179118911991209121912291239124912591269127912891299130913191329133913491359136913791389139914091419142914391449145914691479148914991509151915291539154915591569157915891599160916191629163916491659166916791689169917091719172917391749175917691779178917991809181918291839184918591869187918891899190919191929193919491959196919791989199920092019202920392049205920692079208920992109211921292139214921592169217921892199220922192229223922492259226922792289229923092319232923392349235923692379238923992409241924292439244924592469247924892499250925192529253925492559256925792589259926092619262926392649265926692679268926992709271927292739274927592769277927892799280928192829283928492859286928792889289929092919292929392949295929692979298929993009301930293039304930593069307930893099310931193129313931493159316931793189319932093219322932393249325932693279328932993309331933293339334933593369337933893399340934193429343934493459346934793489349935093519352935393549355935693579358935993609361936293639364936593669367936893699370937193729373937493759376937793789379938093819382938393849385938693879388938993909391939293939394939593969397939893999400940194029403940494059406940794089409941094119412941394149415941694179418941994209421942294239424942594269427942894299430943194329433943494359436943794389439944094419442944394449445944694479448944994509451945294539454945594569457945894599460946194629463946494659466946794689469947094719472947394749475947694779478947994809481948294839484948594869487948894899490949194929493949494959496949794989499950095019502950395049505950695079508950995109511951295139514951595169517951895199520952195229523952495259526952795289529953095319532953395349535953695379538953995409541954295439544954595469547954895499550955195529553955495559556955795589559956095619562956395649565956695679568956995709571957295739574957595769577957895799580958195829583958495859586958795889589959095919592959395949595959695979598959996009601960296039604960596069607960896099610961196129613961496159616961796189619962096219622962396249625962696279628962996309631963296339634963596369637963896399640964196429643964496459646964796489649965096519652965396549655965696579658965996609661966296639664966596669667966896699670967196729673967496759676967796789679968096819682968396849685968696879688968996909691969296939694969596969697969896999700970197029703970497059706970797089709971097119712971397149715971697179718971997209721972297239724972597269727972897299730973197329733973497359736973797389739974097419742974397449745974697479748974997509751975297539754975597569757975897599760976197629763976497659766976797689769977097719772977397749775977697779778977997809781978297839784978597869787978897899790979197929793979497959796979797989799980098019802980398049805980698079808980998109811981298139814981598169817981898199820982198229823982498259826982798289829983098319832983398349835983698379838983998409841984298439844984598469847984898499850985198529853985498559856985798589859986098619862986398649865986698679868986998709871987298739874987598769877987898799880988198829883988498859886988798889889989098919892989398949895989698979898989999009901990299039904990599069907990899099910991199129913991499159916991799189919992099219922992399249925992699279928992999309931993299339934993599369937993899399940994199429943994499459946994799489949995099519952995399549955995699579958995999609961996299639964996599669967996899699970997199729973997499759976997799789979998099819982998399849985998699879988998999909991999299939994999599969997999899991000010001100021000310004100051000610007100081000910010100111001210013100141001510016100171001810019100201002110022100231002410025100261002710028100291003010031100321003310034100351003610037100381003910040100411004210043100441004510046100471004810049100501005110052100531005410055100561005710058100591006010061100621006310064100651006610067100681006910070100711007210073100741007510076100771007810079100801008110082100831008410085100861008710088100891009010091100921009310094100951009610097100981009910100101011010210103101041010510106101071010810109101101011110112101131011410115101161011710118101191012010121101221012310124101251012610127101281012910130101311013210133101341013510136101371013810139101401014110142101431014410145101461014710148101491015010151101521015310154101551015610157101581015910160101611016210163101641016510166101671016810169101701017110172101731017410175101761017710178101791018010181101821018310184101851018610187101881018910190101911019210193101941019510196101971019810199102001020110202102031020410205102061020710208102091021010211102121021310214102151021610217102181021910220102211022210223102241022510226102271022810229102301023110232102331023410235102361023710238102391024010241102421024310244102451024610247102481024910250102511025210253102541025510256102571025810259102601026110262102631026410265102661026710268102691027010271102721027310274102751027610277102781027910280102811028210283102841028510286102871028810289102901029110292102931029410295102961029710298102991030010301103021030310304103051030610307103081030910310103111031210313103141031510316103171031810319103201032110322103231032410325103261032710328103291033010331103321033310334103351033610337103381033910340103411034210343103441034510346103471034810349103501035110352103531035410355103561035710358103591036010361103621036310364103651036610367103681036910370103711037210373103741037510376103771037810379103801038110382103831038410385103861038710388103891039010391103921039310394103951039610397103981039910400104011040210403104041040510406104071040810409104101041110412104131041410415104161041710418104191042010421104221042310424104251042610427104281042910430104311043210433104341043510436104371043810439104401044110442104431044410445104461044710448104491045010451104521045310454104551045610457104581045910460104611046210463104641046510466104671046810469104701047110472104731047410475104761047710478104791048010481104821048310484104851048610487104881048910490104911049210493104941049510496104971049810499105001050110502105031050410505105061050710508105091051010511105121051310514105151051610517105181051910520105211052210523105241052510526105271052810529105301053110532105331053410535105361053710538105391054010541105421054310544105451054610547105481054910550105511055210553105541055510556105571055810559105601056110562105631056410565105661056710568105691057010571105721057310574105751057610577105781057910580105811058210583105841058510586105871058810589105901059110592105931059410595105961059710598105991060010601106021060310604106051060610607106081060910610106111061210613106141061510616106171061810619106201062110622106231062410625106261062710628106291063010631106321063310634106351063610637106381063910640106411064210643106441064510646106471064810649106501065110652106531065410655106561065710658106591066010661106621066310664106651066610667106681066910670106711067210673106741067510676106771067810679106801068110682106831068410685106861068710688106891069010691106921069310694106951069610697106981069910700107011070210703107041070510706107071070810709107101071110712107131071410715107161071710718107191072010721107221072310724107251072610727107281072910730107311073210733107341073510736107371073810739107401074110742107431074410745107461074710748107491075010751107521075310754107551075610757107581075910760107611076210763107641076510766107671076810769107701077110772107731077410775107761077710778107791078010781107821078310784107851078610787107881078910790107911079210793107941079510796107971079810799108001080110802108031080410805108061080710808108091081010811108121081310814108151081610817108181081910820108211082210823108241082510826108271082810829108301083110832108331083410835108361083710838108391084010841108421084310844108451084610847108481084910850108511085210853108541085510856108571085810859108601086110862108631086410865108661086710868108691087010871108721087310874108751087610877108781087910880108811088210883108841088510886108871088810889108901089110892108931089410895108961089710898108991090010901109021090310904109051090610907109081090910910109111091210913109141091510916109171091810919109201092110922109231092410925109261092710928109291093010931109321093310934109351093610937109381093910940109411094210943109441094510946109471094810949109501095110952109531095410955109561095710958109591096010961109621096310964109651096610967109681096910970109711097210973109741097510976109771097810979109801098110982109831098410985109861098710988109891099010991109921099310994109951099610997109981099911000110011100211003110041100511006110071100811009110101101111012110131101411015110161101711018110191102011021110221102311024110251102611027110281102911030110311103211033110341103511036110371103811039110401104111042110431104411045110461104711048110491105011051110521105311054110551105611057110581105911060110611106211063110641106511066110671106811069110701107111072110731107411075110761107711078110791108011081110821108311084110851108611087110881108911090110911109211093110941109511096110971109811099111001110111102111031110411105111061110711108111091111011111111121111311114111151111611117111181111911120111211112211123111241112511126111271112811129111301113111132111331113411135111361113711138111391114011141111421114311144111451114611147111481114911150111511115211153111541115511156111571115811159111601116111162111631116411165111661116711168111691117011171111721117311174111751117611177111781117911180111811118211183111841118511186111871118811189111901119111192111931119411195111961119711198111991120011201112021120311204112051120611207112081120911210112111121211213112141121511216112171121811219112201122111222112231122411225112261122711228112291123011231112321123311234112351123611237112381123911240112411124211243112441124511246112471124811249112501125111252112531125411255112561125711258112591126011261112621126311264112651126611267112681126911270112711127211273112741127511276112771127811279112801128111282112831128411285112861128711288112891129011291112921129311294112951129611297112981129911300113011130211303113041130511306113071130811309113101131111312113131131411315113161131711318113191132011321113221132311324113251132611327113281132911330113311133211333113341133511336113371133811339113401134111342113431134411345113461134711348113491135011351113521135311354113551135611357113581135911360113611136211363113641136511366113671136811369113701137111372113731137411375113761137711378113791138011381113821138311384113851138611387113881138911390113911139211393113941139511396113971139811399114001140111402114031140411405114061140711408114091141011411114121141311414114151141611417114181141911420114211142211423114241142511426114271142811429114301143111432114331143411435114361143711438114391144011441114421144311444114451144611447114481144911450114511145211453114541145511456114571145811459114601146111462114631146411465114661146711468114691147011471114721147311474114751147611477114781147911480114811148211483114841148511486114871148811489114901149111492114931149411495114961149711498114991150011501115021150311504115051150611507115081150911510115111151211513115141151511516115171151811519115201152111522115231152411525115261152711528115291153011531115321153311534115351153611537115381153911540115411154211543115441154511546115471154811549115501155111552115531155411555115561155711558115591156011561115621156311564115651156611567115681156911570115711157211573115741157511576115771157811579115801158111582115831158411585115861158711588115891159011591115921159311594115951159611597115981159911600116011160211603116041160511606116071160811609116101161111612116131161411615116161161711618116191162011621116221162311624116251162611627116281162911630116311163211633116341163511636116371163811639116401164111642116431164411645116461164711648116491165011651116521165311654116551165611657116581165911660116611166211663116641166511666116671166811669116701167111672116731167411675116761167711678116791168011681116821168311684116851168611687116881168911690116911169211693116941169511696116971169811699117001170111702117031170411705117061170711708117091171011711117121171311714117151171611717117181171911720117211172211723117241172511726117271172811729117301173111732117331173411735117361173711738117391174011741117421174311744117451174611747117481174911750117511175211753117541175511756117571175811759117601176111762117631176411765117661176711768117691177011771117721177311774117751177611777117781177911780117811178211783117841178511786117871178811789117901179111792117931179411795117961179711798117991180011801118021180311804118051180611807118081180911810118111181211813118141181511816118171181811819118201182111822118231182411825118261182711828118291183011831118321183311834118351183611837118381183911840118411184211843118441184511846118471184811849118501185111852118531185411855118561185711858118591186011861118621186311864118651186611867118681186911870118711187211873118741187511876118771187811879118801188111882118831188411885118861188711888118891189011891118921189311894118951189611897118981189911900119011190211903119041190511906119071190811909119101191111912119131191411915119161191711918119191192011921119221192311924119251192611927119281192911930119311193211933119341193511936119371193811939119401194111942119431194411945119461194711948119491195011951119521195311954119551195611957119581195911960119611196211963119641196511966119671196811969119701197111972119731197411975119761197711978119791198011981119821198311984119851198611987119881198911990119911199211993119941199511996119971199811999120001200112002120031200412005120061200712008120091201012011120121201312014120151201612017120181201912020120211202212023120241202512026120271202812029120301203112032120331203412035120361203712038120391204012041120421204312044120451204612047120481204912050120511205212053120541205512056120571205812059120601206112062120631206412065120661206712068120691207012071120721207312074120751207612077120781207912080120811208212083120841208512086120871208812089120901209112092120931209412095120961209712098120991210012101121021210312104121051210612107121081210912110121111211212113121141211512116121171211812119121201212112122121231212412125121261212712128121291213012131121321213312134121351213612137121381213912140121411214212143121441214512146121471214812149121501215112152121531215412155121561215712158121591216012161121621216312164121651216612167121681216912170121711217212173121741217512176121771217812179121801218112182121831218412185121861218712188121891219012191121921219312194121951219612197121981219912200122011220212203122041220512206122071220812209122101221112212122131221412215122161221712218122191222012221122221222312224122251222612227122281222912230122311223212233122341223512236122371223812239122401224112242122431224412245122461224712248122491225012251122521225312254122551225612257122581225912260122611226212263122641226512266122671226812269122701227112272122731227412275122761227712278122791228012281122821228312284122851228612287122881228912290122911229212293122941229512296122971229812299123001230112302123031230412305123061230712308123091231012311123121231312314123151231612317123181231912320123211232212323123241232512326123271232812329123301233112332123331233412335123361233712338123391234012341123421234312344123451234612347123481234912350123511235212353123541235512356123571235812359123601236112362123631236412365123661236712368123691237012371123721237312374123751237612377123781237912380123811238212383123841238512386123871238812389123901239112392123931239412395123961239712398123991240012401124021240312404124051240612407124081240912410124111241212413124141241512416124171241812419124201242112422124231242412425124261242712428124291243012431124321243312434124351243612437124381243912440124411244212443124441244512446124471244812449124501245112452124531245412455124561245712458124591246012461124621246312464124651246612467124681246912470124711247212473124741247512476124771247812479124801248112482124831248412485124861248712488124891249012491124921249312494124951249612497124981249912500125011250212503125041250512506125071250812509125101251112512125131251412515125161251712518125191252012521125221252312524125251252612527125281252912530125311253212533125341253512536125371253812539125401254112542125431254412545125461254712548125491255012551125521255312554125551255612557125581255912560125611256212563125641256512566125671256812569125701257112572125731257412575125761257712578125791258012581125821258312584125851258612587125881258912590125911259212593125941259512596125971259812599126001260112602126031260412605126061260712608126091261012611126121261312614126151261612617126181261912620126211262212623126241262512626126271262812629126301263112632126331263412635126361263712638126391264012641126421264312644126451264612647126481264912650126511265212653126541265512656126571265812659126601266112662126631266412665126661266712668126691267012671126721267312674126751267612677126781267912680126811268212683126841268512686126871268812689126901269112692126931269412695126961269712698126991270012701127021270312704127051270612707127081270912710127111271212713127141271512716127171271812719127201272112722127231272412725127261272712728127291273012731127321273312734127351273612737127381273912740127411274212743127441274512746127471274812749127501275112752127531275412755127561275712758127591276012761127621276312764127651276612767127681276912770127711277212773127741277512776127771277812779127801278112782127831278412785127861278712788127891279012791127921279312794127951279612797127981279912800128011280212803128041280512806128071280812809128101281112812128131281412815128161281712818128191282012821128221282312824128251282612827128281282912830128311283212833128341283512836128371283812839128401284112842128431284412845128461284712848128491285012851128521285312854128551285612857128581285912860128611286212863128641286512866128671286812869128701287112872128731287412875128761287712878128791288012881128821288312884128851288612887128881288912890128911289212893128941289512896128971289812899129001290112902129031290412905129061290712908129091291012911129121291312914129151291612917129181291912920129211292212923129241292512926129271292812929129301293112932129331293412935129361293712938129391294012941129421294312944129451294612947129481294912950129511295212953129541295512956129571295812959129601296112962129631296412965129661296712968129691297012971129721297312974129751297612977129781297912980129811298212983129841298512986129871298812989129901299112992129931299412995129961299712998129991300013001130021300313004130051300613007130081300913010130111301213013130141301513016130171301813019130201302113022130231302413025130261302713028130291303013031130321303313034130351303613037130381303913040130411304213043130441304513046130471304813049130501305113052130531305413055130561305713058130591306013061130621306313064130651306613067130681306913070130711307213073130741307513076130771307813079130801308113082130831308413085130861308713088130891309013091130921309313094130951309613097130981309913100131011310213103131041310513106131071310813109131101311113112131131311413115131161311713118131191312013121131221312313124131251312613127131281312913130131311313213133131341313513136131371313813139131401314113142131431314413145131461314713148131491315013151131521315313154131551315613157131581315913160131611316213163131641316513166131671316813169131701317113172131731317413175131761317713178131791318013181131821318313184131851318613187131881318913190131911319213193131941319513196131971319813199132001320113202132031320413205132061320713208132091321013211132121321313214132151321613217132181321913220132211322213223132241322513226132271322813229132301323113232132331323413235132361323713238132391324013241132421324313244132451324613247132481324913250132511325213253132541325513256132571325813259132601326113262132631326413265132661326713268132691327013271132721327313274132751327613277132781327913280132811328213283132841328513286132871328813289132901329113292132931329413295132961329713298132991330013301133021330313304133051330613307133081330913310133111331213313133141331513316133171331813319133201332113322133231332413325133261332713328133291333013331133321333313334133351333613337133381333913340133411334213343133441334513346133471334813349133501335113352133531335413355133561335713358133591336013361133621336313364133651336613367133681336913370133711337213373133741337513376133771337813379133801338113382133831338413385133861338713388133891339013391133921339313394133951339613397133981339913400134011340213403134041340513406134071340813409134101341113412134131341413415134161341713418134191342013421134221342313424134251342613427134281342913430134311343213433134341343513436134371343813439134401344113442134431344413445134461344713448134491345013451134521345313454134551345613457134581345913460134611346213463134641346513466134671346813469134701347113472134731347413475134761347713478134791348013481134821348313484134851348613487134881348913490134911349213493134941349513496134971349813499135001350113502135031350413505135061350713508135091351013511135121351313514135151351613517135181351913520135211352213523135241352513526135271352813529135301353113532135331353413535135361353713538135391354013541135421354313544135451354613547135481354913550135511355213553135541355513556135571355813559135601356113562135631356413565135661356713568135691357013571135721357313574135751357613577135781357913580135811358213583135841358513586135871358813589135901359113592135931359413595135961359713598135991360013601136021360313604136051360613607136081360913610136111361213613136141361513616136171361813619136201362113622136231362413625136261362713628136291363013631136321363313634136351363613637136381363913640136411364213643136441364513646136471364813649136501365113652136531365413655136561365713658136591366013661136621366313664136651366613667136681366913670136711367213673136741367513676136771367813679136801368113682136831368413685136861368713688136891369013691136921369313694136951369613697136981369913700137011370213703137041370513706137071370813709137101371113712137131371413715137161371713718137191372013721137221372313724137251372613727137281372913730137311373213733137341373513736137371373813739137401374113742137431374413745137461374713748137491375013751137521375313754137551375613757137581375913760137611376213763137641376513766137671376813769137701377113772137731377413775137761377713778137791378013781137821378313784137851378613787137881378913790137911379213793137941379513796137971379813799138001380113802138031380413805138061380713808138091381013811138121381313814138151381613817138181381913820138211382213823138241382513826138271382813829138301383113832138331383413835138361383713838138391384013841138421384313844138451384613847138481384913850138511385213853138541385513856138571385813859138601386113862138631386413865138661386713868138691387013871138721387313874138751387613877138781387913880138811388213883138841388513886138871388813889138901389113892138931389413895138961389713898138991390013901139021390313904139051390613907139081390913910139111391213913139141391513916139171391813919139201392113922139231392413925139261392713928139291393013931139321393313934139351393613937139381393913940139411394213943139441394513946139471394813949139501395113952139531395413955139561395713958139591396013961139621396313964139651396613967139681396913970139711397213973139741397513976139771397813979139801398113982139831398413985139861398713988139891399013991139921399313994139951399613997139981399914000140011400214003140041400514006140071400814009140101401114012140131401414015140161401714018140191402014021140221402314024140251402614027140281402914030140311403214033140341403514036140371403814039140401404114042140431404414045140461404714048140491405014051140521405314054140551405614057140581405914060140611406214063140641406514066140671406814069140701407114072140731407414075140761407714078140791408014081140821408314084140851408614087140881408914090140911409214093140941409514096140971409814099141001410114102141031410414105141061410714108141091411014111141121411314114141151411614117141181411914120141211412214123141241412514126141271412814129141301413114132141331413414135141361413714138141391414014141141421414314144141451414614147141481414914150141511415214153141541415514156141571415814159141601416114162141631416414165141661416714168141691417014171141721417314174141751417614177141781417914180141811418214183141841418514186141871418814189141901419114192141931419414195141961419714198141991420014201142021420314204142051420614207142081420914210142111421214213142141421514216142171421814219142201422114222142231422414225142261422714228142291423014231142321423314234142351423614237142381423914240142411424214243142441424514246142471424814249142501425114252142531425414255142561425714258142591426014261142621426314264142651426614267142681426914270142711427214273142741427514276142771427814279142801428114282142831428414285142861428714288142891429014291142921429314294142951429614297142981429914300143011430214303143041430514306143071430814309143101431114312143131431414315143161431714318143191432014321143221432314324143251432614327143281432914330143311433214333143341433514336143371433814339143401434114342143431434414345143461434714348143491435014351143521435314354143551435614357143581435914360143611436214363143641436514366143671436814369143701437114372143731437414375143761437714378143791438014381143821438314384143851438614387143881438914390143911439214393143941439514396143971439814399144001440114402144031440414405144061440714408144091441014411144121441314414144151441614417144181441914420144211442214423144241442514426144271442814429144301443114432144331443414435144361443714438144391444014441144421444314444144451444614447144481444914450144511445214453144541445514456144571445814459144601446114462144631446414465144661446714468144691447014471144721447314474144751447614477144781447914480144811448214483144841448514486144871448814489144901449114492144931449414495144961449714498144991450014501145021450314504145051450614507145081450914510145111451214513145141451514516145171451814519145201452114522145231452414525145261452714528145291453014531145321453314534145351453614537145381453914540145411454214543145441454514546145471454814549145501455114552145531455414555145561455714558145591456014561145621456314564145651456614567145681456914570145711457214573145741457514576145771457814579145801458114582145831458414585145861458714588145891459014591145921459314594145951459614597145981459914600146011460214603146041460514606146071460814609146101461114612146131461414615146161461714618146191462014621146221462314624146251462614627146281462914630146311463214633146341463514636146371463814639146401464114642146431464414645146461464714648146491465014651146521465314654146551465614657146581465914660146611466214663146641466514666146671466814669146701467114672146731467414675146761467714678146791468014681146821468314684146851468614687146881468914690146911469214693146941469514696146971469814699147001470114702147031470414705147061470714708147091471014711147121471314714147151471614717147181471914720147211472214723147241472514726147271472814729147301473114732147331473414735147361473714738147391474014741147421474314744147451474614747147481474914750147511475214753147541475514756147571475814759147601476114762147631476414765147661476714768147691477014771147721477314774147751477614777147781477914780147811478214783147841478514786147871478814789147901479114792147931479414795147961479714798147991480014801148021480314804148051480614807148081480914810148111481214813148141481514816148171481814819148201482114822148231482414825148261482714828148291483014831148321483314834148351483614837148381483914840148411484214843148441484514846148471484814849148501485114852148531485414855148561485714858148591486014861148621486314864148651486614867148681486914870148711487214873148741487514876148771487814879148801488114882148831488414885148861488714888148891489014891148921489314894148951489614897148981489914900149011490214903149041490514906149071490814909149101491114912149131491414915149161491714918149191492014921149221492314924149251492614927149281492914930149311493214933149341493514936149371493814939149401494114942149431494414945149461494714948149491495014951149521495314954149551495614957149581495914960149611496214963149641496514966149671496814969149701497114972149731497414975149761497714978149791498014981149821498314984149851498614987149881498914990149911499214993149941499514996149971499814999150001500115002150031500415005150061500715008150091501015011150121501315014150151501615017150181501915020150211502215023150241502515026150271502815029150301503115032150331503415035150361503715038150391504015041150421504315044150451504615047150481504915050150511505215053150541505515056150571505815059150601506115062150631506415065150661506715068150691507015071150721507315074150751507615077150781507915080150811508215083150841508515086150871508815089150901509115092150931509415095150961509715098150991510015101151021510315104151051510615107151081510915110151111511215113151141511515116151171511815119151201512115122151231512415125151261512715128151291513015131151321513315134151351513615137151381513915140151411514215143151441514515146151471514815149151501515115152151531515415155151561515715158151591516015161151621516315164151651516615167151681516915170151711517215173151741517515176151771517815179151801518115182151831518415185151861518715188151891519015191151921519315194151951519615197151981519915200152011520215203152041520515206152071520815209152101521115212152131521415215152161521715218152191522015221152221522315224152251522615227152281522915230152311523215233152341523515236152371523815239152401524115242152431524415245152461524715248152491525015251152521525315254152551525615257152581525915260152611526215263152641526515266152671526815269152701527115272152731527415275152761527715278152791528015281152821528315284152851528615287152881528915290152911529215293152941529515296152971529815299153001530115302153031530415305153061530715308153091531015311153121531315314153151531615317153181531915320153211532215323153241532515326153271532815329153301533115332153331533415335153361533715338153391534015341153421534315344153451534615347153481534915350153511535215353153541535515356153571535815359153601536115362153631536415365153661536715368153691537015371153721537315374153751537615377153781537915380153811538215383153841538515386153871538815389153901539115392153931539415395153961539715398153991540015401154021540315404154051540615407154081540915410154111541215413154141541515416154171541815419154201542115422154231542415425154261542715428154291543015431154321543315434154351543615437154381543915440154411544215443154441544515446154471544815449154501545115452154531545415455154561545715458154591546015461154621546315464154651546615467154681546915470154711547215473154741547515476154771547815479154801548115482154831548415485154861548715488154891549015491154921549315494154951549615497154981549915500155011550215503155041550515506155071550815509155101551115512155131551415515155161551715518155191552015521155221552315524155251552615527155281552915530155311553215533155341553515536155371553815539155401554115542155431554415545155461554715548155491555015551155521555315554155551555615557155581555915560155611556215563155641556515566155671556815569155701557115572155731557415575155761557715578155791558015581155821558315584155851558615587155881558915590155911559215593155941559515596155971559815599156001560115602156031560415605156061560715608156091561015611156121561315614156151561615617156181561915620156211562215623156241562515626156271562815629156301563115632156331563415635156361563715638156391564015641156421564315644156451564615647156481564915650156511565215653156541565515656156571565815659156601566115662156631566415665156661566715668156691567015671156721567315674156751567615677156781567915680156811568215683156841568515686156871568815689156901569115692156931569415695156961569715698156991570015701157021570315704157051570615707157081570915710157111571215713157141571515716157171571815719157201572115722157231572415725157261572715728157291573015731157321573315734157351573615737157381573915740157411574215743157441574515746157471574815749157501575115752157531575415755157561575715758157591576015761157621576315764157651576615767157681576915770157711577215773157741577515776157771577815779157801578115782157831578415785157861578715788157891579015791157921579315794157951579615797157981579915800158011580215803158041580515806158071580815809158101581115812158131581415815158161581715818158191582015821158221582315824158251582615827158281582915830158311583215833158341583515836158371583815839158401584115842158431584415845158461584715848158491585015851158521585315854158551585615857158581585915860158611586215863158641586515866158671586815869158701587115872158731587415875158761587715878158791588015881158821588315884158851588615887158881588915890158911589215893158941589515896158971589815899159001590115902159031590415905159061590715908159091591015911159121591315914159151591615917159181591915920159211592215923159241592515926159271592815929159301593115932159331593415935159361593715938159391594015941159421594315944159451594615947159481594915950159511595215953159541595515956159571595815959159601596115962159631596415965159661596715968159691597015971159721597315974159751597615977159781597915980159811598215983159841598515986159871598815989159901599115992159931599415995159961599715998159991600016001160021600316004160051600616007160081600916010160111601216013160141601516016160171601816019160201602116022160231602416025160261602716028160291603016031160321603316034160351603616037160381603916040160411604216043160441604516046160471604816049160501605116052160531605416055160561605716058160591606016061160621606316064160651606616067160681606916070160711607216073160741607516076160771607816079160801608116082160831608416085160861608716088160891609016091160921609316094160951609616097160981609916100161011610216103161041610516106161071610816109161101611116112161131611416115161161611716118161191612016121161221612316124161251612616127161281612916130161311613216133161341613516136161371613816139161401614116142161431614416145161461614716148161491615016151161521615316154161551615616157161581615916160161611616216163161641616516166161671616816169161701617116172161731617416175161761617716178161791618016181161821618316184161851618616187161881618916190161911619216193161941619516196161971619816199162001620116202162031620416205162061620716208162091621016211162121621316214162151621616217162181621916220162211622216223162241622516226162271622816229162301623116232162331623416235162361623716238162391624016241162421624316244162451624616247162481624916250162511625216253162541625516256162571625816259162601626116262162631626416265162661626716268162691627016271162721627316274162751627616277162781627916280162811628216283162841628516286162871628816289162901629116292162931629416295162961629716298162991630016301163021630316304163051630616307163081630916310163111631216313163141631516316163171631816319163201632116322163231632416325163261632716328163291633016331163321633316334163351633616337163381633916340163411634216343163441634516346163471634816349163501635116352163531635416355163561635716358163591636016361163621636316364163651636616367163681636916370163711637216373163741637516376163771637816379163801638116382163831638416385163861638716388163891639016391163921639316394163951639616397163981639916400164011640216403164041640516406164071640816409164101641116412164131641416415164161641716418164191642016421164221642316424164251642616427164281642916430164311643216433164341643516436164371643816439164401644116442164431644416445164461644716448164491645016451164521645316454164551645616457164581645916460164611646216463164641646516466164671646816469164701647116472164731647416475164761647716478164791648016481164821648316484164851648616487164881648916490164911649216493164941649516496164971649816499165001650116502165031650416505165061650716508165091651016511165121651316514165151651616517165181651916520165211652216523165241652516526165271652816529165301653116532165331653416535165361653716538165391654016541165421654316544165451654616547165481654916550165511655216553165541655516556165571655816559165601656116562165631656416565165661656716568165691657016571165721657316574165751657616577165781657916580165811658216583165841658516586165871658816589165901659116592165931659416595165961659716598165991660016601166021660316604166051660616607166081660916610166111661216613166141661516616166171661816619166201662116622166231662416625166261662716628166291663016631166321663316634166351663616637166381663916640166411664216643166441664516646166471664816649166501665116652166531665416655166561665716658166591666016661166621666316664166651666616667166681666916670166711667216673166741667516676166771667816679166801668116682166831668416685166861668716688166891669016691166921669316694166951669616697166981669916700167011670216703167041670516706167071670816709167101671116712167131671416715167161671716718167191672016721167221672316724167251672616727167281672916730167311673216733167341673516736167371673816739167401674116742167431674416745167461674716748167491675016751167521675316754167551675616757167581675916760167611676216763167641676516766167671676816769167701677116772167731677416775167761677716778167791678016781167821678316784167851678616787167881678916790167911679216793167941679516796167971679816799168001680116802168031680416805168061680716808168091681016811168121681316814168151681616817168181681916820168211682216823168241682516826168271682816829168301683116832168331683416835168361683716838168391684016841168421684316844168451684616847168481684916850168511685216853168541685516856168571685816859168601686116862168631686416865168661686716868168691687016871168721687316874168751687616877168781687916880168811688216883168841688516886168871688816889168901689116892168931689416895168961689716898168991690016901169021690316904169051690616907169081690916910169111691216913169141691516916169171691816919169201692116922169231692416925169261692716928169291693016931169321693316934169351693616937169381693916940169411694216943169441694516946169471694816949169501695116952169531695416955169561695716958169591696016961169621696316964169651696616967169681696916970169711697216973169741697516976169771697816979169801698116982169831698416985169861698716988169891699016991169921699316994169951699616997169981699917000170011700217003170041700517006170071700817009170101701117012170131701417015170161701717018170191702017021170221702317024170251702617027170281702917030170311703217033170341703517036170371703817039170401704117042170431704417045170461704717048170491705017051170521705317054170551705617057170581705917060170611706217063170641706517066170671706817069170701707117072170731707417075170761707717078170791708017081170821708317084170851708617087170881708917090170911709217093170941709517096170971709817099171001710117102171031710417105171061710717108171091711017111171121711317114171151711617117171181711917120171211712217123171241712517126171271712817129171301713117132171331713417135171361713717138171391714017141171421714317144171451714617147171481714917150171511715217153171541715517156171571715817159171601716117162171631716417165171661716717168171691717017171171721717317174171751717617177171781717917180171811718217183171841718517186171871718817189171901719117192171931719417195171961719717198171991720017201172021720317204172051720617207172081720917210172111721217213172141721517216172171721817219172201722117222172231722417225172261722717228172291723017231172321723317234172351723617237172381723917240172411724217243172441724517246172471724817249172501725117252172531725417255172561725717258172591726017261172621726317264172651726617267172681726917270172711727217273172741727517276172771727817279172801728117282172831728417285172861728717288172891729017291172921729317294172951729617297172981729917300173011730217303173041730517306
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <?xml-stylesheet type="text/xsl" href="testConf.xsl"?>
  3. <!--
  4. Licensed to the Apache Software Foundation (ASF) under one or more
  5. contributor license agreements. See the NOTICE file distributed with
  6. this work for additional information regarding copyright ownership.
  7. The ASF licenses this file to You under the Apache License, Version 2.0
  8. (the "License"); you may not use this file except in compliance with
  9. the License. You may obtain a copy of the License at
  10. http://www.apache.org/licenses/LICENSE-2.0
  11. Unless required by applicable law or agreed to in writing, software
  12. distributed under the License is distributed on an "AS IS" BASIS,
  13. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  14. See the License for the specific language governing permissions and
  15. limitations under the License.
  16. -->
  17. <configuration>
  18. <!-- Normal mode is test. To run just the commands and dump the output
  19. to the log, set it to nocompare -->
  20. <mode>test</mode>
  21. <!-- Comparator types:
  22. ExactComparator
  23. SubstringComparator
  24. RegexpComparator
  25. TokenComparator
  26. -->
  27. <tests>
  28. <!-- Tests for ls -->
  29. <test> <!-- TESTED -->
  30. <description>ls: file using absolute path</description>
  31. <test-commands>
  32. <command>-fs NAMENODE -touchz /file1</command>
  33. <command>-fs NAMENODE -ls /file1</command>
  34. </test-commands>
  35. <cleanup-commands>
  36. <command>-fs NAMENODE -rm /file1</command>
  37. </cleanup-commands>
  38. <comparators>
  39. <comparator>
  40. <type>RegexpComparator</type>
  41. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/file1</expected-output>
  42. </comparator>
  43. </comparators>
  44. </test>
  45. <test> <!-- TESTED -->
  46. <description>ls: file using relative path</description>
  47. <test-commands>
  48. <command>-fs NAMENODE -mkdir -p dir</command>
  49. <command>-fs NAMENODE -touchz file1</command>
  50. <command>-fs NAMENODE -ls file1</command>
  51. </test-commands>
  52. <cleanup-commands>
  53. <command>-fs NAMENODE -rm file1</command>
  54. </cleanup-commands>
  55. <comparators>
  56. <comparator>
  57. <type>RegexpComparator</type>
  58. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*file1</expected-output>
  59. </comparator>
  60. </comparators>
  61. </test>
  62. <test> <!-- TESTED -->
  63. <description>ls: files using globbing</description>
  64. <test-commands>
  65. <command>-fs NAMENODE -mkdir -p dir</command>
  66. <command>-fs NAMENODE -touchz file1</command>
  67. <command>-fs NAMENODE -touchz file2</command>
  68. <command>-fs NAMENODE -touchz file3</command>
  69. <command>-fs NAMENODE -touchz file4</command>
  70. <command>-fs NAMENODE -ls file*</command>
  71. </test-commands>
  72. <cleanup-commands>
  73. <command>-fs NAMENODE -rm -r /user</command>
  74. </cleanup-commands>
  75. <comparators>
  76. <comparator>
  77. <type>RegexpComparator</type>
  78. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*file1</expected-output>
  79. </comparator>
  80. <comparator>
  81. <type>RegexpComparator</type>
  82. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*file2</expected-output>
  83. </comparator>
  84. <comparator>
  85. <type>RegexpComparator</type>
  86. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*file3</expected-output>
  87. </comparator>
  88. <comparator>
  89. <type>RegexpComparator</type>
  90. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*file4</expected-output>
  91. </comparator>
  92. </comparators>
  93. </test>
  94. <test> <!-- TESTED -->
  95. <description>ls: directory using absolute path</description>
  96. <test-commands>
  97. <command>-fs NAMENODE -mkdir /dir1</command>
  98. <command>-fs NAMENODE -ls /</command>
  99. </test-commands>
  100. <cleanup-commands>
  101. <command>-fs NAMENODE -rm -r /dir1</command>
  102. </cleanup-commands>
  103. <comparators>
  104. <comparator>
  105. <type>RegexpComparator</type>
  106. <expected-output>^drwxr-xr-x( )*-( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir1</expected-output>
  107. </comparator>
  108. </comparators>
  109. </test>
  110. <test> <!-- TESTED -->
  111. <description>ls: directory using relative path</description>
  112. <test-commands>
  113. <command>-fs NAMENODE -mkdir -p dir1</command>
  114. <command>-fs NAMENODE -ls </command>
  115. </test-commands>
  116. <cleanup-commands>
  117. <command>-fs NAMENODE -rm -r dir1</command>
  118. </cleanup-commands>
  119. <comparators>
  120. <comparator>
  121. <type>RegexpComparator</type>
  122. <expected-output>^drwxr-xr-x( )*-( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir1</expected-output>
  123. </comparator>
  124. </comparators>
  125. </test>
  126. <test> <!-- TESTED -->
  127. <description>ls: directory using globbing</description>
  128. <test-commands>
  129. <command>-fs NAMENODE -mkdir -p dir1</command>
  130. <command>-fs NAMENODE -mkdir -p dir2</command>
  131. <command>-fs NAMENODE -mkdir -p dir3</command>
  132. <command>-fs NAMENODE -mkdir -p dir4</command>
  133. <command>-fs NAMENODE -ls </command>
  134. </test-commands>
  135. <cleanup-commands>
  136. <command>-fs NAMENODE -rm -r /user</command>
  137. </cleanup-commands>
  138. <comparators>
  139. <comparator>
  140. <type>RegexpComparator</type>
  141. <expected-output>^drwxr-xr-x( )*-( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir1</expected-output>
  142. </comparator>
  143. <comparator>
  144. <type>RegexpComparator</type>
  145. <expected-output>^drwxr-xr-x( )*-( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir2</expected-output>
  146. </comparator>
  147. <comparator>
  148. <type>RegexpComparator</type>
  149. <expected-output>^drwxr-xr-x( )*-( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir3</expected-output>
  150. </comparator>
  151. <comparator>
  152. <type>RegexpComparator</type>
  153. <expected-output>^drwxr-xr-x( )*-( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir4</expected-output>
  154. </comparator>
  155. </comparators>
  156. </test>
  157. <test> <!-- TESTED -->
  158. <description>ls: file/directory that does not exist in /</description>
  159. <test-commands>
  160. <command>-fs NAMENODE -ls /file1</command>
  161. </test-commands>
  162. <cleanup-commands>
  163. </cleanup-commands>
  164. <comparators>
  165. <comparator>
  166. <type>RegexpComparator</type>
  167. <expected-output>^ls: `/file1': No such file or directory</expected-output>
  168. </comparator>
  169. </comparators>
  170. </test>
  171. <test> <!-- TESTED -->
  172. <description>ls: file/directory that does not exist in home directory (/user/username)</description>
  173. <test-commands>
  174. <command>-fs NAMENODE -ls /user</command>
  175. </test-commands>
  176. <cleanup-commands>
  177. </cleanup-commands>
  178. <comparators>
  179. <comparator>
  180. <type>RegexpComparator</type>
  181. <expected-output>^ls: `/user': No such file or directory</expected-output>
  182. </comparator>
  183. </comparators>
  184. </test>
  185. <test> <!-- TESTED -->
  186. <description>ls: Non-URI input file at Namenode's path</description>
  187. <test-commands>
  188. <command>-fs NAMENODE -touchz NAMENODE/file1</command>
  189. <command>-fs NAMENODE -ls NAMENODE/file1</command>
  190. </test-commands>
  191. <cleanup-commands>
  192. <command>-fs NAMENODE -rm NAMENODE/file1</command>
  193. </cleanup-commands>
  194. <comparators>
  195. <comparator>
  196. <type>RegexpComparator</type>
  197. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/file1</expected-output>
  198. </comparator>
  199. </comparators>
  200. </test>
  201. <test> <!-- TESTED -->
  202. <description>ls: file at hdfs:// path</description>
  203. <test-commands>
  204. <command>-fs NAMENODE -touchz hdfs:///file1</command>
  205. <command>-fs NAMENODE -ls hdfs:///file1</command>
  206. </test-commands>
  207. <cleanup-commands>
  208. <command>-fs NAMENODE -rm hdfs:///file1</command>
  209. </cleanup-commands>
  210. <comparators>
  211. <comparator>
  212. <type>RegexpComparator</type>
  213. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///file1</expected-output>
  214. </comparator>
  215. </comparators>
  216. </test>
  217. <test> <!-- TESTED -->
  218. <description>ls: Non-URI input file at Namenode's path using globing</description>
  219. <test-commands>
  220. <command>-fs NAMENODE -touchz NAMENODE/file1</command>
  221. <command>-fs NAMENODE -touchz NAMENODE/file2</command>
  222. <command>-fs NAMENODE -touchz NAMENODE/file3</command>
  223. <command>-fs NAMENODE -ls NAMENODE/file*</command>
  224. </test-commands>
  225. <cleanup-commands>
  226. <command>-fs NAMENODE -rm NAMENODE/file*</command>
  227. </cleanup-commands>
  228. <comparators>
  229. <comparator>
  230. <type>RegexpComparator</type>
  231. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/file1</expected-output>
  232. </comparator>
  233. <comparator>
  234. <type>RegexpComparator</type>
  235. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/file2</expected-output>
  236. </comparator>
  237. <comparator>
  238. <type>RegexpComparator</type>
  239. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/file3</expected-output>
  240. </comparator>
  241. </comparators>
  242. </test>
  243. <test> <!-- TESTED -->
  244. <description>ls: file at hdfs:// path using globing</description>
  245. <test-commands>
  246. <command>-fs NAMENODE -touchz hdfs:///file1</command>
  247. <command>-fs NAMENODE -touchz hdfs:///file2</command>
  248. <command>-fs NAMENODE -touchz hdfs:///file3</command>
  249. <command>-fs NAMENODE -ls hdfs:///file*</command>
  250. </test-commands>
  251. <cleanup-commands>
  252. <command>-fs NAMENODE -rm hdfs:///file*</command>
  253. </cleanup-commands>
  254. <comparators>
  255. <comparator>
  256. <type>RegexpComparator</type>
  257. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///file1</expected-output>
  258. </comparator>
  259. <comparator>
  260. <type>RegexpComparator</type>
  261. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///file2</expected-output>
  262. </comparator>
  263. <comparator>
  264. <type>RegexpComparator</type>
  265. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///file3</expected-output>
  266. </comparator>
  267. </comparators>
  268. </test>
  269. <test> <!-- TESTED -->
  270. <description>ls: Non-URI input dir at Namenode's path</description>
  271. <test-commands>
  272. <command>-fs NAMENODE -mkdir -p NAMENODE/user/dir1</command>
  273. <command>-fs NAMENODE -ls hdfs:///user/</command>
  274. </test-commands>
  275. <cleanup-commands>
  276. <command>-fs NAMENODE -rm hdfs:///user/dir1</command>
  277. </cleanup-commands>
  278. <comparators>
  279. <comparator>
  280. <type>RegexpComparator</type>
  281. <expected-output>Found [0-9] items</expected-output>
  282. </comparator>
  283. <comparator>
  284. <type>RegexpComparator</type>
  285. <expected-output>^drwxr-xr-x( )*-( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///user/dir1</expected-output>
  286. </comparator>
  287. </comparators>
  288. </test>
  289. <test> <!-- TESTED -->
  290. <description>ls: dir at hdfs:// path</description>
  291. <test-commands>
  292. <command>-fs NAMENODE -mkdir -p hdfs:///user/dir1</command>
  293. <command>-fs NAMENODE -ls hdfs:///user/</command>
  294. </test-commands>
  295. <cleanup-commands>
  296. <command>-fs NAMENODE -rm hdfs:///user/dir1</command>
  297. </cleanup-commands>
  298. <comparators>
  299. <comparator>
  300. <type>RegexpComparator</type>
  301. <expected-output>Found [0-9] items</expected-output>
  302. </comparator>
  303. <comparator>
  304. <type>RegexpComparator</type>
  305. <expected-output>^drwxr-xr-x( )*-( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///user/dir1</expected-output>
  306. </comparator>
  307. </comparators>
  308. </test>
  309. <test> <!-- TESTED -->
  310. <description>ls: Non-URI input dir at Namenode's path using globing</description>
  311. <test-commands>
  312. <command>-fs NAMENODE -mkdir -p NAMENODE/user/dir1</command>
  313. <command>-fs NAMENODE -mkdir -p NAMENODE/user/dir2</command>
  314. <command>-fs NAMENODE -mkdir -p NAMENODE/user/dir3</command>
  315. <command>-fs NAMENODE -ls hdfs:///user/</command>
  316. </test-commands>
  317. <cleanup-commands>
  318. <command>-fs NAMENODE -rm hdfs:///user/dir*</command>
  319. </cleanup-commands>
  320. <comparators>
  321. <comparator>
  322. <type>RegexpComparator</type>
  323. <expected-output>Found [0-9] items</expected-output>
  324. </comparator>
  325. <comparator>
  326. <type>RegexpComparator</type>
  327. <expected-output>^drwxr-xr-x( )*-( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///user/dir1</expected-output>
  328. </comparator>
  329. <comparator>
  330. <type>RegexpComparator</type>
  331. <expected-output>^drwxr-xr-x( )*-( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///user/dir2</expected-output>
  332. </comparator>
  333. <comparator>
  334. <type>RegexpComparator</type>
  335. <expected-output>^drwxr-xr-x( )*-( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///user/dir3</expected-output>
  336. </comparator>
  337. </comparators>
  338. </test>
  339. <test> <!-- TESTED -->
  340. <description>ls: dir at hdfs:// path using globing</description>
  341. <test-commands>
  342. <command>-fs NAMENODE -mkdir -p hdfs:///user/dir1</command>
  343. <command>-fs NAMENODE -mkdir -p hdfs:///user/dir2</command>
  344. <command>-fs NAMENODE -mkdir -p hdfs:///user/dir3</command>
  345. <command>-fs NAMENODE -ls hdfs:///user/</command>
  346. </test-commands>
  347. <cleanup-commands>
  348. <command>-fs NAMENODE -rm hdfs:///user/dir*</command>
  349. </cleanup-commands>
  350. <comparators>
  351. <comparator>
  352. <type>RegexpComparator</type>
  353. <expected-output>Found [0-9] items</expected-output>
  354. </comparator>
  355. <comparator>
  356. <type>RegexpComparator</type>
  357. <expected-output>^drwxr-xr-x( )*-( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///user/dir1</expected-output>
  358. </comparator>
  359. <comparator>
  360. <type>RegexpComparator</type>
  361. <expected-output>^drwxr-xr-x( )*-( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///user/dir2</expected-output>
  362. </comparator>
  363. <comparator>
  364. <type>RegexpComparator</type>
  365. <expected-output>^drwxr-xr-x( )*-( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///user/dir3</expected-output>
  366. </comparator>
  367. </comparators>
  368. </test>
  369. <test> <!-- TESTED -->
  370. <description>ls: non-existent file/directory at hdfs:// path </description>
  371. <test-commands>
  372. <command>-fs NAMENODE -ls hdfs:///file1</command>
  373. </test-commands>
  374. <cleanup-commands>
  375. <!-- no cleanup -->
  376. </cleanup-commands>
  377. <comparators>
  378. <comparator>
  379. <type>RegexpComparator</type>
  380. <expected-output>^ls: `hdfs:///file1': No such file or directory</expected-output>
  381. </comparator>
  382. </comparators>
  383. </test>
  384. <test> <!-- TESTED -->
  385. <description>ls: non-existent file/directory in Namenode's path </description>
  386. <test-commands>
  387. <command>-fs NAMENODE -ls NAMENODE/file1</command>
  388. </test-commands>
  389. <cleanup-commands>
  390. <!-- no cleanup -->
  391. </cleanup-commands>
  392. <comparators>
  393. <comparator>
  394. <type>RegexpComparator</type>
  395. <expected-output>^ls: `hdfs://\w+[-.a-z0-9]*:[0-9]+/file1': No such file or directory</expected-output>
  396. </comparator>
  397. </comparators>
  398. </test>
  399. <test> <!-- TESTED -->
  400. <description>ls: whitespaces in an absolute path to a file</description>
  401. <test-commands>
  402. <command>-fs NAMENODE -mkdir -p "/a path with/whitespaces in directories"</command>
  403. <command>-fs NAMENODE -touchz "/a path with/whitespaces in directories/and file names"</command>
  404. <command>-fs NAMENODE -ls "/a path with/whitespaces in directories"</command>
  405. </test-commands>
  406. <cleanup-commands>
  407. <command>-fs NAMENODE -rm -r "/a path with"</command>
  408. </cleanup-commands>
  409. <comparators>
  410. <comparator>
  411. <type>RegexpComparator</type>
  412. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/a path with/whitespaces in directories/and file names</expected-output>
  413. </comparator>
  414. </comparators>
  415. </test>
  416. <test> <!-- TESTED -->
  417. <description>ls: whitespaces in a relative path to a file</description>
  418. <test-commands>
  419. <command>-fs NAMENODE -mkdir -p "a path with/whitespaces in directories"</command>
  420. <command>-fs NAMENODE -touchz "a path with/whitespaces in directories/and file names"</command>
  421. <command>-fs NAMENODE -ls "a path with/whitespaces in directories"</command>
  422. </test-commands>
  423. <cleanup-commands>
  424. <command>-fs NAMENODE -rm -r "a path with"</command>
  425. </cleanup-commands>
  426. <comparators>
  427. <comparator>
  428. <type>RegexpComparator</type>
  429. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*a path with/whitespaces in directories/and file names</expected-output>
  430. </comparator>
  431. </comparators>
  432. </test>
  433. <test> <!-- TESTED -->
  434. <description>ls: whitespaces in a scheme-qualified path to a file</description>
  435. <test-commands>
  436. <command>-fs NAMENODE -mkdir -p "NAMENODE/a path with/whitespaces in directories"</command>
  437. <command>-fs NAMENODE -touchz "NAMENODE/a path with/whitespaces in directories/and file names"</command>
  438. <command>-fs NAMENODE -ls "NAMENODE/a path with/whitespaces in directories"</command>
  439. </test-commands>
  440. <cleanup-commands>
  441. <command>-fs NAMENODE -rm -r "NAMENODE/a path with"</command>
  442. </cleanup-commands>
  443. <comparators>
  444. <comparator>
  445. <type>RegexpComparator</type>
  446. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/a path with/whitespaces in directories/and file names</expected-output>
  447. </comparator>
  448. </comparators>
  449. </test>
  450. <test> <!-- TESTED -->
  451. <description>ls: whitespaces in an absolute path to a file, using globbing</description>
  452. <test-commands>
  453. <command>-fs NAMENODE -mkdir -p "/a path with/whitespaces in directories"</command>
  454. <command>-fs NAMENODE -touchz "/a path with/whitespaces in directories/and file names"</command>
  455. <command>-fs NAMENODE -touchz "/a path with/whitespaces in directories/and file names 2"</command>
  456. <command>-fs NAMENODE -ls "/a*/w*"</command>
  457. </test-commands>
  458. <cleanup-commands>
  459. <command>-fs NAMENODE -rm -r "/a path with"</command>
  460. </cleanup-commands>
  461. <comparators>
  462. <comparator>
  463. <type>TokenComparator</type>
  464. <expected-output>Found 2 items</expected-output>
  465. </comparator>
  466. <comparator>
  467. <type>RegexpComparator</type>
  468. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/a path with/whitespaces in directories/and file names</expected-output>
  469. </comparator>
  470. <comparator>
  471. <type>RegexpComparator</type>
  472. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/a path with/whitespaces in directories/and file names 2</expected-output>
  473. </comparator>
  474. </comparators>
  475. </test>
  476. <test> <!-- TESTED -->
  477. <description>ls: whitespaces in a relative path to a file, using globbing</description>
  478. <test-commands>
  479. <command>-fs NAMENODE -mkdir -p "a path with/whitespaces in directories"</command>
  480. <command>-fs NAMENODE -touchz "a path with/whitespaces in directories/and file names"</command>
  481. <command>-fs NAMENODE -touchz "a path with/whitespaces in directories/and file names 2"</command>
  482. <command>-fs NAMENODE -ls "a*/w*"</command>
  483. </test-commands>
  484. <cleanup-commands>
  485. <command>-fs NAMENODE -rm -r "a path with"</command>
  486. </cleanup-commands>
  487. <comparators>
  488. <comparator>
  489. <type>TokenComparator</type>
  490. <expected-output>Found 2 items</expected-output>
  491. </comparator>
  492. <comparator>
  493. <type>RegexpComparator</type>
  494. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*a path with/whitespaces in directories/and file names</expected-output>
  495. </comparator>
  496. <comparator>
  497. <type>RegexpComparator</type>
  498. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*a path with/whitespaces in directories/and file names 2</expected-output>
  499. </comparator>
  500. </comparators>
  501. </test>
  502. <test> <!-- TESTED -->
  503. <description>ls: whitespaces in a scheme-qualified path to a file, using globbing</description>
  504. <test-commands>
  505. <command>-fs NAMENODE -mkdir -p "NAMENODE/a path with/whitespaces in directories"</command>
  506. <command>-fs NAMENODE -touchz "NAMENODE/a path with/whitespaces in directories/and file names"</command>
  507. <command>-fs NAMENODE -touchz "NAMENODE/a path with/whitespaces in directories/and file names 2"</command>
  508. <command>-fs NAMENODE -ls "NAMENODE/a*/w*"</command>
  509. </test-commands>
  510. <cleanup-commands>
  511. <command>-fs NAMENODE -rm -r "NAMENODE/a path with"</command>
  512. </cleanup-commands>
  513. <comparators>
  514. <comparator>
  515. <type>TokenComparator</type>
  516. <expected-output>Found 2 items</expected-output>
  517. </comparator>
  518. <comparator>
  519. <type>RegexpComparator</type>
  520. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/a path with/whitespaces in directories/and file names</expected-output>
  521. </comparator>
  522. <comparator>
  523. <type>RegexpComparator</type>
  524. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/a path with/whitespaces in directories/and file names 2</expected-output>
  525. </comparator>
  526. </comparators>
  527. </test>
  528. <!-- Tests for ls -R -->
  529. <test> <!-- TESTED -->
  530. <description>ls: files/directories using absolute path</description>
  531. <test-commands>
  532. <command>-fs NAMENODE -mkdir /dir0</command>
  533. <command>-fs NAMENODE -mkdir /dir0/dir1</command>
  534. <command>-fs NAMENODE -mkdir /dir0/dir1/dir1</command>
  535. <command>-fs NAMENODE -mkdir /dir0/dir1/dir2</command>
  536. <command>-fs NAMENODE -mkdir /dir0/dir2</command>
  537. <command>-fs NAMENODE -mkdir /dir0/dir2/dir1</command>
  538. <command>-fs NAMENODE -mkdir /dir0/dir2/dir2</command>
  539. <command>-fs NAMENODE -touchz /dir0/file0</command>
  540. <command>-fs NAMENODE -touchz /dir0/dir1/file1</command>
  541. <command>-fs NAMENODE -touchz /dir0/dir1/file2</command>
  542. <command>-fs NAMENODE -touchz /dir0/dir2/file1</command>
  543. <command>-fs NAMENODE -touchz /dir0/dir2/file2</command>
  544. <command>-fs NAMENODE -touchz /dir0/dir1/dir1/file1</command>
  545. <command>-fs NAMENODE -touchz /dir0/dir1/dir1/file2</command>
  546. <command>-fs NAMENODE -touchz /dir0/dir2/dir2/file1</command>
  547. <command>-fs NAMENODE -touchz /dir0/dir2/dir2/file2</command>
  548. <command>-fs NAMENODE -ls -R /dir0</command>
  549. </test-commands>
  550. <cleanup-commands>
  551. <command>-fs NAMENODE -rm -r /dir0</command>
  552. </cleanup-commands>
  553. <comparators>
  554. <comparator>
  555. <type>RegexpComparator</type>
  556. <expected-output>^drwxr-xr-x( )*-( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1</expected-output>
  557. </comparator>
  558. <comparator>
  559. <type>RegexpComparator</type>
  560. <expected-output>^drwxr-xr-x( )*-( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir2</expected-output>
  561. </comparator>
  562. <comparator>
  563. <type>RegexpComparator</type>
  564. <expected-output>^drwxr-xr-x( )*-( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1/dir1</expected-output>
  565. </comparator>
  566. <comparator>
  567. <type>RegexpComparator</type>
  568. <expected-output>^drwxr-xr-x( )*-( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1/dir2</expected-output>
  569. </comparator>
  570. <comparator>
  571. <type>RegexpComparator</type>
  572. <expected-output>^drwxr-xr-x( )*-( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir2/dir1</expected-output>
  573. </comparator>
  574. <comparator>
  575. <type>RegexpComparator</type>
  576. <expected-output>^drwxr-xr-x( )*-( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir2/dir2</expected-output>
  577. </comparator>
  578. <comparator>
  579. <type>RegexpComparator</type>
  580. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/file0</expected-output>
  581. </comparator>
  582. <comparator>
  583. <type>RegexpComparator</type>
  584. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1/file1</expected-output>
  585. </comparator>
  586. <comparator>
  587. <type>RegexpComparator</type>
  588. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1/file2</expected-output>
  589. </comparator>
  590. <comparator>
  591. <type>RegexpComparator</type>
  592. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir2/file1</expected-output>
  593. </comparator>
  594. <comparator>
  595. <type>RegexpComparator</type>
  596. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir2/file2</expected-output>
  597. </comparator>
  598. <comparator>
  599. <type>RegexpComparator</type>
  600. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1/dir1/file1</expected-output>
  601. </comparator>
  602. <comparator>
  603. <type>RegexpComparator</type>
  604. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1/dir1/file2</expected-output>
  605. </comparator>
  606. <comparator>
  607. <type>RegexpComparator</type>
  608. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir2/dir2/file1</expected-output>
  609. </comparator>
  610. <comparator>
  611. <type>RegexpComparator</type>
  612. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir2/dir2/file2</expected-output>
  613. </comparator>
  614. </comparators>
  615. </test>
  616. <test> <!-- TESTED -->
  617. <description>ls: files/directories using relative path</description>
  618. <test-commands>
  619. <command>-fs NAMENODE -mkdir -p dir0</command>
  620. <command>-fs NAMENODE -mkdir -p dir0/dir1</command>
  621. <command>-fs NAMENODE -mkdir -p dir0/dir1/dir1</command>
  622. <command>-fs NAMENODE -mkdir -p dir0/dir1/dir2</command>
  623. <command>-fs NAMENODE -mkdir -p dir0/dir2</command>
  624. <command>-fs NAMENODE -mkdir -p dir0/dir2/dir1</command>
  625. <command>-fs NAMENODE -mkdir -p dir0/dir2/dir2</command>
  626. <command>-fs NAMENODE -touchz dir0/file0</command>
  627. <command>-fs NAMENODE -touchz dir0/dir1/file1</command>
  628. <command>-fs NAMENODE -touchz dir0/dir1/file2</command>
  629. <command>-fs NAMENODE -touchz dir0/dir2/file1</command>
  630. <command>-fs NAMENODE -touchz dir0/dir2/file2</command>
  631. <command>-fs NAMENODE -touchz dir0/dir1/dir1/file1</command>
  632. <command>-fs NAMENODE -touchz dir0/dir1/dir1/file2</command>
  633. <command>-fs NAMENODE -touchz dir0/dir2/dir2/file1</command>
  634. <command>-fs NAMENODE -touchz dir0/dir2/dir2/file2</command>
  635. <command>-fs NAMENODE -ls -R dir0</command>
  636. </test-commands>
  637. <cleanup-commands>
  638. <command>-fs NAMENODE -rm -r /user</command>
  639. </cleanup-commands>
  640. <comparators>
  641. <comparator>
  642. <type>RegexpComparator</type>
  643. <expected-output>^drwxr-xr-x( )*-( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/dir1</expected-output>
  644. </comparator>
  645. <comparator>
  646. <type>RegexpComparator</type>
  647. <expected-output>^drwxr-xr-x( )*-( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/dir2</expected-output>
  648. </comparator>
  649. <comparator>
  650. <type>RegexpComparator</type>
  651. <expected-output>^drwxr-xr-x( )*-( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/dir1/dir1</expected-output>
  652. </comparator>
  653. <comparator>
  654. <type>RegexpComparator</type>
  655. <expected-output>^drwxr-xr-x( )*-( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/dir1/dir2</expected-output>
  656. </comparator>
  657. <comparator>
  658. <type>RegexpComparator</type>
  659. <expected-output>^drwxr-xr-x( )*-( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/dir2/dir1</expected-output>
  660. </comparator>
  661. <comparator>
  662. <type>RegexpComparator</type>
  663. <expected-output>^drwxr-xr-x( )*-( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/dir2/dir2</expected-output>
  664. </comparator>
  665. <comparator>
  666. <type>RegexpComparator</type>
  667. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/file0</expected-output>
  668. </comparator>
  669. <comparator>
  670. <type>RegexpComparator</type>
  671. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/dir1/file1</expected-output>
  672. </comparator>
  673. <comparator>
  674. <type>RegexpComparator</type>
  675. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/dir1/file2</expected-output>
  676. </comparator>
  677. <comparator>
  678. <type>RegexpComparator</type>
  679. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/dir2/file1</expected-output>
  680. </comparator>
  681. <comparator>
  682. <type>RegexpComparator</type>
  683. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/dir2/file2</expected-output>
  684. </comparator>
  685. <comparator>
  686. <type>RegexpComparator</type>
  687. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/dir1/dir1/file1</expected-output>
  688. </comparator>
  689. <comparator>
  690. <type>RegexpComparator</type>
  691. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/dir1/dir1/file2</expected-output>
  692. </comparator>
  693. <comparator>
  694. <type>RegexpComparator</type>
  695. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/dir2/dir2/file1</expected-output>
  696. </comparator>
  697. <comparator>
  698. <type>RegexpComparator</type>
  699. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/dir2/dir2/file2</expected-output>
  700. </comparator>
  701. </comparators>
  702. </test>
  703. <test> <!-- TESTED -->
  704. <description>ls: files/directories using globbing</description>
  705. <test-commands>
  706. <command>-fs NAMENODE -mkdir -p dir0</command>
  707. <command>-fs NAMENODE -mkdir -p dir0/dir1</command>
  708. <command>-fs NAMENODE -mkdir -p dir0/dir1/dir1</command>
  709. <command>-fs NAMENODE -mkdir -p dir0/dir1/dir2</command>
  710. <command>-fs NAMENODE -mkdir -p dir0/dir2</command>
  711. <command>-fs NAMENODE -mkdir -p dir0/dir2/dir1</command>
  712. <command>-fs NAMENODE -mkdir -p dir0/dir2/dir2</command>
  713. <command>-fs NAMENODE -touchz dir0/file0</command>
  714. <command>-fs NAMENODE -touchz dir0/dir1/file1</command>
  715. <command>-fs NAMENODE -touchz dir0/dir1/file2</command>
  716. <command>-fs NAMENODE -touchz dir0/dir2/file1</command>
  717. <command>-fs NAMENODE -touchz dir0/dir2/file2</command>
  718. <command>-fs NAMENODE -touchz dir0/dir1/dir1/file1</command>
  719. <command>-fs NAMENODE -touchz dir0/dir1/dir1/file2</command>
  720. <command>-fs NAMENODE -touchz dir0/dir2/dir2/file1</command>
  721. <command>-fs NAMENODE -touchz dir0/dir2/dir2/file2</command>
  722. <command>-fs NAMENODE -ls -R dir0/*</command>
  723. </test-commands>
  724. <cleanup-commands>
  725. <command>-fs NAMENODE -rm -r /user</command>
  726. </cleanup-commands>
  727. <comparators>
  728. <!-- JIRA?
  729. <comparator>
  730. <type>RegexpComparator</type>
  731. <expected-output>^/user/[a-zA-z0-9]*/dir0/dir1</expected-output>
  732. </comparator>
  733. <comparator>
  734. <type>RegexpComparator</type>
  735. <expected-output>^/user/[a-zA-z0-9]*/dir0/dir2</expected-output>
  736. </comparator>
  737. -->
  738. <comparator>
  739. <type>RegexpComparator</type>
  740. <expected-output>^drwxr-xr-x( )*-( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/dir1/dir1</expected-output>
  741. </comparator>
  742. <comparator>
  743. <type>RegexpComparator</type>
  744. <expected-output>^drwxr-xr-x( )*-( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/dir1/dir2</expected-output>
  745. </comparator>
  746. <comparator>
  747. <type>RegexpComparator</type>
  748. <expected-output>^drwxr-xr-x( )*-( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/dir2/dir1</expected-output>
  749. </comparator>
  750. <comparator>
  751. <type>RegexpComparator</type>
  752. <expected-output>^drwxr-xr-x( )*-( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/dir2/dir2</expected-output>
  753. </comparator>
  754. <comparator>
  755. <type>RegexpComparator</type>
  756. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/file0</expected-output>
  757. </comparator>
  758. <comparator>
  759. <type>RegexpComparator</type>
  760. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/dir1/file1</expected-output>
  761. </comparator>
  762. <comparator>
  763. <type>RegexpComparator</type>
  764. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/dir1/file2</expected-output>
  765. </comparator>
  766. <comparator>
  767. <type>RegexpComparator</type>
  768. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/dir2/file1</expected-output>
  769. </comparator>
  770. <comparator>
  771. <type>RegexpComparator</type>
  772. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/dir2/file2</expected-output>
  773. </comparator>
  774. <comparator>
  775. <type>RegexpComparator</type>
  776. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/dir1/dir1/file1</expected-output>
  777. </comparator>
  778. <comparator>
  779. <type>RegexpComparator</type>
  780. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/dir1/dir1/file2</expected-output>
  781. </comparator>
  782. <comparator>
  783. <type>RegexpComparator</type>
  784. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/dir2/dir2/file1</expected-output>
  785. </comparator>
  786. <comparator>
  787. <type>RegexpComparator</type>
  788. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/dir2/dir2/file2</expected-output>
  789. </comparator>
  790. </comparators>
  791. </test>
  792. <test> <!-- TESTED -->
  793. <description>ls: file/directory that does not exist in /</description>
  794. <test-commands>
  795. <command>-fs NAMENODE -ls -R /file1</command>
  796. </test-commands>
  797. <cleanup-commands>
  798. </cleanup-commands>
  799. <comparators>
  800. <comparator>
  801. <type>RegexpComparator</type>
  802. <expected-output>^ls: `/file1': No such file or directory</expected-output>
  803. </comparator>
  804. </comparators>
  805. </test>
  806. <test> <!-- TESTED -->
  807. <description>ls: file/directory that does not exist in home directory (/user/username)</description>
  808. <test-commands>
  809. <command>-fs NAMENODE -ls -R /user</command>
  810. </test-commands>
  811. <cleanup-commands>
  812. </cleanup-commands>
  813. <comparators>
  814. <comparator>
  815. <type>RegexpComparator</type>
  816. <expected-output>^ls: `/user': No such file or directory</expected-output>
  817. </comparator>
  818. </comparators>
  819. </test>
  820. <test> <!-- TESTED -->
  821. <description>ls: dir at hdfs:// path</description>
  822. <test-commands>
  823. <command>-fs NAMENODE -mkdir hdfs:///dir0</command>
  824. <command>-fs NAMENODE -mkdir hdfs:///dir0/dir1</command>
  825. <command>-fs NAMENODE -touchz hdfs:///file1</command>
  826. <command>-fs NAMENODE -touchz hdfs:///dir0/file1</command>
  827. <command>-fs NAMENODE -touchz hdfs:///dir0/dir1/file1</command>
  828. <command>-fs NAMENODE -ls -R hdfs:///</command>
  829. </test-commands>
  830. <cleanup-commands>
  831. <command>-fs NAMENODE -rm hdfs:///dir0</command>
  832. <command>-fs NAMENODE -rm hdfs:///file1</command>
  833. </cleanup-commands>
  834. <comparators>
  835. <comparator>
  836. <type>RegexpComparator</type>
  837. <expected-output>^drwxr-xr-x( )*-( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir0</expected-output>
  838. </comparator>
  839. <comparator>
  840. <type>RegexpComparator</type>
  841. <expected-output>^drwxr-xr-x( )*-( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir0/dir1</expected-output>
  842. </comparator>
  843. <comparator>
  844. <type>RegexpComparator</type>
  845. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///file1</expected-output>
  846. </comparator>
  847. <comparator>
  848. <type>RegexpComparator</type>
  849. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir0/file1</expected-output>
  850. </comparator>
  851. <comparator>
  852. <type>RegexpComparator</type>
  853. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir0/dir1/file1</expected-output>
  854. </comparator>
  855. </comparators>
  856. </test>
  857. <test> <!-- TESTED -->
  858. <description>ls: files/directories in hdfs:// path using globbing</description>
  859. <test-commands>
  860. <command>-fs NAMENODE -mkdir hdfs:///dir0</command>
  861. <command>-fs NAMENODE -mkdir hdfs:///dir0/dir1</command>
  862. <command>-fs NAMENODE -touchz hdfs:///dir0/file1</command>
  863. <command>-fs NAMENODE -touchz hdfs:///dir0/dir1/file1</command>
  864. <command>-fs NAMENODE -ls -R hdfs:///dir0/*</command>
  865. </test-commands>
  866. <cleanup-commands>
  867. <command>-fs NAMENODE -rm -r hdfs:///dir0</command>
  868. </cleanup-commands>
  869. <comparators>
  870. <comparator>
  871. <type>RegexpComparator</type>
  872. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir0/file1</expected-output>
  873. </comparator>
  874. <comparator>
  875. <type>RegexpComparator</type>
  876. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir0/dir1/file1</expected-output>
  877. </comparator>
  878. </comparators>
  879. </test>
  880. <test> <!-- TESTED -->
  881. <description>ls: Non-existent file/directory in hdfs:// path</description>
  882. <test-commands>
  883. <command>-fs NAMENODE -ls -R hdfs:///file1</command>
  884. </test-commands>
  885. <cleanup-commands>
  886. </cleanup-commands>
  887. <comparators>
  888. <comparator>
  889. <type>RegexpComparator</type>
  890. <expected-output>^ls: `hdfs:///file1': No such file or directory</expected-output>
  891. </comparator>
  892. </comparators>
  893. </test>
  894. <test> <!-- TESTED -->
  895. <description>ls: dir at Namenode's path</description>
  896. <test-commands>
  897. <command>-fs NAMENODE -mkdir NAMENODE/dir0</command>
  898. <command>-fs NAMENODE -mkdir NAMENODE/dir0/dir1</command>
  899. <command>-fs NAMENODE -touchz NAMENODE/file1</command>
  900. <command>-fs NAMENODE -touchz NAMENODE/dir0/file1</command>
  901. <command>-fs NAMENODE -touchz NAMENODE/dir0/dir1/file1</command>
  902. <command>-fs NAMENODE -ls -R NAMENODE/</command>
  903. </test-commands>
  904. <cleanup-commands>
  905. <command>-fs NAMENODE -rm hdfs:///dir0</command>
  906. <command>-fs NAMENODE -rm hdfs:///file1</command>
  907. </cleanup-commands>
  908. <comparators>
  909. <comparator>
  910. <type>RegexpComparator</type>
  911. <expected-output>^drwxr-xr-x( )*-( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir0</expected-output>
  912. </comparator>
  913. <comparator>
  914. <type>RegexpComparator</type>
  915. <expected-output>^drwxr-xr-x( )*-( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir0/dir1</expected-output>
  916. </comparator>
  917. <comparator>
  918. <type>RegexpComparator</type>
  919. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/file1</expected-output>
  920. </comparator>
  921. <comparator>
  922. <type>RegexpComparator</type>
  923. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir0/file1</expected-output>
  924. </comparator>
  925. <comparator>
  926. <type>RegexpComparator</type>
  927. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir0/dir1/file1</expected-output>
  928. </comparator>
  929. </comparators>
  930. </test>
  931. <test> <!-- TESTED -->
  932. <description>ls: Non-URI input files/directories in Namenode's path </description>
  933. <test-commands>
  934. <command>-fs NAMENODE -mkdir NAMENODE/dir0</command>
  935. <command>-fs NAMENODE -mkdir NAMENODE/dir0/dir1</command>
  936. <command>-fs NAMENODE -touchz NAMENODE/dir0/file1</command>
  937. <command>-fs NAMENODE -touchz NAMENODE/dir0/dir1/file1</command>
  938. <command>-fs NAMENODE -ls -R NAMENODE/dir0/*</command>
  939. </test-commands>
  940. <cleanup-commands>
  941. <command>-fs NAMENODE -rm -r NAMENODE/dir0</command>
  942. </cleanup-commands>
  943. <comparators>
  944. <comparator>
  945. <type>RegexpComparator</type>
  946. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir0/file1</expected-output>
  947. </comparator>
  948. <comparator>
  949. <type>RegexpComparator</type>
  950. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir0/dir1/file1</expected-output>
  951. </comparator>
  952. </comparators>
  953. </test>
  954. <test> <!-- TESTED -->
  955. <description>ls: Non-URI input for non-existent file/directory in Namenode's path </description>
  956. <test-commands>
  957. <command>-fs NAMENODE -ls -R NAMENODE/file1</command>
  958. </test-commands>
  959. <cleanup-commands>
  960. </cleanup-commands>
  961. <comparators>
  962. <comparator>
  963. <type>RegexpComparator</type>
  964. <expected-output>^ls: `hdfs://\w+[-.a-z0-9]*:[0-9]+/file1': No such file or directory</expected-output>
  965. </comparator>
  966. </comparators>
  967. </test>
  968. <test> <!-- TESTED -->
  969. <description>ls: Negative test for quoted /*/* globbing </description>
  970. <windows>false</windows>
  971. <test-commands>
  972. <command>-fs NAMENODE -mkdir /dir0</command>
  973. <command>-fs NAMENODE -mkdir /dir0/dir1</command>
  974. <command>-fs NAMENODE -touchz /dir0/dir1/file1</command>
  975. <command>-fs NAMENODE -ls -R /\*/\*</command>
  976. </test-commands>
  977. <cleanup-commands>
  978. <command>-fs NAMENODE -rm -r /dir0</command>
  979. </cleanup-commands>
  980. <comparators>
  981. <comparator>
  982. <type>TokenComparator</type>
  983. <expected-output>ls: `/*/*': No such file or directory</expected-output>
  984. </comparator>
  985. </comparators>
  986. </test>
  987. <test> <!-- TESTED -->
  988. <description>ls: Test for quoted globbing </description>
  989. <windows>false</windows>
  990. <test-commands>
  991. <command>-fs NAMENODE -mkdir /dir0</command>
  992. <command>-fs NAMENODE -mkdir /dir0/\*</command>
  993. <command>-fs NAMENODE -touchz /dir0/\*/file</command>
  994. <command>-fs NAMENODE -touchz /dir0/dir1/file1</command>
  995. <command>-fs NAMENODE -ls -R /dir0/\*</command>
  996. </test-commands>
  997. <cleanup-commands>
  998. <command>-fs NAMENODE -rm -r /dir0</command>
  999. </cleanup-commands>
  1000. <comparators>
  1001. <comparator>
  1002. <type>RegexpComparator</type>
  1003. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/\*/file</expected-output>
  1004. </comparator>
  1005. </comparators>
  1006. </test>
  1007. <test> <!-- TESTED -->
  1008. <description>ls: files sorted in default order</description>
  1009. <test-commands>
  1010. <command>-fs NAMENODE -mkdir /dir</command>
  1011. <command>-fs NAMENODE -touchz /dir/file2 /dir/file1 /dir/file3</command>
  1012. <command>-fs NAMENODE -ls /dir</command>
  1013. </test-commands>
  1014. <cleanup-commands>
  1015. <command>-fs NAMENODE -rm -r /dir</command>
  1016. </cleanup-commands>
  1017. <comparators>
  1018. <comparator>
  1019. <type>RegexpAcrossOutputComparator</type>
  1020. <expected-output>Found 3 items
  1021. -rw-r--r--( )*1( )*[a-zA-z0-9]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir/file1
  1022. -rw-r--r--( )*1( )*[a-zA-z0-9]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir/file2
  1023. -rw-r--r--( )*1( )*[a-zA-z0-9]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir/file3</expected-output>
  1024. </comparator>
  1025. </comparators>
  1026. </test>
  1027. <test> <!-- TESTED -->
  1028. <description>ls: files sorted in reverse default order</description>
  1029. <test-commands>
  1030. <command>-fs NAMENODE -mkdir /dir</command>
  1031. <command>-fs NAMENODE -touchz /dir/file2 /dir/file1 /dir/file3</command>
  1032. <command>-fs NAMENODE -ls -r /dir</command>
  1033. </test-commands>
  1034. <cleanup-commands>
  1035. <command>-fs NAMENODE -rm -r /dir</command>
  1036. </cleanup-commands>
  1037. <comparators>
  1038. <comparator>
  1039. <type>RegexpAcrossOutputComparator</type>
  1040. <expected-output>Found 3 items
  1041. -rw-r--r--( )*1( )*[a-zA-z0-9]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir/file3
  1042. -rw-r--r--( )*1( )*[a-zA-z0-9]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir/file2
  1043. -rw-r--r--( )*1( )*[a-zA-z0-9]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir/file1</expected-output>
  1044. </comparator>
  1045. </comparators>
  1046. </test>
  1047. <test> <!-- TESTED -->
  1048. <description>ls: files sorted in size order</description>
  1049. <test-commands>
  1050. <command>-fs NAMENODE -mkdir /dir</command>
  1051. <command>-fs NAMENODE -put CLITEST_DATA/data30bytes /dir/data30bytes</command>
  1052. <command>-fs NAMENODE -put CLITEST_DATA/data15bytes /dir/data15bytes</command>
  1053. <command>-fs NAMENODE -put CLITEST_DATA/data120bytes /dir/data120bytes</command>
  1054. <command>-fs NAMENODE -put CLITEST_DATA/data60bytes /dir/data60bytes</command>
  1055. <command>-fs NAMENODE -ls -S /dir</command>
  1056. </test-commands>
  1057. <cleanup-commands>
  1058. <command>-fs NAMENODE -rm -r /dir</command>
  1059. </cleanup-commands>
  1060. <comparators>
  1061. <comparator>
  1062. <type>RegexpAcrossOutputComparator</type>
  1063. <expected-output>Found 4 items
  1064. -rw-r--r--( )*1( )*[a-zA-z0-9]*( )*supergroup( )*120( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir/data120bytes
  1065. -rw-r--r--( )*1( )*[a-zA-z0-9]*( )*supergroup( )*60( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir/data60bytes
  1066. -rw-r--r--( )*1( )*[a-zA-z0-9]*( )*supergroup( )*30( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir/data30bytes
  1067. -rw-r--r--( )*1( )*[a-zA-z0-9]*( )*supergroup( )*15( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir/data15bytes</expected-output>
  1068. </comparator>
  1069. </comparators>
  1070. </test>
  1071. <test> <!-- TESTED -->
  1072. <description>ls: files sorted in reverse size order</description>
  1073. <test-commands>
  1074. <command>-fs NAMENODE -mkdir /dir</command>
  1075. <command>-fs NAMENODE -put CLITEST_DATA/data30bytes /dir/data30bytes</command>
  1076. <command>-fs NAMENODE -put CLITEST_DATA/data15bytes /dir/data15bytes</command>
  1077. <command>-fs NAMENODE -put CLITEST_DATA/data120bytes /dir/data120bytes</command>
  1078. <command>-fs NAMENODE -put CLITEST_DATA/data60bytes /dir/data60bytes</command>
  1079. <command>-fs NAMENODE -ls -S -r /dir</command>
  1080. </test-commands>
  1081. <cleanup-commands>
  1082. <command>-fs NAMENODE -rm -r /dir</command>
  1083. </cleanup-commands>
  1084. <comparators>
  1085. <comparator>
  1086. <type>RegexpAcrossOutputComparator</type>
  1087. <expected-output>Found 4 items
  1088. -rw-r--r--( )*1( )*[a-zA-z0-9]*( )*supergroup( )*15( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir/data15bytes
  1089. -rw-r--r--( )*1( )*[a-zA-z0-9]*( )*supergroup( )*30( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir/data30bytes
  1090. -rw-r--r--( )*1( )*[a-zA-z0-9]*( )*supergroup( )*60( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir/data60bytes
  1091. -rw-r--r--( )*1( )*[a-zA-z0-9]*( )*supergroup( )*120( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir/data120bytes</expected-output>
  1092. </comparator>
  1093. </comparators>
  1094. </test>
  1095. <test> <!-- TESTED -->
  1096. <description>ls: files sorted in modification order</description>
  1097. <!-- this test assumes that the files take > 1ms each to create -->
  1098. <test-commands>
  1099. <command>-fs NAMENODE -mkdir /dir</command>
  1100. <command>-fs NAMENODE -touchz /dir/first</command>
  1101. <command>-fs NAMENODE -touchz /dir/second</command>
  1102. <command>-fs NAMENODE -touchz /dir/third</command>
  1103. <command>-fs NAMENODE -touchz /dir/fourth</command>
  1104. <command>-fs NAMENODE -touchz /dir/fifth</command>
  1105. <command>-fs NAMENODE -ls -t /dir</command>
  1106. </test-commands>
  1107. <cleanup-commands>
  1108. <command>-fs NAMENODE -rm -r /dir</command>
  1109. </cleanup-commands>
  1110. <comparators>
  1111. <comparator>
  1112. <type>RegexpAcrossOutputComparator</type>
  1113. <expected-output>Found 5 items
  1114. -rw-r--r--( )*1( )*[a-zA-z0-9]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir/fifth
  1115. -rw-r--r--( )*1( )*[a-zA-z0-9]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir/fourth
  1116. -rw-r--r--( )*1( )*[a-zA-z0-9]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir/third
  1117. -rw-r--r--( )*1( )*[a-zA-z0-9]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir/second
  1118. -rw-r--r--( )*1( )*[a-zA-z0-9]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir/first</expected-output>
  1119. </comparator>
  1120. </comparators>
  1121. </test>
  1122. <test> <!-- TESTED -->
  1123. <description>ls: files sorted in reverse modification order</description>
  1124. <!-- this test assumes that the files take > 1ms each to create -->
  1125. <test-commands>
  1126. <command>-fs NAMENODE -mkdir /dir</command>
  1127. <command>-fs NAMENODE -touchz /dir/first</command>
  1128. <command>-fs NAMENODE -touchz /dir/second</command>
  1129. <command>-fs NAMENODE -touchz /dir/third</command>
  1130. <command>-fs NAMENODE -touchz /dir/fourth</command>
  1131. <command>-fs NAMENODE -touchz /dir/fifth</command>
  1132. <command>-fs NAMENODE -ls -t -r /dir</command>
  1133. </test-commands>
  1134. <cleanup-commands>
  1135. <command>-fs NAMENODE -rm -r /dir</command>
  1136. </cleanup-commands>
  1137. <comparators>
  1138. <comparator>
  1139. <type>RegexpAcrossOutputComparator</type>
  1140. <expected-output>Found 5 items
  1141. -rw-r--r--( )*1( )*[a-zA-z0-9]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir/first
  1142. -rw-r--r--( )*1( )*[a-zA-z0-9]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir/second
  1143. -rw-r--r--( )*1( )*[a-zA-z0-9]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir/third
  1144. -rw-r--r--( )*1( )*[a-zA-z0-9]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir/fourth
  1145. -rw-r--r--( )*1( )*[a-zA-z0-9]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir/fifth</expected-output>
  1146. </comparator>
  1147. </comparators>
  1148. </test>
  1149. <test> <!-- TESTED -->
  1150. <description>rm: Test for quoted globbing </description>
  1151. <windows>false</windows>
  1152. <test-commands>
  1153. <command>-fs NAMENODE -mkdir /dir0</command>
  1154. <command>-fs NAMENODE -mkdir /dir0/\*</command>
  1155. <command>-fs NAMENODE -touchz /dir0/\*/file</command>
  1156. <command>-fs NAMENODE -mkdir /dir0/dir1/</command>
  1157. <command>-fs NAMENODE -touchz /dir0/dir1/file1</command>
  1158. <command>-fs NAMENODE -rm -r /dir0/\*</command>
  1159. <command>-fs NAMENODE -ls -R /dir0</command>
  1160. </test-commands>
  1161. <cleanup-commands>
  1162. <command>-fs NAMENODE -rm -r /dir0</command>
  1163. </cleanup-commands>
  1164. <comparators>
  1165. <comparator>
  1166. <type>RegexpComparator</type>
  1167. <expected-output>^drwxr-xr-x( )*-( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1</expected-output>
  1168. </comparator>
  1169. <comparator>
  1170. <type>RegexpComparator</type>
  1171. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1/file1</expected-output>
  1172. </comparator>
  1173. </comparators>
  1174. </test>
  1175. <!-- Tests for du -->
  1176. <test> <!-- TESTED -->
  1177. <description>du: file using absolute path</description>
  1178. <test-commands>
  1179. <command>-fs NAMENODE -put CLITEST_DATA/data15bytes /data15bytes</command>
  1180. <command>-fs NAMENODE -du /data15bytes</command>
  1181. </test-commands>
  1182. <cleanup-commands>
  1183. <command>-fs NAMENODE -rm /data15bytes</command>
  1184. </cleanup-commands>
  1185. <comparators>
  1186. <comparator>
  1187. <type>RegexpComparator</type>
  1188. <expected-output>^15\s+15\s+/data15bytes</expected-output>
  1189. </comparator>
  1190. </comparators>
  1191. </test>
  1192. <test> <!-- TESTED -->
  1193. <description>du: file using relative path</description>
  1194. <test-commands>
  1195. <command>-fs NAMENODE -mkdir -p dir</command> <!-- make sure user home dir exists -->
  1196. <command>-fs NAMENODE -put CLITEST_DATA/data15bytes data15bytesZZ</command>
  1197. <command>-fs NAMENODE -du data15bytesZZ</command>
  1198. </test-commands>
  1199. <cleanup-commands>
  1200. <command>-fs NAMENODE -rm data15bytesZZ</command>
  1201. </cleanup-commands>
  1202. <comparators>
  1203. <comparator>
  1204. <type>RegexpComparator</type>
  1205. <expected-output>^15\s+15\s+data15bytesZZ</expected-output>
  1206. </comparator>
  1207. </comparators>
  1208. </test>
  1209. <test> <!-- TESTED -->
  1210. <description>du: files using globbing</description>
  1211. <test-commands>
  1212. <command>-fs NAMENODE -mkdir -p CLITEST_DATA</command>
  1213. <command>-fs NAMENODE -put CLITEST_DATA/data15bytes data15bytes</command>
  1214. <command>-fs NAMENODE -put CLITEST_DATA/data30bytes data30bytes</command>
  1215. <command>-fs NAMENODE -put CLITEST_DATA/data60bytes data60bytes</command>
  1216. <command>-fs NAMENODE -put CLITEST_DATA/data120bytes data120bytes</command>
  1217. <command>-fs NAMENODE -du data*</command>
  1218. </test-commands>
  1219. <cleanup-commands>
  1220. <command>-fs NAMENODE -rm data*bytes</command>
  1221. </cleanup-commands>
  1222. <comparators>
  1223. <comparator>
  1224. <type>RegexpComparator</type>
  1225. <expected-output>^120\s+120\s+data120bytes</expected-output>
  1226. </comparator>
  1227. <comparator>
  1228. <type>RegexpComparator</type>
  1229. <expected-output>^15\s+15\s+data15bytes</expected-output>
  1230. </comparator>
  1231. <comparator>
  1232. <type>RegexpComparator</type>
  1233. <expected-output>^30\s+30\s+data30bytes</expected-output>
  1234. </comparator>
  1235. <comparator>
  1236. <type>RegexpComparator</type>
  1237. <expected-output>^60\s+60\s+data60bytes</expected-output>
  1238. </comparator>
  1239. </comparators>
  1240. </test>
  1241. <test> <!-- TESTED -->
  1242. <description>du: directory using absolute path</description>
  1243. <test-commands>
  1244. <command>-fs NAMENODE -mkdir /dir0</command>
  1245. <command>-fs NAMENODE -put CLITEST_DATA/data15bytes /dir0/data15bytes</command>
  1246. <command>-fs NAMENODE -du /dir0</command>
  1247. </test-commands>
  1248. <cleanup-commands>
  1249. <command>-fs NAMENODE -rm -r /dir0</command>
  1250. </cleanup-commands>
  1251. <comparators>
  1252. <comparator>
  1253. <type>RegexpComparator</type>
  1254. <expected-output>^15\s+15\s+/dir0/data15bytes</expected-output>
  1255. </comparator>
  1256. </comparators>
  1257. </test>
  1258. <test> <!-- TESTED -->
  1259. <description>du: directory using relative path</description>
  1260. <test-commands>
  1261. <command>-fs NAMENODE -mkdir -p dir0</command>
  1262. <command>-fs NAMENODE -put CLITEST_DATA/data15bytes dir0/data15bytes</command>
  1263. <command>-fs NAMENODE -du dir0</command>
  1264. </test-commands>
  1265. <cleanup-commands>
  1266. <command>-fs NAMENODE -rm -r /user</command>
  1267. </cleanup-commands>
  1268. <comparators>
  1269. <comparator>
  1270. <type>RegexpComparator</type>
  1271. <expected-output>^15\s+15\s+dir0/data15bytes</expected-output>
  1272. </comparator>
  1273. </comparators>
  1274. </test>
  1275. <test> <!-- TESTED -->
  1276. <description>du: directory using globbing</description>
  1277. <test-commands>
  1278. <command>-fs NAMENODE -mkdir /dir0</command>
  1279. <command>-fs NAMENODE -put CLITEST_DATA/data15bytes /dir0/data15bytes</command>
  1280. <command>-fs NAMENODE -put CLITEST_DATA/data30bytes /dir0/data30bytes</command>
  1281. <command>-fs NAMENODE -put CLITEST_DATA/data60bytes /dir0/data60bytes</command>
  1282. <command>-fs NAMENODE -put CLITEST_DATA/data120bytes /dir0/data120bytes</command>
  1283. <command>-fs NAMENODE -du /dir0/*</command>
  1284. </test-commands>
  1285. <cleanup-commands>
  1286. <command>-fs NAMENODE -rm -r /dir0</command>
  1287. </cleanup-commands>
  1288. <comparators>
  1289. <comparator>
  1290. <type>RegexpComparator</type>
  1291. <expected-output>^15( |\t)*15( |\t)*/dir0/data15bytes</expected-output>
  1292. </comparator>
  1293. <comparator>
  1294. <type>RegexpComparator</type>
  1295. <expected-output>^30( |\t)*30( |\t)*/dir0/data30bytes</expected-output>
  1296. </comparator>
  1297. <comparator>
  1298. <type>RegexpComparator</type>
  1299. <expected-output>^60( |\t)*60( |\t)*/dir0/data60bytes</expected-output>
  1300. </comparator>
  1301. <comparator>
  1302. <type>RegexpComparator</type>
  1303. <expected-output>^120( |\t)*120( |\t)*/dir0/data120bytes</expected-output>
  1304. </comparator>
  1305. </comparators>
  1306. </test>
  1307. <test> <!-- TESTED -->
  1308. <description>du: Test for hdfs:// path - file</description>
  1309. <test-commands>
  1310. <command>-fs NAMENODE -put CLITEST_DATA/data15bytes hdfs:///data15bytes</command>
  1311. <command>-fs NAMENODE -du hdfs:///data15bytes</command>
  1312. </test-commands>
  1313. <cleanup-commands>
  1314. <command>-fs NAMENODE -rm hdfs:///data15bytes</command>
  1315. </cleanup-commands>
  1316. <comparators>
  1317. <comparator>
  1318. <type>RegexpComparator</type>
  1319. <expected-output>^15\s+15\s+hdfs:///data15bytes</expected-output>
  1320. </comparator>
  1321. </comparators>
  1322. </test>
  1323. <test> <!-- TESTED -->
  1324. <description>du: Test for hdfs:// path - files using globbing</description>
  1325. <test-commands>
  1326. <command>-fs NAMENODE -put CLITEST_DATA/data15bytes hdfs:///data15bytes</command>
  1327. <command>-fs NAMENODE -put CLITEST_DATA/data30bytes hdfs:///data30bytes</command>
  1328. <command>-fs NAMENODE -put CLITEST_DATA/data60bytes hdfs:///data60bytes</command>
  1329. <command>-fs NAMENODE -put CLITEST_DATA/data120bytes hdfs:///data120bytes</command>
  1330. <command>-fs NAMENODE -du hdfs:///data*</command>
  1331. </test-commands>
  1332. <cleanup-commands>
  1333. <command>-fs NAMENODE -rm -r hdfs:///*</command>
  1334. </cleanup-commands>
  1335. <comparators>
  1336. <comparator>
  1337. <type>RegexpComparator</type>
  1338. <expected-output>^120\s+120\s+hdfs:///data120bytes</expected-output>
  1339. </comparator>
  1340. <comparator>
  1341. <type>RegexpComparator</type>
  1342. <expected-output>^15\s+15\s+hdfs:///data15bytes</expected-output>
  1343. </comparator>
  1344. <comparator>
  1345. <type>RegexpComparator</type>
  1346. <expected-output>^30\s+30\s+hdfs:///data30bytes</expected-output>
  1347. </comparator>
  1348. <comparator>
  1349. <type>RegexpComparator</type>
  1350. <expected-output>^60\s+60\s+hdfs:///data60bytes</expected-output>
  1351. </comparator>
  1352. </comparators>
  1353. </test>
  1354. <test> <!-- TESTED -->
  1355. <description>du: Test for hdfs:// path - directory</description>
  1356. <test-commands>
  1357. <command>-fs NAMENODE -mkdir hdfs:///dir0</command>
  1358. <command>-fs NAMENODE -put CLITEST_DATA/data15bytes hdfs:///dir0/data15bytes</command>
  1359. <command>-fs NAMENODE -du hdfs:///dir0</command>
  1360. </test-commands>
  1361. <cleanup-commands>
  1362. <command>-fs NAMENODE -rm -r hdfs:///dir0</command>
  1363. </cleanup-commands>
  1364. <comparators>
  1365. <comparator>
  1366. <type>RegexpComparator</type>
  1367. <expected-output>^15\s+15\s+hdfs:///dir0/data15bytes</expected-output>
  1368. </comparator>
  1369. </comparators>
  1370. </test>
  1371. <test> <!-- TESTED -->
  1372. <description>duh: Test for hdfs:// path - directory</description>
  1373. <test-commands>
  1374. <command>-fs NAMENODE -mkdir hdfs:///dir0</command>
  1375. <command>-fs NAMENODE -put CLITEST_DATA/data15bytes hdfs:///dir0/data15bytes</command>
  1376. <command>-fs NAMENODE -put CLITEST_DATA/data1k hdfs:///dir0/data1k</command>
  1377. <command>-fs NAMENODE -du -h hdfs:///dir0</command>
  1378. </test-commands>
  1379. <cleanup-commands>
  1380. <command>-fs NAMENODE -rm -r hdfs:///dir0</command>
  1381. </cleanup-commands>
  1382. <comparators>
  1383. <comparator>
  1384. <type>RegexpComparator</type>
  1385. <expected-output>^15\s+15\s+hdfs:///dir0/data15bytes</expected-output>
  1386. </comparator>
  1387. <comparator>
  1388. <type>RegexpComparator</type>
  1389. <expected-output>^1\.0 K\s+1\.0 K\s+hdfs:///dir0/data1k</expected-output>
  1390. </comparator>
  1391. </comparators>
  1392. </test>
  1393. <test> <!-- TESTED -->
  1394. <description>du: Test for hdfs:// path - directory using globbing</description>
  1395. <test-commands>
  1396. <command>-fs NAMENODE -mkdir hdfs:///dir0</command>
  1397. <command>-fs NAMENODE -put CLITEST_DATA/data15bytes hdfs:///dir0/data15bytes</command>
  1398. <command>-fs NAMENODE -put CLITEST_DATA/data30bytes hdfs:///dir0/data30bytes</command>
  1399. <command>-fs NAMENODE -put CLITEST_DATA/data60bytes hdfs:///dir0/data60bytes</command>
  1400. <command>-fs NAMENODE -put CLITEST_DATA/data120bytes hdfs:///dir0/data120bytes</command>
  1401. <command>-fs NAMENODE -du hdfs:///dir0/*</command>
  1402. </test-commands>
  1403. <cleanup-commands>
  1404. <command>-fs NAMENODE -rm -r hdfs:///dir0</command>
  1405. </cleanup-commands>
  1406. <comparators>
  1407. <comparator>
  1408. <type>RegexpComparator</type>
  1409. <expected-output>^15( |\t)*15( |\t)*hdfs:///dir0/data15bytes</expected-output>
  1410. </comparator>
  1411. <comparator>
  1412. <type>RegexpComparator</type>
  1413. <expected-output>^30( |\t)*30( |\t)*hdfs:///dir0/data30bytes</expected-output>
  1414. </comparator>
  1415. <comparator>
  1416. <type>RegexpComparator</type>
  1417. <expected-output>^60( |\t)*60( |\t)*hdfs:///dir0/data60bytes</expected-output>
  1418. </comparator>
  1419. <comparator>
  1420. <type>RegexpComparator</type>
  1421. <expected-output>^120( |\t)*120( |\t)*hdfs:///dir0/data120bytes</expected-output>
  1422. </comparator>
  1423. </comparators>
  1424. </test>
  1425. <test> <!-- TESTED -->
  1426. <description>du: Test for Namenode's path - file</description>
  1427. <test-commands>
  1428. <command>-fs NAMENODE -put CLITEST_DATA/data15bytes NAMENODE/data15bytes</command>
  1429. <command>-fs NAMENODE -du NAMENODE/data15bytes</command>
  1430. </test-commands>
  1431. <cleanup-commands>
  1432. <command>-fs NAMENODE -rm NAMENODE/data15bytes</command>
  1433. </cleanup-commands>
  1434. <comparators>
  1435. <comparator>
  1436. <type>RegexpComparator</type>
  1437. <expected-output>^15( |\t)*15( |\t)*NAMENODE/data15bytes</expected-output>
  1438. </comparator>
  1439. </comparators>
  1440. </test>
  1441. <test> <!-- TESTED -->
  1442. <description>du: Test for Namenode's path - files using globbing</description>
  1443. <test-commands>
  1444. <command>-fs NAMENODE -put CLITEST_DATA/data15bytes NAMENODE/data15bytes</command>
  1445. <command>-fs NAMENODE -put CLITEST_DATA/data30bytes NAMENODE/data30bytes</command>
  1446. <command>-fs NAMENODE -put CLITEST_DATA/data60bytes NAMENODE/data60bytes</command>
  1447. <command>-fs NAMENODE -put CLITEST_DATA/data120bytes NAMENODE/data120bytes</command>
  1448. <command>-fs NAMENODE -du NAMENODE/data*</command>
  1449. </test-commands>
  1450. <cleanup-commands>
  1451. <command>-fs NAMENODE -rm -r NAMENODE/*</command>
  1452. </cleanup-commands>
  1453. <comparators>
  1454. <comparator>
  1455. <type>RegexpComparator</type>
  1456. <expected-output>^15( |\t)*15( |\t)*NAMENODE/data15bytes</expected-output>
  1457. </comparator>
  1458. <comparator>
  1459. <type>RegexpComparator</type>
  1460. <expected-output>^30( |\t)*30( |\t)*NAMENODE/data30bytes</expected-output>
  1461. </comparator>
  1462. <comparator>
  1463. <type>RegexpComparator</type>
  1464. <expected-output>^60( |\t)*60( |\t)*NAMENODE/data60bytes</expected-output>
  1465. </comparator>
  1466. <comparator>
  1467. <type>RegexpComparator</type>
  1468. <expected-output>^120( |\t)*120( |\t)*NAMENODE/data120bytes</expected-output>
  1469. </comparator>
  1470. </comparators>
  1471. </test>
  1472. <test> <!-- TESTED -->
  1473. <description>du: Test for Namenode's path - directory</description>
  1474. <test-commands>
  1475. <command>-fs NAMENODE -mkdir NAMENODE/dir0</command>
  1476. <command>-fs NAMENODE -put CLITEST_DATA/data15bytes NAMENODE/dir0/data15bytes</command>
  1477. <command>-fs NAMENODE -du NAMENODE/dir0</command>
  1478. </test-commands>
  1479. <cleanup-commands>
  1480. <command>-fs NAMENODE -rm -r NAMENODE/dir0</command>
  1481. </cleanup-commands>
  1482. <comparators>
  1483. <comparator>
  1484. <type>RegexpComparator</type>
  1485. <expected-output>^15( |\t)*15( |\t)*NAMENODE/dir0/data15bytes</expected-output>
  1486. </comparator>
  1487. </comparators>
  1488. </test>
  1489. <test> <!-- TESTED -->
  1490. <description>du: Test for Namenode's path - directory using globbing</description>
  1491. <test-commands>
  1492. <command>-fs NAMENODE -mkdir NAMENODE/dir0</command>
  1493. <command>-fs NAMENODE -put CLITEST_DATA/data15bytes NAMENODE/dir0/data15bytes</command>
  1494. <command>-fs NAMENODE -put CLITEST_DATA/data30bytes NAMENODE/dir0/data30bytes</command>
  1495. <command>-fs NAMENODE -put CLITEST_DATA/data60bytes NAMENODE/dir0/data60bytes</command>
  1496. <command>-fs NAMENODE -put CLITEST_DATA/data120bytes NAMENODE/dir0/data120bytes</command>
  1497. <command>-fs NAMENODE -du NAMENODE/dir0/*</command>
  1498. </test-commands>
  1499. <cleanup-commands>
  1500. <command>-fs NAMENODE -rm -r NAMENODE/dir0</command>
  1501. </cleanup-commands>
  1502. <comparators>
  1503. <comparator>
  1504. <type>RegexpComparator</type>
  1505. <expected-output>^15( |\t)*15( |\t)*NAMENODE/dir0/data15bytes</expected-output>
  1506. </comparator>
  1507. <comparator>
  1508. <type>RegexpComparator</type>
  1509. <expected-output>^30( |\t)*30( |\t)*NAMENODE/dir0/data30bytes</expected-output>
  1510. </comparator>
  1511. <comparator>
  1512. <type>RegexpComparator</type>
  1513. <expected-output>^60( |\t)*60( |\t)*NAMENODE/dir0/data60bytes</expected-output>
  1514. </comparator>
  1515. <comparator>
  1516. <type>RegexpComparator</type>
  1517. <expected-output>^120( |\t)*120( |\t)*NAMENODE/dir0/data120bytes</expected-output>
  1518. </comparator>
  1519. </comparators>
  1520. </test>
  1521. <!-- Tests for dus -->
  1522. <test> <!-- TESTED -->
  1523. <description>dus: directories/files using absolute path</description>
  1524. <test-commands>
  1525. <command>-fs NAMENODE -mkdir /dir0</command>
  1526. <command>-fs NAMENODE -mkdir /dir0/dir1</command>
  1527. <command>-fs NAMENODE -mkdir /dir0/dir1/dir1</command>
  1528. <command>-fs NAMENODE -mkdir /dir0/dir1/dir2</command>
  1529. <command>-fs NAMENODE -mkdir /dir0/dir2</command>
  1530. <command>-fs NAMENODE -mkdir /dir0/dir2/dir1</command>
  1531. <command>-fs NAMENODE -mkdir /dir0/dir2/dir2</command>
  1532. <command>-fs NAMENODE -touchz /dir0/file0</command>
  1533. <command>-fs NAMENODE -put CLITEST_DATA/data15bytes /dir0/dir1/data15bytes</command>
  1534. <command>-fs NAMENODE -put CLITEST_DATA/data30bytes /dir0/dir1/data30bytes</command>
  1535. <command>-fs NAMENODE -put CLITEST_DATA/data15bytes /dir0/dir2/data15bytes</command>
  1536. <command>-fs NAMENODE -put CLITEST_DATA/data30bytes /dir0/dir2/data30bytes</command>
  1537. <command>-fs NAMENODE -put CLITEST_DATA/data60bytes /dir0/dir1/dir1/data60bytes</command>
  1538. <command>-fs NAMENODE -put CLITEST_DATA/data120bytes /dir0/dir1/dir2/data120bytes</command>
  1539. <command>-fs NAMENODE -put CLITEST_DATA/data60bytes /dir0/dir2/dir1/data60bytes</command>
  1540. <command>-fs NAMENODE -put CLITEST_DATA/data120bytes /dir0/dir2/dir2/data120bytes</command>
  1541. <command>-fs NAMENODE -du -s /dir0</command>
  1542. </test-commands>
  1543. <cleanup-commands>
  1544. <command>-fs NAMENODE -rm -r /dir0</command>
  1545. </cleanup-commands>
  1546. <comparators>
  1547. <comparator>
  1548. <type>RegexpComparator</type>
  1549. <expected-output>^450\s+450\s+/dir0</expected-output>
  1550. </comparator>
  1551. </comparators>
  1552. </test>
  1553. <test> <!-- TESTED -->
  1554. <description>dus: directories/files using relative path</description>
  1555. <test-commands>
  1556. <command>-fs NAMENODE -mkdir -p dir0</command>
  1557. <command>-fs NAMENODE -mkdir -p dir0/dir1</command>
  1558. <command>-fs NAMENODE -mkdir -p dir0/dir1/dir1</command>
  1559. <command>-fs NAMENODE -mkdir -p dir0/dir1/dir2</command>
  1560. <command>-fs NAMENODE -mkdir -p dir0/dir2</command>
  1561. <command>-fs NAMENODE -mkdir -p dir0/dir2/dir1</command>
  1562. <command>-fs NAMENODE -mkdir -p dir0/dir2/dir2</command>
  1563. <command>-fs NAMENODE -touchz dir0/file0</command>
  1564. <command>-fs NAMENODE -put CLITEST_DATA/data15bytes dir0/dir1/data15bytes</command>
  1565. <command>-fs NAMENODE -put CLITEST_DATA/data30bytes dir0/dir1/data30bytes</command>
  1566. <command>-fs NAMENODE -put CLITEST_DATA/data15bytes dir0/dir2/data15bytes</command>
  1567. <command>-fs NAMENODE -put CLITEST_DATA/data30bytes dir0/dir2/data30bytes</command>
  1568. <command>-fs NAMENODE -put CLITEST_DATA/data60bytes dir0/dir1/dir1/data60bytes</command>
  1569. <command>-fs NAMENODE -put CLITEST_DATA/data120bytes dir0/dir1/dir2/data120bytes</command>
  1570. <command>-fs NAMENODE -put CLITEST_DATA/data60bytes dir0/dir2/dir1/data60bytes</command>
  1571. <command>-fs NAMENODE -put CLITEST_DATA/data120bytes dir0/dir2/dir2/data120bytes</command>
  1572. <command>-fs NAMENODE -du -s dir0</command>
  1573. </test-commands>
  1574. <cleanup-commands>
  1575. <command>-fs NAMENODE -rm -r /user</command>
  1576. </cleanup-commands>
  1577. <comparators>
  1578. <comparator>
  1579. <type>RegexpComparator</type>
  1580. <expected-output>^450\s+450\s+dir0</expected-output>
  1581. </comparator>
  1582. </comparators>
  1583. </test>
  1584. <test> <!-- TESTED -->
  1585. <description>dus: directories/files using globbing</description>
  1586. <test-commands>
  1587. <command>-fs NAMENODE -mkdir /dir0</command>
  1588. <command>-fs NAMENODE -mkdir /dir0/dir1</command>
  1589. <command>-fs NAMENODE -mkdir /dir0/dir1/dir1</command>
  1590. <command>-fs NAMENODE -mkdir /dir0/dir1/dir2</command>
  1591. <command>-fs NAMENODE -mkdir /dir0/dir2</command>
  1592. <command>-fs NAMENODE -mkdir /dir0/dir2/dir1</command>
  1593. <command>-fs NAMENODE -mkdir /dir0/dir2/dir2</command>
  1594. <command>-fs NAMENODE -touchz /dir0/file0</command>
  1595. <command>-fs NAMENODE -put CLITEST_DATA/data15bytes /dir0/dir1/data15bytes</command>
  1596. <command>-fs NAMENODE -put CLITEST_DATA/data30bytes /dir0/dir1/data30bytes</command>
  1597. <command>-fs NAMENODE -put CLITEST_DATA/data15bytes /dir0/dir2/data15bytes</command>
  1598. <command>-fs NAMENODE -put CLITEST_DATA/data30bytes /dir0/dir2/data30bytes</command>
  1599. <command>-fs NAMENODE -put CLITEST_DATA/data60bytes /dir0/dir1/dir1/data60bytes</command>
  1600. <command>-fs NAMENODE -put CLITEST_DATA/data120bytes /dir0/dir1/dir2/data120bytes</command>
  1601. <command>-fs NAMENODE -put CLITEST_DATA/data60bytes /dir0/dir2/dir1/data60bytes</command>
  1602. <command>-fs NAMENODE -put CLITEST_DATA/data120bytes /dir0/dir2/dir2/data120bytes</command>
  1603. <command>-fs NAMENODE -mkdir /donotcountdir0</command>
  1604. <command>-fs NAMENODE -put CLITEST_DATA/data15bytes /donotcountdir0/data15bytes</command>
  1605. <command>-fs NAMENODE -put CLITEST_DATA/data15bytes /donotcountdir0/data15bytes</command>
  1606. <command>-fs NAMENODE -put CLITEST_DATA/data15bytes /donotcountdir0/data15bytes</command>
  1607. <command>-fs NAMENODE -put CLITEST_DATA/data15bytes /donotcountdir0/data15bytes</command>
  1608. <command>-fs NAMENODE -du -s /dir*</command>
  1609. </test-commands>
  1610. <cleanup-commands>
  1611. <command>-fs NAMENODE -rm -r /dir0</command>
  1612. <command>-fs NAMENODE -rm -r /donotcountdir0</command>
  1613. </cleanup-commands>
  1614. <comparators>
  1615. <comparator>
  1616. <type>RegexpComparator</type>
  1617. <expected-output>^450\s+450\s+/dir0</expected-output>
  1618. </comparator>
  1619. </comparators>
  1620. </test>
  1621. <!-- Tests for dus -->
  1622. <test> <!-- TESTED -->
  1623. <description>dus: Test for hdfs:// path - directories/files</description>
  1624. <test-commands>
  1625. <command>-fs NAMENODE -mkdir hdfs:///dir0</command>
  1626. <command>-fs NAMENODE -mkdir hdfs:///dir0/dir1</command>
  1627. <command>-fs NAMENODE -mkdir hdfs:///dir0/dir1/dir1</command>
  1628. <command>-fs NAMENODE -mkdir hdfs:///dir0/dir1/dir2</command>
  1629. <command>-fs NAMENODE -mkdir hdfs:///dir0/dir2</command>
  1630. <command>-fs NAMENODE -mkdir hdfs:///dir0/dir2/dir1</command>
  1631. <command>-fs NAMENODE -mkdir hdfs:///dir0/dir2/dir2</command>
  1632. <command>-fs NAMENODE -touchz hdfs:///dir0/file0</command>
  1633. <command>-fs NAMENODE -put CLITEST_DATA/data15bytes hdfs:///dir0/dir1/data15bytes</command>
  1634. <command>-fs NAMENODE -put CLITEST_DATA/data30bytes hdfs:///dir0/dir1/data30bytes</command>
  1635. <command>-fs NAMENODE -put CLITEST_DATA/data15bytes hdfs:///dir0/dir2/data15bytes</command>
  1636. <command>-fs NAMENODE -put CLITEST_DATA/data30bytes hdfs:///dir0/dir2/data30bytes</command>
  1637. <command>-fs NAMENODE -put CLITEST_DATA/data60bytes hdfs:///dir0/dir1/dir1/data60bytes</command>
  1638. <command>-fs NAMENODE -put CLITEST_DATA/data120bytes hdfs:///dir0/dir1/dir2/data120bytes</command>
  1639. <command>-fs NAMENODE -put CLITEST_DATA/data60bytes hdfs:///dir0/dir2/dir1/data60bytes</command>
  1640. <command>-fs NAMENODE -put CLITEST_DATA/data120bytes hdfs:///dir0/dir2/dir2/data120bytes</command>
  1641. <command>-fs NAMENODE -du -s hdfs:///dir0</command>
  1642. </test-commands>
  1643. <cleanup-commands>
  1644. <command>-fs NAMENODE -rm -r hdfs:///dir0</command>
  1645. </cleanup-commands>
  1646. <comparators>
  1647. <comparator>
  1648. <type>RegexpComparator</type>
  1649. <expected-output>^450\s+450\s+hdfs:///dir0</expected-output>
  1650. </comparator>
  1651. </comparators>
  1652. </test>
  1653. <test> <!-- TESTED -->
  1654. <description>dus: Test for hdfs:// path - directories/files using globbing</description>
  1655. <test-commands>
  1656. <command>-fs NAMENODE -mkdir hdfs:///dir0</command>
  1657. <command>-fs NAMENODE -mkdir hdfs:///dir0/dir1</command>
  1658. <command>-fs NAMENODE -mkdir hdfs:///dir0/dir1/dir1</command>
  1659. <command>-fs NAMENODE -mkdir hdfs:///dir0/dir1/dir2</command>
  1660. <command>-fs NAMENODE -mkdir hdfs:///dir0/dir2</command>
  1661. <command>-fs NAMENODE -mkdir hdfs:///dir0/dir2/dir1</command>
  1662. <command>-fs NAMENODE -mkdir hdfs:///dir0/dir2/dir2</command>
  1663. <command>-fs NAMENODE -touchz hdfs:///dir0/file0</command>
  1664. <command>-fs NAMENODE -put CLITEST_DATA/data15bytes hdfs:///dir0/dir1/data15bytes</command>
  1665. <command>-fs NAMENODE -put CLITEST_DATA/data30bytes hdfs:///dir0/dir1/data30bytes</command>
  1666. <command>-fs NAMENODE -put CLITEST_DATA/data15bytes hdfs:///dir0/dir2/data15bytes</command>
  1667. <command>-fs NAMENODE -put CLITEST_DATA/data30bytes hdfs:///dir0/dir2/data30bytes</command>
  1668. <command>-fs NAMENODE -put CLITEST_DATA/data60bytes hdfs:///dir0/dir1/dir1/data60bytes</command>
  1669. <command>-fs NAMENODE -put CLITEST_DATA/data120bytes hdfs:///dir0/dir1/dir2/data120bytes</command>
  1670. <command>-fs NAMENODE -put CLITEST_DATA/data60bytes hdfs:///dir0/dir2/dir1/data60bytes</command>
  1671. <command>-fs NAMENODE -put CLITEST_DATA/data120bytes hdfs:///dir0/dir2/dir2/data120bytes</command>
  1672. <command>-fs NAMENODE -mkdir /donotcountdir0</command>
  1673. <command>-fs NAMENODE -put CLITEST_DATA/data15bytes hdfs:///donotcountdir0/data15bytes</command>
  1674. <command>-fs NAMENODE -put CLITEST_DATA/data15bytes hdfs:///donotcountdir0/data15bytes</command>
  1675. <command>-fs NAMENODE -put CLITEST_DATA/data15bytes hdfs:///donotcountdir0/data15bytes</command>
  1676. <command>-fs NAMENODE -put CLITEST_DATA/data15bytes hdfs:///donotcountdir0/data15bytes</command>
  1677. <command>-fs NAMENODE -du -s hdfs:///dir*</command>
  1678. </test-commands>
  1679. <cleanup-commands>
  1680. <command>-fs NAMENODE -rm -r hdfs:///dir0</command>
  1681. <command>-fs NAMENODE -rm -r hdfs:///donotcountdir0</command>
  1682. </cleanup-commands>
  1683. <comparators>
  1684. <comparator>
  1685. <type>RegexpComparator</type>
  1686. <expected-output>^450\s+450\s+hdfs:///dir0</expected-output>
  1687. </comparator>
  1688. </comparators>
  1689. </test>
  1690. <test> <!-- TESTED -->
  1691. <description>dus: Test for Namenode's path - directories/files</description>
  1692. <test-commands>
  1693. <command>-fs NAMENODE -mkdir NAMENODE/dir0</command>
  1694. <command>-fs NAMENODE -mkdir NAMENODE/dir0/dir1</command>
  1695. <command>-fs NAMENODE -mkdir NAMENODE/dir0/dir1/dir1</command>
  1696. <command>-fs NAMENODE -mkdir NAMENODE/dir0/dir1/dir2</command>
  1697. <command>-fs NAMENODE -mkdir NAMENODE/dir0/dir2</command>
  1698. <command>-fs NAMENODE -mkdir NAMENODE/dir0/dir2/dir1</command>
  1699. <command>-fs NAMENODE -mkdir NAMENODE/dir0/dir2/dir2</command>
  1700. <command>-fs NAMENODE -touchz NAMENODE/dir0/file0</command>
  1701. <command>-fs NAMENODE -put CLITEST_DATA/data15bytes NAMENODE/dir0/dir1/data15bytes</command>
  1702. <command>-fs NAMENODE -put CLITEST_DATA/data30bytes NAMENODE/dir0/dir1/data30bytes</command>
  1703. <command>-fs NAMENODE -put CLITEST_DATA/data15bytes NAMENODE/dir0/dir2/data15bytes</command>
  1704. <command>-fs NAMENODE -put CLITEST_DATA/data30bytes NAMENODE/dir0/dir2/data30bytes</command>
  1705. <command>-fs NAMENODE -put CLITEST_DATA/data60bytes NAMENODE/dir0/dir1/dir1/data60bytes</command>
  1706. <command>-fs NAMENODE -put CLITEST_DATA/data120bytes NAMENODE/dir0/dir1/dir2/data120bytes</command>
  1707. <command>-fs NAMENODE -put CLITEST_DATA/data60bytes NAMENODE/dir0/dir2/dir1/data60bytes</command>
  1708. <command>-fs NAMENODE -put CLITEST_DATA/data120bytes NAMENODE/dir0/dir2/dir2/data120bytes</command>
  1709. <command>-fs NAMENODE -du -s NAMENODE/dir0</command>
  1710. </test-commands>
  1711. <cleanup-commands>
  1712. <command>-fs NAMENODE -rm -r NAMENODE/dir0</command>
  1713. </cleanup-commands>
  1714. <comparators>
  1715. <comparator>
  1716. <type>RegexpComparator</type>
  1717. <expected-output>^450\s+450\s+NAMENODE/dir0</expected-output>
  1718. </comparator>
  1719. </comparators>
  1720. </test>
  1721. <test> <!-- TESTED -->
  1722. <description>dus: Test for Namenode's path - directories/files using globbing</description>
  1723. <test-commands>
  1724. <command>-fs NAMENODE -mkdir NAMENODE/dir0</command>
  1725. <command>-fs NAMENODE -mkdir NAMENODE/dir0/dir1</command>
  1726. <command>-fs NAMENODE -mkdir NAMENODE/dir0/dir1/dir1</command>
  1727. <command>-fs NAMENODE -mkdir NAMENODE/dir0/dir1/dir2</command>
  1728. <command>-fs NAMENODE -mkdir NAMENODE/dir0/dir2</command>
  1729. <command>-fs NAMENODE -mkdir NAMENODE/dir0/dir2/dir1</command>
  1730. <command>-fs NAMENODE -mkdir NAMENODE/dir0/dir2/dir2</command>
  1731. <command>-fs NAMENODE -touchz NAMENODE/dir0/file0</command>
  1732. <command>-fs NAMENODE -put CLITEST_DATA/data15bytes NAMENODE/dir0/dir1/data15bytes</command>
  1733. <command>-fs NAMENODE -put CLITEST_DATA/data30bytes NAMENODE/dir0/dir1/data30bytes</command>
  1734. <command>-fs NAMENODE -put CLITEST_DATA/data15bytes NAMENODE/dir0/dir2/data15bytes</command>
  1735. <command>-fs NAMENODE -put CLITEST_DATA/data30bytes NAMENODE/dir0/dir2/data30bytes</command>
  1736. <command>-fs NAMENODE -put CLITEST_DATA/data60bytes NAMENODE/dir0/dir1/dir1/data60bytes</command>
  1737. <command>-fs NAMENODE -put CLITEST_DATA/data120bytes NAMENODE/dir0/dir1/dir2/data120bytes</command>
  1738. <command>-fs NAMENODE -put CLITEST_DATA/data60bytes NAMENODE/dir0/dir2/dir1/data60bytes</command>
  1739. <command>-fs NAMENODE -put CLITEST_DATA/data120bytes NAMENODE/dir0/dir2/dir2/data120bytes</command>
  1740. <command>-fs NAMENODE -mkdir NAMENODE/donotcountdir0</command>
  1741. <command>-fs NAMENODE -put CLITEST_DATA/data15bytes NAMENODE/donotcountdir0/data15bytes</command>
  1742. <command>-fs NAMENODE -put CLITEST_DATA/data15bytes NAMENODE/donotcountdir0/data15bytes</command>
  1743. <command>-fs NAMENODE -put CLITEST_DATA/data15bytes NAMENODE/donotcountdir0/data15bytes</command>
  1744. <command>-fs NAMENODE -put CLITEST_DATA/data15bytes NAMENODE/donotcountdir0/data15bytes</command>
  1745. <command>-fs NAMENODE -du -s NAMENODE/dir*</command>
  1746. </test-commands>
  1747. <cleanup-commands>
  1748. <command>-fs NAMENODE -rm -r NAMENODE/dir0</command>
  1749. <command>-fs NAMENODE -rm -r NAMENODE/donotcountdir0</command>
  1750. </cleanup-commands>
  1751. <comparators>
  1752. <comparator>
  1753. <type>RegexpComparator</type>
  1754. <expected-output>^450\s+450\s+NAMENODE/dir0</expected-output>
  1755. </comparator>
  1756. </comparators>
  1757. </test>
  1758. <!-- Tests for mv -->
  1759. <test> <!-- TESTED -->
  1760. <description>mv: file (absolute path) to file (absolute path)</description>
  1761. <test-commands>
  1762. <command>-fs NAMENODE -touchz /file1</command>
  1763. <command>-fs NAMENODE -mv /file1 /file2</command>
  1764. <command>-fs NAMENODE -ls /file*</command>
  1765. </test-commands>
  1766. <cleanup-commands>
  1767. <command>-fs NAMENODE -rm /file2</command>
  1768. </cleanup-commands>:
  1769. <comparators>
  1770. <comparator>
  1771. <type>RegexpComparator</type>
  1772. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/file2</expected-output>
  1773. </comparator>
  1774. <comparator>
  1775. <type>RegexpComparator</type>
  1776. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/file[^1]</expected-output>
  1777. </comparator>
  1778. </comparators>
  1779. </test>
  1780. <test> <!-- TESTED -->
  1781. <description>mv: file (absolute path) to file (relative path)</description>
  1782. <test-commands>
  1783. <command>-fs NAMENODE -touchz /file1</command>
  1784. <command>-fs NAMENODE -mv /file1 file2</command>
  1785. </test-commands>
  1786. <cleanup-commands>
  1787. <command>-fs NAMENODE -rm -r /file1</command>
  1788. </cleanup-commands>
  1789. <comparators>
  1790. <comparator>
  1791. <type>RegexpComparator</type>
  1792. <expected-output>^mv: `file2': No such file or directory</expected-output>
  1793. </comparator>
  1794. </comparators>
  1795. </test>
  1796. <test> <!-- TESTED -->
  1797. <description>mv: file (absolute path) to directory (absolute path); keep the same name at the destination</description>
  1798. <test-commands>
  1799. <command>-fs NAMENODE -touchz /file1</command>
  1800. <command>-fs NAMENODE -mkdir /dir0</command>
  1801. <command>-fs NAMENODE -mv /file1 /dir0</command>
  1802. <command>-fs NAMENODE -ls -R /dir0</command>
  1803. </test-commands>
  1804. <cleanup-commands>
  1805. <command>-fs NAMENODE -rm -r /dir0</command>
  1806. </cleanup-commands>
  1807. <comparators>
  1808. <comparator>
  1809. <type>RegexpComparator</type>
  1810. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/file1</expected-output>
  1811. </comparator>
  1812. </comparators>
  1813. </test>
  1814. <test> <!-- TESTED -->
  1815. <description>mv: file (absolute path) to directory (absolute path); keep the same name at the destination [ TIED to previous test ]</description>
  1816. <test-commands>
  1817. <command>-fs NAMENODE -ls /file1</command>
  1818. </test-commands>
  1819. <cleanup-commands>
  1820. </cleanup-commands>
  1821. <comparators>
  1822. <comparator>
  1823. <type>TokenComparator</type>
  1824. <expected-output>ls: `/file1': No such file or directory</expected-output>
  1825. </comparator>
  1826. </comparators>
  1827. </test>
  1828. <test> <!-- TESTED -->
  1829. <description>mv: file (absolute path) to directory (absolute path); change the name at the destination</description>
  1830. <test-commands>
  1831. <command>-fs NAMENODE -touchz /file1</command>
  1832. <command>-fs NAMENODE -mkdir /dir0</command>
  1833. <command>-fs NAMENODE -mv /file1 /dir0/file2</command>
  1834. <command>-fs NAMENODE -ls /dir0</command>
  1835. </test-commands>
  1836. <cleanup-commands>
  1837. <command>-fs NAMENODE -rm -r /dir0</command>
  1838. </cleanup-commands>
  1839. <comparators>
  1840. <comparator>
  1841. <type>RegexpComparator</type>
  1842. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/file2</expected-output>
  1843. </comparator>
  1844. </comparators>
  1845. </test>
  1846. <test> <!-- TESTED -->
  1847. <description>mv: file (absolute path) to directory (absolute path); change the name at the destination [ TIED to previous test ]</description>
  1848. <test-commands>
  1849. <command>-fs NAMENODE -ls /file1</command>
  1850. </test-commands>
  1851. <cleanup-commands>
  1852. </cleanup-commands>
  1853. <comparators>
  1854. <comparator>
  1855. <type>TokenComparator</type>
  1856. <expected-output>ls: `/file1': No such file or directory</expected-output>
  1857. </comparator>
  1858. </comparators>
  1859. </test>
  1860. <test> <!-- TESTED -->
  1861. <description>mv: files (absolute path) to directory (absolute path) using globbing</description>
  1862. <test-commands>
  1863. <command>-fs NAMENODE -touchz /file1</command>
  1864. <command>-fs NAMENODE -touchz /file2</command>
  1865. <command>-fs NAMENODE -touchz /file3</command>
  1866. <command>-fs NAMENODE -touchz /file4</command>
  1867. <command>-fs NAMENODE -mkdir /dir0</command>
  1868. <command>-fs NAMENODE -mv /file* /dir0</command>
  1869. <command>-fs NAMENODE -ls -R /*</command>
  1870. </test-commands>
  1871. <cleanup-commands>
  1872. <command>-fs NAMENODE -rm -r /dir0</command>
  1873. </cleanup-commands>
  1874. <comparators>
  1875. <comparator>
  1876. <type>RegexpComparator</type>
  1877. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/file1</expected-output>
  1878. </comparator>
  1879. <comparator>
  1880. <type>RegexpComparator</type>
  1881. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/file2</expected-output>
  1882. </comparator>
  1883. <comparator>
  1884. <type>RegexpComparator</type>
  1885. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/file3</expected-output>
  1886. </comparator>
  1887. <comparator>
  1888. <type>RegexpComparator</type>
  1889. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/file4</expected-output>
  1890. </comparator>
  1891. </comparators>
  1892. </test>
  1893. <test> <!-- TESTED -->
  1894. <description>mv: files (absolute path) to directory (absolute path) using globbing [ TIED to previous test ]</description>
  1895. <test-commands>
  1896. <command>-fs NAMENODE -ls /file*</command>
  1897. </test-commands>
  1898. <cleanup-commands>
  1899. </cleanup-commands>
  1900. <comparators>
  1901. <comparator>
  1902. <type>TokenComparator</type>
  1903. <expected-output>ls: `/file*': No such file or directory</expected-output>
  1904. </comparator>
  1905. </comparators>
  1906. </test>
  1907. <test> <!-- TESTED -->
  1908. <description>mv: file (relative) to file (relative)</description>
  1909. <test-commands>
  1910. <command>-fs NAMENODE -mkdir -p dir</command> <!-- make sure user home dir exists -->
  1911. <command>-fs NAMENODE -touchz file1</command>
  1912. <command>-fs NAMENODE -mv file1 file2</command>
  1913. <command>-fs NAMENODE -ls file*</command>
  1914. </test-commands>
  1915. <cleanup-commands>
  1916. <command>-fs NAMENODE -rm /user</command>
  1917. </cleanup-commands>
  1918. <comparators>
  1919. <comparator>
  1920. <type>RegexpComparator</type>
  1921. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*file2</expected-output>
  1922. </comparator>
  1923. <comparator>
  1924. <type>RegexpComparator</type>
  1925. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*file[^1]</expected-output>
  1926. </comparator>
  1927. </comparators>
  1928. </test>
  1929. <test> <!-- TESTED -->
  1930. <description>mv: moving file to file(rename in for hdfs:// path) </description>
  1931. <test-commands>
  1932. <command>-fs NAMENODE -touchz hdfs:///file1</command>
  1933. <command>-fs NAMENODE -mv hdfs:///file1 hdfs:///file2</command>
  1934. <command>-fs NAMENODE -ls hdfs:///file*</command>
  1935. </test-commands>
  1936. <cleanup-commands>
  1937. <command>-fs NAMENODE -rm hdfs:///file2</command>
  1938. </cleanup-commands>:
  1939. <comparators>
  1940. <comparator>
  1941. <type>RegexpComparator</type>
  1942. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///file2</expected-output>
  1943. </comparator>
  1944. <comparator>
  1945. <type>RegexpComparator</type>
  1946. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///file[^1]</expected-output>
  1947. </comparator>
  1948. </comparators>
  1949. </test>
  1950. <test> <!-- TESTED -->
  1951. <description>mv: moving file to directory (keep the same name at the destination) in hdfs:// path - </description>
  1952. <test-commands>
  1953. <command>-fs NAMENODE -touchz hdfs:///file1</command>
  1954. <command>-fs NAMENODE -mkdir hdfs:///dir0</command>
  1955. <command>-fs NAMENODE -mv hdfs:///file1 hdfs:///dir0</command>
  1956. <command>-fs NAMENODE -ls -R hdfs:///dir0</command>
  1957. </test-commands>
  1958. <cleanup-commands>
  1959. <command>-fs NAMENODE -rm -r hdfs:///dir0</command>
  1960. </cleanup-commands>
  1961. <comparators>
  1962. <comparator>
  1963. <type>RegexpComparator</type>
  1964. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir0/file1</expected-output>
  1965. </comparator>
  1966. </comparators>
  1967. </test>
  1968. <test> <!-- TESTED -->
  1969. <description>mv: moving files to directory in hdfs:// path - [ TIED to previous test ]</description>
  1970. <test-commands>
  1971. <command>-fs NAMENODE -ls hdfs:///file*</command>
  1972. </test-commands>
  1973. <cleanup-commands>
  1974. </cleanup-commands>
  1975. <comparators>
  1976. <comparator>
  1977. <type>TokenComparator</type>
  1978. <expected-output>ls: `hdfs:///file*': No such file or directory</expected-output>
  1979. </comparator>
  1980. </comparators>
  1981. </test>
  1982. <test> <!-- TESTED -->
  1983. <description>mv: moving file that does not exist in hdfs:// path </description>
  1984. <test-commands>
  1985. <command>-fs NAMENODE -mv hdfs:///file1 hdfs:///file2</command>
  1986. </test-commands>
  1987. <cleanup-commands>
  1988. </cleanup-commands>
  1989. <comparators>
  1990. <comparator>
  1991. <type>TokenComparator</type>
  1992. <expected-output>mv: `hdfs:///file1': No such file or directory</expected-output>
  1993. </comparator>
  1994. </comparators>
  1995. </test>
  1996. <test> <!-- TESTED -->
  1997. <description>mv: moving file to directory (different name at the destination) in hdfs:// path </description>
  1998. <test-commands>
  1999. <command>-fs NAMENODE -touchz hdfs:///file1</command>
  2000. <command>-fs NAMENODE -mkdir hdfs:///dir0</command>
  2001. <command>-fs NAMENODE -mv hdfs:///file1 hdfs:///dir0/file2</command>
  2002. <command>-fs NAMENODE -ls hdfs:///dir0</command>
  2003. </test-commands>
  2004. <cleanup-commands>
  2005. <command>-fs NAMENODE -rm -r hdfs:///dir0</command>
  2006. </cleanup-commands>
  2007. <comparators>
  2008. <comparator>
  2009. <type>RegexpComparator</type>
  2010. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir0/file2</expected-output>
  2011. </comparator>
  2012. </comparators>
  2013. </test>
  2014. <test> <!-- TESTED -->
  2015. <description>mv: moving file to directory (different name at the destination) in hdfs:// path [ TIED to previous test ]</description>
  2016. <test-commands>
  2017. <command>-fs NAMENODE -ls hdfs:///file1</command>
  2018. </test-commands>
  2019. <cleanup-commands>
  2020. </cleanup-commands>
  2021. <comparators>
  2022. <comparator>
  2023. <type>TokenComparator</type>
  2024. <expected-output>ls: `hdfs:///file1': No such file or directory</expected-output>
  2025. </comparator>
  2026. </comparators>
  2027. </test>
  2028. <test> <!-- TESTED -->
  2029. <description>mv: moving group of files to directory using globbing in hdfs:// path - </description>
  2030. <test-commands>
  2031. <command>-fs NAMENODE -touchz hdfs:///file1</command>
  2032. <command>-fs NAMENODE -touchz hdfs:///file2</command>
  2033. <command>-fs NAMENODE -touchz hdfs:///file3</command>
  2034. <command>-fs NAMENODE -mkdir hdfs:///dir0</command>
  2035. <command>-fs NAMENODE -mv hdfs:///file* hdfs:///dir0</command>
  2036. <command>-fs NAMENODE -ls -R hdfs:///*</command>
  2037. </test-commands>
  2038. <cleanup-commands>
  2039. <command>-fs NAMENODE -rm -r hdfs:///dir0</command>
  2040. </cleanup-commands>
  2041. <comparators>
  2042. <comparator>
  2043. <type>RegexpComparator</type>
  2044. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir0/file1</expected-output>
  2045. </comparator>
  2046. <comparator>
  2047. <type>RegexpComparator</type>
  2048. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir0/file2</expected-output>
  2049. </comparator>
  2050. <comparator>
  2051. <type>RegexpComparator</type>
  2052. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir0/file3</expected-output>
  2053. </comparator>
  2054. </comparators>
  2055. </test>
  2056. <test> <!-- TESTED -->
  2057. <description>mv: moving files to directory using globbing in hdfs:// [ TIED to previous test ]</description>
  2058. <test-commands>
  2059. <command>-fs NAMENODE -ls hdfs:///file*</command>
  2060. </test-commands>
  2061. <cleanup-commands>
  2062. </cleanup-commands>
  2063. <comparators>
  2064. <comparator>
  2065. <type>TokenComparator</type>
  2066. <expected-output>ls: `hdfs:///file*': No such file or directory</expected-output>
  2067. </comparator>
  2068. </comparators>
  2069. </test>
  2070. <test> <!-- TESTED -->
  2071. <description>mv: moving file to file(rename) in Namenode's path - </description>
  2072. <test-commands>
  2073. <command>-fs NAMENODE -touchz NAMENODE/file1</command>
  2074. <command>-fs NAMENODE -mv NAMENODE/file1 NAMENODE/file2</command>
  2075. <command>-fs NAMENODE -ls NAMENODE/file*</command>
  2076. </test-commands>
  2077. <cleanup-commands>
  2078. <command>-fs NAMENODE -rm NAMENODE/file2</command>
  2079. </cleanup-commands>:
  2080. <comparators>
  2081. <comparator>
  2082. <type>RegexpComparator</type>
  2083. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/file2</expected-output>
  2084. </comparator>
  2085. <comparator>
  2086. <type>RegexpComparator</type>
  2087. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/file[^1]</expected-output>
  2088. </comparator>
  2089. </comparators>
  2090. </test>
  2091. <test> <!-- TESTED -->
  2092. <description>mv: moving file to directory (keep the same name at the destination) in Namenode's path </description>
  2093. <test-commands>
  2094. <command>-fs NAMENODE -touchz NAMENODE/file1</command>
  2095. <command>-fs NAMENODE -mkdir NAMENODE/dir0</command>
  2096. <command>-fs NAMENODE -mv NAMENODE/file1 NAMENODE/dir0</command>
  2097. <command>-fs NAMENODE -ls -R NAMENODE/dir0</command>
  2098. </test-commands>
  2099. <cleanup-commands>
  2100. <command>-fs NAMENODE -rm -r NAMENODE/dir0</command>
  2101. </cleanup-commands>
  2102. <comparators>
  2103. <comparator>
  2104. <type>RegexpComparator</type>
  2105. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir0/file1</expected-output>
  2106. </comparator>
  2107. </comparators>
  2108. </test>
  2109. <test> <!-- TESTED -->
  2110. <description>mv: moving files to directory in Namenode's path - [ TIED to previous test ]</description>
  2111. <test-commands>
  2112. <command>-fs NAMENODE -ls NAMENODE/file1</command>
  2113. </test-commands>
  2114. <cleanup-commands>
  2115. </cleanup-commands>
  2116. <comparators>
  2117. <comparator>
  2118. <type>RegexpComparator</type>
  2119. <expected-output>^ls: `hdfs://\w+[-.a-z0-9]*:[0-9]+/file1': No such file or directory</expected-output>
  2120. </comparator>
  2121. </comparators>
  2122. </test>
  2123. <test> <!-- TESTED -->
  2124. <description>mv: moving file that does not exist in Namenode's path </description>
  2125. <test-commands>
  2126. <command>-fs NAMENODE -mv NAMENODE/file1 NAMENODE/file2</command>
  2127. </test-commands>
  2128. <cleanup-commands>
  2129. </cleanup-commands>
  2130. <comparators>
  2131. <comparator>
  2132. <type>RegexpComparator</type>
  2133. <expected-output>^mv: `hdfs://\w+[-.a-z0-9]*:[0-9]+/file1': No such file or directory</expected-output>
  2134. </comparator>
  2135. </comparators>
  2136. </test>
  2137. <test> <!-- TESTED -->
  2138. <description>mv: moving file to directory (different name at the destination) in Namenode's path </description>
  2139. <test-commands>
  2140. <command>-fs NAMENODE -touchz NAMENODE/file1</command>
  2141. <command>-fs NAMENODE -mkdir NAMENODE/dir0</command>
  2142. <command>-fs NAMENODE -mv NAMENODE/file1 NAMENODE/dir0/file2</command>
  2143. <command>-fs NAMENODE -ls NAMENODE/dir0</command>
  2144. </test-commands>
  2145. <cleanup-commands>
  2146. <command>-fs NAMENODE -rm -r NAMENODE/dir0</command>
  2147. </cleanup-commands>
  2148. <comparators>
  2149. <comparator>
  2150. <type>RegexpComparator</type>
  2151. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir0/file2</expected-output>
  2152. </comparator>
  2153. </comparators>
  2154. </test>
  2155. <test> <!-- TESTED -->
  2156. <description>mv: moving file to directory (different name at the destination) in Namenode's path [ TIED to previous test ]</description>
  2157. <test-commands>
  2158. <command>-fs NAMENODE -ls NAMENODE/file1</command>
  2159. </test-commands>
  2160. <cleanup-commands>
  2161. </cleanup-commands>
  2162. <comparators>
  2163. <comparator>
  2164. <type>RegexpComparator</type>
  2165. <expected-output>^ls: `NAMENODE/file1': No such file or directory</expected-output>
  2166. </comparator>
  2167. </comparators>
  2168. </test>
  2169. <test> <!-- TESTED -->
  2170. <description>mv: moving group of files to directory using globbing in Namenode's path </description>
  2171. <test-commands>
  2172. <command>-fs NAMENODE -touchz NAMENODE/file1</command>
  2173. <command>-fs NAMENODE -touchz NAMENODE/file2</command>
  2174. <command>-fs NAMENODE -touchz NAMENODE/file3</command>
  2175. <command>-fs NAMENODE -mkdir NAMENODE/dir0</command>
  2176. <command>-fs NAMENODE -mv NAMENODE/file* NAMENODE/dir0</command>
  2177. <command>-fs NAMENODE -ls -R NAMENODE/*</command>
  2178. </test-commands>
  2179. <cleanup-commands>
  2180. <command>-fs NAMENODE -rm -r NAMENODE/dir0</command>
  2181. </cleanup-commands>
  2182. <comparators>
  2183. <comparator>
  2184. <type>RegexpComparator</type>
  2185. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir0/file1</expected-output>
  2186. </comparator>
  2187. <comparator>
  2188. <type>RegexpComparator</type>
  2189. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir0/file2</expected-output>
  2190. </comparator>
  2191. <comparator>
  2192. <type>RegexpComparator</type>
  2193. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir0/file3</expected-output>
  2194. </comparator>
  2195. </comparators>
  2196. </test>
  2197. <test> <!-- TESTED -->
  2198. <description>mv: moving files to directory using globbing in Namenode's path [ TIED to previous test ]</description>
  2199. <test-commands>
  2200. <command>-fs NAMENODE -ls NAMENODE/file*</command>
  2201. </test-commands>
  2202. <cleanup-commands>
  2203. </cleanup-commands>
  2204. <comparators>
  2205. <comparator>
  2206. <type>RegexpComparator</type>
  2207. <expected-output>^ls: `hdfs://\w+[-.a-z0-9]*:[0-9]+/file\*': No such file or directory</expected-output>
  2208. </comparator>
  2209. </comparators>
  2210. </test>
  2211. <test> <!-- TESTED -->
  2212. <description>mv: moving directory to directory in hdfs:// path </description>
  2213. <test-commands>
  2214. <command>-fs NAMENODE -mkdir hdfs:///dir0</command>
  2215. <command>-fs NAMENODE -mkdir hdfs:///dir1</command>
  2216. <command>-fs NAMENODE -touchz hdfs:///dir0/file1</command>
  2217. <command>-fs NAMENODE -mv hdfs:///dir0 hdfs:///dir1</command>
  2218. <command>-fs NAMENODE -ls -R hdfs:///dir1</command>
  2219. </test-commands>
  2220. <cleanup-commands>
  2221. <command>-fs NAMENODE -rm hdfs:///dir1</command>
  2222. </cleanup-commands>
  2223. <comparators>
  2224. <comparator>
  2225. <type>RegexpComparator</type>
  2226. <expected-output>^drwxr-xr-x( )*-( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir1/dir0</expected-output>
  2227. </comparator>
  2228. <comparator>
  2229. <type>RegexpComparator</type>
  2230. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir1/dir0/file1</expected-output>
  2231. </comparator>
  2232. </comparators>
  2233. </test>
  2234. <test> <!-- TESTED -->
  2235. <description>mv: moving directory to directory in Namenode's path </description>
  2236. <test-commands>
  2237. <command>-fs NAMENODE -mkdir NAMENODE/dir0</command>
  2238. <command>-fs NAMENODE -mkdir NAMENODE/dir1</command>
  2239. <command>-fs NAMENODE -touchz NAMENODE/dir0/file1</command>
  2240. <command>-fs NAMENODE -mv NAMENODE/dir0 NAMENODE/dir1</command>
  2241. <command>-fs NAMENODE -ls -R NAMENODE/dir1</command>
  2242. </test-commands>
  2243. <cleanup-commands>
  2244. <command>-fs NAMENODE -rm NAMENODE/dir1</command>
  2245. </cleanup-commands>
  2246. <comparators>
  2247. <comparator>
  2248. <type>RegexpComparator</type>
  2249. <expected-output>^drwxr-xr-x( )*-( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir1/dir0</expected-output>
  2250. </comparator>
  2251. <comparator>
  2252. <type>RegexpComparator</type>
  2253. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir1/dir0/file1</expected-output>
  2254. </comparator>
  2255. </comparators>
  2256. </test>
  2257. <!-- Tests for cp-->
  2258. <test> <!-- TESTED -->
  2259. <description>cp: file (absolute path) to file (absolute path)</description>
  2260. <test-commands>
  2261. <command>-fs NAMENODE -touchz /file1</command>
  2262. <command>-fs NAMENODE -cp /file1 /file2</command>
  2263. <command>-fs NAMENODE -ls /file*</command>
  2264. </test-commands>
  2265. <cleanup-commands>
  2266. <command>-fs NAMENODE -rm /file*</command>
  2267. </cleanup-commands>:
  2268. <comparators>
  2269. <comparator>
  2270. <type>RegexpComparator</type>
  2271. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/file1</expected-output>
  2272. </comparator>
  2273. <comparator>
  2274. <type>RegexpComparator</type>
  2275. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/file2</expected-output>
  2276. </comparator>
  2277. </comparators>
  2278. </test>
  2279. <test> <!-- TESTED -->
  2280. <description>cp: file (absolute path) to file (relative path)</description>
  2281. <test-commands>
  2282. <command>-fs NAMENODE -mkdir -p dir</command> <!-- make sure user home dir exists -->
  2283. <command>-fs NAMENODE -touchz /file1</command>
  2284. <command>-fs NAMENODE -cp /file1 file2</command>
  2285. <command>-fs NAMENODE -ls /file1 file2</command>
  2286. </test-commands>
  2287. <cleanup-commands>
  2288. <command>-fs NAMENODE -rm -r /file1 file2</command>
  2289. </cleanup-commands>
  2290. <comparators>
  2291. <comparator>
  2292. <type>RegexpComparator</type>
  2293. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/file1</expected-output>
  2294. </comparator>
  2295. <comparator>
  2296. <type>RegexpComparator</type>
  2297. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*file2</expected-output>
  2298. </comparator>
  2299. </comparators>
  2300. </test>
  2301. <test> <!-- TESTED -->
  2302. <description>cp: file (relative path) to file (absolute path)</description>
  2303. <test-commands>
  2304. <command>-fs NAMENODE -mkdir -p dir</command> <!-- make sure user home dir exists -->
  2305. <command>-fs NAMENODE -touchz file1</command>
  2306. <command>-fs NAMENODE -cp file1 /file2</command>
  2307. <command>-fs NAMENODE -ls file1 /file2</command>
  2308. </test-commands>
  2309. <cleanup-commands>
  2310. <command>-fs NAMENODE -rm -r file1 /file2</command>
  2311. </cleanup-commands>
  2312. <comparators>
  2313. <comparator>
  2314. <type>RegexpComparator</type>
  2315. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*file1</expected-output>
  2316. </comparator>
  2317. <comparator>
  2318. <type>RegexpComparator</type>
  2319. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/file2</expected-output>
  2320. </comparator>
  2321. </comparators>
  2322. </test>
  2323. <test> <!-- TESTED -->
  2324. <description>cp: file (relative path) to file (relative path)</description>
  2325. <test-commands>
  2326. <command>-fs NAMENODE -mkdir -p dir</command> <!-- make sure user home dir exists -->
  2327. <command>-fs NAMENODE -touchz file1</command>
  2328. <command>-fs NAMENODE -cp file1 file2</command>
  2329. <command>-fs NAMENODE -ls file1 file2</command>
  2330. </test-commands>
  2331. <cleanup-commands>
  2332. <command>-fs NAMENODE -rm -r file1 file2</command>
  2333. </cleanup-commands>
  2334. <comparators>
  2335. <comparator>
  2336. <type>RegexpComparator</type>
  2337. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*file1</expected-output>
  2338. </comparator>
  2339. <comparator>
  2340. <type>RegexpComparator</type>
  2341. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*file2</expected-output>
  2342. </comparator>
  2343. </comparators>
  2344. </test>
  2345. <test> <!-- TESTED -->
  2346. <description>cp: file (absolute path) to directory (absolute path); keep the same name at the destination</description>
  2347. <test-commands>
  2348. <command>-fs NAMENODE -touchz /file1</command>
  2349. <command>-fs NAMENODE -mkdir /dir0</command>
  2350. <command>-fs NAMENODE -cp /file1 /dir0</command>
  2351. <command>-fs NAMENODE -ls /file1 /dir0</command>
  2352. </test-commands>
  2353. <cleanup-commands>
  2354. <command>-fs NAMENODE -rm -r /dir0</command>
  2355. </cleanup-commands>
  2356. <comparators>
  2357. <comparator>
  2358. <type>RegexpComparator</type>
  2359. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/file1</expected-output>
  2360. </comparator>
  2361. <comparator>
  2362. <type>RegexpComparator</type>
  2363. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/file1</expected-output>
  2364. </comparator>
  2365. </comparators>
  2366. </test>
  2367. <test> <!-- TESTED -->
  2368. <description>cp: file (absolute path) to directory (absolute path); change the name at the destination</description>
  2369. <test-commands>
  2370. <command>-fs NAMENODE -touchz /file1</command>
  2371. <command>-fs NAMENODE -mkdir /dir0</command>
  2372. <command>-fs NAMENODE -cp /file1 /dir0/file2</command>
  2373. <command>-fs NAMENODE -ls /file1 /dir0</command>
  2374. </test-commands>
  2375. <cleanup-commands>
  2376. <command>-fs NAMENODE -rm -r /dir0</command>
  2377. </cleanup-commands>
  2378. <comparators>
  2379. <comparator>
  2380. <type>RegexpComparator</type>
  2381. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/file1</expected-output>
  2382. </comparator>
  2383. <comparator>
  2384. <type>RegexpComparator</type>
  2385. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/file2</expected-output>
  2386. </comparator>
  2387. </comparators>
  2388. </test>
  2389. <test> <!-- TESTED -->
  2390. <description>cp: files to directory (absolute path) using globbing</description>
  2391. <test-commands>
  2392. <command>-fs NAMENODE -touchz /file1</command>
  2393. <command>-fs NAMENODE -touchz /file2</command>
  2394. <command>-fs NAMENODE -touchz /file3</command>
  2395. <command>-fs NAMENODE -touchz /file4</command>
  2396. <command>-fs NAMENODE -mkdir /dir0</command>
  2397. <command>-fs NAMENODE -cp /file* /dir0</command>
  2398. <command>-fs NAMENODE -ls -R /*</command>
  2399. </test-commands>
  2400. <cleanup-commands>
  2401. <command>-fs NAMENODE -rm -r /dir0</command>
  2402. </cleanup-commands>
  2403. <comparators>
  2404. <comparator>
  2405. <type>RegexpComparator</type>
  2406. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/file1</expected-output>
  2407. </comparator>
  2408. <comparator>
  2409. <type>RegexpComparator</type>
  2410. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/file2</expected-output>
  2411. </comparator>
  2412. <comparator>
  2413. <type>RegexpComparator</type>
  2414. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/file3</expected-output>
  2415. </comparator>
  2416. <comparator>
  2417. <type>RegexpComparator</type>
  2418. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/file4</expected-output>
  2419. </comparator>
  2420. <comparator>
  2421. <type>RegexpComparator</type>
  2422. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/file1</expected-output>
  2423. </comparator>
  2424. <comparator>
  2425. <type>RegexpComparator</type>
  2426. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/file2</expected-output>
  2427. </comparator>
  2428. <comparator>
  2429. <type>RegexpComparator</type>
  2430. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/file3</expected-output>
  2431. </comparator>
  2432. <comparator>
  2433. <type>RegexpComparator</type>
  2434. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/file4</expected-output>
  2435. </comparator>
  2436. </comparators>
  2437. </test>
  2438. <test> <!-- TESTED -->
  2439. <description>cp: files to directory (absolute path) without globbing</description>
  2440. <test-commands>
  2441. <command>-fs NAMENODE -touchz /file1</command>
  2442. <command>-fs NAMENODE -touchz /file2</command>
  2443. <command>-fs NAMENODE -touchz /file3</command>
  2444. <command>-fs NAMENODE -touchz /file4</command>
  2445. <command>-fs NAMENODE -mkdir /dir0</command>
  2446. <command>-fs NAMENODE -cp /file1 /file2 /file3 /file4 /dir0</command>
  2447. <command>-fs NAMENODE -ls -R /*</command>
  2448. </test-commands>
  2449. <cleanup-commands>
  2450. <command>-fs NAMENODE -rm -r /dir0 /file*</command>
  2451. </cleanup-commands>
  2452. <comparators>
  2453. <comparator>
  2454. <type>RegexpComparator</type>
  2455. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/file1</expected-output>
  2456. </comparator>
  2457. <comparator>
  2458. <type>RegexpComparator</type>
  2459. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/file2</expected-output>
  2460. </comparator>
  2461. <comparator>
  2462. <type>RegexpComparator</type>
  2463. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/file3</expected-output>
  2464. </comparator>
  2465. <comparator>
  2466. <type>RegexpComparator</type>
  2467. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/file4</expected-output>
  2468. </comparator>
  2469. <comparator>
  2470. <type>RegexpComparator</type>
  2471. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/file1</expected-output>
  2472. </comparator>
  2473. <comparator>
  2474. <type>RegexpComparator</type>
  2475. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/file2</expected-output>
  2476. </comparator>
  2477. <comparator>
  2478. <type>RegexpComparator</type>
  2479. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/file3</expected-output>
  2480. </comparator>
  2481. <comparator>
  2482. <type>RegexpComparator</type>
  2483. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/file4</expected-output>
  2484. </comparator>
  2485. </comparators>
  2486. </test>
  2487. <test> <!-- TESTED -->
  2488. <description>cp: copying non existent file (absolute path)</description>
  2489. <test-commands>
  2490. <command>-fs NAMENODE -cp /file /file1</command>
  2491. </test-commands>
  2492. <cleanup-commands>
  2493. <command>-fs NAMENODE -rm -r /user</command>
  2494. </cleanup-commands>:
  2495. <comparators>
  2496. <comparator>
  2497. <type>RegexpComparator</type>
  2498. <expected-output>^cp: `/file': No such file or directory</expected-output>
  2499. </comparator>
  2500. </comparators>
  2501. </test>
  2502. <test> <!-- TESTED -->
  2503. <description>cp: copying non existent file (relative path)</description>
  2504. <test-commands>
  2505. <command>-fs NAMENODE -cp touchz test</command>
  2506. <command>-fs NAMENODE -cp file1 file2</command>
  2507. </test-commands>
  2508. <cleanup-commands>
  2509. <command>-fs NAMENODE -rm -r /user</command>
  2510. </cleanup-commands>:
  2511. <comparators>
  2512. <comparator>
  2513. <type>RegexpComparator</type>
  2514. <expected-output>^cp: `file2': No such file or directory</expected-output>
  2515. </comparator>
  2516. </comparators>
  2517. </test>
  2518. <test> <!-- TESTED -->
  2519. <description>cp: files to an existent file using globbing</description>
  2520. <test-commands>
  2521. <command>-fs NAMENODE -touchz /file1</command>
  2522. <command>-fs NAMENODE -touchz /file2</command>
  2523. <command>-fs NAMENODE -touchz /file3</command>
  2524. <command>-fs NAMENODE -touchz /file4</command>
  2525. <command>-fs NAMENODE -touchz /file5</command>
  2526. <command>-fs NAMENODE -cp /file* /file5</command>
  2527. </test-commands>
  2528. <cleanup-commands>
  2529. <command>-fs NAMENODE -rm -r /user</command>
  2530. </cleanup-commands>
  2531. <comparators>
  2532. <comparator>
  2533. <type>RegexpComparator</type>
  2534. <expected-output>^cp: `/file5': Is not a directory</expected-output>
  2535. </comparator>
  2536. </comparators>
  2537. </test>
  2538. <test> <!-- TESTED -->
  2539. <description>cp: files to an existent file without globbing</description>
  2540. <test-commands>
  2541. <command>-fs NAMENODE -touchz /file1</command>
  2542. <command>-fs NAMENODE -touchz /file2</command>
  2543. <command>-fs NAMENODE -touchz /file3</command>
  2544. <command>-fs NAMENODE -touchz /file4</command>
  2545. <command>-fs NAMENODE -touchz /file5</command>
  2546. <command>-fs NAMENODE -cp /file1 /file2 /file3 /file4 /file5</command>
  2547. </test-commands>
  2548. <cleanup-commands>
  2549. <command>-fs NAMENODE -rm -r /user</command>
  2550. </cleanup-commands>
  2551. <comparators>
  2552. <comparator>
  2553. <type>RegexpComparator</type>
  2554. <expected-output>^cp: `/file5': Is not a directory</expected-output>
  2555. </comparator>
  2556. </comparators>
  2557. </test>
  2558. <test> <!-- TESTED -->
  2559. <description>cp: files to a non existent directory using globbing</description>
  2560. <test-commands>
  2561. <command>-fs NAMENODE -touchz /file1</command>
  2562. <command>-fs NAMENODE -touchz /file2</command>
  2563. <command>-fs NAMENODE -touchz /file3</command>
  2564. <command>-fs NAMENODE -touchz /file4</command>
  2565. <command>-fs NAMENODE -cp /file* dir</command>
  2566. </test-commands>
  2567. <cleanup-commands>
  2568. <command>-fs NAMENODE -rm -r /user</command>
  2569. </cleanup-commands>
  2570. <comparators>
  2571. <comparator>
  2572. <type>RegexpComparator</type>
  2573. <expected-output>^cp: `dir': No such file or directory</expected-output>
  2574. </comparator>
  2575. </comparators>
  2576. </test>
  2577. <test> <!-- TESTED -->
  2578. <description>cp: files to a non existent directory without globbing</description>
  2579. <test-commands>
  2580. <command>-fs NAMENODE -touchz /file1</command>
  2581. <command>-fs NAMENODE -touchz /file2</command>
  2582. <command>-fs NAMENODE -touchz /file3</command>
  2583. <command>-fs NAMENODE -touchz /file4</command>
  2584. <command>-fs NAMENODE -cp /file1 /file2 /file3 /file4 dir</command>
  2585. </test-commands>
  2586. <cleanup-commands>
  2587. <command>-fs NAMENODE -rm -r /user</command>
  2588. </cleanup-commands>
  2589. <comparators>
  2590. <comparator>
  2591. <type>RegexpComparator</type>
  2592. <expected-output>^cp: `dir': No such file or directory</expected-output>
  2593. </comparator>
  2594. </comparators>
  2595. </test>
  2596. <test> <!-- TESTED -->
  2597. <description>cp: file to file copy in hdfs:// path </description>
  2598. <test-commands>
  2599. <command>-fs NAMENODE -touchz hdfs:///file1</command>
  2600. <command>-fs NAMENODE -cp hdfs:///file1 hdfs:///file2</command>
  2601. <command>-fs NAMENODE -ls hdfs:///file*</command>
  2602. </test-commands>
  2603. <cleanup-commands>
  2604. <command>-fs NAMENODE -rm hdfs:///file*</command>
  2605. </cleanup-commands>:
  2606. <comparators>
  2607. <comparator>
  2608. <type>RegexpComparator</type>
  2609. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///file1</expected-output>
  2610. </comparator>
  2611. <comparator>
  2612. <type>RegexpComparator</type>
  2613. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///file2</expected-output>
  2614. </comparator>
  2615. </comparators>
  2616. </test>
  2617. <test> <!-- TESTED -->
  2618. <description>cp: file to directory copy (same name at the destination) in hdfs:// path</description>
  2619. <test-commands>
  2620. <command>-fs NAMENODE -touchz hdfs:///file1</command>
  2621. <command>-fs NAMENODE -mkdir hdfs:///dir0</command>
  2622. <command>-fs NAMENODE -cp hdfs:///file1 hdfs:///dir0</command>
  2623. <command>-fs NAMENODE -ls hdfs:///file1 hdfs:///dir0</command>
  2624. </test-commands>
  2625. <cleanup-commands>
  2626. <command>-fs NAMENODE -rm -r hdfs:///dir0/ hdfs://file1</command>
  2627. </cleanup-commands>
  2628. <comparators>
  2629. <comparator>
  2630. <type>RegexpComparator</type>
  2631. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///file1</expected-output>
  2632. </comparator>
  2633. <comparator>
  2634. <type>RegexpComparator</type>
  2635. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir0/file1</expected-output>
  2636. </comparator>
  2637. </comparators>
  2638. </test>
  2639. <test> <!-- TESTED -->
  2640. <description>cp: file to directory (different name at the destination) in hdfs:// path </description>
  2641. <test-commands>
  2642. <command>-fs NAMENODE -touchz hdfs:///file1</command>
  2643. <command>-fs NAMENODE -mkdir hdfs:///dir0</command>
  2644. <command>-fs NAMENODE -cp hdfs:///file1 hdfs:///dir0/file2</command>
  2645. <command>-fs NAMENODE -ls hdfs:///file1 hdfs:///dir0</command>
  2646. </test-commands>
  2647. <cleanup-commands>
  2648. <command>-fs NAMENODE -rm -r hdfs:///dir0/</command>
  2649. </cleanup-commands>
  2650. <comparators>
  2651. <comparator>
  2652. <type>RegexpComparator</type>
  2653. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///file1</expected-output>
  2654. </comparator>
  2655. <comparator>
  2656. <type>RegexpComparator</type>
  2657. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir0/file2</expected-output>
  2658. </comparator>
  2659. </comparators>
  2660. </test>
  2661. <test> <!-- TESTED -->
  2662. <description>cp: files to directory using globbing in hdfs:// path</description>
  2663. <test-commands>
  2664. <command>-fs NAMENODE -touchz hdfs:///file1</command>
  2665. <command>-fs NAMENODE -touchz hdfs:///file2</command>
  2666. <command>-fs NAMENODE -touchz hdfs:///file3</command>
  2667. <command>-fs NAMENODE -mkdir hdfs:///dir0</command>
  2668. <command>-fs NAMENODE -cp hdfs:///file* hdfs:///dir0</command>
  2669. <command>-fs NAMENODE -ls -R hdfs:///*</command>
  2670. </test-commands>
  2671. <cleanup-commands>
  2672. <command>-fs NAMENODE -rm -r hdfs:///file*</command>
  2673. <command>-fs NAMENODE -rm -r hdfs:///dir0/</command>
  2674. </cleanup-commands>
  2675. <comparators>
  2676. <comparator>
  2677. <type>RegexpComparator</type>
  2678. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///file1</expected-output>
  2679. </comparator>
  2680. <comparator>
  2681. <type>RegexpComparator</type>
  2682. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///file2</expected-output>
  2683. </comparator>
  2684. <comparator>
  2685. <type>RegexpComparator</type>
  2686. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///file3</expected-output>
  2687. </comparator>
  2688. <comparator>
  2689. <type>RegexpComparator</type>
  2690. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir0/file1</expected-output>
  2691. </comparator>
  2692. <comparator>
  2693. <type>RegexpComparator</type>
  2694. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir0/file2</expected-output>
  2695. </comparator>
  2696. <comparator>
  2697. <type>RegexpComparator</type>
  2698. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir0/file3</expected-output>
  2699. </comparator>
  2700. </comparators>
  2701. </test>
  2702. <test> <!-- TESTED -->
  2703. <description>cp: files to directory in hdfs:// path without globbing</description>
  2704. <test-commands>
  2705. <command>-fs NAMENODE -touchz hdfs:///file1</command>
  2706. <command>-fs NAMENODE -touchz hdfs:///file2</command>
  2707. <command>-fs NAMENODE -touchz hdfs:///file3</command>
  2708. <command>-fs NAMENODE -mkdir hdfs:///dir0</command>
  2709. <command>-fs NAMENODE -cp hdfs:///file1 hdfs:///file2 hdfs:///file3 hdfs:///dir0</command>
  2710. <command>-fs NAMENODE -ls -R hdfs:///*</command>
  2711. </test-commands>
  2712. <cleanup-commands>
  2713. <command>-fs NAMENODE -rm -r hdfs:///file*</command>
  2714. <command>-fs NAMENODE -rm -r hdfs:///dir0/</command>
  2715. </cleanup-commands>
  2716. <comparators>
  2717. <comparator>
  2718. <type>RegexpComparator</type>
  2719. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///file1</expected-output>
  2720. </comparator>
  2721. <comparator>
  2722. <type>RegexpComparator</type>
  2723. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///file2</expected-output>
  2724. </comparator>
  2725. <comparator>
  2726. <type>RegexpComparator</type>
  2727. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///file3</expected-output>
  2728. </comparator>
  2729. <comparator>
  2730. <type>RegexpComparator</type>
  2731. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir0/file1</expected-output>
  2732. </comparator>
  2733. <comparator>
  2734. <type>RegexpComparator</type>
  2735. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir0/file2</expected-output>
  2736. </comparator>
  2737. <comparator>
  2738. <type>RegexpComparator</type>
  2739. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir0/file3</expected-output>
  2740. </comparator>
  2741. </comparators>
  2742. </test>
  2743. <test> <!-- TESTED -->
  2744. <description>cp: copying non existent file in hdfs:// path </description>
  2745. <test-commands>
  2746. <command>-fs NAMENODE -cp hdfs:///file hdfs:///file1</command>
  2747. </test-commands>
  2748. <cleanup-commands>
  2749. </cleanup-commands>:
  2750. <comparators>
  2751. <comparator>
  2752. <type>RegexpComparator</type>
  2753. <expected-output>^cp: `hdfs:///file': No such file or directory</expected-output>
  2754. </comparator>
  2755. </comparators>
  2756. </test>
  2757. <test> <!-- TESTED -->
  2758. <description>cp: copying files to an existent file in hdfs:// path using globbing</description>
  2759. <test-commands>
  2760. <command>-fs NAMENODE -touchz hdfs:///file1</command>
  2761. <command>-fs NAMENODE -touchz hdfs:///file2</command>
  2762. <command>-fs NAMENODE -touchz hdfs:///file3</command>
  2763. <command>-fs NAMENODE -touchz hdfs:///file4</command>
  2764. <command>-fs NAMENODE -touchz hdfs:///file5</command>
  2765. <command>-fs NAMENODE -cp hdfs:///file* hdfs:///file5</command>
  2766. </test-commands>
  2767. <cleanup-commands>
  2768. <command>-fs NAMENODE -rm -r hdfs:///file*</command>
  2769. </cleanup-commands>
  2770. <comparators>
  2771. <comparator>
  2772. <type>RegexpComparator</type>
  2773. <expected-output>^cp: `hdfs:///file5': Is not a directory</expected-output>
  2774. </comparator>
  2775. </comparators>
  2776. </test>
  2777. <test> <!-- TESTED -->
  2778. <description>cp: copying files to an existent file in hdfs:// path without globbing</description>
  2779. <test-commands>
  2780. <command>-fs NAMENODE -touchz hdfs:///file1</command>
  2781. <command>-fs NAMENODE -touchz hdfs:///file2</command>
  2782. <command>-fs NAMENODE -touchz hdfs:///file3</command>
  2783. <command>-fs NAMENODE -touchz hdfs:///file4</command>
  2784. <command>-fs NAMENODE -touchz hdfs:///file5</command>
  2785. <command>-fs NAMENODE -cp hdfs:///file1 hdfs:///file2 hdfs:///file3 hdfs:///file4 hdfs:///file5</command>
  2786. </test-commands>
  2787. <cleanup-commands>
  2788. <command>-fs NAMENODE -rm -r hdfs:///file*</command>
  2789. </cleanup-commands>
  2790. <comparators>
  2791. <comparator>
  2792. <type>RegexpComparator</type>
  2793. <expected-output>^cp: `hdfs:///file5': Is not a directory</expected-output>
  2794. </comparator>
  2795. </comparators>
  2796. </test>
  2797. <test> <!-- TESTED -->
  2798. <description>cp: copying files to a non existent directory in hdfs:// path using globbing</description>
  2799. <test-commands>
  2800. <command>-fs NAMENODE -touchz hdfs:///file1</command>
  2801. <command>-fs NAMENODE -touchz hdfs:///file2</command>
  2802. <command>-fs NAMENODE -touchz hdfs:///file3</command>
  2803. <command>-fs NAMENODE -touchz hdfs:///file4</command>
  2804. <command>-fs NAMENODE -cp hdfs:///file* hdfs:///dir</command>
  2805. </test-commands>
  2806. <cleanup-commands>
  2807. <command>-fs NAMENODE -rm -r hdfs:///file*</command>
  2808. </cleanup-commands>
  2809. <comparators>
  2810. <comparator>
  2811. <type>RegexpComparator</type>
  2812. <expected-output>^cp: `hdfs:///dir': No such file or directory</expected-output>
  2813. </comparator>
  2814. </comparators>
  2815. </test>
  2816. <test> <!-- TESTED -->
  2817. <description>cp: copying files to a non existent directory in hdfs:// path without globbing</description>
  2818. <test-commands>
  2819. <command>-fs NAMENODE -touchz hdfs:///file1</command>
  2820. <command>-fs NAMENODE -touchz hdfs:///file2</command>
  2821. <command>-fs NAMENODE -touchz hdfs:///file3</command>
  2822. <command>-fs NAMENODE -touchz hdfs:///file4</command>
  2823. <command>-fs NAMENODE -cp hdfs:///file1 hdfs:///file2 hdfs:///file3 hdfs:///file4 hdfs:///dir</command>
  2824. </test-commands>
  2825. <cleanup-commands>
  2826. <command>-fs NAMENODE -rm -r hdfs:///file*</command>
  2827. </cleanup-commands>
  2828. <comparators>
  2829. <comparator>
  2830. <type>RegexpComparator</type>
  2831. <expected-output>^cp: `hdfs:///dir': No such file or directory</expected-output>
  2832. </comparator>
  2833. </comparators>
  2834. </test>
  2835. <test> <!-- TESTED -->
  2836. <description>cp: copying non existent directory in hdfs:// path</description>
  2837. <test-commands>
  2838. <command>-fs NAMENODE -mkdir hdfs:///dir1</command>
  2839. <command>-fs NAMENODE -cp hdfs:///dir0 hdfs:///dir1</command>
  2840. </test-commands>
  2841. <cleanup-commands>
  2842. <command>-fs NAMNEODE -rm -r hdfs:///dir1</command>
  2843. </cleanup-commands>
  2844. <comparators>
  2845. <comparator>
  2846. <type>RegexpComparator</type>
  2847. <expected-output>^cp: `hdfs:///dir0': No such file or directory</expected-output>
  2848. </comparator>
  2849. </comparators>
  2850. </test>
  2851. <test> <!-- TESTED -->
  2852. <description>cp: putting file into an already existing destination with -f option(absolute path)</description>
  2853. <test-commands>
  2854. <command>-fs NAMENODE -mkdir /user</command> <!-- make sure user home dir exists -->
  2855. <command>-fs NAMENODE -touchz /user/file0</command>
  2856. <command>-fs NAMENODE -cp -f CLITEST_DATA/data120bytes /user/file0</command>
  2857. <command>-fs NAMENODE -cat /user/file0</command>
  2858. </test-commands>
  2859. <cleanup-commands>
  2860. <command>-fs NAMENODE -rm -r /user</command>
  2861. </cleanup-commands>
  2862. <comparators>
  2863. <comparator>
  2864. <type>RegexpComparator</type>
  2865. <expected-output>12345678901234</expected-output>
  2866. </comparator>
  2867. </comparators>
  2868. </test>
  2869. <test> <!-- TESTED -->
  2870. <description>cp: copying directory to directory in hdfs:// path</description>
  2871. <test-commands>
  2872. <command>-fs NAMENODE -mkdir hdfs:///dir0</command>
  2873. <command>-fs NAMENODE -mkdir hdfs:///dir1</command>
  2874. <command>-fs NAMENODE -touchz hdfs:///dir0/file1</command>
  2875. <command>-fs NAMENODE -cp hdfs:///dir0 hdfs:///dir1</command>
  2876. <command>-fs NAMENODE -ls -R hdfs:///dir*</command>
  2877. </test-commands>
  2878. <cleanup-commands>
  2879. <command>-fs NAMENODE -rm -r hdfs:///*</command>
  2880. </cleanup-commands>
  2881. <comparators>
  2882. <comparator>
  2883. <type>RegexpComparator</type>
  2884. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir0/file1</expected-output>
  2885. </comparator>
  2886. <comparator>
  2887. <type>RegexpComparator</type>
  2888. <expected-output>^drwxr-xr-x( )*-( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir1/dir0</expected-output>
  2889. </comparator>
  2890. <comparator>
  2891. <type>RegexpComparator</type>
  2892. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir1/dir0/file1</expected-output>
  2893. </comparator>
  2894. </comparators>
  2895. </test>
  2896. <test> <!-- TESTED -->
  2897. <description>cp: copying multiple directories to directory using globbing in hdfs:// path </description>
  2898. <test-commands>
  2899. <command>-fs NAMENODE -mkdir hdfs:///dir0</command>
  2900. <command>-fs NAMENODE -mkdir hdfs:///dir1</command>
  2901. <command>-fs NAMENODE -mkdir hdfs:///dir2</command>
  2902. <command>-fs NAMENODE -mkdir hdfs:///dest</command>
  2903. <command>-fs NAMENODE -cp hdfs:///dir* hdfs:///dest</command>
  2904. <command>-fs NAMENODE -ls -R hdfs:///d*</command>
  2905. </test-commands>
  2906. <cleanup-commands>
  2907. <command>-fs NAMNEODE -rm -r hdfs:///d*</command>
  2908. </cleanup-commands>
  2909. <comparators>
  2910. <comparator>
  2911. <type>RegexpComparator</type>
  2912. <expected-output>^drwxr-xr-x( )*-( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dest/dir0</expected-output>
  2913. </comparator>
  2914. <comparator>
  2915. <type>RegexpComparator</type>
  2916. <expected-output>^drwxr-xr-x( )*-( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dest/dir1</expected-output>
  2917. </comparator>
  2918. <comparator>
  2919. <type>RegexpComparator</type>
  2920. <expected-output>^drwxr-xr-x( )*-( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dest/dir2</expected-output>
  2921. </comparator>
  2922. </comparators>
  2923. </test>
  2924. <test> <!-- TESTED -->
  2925. <description>cp: copying multiple directories to directory in hdfs:// path without using globbing</description>
  2926. <test-commands>
  2927. <command>-fs NAMENODE -mkdir hdfs:///dir0</command>
  2928. <command>-fs NAMENODE -mkdir hdfs:///dir1</command>
  2929. <command>-fs NAMENODE -mkdir hdfs:///dir2</command>
  2930. <command>-fs NAMENODE -mkdir hdfs:///dest</command>
  2931. <command>-fs NAMENODE -cp hdfs:///dir0 hdfs:///dir1 hdfs:///dir2 hdfs:///dest</command>
  2932. <command>-fs NAMENODE -ls -R hdfs:///d*</command>
  2933. </test-commands>
  2934. <cleanup-commands>
  2935. <command>-fs NAMNEODE -rm -r hdfs:///*</command>
  2936. </cleanup-commands>
  2937. <comparators>
  2938. <comparator>
  2939. <type>RegexpComparator</type>
  2940. <expected-output>^drwxr-xr-x( )*-( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dest/dir0</expected-output>
  2941. </comparator>
  2942. <comparator>
  2943. <type>RegexpComparator</type>
  2944. <expected-output>^drwxr-xr-x( )*-( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dest/dir1</expected-output>
  2945. </comparator>
  2946. <comparator>
  2947. <type>RegexpComparator</type>
  2948. <expected-output>^drwxr-xr-x( )*-( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dest/dir2</expected-output>
  2949. </comparator>
  2950. </comparators>
  2951. </test>
  2952. <test> <!-- TESTED -->
  2953. <description>cp: file to file copy in Namenode's path </description>
  2954. <test-commands>
  2955. <command>-fs NAMENODE -touchz NAMENODE/file1</command>
  2956. <command>-fs NAMENODE -cp NAMENODE/file1 NAMENODE/file2</command>
  2957. <command>-fs NAMENODE -ls NAMENODE/file*</command>
  2958. </test-commands>
  2959. <cleanup-commands>
  2960. <command>-fs NAMENODE -rm NAMENODE/file*</command>
  2961. </cleanup-commands>:
  2962. <comparators>
  2963. <comparator>
  2964. <type>RegexpComparator</type>
  2965. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/file1</expected-output>
  2966. </comparator>
  2967. <comparator>
  2968. <type>RegexpComparator</type>
  2969. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/file2</expected-output>
  2970. </comparator>
  2971. </comparators>
  2972. </test>
  2973. <test> <!-- TESTED -->
  2974. <description>cp: file to directory copy (same name at the destination) in Namenode's path </description>
  2975. <test-commands>
  2976. <command>-fs NAMENODE -touchz NAMENODE/file1</command>
  2977. <command>-fs NAMENODE -mkdir NAMENODE/dir0</command>
  2978. <command>-fs NAMENODE -cp NAMENODE/file1 NAMENODE/dir0</command>
  2979. <command>-fs NAMENODE -ls NAMENODE/file1 NAMENODE/dir0</command>
  2980. </test-commands>
  2981. <cleanup-commands>
  2982. <command>-fs NAMENODE -rm -r NAMENODE/dir0/ NAMENODE/file1</command>
  2983. </cleanup-commands>
  2984. <comparators>
  2985. <comparator>
  2986. <type>RegexpComparator</type>
  2987. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/file1</expected-output>
  2988. </comparator>
  2989. <comparator>
  2990. <type>RegexpComparator</type>
  2991. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir0/file1</expected-output>
  2992. </comparator>
  2993. </comparators>
  2994. </test>
  2995. <test> <!-- TESTED -->
  2996. <description>cp: file to directory (different name at the destination) in Namenode's path </description>
  2997. <test-commands>
  2998. <command>-fs NAMENODE -touchz NAMENODE/file1</command>
  2999. <command>-fs NAMENODE -mkdir NAMENODE/dir0</command>
  3000. <command>-fs NAMENODE -cp NAMENODE/file1 NAMENODE/dir0/file2</command>
  3001. <command>-fs NAMENODE -ls NAMENODE/file1 NAMENODE/dir0</command>
  3002. </test-commands>
  3003. <cleanup-commands>
  3004. <command>-fs NAMENODE -rm -r NAMENODE/dir0/</command>
  3005. </cleanup-commands>
  3006. <comparators>
  3007. <comparator>
  3008. <type>RegexpComparator</type>
  3009. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/file1</expected-output>
  3010. </comparator>
  3011. <comparator>
  3012. <type>RegexpComparator</type>
  3013. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir0/file2</expected-output>
  3014. </comparator>
  3015. </comparators>
  3016. </test>
  3017. <test> <!-- TESTED -->
  3018. <description>cp: files to directory in Namenode's path using globbing</description>
  3019. <test-commands>
  3020. <command>-fs NAMENODE -touchz NAMENODE/file1</command>
  3021. <command>-fs NAMENODE -touchz NAMENODE/file2</command>
  3022. <command>-fs NAMENODE -touchz NAMENODE/file3</command>
  3023. <command>-fs NAMENODE -mkdir NAMENODE/dir0</command>
  3024. <command>-fs NAMENODE -cp NAMENODE/file* NAMENODE/dir0</command>
  3025. <command>-fs NAMENODE -ls -R NAMENODE/*</command>
  3026. </test-commands>
  3027. <cleanup-commands>
  3028. <command>-fs NAMENODE -rm -r NAMENODE/file*</command>
  3029. <command>-fs NAMENODE -rm -r NAMENODE/dir0/</command>
  3030. </cleanup-commands>
  3031. <comparators>
  3032. <comparator>
  3033. <type>RegexpComparator</type>
  3034. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/file1</expected-output>
  3035. </comparator>
  3036. <comparator>
  3037. <type>RegexpComparator</type>
  3038. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/file2</expected-output>
  3039. </comparator>
  3040. <comparator>
  3041. <type>RegexpComparator</type>
  3042. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/file3</expected-output>
  3043. </comparator>
  3044. <comparator>
  3045. <type>RegexpComparator</type>
  3046. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir0/file1</expected-output>
  3047. </comparator>
  3048. <comparator>
  3049. <type>RegexpComparator</type>
  3050. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir0/file2</expected-output>
  3051. </comparator>
  3052. <comparator>
  3053. <type>RegexpComparator</type>
  3054. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir0/file3</expected-output>
  3055. </comparator>
  3056. </comparators>
  3057. </test>
  3058. <test> <!-- TESTED -->
  3059. <description>cp: files to directory in Namenode's path without globbing</description>
  3060. <test-commands>
  3061. <command>-fs NAMENODE -touchz NAMENODE/file1</command>
  3062. <command>-fs NAMENODE -touchz NAMENODE/file2</command>
  3063. <command>-fs NAMENODE -touchz NAMENODE/file3</command>
  3064. <command>-fs NAMENODE -mkdir NAMENODE/dir0</command>
  3065. <command>-fs NAMENODE -cp NAMENODE/file1 NAMENODE/file2 NAMENODE/file3 NAMENODE/dir0</command>
  3066. <command>-fs NAMENODE -ls -R NAMENODE/*</command>
  3067. </test-commands>
  3068. <cleanup-commands>
  3069. <command>-fs NAMENODE -rm -r NAMENODE/file*</command>
  3070. <command>-fs NAMENODE -rm -r NAMENODE/dir0/</command>
  3071. </cleanup-commands>
  3072. <comparators>
  3073. <comparator>
  3074. <type>RegexpComparator</type>
  3075. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/file1</expected-output>
  3076. </comparator>
  3077. <comparator>
  3078. <type>RegexpComparator</type>
  3079. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/file2</expected-output>
  3080. </comparator>
  3081. <comparator>
  3082. <type>RegexpComparator</type>
  3083. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/file3</expected-output>
  3084. </comparator>
  3085. <comparator>
  3086. <type>RegexpComparator</type>
  3087. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir0/file1</expected-output>
  3088. </comparator>
  3089. <comparator>
  3090. <type>RegexpComparator</type>
  3091. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir0/file2</expected-output>
  3092. </comparator>
  3093. <comparator>
  3094. <type>RegexpComparator</type>
  3095. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir0/file3</expected-output>
  3096. </comparator>
  3097. </comparators>
  3098. </test>
  3099. <test> <!-- TESTED -->
  3100. <description>cp: copying non existent file in Namenode's path </description>
  3101. <test-commands>
  3102. <command>-fs NAMENODE -cp NAMENODE/file NAMENODE/file1</command>
  3103. </test-commands>
  3104. <cleanup-commands>
  3105. </cleanup-commands>:
  3106. <comparators>
  3107. <comparator>
  3108. <type>RegexpComparator</type>
  3109. <expected-output>^cp: `hdfs://\w+[-.a-z0-9]*:[0-9]+/file': No such file or directory</expected-output>
  3110. </comparator>
  3111. </comparators>
  3112. </test>
  3113. <test> <!-- TESTED -->
  3114. <description>cp: copying files to an existent file in Namenode's path using globbing</description>
  3115. <test-commands>
  3116. <command>-fs NAMENODE -touchz NAMENODE/file1</command>
  3117. <command>-fs NAMENODE -touchz NAMENODE/file2</command>
  3118. <command>-fs NAMENODE -touchz NAMENODE/file3</command>
  3119. <command>-fs NAMENODE -touchz NAMENODE/file4</command>
  3120. <command>-fs NAMENODE -touchz NAMENODE/file5</command>
  3121. <command>-fs NAMENODE -cp NAMENODE/file* NAMENODE/file5</command>
  3122. </test-commands>
  3123. <cleanup-commands>
  3124. <command>-fs NAMENODE -rm -r NAMENODE/file*</command>
  3125. </cleanup-commands>
  3126. <comparators>
  3127. <comparator>
  3128. <type>RegexpComparator</type>
  3129. <expected-output>^cp: `hdfs://\w+[-.a-z0-9]*:[0-9]+/file5': Is not a directory</expected-output>
  3130. </comparator>
  3131. </comparators>
  3132. </test>
  3133. <test> <!-- TESTED -->
  3134. <description>cp: copying files to an existent file in Namenode's path without globbing</description>
  3135. <test-commands>
  3136. <command>-fs NAMENODE -touchz NAMENODE/file1</command>
  3137. <command>-fs NAMENODE -touchz NAMENODE/file2</command>
  3138. <command>-fs NAMENODE -touchz NAMENODE/file3</command>
  3139. <command>-fs NAMENODE -touchz NAMENODE/file4</command>
  3140. <command>-fs NAMENODE -touchz NAMENODE/file5</command>
  3141. <command>-fs NAMENODE -cp NAMENODE/file1 NAMENODE/file2 NAMENODE/file3 NAMENODE/file4 NAMENODE/file5</command>
  3142. </test-commands>
  3143. <cleanup-commands>
  3144. <command>-fs NAMENODE -rm -r NAMENODE/file*</command>
  3145. </cleanup-commands>
  3146. <comparators>
  3147. <comparator>
  3148. <type>RegexpComparator</type>
  3149. <expected-output>^cp: `hdfs://\w+[-.a-z0-9]*:[0-9]+/file5': Is not a directory</expected-output>
  3150. </comparator>
  3151. </comparators>
  3152. </test>
  3153. <test> <!-- TESTED -->
  3154. <description>cp: copying files to a non existent directory in Namenode's path using globbing</description>
  3155. <test-commands>
  3156. <command>-fs NAMENODE -touchz NAMENODE/file1</command>
  3157. <command>-fs NAMENODE -touchz NAMENODE/file2</command>
  3158. <command>-fs NAMENODE -touchz NAMENODE/file3</command>
  3159. <command>-fs NAMENODE -touchz NAMENODE/file4</command>
  3160. <command>-fs NAMENODE -cp NAMENODE/file* NAMENODE/dir</command>
  3161. </test-commands>
  3162. <cleanup-commands>
  3163. <command>-fs NAMENODE -rm -r NAMENODE/file*</command>
  3164. </cleanup-commands>
  3165. <comparators>
  3166. <comparator>
  3167. <type>RegexpComparator</type>
  3168. <expected-output>^cp: `hdfs://\w+[-.a-z0-9]*:[0-9]+/dir': No such file or directory</expected-output>
  3169. </comparator>
  3170. </comparators>
  3171. </test>
  3172. <test> <!-- TESTED -->
  3173. <description>cp: copying files to a non existent directory in Namenode's path without globbing</description>
  3174. <test-commands>
  3175. <command>-fs NAMENODE -touchz NAMENODE/file1</command>
  3176. <command>-fs NAMENODE -touchz NAMENODE/file2</command>
  3177. <command>-fs NAMENODE -touchz NAMENODE/file3</command>
  3178. <command>-fs NAMENODE -touchz NAMENODE/file4</command>
  3179. <command>-fs NAMENODE -cp NAMENODE/file1 NAMENODE/file2 NAMENODE/file3 NAMENODE/file4 NAMENODE/dir</command>
  3180. </test-commands>
  3181. <cleanup-commands>
  3182. <command>-fs NAMENODE -rm -r NAMENODE/file*</command>
  3183. </cleanup-commands>
  3184. <comparators>
  3185. <comparator>
  3186. <type>RegexpComparator</type>
  3187. <expected-output>^cp: `hdfs://\w+[-.a-z0-9]*:[0-9]+/dir': No such file or directory</expected-output>
  3188. </comparator>
  3189. </comparators>
  3190. </test>
  3191. <test> <!-- TESTED -->
  3192. <description>cp: copying directory to directory in Namenode's path </description>
  3193. <test-commands>
  3194. <command>-fs NAMENODE -mkdir NAMENODE/dir0</command>
  3195. <command>-fs NAMENODE -mkdir NAMENODE/dir1</command>
  3196. <command>-fs NAMENODE -touchz NAMENODE/dir0/file1</command>
  3197. <command>-fs NAMENODE -cp NAMENODE/dir0 NAMENODE/dir1</command>
  3198. <command>-fs NAMENODE -ls -R NAMENODE/dir*</command>
  3199. </test-commands>
  3200. <cleanup-commands>
  3201. <command>-fs NAMENODE -rm -r NAMENODE/*</command>
  3202. </cleanup-commands>
  3203. <comparators>
  3204. <comparator>
  3205. <type>RegexpComparator</type>
  3206. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir0/file1</expected-output>
  3207. </comparator>
  3208. <comparator>
  3209. <type>RegexpComparator</type>
  3210. <expected-output>^drwxr-xr-x( )*-( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir1/dir0</expected-output>
  3211. </comparator>
  3212. <comparator>
  3213. <type>RegexpComparator</type>
  3214. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir1/dir0/file1</expected-output>
  3215. </comparator>
  3216. </comparators>
  3217. </test>
  3218. <test> <!-- TESTED -->
  3219. <description>cp: copying multiple directories to directory in Namenode's path using globbing</description>
  3220. <test-commands>
  3221. <command>-fs NAMENODE -mkdir NAMENODE/dir0</command>
  3222. <command>-fs NAMENODE -mkdir NAMENODE/dir1</command>
  3223. <command>-fs NAMENODE -mkdir NAMENODE/dir2</command>
  3224. <command>-fs NAMENODE -mkdir NAMENODE/dest</command>
  3225. <command>-fs NAMENODE -cp NAMENODE/dir* NAMENODE/dest</command>
  3226. <command>-fs NAMENODE -ls -R NAMENODE/d*</command>
  3227. </test-commands>
  3228. <cleanup-commands>
  3229. <command>-fs NAMNEODE -rm -r NAMENODE/d*</command>
  3230. </cleanup-commands>
  3231. <comparators>
  3232. <comparator>
  3233. <type>RegexpComparator</type>
  3234. <expected-output>^drwxr-xr-x( )*-( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dest/dir0</expected-output>
  3235. </comparator>
  3236. <comparator>
  3237. <type>RegexpComparator</type>
  3238. <expected-output>^drwxr-xr-x( )*-( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dest/dir1</expected-output>
  3239. </comparator>
  3240. <comparator>
  3241. <type>RegexpComparator</type>
  3242. <expected-output>^drwxr-xr-x( )*-( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dest/dir2</expected-output>
  3243. </comparator>
  3244. </comparators>
  3245. </test>
  3246. <test> <!-- TESTED -->
  3247. <description>cp: copying multiple directories to directory in Namenode's path without using globbing</description>
  3248. <test-commands>
  3249. <command>-fs NAMENODE -mkdir NAMENODE/dir0</command>
  3250. <command>-fs NAMENODE -mkdir NAMENODE/dir1</command>
  3251. <command>-fs NAMENODE -mkdir NAMENODE/dir2</command>
  3252. <command>-fs NAMENODE -mkdir NAMENODE/dest</command>
  3253. <command>-fs NAMENODE -cp NAMENODE/dir0 NAMENODE/dir1 NAMENODE/dir2 NAMENODE/dest</command>
  3254. <command>-fs NAMENODE -ls -R NAMENODE/d*</command>
  3255. </test-commands>
  3256. <cleanup-commands>
  3257. <command>-fs NAMNEODE -rm -r NAMENODE/*</command>
  3258. </cleanup-commands>
  3259. <comparators>
  3260. <comparator>
  3261. <type>RegexpComparator</type>
  3262. <expected-output>^drwxr-xr-x( )*-( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dest/dir0</expected-output>
  3263. </comparator>
  3264. <comparator>
  3265. <type>RegexpComparator</type>
  3266. <expected-output>^drwxr-xr-x( )*-( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dest/dir1</expected-output>
  3267. </comparator>
  3268. <comparator>
  3269. <type>RegexpComparator</type>
  3270. <expected-output>^drwxr-xr-x( )*-( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dest/dir2</expected-output>
  3271. </comparator>
  3272. </comparators>
  3273. </test>
  3274. <!-- Tests for rm -->
  3275. <test> <!-- TESTED -->
  3276. <description>rm: removing a file (absolute path) </description>
  3277. <test-commands>
  3278. <command>-fs NAMENODE -mkdir /dir0</command>
  3279. <command>-fs NAMENODE -touchz /dir0/file0</command>
  3280. <command>-fs NAMENODE -rm /dir0/file0</command>
  3281. </test-commands>
  3282. <cleanup-commands>
  3283. <command>-fs NAMENODE -rm /user</command>
  3284. </cleanup-commands>
  3285. <comparators>
  3286. <comparator>
  3287. <type>RegexpComparator</type>
  3288. <expected-output>^Deleted /dir0/file0</expected-output>
  3289. </comparator>
  3290. </comparators>
  3291. </test>
  3292. <test> <!-- TESTED -->
  3293. <description>rm: removing a file (relative path) </description>
  3294. <test-commands>
  3295. <command>-fs NAMENODE -mkdir -p dir</command> <!-- make sure user home dir exists -->
  3296. <command>-fs NAMENODE -touchz file0</command>
  3297. <command>-fs NAMENODE -rm file0</command>
  3298. </test-commands>
  3299. <cleanup-commands>
  3300. <command>-fs NAMENODE -rm /user</command>
  3301. </cleanup-commands>
  3302. <comparators>
  3303. <comparator>
  3304. <type>RegexpComparator</type>
  3305. <expected-output>^Deleted file0</expected-output>
  3306. </comparator>
  3307. </comparators>
  3308. </test>
  3309. <test> <!-- TESTED -->
  3310. <description>rm: removing files by globbing (absolute path) </description>
  3311. <test-commands>
  3312. <command>-fs NAMENODE -mkdir /dir0</command>
  3313. <command>-fs NAMENODE -touchz /dir0/file0</command>
  3314. <command>-fs NAMENODE -touchz /dir0/file1</command>
  3315. <command>-fs NAMENODE -touchz /dir0/file2</command>
  3316. <command>-fs NAMENODE -touchz /dir0/file3</command>
  3317. <command>-fs NAMENODE -rm /dir0/file*</command>
  3318. </test-commands>
  3319. <cleanup-commands>
  3320. <command>-fs NAMENODE -rm /user</command>
  3321. </cleanup-commands>
  3322. <comparators>
  3323. <comparator>
  3324. <type>RegexpComparator</type>
  3325. <expected-output>^Deleted /dir0/file0</expected-output>
  3326. </comparator>
  3327. <comparator>
  3328. <type>RegexpComparator</type>
  3329. <expected-output>^Deleted /dir0/file1</expected-output>
  3330. </comparator>
  3331. <comparator>
  3332. <type>RegexpComparator</type>
  3333. <expected-output>^Deleted /dir0/file2</expected-output>
  3334. </comparator>
  3335. <comparator>
  3336. <type>RegexpComparator</type>
  3337. <expected-output>^Deleted /dir0/file3</expected-output>
  3338. </comparator>
  3339. </comparators>
  3340. </test>
  3341. <test> <!-- TESTED -->
  3342. <description>rm: removing files by globbing (relative path) </description>
  3343. <test-commands>
  3344. <command>-fs NAMENODE -mkdir dir</command>
  3345. <command>-fs NAMENODE -touchz file0</command>
  3346. <command>-fs NAMENODE -touchz file1</command>
  3347. <command>-fs NAMENODE -touchz file2</command>
  3348. <command>-fs NAMENODE -touchz file3</command>
  3349. <command>-fs NAMENODE -rm file*</command>
  3350. </test-commands>
  3351. <cleanup-commands>
  3352. <command>-fs NAMENODE -rm /user</command>
  3353. </cleanup-commands>
  3354. <comparators>
  3355. <comparator>
  3356. <type>RegexpComparator</type>
  3357. <expected-output>^Deleted file0</expected-output>
  3358. </comparator>
  3359. <comparator>
  3360. <type>RegexpComparator</type>
  3361. <expected-output>^Deleted file1</expected-output>
  3362. </comparator>
  3363. <comparator>
  3364. <type>RegexpComparator</type>
  3365. <expected-output>^Deleted file2</expected-output>
  3366. </comparator>
  3367. <comparator>
  3368. <type>RegexpComparator</type>
  3369. <expected-output>^Deleted file3</expected-output>
  3370. </comparator>
  3371. </comparators>
  3372. </test>
  3373. <test> <!-- TESTED -->
  3374. <description>rm: removing a directory (absolute path) </description>
  3375. <test-commands>
  3376. <command>-fs NAMENODE mkdir /dir0</command>
  3377. <command>-fs NAMENODE -rm /dir0</command>
  3378. </test-commands>
  3379. <cleanup-commands>
  3380. <command>-fs NAMENODE -rm /user</command>
  3381. </cleanup-commands>
  3382. <comparators>
  3383. <comparator>
  3384. <type>RegexpComparator</type>
  3385. <expected-output>^rm: `/dir0': Is a directory</expected-output>
  3386. </comparator>
  3387. </comparators>
  3388. </test>
  3389. <test> <!-- TESTED -->
  3390. <description>rm: removing a directory (relative path) </description>
  3391. <test-commands>
  3392. <command>-fs NAMENODE mkdir -p dir0</command>
  3393. <command>-fs NAMENODE -rm dir0</command>
  3394. </test-commands>
  3395. <cleanup-commands>
  3396. <command>-fs NAMENODE -rm /user</command>
  3397. </cleanup-commands>
  3398. <comparators>
  3399. <comparator>
  3400. <type>RegexpComparator</type>
  3401. <expected-output>^rm: `dir0': No such file or directory</expected-output>
  3402. </comparator>
  3403. </comparators>
  3404. </test>
  3405. <test> <!-- TESTED -->
  3406. <description>rm: removing a nonexistent file (absolute path) </description>
  3407. <test-commands>
  3408. <command>-fs NAMENODE -rm /dir0/file0</command>
  3409. </test-commands>
  3410. <cleanup-commands>
  3411. <command>-fs NAMENODE -rm /user</command>
  3412. </cleanup-commands>
  3413. <comparators>
  3414. <comparator>
  3415. <type>RegexpComparator</type>
  3416. <expected-output>^rm: `/dir0/file0': No such file or directory</expected-output>
  3417. </comparator>
  3418. </comparators>
  3419. </test>
  3420. <test> <!-- TESTED -->
  3421. <description>rm: removing a nonexistent file (relative path) </description>
  3422. <test-commands>
  3423. <command>-fs NAMENODE -rm file0</command>
  3424. </test-commands>
  3425. <cleanup-commands>
  3426. <command>-fs NAMENODE -rm /user</command>
  3427. </cleanup-commands>
  3428. <comparators>
  3429. <comparator>
  3430. <type>RegexpComparator</type>
  3431. <expected-output>^rm: `file0': No such file or directory</expected-output>
  3432. </comparator>
  3433. </comparators>
  3434. </test>
  3435. <test> <!-- TESTED -->
  3436. <description>rm: removing a file in hdfs:// path </description>
  3437. <test-commands>
  3438. <command>-fs NAMENODE -touchz hdfs:///file0</command>
  3439. <command>-fs NAMENODE -rm hdfs:///file0</command>
  3440. </test-commands>
  3441. <cleanup-commands>
  3442. <command>-fs NAMENODE -rm hdfs:///*</command>
  3443. </cleanup-commands>
  3444. <comparators>
  3445. <comparator>
  3446. <type>RegexpComparator</type>
  3447. <expected-output>^Deleted hdfs:///file0</expected-output>
  3448. </comparator>
  3449. </comparators>
  3450. </test>
  3451. <test> <!-- TESTED -->
  3452. <description>rm: removing files by globbing in hdfs:// path </description>
  3453. <test-commands>
  3454. <command>-fs NAMENODE -touchz hdfs:///file0</command>
  3455. <command>-fs NAMENODE -touchz hdfs:///file1</command>
  3456. <command>-fs NAMENODE -touchz hdfs:///file2</command>
  3457. <command>-fs NAMENODE -touchz hdfs:///file3</command>
  3458. <command>-fs NAMENODE -rm hdfs:///file*</command>
  3459. </test-commands>
  3460. <cleanup-commands>
  3461. <command>-fs NAMENODE -rm hdfs:///*</command>
  3462. </cleanup-commands>
  3463. <comparators>
  3464. <comparator>
  3465. <type>RegexpComparator</type>
  3466. <expected-output>^Deleted hdfs:///file0</expected-output>
  3467. </comparator>
  3468. <comparator>
  3469. <type>RegexpComparator</type>
  3470. <expected-output>^Deleted hdfs:///file1</expected-output>
  3471. </comparator>
  3472. <comparator>
  3473. <type>RegexpComparator</type>
  3474. <expected-output>^Deleted hdfs:///file2</expected-output>
  3475. </comparator>
  3476. <comparator>
  3477. <type>RegexpComparator</type>
  3478. <expected-output>^Deleted hdfs:///file3</expected-output>
  3479. </comparator>
  3480. </comparators>
  3481. </test>
  3482. <test> <!-- TESTED -->
  3483. <description>rm: removing a directory in hdfs:// path </description>
  3484. <test-commands>
  3485. <command>-fs NAMENODE mkdir hdfs:///dir0</command>
  3486. <command>-fs NAMENODE -rm hdfs:///dir0</command>
  3487. </test-commands>
  3488. <cleanup-commands>
  3489. <command>-fs NAMENODE -rm -r hdfs:///*</command>
  3490. </cleanup-commands>
  3491. <comparators>
  3492. <comparator>
  3493. <type>RegexpComparator</type>
  3494. <expected-output>^rm: `hdfs:///dir0': Is a directory</expected-output>
  3495. </comparator>
  3496. </comparators>
  3497. </test>
  3498. <test> <!-- TESTED -->
  3499. <description>rm: removing a nonexistent file or dirctory in hdfs:// path </description>
  3500. <test-commands>
  3501. <command>-fs NAMENODE -rm hdfs:///file0</command>
  3502. </test-commands>
  3503. <cleanup-commands>
  3504. <command>-fs NAMENODE -rm hdfs:///*</command>
  3505. </cleanup-commands>
  3506. <comparators>
  3507. <comparator>
  3508. <type>RegexpComparator</type>
  3509. <expected-output>^rm: `hdfs:///file0': No such file or directory</expected-output>
  3510. </comparator>
  3511. </comparators>
  3512. </test>
  3513. <test> <!-- TESTED -->
  3514. <description>rm: removing files without globbing in hdfs:// path </description>
  3515. <test-commands>
  3516. <command>-fs NAMENODE -touchz hdfs:///file0</command>
  3517. <command>-fs NAMENODE -touchz hdfs:///file1</command>
  3518. <command>-fs NAMENODE -touchz hdfs:///file2</command>
  3519. <command>-fs NAMENODE -touchz hdfs:///file3</command>
  3520. <command>-fs NAMENODE -rm hdfs:///file0 hdfs:///file1 hdfs:///file2 hdfs:///file3</command>
  3521. </test-commands>
  3522. <cleanup-commands>
  3523. <command>-fs NAMENODE -rm hdfs:///*</command>
  3524. </cleanup-commands>
  3525. <comparators>
  3526. <comparator>
  3527. <type>RegexpComparator</type>
  3528. <expected-output>^Deleted hdfs:///file0</expected-output>
  3529. </comparator>
  3530. <comparator>
  3531. <type>RegexpComparator</type>
  3532. <expected-output>^Deleted hdfs:///file1</expected-output>
  3533. </comparator>
  3534. <comparator>
  3535. <type>RegexpComparator</type>
  3536. <expected-output>^Deleted hdfs:///file2</expected-output>
  3537. </comparator>
  3538. <comparator>
  3539. <type>RegexpComparator</type>
  3540. <expected-output>^Deleted hdfs:///file3</expected-output>
  3541. </comparator>
  3542. </comparators>
  3543. </test>
  3544. <test> <!-- TESTED -->
  3545. <description>rm: removing a file in Namenode's path </description>
  3546. <test-commands>
  3547. <command>-fs NAMENODE -touchz NAMENODE/file0</command>
  3548. <command>-fs NAMENODE -rm NAMENODE/file0</command>
  3549. </test-commands>
  3550. <cleanup-commands>
  3551. <command>-fs NAMENODE -rm NAMENODE/*</command>
  3552. </cleanup-commands>
  3553. <comparators>
  3554. <comparator>
  3555. <type>RegexpComparator</type>
  3556. <expected-output>^Deleted NAMENODE/file0</expected-output>
  3557. </comparator>
  3558. </comparators>
  3559. </test>
  3560. <test> <!-- TESTED -->
  3561. <description>rm: removing files by globbing in Namenode's path </description>
  3562. <test-commands>
  3563. <command>-fs NAMENODE -touchz NAMENODE/file0</command>
  3564. <command>-fs NAMENODE -touchz NAMENODE/file1</command>
  3565. <command>-fs NAMENODE -touchz NAMENODE/file2</command>
  3566. <command>-fs NAMENODE -touchz NAMENODE/file3</command>
  3567. <command>-fs NAMENODE -rm NAMENODE/file*</command>
  3568. </test-commands>
  3569. <cleanup-commands>
  3570. <command>-fs NAMENODE -rm NAMENODE/*</command>
  3571. </cleanup-commands>
  3572. <comparators>
  3573. <comparator>
  3574. <type>RegexpComparator</type>
  3575. <expected-output>^Deleted NAMENODE/file0</expected-output>
  3576. </comparator>
  3577. <comparator>
  3578. <type>RegexpComparator</type>
  3579. <expected-output>^Deleted NAMENODE/file1</expected-output>
  3580. </comparator>
  3581. <comparator>
  3582. <type>RegexpComparator</type>
  3583. <expected-output>^Deleted NAMENODE/file2</expected-output>
  3584. </comparator>
  3585. <comparator>
  3586. <type>RegexpComparator</type>
  3587. <expected-output>^Deleted NAMENODE/file3</expected-output>
  3588. </comparator>
  3589. </comparators>
  3590. </test>
  3591. <test> <!-- TESTED -->
  3592. <description>rm: removing a directory in Namenode's path </description>
  3593. <test-commands>
  3594. <command>-fs NAMENODE mkdir NAMENODE/dir0</command>
  3595. <command>-fs NAMENODE -rm NAMENODE/dir0</command>
  3596. </test-commands>
  3597. <cleanup-commands>
  3598. <command>-fs NAMENODE -rm -r NAMENODE/*</command>
  3599. </cleanup-commands>
  3600. <comparators>
  3601. <comparator>
  3602. <type>RegexpComparator</type>
  3603. <expected-output>rm: `NAMENODE/dir0': No such file or directory</expected-output>
  3604. </comparator>
  3605. </comparators>
  3606. </test>
  3607. <test> <!-- TESTED -->
  3608. <description>rm: removing a nonexistent file or directory in Namenode's path </description>
  3609. <test-commands>
  3610. <command>-fs NAMENODE -rm NAMENODE/file0</command>
  3611. </test-commands>
  3612. <cleanup-commands>
  3613. <command>-fs NAMENODE -rm NAMENODE/*</command>
  3614. </cleanup-commands>
  3615. <comparators>
  3616. <comparator>
  3617. <type>RegexpComparator</type>
  3618. <expected-output>^rm: `NAMENODE/file0': No such file or directory</expected-output>
  3619. </comparator>
  3620. </comparators>
  3621. </test>
  3622. <test> <!-- TESTED -->
  3623. <description>rm: Tremoving files without globbing in Namenode path </description>
  3624. <test-commands>
  3625. <command>-fs NAMENODE -touchz NAMENODE/file0</command>
  3626. <command>-fs NAMENODE -touchz NAMENODE/file1</command>
  3627. <command>-fs NAMENODE -touchz NAMENODE/file2</command>
  3628. <command>-fs NAMENODE -touchz NAMENODE/file3</command>
  3629. <command>-fs NAMENODE -rm NAMENODE/file0 NAMENODE/file1 NAMENODE/file2 NAMENODE/file3</command>
  3630. </test-commands>
  3631. <cleanup-commands>
  3632. <command>-fs NAMENODE -rm NAMENODE/*</command>
  3633. </cleanup-commands>
  3634. <comparators>
  3635. <comparator>
  3636. <type>RegexpComparator</type>
  3637. <expected-output>^Deleted NAMENODE/file0</expected-output>
  3638. </comparator>
  3639. <comparator>
  3640. <type>RegexpComparator</type>
  3641. <expected-output>^Deleted NAMENODE/file1</expected-output>
  3642. </comparator>
  3643. <comparator>
  3644. <type>RegexpComparator</type>
  3645. <expected-output>^Deleted NAMENODE/file2</expected-output>
  3646. </comparator>
  3647. <comparator>
  3648. <type>RegexpComparator</type>
  3649. <expected-output>^Deleted NAMENODE/file3</expected-output>
  3650. </comparator>
  3651. </comparators>
  3652. </test>
  3653. <!--Tests for rmr-->
  3654. <test> <!-- TESTED -->
  3655. <description>rm: removing a file (absolute path) </description>
  3656. <test-commands>
  3657. <command>-fs NAMENODE -mkdir /dir0</command>
  3658. <command>-fs NAMENODE -touchz /dir0/file0</command>
  3659. <command>-fs NAMENODE -rm -r /dir0/file0</command>
  3660. </test-commands>
  3661. <cleanup-commands>
  3662. <command>-fs NAMENODE -rm -r /user</command>
  3663. </cleanup-commands>
  3664. <comparators>
  3665. <comparator>
  3666. <type>RegexpComparator</type>
  3667. <expected-output>^Deleted /dir0/file0</expected-output>
  3668. </comparator>
  3669. </comparators>
  3670. </test>
  3671. <test> <!-- TESTED -->
  3672. <description>rm: removing a file (relative path) </description>
  3673. <test-commands>
  3674. <command>-fs NAMENODE -mkdir -p dir</command> <!-- make sure user home dir exists -->
  3675. <command>-fs NAMENODE -touchz file0</command>
  3676. <command>-fs NAMENODE -rm -r file0</command>
  3677. </test-commands>
  3678. <cleanup-commands>
  3679. <command>-fs NAMENODE -rm -r /user</command>
  3680. </cleanup-commands>
  3681. <comparators>
  3682. <comparator>
  3683. <type>RegexpComparator</type>
  3684. <expected-output>^Deleted file0</expected-output>
  3685. </comparator>
  3686. </comparators>
  3687. </test>
  3688. <test> <!-- TESTED -->
  3689. <description>rm: removing a directory (absolute path) </description>
  3690. <test-commands>
  3691. <command>-fs NAMENODE -touchz /dir0</command>
  3692. <command>-fs NAMENODE -rm -r /dir0</command>
  3693. </test-commands>
  3694. <cleanup-commands>
  3695. <command>-fs NAMENODE -rm -r /user</command>
  3696. </cleanup-commands>
  3697. <comparators>
  3698. <comparator>
  3699. <type>RegexpComparator</type>
  3700. <expected-output>^Deleted /dir0</expected-output>
  3701. </comparator>
  3702. </comparators>
  3703. </test>
  3704. <test> <!-- TESTED -->
  3705. <description>rm: removing a directory (relative path) </description>
  3706. <test-commands>
  3707. <command>-fs NAMENODE -mkdir -p dir0</command>
  3708. <command>-fs NAMENODE -rm -r dir0</command>
  3709. </test-commands>
  3710. <cleanup-commands>
  3711. <command>-fs NAMENODE -rm -r /user</command>
  3712. </cleanup-commands>
  3713. <comparators>
  3714. <comparator>
  3715. <type>RegexpComparator</type>
  3716. <expected-output>^Deleted dir0</expected-output>
  3717. </comparator>
  3718. </comparators>
  3719. </test>
  3720. <test> <!-- TESTED -->
  3721. <description>rm: removing directories by globbing (absolute path) </description>
  3722. <test-commands>
  3723. <command>-fs NAMENODE -mkdir /dir0</command>
  3724. <command>-fs NAMENODE -mkdir /dir1</command>
  3725. <command>-fs NAMENODE -mkdir /dir2</command>
  3726. <command>-fs NAMENODE -mkdir /dir3</command>
  3727. <command>-fs NAMENODE -rm -r /dir*</command>
  3728. </test-commands>
  3729. <cleanup-commands>
  3730. <command>-fs NAMENODE -rm /user</command>
  3731. </cleanup-commands>
  3732. <comparators>
  3733. <comparator>
  3734. <type>RegexpComparator</type>
  3735. <expected-output>^Deleted /dir0</expected-output>
  3736. </comparator>
  3737. <comparator>
  3738. <type>RegexpComparator</type>
  3739. <expected-output>^Deleted /dir1</expected-output>
  3740. </comparator>
  3741. <comparator>
  3742. <type>RegexpComparator</type>
  3743. <expected-output>^Deleted /dir2</expected-output>
  3744. </comparator>
  3745. <comparator>
  3746. <type>RegexpComparator</type>
  3747. <expected-output>^Deleted /dir3</expected-output>
  3748. </comparator>
  3749. </comparators>
  3750. </test>
  3751. <test> <!-- TESTED -->
  3752. <description>rm: removing directories by globbing (relative path) </description>
  3753. <test-commands>
  3754. <command>-fs NAMENODE -mkdir -p dir0</command>
  3755. <command>-fs NAMENODE -mkdir -p dir1</command>
  3756. <command>-fs NAMENODE -mkdir -p dir2</command>
  3757. <command>-fs NAMENODE -mkdir -p dir3</command>
  3758. <command>-fs NAMENODE -rm -r dir*</command>
  3759. </test-commands>
  3760. <cleanup-commands>
  3761. <command>-fs NAMENODE -rm /user</command>
  3762. </cleanup-commands>
  3763. <comparators>
  3764. <comparator>
  3765. <type>RegexpComparator</type>
  3766. <expected-output>^Deleted dir0</expected-output>
  3767. </comparator>
  3768. <comparator>
  3769. <type>RegexpComparator</type>
  3770. <expected-output>^Deleted dir1</expected-output>
  3771. </comparator>
  3772. <comparator>
  3773. <type>RegexpComparator</type>
  3774. <expected-output>^Deleted dir2</expected-output>
  3775. </comparator>
  3776. <comparator>
  3777. <type>RegexpComparator</type>
  3778. <expected-output>^Deleted dir3</expected-output>
  3779. </comparator>
  3780. </comparators>
  3781. </test>
  3782. <test> <!--TESTED-->
  3783. <description>rm: removing a nonexistent file (absolute path) </description>
  3784. <test-commands>
  3785. <command>-fs NAMENODE -rm -r /dir0/file0</command>
  3786. </test-commands>
  3787. <cleanup-commands>
  3788. <command>-fs NAMENODE -rm -r /user</command>
  3789. </cleanup-commands>
  3790. <comparators>
  3791. <comparator>
  3792. <type>RegexpComparator</type>
  3793. <expected-output>^rm: `/dir0/file0': No such file or directory</expected-output>
  3794. </comparator>
  3795. </comparators>
  3796. </test>
  3797. <test> <!-- TESTED -->
  3798. <description>rm: removing a nonexistent file (relative path) </description>
  3799. <test-commands>
  3800. <command>-fs NAMENODE -rm -r file0</command>
  3801. </test-commands>
  3802. <cleanup-commands>
  3803. <command>-fs NAMENODE -rm -r /user</command>
  3804. </cleanup-commands>
  3805. <comparators>
  3806. <comparator>
  3807. <type>RegexpComparator</type>
  3808. <expected-output>^rm: `file0': No such file or directory</expected-output>
  3809. </comparator>
  3810. </comparators>
  3811. </test>
  3812. <test> <!-- TESTED -->
  3813. <description>rm: removing a file in hdfs:// path </description>
  3814. <test-commands>
  3815. <command>-fs NAMENODE -touchz hdfs:///file0</command>
  3816. <command>-fs NAMENODE -rm -r hdfs:///file0</command>
  3817. </test-commands>
  3818. <cleanup-commands>
  3819. <command>-fs NAMENODE -rm -r hdfs:///*</command>
  3820. </cleanup-commands>
  3821. <comparators>
  3822. <comparator>
  3823. <type>RegexpComparator</type>
  3824. <expected-output>^Deleted hdfs:///file0</expected-output>
  3825. </comparator>
  3826. </comparators>
  3827. </test>
  3828. <test> <!-- TESTED -->
  3829. <description>rm: removing a directory in hdfs:// path </description>
  3830. <test-commands>
  3831. <command>-fs NAMENODE -touchz hdfs:///dir0</command>
  3832. <command>-fs NAMENODE -rm -r hdfs:///dir0</command>
  3833. </test-commands>
  3834. <cleanup-commands>
  3835. <command>-fs NAMENODE -rm -r hdfs:///*</command>
  3836. </cleanup-commands>
  3837. <comparators>
  3838. <comparator>
  3839. <type>RegexpComparator</type>
  3840. <expected-output>^Deleted hdfs:///dir0</expected-output>
  3841. </comparator>
  3842. </comparators>
  3843. </test>
  3844. <test> <!-- TESTED -->
  3845. <description>rm: removing directories by globbing in hdfs:// path </description>
  3846. <test-commands>
  3847. <command>-fs NAMENODE -mkdir hdfs:///dir0</command>
  3848. <command>-fs NAMENODE -mkdir hdfs:///dir1</command>
  3849. <command>-fs NAMENODE -mkdir hdfs:///dir2</command>
  3850. <command>-fs NAMENODE -mkdir hdfs:///dir3</command>
  3851. <command>-fs NAMENODE -rm -r hdfs:///dir*</command>
  3852. </test-commands>
  3853. <cleanup-commands>
  3854. <command>-fs NAMENODE -rm -r hdfs:///*</command>
  3855. </cleanup-commands>
  3856. <comparators>
  3857. <comparator>
  3858. <type>RegexpComparator</type>
  3859. <expected-output>^Deleted hdfs:///dir0</expected-output>
  3860. </comparator>
  3861. <comparator>
  3862. <type>RegexpComparator</type>
  3863. <expected-output>^Deleted hdfs:///dir1</expected-output>
  3864. </comparator>
  3865. <comparator>
  3866. <type>RegexpComparator</type>
  3867. <expected-output>^Deleted hdfs:///dir2</expected-output>
  3868. </comparator>
  3869. <comparator>
  3870. <type>RegexpComparator</type>
  3871. <expected-output>^Deleted hdfs:///dir3</expected-output>
  3872. </comparator>
  3873. </comparators>
  3874. </test>
  3875. <test> <!--TESTED-->
  3876. <description>rm: removing a nonexistent file or directory in hdfs:// path </description>
  3877. <test-commands>
  3878. <command>-fs NAMENODE -rm -r hdfs:///file0</command>
  3879. </test-commands>
  3880. <cleanup-commands>
  3881. <command>-fs NAMENODE -rm -r hdfs:///*</command>
  3882. </cleanup-commands>
  3883. <comparators>
  3884. <comparator>
  3885. <type>RegexpComparator</type>
  3886. <expected-output>^rm: `hdfs:///file0': No such file or directory</expected-output>
  3887. </comparator>
  3888. </comparators>
  3889. </test>
  3890. <test> <!-- TESTED -->
  3891. <description>rm: removing directories without globbing in hdfs:// path </description>
  3892. <test-commands>
  3893. <command>-fs NAMENODE -mkdir hdfs:///dir0</command>
  3894. <command>-fs NAMENODE -mkdir hdfs:///dir1</command>
  3895. <command>-fs NAMENODE -mkdir hdfs:///dir2</command>
  3896. <command>-fs NAMENODE -mkdir hdfs:///dir3</command>
  3897. <command>-fs NAMENODE -rm -r hdfs:///dir0 hdfs:///dir1 hdfs:///dir2 hdfs:///dir3</command>
  3898. </test-commands>
  3899. <cleanup-commands>
  3900. <command>-fs NAMENODE -rm -r hdfs:///*</command>
  3901. </cleanup-commands>
  3902. <comparators>
  3903. <comparator>
  3904. <type>RegexpComparator</type>
  3905. <expected-output>^Deleted hdfs:///dir0</expected-output>
  3906. </comparator>
  3907. <comparator>
  3908. <type>RegexpComparator</type>
  3909. <expected-output>^Deleted hdfs:///dir1</expected-output>
  3910. </comparator>
  3911. <comparator>
  3912. <type>RegexpComparator</type>
  3913. <expected-output>^Deleted hdfs:///dir2</expected-output>
  3914. </comparator>
  3915. <comparator>
  3916. <type>RegexpComparator</type>
  3917. <expected-output>^Deleted hdfs:///dir3</expected-output>
  3918. </comparator>
  3919. </comparators>
  3920. </test>
  3921. <test> <!-- TESTED -->
  3922. <description>rm: Test for Namenode's path - removing a file</description>
  3923. <test-commands>
  3924. <command>-fs NAMENODE -touchz NAMENODE/file0</command>
  3925. <command>-fs NAMENODE -rm -r NAMENODE/file0</command>
  3926. </test-commands>
  3927. <cleanup-commands>
  3928. <command>-fs NAMENODE -rm -r NAMENODE/*</command>
  3929. </cleanup-commands>
  3930. <comparators>
  3931. <comparator>
  3932. <type>RegexpComparator</type>
  3933. <expected-output>^Deleted NAMENODE/file0</expected-output>
  3934. </comparator>
  3935. </comparators>
  3936. </test>
  3937. <test> <!-- TESTED -->
  3938. <description>rm: Test for Namenode's path - removing a directory</description>
  3939. <test-commands>
  3940. <command>-fs NAMENODE -touchz NAMENODE/dir0</command>
  3941. <command>-fs NAMENODE -rm -r NAMENODE/dir0</command>
  3942. </test-commands>
  3943. <cleanup-commands>
  3944. <command>-fs NAMENODE -rm -r NAMENODE/*</command>
  3945. </cleanup-commands>
  3946. <comparators>
  3947. <comparator>
  3948. <type>RegexpComparator</type>
  3949. <expected-output>^Deleted NAMENODE/dir0</expected-output>
  3950. </comparator>
  3951. </comparators>
  3952. </test>
  3953. <test> <!-- TESTED -->
  3954. <description>rm: removing directories by globbing in Namenode's path </description>
  3955. <test-commands>
  3956. <command>-fs NAMENODE -mkdir NAMENODE/dir0</command>
  3957. <command>-fs NAMENODE -mkdir NAMENODE/dir1</command>
  3958. <command>-fs NAMENODE -mkdir NAMENODE/dir2</command>
  3959. <command>-fs NAMENODE -mkdir NAMENODE/dir3</command>
  3960. <command>-fs NAMENODE -rm -r NAMENODE/dir*</command>
  3961. </test-commands>
  3962. <cleanup-commands>
  3963. <command>-fs NAMENODE -rm -r NAMENODE/*</command>
  3964. </cleanup-commands>
  3965. <comparators>
  3966. <comparator>
  3967. <type>RegexpComparator</type>
  3968. <expected-output>^Deleted NAMENODE/dir0</expected-output>
  3969. </comparator>
  3970. <comparator>
  3971. <type>RegexpComparator</type>
  3972. <expected-output>^Deleted NAMENODE/dir1</expected-output>
  3973. </comparator>
  3974. <comparator>
  3975. <type>RegexpComparator</type>
  3976. <expected-output>^Deleted NAMENODE/dir2</expected-output>
  3977. </comparator>
  3978. <comparator>
  3979. <type>RegexpComparator</type>
  3980. <expected-output>^Deleted NAMENODE/dir3</expected-output>
  3981. </comparator>
  3982. </comparators>
  3983. </test>
  3984. <test> <!--TESTED-->
  3985. <description>rm: removing a nonexistent file or directory in Namenode's path </description>
  3986. <test-commands>
  3987. <command>-fs NAMENODE -rm -r NAMENODE/file0</command>
  3988. </test-commands>
  3989. <cleanup-commands>
  3990. <command>-fs NAMENODE -rm -r NAMENODE/*</command>
  3991. </cleanup-commands>
  3992. <comparators>
  3993. <comparator>
  3994. <type>RegexpComparator</type>
  3995. <expected-output>^rm: `NAMENODE/file0': No such file or directory</expected-output>
  3996. </comparator>
  3997. </comparators>
  3998. </test>
  3999. <test> <!-- TESTED -->
  4000. <description>rm: removing directories without globbing in Namenode's path </description>
  4001. <test-commands>
  4002. <command>-fs NAMENODE -mkdir NAMENODE/dir0</command>
  4003. <command>-fs NAMENODE -mkdir NAMENODE/dir1</command>
  4004. <command>-fs NAMENODE -mkdir NAMENODE/dir2</command>
  4005. <command>-fs NAMENODE -mkdir NAMENODE/dir3</command>
  4006. <command>-fs NAMENODE -rm -r NAMENODE/dir0 NAMENODE/dir1 NAMENODE/dir2 NAMENODE/dir3</command>
  4007. </test-commands>
  4008. <cleanup-commands>
  4009. <command>-fs NAMENODE -rm -r NAMENODE/*</command>
  4010. </cleanup-commands>
  4011. <comparators>
  4012. <comparator>
  4013. <type>RegexpComparator</type>
  4014. <expected-output>^Deleted NAMENODE/dir0</expected-output>
  4015. </comparator>
  4016. <comparator>
  4017. <type>RegexpComparator</type>
  4018. <expected-output>^Deleted NAMENODE/dir1</expected-output>
  4019. </comparator>
  4020. <comparator>
  4021. <type>RegexpComparator</type>
  4022. <expected-output>^Deleted NAMENODE/dir2</expected-output>
  4023. </comparator>
  4024. <comparator>
  4025. <type>RegexpComparator</type>
  4026. <expected-output>^Deleted NAMENODE/dir3</expected-output>
  4027. </comparator>
  4028. </comparators>
  4029. </test>
  4030. <!-- Tests for expunge -->
  4031. <!-- Not yet implemented -->
  4032. <!-- Tests for put -->
  4033. <test> <!-- TESTED -->
  4034. <description>put: putting file into a file (absolute path)</description>
  4035. <test-commands>
  4036. <command>-fs NAMENODE -put CLITEST_DATA/data15bytes /data15bytes</command>
  4037. <command>-fs NAMENODE -du /data15bytes</command>
  4038. </test-commands>
  4039. <cleanup-commands>
  4040. <command>-fs NAMENODE -rm /data15bytes</command>
  4041. </cleanup-commands>
  4042. <comparators>
  4043. <comparator>
  4044. <type>RegexpComparator</type>
  4045. <expected-output>^15\s+15\s+/data15bytes</expected-output>
  4046. </comparator>
  4047. </comparators>
  4048. </test>
  4049. <test> <!-- TESTED -->
  4050. <description>put: putting file into a file (relative path)</description>
  4051. <test-commands>
  4052. <command>-fs NAMENODE -mkdir -p dir</command> <!-- make sure user home dir exists -->
  4053. <command>-fs NAMENODE -touchz test</command>
  4054. <command>-fs NAMENODE -put CLITEST_DATA/data15bytes data15bytes</command>
  4055. <command>-fs NAMENODE -du data15bytes</command>
  4056. </test-commands>
  4057. <cleanup-commands>
  4058. <command>-fs NAMENODE -rm -r /user</command>
  4059. </cleanup-commands>
  4060. <comparators>
  4061. <comparator>
  4062. <type>RegexpComparator</type>
  4063. <expected-output>^15\s+15\s+data15bytes</expected-output>
  4064. </comparator>
  4065. </comparators>
  4066. </test>
  4067. <test> <!-- TESTED -->
  4068. <description>put: putting file into a directory(absolute path)</description>
  4069. <test-commands>
  4070. <command>-fs NAMENODE -mkdir -p /dir0/dir1/data</command>
  4071. <command>-fs NAMENODE -put CLITEST_DATA/data15bytes /dir0/dir1/data</command> -->
  4072. <command>-fs NAMENODE -du /dir0/dir1/data</command>
  4073. </test-commands>
  4074. <cleanup-commands>
  4075. <command>-fs NAMENODE -rm -r /dir0</command>
  4076. </cleanup-commands>
  4077. <comparators>
  4078. <comparator>
  4079. <type>RegexpComparator</type>
  4080. <expected-output>^15\s+15\s+/dir0/dir1/data/data15bytes</expected-output>
  4081. </comparator>
  4082. </comparators>
  4083. </test>
  4084. <test> <!-- TESTED -->
  4085. <description>put: putting file into a directory(relative path)</description>
  4086. <test-commands>
  4087. <command>-fs NAMENODE -mkdir -p dir0/dir1/data</command>
  4088. <command>-fs NAMENODE -put CLITEST_DATA/data15bytes dir0/dir1/data</command>
  4089. <command>-fs NAMENODE -du dir0/dir1/data</command>
  4090. </test-commands>
  4091. <cleanup-commands>
  4092. <command>-fs NAMENODE -rm -r /user</command>
  4093. </cleanup-commands>
  4094. <comparators>
  4095. <comparator>
  4096. <type>RegexpComparator</type>
  4097. <expected-output>^15\s+15\s+dir0/dir1/data/data15bytes</expected-output>
  4098. </comparator>
  4099. </comparators>
  4100. </test>
  4101. <test> <!-- TESTED -->
  4102. <description>put: putting many files into an existing directory(absolute path)</description>
  4103. <test-commands>
  4104. <command>-fs NAMENODE -mkdir /dir0</command>
  4105. <command>-fs NAMENODE -put CLITEST_DATA/data15bytes CLITEST_DATA/data30bytes /dir0</command>
  4106. <command>-fs NAMENODE -du /dir0</command>
  4107. </test-commands>
  4108. <cleanup-commands>
  4109. <command>-fs NAMENODE -rm -r /user</command>
  4110. </cleanup-commands>
  4111. <comparators>
  4112. <comparator>
  4113. <type>RegexpComparator</type>
  4114. <expected-output>^15\s+15\s+/dir0/data15bytes</expected-output>
  4115. </comparator>
  4116. <comparator>
  4117. <type>RegexpComparator</type>
  4118. <expected-output>^30\s+30\s+/dir0/data30bytes</expected-output>
  4119. </comparator>
  4120. </comparators>
  4121. </test>
  4122. <test> <!-- TESTED -->
  4123. <description>put: putting many files into an existing directory(relative path)</description>
  4124. <test-commands>
  4125. <command>-fs NAMENODE -mkdir -p dir0</command>
  4126. <command>-fs NAMENODE -put CLITEST_DATA/data15bytes CLITEST_DATA/data30bytes dir0</command>
  4127. <command>-fs NAMENODE -du dir0</command>
  4128. </test-commands>
  4129. <cleanup-commands>
  4130. <command>-fs NAMENODE -rm -r /user</command>
  4131. </cleanup-commands>
  4132. <comparators>
  4133. <comparator>
  4134. <type>RegexpComparator</type>
  4135. <expected-output>^15\s+15\s+dir0/data15bytes</expected-output>
  4136. </comparator>
  4137. <comparator>
  4138. <type>RegexpComparator</type>
  4139. <expected-output>^30\s+30\s+dir0/data30bytes</expected-output>
  4140. </comparator>
  4141. </comparators>
  4142. </test>
  4143. <test> <!-- TESTED -->
  4144. <description>put: putting non existent file(absolute path)</description>
  4145. <test-commands>
  4146. <command>-fs NAMENODE -mkdir -p dir</command> <!-- make sure user home dir exists -->
  4147. <command>-fs NAMENODE -touchz test</command>
  4148. <command>-fs NAMENODE -put /user/wrongdata file</command>
  4149. </test-commands>
  4150. <cleanup-commands>
  4151. <command>-fs NAMENODE -rm -r /user</command>
  4152. </cleanup-commands>
  4153. <comparators>
  4154. <comparator>
  4155. <type>TokenComparator</type>
  4156. <expected-output>put: `/user/wrongdata': No such file or directory</expected-output>
  4157. </comparator>
  4158. </comparators>
  4159. </test>
  4160. <test> <!-- TESTED -->
  4161. <description>put: putting non existent file(relative path)</description>
  4162. <test-commands>
  4163. <command>-fs NAMENODE -mkdir -p dir</command> <!-- make sure user home dir exists -->
  4164. <command>-fs NAMENODE -touchz test</command>
  4165. <command>-fs NAMENODE -put wrongdata file</command>
  4166. </test-commands>
  4167. <cleanup-commands>
  4168. <command>-fs NAMENODE -rm -r /user</command>
  4169. </cleanup-commands>
  4170. <comparators>
  4171. <comparator>
  4172. <type>TokenComparator</type>
  4173. <expected-output>put: `wrongdata': No such file or directory</expected-output>
  4174. </comparator>
  4175. </comparators>
  4176. </test>
  4177. <test> <!-- TESTED -->
  4178. <description>put: putting file into an already existing destination(absolute path)</description>
  4179. <test-commands>
  4180. <command>-fs NAMENODE -mkdir /user</command>
  4181. <command>-fs NAMENODE -touchz /user/file0</command>
  4182. <command>-fs NAMENODE -put CLITEST_DATA/data15bytes /user/file0</command>
  4183. </test-commands>
  4184. <cleanup-commands>
  4185. <command>-fs NAMENODE -rm -r /user</command>
  4186. </cleanup-commands>
  4187. <comparators>
  4188. <comparator>
  4189. <type>TokenComparator</type>
  4190. <expected-output>put: `/user/file0': File exists</expected-output>
  4191. </comparator>
  4192. </comparators>
  4193. </test>
  4194. <test> <!-- TESTED -->
  4195. <description>put: putting file into an already existing destination with -f option(absolute path)</description>
  4196. <test-commands>
  4197. <command>-fs NAMENODE -mkdir /user</command>
  4198. <command>-fs NAMENODE -touchz /user/file0</command>
  4199. <command>-fs NAMENODE -put -f CLITEST_DATA/data120bytes /user/file0</command>
  4200. <command>-fs NAMENODE -cat /user/file0</command>
  4201. </test-commands>
  4202. <cleanup-commands>
  4203. <command>-fs NAMENODE -rm -r /user</command>
  4204. </cleanup-commands>
  4205. <comparators>
  4206. <comparator>
  4207. <type>RegexpComparator</type>
  4208. <expected-output>12345678901234</expected-output>
  4209. </comparator>
  4210. </comparators>
  4211. </test>
  4212. <test> <!-- TESTED -->
  4213. <description>put: putting file into an already existing destination(relative path)</description>
  4214. <test-commands>
  4215. <command>-fs NAMENODE -mkdir -p dir</command> <!-- make sure user home dir exists -->
  4216. <command>-fs NAMENODE -touchz file0</command>
  4217. <command>-fs NAMENODE -put CLITEST_DATA/data15bytes file0</command>
  4218. </test-commands>
  4219. <cleanup-commands>
  4220. <command>-fs NAMENODE -rm -r /user</command>
  4221. </cleanup-commands>
  4222. <comparators>
  4223. <comparator>
  4224. <type>TokenComparator</type>
  4225. <expected-output>put: `file0': File exists</expected-output>
  4226. </comparator>
  4227. </comparators>
  4228. </test>
  4229. <test> <!-- TESTED -->
  4230. <description>put: putting many files into an existing file</description>
  4231. <test-commands>
  4232. <command>-fs NAMENODE -put CLITEST_DATA/data15bytes /data15bytes</command>
  4233. <command>-fs NAMENODE -put CLITEST_DATA/data30bytes /data30bytes</command>
  4234. <command>-fs NAMENODE -mkdir -p dir</command> <!-- make sure user home dir exists -->
  4235. <command>-fs NAMENODE -touchz file0</command>
  4236. <command>-fs NAMENODE -put /data15bytes /data30bytes file0</command>
  4237. </test-commands>
  4238. <cleanup-commands>
  4239. <command>-fs NAMENODE -rm -r /user</command>
  4240. </cleanup-commands>
  4241. <comparators>
  4242. <comparator>
  4243. <type>RegexpComparator</type>
  4244. <expected-output>^put: `file0': Is not a directory</expected-output>
  4245. </comparator>
  4246. </comparators>
  4247. </test>
  4248. <test> <!-- TESTED -->
  4249. <description>put: putting many files into a non existent directory</description>
  4250. <test-commands>
  4251. <command>-fs NAMENODE -put CLITEST_DATA/data15bytes /data15bytes</command>
  4252. <command>-fs NAMENODE -put CLITEST_DATA/data30bytes /data30bytes</command>
  4253. <command>-fs NAMENODE -put /data15bytes /data30bytes wrongdir</command>
  4254. </test-commands>
  4255. <cleanup-commands>
  4256. <command>-fs NAMENODE -rm -r /user</command>
  4257. </cleanup-commands>
  4258. <comparators>
  4259. <comparator>
  4260. <type>RegexpComparator</type>
  4261. <expected-output>^put: `wrongdir': No such file or directory</expected-output>
  4262. </comparator>
  4263. </comparators>
  4264. </test>
  4265. <test> <!-- TESTED -->
  4266. <description>put: putting a local file into hdfs:// path </description>
  4267. <test-commands>
  4268. <command>-fs NAMENODE -put CLITEST_DATA/data15bytes hdfs:///data15bytes</command>
  4269. <command>-fs NAMENODE -du hdfs:///data15bytes</command>
  4270. </test-commands>
  4271. <cleanup-commands>
  4272. <command>-fs NAMENODE -rm hdfs:///data15bytes</command>
  4273. </cleanup-commands>
  4274. <comparators>
  4275. <comparator>
  4276. <type>RegexpComparator</type>
  4277. <expected-output>^15\s+15\s+hdfs:///data15bytes</expected-output>
  4278. </comparator>
  4279. </comparators>
  4280. </test>
  4281. <test> <!-- TESTED -->
  4282. <description>put: putting file into a directory in hdfs:// path </description>
  4283. <test-commands>
  4284. <command>-fs NAMENODE -mkdir -p /dir1/data</command>
  4285. <command>-fs NAMENODE -put CLITEST_DATA/data15bytes hdfs:///dir1/data</command>
  4286. <command>-fs NAMENODE -du hdfs:///dir1/data/</command>
  4287. </test-commands>
  4288. <cleanup-commands>
  4289. <command>-fs NAMENODE -rm -r hdfs:///dir1/data</command>
  4290. </cleanup-commands>
  4291. <comparators>
  4292. <comparator>
  4293. <type>RegexpComparator</type>
  4294. <expected-output>^15\s+15\s+hdfs:///dir1/data/data15bytes</expected-output>
  4295. </comparator>
  4296. </comparators>
  4297. </test>
  4298. <test> <!-- TESTED -->
  4299. <description>put: putting many local files into an existing directory in hdfs:// path </description>
  4300. <test-commands>
  4301. <command>-fs NAMENODE -mkdir hdfs:///dir0</command>
  4302. <command>-fs NAMENODE -put CLITEST_DATA/data15bytes CLITEST_DATA/data30bytes hdfs:///dir0</command>
  4303. <command>-fs NAMENODE -du hdfs:///dir0</command>
  4304. </test-commands>
  4305. <cleanup-commands>
  4306. <command>-fs NAMENODE -rm -r hdfs:///dir0</command>
  4307. </cleanup-commands>
  4308. <comparators>
  4309. <comparator>
  4310. <type>RegexpComparator</type>
  4311. <expected-output>^15\s+15\s+hdfs:///dir0/data15bytes</expected-output>
  4312. </comparator>
  4313. <comparator>
  4314. <type>RegexpComparator</type>
  4315. <expected-output>^30\s+30\s+hdfs:///dir0/data30bytes</expected-output>
  4316. </comparator>
  4317. </comparators>
  4318. </test>
  4319. <test> <!-- TESTED -->
  4320. <description>put: putting non existent file in hdfs:// path </description>
  4321. <test-commands>
  4322. <command>-fs NAMENODE -put /user/wrongdata hdfs:///file</command>
  4323. </test-commands>
  4324. <cleanup-commands>
  4325. <command>-fs NAMENODE -rm -r hdfs:///*</command>
  4326. </cleanup-commands>
  4327. <comparators>
  4328. <comparator>
  4329. <type>TokenComparator</type>
  4330. <expected-output>put: `/user/wrongdata': No such file or directory</expected-output>
  4331. </comparator>
  4332. </comparators>
  4333. </test>
  4334. <test> <!-- TESTED -->
  4335. <description>put: putting local file into an already existing destination in hdfs:// path </description>
  4336. <test-commands>
  4337. <command>-fs NAMENODE -mkdir hdfs:///user/</command>
  4338. <command>-fs NAMENODE -touchz hdfs:///user/file0</command>
  4339. <command>-fs NAMENODE -put CLITEST_DATA/data15bytes hdfs:///user/file0</command>
  4340. </test-commands>
  4341. <cleanup-commands>
  4342. <command>-fs NAMENODE -rm -r hdfs:///user</command>
  4343. </cleanup-commands>
  4344. <comparators>
  4345. <comparator>
  4346. <type>TokenComparator</type>
  4347. <expected-output>put: `hdfs:///user/file0': File exists</expected-output>
  4348. </comparator>
  4349. </comparators>
  4350. </test>
  4351. <test> <!-- TESTED -->
  4352. <description>put: putting many local files into an existing file in hdfs:// path</description>
  4353. <test-commands>
  4354. <command>-fs NAMENODE -touchz hdfs:///file0</command>
  4355. <command>-fs NAMENODE -put CLITEST_DATA/data15bytes CLITEST_DATA/data30bytes hdfs:///file0</command>
  4356. </test-commands>
  4357. <cleanup-commands>
  4358. <command>-fs NAMENODE -rm -r hdfs:///*</command>
  4359. </cleanup-commands>
  4360. <comparators>
  4361. <comparator>
  4362. <type>RegexpComparator</type>
  4363. <expected-output>^put: `hdfs:///file0': Is not a directory</expected-output>
  4364. </comparator>
  4365. </comparators>
  4366. </test>
  4367. <test> <!-- TESTED -->
  4368. <description>put: putting file into a non existent directory in hdfs:// path </description>
  4369. <test-commands>
  4370. <command>-fs NAMENODE -put CLITEST_DATA/data15bytes CLITEST_DATA/data30bytes hdfs:///wrongdir</command>
  4371. </test-commands>
  4372. <cleanup-commands>
  4373. <command>-fs NAMENODE -rm -r hdfs:///*</command>
  4374. </cleanup-commands>
  4375. <comparators>
  4376. <comparator>
  4377. <type>RegexpComparator</type>
  4378. <expected-output>^put: `hdfs:///wrongdir': No such file or directory</expected-output>
  4379. </comparator>
  4380. </comparators>
  4381. </test>
  4382. <test> <!-- TESTED -->
  4383. <description>put: putting a local file into in Namenode's path </description>
  4384. <test-commands>
  4385. <command>-fs NAMENODE -put CLITEST_DATA/data15bytes NAMENODE/data15bytes</command>
  4386. <command>-fs NAMENODE -du NAMENODE/data15bytes</command>
  4387. </test-commands>
  4388. <cleanup-commands>
  4389. <command>-fs NAMENODE -rm NAMENODE/data15bytes</command>
  4390. </cleanup-commands>
  4391. <comparators>
  4392. <comparator>
  4393. <type>RegexpComparator</type>
  4394. <expected-output>^15\s+15\s+NAMENODE/data15bytes</expected-output>
  4395. </comparator>
  4396. </comparators>
  4397. </test>
  4398. <test> <!-- TESTED -->
  4399. <description>put: putting file into a directory in Namenode's path </description>
  4400. <test-commands>
  4401. <command>-fs NAMENODE -mkdir -p /dir1/data</command>
  4402. <command>-fs NAMENODE -put CLITEST_DATA/data15bytes NAMENODE/dir1/data</command>
  4403. <command>-fs NAMENODE -du NAMENODE/dir1/data</command>
  4404. </test-commands>
  4405. <cleanup-commands>
  4406. <command>-fs NAMENODE -rm -r NAMENODE/dir1/data</command>
  4407. </cleanup-commands>
  4408. <comparators>
  4409. <comparator>
  4410. <type>RegexpComparator</type>
  4411. <expected-output>^15\s+15\s+NAMENODE/dir1/data/data15bytes</expected-output>
  4412. </comparator>
  4413. </comparators>
  4414. </test>
  4415. <test> <!-- TESTED -->
  4416. <description>put: putting many local files into an existing directory in Namenode's path</description>
  4417. <test-commands>
  4418. <command>-fs NAMENODE -mkdir NAMENODE/dir0</command>
  4419. <command>-fs NAMENODE -put CLITEST_DATA/data15bytes CLITEST_DATA/data30bytes NAMENODE/dir0</command>
  4420. <command>-fs NAMENODE -du NAMENODE/dir0</command>
  4421. </test-commands>
  4422. <cleanup-commands>
  4423. <command>-fs NAMENODE -rm -r NAMENODE/dir0</command>
  4424. </cleanup-commands>
  4425. <comparators>
  4426. <comparator>
  4427. <type>RegexpComparator</type>
  4428. <expected-output>^15\s+15\s+NAMENODE/dir0/data15bytes</expected-output>
  4429. </comparator>
  4430. <comparator>
  4431. <type>RegexpComparator</type>
  4432. <expected-output>^30\s+30\s+NAMENODE/dir0/data30bytes</expected-output>
  4433. </comparator>
  4434. </comparators>
  4435. </test>
  4436. <test> <!-- TESTED -->
  4437. <description>put: putting non existent file in Namenode's path </description>
  4438. <test-commands>
  4439. <command>-fs NAMENODE -put /user/wrongdata NAMENODE/file</command>
  4440. </test-commands>
  4441. <cleanup-commands>
  4442. <command>-fs NAMENODE -rm -r NAMENODE/*</command>
  4443. </cleanup-commands>
  4444. <comparators>
  4445. <comparator>
  4446. <type>RegexpComparator</type>
  4447. <expected-output>^put: `/user/wrongdata': No such file or directory</expected-output>
  4448. </comparator>
  4449. </comparators>
  4450. </test>
  4451. <test> <!-- TESTED -->
  4452. <description>put: putting local file into an already existing destination in Namenode's path</description>
  4453. <test-commands>
  4454. <command>-fs NAMENODE -mkdir NAMENODE/user/</command>
  4455. <command>-fs NAMENODE -touchz NAMENODE/user/file0</command>
  4456. <command>-fs NAMENODE -put CLITEST_DATA/data15bytes NAMENODE/user/file0</command>
  4457. </test-commands>
  4458. <cleanup-commands>
  4459. <command>-fs NAMENODE -rm -r NAMENODE/user</command>
  4460. </cleanup-commands>
  4461. <comparators>
  4462. <comparator>
  4463. <type>RegexpComparator</type>
  4464. <expected-output>^put: `hdfs://\w+[-.a-z0-9]*:[0-9]+/user/file0': File exists</expected-output>
  4465. </comparator>
  4466. </comparators>
  4467. </test>
  4468. <test> <!-- TESTED -->
  4469. <description>put: putting many local files into an existing file in Namenode's path </description>
  4470. <test-commands>
  4471. <command>-fs NAMENODE -touchz NAMENODE/file0</command>
  4472. <command>-fs NAMENODE -put CLITEST_DATA/data15bytes CLITEST_DATA/data30bytes NAMENODE/file0</command>
  4473. </test-commands>
  4474. <cleanup-commands>
  4475. <command>-fs NAMENODE -rm -r NAMENODE/*</command>
  4476. </cleanup-commands>
  4477. <comparators>
  4478. <comparator>
  4479. <type>RegexpComparator</type>
  4480. <expected-output>^put: `hdfs://\w+[-.a-z0-9]*:[0-9]+/file0': Is not a directory</expected-output>
  4481. </comparator>
  4482. </comparators>
  4483. </test>
  4484. <test> <!-- TESTED -->
  4485. <description>put: putting many files into a non existent directory in Namenode's path </description>
  4486. <test-commands>
  4487. <command>-fs NAMENODE -put CLITEST_DATA/data15bytes CLITEST_DATA/data30bytes NAMENODE/wrongdir</command>
  4488. </test-commands>
  4489. <cleanup-commands>
  4490. <command>-fs NAMENODE -rm -r NAMENODE/*</command>
  4491. </cleanup-commands>
  4492. <comparators>
  4493. <comparator>
  4494. <type>RegexpComparator</type>
  4495. <expected-output>^put: `hdfs://\w+[-.a-z0-9]*:[0-9]+/wrongdir': No such file or directory</expected-output>
  4496. </comparator>
  4497. </comparators>
  4498. </test>
  4499. <!-- Tests for copyFromLocal -->
  4500. <test> <!-- TESTED -->
  4501. <description>copyFromLocal: copying file into a file (absolute path)</description>
  4502. <test-commands>
  4503. <command>-fs NAMENODE -copyFromLocal CLITEST_DATA/data15bytes /data15bytes</command>
  4504. <command>-fs NAMENODE -du /data15bytes</command>
  4505. </test-commands>
  4506. <cleanup-commands>
  4507. <command>-fs NAMENODE -rm /data15bytes</command>
  4508. </cleanup-commands>
  4509. <comparators>
  4510. <comparator>
  4511. <type>RegexpComparator</type>
  4512. <expected-output>^15\s+15\s+/data15bytes</expected-output>
  4513. </comparator>
  4514. </comparators>
  4515. </test>
  4516. <test> <!-- TESTED -->
  4517. <description>copyFromLocal: copying file into a file (relative path)</description>
  4518. <test-commands>
  4519. <command>-fs NAMENODE -mkdir -p dir</command> <!-- make sure user home dir exists -->
  4520. <command>-fs NAMENODE -touchz test</command>
  4521. <command>-fs NAMENODE -copyFromLocal CLITEST_DATA/data15bytes data15bytes</command>
  4522. <command>-fs NAMENODE -du data15bytes</command>
  4523. </test-commands>
  4524. <cleanup-commands>
  4525. <command>-fs NAMENODE -rm -r /user</command>
  4526. </cleanup-commands>
  4527. <comparators>
  4528. <comparator>
  4529. <type>RegexpComparator</type>
  4530. <expected-output>^15\s+15\s+data15bytes</expected-output>
  4531. </comparator>
  4532. </comparators>
  4533. </test>
  4534. <test> <!-- TESTED -->
  4535. <description>copyFromLocal: copying file into a directory(absolute path)</description>
  4536. <test-commands>
  4537. <command>-fs NAMENODE -mkdir -p /dir0/dir1/data</command>
  4538. <command>-fs NAMENODE -copyFromLocal CLITEST_DATA/data15bytes /dir0/dir1/data</command>
  4539. <command>-fs NAMENODE -du /dir0/dir1/data/*</command>
  4540. </test-commands>
  4541. <cleanup-commands>
  4542. <command>-fs NAMENODE -rm -r /dir0</command>
  4543. </cleanup-commands>
  4544. <comparators>
  4545. <comparator>
  4546. <type>RegexpComparator</type>
  4547. <expected-output>^15\s+15\s+/dir0/dir1/data/data15bytes</expected-output>
  4548. </comparator>
  4549. </comparators>
  4550. </test>
  4551. <test> <!-- TESTED -->
  4552. <description>copyFromLocal: copying file into a directory(relative path)</description>
  4553. <test-commands>
  4554. <command>-fs NAMENODE -mkdir -p dir0/dir1/data</command>
  4555. <command>-fs NAMENODE -copyFromLocal CLITEST_DATA/data15bytes dir0/dir1/data</command>
  4556. <command>-fs NAMENODE -du dir0/dir1/data/*</command>
  4557. </test-commands>
  4558. <cleanup-commands>
  4559. <command>-fs NAMENODE -rm -r /user</command>
  4560. </cleanup-commands>
  4561. <comparators>
  4562. <comparator>
  4563. <type>RegexpComparator</type>
  4564. <expected-output>^15\s+15\s+dir0/dir1/data/data15bytes</expected-output>
  4565. </comparator>
  4566. </comparators>
  4567. </test>
  4568. <test> <!-- TESTED -->
  4569. <description>copyFromLocal: copying many files into an existing directory(absolute path)</description>
  4570. <test-commands>
  4571. <command>-fs NAMENODE -mkdir /dir0</command>
  4572. <command>-fs NAMENODE -copyFromLocal CLITEST_DATA/data15bytes CLITEST_DATA/data30bytes /dir0</command>
  4573. <command>-fs NAMENODE -du /dir0</command>
  4574. </test-commands>
  4575. <cleanup-commands>
  4576. <command>-fs NAMENODE -rm -r /user</command>
  4577. </cleanup-commands>
  4578. <comparators>
  4579. <comparator>
  4580. <type>RegexpComparator</type>
  4581. <expected-output>^15\s+15\s+/dir0/data15bytes</expected-output>
  4582. </comparator>
  4583. <comparator>
  4584. <type>RegexpComparator</type>
  4585. <expected-output>^30\s+30\s+/dir0/data30bytes</expected-output>
  4586. </comparator>
  4587. </comparators>
  4588. </test>
  4589. <test> <!-- TESTED -->
  4590. <description>copyFromLocal: copying many files into an existing directory(relative path)</description>
  4591. <test-commands>
  4592. <command>-fs NAMENODE -mkdir -p dir0</command>
  4593. <command>-fs NAMENODE -copyFromLocal CLITEST_DATA/data15bytes CLITEST_DATA/data30bytes dir0</command>
  4594. <command>-fs NAMENODE -du dir0</command>
  4595. </test-commands>
  4596. <cleanup-commands>
  4597. <command>-fs NAMENODE -rm -r /user</command>
  4598. </cleanup-commands>
  4599. <comparators>
  4600. <comparator>
  4601. <type>RegexpComparator</type>
  4602. <expected-output>^15\s+15\s+dir0/data15bytes</expected-output>
  4603. </comparator>
  4604. <comparator>
  4605. <type>RegexpComparator</type>
  4606. <expected-output>^30\s+30\s+dir0/data30bytes</expected-output>
  4607. </comparator>
  4608. </comparators>
  4609. </test>
  4610. <test> <!-- TESTED -->
  4611. <description>copyFromLocal: copying non existent file(absolute path)</description>
  4612. <test-commands>
  4613. <command>-fs NAMENODE -mkdir -p dir</command> <!-- make sure user home dir exists -->
  4614. <command>-fs NAMENODE -touchz test</command>
  4615. <command>-fs NAMENODE -copyFromLocal /user/wrongdata file</command>
  4616. </test-commands>
  4617. <cleanup-commands>
  4618. <command>-fs NAMENODE -rm -r /user</command>
  4619. </cleanup-commands>
  4620. <comparators>
  4621. <comparator>
  4622. <type>TokenComparator</type>
  4623. <expected-output>copyFromLocal: `/user/wrongdata': No such file or directory</expected-output>
  4624. </comparator>
  4625. </comparators>
  4626. </test>
  4627. <test> <!-- TESTED -->
  4628. <description>copyFromLocal: copying non existent file(relative path)</description>
  4629. <test-commands>
  4630. <command>-fs NAMENODE -mkdir -p dir</command> <!-- make sure user home dir exists -->
  4631. <command>-fs NAMENODE -touchz test</command>
  4632. <command>-fs NAMENODE -copyFromLocal wrongdata file</command>
  4633. </test-commands>
  4634. <cleanup-commands>
  4635. <command>-fs NAMENODE -rm -r /user</command>
  4636. </cleanup-commands>
  4637. <comparators>
  4638. <comparator>
  4639. <type>TokenComparator</type>
  4640. <expected-output>copyFromLocal: `wrongdata': No such file or directory</expected-output>
  4641. </comparator>
  4642. </comparators>
  4643. </test>
  4644. <test> <!-- TESTED -->
  4645. <description>copyFromLocal: copying file into an already existing destination(absolute path)</description>
  4646. <test-commands>
  4647. <command>-fs NAMENODE -mkdir /user</command>
  4648. <command>-fs NAMENODE -touchz /user/file0</command>
  4649. <command>-fs NAMENODE -copyFromLocal CLITEST_DATA/data15bytes /user/file0</command>
  4650. </test-commands>
  4651. <cleanup-commands>
  4652. <command>-fs NAMENODE -rm -r /user</command>
  4653. </cleanup-commands>
  4654. <comparators>
  4655. <comparator>
  4656. <type>TokenComparator</type>
  4657. <expected-output>copyFromLocal: `/user/file0': File exists</expected-output>
  4658. </comparator>
  4659. </comparators>
  4660. </test>
  4661. <test> <!-- TESTED -->
  4662. <description>copyFromLocal: copying file into an already existing destination with -f option(absolute path)</description>
  4663. <test-commands>
  4664. <command>-fs NAMENODE -mkdir /user</command>
  4665. <command>-fs NAMENODE -touchz /user/file0</command>
  4666. <command>-fs NAMENODE -copyFromLocal -f CLITEST_DATA/data120bytes /user/file0</command>
  4667. <command>-fs NAMENODE -cat /user/file0</command>
  4668. </test-commands>
  4669. <cleanup-commands>
  4670. <command>-fs NAMENODE -rm -r /user</command>
  4671. </cleanup-commands>
  4672. <comparators>
  4673. <comparator>
  4674. <type>RegexpComparator</type>
  4675. <expected-output>12345678901234</expected-output>
  4676. </comparator>
  4677. </comparators>
  4678. </test>
  4679. <test> <!-- TESTED -->
  4680. <description>copyFromLocal: copying file into an already existing destination(relative path)</description>
  4681. <test-commands>
  4682. <command>-fs NAMENODE -mkdir -p dir</command> <!-- make sure user home dir exists -->
  4683. <command>-fs NAMENODE -touchz file0</command>
  4684. <command>-fs NAMENODE -copyFromLocal CLITEST_DATA/data15bytes file0</command>
  4685. </test-commands>
  4686. <cleanup-commands>
  4687. <command>-fs NAMENODE -rm -r /user</command>
  4688. </cleanup-commands>
  4689. <comparators>
  4690. <comparator>
  4691. <type>TokenComparator</type>
  4692. <expected-output>copyFromLocal: `file0': File exists</expected-output>
  4693. </comparator>
  4694. </comparators>
  4695. </test>
  4696. <test> <!-- TESTED -->
  4697. <description>copyFromLocal: copying many files into an existing file</description>
  4698. <test-commands>
  4699. <command>-fs NAMENODE -copyFromLocal CLITEST_DATA/data15bytes /data15bytes</command>
  4700. <command>-fs NAMENODE -copyFromLocal CLITEST_DATA/data30bytes /data30bytes</command>
  4701. <command>-fs NAMENODE -mkdir -p dir</command> <!-- make sure user home dir exists -->
  4702. <command>-fs NAMENODE -touchz file0</command>
  4703. <command>-fs NAMENODE -copyFromLocal /data15bytes /data30bytes file0</command>
  4704. </test-commands>
  4705. <cleanup-commands>
  4706. <command>-fs NAMENODE -rm -r /user</command>
  4707. </cleanup-commands>
  4708. <comparators>
  4709. <comparator>
  4710. <type>RegexpComparator</type>
  4711. <expected-output>^copyFromLocal: `file0': Is not a directory</expected-output>
  4712. </comparator>
  4713. </comparators>
  4714. </test>
  4715. <test> <!-- TESTED -->
  4716. <description>copyFromLocal: copying many files into a non existent directory</description>
  4717. <test-commands>
  4718. <command>-fs NAMENODE -copyFromLocal CLITEST_DATA/data15bytes /data15bytes</command>
  4719. <command>-fs NAMENODE -copyFromLocal CLITEST_DATA/data30bytes /data30bytes</command>
  4720. <command>-fs NAMENODE -copyFromLocal /data15bytes /data30bytes wrongdir</command>
  4721. </test-commands>
  4722. <cleanup-commands>
  4723. <command>-fs NAMENODE -rm -r /user</command>
  4724. </cleanup-commands>
  4725. <comparators>
  4726. <comparator>
  4727. <type>RegexpComparator</type>
  4728. <expected-output>^copyFromLocal: `wrongdir': No such file or directory</expected-output>
  4729. </comparator>
  4730. </comparators>
  4731. </test>
  4732. <test> <!-- TESTED -->
  4733. <description>copyFromLocal: Test for hdfs:// path - copying local file into a hdfs://file</description>
  4734. <test-commands>
  4735. <command>-fs NAMENODE -copyFromLocal CLITEST_DATA/data15bytes hdfs:///data15bytes</command>
  4736. <command>-fs NAMENODE -du hdfs:///data15bytes</command>
  4737. </test-commands>
  4738. <cleanup-commands>
  4739. <command>-fs NAMENODE -rm hdfs:///data15bytes</command>
  4740. </cleanup-commands>
  4741. <comparators>
  4742. <comparator>
  4743. <type>RegexpComparator</type>
  4744. <expected-output>^15\s+15\s+hdfs:///data15bytes</expected-output>
  4745. </comparator>
  4746. </comparators>
  4747. </test>
  4748. <test> <!-- TESTED -->
  4749. <description>copyFromLocal: Test for hdfs:// path - copying local file into a hdfs directory</description>
  4750. <test-commands>
  4751. <command>-fs NAMENODE -mkdir hdfs:///dir0</command>
  4752. <command>-fs NAMENODE -mkdir hdfs:///dir0/dir1</command>
  4753. <command>-fs NAMENODE -mkdir hdfs:///dir0/dir1/data</command>
  4754. <command>-fs NAMENODE -copyFromLocal CLITEST_DATA/data15bytes hdfs:///dir0/dir1/data/</command>
  4755. <command>-fs NAMENODE -du hdfs:///dir0/dir1/data/data15bytes</command>
  4756. </test-commands>
  4757. <cleanup-commands>
  4758. <command>-fs NAMENODE -rm -r hdfs:///dir0</command>
  4759. </cleanup-commands>
  4760. <comparators>
  4761. <comparator>
  4762. <type>RegexpComparator</type>
  4763. <expected-output>^15\s+15\s+hdfs:///dir0/dir1/data/data15bytes</expected-output>
  4764. </comparator>
  4765. </comparators>
  4766. </test>
  4767. <test> <!-- TESTED -->
  4768. <description>copyFromLocal: Test for hdfs:// path copying many local files into an existing hdfs directory</description>
  4769. <test-commands>
  4770. <command>-fs NAMENODE -mkdir hdfs:///dir0</command>
  4771. <command>-fs NAMENODE -copyFromLocal CLITEST_DATA/data15bytes CLITEST_DATA/data30bytes hdfs:///dir0</command>
  4772. <command>-fs NAMENODE -du hdfs:///dir0</command>
  4773. </test-commands>
  4774. <cleanup-commands>
  4775. <command>-fs NAMENODE -rm -r hdfs:///dir0</command>
  4776. </cleanup-commands>
  4777. <comparators>
  4778. <comparator>
  4779. <type>RegexpComparator</type>
  4780. <expected-output>^15\s+15\s+hdfs:///dir0/data15bytes</expected-output>
  4781. </comparator>
  4782. <comparator>
  4783. <type>RegexpComparator</type>
  4784. <expected-output>^30\s+30\s+hdfs:///dir0/data30bytes</expected-output>
  4785. </comparator>
  4786. </comparators>
  4787. </test>
  4788. <test> <!-- TESTED -->
  4789. <description>copyFromLocal: Test for hdfs:// path - copying non existent file</description>
  4790. <test-commands>
  4791. <command>-fs NAMENODE -copyFromLocal /user/wrongdata hdfs:///file</command>
  4792. </test-commands>
  4793. <cleanup-commands>
  4794. <command>-fs NAMENODE -rm -r hdfs:///*</command>
  4795. </cleanup-commands>
  4796. <comparators>
  4797. <comparator>
  4798. <type>TokenComparator</type>
  4799. <expected-output>copyFromLocal: `/user/wrongdata': No such file or directory</expected-output>
  4800. </comparator>
  4801. </comparators>
  4802. </test>
  4803. <test> <!-- TESTED -->
  4804. <description>copyFromLocal: Test for hdfs:// path - copying local file into an already existing destination</description>
  4805. <test-commands>
  4806. <command>-fs NAMENODE -mkdir hdfs:///user/</command>
  4807. <command>-fs NAMENODE -touchz hdfs:///user/file0</command>
  4808. <command>-fs NAMENODE -copyFromLocal CLITEST_DATA/data15bytes hdfs:///user/file0</command>
  4809. </test-commands>
  4810. <cleanup-commands>
  4811. <command>-fs NAMENODE -rm -r hdfs:///user</command>
  4812. </cleanup-commands>
  4813. <comparators>
  4814. <comparator>
  4815. <type>TokenComparator</type>
  4816. <expected-output>copyFromLocal: `hdfs:///user/file0': File exists</expected-output>
  4817. </comparator>
  4818. </comparators>
  4819. </test>
  4820. <test> <!-- TESTED -->
  4821. <description>copyFromLocal: Test for hdfs:// path - copying many local files into an existing file</description>
  4822. <test-commands>
  4823. <command>-fs NAMENODE -touchz hdfs:///file0</command>
  4824. <command>-fs NAMENODE -copyFromLocal CLITEST_DATA/data15bytes CLITEST_DATA/data30bytes hdfs:///file0</command>
  4825. </test-commands>
  4826. <cleanup-commands>
  4827. <command>-fs NAMENODE -rm -r hdfs:///*</command>
  4828. </cleanup-commands>
  4829. <comparators>
  4830. <comparator>
  4831. <type>RegexpComparator</type>
  4832. <expected-output>^copyFromLocal: `hdfs:///file0': Is not a directory</expected-output>
  4833. </comparator>
  4834. </comparators>
  4835. </test>
  4836. <test> <!-- TESTED -->
  4837. <description>copyFromLocal: Test for hdfs:// path - copying many local files into a non existent directory</description>
  4838. <test-commands>
  4839. <command>-fs NAMENODE -copyFromLocal CLITEST_DATA/data15bytes CLITEST_DATA/data30bytes hdfs:///wrongdir</command>
  4840. </test-commands>
  4841. <cleanup-commands>
  4842. <command>-fs NAMENODE -rm -r hdfs:///*</command>
  4843. </cleanup-commands>
  4844. <comparators>
  4845. <comparator>
  4846. <type>RegexpComparator</type>
  4847. <expected-output>^copyFromLocal: `hdfs:///wrongdir': No such file or directory</expected-output>
  4848. </comparator>
  4849. </comparators>
  4850. </test>
  4851. <!-- Tests for copyFromLocal using Namenode's path-->
  4852. <test> <!-- TESTED -->
  4853. <description>copyFromLocal: Test for Namenode's path - copying local file into a hdfs://file</description>
  4854. <test-commands>
  4855. <command>-fs NAMENODE -copyFromLocal CLITEST_DATA/data15bytes NAMENODE/data15bytes</command>
  4856. <command>-fs NAMENODE -du NAMENODE/data15bytes</command>
  4857. </test-commands>
  4858. <cleanup-commands>
  4859. <command>-fs NAMENODE -rm NAMENODE/data15bytes</command>
  4860. </cleanup-commands>
  4861. <comparators>
  4862. <comparator>
  4863. <type>RegexpComparator</type>
  4864. <expected-output>^15\s+15\s+NAMENODE/data15bytes</expected-output>
  4865. </comparator>
  4866. </comparators>
  4867. </test>
  4868. <test> <!-- TESTED -->
  4869. <description>copyFromLocal: Test for Namenode's path - copying local file into a hdfs directory</description>
  4870. <test-commands>
  4871. <command>-fs NAMENODE -mkdir NAMENODE/dir0</command>
  4872. <command>-fs NAMENODE -mkdir NAMENODE/dir0/dir1</command>
  4873. <command>-fs NAMENODE -mkdir NAMENODE/dir0/dir1/data</command>
  4874. <command>-fs NAMENODE -copyFromLocal CLITEST_DATA/data15bytes NAMENODE/dir0/dir1/data/</command>
  4875. <command>-fs NAMENODE -du NAMENODE/dir0/dir1/data/data15bytes</command>
  4876. </test-commands>
  4877. <cleanup-commands>
  4878. <command>-fs NAMENODE -rm -r NAMENODE/dir0</command>
  4879. </cleanup-commands>
  4880. <comparators>
  4881. <comparator>
  4882. <type>RegexpComparator</type>
  4883. <expected-output>^15\s+15\s+NAMENODE/dir0/dir1/data/data15bytes</expected-output>
  4884. </comparator>
  4885. </comparators>
  4886. </test>
  4887. <test> <!-- TESTED -->
  4888. <description>copyFromLocal: Test for Namenode's path copying many local files into an existing hdfs directory</description>
  4889. <test-commands>
  4890. <command>-fs NAMENODE -mkdir NAMENODE/dir0</command>
  4891. <command>-fs NAMENODE -copyFromLocal CLITEST_DATA/data15bytes CLITEST_DATA/data30bytes NAMENODE/dir0</command>
  4892. <command>-fs NAMENODE -du NAMENODE/dir0</command>
  4893. </test-commands>
  4894. <cleanup-commands>
  4895. <command>-fs NAMENODE -rm -r NAMENODE/dir0</command>
  4896. </cleanup-commands>
  4897. <comparators>
  4898. <comparator>
  4899. <type>RegexpComparator</type>
  4900. <expected-output>^15\s+15\s+NAMENODE/dir0/data15bytes</expected-output>
  4901. </comparator>
  4902. <comparator>
  4903. <type>RegexpComparator</type>
  4904. <expected-output>^30\s+30\s+NAMENODE/dir0/data30bytes</expected-output>
  4905. </comparator>
  4906. </comparators>
  4907. </test>
  4908. <test> <!-- TESTED -->
  4909. <description>copyFromLocal: Test for Namenode's path - copying non existent file</description>
  4910. <test-commands>
  4911. <command>-fs NAMENODE -copyFromLocal /user/wrongdata NAMENODE/file</command>
  4912. </test-commands>
  4913. <cleanup-commands>
  4914. <command>-fs NAMENODE -rm -r NAMENODE/*</command>
  4915. </cleanup-commands>
  4916. <comparators>
  4917. <comparator>
  4918. <type>TokenComparator</type>
  4919. <expected-output>copyFromLocal: `/user/wrongdata': No such file or directory</expected-output>
  4920. </comparator>
  4921. </comparators>
  4922. </test>
  4923. <test> <!-- TESTED -->
  4924. <description>copyFromLocal: Test for Namenode's path - copying local file into an already existing destination</description>
  4925. <test-commands>
  4926. <command>-fs NAMENODE -mkdir NAMENODE/user/</command>
  4927. <command>-fs NAMENODE -touchz NAMENODE/user/file0</command>
  4928. <command>-fs NAMENODE -copyFromLocal CLITEST_DATA/data15bytes NAMENODE/user/file0</command>
  4929. </test-commands>
  4930. <cleanup-commands>
  4931. <command>-fs NAMENODE -rm -r NAMENODE/user</command>
  4932. </cleanup-commands>
  4933. <comparators>
  4934. <comparator>
  4935. <type>RegexpComparator</type>
  4936. <expected-output>copyFromLocal: `hdfs://\w+[-.a-z0-9]*:[0-9]+/user/file0': File exists</expected-output>
  4937. </comparator>
  4938. </comparators>
  4939. </test>
  4940. <test> <!-- TESTED -->
  4941. <description>copyFromLocal: Test for Namenode's path - copying many local files into an existing file</description>
  4942. <test-commands>
  4943. <command>-fs NAMENODE -touchz NAMENODE/file0</command>
  4944. <command>-fs NAMENODE -copyFromLocal CLITEST_DATA/data15bytes CLITEST_DATA/data30bytes NAMENODE/file0</command>
  4945. </test-commands>
  4946. <cleanup-commands>
  4947. <command>-fs NAMENODE -rm -r NAMENODE/*</command>
  4948. </cleanup-commands>
  4949. <comparators>
  4950. <comparator>
  4951. <type>RegexpComparator</type>
  4952. <expected-output>^copyFromLocal: `hdfs://\w+[-.a-z0-9]*:[0-9]+/file0': Is not a directory</expected-output>
  4953. </comparator>
  4954. </comparators>
  4955. </test>
  4956. <test> <!-- TESTED -->
  4957. <description>copyFromLocal: Test for Namenode's path - copying many local files into a non existent directory</description>
  4958. <test-commands>
  4959. <command>-fs NAMENODE -copyFromLocal CLITEST_DATA/data15bytes CLITEST_DATA/data30bytes NAMENODE/wrongdir</command>
  4960. </test-commands>
  4961. <cleanup-commands>
  4962. <command>-fs NAMENODE -rm -r NAMENODE/*</command>
  4963. </cleanup-commands>
  4964. <comparators>
  4965. <comparator>
  4966. <type>RegexpComparator</type>
  4967. <expected-output>^copyFromLocal: `hdfs://\w+[-.a-z0-9]*:[0-9]+/wrongdir': No such file or directory</expected-output>
  4968. </comparator>
  4969. </comparators>
  4970. </test>
  4971. <!-- Tests for get -->
  4972. <test> <!-- TESTED -->
  4973. <description>get: getting non existent(absolute path)</description>
  4974. <test-commands>
  4975. <command>-fs NAMENODE -get /user/file CLITEST_DATA/file</command>
  4976. </test-commands>
  4977. <cleanup-commands>
  4978. <command>-fs NAMENODE -rm -r /user</command>
  4979. </cleanup-commands>
  4980. <comparators>
  4981. <comparator>
  4982. <type>RegexpComparator</type>
  4983. <expected-output>get: `.*': No such file or directory</expected-output>
  4984. </comparator>
  4985. </comparators>
  4986. </test>
  4987. <test> <!-- TESTED -->
  4988. <description>get: getting non existent file(relative path)</description>
  4989. <test-commands>
  4990. <command>-fs NAMENODE -get file CLITEST_DATA/file</command>
  4991. </test-commands>
  4992. <cleanup-commands>
  4993. <command>-fs NAMENODE -rm -r /user</command>
  4994. </cleanup-commands>
  4995. <comparators>
  4996. <comparator>
  4997. <type>RegexpComparator</type>
  4998. <expected-output>get: `.*': No such file or directory</expected-output>
  4999. </comparator>
  5000. </comparators>
  5001. </test>
  5002. <test> <!-- TESTED -->
  5003. <description>get: Test for hdfs:// path - getting non existent</description>
  5004. <test-commands>
  5005. <command>-fs NAMENODE -get hdfs:///user/file CLITEST_DATA/file</command>
  5006. </test-commands>
  5007. <cleanup-commands>
  5008. <command>-fs NAMENODE -rm -r hdfs:///user</command>
  5009. </cleanup-commands>
  5010. <comparators>
  5011. <comparator>
  5012. <type>RegexpComparator</type>
  5013. <expected-output>get: `.*': No such file or directory</expected-output>
  5014. </comparator>
  5015. </comparators>
  5016. </test>
  5017. <test> <!-- TESTED -->
  5018. <description>get: Test for Namenode's path - getting non existent</description>
  5019. <test-commands>
  5020. <command>-fs NAMENODE -get NAMENODE/user/file CLITEST_DATA/file</command>
  5021. </test-commands>
  5022. <cleanup-commands>
  5023. <command>-fs NAMENODE -rm -r NAMENODE/user</command>
  5024. </cleanup-commands>
  5025. <comparators>
  5026. <comparator>
  5027. <type>RegexpComparator</type>
  5028. <expected-output>get: `.*': No such file or directory</expected-output>
  5029. </comparator>
  5030. </comparators>
  5031. </test>
  5032. <!-- Tests for getmerge -->
  5033. <!-- Manual Testing -->
  5034. <!-- Tests for cat -->
  5035. <test> <!-- TESTED -->
  5036. <description>cat: contents of file(absolute path)</description>
  5037. <test-commands>
  5038. <command>-fs NAMENODE -put CLITEST_DATA/data15bytes /data15bytes</command>
  5039. <command>-fs NAMENODE -cat /data15bytes</command>
  5040. </test-commands>
  5041. <cleanup-commands>
  5042. <command>-fs NAMENODE -rm /data15bytes</command>
  5043. </cleanup-commands>
  5044. <comparators>
  5045. <comparator>
  5046. <type>TokenComparator</type>
  5047. <expected-output>12345678901234</expected-output>
  5048. </comparator>
  5049. </comparators>
  5050. </test>
  5051. <test>
  5052. <description>cat: contents of file(relative path)</description>
  5053. <test-commands>
  5054. <command>-fs NAMENODE -mkdir -p dir</command> <!-- make sure user home dir exists -->
  5055. <command>-fs NAMENODE -touchz test</command>
  5056. <command>-fs NAMENODE -put CLITEST_DATA/data15bytes data15bytes</command>
  5057. <command>-fs NAMENODE -cat data15bytes</command>
  5058. </test-commands>
  5059. <cleanup-commands>
  5060. <command>-fs NAMENODE -rm -r /user</command>
  5061. </cleanup-commands>
  5062. <comparators>
  5063. <comparator>
  5064. <type>TokenComparator</type>
  5065. <expected-output>12345678901234</expected-output>
  5066. </comparator>
  5067. </comparators>
  5068. </test>
  5069. <test> <!-- TESTED -->
  5070. <description>cat: contents of files(absolute path) using globbing</description>
  5071. <test-commands>
  5072. <command>-fs NAMENODE -mkdir /dir0</command>
  5073. <command>-fs NAMENODE -put CLITEST_DATA/data15bytes /dir0/data15bytes</command>
  5074. <command>-fs NAMENODE -put CLITEST_DATA/data30bytes /dir0/data30bytes</command>
  5075. <command>-fs NAMENODE -put CLITEST_DATA/data60bytes /dir0/data60bytes</command>
  5076. <command>-fs NAMENODE -put CLITEST_DATA/data120bytes /dir0/data120bytes</command>
  5077. <command>-fs NAMENODE -cat /dir0/data*</command>
  5078. </test-commands>
  5079. <cleanup-commands>
  5080. <command>-fs NAMENODE -rm -r /dir0</command>
  5081. </cleanup-commands>
  5082. <comparators>
  5083. <comparator>
  5084. <type>RegexpComparator</type>
  5085. <expected-output>12345678901234.*</expected-output>
  5086. </comparator>
  5087. </comparators>
  5088. </test>
  5089. <test> <!-- TESTED-->
  5090. <description>cat: contents of files(relative path) using globbing</description>
  5091. <test-commands>
  5092. <command>-fs NAMENODE -mkdir -p dir0</command>
  5093. <command>-fs NAMENODE -put CLITEST_DATA/data15bytes dir0/data15bytes</command>
  5094. <command>-fs NAMENODE -put CLITEST_DATA/data30bytes dir0/data30bytes</command>
  5095. <command>-fs NAMENODE -put CLITEST_DATA/data60bytes dir0/data60bytes</command>
  5096. <command>-fs NAMENODE -put CLITEST_DATA/data120bytes dir0/data120bytes</command>
  5097. <command>-fs NAMENODE -cat dir0/data*</command>
  5098. </test-commands>
  5099. <cleanup-commands>
  5100. <command>-fs NAMENODE -rm -r /user</command>
  5101. </cleanup-commands>
  5102. <comparators>
  5103. <comparator>
  5104. <type>RegexpComparator</type>
  5105. <expected-output>12345678901234.*</expected-output>
  5106. </comparator>
  5107. </comparators>
  5108. </test>
  5109. <test> <!-- TESTED -->
  5110. <description>cat: contents of files(absolute path) without globbing</description>
  5111. <test-commands>
  5112. <command>-fs NAMENODE -mkdir /dir0</command>
  5113. <command>-fs NAMENODE -put CLITEST_DATA/data15bytes /dir0/data15bytes</command>
  5114. <command>-fs NAMENODE -put CLITEST_DATA/data30bytes /dir0/data30bytes</command>
  5115. <command>-fs NAMENODE -put CLITEST_DATA/data60bytes /dir0/data60bytes</command>
  5116. <command>-fs NAMENODE -put CLITEST_DATA/data120bytes /dir0/data120bytes</command>
  5117. <command>-fs NAMENODE -cat /dir0/data15bytes /dir0/data30bytes /dir0/data60bytes /dir0/data120bytes</command>
  5118. </test-commands>
  5119. <cleanup-commands>
  5120. <command>-fs NAMENODE -rm -r /dir0</command>
  5121. </cleanup-commands>
  5122. <comparators>
  5123. <comparator>
  5124. <type>RegexpComparator</type>
  5125. <expected-output>12345678901234.*</expected-output>
  5126. </comparator>
  5127. </comparators>
  5128. </test>
  5129. <test> <!-- TESTED-->
  5130. <description>cat: contents of files(relative path) without globbing</description>
  5131. <test-commands>
  5132. <command>-fs NAMENODE -mkdir -p dir0</command>
  5133. <command>-fs NAMENODE -put CLITEST_DATA/data15bytes dir0/data15bytes</command>
  5134. <command>-fs NAMENODE -put CLITEST_DATA/data30bytes dir0/data30bytes</command>
  5135. <command>-fs NAMENODE -put CLITEST_DATA/data60bytes dir0/data60bytes</command>
  5136. <command>-fs NAMENODE -put CLITEST_DATA/data120bytes dir0/data120bytes</command>
  5137. <command>-fs NAMENODE -cat dir0/data15bytes dir0/data30bytes dir0/data60bytes dir0/data120bytes</command>
  5138. </test-commands>
  5139. <cleanup-commands>
  5140. <command>-fs NAMENODE -rm -r /user</command>
  5141. </cleanup-commands>
  5142. <comparators>
  5143. <comparator>
  5144. <type>RegexpComparator</type>
  5145. <expected-output>12345678901234.*</expected-output>
  5146. </comparator>
  5147. </comparators>
  5148. </test>
  5149. <test> <!-- TESTED -->
  5150. <description>cat: contents of file(absolute path) that does not exist</description>
  5151. <test-commands>
  5152. <command>-fs NAMENODE -cat /file</command>
  5153. </test-commands>
  5154. <cleanup-commands>
  5155. </cleanup-commands>
  5156. <comparators>
  5157. <comparator>
  5158. <type>RegexpComparator</type>
  5159. <expected-output>^cat: `/file': No such file or directory</expected-output>
  5160. </comparator>
  5161. </comparators>
  5162. </test>
  5163. <test> <!-- TESTED -->
  5164. <description>cat: contents of file(relative path) that does not exist</description>
  5165. <test-commands>
  5166. <command>-fs NAMENODE -cat file</command>
  5167. </test-commands>
  5168. <cleanup-commands>
  5169. </cleanup-commands>
  5170. <comparators>
  5171. <comparator>
  5172. <type>RegexpComparator</type>
  5173. <expected-output>^cat: `file': No such file or directory</expected-output>
  5174. </comparator>
  5175. </comparators>
  5176. </test>
  5177. <test> <!-- TESTED -->
  5178. <description>cat: contents of directory(absolute path)</description>
  5179. <test-commands>
  5180. <command>-fs NAMENODE -mkdir /dir1</command>
  5181. <command>-fs NAMENODE -cat /dir1</command>
  5182. </test-commands>
  5183. <cleanup-commands>
  5184. <command>-fs NAMENODE -rm -r /dir1</command>
  5185. </cleanup-commands>
  5186. <comparators>
  5187. <comparator>
  5188. <type>RegexpComparator</type>
  5189. <expected-output>^cat: `/dir1': Is a directory</expected-output>
  5190. </comparator>
  5191. </comparators>
  5192. </test>
  5193. <test> <!-- TESTED -->
  5194. <description>cat: contents of directory(relative path)</description>
  5195. <test-commands>
  5196. <command>-fs NAMENODE -mkdir -p dir1</command>
  5197. <command>-fs NAMENODE -cat dir1</command>
  5198. </test-commands>
  5199. <cleanup-commands>
  5200. <command>-fs NAMENODE -rm -r dir1</command>
  5201. </cleanup-commands>
  5202. <comparators>
  5203. <comparator>
  5204. <type>RegexpComparator</type>
  5205. <expected-output>^cat: `dir1': Is a directory</expected-output>
  5206. </comparator>
  5207. </comparators>
  5208. </test>
  5209. <test> <!-- TESTED -->
  5210. <description>cat: Test for hdfs:// path - content of file</description>
  5211. <test-commands>
  5212. <command>-fs NAMENODE -put CLITEST_DATA/data15bytes hdfs:///data15bytes</command>
  5213. <command>-fs NAMENODE -cat hdfs:///data15bytes</command>
  5214. </test-commands>
  5215. <cleanup-commands>
  5216. <command>-fs NAMENODE -rm hdfs:///data15bytes</command>
  5217. </cleanup-commands>
  5218. <comparators>
  5219. <comparator>
  5220. <type>TokenComparator</type>
  5221. <expected-output>12345678901234</expected-output>
  5222. </comparator>
  5223. </comparators>
  5224. </test>
  5225. <test> <!-- TESTED -->
  5226. <description>cat: Test for hdfs:// path - contents of files using globbing</description>
  5227. <test-commands>
  5228. <command>-fs NAMENODE -mkdir hdfs:///dir0</command>
  5229. <command>-fs NAMENODE -put CLITEST_DATA/data15bytes hdfs:///dir0/data15bytes</command>
  5230. <command>-fs NAMENODE -put CLITEST_DATA/data30bytes hdfs:///dir0/data30bytes</command>
  5231. <command>-fs NAMENODE -put CLITEST_DATA/data60bytes hdfs:///dir0/data60bytes</command>
  5232. <command>-fs NAMENODE -put CLITEST_DATA/data120bytes hdfs:///dir0/data120bytes</command>
  5233. <command>-fs NAMENODE -cat hdfs:///dir0/data*</command>
  5234. </test-commands>
  5235. <cleanup-commands>
  5236. <command>-fs NAMENODE -rm -r hdfs:///dir0</command>
  5237. </cleanup-commands>
  5238. <comparators>
  5239. <comparator>
  5240. <type>RegexpComparator</type>
  5241. <expected-output>12345678901234.*</expected-output>
  5242. </comparator>
  5243. </comparators>
  5244. </test>
  5245. <test> <!-- TESTED -->
  5246. <description>cat: Test for hdfs:// path - contents of files without globbing</description>
  5247. <test-commands>
  5248. <command>-fs NAMENODE -mkdir hdfs:///dir0</command>
  5249. <command>-fs NAMENODE -put CLITEST_DATA/data15bytes hdfs:///dir0/data15bytes</command>
  5250. <command>-fs NAMENODE -put CLITEST_DATA/data30bytes hdfs:///dir0/data30bytes</command>
  5251. <command>-fs NAMENODE -put CLITEST_DATA/data60bytes hdfs:///dir0/data60bytes</command>
  5252. <command>-fs NAMENODE -put CLITEST_DATA/data120bytes hdfs:///dir0/data120bytes</command>
  5253. <command>-fs NAMENODE -cat hdfs:///dir0/data15bytes hdfs:///dir0/data30bytes hdfs:///dir0/data60bytes hdfs:///dir0/data120bytes</command>
  5254. </test-commands>
  5255. <cleanup-commands>
  5256. <command>-fs NAMENODE -rm -r hdfs:///dir0</command>
  5257. </cleanup-commands>
  5258. <comparators>
  5259. <comparator>
  5260. <type>RegexpComparator</type>
  5261. <expected-output>12345678901234.*</expected-output>
  5262. </comparator>
  5263. </comparators>
  5264. </test>
  5265. <test> <!-- TESTED -->
  5266. <description>cat: Test for hdfs:// path - contents of file that does not exist</description>
  5267. <test-commands>
  5268. <command>-fs NAMENODE -cat hdfs:///file</command>
  5269. </test-commands>
  5270. <cleanup-commands>
  5271. </cleanup-commands>
  5272. <comparators>
  5273. <comparator>
  5274. <type>RegexpComparator</type>
  5275. <expected-output>^cat: `hdfs:///file': No such file or directory</expected-output>
  5276. </comparator>
  5277. </comparators>
  5278. </test>
  5279. <test> <!-- TESTED -->
  5280. <description>cat: Test for hdfs:// path - contents of directory</description>
  5281. <test-commands>
  5282. <command>-fs NAMENODE -mkdir hdfs:///dir1</command>
  5283. <command>-fs NAMENODE -cat hdfs:///dir1</command>
  5284. </test-commands>
  5285. <cleanup-commands>
  5286. <command>-fs NAMENODE -rm -r hdfs:///dir1</command>
  5287. </cleanup-commands>
  5288. <comparators>
  5289. <comparator>
  5290. <type>RegexpComparator</type>
  5291. <expected-output>^cat: `hdfs:///dir1': Is a directory</expected-output>
  5292. </comparator>
  5293. </comparators>
  5294. </test>
  5295. <!-- Tests for cat using Namenode's path -->
  5296. <test> <!-- TESTED -->
  5297. <description>cat: Test for Namenode's path - content of file</description>
  5298. <test-commands>
  5299. <command>-fs NAMENODE -put CLITEST_DATA/data15bytes NAMENODE/data15bytes</command>
  5300. <command>-fs NAMENODE -cat NAMENODE/data15bytes</command>
  5301. </test-commands>
  5302. <cleanup-commands>
  5303. <command>-fs NAMENODE -rm NAMENODE/data15bytes</command>
  5304. </cleanup-commands>
  5305. <comparators>
  5306. <comparator>
  5307. <type>TokenComparator</type>
  5308. <expected-output>12345678901234</expected-output>
  5309. </comparator>
  5310. </comparators>
  5311. </test>
  5312. <test> <!-- TESTED -->
  5313. <description>cat: Test for Namenode's path - contents of files using globbing</description>
  5314. <test-commands>
  5315. <command>-fs NAMENODE -mkdir NAMENODE/dir0</command>
  5316. <command>-fs NAMENODE -put CLITEST_DATA/data15bytes NAMENODE/dir0/data15bytes</command>
  5317. <command>-fs NAMENODE -put CLITEST_DATA/data30bytes NAMENODE/dir0/data30bytes</command>
  5318. <command>-fs NAMENODE -put CLITEST_DATA/data60bytes NAMENODE/dir0/data60bytes</command>
  5319. <command>-fs NAMENODE -put CLITEST_DATA/data120bytes NAMENODE/dir0/data120bytes</command>
  5320. <command>-fs NAMENODE -cat NAMENODE/dir0/data*</command>
  5321. </test-commands>
  5322. <cleanup-commands>
  5323. <command>-fs NAMENODE -rm -r NAMENODE/dir0</command>
  5324. </cleanup-commands>
  5325. <comparators>
  5326. <comparator>
  5327. <type>RegexpComparator</type>
  5328. <expected-output>12345678901234.*</expected-output>
  5329. </comparator>
  5330. </comparators>
  5331. </test>
  5332. <test> <!-- TESTED -->
  5333. <description>cat: Test for Namenode's path - contents of files without globbing</description>
  5334. <test-commands>
  5335. <command>-fs NAMENODE -mkdir NAMENODE/dir0</command>
  5336. <command>-fs NAMENODE -put CLITEST_DATA/data15bytes NAMENODE/dir0/data15bytes</command>
  5337. <command>-fs NAMENODE -put CLITEST_DATA/data30bytes NAMENODE/dir0/data30bytes</command>
  5338. <command>-fs NAMENODE -put CLITEST_DATA/data60bytes NAMENODE/dir0/data60bytes</command>
  5339. <command>-fs NAMENODE -put CLITEST_DATA/data120bytes NAMENODE/dir0/data120bytes</command>
  5340. <command>-fs NAMENODE -cat NAMENODE/dir0/data15bytes NAMENODE/dir0/data30bytes NAMENODE/dir0/data60bytes NAMENODE/dir0/data120bytes</command>
  5341. </test-commands>
  5342. <cleanup-commands>
  5343. <command>-fs NAMENODE -rm -r NAMENODE/dir0</command>
  5344. </cleanup-commands>
  5345. <comparators>
  5346. <comparator>
  5347. <type>RegexpComparator</type>
  5348. <expected-output>12345678901234.*</expected-output>
  5349. </comparator>
  5350. </comparators>
  5351. </test>
  5352. <test> <!-- TESTED -->
  5353. <description>cat: Test for Namenode's path - contents of file that does not exist</description>
  5354. <test-commands>
  5355. <command>-fs NAMENODE -cat NAMENODE/file</command>
  5356. </test-commands>
  5357. <cleanup-commands>
  5358. </cleanup-commands>
  5359. <comparators>
  5360. <comparator>
  5361. <type>RegexpComparator</type>
  5362. <expected-output>^cat: `NAMENODE/file': No such file or directory</expected-output>
  5363. </comparator>
  5364. </comparators>
  5365. </test>
  5366. <test> <!-- TESTED -->
  5367. <description>cat: Test for Namenode's path - contents of directory</description>
  5368. <test-commands>
  5369. <command>-fs NAMENODE -mkdir NAMENODE/dir1</command>
  5370. <command>-fs NAMENODE -cat NAMENODE/dir1</command>
  5371. </test-commands>
  5372. <cleanup-commands>
  5373. <command>-fs NAMENODE -rm -r NAMENODE/dir1</command>
  5374. </cleanup-commands>
  5375. <comparators>
  5376. <comparator>
  5377. <type>RegexpComparator</type>
  5378. <expected-output>^cat: `NAMENODE/dir1': Is a directory</expected-output>
  5379. </comparator>
  5380. </comparators>
  5381. </test>
  5382. <!-- Tests for copyToLocal -->
  5383. <test> <!-- TESTED -->
  5384. <description>copyToLocal: non existent relative path</description>
  5385. <test-commands>
  5386. <command>-fs NAMENODE -copyToLocal file CLITEST_DATA/file</command>
  5387. </test-commands>
  5388. <cleanup-commands>
  5389. <command>-fs NAMENODE -rm -r /user</command>
  5390. </cleanup-commands>
  5391. <comparators>
  5392. <comparator>
  5393. <type>RegexpComparator</type>
  5394. <expected-output>copyToLocal: `.*': No such file or directory</expected-output>
  5395. </comparator>
  5396. </comparators>
  5397. </test>
  5398. <test> <!-- TESTED -->
  5399. <description>copyToLocal: non existent absolute path</description>
  5400. <test-commands>
  5401. <command>-fs NAMENODE -copyToLocal /user/file CLITEST_DATA/file</command>
  5402. </test-commands>
  5403. <cleanup-commands>
  5404. <command>-fs NAMENODE -rm -r /user</command>
  5405. </cleanup-commands>
  5406. <comparators>
  5407. <comparator>
  5408. <type>RegexpComparator</type>
  5409. <expected-output>copyToLocal: `.*': No such file or directory</expected-output>
  5410. </comparator>
  5411. </comparators>
  5412. </test>
  5413. <test> <!-- TESTED -->
  5414. <description>copyToLocal: Test for hdfs:// path - non existent file/directory</description>
  5415. <test-commands>
  5416. <command>-fs NAMENODE -copyToLocal hdfs:///file CLITEST_DATA/file</command>
  5417. </test-commands>
  5418. <cleanup-commands>
  5419. <command>-fs NAMENODE -rm -r hdfs:///*</command>
  5420. </cleanup-commands>
  5421. <comparators>
  5422. <comparator>
  5423. <type>RegexpComparator</type>
  5424. <expected-output>copyToLocal: `.*': No such file or directory</expected-output>
  5425. </comparator>
  5426. </comparators>
  5427. </test>
  5428. <test> <!-- TESTED -->
  5429. <description>copyToLocal: Test for Namenode's path - non existent file/directory</description>
  5430. <test-commands>
  5431. <command>-fs NAMENODE -copyToLocal NAMENODE/file CLITEST_DATA/file</command>
  5432. </test-commands>
  5433. <cleanup-commands>
  5434. <command>-fs NAMENODE -rm -r NAMENODE/*</command>
  5435. </cleanup-commands>
  5436. <comparators>
  5437. <comparator>
  5438. <type>RegexpComparator</type>
  5439. <expected-output>copyToLocal: `.*': No such file or directory</expected-output>
  5440. </comparator>
  5441. </comparators>
  5442. </test>
  5443. <test> <!-- TESTED-->
  5444. <description>checksum: checksum of files(relative path) using globbing</description>
  5445. <test-commands>
  5446. <command>-fs NAMENODE -mkdir -p dir0</command>
  5447. <command>-fs NAMENODE -put CLITEST_DATA/data15bytes dir0/data15bytes</command>
  5448. <command>-fs NAMENODE -put CLITEST_DATA/data30bytes dir0/data30bytes</command>
  5449. <command>-fs NAMENODE -put CLITEST_DATA/data60bytes dir0/data60bytes</command>
  5450. <command>-fs NAMENODE -put CLITEST_DATA/data120bytes dir0/data120bytes</command>
  5451. <command>-fs NAMENODE -checksum dir0/data*</command>
  5452. </test-commands>
  5453. <cleanup-commands>
  5454. <command>-fs NAMENODE -rm -r /user</command>
  5455. </cleanup-commands>
  5456. <comparators>
  5457. <comparator>
  5458. <type>RegexpComparator</type>
  5459. <expected-output>^dir0/data120bytes\tMD5-of-0MD5-of-512CRC32C\t000002000000000000000000a58cdc3c0967fc8cddb7fed5960d06f2</expected-output>
  5460. </comparator>
  5461. <comparator>
  5462. <type>RegexpComparator</type>
  5463. <expected-output>^dir0/data15bytes\tMD5-of-0MD5-of-512CRC32C\t0000020000000000000000007267e9528002723a30939aefc238d665</expected-output>
  5464. </comparator>
  5465. <comparator>
  5466. <type>RegexpComparator</type>
  5467. <expected-output>^dir0/data30bytes\tMD5-of-0MD5-of-512CRC32C\t000002000000000000000000fc09371298117c4943cf089b4bd79c96</expected-output>
  5468. </comparator>
  5469. <comparator>
  5470. <type>RegexpComparator</type>
  5471. <expected-output>^dir0/data60bytes\tMD5-of-0MD5-of-512CRC32C\t000002000000000000000000009476431d851dd7b0a8d057a404d7b9</expected-output>
  5472. </comparator>
  5473. </comparators>
  5474. </test>
  5475. <!-- Tests for moveToLocal -->
  5476. <!-- Not yet implemented -->
  5477. <!-- Tests for mkdir -->
  5478. <test> <!-- TESTED -->
  5479. <description>mkdir: creating directory (absolute path) </description>
  5480. <test-commands>
  5481. <command>-fs NAMENODE -mkdir /dir0</command>
  5482. <command>-fs NAMENODE -du -s /dir0</command>
  5483. </test-commands>
  5484. <cleanup-commands>
  5485. <command>-fs NAMENODE -rm /user</command>
  5486. </cleanup-commands>
  5487. <comparators>
  5488. <comparator>
  5489. <type>RegexpComparator</type>
  5490. <expected-output>^0\s+0\s+/dir0</expected-output>
  5491. </comparator>
  5492. </comparators>
  5493. </test>
  5494. <test> <!-- TESTED -->
  5495. <description>mkdir: creating directory (absolute path) </description>
  5496. <test-commands>
  5497. <command>-fs NAMENODE -mkdir /dir0</command>
  5498. <command>-fs NAMENODE -mkdir /dir0/b/</command>
  5499. <command>-fs NAMENODE -du -s /dir0/b</command>
  5500. </test-commands>
  5501. <cleanup-commands>
  5502. <command>-fs NAMENODE -rm /user</command>
  5503. </cleanup-commands>
  5504. <comparators>
  5505. <comparator>
  5506. <type>RegexpComparator</type>
  5507. <expected-output>^0\s+0\s+/dir0/b</expected-output>
  5508. </comparator>
  5509. </comparators>
  5510. </test>
  5511. <test> <!-- TESTED -->
  5512. <description>mkdir: creating directory (relative path) </description>
  5513. <test-commands>
  5514. <command>-fs NAMENODE -mkdir -p dir0 </command>
  5515. <command>-fs NAMENODE -du -s dir0</command>
  5516. </test-commands>
  5517. <cleanup-commands>
  5518. <command>-fs NAMENODE -rm /user</command>
  5519. </cleanup-commands>
  5520. <comparators>
  5521. <comparator>
  5522. <type>RegexpComparator</type>
  5523. <expected-output>^0\s+0\s+dir0</expected-output>
  5524. </comparator>
  5525. </comparators>
  5526. </test>
  5527. <test> <!-- TESTED -->
  5528. <description>mkdir: creating many directories (absolute path) </description>
  5529. <test-commands>
  5530. <command>-fs NAMENODE -mkdir /dir0 </command>
  5531. <command>-fs NAMENODE -mkdir /dir1 </command>
  5532. <command>-fs NAMENODE -mkdir /dir2 </command>
  5533. <command>-fs NAMENODE -mkdir /dir3 </command>
  5534. <command>-fs NAMENODE -du -s /dir*</command>
  5535. </test-commands>
  5536. <cleanup-commands>
  5537. <command>-fs NAMENODE -rm /dir*</command>
  5538. </cleanup-commands>
  5539. <comparators>
  5540. <comparator>
  5541. <type>RegexpComparator</type>
  5542. <expected-output>^0\s+0\s+/dir0</expected-output>
  5543. </comparator>
  5544. <comparator>
  5545. <type>RegexpComparator</type>
  5546. <expected-output>^0\s+0\s+/dir1</expected-output>
  5547. </comparator>
  5548. <comparator>
  5549. <type>RegexpComparator</type>
  5550. <expected-output>^0\s+0\s+/dir2</expected-output>
  5551. </comparator>
  5552. <comparator>
  5553. <type>RegexpComparator</type>
  5554. <expected-output>^0\s+0\s+/dir3</expected-output>
  5555. </comparator>
  5556. </comparators>
  5557. </test>
  5558. <test> <!-- TESTED -->
  5559. <description>mkdir: creating many directories (relative path) </description>
  5560. <test-commands>
  5561. <command>-fs NAMENODE -mkdir -p dir0 </command>
  5562. <command>-fs NAMENODE -mkdir -p dir1 </command>
  5563. <command>-fs NAMENODE -mkdir -p dir2 </command>
  5564. <command>-fs NAMENODE -mkdir -p dir3 </command>
  5565. <command>-fs NAMENODE -du -s dir*</command>
  5566. </test-commands>
  5567. <cleanup-commands>
  5568. <command>-fs NAMENODE -rm /user</command>
  5569. </cleanup-commands>
  5570. <comparators>
  5571. <comparator>
  5572. <type>RegexpComparator</type>
  5573. <expected-output>^0\s+0\s+dir0</expected-output>
  5574. </comparator>
  5575. <comparator>
  5576. <type>RegexpComparator</type>
  5577. <expected-output>^0\s+0\s+dir1</expected-output>
  5578. </comparator>
  5579. <comparator>
  5580. <type>RegexpComparator</type>
  5581. <expected-output>^0\s+0\s+dir2</expected-output>
  5582. </comparator>
  5583. <comparator>
  5584. <type>RegexpComparator</type>
  5585. <expected-output>^0\s+0\s+dir3</expected-output>
  5586. </comparator>
  5587. </comparators>
  5588. </test>
  5589. <test> <!-- TESTED -->
  5590. <description>mkdir: creating a directory with the name of an already existing directory</description>
  5591. <test-commands>
  5592. <command>-fs NAMENODE -mkdir /dir0</command>
  5593. <command>-fs NAMENODE -mkdir /dir0</command>
  5594. </test-commands>
  5595. <cleanup-commands>
  5596. <command>-fs NAMENODE -rm -r /dir0</command>
  5597. </cleanup-commands>
  5598. <comparators>
  5599. <comparator>
  5600. <type>TokenComparator</type>
  5601. <expected-output>mkdir: `/dir0': File exists</expected-output>
  5602. </comparator>
  5603. </comparators>
  5604. </test>
  5605. <test> <!-- TESTED -->
  5606. <description>mkdir: creating a directory with the name of an already existing file</description>
  5607. <test-commands>
  5608. <command>-fs NAMENODE -put CLITEST_DATA/data15bytes data15bytes</command>
  5609. <command>-fs NAMENODE -mkdir -p data15bytes</command>
  5610. </test-commands>
  5611. <cleanup-commands>
  5612. <command>-fs NAMENODE -rm -r data15bytes</command>
  5613. </cleanup-commands>
  5614. <comparators>
  5615. <comparator>
  5616. <type>TokenComparator</type>
  5617. <expected-output>mkdir: `data15bytes': Is not a directory</expected-output>
  5618. </comparator>
  5619. </comparators>
  5620. </test>
  5621. <test> <!-- TESTED -->
  5622. <description>mkdir: Test for hdfs:// path - creating directory</description>
  5623. <test-commands>
  5624. <command>-fs NAMENODE -mkdir hdfs:///dir0</command>
  5625. <command>-fs NAMENODE -du -s hdfs:///dir0</command>
  5626. </test-commands>
  5627. <cleanup-commands>
  5628. <command>-fs NAMENODE -rm hdfs:///*</command>
  5629. </cleanup-commands>
  5630. <comparators>
  5631. <comparator>
  5632. <type>RegexpComparator</type>
  5633. <expected-output>^0\s+0\s+hdfs:///dir0</expected-output>
  5634. </comparator>
  5635. </comparators>
  5636. </test>
  5637. <test> <!-- TESTED -->
  5638. <description>mkdir: Test for hdfs:// path - creating many directories</description>
  5639. <test-commands>
  5640. <command>-fs NAMENODE -mkdir hdfs:///dir0 hdfs:///dir1 hdfs:///dir2 hdfs:///dir3 </command>
  5641. <command>-fs NAMENODE -du -s hdfs:///dir*</command>
  5642. </test-commands>
  5643. <cleanup-commands>
  5644. <command>-fs NAMENODE -rm hdfs:///dir*</command>
  5645. </cleanup-commands>
  5646. <comparators>
  5647. <comparator>
  5648. <type>RegexpComparator</type>
  5649. <expected-output>^0\s+0\s+hdfs:///dir0</expected-output>
  5650. </comparator>
  5651. <comparator>
  5652. <type>RegexpComparator</type>
  5653. <expected-output>^0\s+0\s+hdfs:///dir1</expected-output>
  5654. </comparator>
  5655. <comparator>
  5656. <type>RegexpComparator</type>
  5657. <expected-output>^0\s+0\s+hdfs:///dir2</expected-output>
  5658. </comparator>
  5659. <comparator>
  5660. <type>RegexpComparator</type>
  5661. <expected-output>^0\s+0\s+hdfs:///dir3</expected-output>
  5662. </comparator>
  5663. </comparators>
  5664. </test>
  5665. <test> <!-- TESTED -->
  5666. <description>mkdir: Test for hdfs:// path - creating a directory with the name of an already existing directory</description>
  5667. <test-commands>
  5668. <command>-fs NAMENODE -mkdir hdfs:///dir0</command>
  5669. <command>-fs NAMENODE -mkdir hdfs:///dir0</command>
  5670. </test-commands>
  5671. <cleanup-commands>
  5672. <command>-fs NAMENODE -rm -r hdfs:///dir0</command>
  5673. </cleanup-commands>
  5674. <comparators>
  5675. <comparator>
  5676. <type>TokenComparator</type>
  5677. <expected-output>mkdir: `hdfs:///dir0': File exists</expected-output>
  5678. </comparator>
  5679. </comparators>
  5680. </test>
  5681. <test> <!-- TESTED -->
  5682. <description>mkdir: Test for hdfs:// path - creating a directory with the name of an already existing file</description>
  5683. <test-commands>
  5684. <command>-fs NAMENODE -put CLITEST_DATA/data15bytes hdfs:///data15bytes</command>
  5685. <command>-fs NAMENODE -mkdir hdfs:///data15bytes</command>
  5686. </test-commands>
  5687. <cleanup-commands>
  5688. <command>-fs NAMENODE -rm -r hdfs:///data15bytes</command>
  5689. </cleanup-commands>
  5690. <comparators>
  5691. <comparator>
  5692. <type>TokenComparator</type>
  5693. <expected-output>mkdir: `hdfs:///data15bytes': Is not a directory</expected-output>
  5694. </comparator>
  5695. </comparators>
  5696. </test>
  5697. <test> <!-- TESTED -->
  5698. <description>mkdir: Test for Namenode's path - creating directory</description>
  5699. <test-commands>
  5700. <command>-fs NAMENODE -mkdir NAMENODE/dir0</command>
  5701. <command>-fs NAMENODE -du -s NAMENODE/dir0</command>
  5702. </test-commands>
  5703. <cleanup-commands>
  5704. <command>-fs NAMENODE -rm NAMENODE/*</command>
  5705. </cleanup-commands>
  5706. <comparators>
  5707. <comparator>
  5708. <type>RegexpComparator</type>
  5709. <expected-output>^0\s+0\s+NAMENODE/dir0</expected-output>
  5710. </comparator>
  5711. </comparators>
  5712. </test>
  5713. <test> <!-- TESTED -->
  5714. <description>mkdir: Test for Namenode's path - creating many directories</description>
  5715. <test-commands>
  5716. <command>-fs NAMENODE -mkdir NAMENODE/dir0 NAMENODE/dir1 NAMENODE/dir2 NAMENODE/dir3</command>
  5717. <command>-fs NAMENODE -du -s NAMENODE/dir*</command>
  5718. </test-commands>
  5719. <cleanup-commands>
  5720. <command>-fs NAMENODE -rm NAMENODE/dir*</command>
  5721. </cleanup-commands>
  5722. <comparators>
  5723. <comparator>
  5724. <type>RegexpComparator</type>
  5725. <expected-output>^0\s+0\s+NAMENODE/dir0</expected-output>
  5726. </comparator>
  5727. <comparator>
  5728. <type>RegexpComparator</type>
  5729. <expected-output>^0\s+0\s+NAMENODE/dir1</expected-output>
  5730. </comparator>
  5731. <comparator>
  5732. <type>RegexpComparator</type>
  5733. <expected-output>^0\s+0\s+NAMENODE/dir2</expected-output>
  5734. </comparator>
  5735. <comparator>
  5736. <type>RegexpComparator</type>
  5737. <expected-output>^0\s+0\s+NAMENODE/dir3</expected-output>
  5738. </comparator>
  5739. </comparators>
  5740. </test>
  5741. <test> <!-- TESTED -->
  5742. <description>mkdir: Test for NAMENODE path - creating a directory with the name of an already existing directory</description>
  5743. <test-commands>
  5744. <command>-fs NAMENODE -mkdir NAMENODE/dir0</command>
  5745. <command>-fs NAMENODE -mkdir NAMENODE/dir0</command>
  5746. </test-commands>
  5747. <cleanup-commands>
  5748. <command>-fs NAMENODE -rm -r NAMENODE/dir0</command>
  5749. </cleanup-commands>
  5750. <comparators>
  5751. <comparator>
  5752. <type>RegexpComparator</type>
  5753. <expected-output>mkdir: `hdfs://\w+[-.a-z0-9]*:[0-9]+/dir0': File exists</expected-output>
  5754. </comparator>
  5755. </comparators>
  5756. </test>
  5757. <test> <!-- TESTED -->
  5758. <description>mkdir: Test for Namenode's path - creating a directory with the name of an already existing file</description>
  5759. <test-commands>
  5760. <command>-fs NAMENODE -put CLITEST_DATA/data15bytes NAMENODE/data15bytes</command>
  5761. <command>-fs NAMENODE -mkdir NAMENODE/data15bytes</command>
  5762. </test-commands>
  5763. <cleanup-commands>
  5764. <command>-fs NAMENODE -rm -r NAMENODE/data15bytes</command>
  5765. </cleanup-commands>
  5766. <comparators>
  5767. <comparator>
  5768. <type>RegexpComparator</type>
  5769. <expected-output>mkdir: `hdfs://\w+[-.a-z0-9]*:[0-9]+/data15bytes': Is not a directory</expected-output>
  5770. </comparator>
  5771. </comparators>
  5772. </test>
  5773. <test> <!-- TESTED -->
  5774. <description>mkdir: Test create of directory with no parent and no -p fails</description>
  5775. <test-commands>
  5776. <command>-fs NAMENODE -rm -r -f dir0</command>
  5777. <command>-fs NAMENODE -mkdir dir0/dir1</command>
  5778. </test-commands>
  5779. <cleanup-commands>
  5780. <command>-fs NAMENODE -rm -r dir0</command>
  5781. </cleanup-commands>
  5782. <comparators>
  5783. <comparator>
  5784. <type>RegexpComparator</type>
  5785. <expected-output>mkdir: `dir0/dir1': No such file or directory</expected-output>
  5786. </comparator>
  5787. </comparators>
  5788. </test>
  5789. <test> <!-- TESTED -->
  5790. <description>mkdir: Test recreate of existing directory fails</description>
  5791. <test-commands>
  5792. <command>-fs NAMENODE -rm -r -f dir0</command>
  5793. <command>-fs NAMENODE -mkdir -p dir0/dir1</command>
  5794. <command>-fs NAMENODE -mkdir dir0/dir1</command>
  5795. </test-commands>
  5796. <cleanup-commands>
  5797. <command>-fs NAMENODE -rm -r dir0</command>
  5798. </cleanup-commands>
  5799. <comparators>
  5800. <comparator>
  5801. <type>RegexpComparator</type>
  5802. <expected-output>mkdir: `dir0/dir1': File exists</expected-output>
  5803. </comparator>
  5804. </comparators>
  5805. </test>
  5806. <test> <!-- TESTED -->
  5807. <description>mkdir: Test recreate of existing directory with -p succeeds</description>
  5808. <test-commands>
  5809. <command>-fs NAMENODE -rm -r -f dir0</command>
  5810. <command>-fs NAMENODE -mkdir -p dir0/dir1</command>
  5811. <command>-fs NAMENODE -mkdir -p dir0/dir1</command>
  5812. </test-commands>
  5813. <cleanup-commands>
  5814. <command>-fs NAMENODE -rm -r dir0</command>
  5815. </cleanup-commands>
  5816. <comparators>
  5817. <comparator>
  5818. <type>ExactComparator</type>
  5819. <expected-output></expected-output>
  5820. </comparator>
  5821. </comparators>
  5822. </test>
  5823. <!--Tests for setrep-->
  5824. <test> <!-- TESTED -->
  5825. <description>setrep: existent file (absolute path)</description>
  5826. <test-commands>
  5827. <command>-fs NAMENODE -mkdir /dir0</command>
  5828. <command>-fs NAMENODE -touchz /dir0/file0</command>
  5829. <command>-fs NAMENODE -setrep 2 /dir0/file0</command>
  5830. </test-commands>
  5831. <cleanup-commands>
  5832. <command>-fs NAMENODE -rm -r /user</command>
  5833. </cleanup-commands>
  5834. <comparators>
  5835. <comparator>
  5836. <type>RegexpComparator</type>
  5837. <expected-output>^Replication 2 set: /dir0/file0</expected-output>
  5838. </comparator>
  5839. </comparators>
  5840. </test>
  5841. <test> <!-- TESTED -->
  5842. <description>setrep: existent file (relative path)</description>
  5843. <test-commands>
  5844. <command>-fs NAMENODE -mkdir -p dir</command> <!-- make sure user home dir exists -->
  5845. <command>-fs NAMENODE -touchz file0</command>
  5846. <command>-fs NAMENODE -setrep 2 file0</command>
  5847. </test-commands>
  5848. <cleanup-commands>
  5849. <command>-fs NAMENODE -rm -r /user</command>
  5850. </cleanup-commands>
  5851. <comparators>
  5852. <comparator>
  5853. <type>RegexpComparator</type>
  5854. <expected-output>^Replication 2 set: file0</expected-output>
  5855. </comparator>
  5856. </comparators>
  5857. </test>
  5858. <test> <!-- TESTED -->
  5859. <description>setrep: existent directory (absolute path)</description>
  5860. <test-commands>
  5861. <command>-fs NAMENODE -mkdir /dir0</command>
  5862. <command>-fs NAMENODE -touchz /dir0/file0</command>
  5863. <command>-fs NAMENODE -touchz /dir0/file1</command>
  5864. <command>-fs NAMENODE -setrep 2 /dir0</command>
  5865. </test-commands>
  5866. <cleanup-commands>
  5867. <command>-fs NAMENODE -rm -r /user</command>
  5868. </cleanup-commands>
  5869. <comparators>
  5870. <comparator>
  5871. <type>RegexpComparator</type>
  5872. <expected-output>^Replication 2 set: /dir0/file0</expected-output>
  5873. </comparator>
  5874. <comparator>
  5875. <type>RegexpComparator</type>
  5876. <expected-output>^Replication 2 set: /dir0/file1</expected-output>
  5877. </comparator>
  5878. </comparators>
  5879. </test>
  5880. <test> <!-- TESTED -->
  5881. <description>setrep: existent directory (relative path)</description>
  5882. <test-commands>
  5883. <command>-fs NAMENODE -mkdir -p dir0</command>
  5884. <command>-fs NAMENODE -touchz dir0/file0</command>
  5885. <command>-fs NAMENODE -touchz dir0/file1</command>
  5886. <command>-fs NAMENODE -setrep 2 dir0</command>
  5887. </test-commands>
  5888. <cleanup-commands>
  5889. <command>-fs NAMENODE -rm -r /user</command>
  5890. </cleanup-commands>
  5891. <comparators>
  5892. <comparator>
  5893. <type>RegexpComparator</type>
  5894. <expected-output>^Replication 2 set: dir0/file0</expected-output>
  5895. </comparator>
  5896. <comparator>
  5897. <type>RegexpComparator</type>
  5898. <expected-output>^Replication 2 set: dir0/file1</expected-output>
  5899. </comparator>
  5900. </comparators>
  5901. </test>
  5902. <test> <!-- TESTED -->
  5903. <description>setrep: -R ignored for existing file</description>
  5904. <test-commands>
  5905. <command>-fs NAMENODE -mkdir -p dir0</command>
  5906. <command>-fs NAMENODE -touchz dir0/file0</command>
  5907. <command>-fs NAMENODE -setrep -R 2 dir0/file0</command>
  5908. </test-commands>
  5909. <cleanup-commands>
  5910. <command>-fs NAMENODE -rm -r /user</command>
  5911. </cleanup-commands>
  5912. <comparators>
  5913. <comparator>
  5914. <type>RegexpComparator</type>
  5915. <expected-output>^Replication 2 set: dir0/file0</expected-output>
  5916. </comparator>
  5917. </comparators>
  5918. </test>
  5919. <test> <!-- TESTED -->
  5920. <description>setrep: non existent file (absolute path)</description>
  5921. <test-commands>
  5922. <command>-fs NAMENODE -setrep 2 /dir0/file</command>
  5923. </test-commands>
  5924. <cleanup-commands>
  5925. <command>-fs NAMENODE -rm -r /user</command>
  5926. </cleanup-commands>
  5927. <comparators>
  5928. <comparator>
  5929. <type>RegexpComparator</type>
  5930. <expected-output>^setrep: `/dir0/file': No such file or directory</expected-output>
  5931. </comparator>
  5932. </comparators>
  5933. </test>
  5934. <test> <!-- TESTED -->
  5935. <description>setrep: non existent file (relative path)</description>
  5936. <test-commands>
  5937. <command>-fs NAMENODE -setrep 2 file0</command>
  5938. </test-commands>
  5939. <cleanup-commands>
  5940. <command>-fs NAMENODE -rm -r /user</command>
  5941. </cleanup-commands>
  5942. <comparators>
  5943. <comparator>
  5944. <type>RegexpComparator</type>
  5945. <expected-output>^setrep: `file0': No such file or directory</expected-output>
  5946. </comparator>
  5947. </comparators>
  5948. </test>
  5949. <test> <!-- TESTED -->
  5950. <description>setrep: Test for hdfs:// path - existent file</description>
  5951. <test-commands>
  5952. <command>-fs NAMENODE -mkdir hdfs:///dir0/</command>
  5953. <command>-fs NAMENODE -touchz hdfs:///dir0/file0</command>
  5954. <command>-fs NAMENODE -setrep 2 hdfs:///dir0/file0</command>
  5955. </test-commands>
  5956. <cleanup-commands>
  5957. <command>-fs NAMENODE -rm -r hdfs:///*</command>
  5958. </cleanup-commands>
  5959. <comparators>
  5960. <comparator>
  5961. <type>RegexpComparator</type>
  5962. <expected-output>^Replication 2 set: hdfs:///dir0/file0</expected-output>
  5963. </comparator>
  5964. </comparators>
  5965. </test>
  5966. <test> <!-- TESTED -->
  5967. <description>setrep: Test for hdfs:// path - existent directory</description>
  5968. <test-commands>
  5969. <command>-fs NAMENODE -mkdir hdfs:///dir0/</command>
  5970. <command>-fs NAMENODE -touchz hdfs:///dir0/file0</command>
  5971. <command>-fs NAMENODE -touchz hdfs:///dir0/file1</command>
  5972. <command>-fs NAMENODE -setrep 2 hdfs:///dir0</command>
  5973. </test-commands>
  5974. <cleanup-commands>
  5975. <command>-fs NAMENODE -rm -r hdfs:///*</command>
  5976. </cleanup-commands>
  5977. <comparators>
  5978. <comparator>
  5979. <type>RegexpComparator</type>
  5980. <expected-output>^Replication 2 set: hdfs:///dir0/file0</expected-output>
  5981. </comparator>
  5982. <comparator>
  5983. <type>RegexpComparator</type>
  5984. <expected-output>^Replication 2 set: hdfs:///dir0/file1</expected-output>
  5985. </comparator>
  5986. </comparators>
  5987. </test>
  5988. <test> <!-- TESTED -->
  5989. <description>setrep: Test for hdfs:// path - non existent file</description>
  5990. <test-commands>
  5991. <command>-fs NAMENODE -mkdir hdfs:///dir0/</command>
  5992. <command>-fs NAMENODE -setrep 2 hdfs:///dir0/file</command>
  5993. </test-commands>
  5994. <cleanup-commands>
  5995. <command>-fs NAMENODE -rm -r hdfs:///*</command>
  5996. </cleanup-commands>
  5997. <comparators>
  5998. <comparator>
  5999. <type>RegexpComparator</type>
  6000. <expected-output>^setrep: `hdfs:///dir0/file': No such file or directory</expected-output>
  6001. </comparator>
  6002. </comparators>
  6003. </test>
  6004. <test> <!-- TESTED -->
  6005. <description>setrep: Test for Namenode's path - existent file</description>
  6006. <test-commands>
  6007. <command>-fs NAMENODE -mkdir NAMENODE/dir0/</command>
  6008. <command>-fs NAMENODE -touchz NAMENODE/dir0/file0</command>
  6009. <command>-fs NAMENODE -setrep 2 NAMENODE/dir0/file0</command>
  6010. </test-commands>
  6011. <cleanup-commands>
  6012. <command>-fs NAMENODE -rm -r NAMENODE/*</command>
  6013. </cleanup-commands>
  6014. <comparators>
  6015. <comparator>
  6016. <type>RegexpComparator</type>
  6017. <expected-output>^Replication 2 set: NAMENODE/dir0/file0</expected-output>
  6018. </comparator>
  6019. </comparators>
  6020. </test>
  6021. <test> <!-- TESTED -->
  6022. <description>setrep: Test for Namenode's path - existent directory</description>
  6023. <test-commands>
  6024. <command>-fs NAMENODE -mkdir -p NAMENODE/dir0</command>
  6025. <command>-fs NAMENODE -touchz NAMENODE/dir0/file0</command>
  6026. <command>-fs NAMENODE -touchz NAMENODE/dir0/file1</command>
  6027. <command>-fs NAMENODE -setrep 2 NAMENODE/dir0</command>
  6028. </test-commands>
  6029. <cleanup-commands>
  6030. <command>-fs NAMENODE -rm -r NAMENODE/*</command>
  6031. </cleanup-commands>
  6032. <comparators>
  6033. <comparator>
  6034. <type>RegexpComparator</type>
  6035. <expected-output>^Replication 2 set: NAMENODE/dir0/file0</expected-output>
  6036. </comparator>
  6037. <comparator>
  6038. <type>RegexpComparator</type>
  6039. <expected-output>^Replication 2 set: NAMENODE/dir0/file1</expected-output>
  6040. </comparator>
  6041. </comparators>
  6042. </test>
  6043. <test> <!-- TESTED -->
  6044. <description>setrep: Test for Namenode's path - non existent file</description>
  6045. <test-commands>
  6046. <command>-fs NAMENODE -setrep 2 NAMENODE/dir0/file</command>
  6047. </test-commands>
  6048. <cleanup-commands>
  6049. <command>-fs NAMENODE -rm -r NAMENODE/*</command>
  6050. </cleanup-commands>
  6051. <comparators>
  6052. <comparator>
  6053. <type>RegexpComparator</type>
  6054. <expected-output>^setrep: `hdfs://\w+[-.a-z0-9]*:[0-9]+/dir0/file': No such file or directory</expected-output>
  6055. </comparator>
  6056. </comparators>
  6057. </test>
  6058. <!-- Tests for touchz-->
  6059. <test> <!-- TESTED -->
  6060. <description>touchz: touching file (absolute path) </description>
  6061. <test-commands>
  6062. <command>-fs NAMENODE -mkdir /user</command>
  6063. <command>-fs NAMENODE -touchz /user/file0</command>
  6064. <command>-fs NAMENODE -du /user/file0</command>
  6065. </test-commands>
  6066. <cleanup-commands>
  6067. <command>-fs NAMENODE -rm /user</command>
  6068. </cleanup-commands>
  6069. <comparators>
  6070. <comparator>
  6071. <type>RegexpComparator</type>
  6072. <expected-output>^0\s+0\s+/user/file0</expected-output>
  6073. </comparator>
  6074. </comparators>
  6075. </test>
  6076. <test> <!-- TESTED -->
  6077. <description>touchz: touching file in non-existent directory </description>
  6078. <test-commands>
  6079. <command>-fs NAMENODE -touchz file0 </command>
  6080. </test-commands>
  6081. <cleanup-commands>
  6082. </cleanup-commands>
  6083. <comparators>
  6084. <comparator>
  6085. <type>RegexpComparator</type>
  6086. <expected-output>touchz: `file0': No such file or directory</expected-output>
  6087. </comparator>
  6088. </comparators>
  6089. </test>
  6090. <test> <!-- TESTED -->
  6091. <description>touchz: touching file(relative path) </description>
  6092. <test-commands>
  6093. <command>-fs NAMENODE -mkdir -p dir</command> <!-- make sure user home dir exists -->
  6094. <command>-fs NAMENODE -touchz file0 </command>
  6095. <command>-fs NAMENODE -du file0</command>
  6096. </test-commands>
  6097. <cleanup-commands>
  6098. <command>-fs NAMENODE -rm /user</command>
  6099. </cleanup-commands>
  6100. <comparators>
  6101. <comparator>
  6102. <type>RegexpComparator</type>
  6103. <expected-output>^0\s+0\s+file0</expected-output>
  6104. </comparator>
  6105. </comparators>
  6106. </test>
  6107. <test> <!-- TESTED -->
  6108. <description>touchz: touching many files </description>
  6109. <test-commands>
  6110. <command>-fs NAMENODE -mkdir -p dir</command> <!-- make sure user home dir exists -->
  6111. <command>-fs NAMENODE -touchz file0 file1 file2</command>
  6112. <command>-fs NAMENODE -du file*</command>
  6113. </test-commands>
  6114. <cleanup-commands>
  6115. <command>-fs NAMENODE -rm /user</command>
  6116. </cleanup-commands>
  6117. <comparators>
  6118. <comparator>
  6119. <type>RegexpComparator</type>
  6120. <expected-output>^0( |\t)*0( |\t)*file0</expected-output>
  6121. <expected-output>^0( |\t)*0( |\t)*file1</expected-output>
  6122. <expected-output>^0( |\t)*0( |\t)*file2</expected-output>
  6123. </comparator>
  6124. </comparators>
  6125. </test>
  6126. <test> <!-- TESTED -->
  6127. <description>touchz: touching already existing file </description>
  6128. <test-commands>
  6129. <command>-fs NAMENODE -mkdir -p dir</command> <!-- make sure user home dir exists -->
  6130. <command>-fs NAMENODE -put CLITEST_DATA/data15bytes data15bytes</command>
  6131. <command>-fs NAMENODE -touchz data15bytes</command>
  6132. </test-commands>
  6133. <cleanup-commands>
  6134. <command>-fs NAMENODE -rm data15bytes</command>
  6135. </cleanup-commands>
  6136. <comparators>
  6137. <comparator>
  6138. <type>TokenComparator</type>
  6139. <expected-output>touchz: `data15bytes': Not a zero-length file</expected-output>
  6140. </comparator>
  6141. </comparators>
  6142. </test>
  6143. <test> <!-- TESTED -->
  6144. <description>touchz: Test for hdfs:// path - touching file</description>
  6145. <test-commands>
  6146. <command>-fs NAMENODE -mkdir -p hdfs:///user/</command>
  6147. <command>-fs NAMENODE -touchz hdfs:///user/file0</command>
  6148. <command>-fs NAMENODE -du hdfs:///user/file0</command>
  6149. </test-commands>
  6150. <cleanup-commands>
  6151. <command>-fs NAMENODE -rm hdfs:///user</command>
  6152. </cleanup-commands>
  6153. <comparators>
  6154. <comparator>
  6155. <type>RegexpComparator</type>
  6156. <expected-output>^0\s+0\s+hdfs:///user/file0</expected-output>
  6157. </comparator>
  6158. </comparators>
  6159. </test>
  6160. <test> <!-- TESTED -->
  6161. <description>touchz: Test for hdfs:// path - touching many files </description>
  6162. <test-commands>
  6163. <command>-fs NAMENODE -touchz hdfs:///file0 hdfs:///file1 hdfs:///file2</command>
  6164. <command>-fs NAMENODE -du hdfs:///file*</command>
  6165. </test-commands>
  6166. <cleanup-commands>
  6167. <command>-fs NAMENODE -rm hdfs:///user</command>
  6168. </cleanup-commands>
  6169. <comparators>
  6170. <comparator>
  6171. <type>RegexpComparator</type>
  6172. <expected-output>^0( |\t)*0( |\t)*hdfs:///file0</expected-output>
  6173. <expected-output>^0( |\t)*0( |\t)*hdfs:///file1</expected-output>
  6174. <expected-output>^0( |\t)*0( |\t)*hdfs:///file2</expected-output>
  6175. </comparator>
  6176. </comparators>
  6177. </test>
  6178. <test> <!-- TESTED -->
  6179. <description>touchz: Test for hdfs:// path - touching already existing file </description>
  6180. <test-commands>
  6181. <command>-fs NAMENODE -put CLITEST_DATA/data15bytes hdfs:///data15bytes</command>
  6182. <command>-fs NAMENODE -touchz hdfs:///data15bytes</command>
  6183. </test-commands>
  6184. <cleanup-commands>
  6185. <command>-fs NAMENODE -rm hdfs:///data15bytes</command>
  6186. </cleanup-commands>
  6187. <comparators>
  6188. <comparator>
  6189. <type>TokenComparator</type>
  6190. <expected-output>touchz: `hdfs:///data15bytes': Not a zero-length file</expected-output>
  6191. </comparator>
  6192. </comparators>
  6193. </test>
  6194. <test> <!-- TESTED -->
  6195. <description>touchz: Test for Namenode's path - touching file</description>
  6196. <test-commands>
  6197. <command>-fs NAMENODE -touchz NAMENODE/user/file0</command>
  6198. <command>-fs NAMENODE -du NAMENODE/user/file0</command>
  6199. </test-commands>
  6200. <cleanup-commands>
  6201. <command>-fs NAMENODE -rm NAMENODE/user</command>
  6202. </cleanup-commands>
  6203. <comparators>
  6204. <comparator>
  6205. <type>RegexpComparator</type>
  6206. <expected-output>^0\s+0\s+NAMENODE/user/file0</expected-output>
  6207. </comparator>
  6208. </comparators>
  6209. </test>
  6210. <test> <!-- TESTED -->
  6211. <description>touchz: Test for Namenode path - touching many files </description>
  6212. <test-commands>
  6213. <command>-fs NAMENODE -touchz NAMENODE/file0 NAMENODE/file1 NAMENODE/file2</command>
  6214. <command>-fs NAMENODE -du NAMENODE/file*</command>
  6215. </test-commands>
  6216. <cleanup-commands>
  6217. <command>-fs NAMENODE -rm NAMENODE/user</command>
  6218. </cleanup-commands>
  6219. <comparators>
  6220. <comparator>
  6221. <type>RegexpComparator</type>
  6222. <expected-output>^0\s+0\s+hdfs://\w+[-.a-z0-9]*:[0-9]+/file0</expected-output>
  6223. <expected-output>^0\s+0\s+hdfs://\w+[-.a-z0-9]*:[0-9]+/file1</expected-output>
  6224. <expected-output>^0\s+0\s+hdfs://\w+[-.a-z0-9]*:[0-9]+/file2</expected-output>
  6225. </comparator>
  6226. </comparators>
  6227. </test>
  6228. <test> <!-- TESTED -->
  6229. <description>touchz: Test for Namenode's path - touching already existing file </description>
  6230. <test-commands>
  6231. <command>-fs NAMENODE -put CLITEST_DATA/data15bytes NAMENODE/data15bytes</command>
  6232. <command>-fs NAMENODE -touchz NAMENODE/data15bytes</command>
  6233. </test-commands>
  6234. <cleanup-commands>
  6235. <command>-fs NAMENODE -rm NAMENODE/data15bytes</command>
  6236. </cleanup-commands>
  6237. <comparators>
  6238. <comparator>
  6239. <type>RegexpComparator</type>
  6240. <expected-output>touchz: `hdfs://\w+[-.a-z0-9]*:[0-9]+/data15bytes': Not a zero-length file</expected-output>
  6241. </comparator>
  6242. </comparators>
  6243. </test>
  6244. <!--Tests for test-->
  6245. <test> <!-- TESTED -->
  6246. <description>test: non existent file (absolute path)</description>
  6247. <test-commands>
  6248. <command>-fs NAMENODE -test -z /dir0/file</command>
  6249. </test-commands>
  6250. <cleanup-commands>
  6251. <command>-fs NAMENODE -rm -r /user</command>
  6252. </cleanup-commands>
  6253. <comparators>
  6254. <comparator>
  6255. <type>ExactComparator</type>
  6256. <expected-output></expected-output>
  6257. </comparator>
  6258. </comparators>
  6259. </test>
  6260. <test> <!-- TESTED -->
  6261. <description>test: non existent file (relative path)</description>
  6262. <test-commands>
  6263. <command>-fs NAMENODE -test -z file</command>
  6264. </test-commands>
  6265. <cleanup-commands>
  6266. <command>-fs NAMENODE -rm -r /user</command>
  6267. </cleanup-commands>
  6268. <comparators>
  6269. <comparator>
  6270. <type>ExactComparator</type>
  6271. <expected-output></expected-output>
  6272. </comparator>
  6273. </comparators>
  6274. </test>
  6275. <test> <!-- TESTED -->
  6276. <description>test: non existent directory (absolute path)</description>
  6277. <test-commands>
  6278. <command>-fs NAMENODE -test -d /dir</command>
  6279. </test-commands>
  6280. <cleanup-commands>
  6281. <command>-fs NAMENODE -rm -r /user</command>
  6282. </cleanup-commands>
  6283. <comparators>
  6284. <comparator>
  6285. <type>ExactComparator</type>
  6286. <expected-output></expected-output>
  6287. </comparator>
  6288. </comparators>
  6289. </test>
  6290. <test> <!-- TESTED -->
  6291. <description>test: non existent directory (relative path)</description>
  6292. <test-commands>
  6293. <command>-fs NAMENODE -test -d dir0</command>
  6294. </test-commands>
  6295. <cleanup-commands>
  6296. <command>-fs NAMENODE -rm -r /user</command>
  6297. </cleanup-commands>
  6298. <comparators>
  6299. <comparator>
  6300. <type>ExactComparator</type>
  6301. <expected-output></expected-output>
  6302. </comparator>
  6303. </comparators>
  6304. </test>
  6305. <test> <!-- TESTED -->
  6306. <description>test: Test for hdfs:// path - non existent file</description>
  6307. <test-commands>
  6308. <command>-fs NAMENODE -test -z hdfs:///dir0/file</command>
  6309. </test-commands>
  6310. <cleanup-commands>
  6311. <command>-fs NAMENODE -rm -r hdfs:///dir0</command>
  6312. </cleanup-commands>
  6313. <comparators>
  6314. <comparator>
  6315. <type>ExactComparator</type>
  6316. <expected-output></expected-output>
  6317. </comparator>
  6318. </comparators>
  6319. </test>
  6320. <test> <!-- TESTED -->
  6321. <description>test: Test for hdfs:// path - non existent directory</description>
  6322. <test-commands>
  6323. <command>-fs NAMENODE -test -d hdfs:///dir</command>
  6324. </test-commands>
  6325. <cleanup-commands>
  6326. <command>-fs NAMENODE -rm -r hdfs:///dir</command>
  6327. </cleanup-commands>
  6328. <comparators>
  6329. <comparator>
  6330. <type>ExactComparator</type>
  6331. <expected-output></expected-output>
  6332. </comparator>
  6333. </comparators>
  6334. </test>
  6335. <test> <!-- TESTED -->
  6336. <description>test: Test for Namenode's path - non existent file</description>
  6337. <test-commands>
  6338. <command>-fs NAMENODE -test -z NAMENODE/dir0/file</command>
  6339. </test-commands>
  6340. <cleanup-commands>
  6341. <command>-fs NAMENODE -rm -r NAMENODE/dir0</command>
  6342. </cleanup-commands>
  6343. <comparators>
  6344. <comparator>
  6345. <type>ExactComparator</type>
  6346. <expected-output></expected-output>
  6347. </comparator>
  6348. </comparators>
  6349. </test>
  6350. <test> <!-- TESTED -->
  6351. <description>test: Test for Namenode's path - non existent directory</description>
  6352. <test-commands>
  6353. <command>-fs NAMENODE -test -d NAMENODE/dir</command>
  6354. </test-commands>
  6355. <cleanup-commands>
  6356. <command>-fs NAMENODE -rm -r NAMENODE/dir</command>
  6357. </cleanup-commands>
  6358. <comparators>
  6359. <comparator>
  6360. <type>ExactComparator</type>
  6361. <expected-output></expected-output>
  6362. </comparator>
  6363. </comparators>
  6364. </test>
  6365. <!--Tests for stat -->
  6366. <test> <!-- TESTED -->
  6367. <description>stat: statistics about file(absolute path)</description>
  6368. <test-commands>
  6369. <command>-fs NAMENODE -put CLITEST_DATA/data60bytes /data60bytes</command>
  6370. <command>-fs NAMENODE -stat "%n-%b" /data60bytes</command>
  6371. </test-commands>
  6372. <cleanup-commands>
  6373. <command>-fs NAMENODE -rm -r /data60bytes</command>
  6374. </cleanup-commands>
  6375. <comparators>
  6376. <comparator>
  6377. <type>TokenComparator</type>
  6378. <expected-output>data60bytes-60</expected-output>
  6379. </comparator>
  6380. </comparators>
  6381. </test>
  6382. <test> <!-- TESTED -->
  6383. <description>stat: statistics about file(relative path)</description>
  6384. <test-commands>
  6385. <command>-fs NAMENODE -mkdir -p dir</command> <!-- make sure user home dir exists -->
  6386. <command>-fs NAMENODE -touchz test</command>
  6387. <command>-fs NAMENODE -put CLITEST_DATA/data60bytes data60bytes</command>
  6388. <command>-fs NAMENODE -stat "%n-%b" data60bytes</command>
  6389. </test-commands>
  6390. <cleanup-commands>
  6391. <command>-fs NAMENODE -rm -r /user</command>
  6392. </cleanup-commands>
  6393. <comparators>
  6394. <comparator>
  6395. <type>TokenComparator</type>
  6396. <expected-output>data60bytes-60</expected-output>
  6397. </comparator>
  6398. </comparators>
  6399. </test>
  6400. <test> <!-- TESTED -->
  6401. <description>stat: statistics about directory(absolute path)</description>
  6402. <test-commands>
  6403. <command>-fs NAMENODE -mkdir /dirtest</command>
  6404. <command>-fs NAMENODE -stat "%n-%b-%o" /dirtest</command>
  6405. </test-commands>
  6406. <cleanup-commands>
  6407. <command>-fs NAMENODE -rm -r /dirtest</command>
  6408. </cleanup-commands>
  6409. <comparators>
  6410. <comparator>
  6411. <type>TokenComparator</type>
  6412. <expected-output>dirtest-0-0</expected-output>
  6413. </comparator>
  6414. </comparators>
  6415. </test>
  6416. <test> <!-- TESTED -->
  6417. <description>stat: statistics about directory(relative path)</description>
  6418. <test-commands>
  6419. <command>-fs NAMENODE -mkdir -p dirtest</command>
  6420. <command>-fs NAMENODE -stat "%n-%b-%o" dirtest</command>
  6421. </test-commands>
  6422. <cleanup-commands>
  6423. <command>-fs NAMENODE -rm -r /user</command>
  6424. </cleanup-commands>
  6425. <comparators>
  6426. <comparator>
  6427. <type>TokenComparator</type>
  6428. <expected-output>dirtest-0-0</expected-output>
  6429. </comparator>
  6430. </comparators>
  6431. </test>
  6432. <test> <!-- TESTED -->
  6433. <description>stat: statistics about files (absolute path) using globbing</description>
  6434. <test-commands>
  6435. <command>-fs NAMENODE -mkdir /dir0</command>
  6436. <command>-fs NAMENODE -put CLITEST_DATA/data15bytes /dir0/data15bytes</command>
  6437. <command>-fs NAMENODE -put CLITEST_DATA/data30bytes /dir0/data30bytes</command>
  6438. <command>-fs NAMENODE -put CLITEST_DATA/data60bytes /dir0/data60bytes</command>
  6439. <command>-fs NAMENODE -put CLITEST_DATA/data120bytes /dir0/data120bytes</command>
  6440. <command>-fs NAMENODE -mkdir /dir0/datadir</command>
  6441. <command>-fs NAMENODE -stat "%n-%b" /dir0/data*</command>
  6442. </test-commands>
  6443. <cleanup-commands>
  6444. <command>-fs NAMENODE -rm -r /dir0</command>
  6445. </cleanup-commands>
  6446. <comparators>
  6447. <comparator>
  6448. <type>TokenComparator</type>
  6449. <expected-output>data15bytes-15</expected-output>
  6450. </comparator>
  6451. <comparator>
  6452. <type>TokenComparator</type>
  6453. <expected-output>data30bytes-30</expected-output>
  6454. </comparator>
  6455. <comparator>
  6456. <type>TokenComparator</type>
  6457. <expected-output>data60bytes-60</expected-output>
  6458. </comparator>
  6459. <comparator>
  6460. <type>TokenComparator</type>
  6461. <expected-output>data120bytes-120</expected-output>
  6462. </comparator>
  6463. <comparator>
  6464. <type>TokenComparator</type>
  6465. <expected-output>datadir-0</expected-output>
  6466. </comparator>
  6467. </comparators>
  6468. </test>
  6469. <test> <!-- TESTED -->
  6470. <description>stat: statistics about files (relative path) using globbing</description>
  6471. <test-commands>
  6472. <command>-fs NAMENODE -mkdir -p dir</command> <!-- make sure user home dir exists -->
  6473. <command>-fs NAMENODE -touchz test</command>
  6474. <command>-fs NAMENODE -put CLITEST_DATA/data15bytes data15bytes</command>
  6475. <command>-fs NAMENODE -put CLITEST_DATA/data30bytes data30bytes</command>
  6476. <command>-fs NAMENODE -put CLITEST_DATA/data60bytes data60bytes</command>
  6477. <command>-fs NAMENODE -put CLITEST_DATA/data120bytes data120bytes</command>
  6478. <command>-fs NAMENODE -mkdir -p datadir</command>
  6479. <command>-fs NAMENODE -stat "%n-%b" data*</command>
  6480. </test-commands>
  6481. <cleanup-commands>
  6482. <command>-fs NAMENODE -rm -r /user</command>
  6483. </cleanup-commands>
  6484. <comparators>
  6485. <comparator>
  6486. <type>TokenComparator</type>
  6487. <expected-output>data15bytes-15</expected-output>
  6488. </comparator>
  6489. <comparator>
  6490. <type>TokenComparator</type>
  6491. <expected-output>data30bytes-30</expected-output>
  6492. </comparator>
  6493. <comparator>
  6494. <type>TokenComparator</type>
  6495. <expected-output>data60bytes-60</expected-output>
  6496. </comparator>
  6497. <comparator>
  6498. <type>TokenComparator</type>
  6499. <expected-output>data120bytes-120</expected-output>
  6500. </comparator>
  6501. <comparator>
  6502. <type>TokenComparator</type>
  6503. <expected-output>datadir-0</expected-output>
  6504. </comparator>
  6505. </comparators>
  6506. </test>
  6507. <test> <!-- TESTED -->
  6508. <description>stat: statistics about file or directory(absolute path) that does not exist</description>
  6509. <test-commands>
  6510. <command>-fs NAMENODE -stat /file</command>
  6511. </test-commands>
  6512. <cleanup-commands>
  6513. </cleanup-commands>
  6514. <comparators>
  6515. <comparator>
  6516. <type>RegexpComparator</type>
  6517. <expected-output>^stat: `/file': No such file or directory</expected-output>
  6518. </comparator>
  6519. </comparators>
  6520. </test>
  6521. <test> <!-- TESTED -->
  6522. <description>stat: statistics about file or directory(relative path) that does not exist </description>
  6523. <test-commands>
  6524. <command>-fs NAMENODE -stat file1</command>
  6525. </test-commands>
  6526. <cleanup-commands>
  6527. </cleanup-commands>
  6528. <comparators>
  6529. <comparator>
  6530. <type>RegexpComparator</type>
  6531. <expected-output>^stat: `file1': No such file or directory</expected-output>
  6532. </comparator>
  6533. </comparators>
  6534. </test>
  6535. <test> <!-- TESTED -->
  6536. <description>stat: Test for hdfs:// path - statistics about file</description>
  6537. <test-commands>
  6538. <command>-fs NAMENODE -put CLITEST_DATA/data60bytes hdfs:///data60bytes</command>
  6539. <command>-fs NAMENODE -stat "%n-%b" hdfs:///data60bytes</command>
  6540. </test-commands>
  6541. <cleanup-commands>
  6542. <command>-fs NAMENODE -rm -r hdfs:///data60bytes</command>
  6543. </cleanup-commands>
  6544. <comparators>
  6545. <comparator>
  6546. <type>TokenComparator</type>
  6547. <expected-output>data60bytes-60</expected-output>
  6548. </comparator>
  6549. </comparators>
  6550. </test>
  6551. <test> <!-- TESTED -->
  6552. <description>stat: Test for hdfs:// path - statistics about directory</description>
  6553. <test-commands>
  6554. <command>-fs NAMENODE -mkdir hdfs:///dirtest</command>
  6555. <command>-fs NAMENODE -stat "%n-%b-%o" hdfs:///dirtest</command>
  6556. </test-commands>
  6557. <cleanup-commands>
  6558. <command>-fs NAMENODE -rm -r hdfs:///dirtest</command>
  6559. </cleanup-commands>
  6560. <comparators>
  6561. <comparator>
  6562. <type>TokenComparator</type>
  6563. <expected-output>dirtest-0-0</expected-output>
  6564. </comparator>
  6565. </comparators>
  6566. </test>
  6567. <test> <!-- TESTED -->
  6568. <description>stat: Test for hdfs:// path - statistics about files using globbing</description>
  6569. <test-commands>
  6570. <command>-fs NAMENODE -mkdir /dir0</command>
  6571. <command>-fs NAMENODE -put CLITEST_DATA/data15bytes hdfs:///dir0/data15bytes</command>
  6572. <command>-fs NAMENODE -put CLITEST_DATA/data30bytes hdfs:///dir0/data30bytes</command>
  6573. <command>-fs NAMENODE -put CLITEST_DATA/data60bytes hdfs:///dir0/data60bytes</command>
  6574. <command>-fs NAMENODE -put CLITEST_DATA/data120bytes hdfs:///dir0/data120bytes</command>
  6575. <command>-fs NAMENODE -mkdir -p hdfs:///dir0/datadir</command>
  6576. <command>-fs NAMENODE -stat "%n-%b" hdfs:///dir0/data*</command>
  6577. </test-commands>
  6578. <cleanup-commands>
  6579. <command>-fs NAMENODE -rm -r hdfs:///dir0</command>
  6580. </cleanup-commands>
  6581. <comparators>
  6582. <comparator>
  6583. <type>TokenComparator</type>
  6584. <expected-output>data15bytes-15</expected-output>
  6585. </comparator>
  6586. <comparator>
  6587. <type>TokenComparator</type>
  6588. <expected-output>data30bytes-30</expected-output>
  6589. </comparator>
  6590. <comparator>
  6591. <type>TokenComparator</type>
  6592. <expected-output>data60bytes-60</expected-output>
  6593. </comparator>
  6594. <comparator>
  6595. <type>TokenComparator</type>
  6596. <expected-output>data120bytes-120</expected-output>
  6597. </comparator>
  6598. <comparator>
  6599. <type>TokenComparator</type>
  6600. <expected-output>datadir-0</expected-output>
  6601. </comparator>
  6602. </comparators>
  6603. </test>
  6604. <test> <!-- TESTED -->
  6605. <description>stat: Test for hdfs:// path - statistics about file or directory that does not exist</description>
  6606. <test-commands>
  6607. <command>-fs NAMENODE -stat hdfs:///file</command>
  6608. </test-commands>
  6609. <cleanup-commands>
  6610. </cleanup-commands>
  6611. <comparators>
  6612. <comparator>
  6613. <type>RegexpComparator</type>
  6614. <expected-output>^stat: `hdfs:///file': No such file or directory</expected-output>
  6615. </comparator>
  6616. </comparators>
  6617. </test>
  6618. <test> <!-- TESTED -->
  6619. <description>stat: Test for Namenode's path - statistics about file</description>
  6620. <test-commands>
  6621. <command>-fs NAMENODE -put CLITEST_DATA/data60bytes NAMENODE/data60bytes</command>
  6622. <command>-fs NAMENODE -stat "%n-%b" NAMENODE/data60bytes</command>
  6623. </test-commands>
  6624. <cleanup-commands>
  6625. <command>-fs NAMENODE -rm -r NAMENODE/data60bytes</command>
  6626. </cleanup-commands>
  6627. <comparators>
  6628. <comparator>
  6629. <type>TokenComparator</type>
  6630. <expected-output>data60bytes-60</expected-output>
  6631. </comparator>
  6632. </comparators>
  6633. </test>
  6634. <test> <!-- TESTED -->
  6635. <description>stat: Test for Namenode's path - statistics about directory</description>
  6636. <test-commands>
  6637. <command>-fs NAMENODE -mkdir NAMENODE/dirtest</command>
  6638. <command>-fs NAMENODE -stat "%n-%b-%o" NAMENODE/dirtest</command>
  6639. </test-commands>
  6640. <cleanup-commands>
  6641. <command>-fs NAMENODE -rm -r NAMENODE/dirtest</command>
  6642. </cleanup-commands>
  6643. <comparators>
  6644. <comparator>
  6645. <type>TokenComparator</type>
  6646. <expected-output>dirtest-0-0</expected-output>
  6647. </comparator>
  6648. </comparators>
  6649. </test>
  6650. <test> <!-- TESTED -->
  6651. <description>stat: Test for Namenode's path - statistics about files using globbing</description>
  6652. <test-commands>
  6653. <command>-fs NAMENODE -mkdir /dir0</command>
  6654. <command>-fs NAMENODE -put CLITEST_DATA/data15bytes NAMENODE/dir0/data15bytes</command>
  6655. <command>-fs NAMENODE -put CLITEST_DATA/data30bytes NAMENODE/dir0/data30bytes</command>
  6656. <command>-fs NAMENODE -put CLITEST_DATA/data60bytes NAMENODE/dir0/data60bytes</command>
  6657. <command>-fs NAMENODE -put CLITEST_DATA/data120bytes NAMENODE/dir0/data120bytes</command>
  6658. <command>-fs NAMENODE -mkdir -p NAMENODE/dir0/datadir</command>
  6659. <command>-fs NAMENODE -stat "%n-%b" NAMENODE/dir0/data*</command>
  6660. </test-commands>
  6661. <cleanup-commands>
  6662. <command>-fs NAMENODE -rm -r NAMENODE/dir0</command>
  6663. </cleanup-commands>
  6664. <comparators>
  6665. <comparator>
  6666. <type>TokenComparator</type>
  6667. <expected-output>data15bytes-15</expected-output>
  6668. </comparator>
  6669. <comparator>
  6670. <type>TokenComparator</type>
  6671. <expected-output>data30bytes-30</expected-output>
  6672. </comparator>
  6673. <comparator>
  6674. <type>TokenComparator</type>
  6675. <expected-output>data60bytes-60</expected-output>
  6676. </comparator>
  6677. <comparator>
  6678. <type>TokenComparator</type>
  6679. <expected-output>data120bytes-120</expected-output>
  6680. </comparator>
  6681. <comparator>
  6682. <type>TokenComparator</type>
  6683. <expected-output>datadir-0</expected-output>
  6684. </comparator>
  6685. </comparators>
  6686. </test>
  6687. <test> <!-- TESTED -->
  6688. <description>stat: Test for Namenode's path - statistics about file or directory that does not exist</description>
  6689. <test-commands>
  6690. <command>-fs NAMENODE -stat NAMENODE/file</command>
  6691. </test-commands>
  6692. <cleanup-commands>
  6693. </cleanup-commands>
  6694. <comparators>
  6695. <comparator>
  6696. <type>RegexpComparator</type>
  6697. <expected-output>^stat: `hdfs://\w+[-.a-z0-9]*:[0-9]+/file': No such file or directory</expected-output>
  6698. </comparator>
  6699. </comparators>
  6700. </test>
  6701. <!-- Tests for tail -->
  6702. <test> <!-- TESTED -->
  6703. <description>tail: contents of file(absolute path)</description>
  6704. <test-commands>
  6705. <command>-fs NAMENODE -put CLITEST_DATA/data15bytes /data15bytes</command>
  6706. <command>-fs NAMENODE -tail /data15bytes</command>
  6707. </test-commands>
  6708. <cleanup-commands>
  6709. <command>-fs NAMENODE -rm /user</command>
  6710. </cleanup-commands>
  6711. <comparators>
  6712. <comparator>
  6713. <type>TokenComparator</type>
  6714. <expected-output>12345678901234</expected-output>
  6715. </comparator>
  6716. </comparators>
  6717. </test>
  6718. <test> <!--TESTED-->
  6719. <description>tail: contents of file(relative path)</description>
  6720. <test-commands>
  6721. <command>-fs NAMENODE -mkdir -p dir</command> <!-- make sure user home dir exists -->
  6722. <command>-fs NAMENODE -touchz test</command>
  6723. <command>-fs NAMENODE -put CLITEST_DATA/data15bytes data15bytes</command>
  6724. <command>-fs NAMENODE -tail data15bytes</command>
  6725. </test-commands>
  6726. <cleanup-commands>
  6727. <command>-fs NAMENODE -rm -r /user</command>
  6728. </cleanup-commands>
  6729. <comparators>
  6730. <comparator>
  6731. <type>TokenComparator</type>
  6732. <expected-output>12345678901234</expected-output>
  6733. </comparator>
  6734. </comparators>
  6735. </test>
  6736. <test> <!-- TESTED -->
  6737. <description>tail: contents of files(absolute path) using globbing</description>
  6738. <test-commands>
  6739. <command>-fs NAMENODE -touchz /file1</command>
  6740. <command>-fs NAMENODE -touchz /file2</command>
  6741. <command>-fs NAMENODE -touchz /file3</command>
  6742. <command>-fs NAMENODE -touchz /file4</command>
  6743. <command>-fs NAMENODE -tail /file*</command>
  6744. </test-commands>
  6745. <cleanup-commands>
  6746. <command>-fs NAMENODE -rm -r /user</command>
  6747. </cleanup-commands>
  6748. <comparators>
  6749. <comparator>
  6750. <type>RegexpComparator</type>
  6751. <expected-output>^tail: `/file\*': No such file or directory</expected-output>
  6752. </comparator>
  6753. </comparators>
  6754. </test>
  6755. <test> <!-- TESTED -->
  6756. <description>tail: contents of files(relative path) using globbing</description>
  6757. <test-commands>
  6758. <command>-fs NAMENODE -touchz file1</command>
  6759. <command>-fs NAMENODE -touchz file2</command>
  6760. <command>-fs NAMENODE -touchz file3</command>
  6761. <command>-fs NAMENODE -touchz file4</command>
  6762. <command>-fs NAMENODE -tail file*</command>
  6763. </test-commands>
  6764. <cleanup-commands>
  6765. <command>-fs NAMENODE -rm -r /user</command>
  6766. </cleanup-commands>
  6767. <comparators>
  6768. <comparator>
  6769. <type>RegexpComparator</type>
  6770. <expected-output>^tail: `file\*': No such file or directory</expected-output>
  6771. </comparator>
  6772. </comparators>
  6773. </test>
  6774. <test> <!-- TESTED -->
  6775. <description>tail: contents of file(absolute path) that does not exist</description>
  6776. <test-commands>
  6777. <command>-fs NAMENODE -tail /file</command>
  6778. </test-commands>
  6779. <cleanup-commands>
  6780. </cleanup-commands>
  6781. <comparators>
  6782. <comparator>
  6783. <type>RegexpComparator</type>
  6784. <expected-output>^tail: `/file': No such file or directory</expected-output>
  6785. </comparator>
  6786. </comparators>
  6787. </test>
  6788. <test> <!-- TESTED -->
  6789. <description>tail: contents of file(relative path) that does not exist</description>
  6790. <test-commands>
  6791. <command>-fs NAMENODE -tail file1</command>
  6792. </test-commands>
  6793. <cleanup-commands>
  6794. </cleanup-commands>
  6795. <comparators>
  6796. <comparator>
  6797. <type>RegexpComparator</type>
  6798. <expected-output>^tail: `file1': No such file or directory</expected-output>
  6799. </comparator>
  6800. </comparators>
  6801. </test>
  6802. <test> <!-- TESTED -->
  6803. <description>tail: contents of directory(absolute path) </description>
  6804. <test-commands>
  6805. <command>-fs NAMENODE -mkdir /dir1</command>
  6806. <command>-fs NAMENODE -tail /dir1</command>
  6807. </test-commands>
  6808. <cleanup-commands>
  6809. <command>-fs NAMENODE -rm -r /dir1</command>
  6810. </cleanup-commands>
  6811. <comparators>
  6812. <comparator>
  6813. <type>RegexpComparator</type>
  6814. <expected-output>^tail: `/dir1': Is a directory</expected-output>
  6815. </comparator>
  6816. </comparators>
  6817. </test>
  6818. <test> <!-- TESTED -->
  6819. <description>tail: contents of directory(relative path)</description>
  6820. <test-commands>
  6821. <command>-fs NAMENODE -mkdir -p dir1</command>
  6822. <command>-fs NAMENODE -tail dir1</command>
  6823. </test-commands>
  6824. <cleanup-commands>
  6825. <command>-fs NAMENODE -rm -r dir1</command>
  6826. </cleanup-commands>
  6827. <comparators>
  6828. <comparator>
  6829. <type>RegexpComparator</type>
  6830. <expected-output>^tail: `dir1': Is a directory</expected-output>
  6831. </comparator>
  6832. </comparators>
  6833. </test>
  6834. <test> <!-- TESTED -->
  6835. <description>tail: Test for hdfs:// path - contents of file</description>
  6836. <test-commands>
  6837. <command>-fs NAMENODE -put CLITEST_DATA/data15bytes hdfs:///data15bytes</command>
  6838. <command>-fs NAMENODE -tail hdfs:///data15bytes</command>
  6839. </test-commands>
  6840. <cleanup-commands>
  6841. <command>-fs NAMENODE -rm hdfs:///*</command>
  6842. </cleanup-commands>
  6843. <comparators>
  6844. <comparator>
  6845. <type>TokenComparator</type>
  6846. <expected-output>12345678901234</expected-output>
  6847. </comparator>
  6848. </comparators>
  6849. </test>
  6850. <test> <!-- TESTED -->
  6851. <description>tail: Test for hdfs:// path - contents of files using globbing</description>
  6852. <test-commands>
  6853. <command>-fs NAMENODE -touchz hdfs:///file1</command>
  6854. <command>-fs NAMENODE -touchz hdfs:///file2</command>
  6855. <command>-fs NAMENODE -touchz hdfs:///file3</command>
  6856. <command>-fs NAMENODE -touchz hdfs:///file4</command>
  6857. <command>-fs NAMENODE -tail hdfs:///file*</command>
  6858. </test-commands>
  6859. <cleanup-commands>
  6860. <command>-fs NAMENODE -rm -r hdfs:///*</command>
  6861. </cleanup-commands>
  6862. <comparators>
  6863. <comparator>
  6864. <type>RegexpComparator</type>
  6865. <expected-output>^tail: `hdfs:///file\*': No such file or directory</expected-output>
  6866. </comparator>
  6867. </comparators>
  6868. </test>
  6869. <test> <!-- TESTED -->
  6870. <description>tail: Test for hdfs:// path - contents of file that does not exist</description>
  6871. <test-commands>
  6872. <command>-fs NAMENODE -tail hdfs:///file</command>
  6873. </test-commands>
  6874. <cleanup-commands>
  6875. </cleanup-commands>
  6876. <comparators>
  6877. <comparator>
  6878. <type>RegexpComparator</type>
  6879. <expected-output>^tail: `hdfs:///file': No such file or directory</expected-output>
  6880. </comparator>
  6881. </comparators>
  6882. </test>
  6883. <test> <!-- TESTED -->
  6884. <description>tail: Test for hdfs:// path - contents of directory</description>
  6885. <test-commands>
  6886. <command>-fs NAMENODE -mkdir hdfs:///dir1</command>
  6887. <command>-fs NAMENODE -tail hdfs:///dir1</command>
  6888. </test-commands>
  6889. <cleanup-commands>
  6890. <command>-fs NAMENODE -rm -r hdfs:///dir1</command>
  6891. </cleanup-commands>
  6892. <comparators>
  6893. <comparator>
  6894. <type>RegexpComparator</type>
  6895. <expected-output>^tail: `hdfs:///dir1': Is a directory</expected-output>
  6896. </comparator>
  6897. </comparators>
  6898. </test>
  6899. <test> <!-- TESTED -->
  6900. <description>tail: Test for Namenode's path - contents of file</description>
  6901. <test-commands>
  6902. <command>-fs NAMENODE -put CLITEST_DATA/data15bytes NAMENODE/data15bytes</command>
  6903. <command>-fs NAMENODE -tail NAMENODE/data15bytes</command>
  6904. </test-commands>
  6905. <cleanup-commands>
  6906. <command>-fs NAMENODE -rm NAMENODE/*</command>
  6907. </cleanup-commands>
  6908. <comparators>
  6909. <comparator>
  6910. <type>TokenComparator</type>
  6911. <expected-output>12345678901234</expected-output>
  6912. </comparator>
  6913. </comparators>
  6914. </test>
  6915. <test> <!-- TESTED -->
  6916. <description>tail: Test for Namenode's path - contents of files using globbing</description>
  6917. <test-commands>
  6918. <command>-fs NAMENODE -touchz NAMENODE/file1</command>
  6919. <command>-fs NAMENODE -touchz NAMENODE/file2</command>
  6920. <command>-fs NAMENODE -touchz NAMENODE/file3</command>
  6921. <command>-fs NAMENODE -touchz NAMENODE/file4</command>
  6922. <command>-fs NAMENODE -tail NAMENODE/file*</command>
  6923. </test-commands>
  6924. <cleanup-commands>
  6925. <command>-fs NAMENODE -rm -r NAMENODE/*</command>
  6926. </cleanup-commands>
  6927. <comparators>
  6928. <comparator>
  6929. <type>RegexpComparator</type>
  6930. <expected-output>^tail: `hdfs://\w+[-.a-z0-9]*:[0-9]+/file\*': No such file or directory</expected-output>
  6931. </comparator>
  6932. </comparators>
  6933. </test>
  6934. <test> <!-- TESTED -->
  6935. <description>tail: Test for Namenode's path - contents of file that does not exist</description>
  6936. <test-commands>
  6937. <command>-fs NAMENODE -tail NAMENODE/file</command>
  6938. </test-commands>
  6939. <cleanup-commands>
  6940. </cleanup-commands>
  6941. <comparators>
  6942. <comparator>
  6943. <type>RegexpComparator</type>
  6944. <expected-output>^tail: `hdfs://\w+[-.a-z0-9]*:[0-9]+/file': No such file or directory</expected-output>
  6945. </comparator>
  6946. </comparators>
  6947. </test>
  6948. <test> <!-- TESTED -->
  6949. <description>tail: Test for Namenode's path - contents of directory</description>
  6950. <test-commands>
  6951. <command>-fs NAMENODE -mkdir NAMENODE/dir1</command>
  6952. <command>-fs NAMENODE -tail NAMENODE/dir1</command>
  6953. </test-commands>
  6954. <cleanup-commands>
  6955. <command>-fs NAMENODE -rm -r NAMENODE/dir1</command>
  6956. </cleanup-commands>
  6957. <comparators>
  6958. <comparator>
  6959. <type>RegexpComparator</type>
  6960. <expected-output>^tail: `hdfs://\w+[-.a-z0-9]*:[0-9]+/dir1': Is a directory</expected-output>
  6961. </comparator>
  6962. </comparators>
  6963. </test>
  6964. <!-- Tests for count -->
  6965. <test> <!-- TESTED -->
  6966. <description>count: file using absolute path</description>
  6967. <test-commands>
  6968. <command>-fs NAMENODE -touchz /file1</command>
  6969. <command>-fs NAMENODE -count /file1</command>
  6970. </test-commands>
  6971. <cleanup-commands>
  6972. <command>-fs NAMENODE -rm /file1</command>
  6973. </cleanup-commands>
  6974. <comparators>
  6975. <comparator>
  6976. <type>RegexpComparator</type>
  6977. <expected-output>( |\t)*0( |\t)*1( |\t)*0 /file1</expected-output>
  6978. </comparator>
  6979. </comparators>
  6980. </test>
  6981. <test> <!-- TESTED -->
  6982. <description>count: file using relative path</description>
  6983. <test-commands>
  6984. <command>-fs NAMENODE -mkdir -p dir</command> <!-- make sure user home dir exists -->
  6985. <command>-fs NAMENODE -touchz file1</command>
  6986. <command>-fs NAMENODE -count file1</command>
  6987. </test-commands>
  6988. <cleanup-commands>
  6989. <command>-fs NAMENODE -rm file1</command>
  6990. </cleanup-commands>
  6991. <comparators>
  6992. <comparator>
  6993. <type>RegexpComparator</type>
  6994. <expected-output>( |\t)*0( |\t)*1( |\t)*0 file1</expected-output>
  6995. </comparator>
  6996. </comparators>
  6997. </test>
  6998. <test> <!-- TESTED -->
  6999. <description>count: directory using absolute path</description>
  7000. <test-commands>
  7001. <command>-fs NAMENODE -mkdir /dir1</command>
  7002. <command>-fs NAMENODE -count /dir1</command>
  7003. </test-commands>
  7004. <cleanup-commands>
  7005. <command>-fs NAMENODE -rm -r /dir1</command>
  7006. </cleanup-commands>
  7007. <comparators>
  7008. <comparator>
  7009. <type>RegexpComparator</type>
  7010. <expected-output>( |\t)*1( |\t)*0( |\t)*0 /dir1</expected-output>
  7011. </comparator>
  7012. </comparators>
  7013. </test>
  7014. <test> <!-- TESTED -->
  7015. <description>count: directory using relative path</description>
  7016. <test-commands>
  7017. <command>-fs NAMENODE -mkdir -p dir1</command>
  7018. <command>-fs NAMENODE -count dir1</command>
  7019. </test-commands>
  7020. <cleanup-commands>
  7021. <command>-fs NAMENODE -rm -r dir1</command>
  7022. </cleanup-commands>
  7023. <comparators>
  7024. <comparator>
  7025. <type>RegexpComparator</type>
  7026. <expected-output>( |\t)*1( |\t)*0( |\t)*0 dir1</expected-output>
  7027. </comparator>
  7028. </comparators>
  7029. </test>
  7030. <test> <!-- TESTED -->
  7031. <description>count: absolute path to file/directory that does not exist</description>
  7032. <test-commands>
  7033. <command>-fs NAMENODE -count /file1 </command>
  7034. </test-commands>
  7035. <cleanup-commands>
  7036. </cleanup-commands>
  7037. <comparators>
  7038. <comparator>
  7039. <type>TokenComparator</type>
  7040. <expected-output>count: `/file1': No such file or directory</expected-output>
  7041. </comparator>
  7042. </comparators>
  7043. </test>
  7044. <test> <!-- TESTED -->
  7045. <description>count: relative path to file/directory that does not exist</description>
  7046. <test-commands>
  7047. <command>-fs NAMENODE -count file1</command>
  7048. </test-commands>
  7049. <cleanup-commands>
  7050. </cleanup-commands>
  7051. <comparators>
  7052. <comparator>
  7053. <type>TokenComparator</type>
  7054. <expected-output>count: `file1': No such file or directory</expected-output>
  7055. </comparator>
  7056. </comparators>
  7057. </test>
  7058. <test> <!-- TESTED -->
  7059. <description>count: absolute path to multiple files using globbing</description>
  7060. <test-commands>
  7061. <command>-fs NAMENODE -touchz /file1</command>
  7062. <command>-fs NAMENODE -touchz /file2</command>
  7063. <command>-fs NAMENODE -touchz /file3</command>
  7064. <command>-fs NAMENODE -touchz /file4</command>
  7065. <command>-fs NAMENODE -count /file*</command>
  7066. </test-commands>
  7067. <cleanup-commands>
  7068. <command>-fs NAMENODE -rm -r /file*</command>
  7069. </cleanup-commands>
  7070. <comparators>
  7071. <comparator>
  7072. <type>RegexpComparator</type>
  7073. <expected-output>( |\t)*0( |\t)*1( |\t)*0 /file1</expected-output>
  7074. </comparator>
  7075. <comparator>
  7076. <type>RegexpComparator</type>
  7077. <expected-output>( |\t)*0( |\t)*1( |\t)*0 /file2</expected-output>
  7078. </comparator>
  7079. <comparator>
  7080. <type>RegexpComparator</type>
  7081. <expected-output>( |\t)*0( |\t)*1( |\t)*0 /file3</expected-output>
  7082. </comparator>
  7083. <comparator>
  7084. <type>RegexpComparator</type>
  7085. <expected-output>( |\t)*0( |\t)*1( |\t)*0 /file4</expected-output>
  7086. </comparator>
  7087. </comparators>
  7088. </test>
  7089. <test> <!-- TESTED -->
  7090. <description>count: relative path to multiple files using globbing</description>
  7091. <test-commands>
  7092. <command>-fs NAMENODE -touchz file1</command>
  7093. <command>-fs NAMENODE -touchz file2</command>
  7094. <command>-fs NAMENODE -touchz file3</command>
  7095. <command>-fs NAMENODE -touchz file4</command>
  7096. <command>-fs NAMENODE -count file*</command>
  7097. </test-commands>
  7098. <cleanup-commands>
  7099. <command>-fs NAMENODE -rm -r /user</command>
  7100. </cleanup-commands>
  7101. <comparators>
  7102. <comparator>
  7103. <type>RegexpComparator</type>
  7104. <expected-output>( |\t)*0( |\t)*1( |\t)*0 file1</expected-output>
  7105. </comparator>
  7106. <comparator>
  7107. <type>RegexpComparator</type>
  7108. <expected-output>( |\t)*0( |\t)*1( |\t)*0 file2</expected-output>
  7109. </comparator>
  7110. <comparator>
  7111. <type>RegexpComparator</type>
  7112. <expected-output>( |\t)*0( |\t)*1( |\t)*0 file3</expected-output>
  7113. </comparator>
  7114. <comparator>
  7115. <type>RegexpComparator</type>
  7116. <expected-output>( |\t)*0( |\t)*1( |\t)*0 file4</expected-output>
  7117. </comparator>
  7118. </comparators>
  7119. </test>
  7120. <test> <!-- TESTED -->
  7121. <description>count: absolute path to multiple files without globbing</description>
  7122. <test-commands>
  7123. <command>-fs NAMENODE -touchz /file1</command>
  7124. <command>-fs NAMENODE -touchz /file2</command>
  7125. <command>-fs NAMENODE -touchz /file3</command>
  7126. <command>-fs NAMENODE -touchz /file4</command>
  7127. <command>-fs NAMENODE -count /file1 /file2 /file3 /file4</command>
  7128. </test-commands>
  7129. <cleanup-commands>
  7130. <command>-fs NAMENODE -rm -r /file*</command>
  7131. </cleanup-commands>
  7132. <comparators>
  7133. <comparator>
  7134. <type>RegexpComparator</type>
  7135. <expected-output>( |\t)*0( |\t)*1( |\t)*0 /file1</expected-output>
  7136. </comparator>
  7137. <comparator>
  7138. <type>RegexpComparator</type>
  7139. <expected-output>( |\t)*0( |\t)*1( |\t)*0 /file2</expected-output>
  7140. </comparator>
  7141. <comparator>
  7142. <type>RegexpComparator</type>
  7143. <expected-output>( |\t)*0( |\t)*1( |\t)*0 /file3</expected-output>
  7144. </comparator>
  7145. <comparator>
  7146. <type>RegexpComparator</type>
  7147. <expected-output>( |\t)*0( |\t)*1( |\t)*0 /file4</expected-output>
  7148. </comparator>
  7149. </comparators>
  7150. </test>
  7151. <test> <!-- TESTED -->
  7152. <description>count: relative path to multiple files without globbing</description>
  7153. <test-commands>
  7154. <command>-fs NAMENODE -mkdir -p dir</command> <!-- make sure user home dir exists -->
  7155. <command>-fs NAMENODE -touchz file1</command>
  7156. <command>-fs NAMENODE -touchz file2</command>
  7157. <command>-fs NAMENODE -touchz file3</command>
  7158. <command>-fs NAMENODE -touchz file4</command>
  7159. <command>-fs NAMENODE -count file1 file2 file3 file4</command>
  7160. </test-commands>
  7161. <cleanup-commands>
  7162. <command>-fs NAMENODE -rm -r /user</command>
  7163. </cleanup-commands>
  7164. <comparators>
  7165. <comparator>
  7166. <type>RegexpComparator</type>
  7167. <expected-output>( |\t)*0( |\t)*1( |\t)*0 file1</expected-output>
  7168. </comparator>
  7169. <comparator>
  7170. <type>RegexpComparator</type>
  7171. <expected-output>( |\t)*0( |\t)*1( |\t)*0 file2</expected-output>
  7172. </comparator>
  7173. <comparator>
  7174. <type>RegexpComparator</type>
  7175. <expected-output>( |\t)*0( |\t)*1( |\t)*0 file3</expected-output>
  7176. </comparator>
  7177. <comparator>
  7178. <type>RegexpComparator</type>
  7179. <expected-output>( |\t)*0( |\t)*1( |\t)*0 file4</expected-output>
  7180. </comparator>
  7181. </comparators>
  7182. </test>
  7183. <test> <!-- TESTED -->
  7184. <description>count: absolute path to multiple directories using globbing</description>
  7185. <test-commands>
  7186. <command>-fs NAMENODE -mkdir /dir1</command>
  7187. <command>-fs NAMENODE -mkdir /dir2</command>
  7188. <command>-fs NAMENODE -mkdir /dir3</command>
  7189. <command>-fs NAMENODE -mkdir /dir4</command>
  7190. <command>-fs NAMENODE -count /dir* </command>
  7191. </test-commands>
  7192. <cleanup-commands>
  7193. <command>-fs NAMENODE -rm -r /dir*</command>
  7194. </cleanup-commands>
  7195. <comparators>
  7196. <comparator>
  7197. <type>RegexpComparator</type>
  7198. <expected-output>( |\t)*1( |\t)*0( |\t)*0 /dir1</expected-output>
  7199. </comparator>
  7200. <comparator>
  7201. <type>RegexpComparator</type>
  7202. <expected-output>( |\t)*1( |\t)*0( |\t)*0 /dir2</expected-output>
  7203. </comparator>
  7204. <comparator>
  7205. <type>RegexpComparator</type>
  7206. <expected-output>( |\t)*1( |\t)*0( |\t)*0 /dir3</expected-output>
  7207. </comparator>
  7208. <comparator>
  7209. <type>RegexpComparator</type>
  7210. <expected-output>( |\t)*1( |\t)*0( |\t)*0 /dir4</expected-output>
  7211. </comparator>
  7212. </comparators>
  7213. </test>
  7214. <test> <!-- TESTED -->
  7215. <description>count: relative path to multiple directories using globbing</description>
  7216. <test-commands>
  7217. <command>-fs NAMENODE -mkdir -p dir1</command>
  7218. <command>-fs NAMENODE -mkdir -p dir2</command>
  7219. <command>-fs NAMENODE -mkdir -p dir3</command>
  7220. <command>-fs NAMENODE -mkdir -p dir4</command>
  7221. <command>-fs NAMENODE -count dir* </command>
  7222. </test-commands>
  7223. <cleanup-commands>
  7224. <command>-fs NAMENODE -rm -r /user</command>
  7225. </cleanup-commands>
  7226. <comparators>
  7227. <comparator>
  7228. <type>RegexpComparator</type>
  7229. <expected-output>( |\t)*1( |\t)*0( |\t)*0 dir1</expected-output>
  7230. </comparator>
  7231. <comparator>
  7232. <type>RegexpComparator</type>
  7233. <expected-output>( |\t)*1( |\t)*0( |\t)*0 dir2</expected-output>
  7234. </comparator>
  7235. <comparator>
  7236. <type>RegexpComparator</type>
  7237. <expected-output>( |\t)*1( |\t)*0( |\t)*0 dir3</expected-output>
  7238. </comparator>
  7239. <comparator>
  7240. <type>RegexpComparator</type>
  7241. <expected-output>( |\t)*1( |\t)*0( |\t)*0 dir4</expected-output>
  7242. </comparator>
  7243. </comparators>
  7244. </test>
  7245. <test> <!-- TESTED -->
  7246. <description>count: absolute path to multiple directories without globbing</description>
  7247. <test-commands>
  7248. <command>-fs NAMENODE -mkdir /dir1</command>
  7249. <command>-fs NAMENODE -mkdir /dir2</command>
  7250. <command>-fs NAMENODE -mkdir /dir3</command>
  7251. <command>-fs NAMENODE -mkdir /dir4</command>
  7252. <command>-fs NAMENODE -count /dir1 /dir2 /dir3 /dir4 </command>
  7253. </test-commands>
  7254. <cleanup-commands>
  7255. <command>-fs NAMENODE -rm -r /dir*</command>
  7256. </cleanup-commands>
  7257. <comparators>
  7258. <comparator>
  7259. <type>RegexpComparator</type>
  7260. <expected-output>( |\t)*1( |\t)*0( |\t)*0 /dir1</expected-output>
  7261. </comparator>
  7262. <comparator>
  7263. <type>RegexpComparator</type>
  7264. <expected-output>( |\t)*1( |\t)*0( |\t)*0 /dir2</expected-output>
  7265. </comparator>
  7266. <comparator>
  7267. <type>RegexpComparator</type>
  7268. <expected-output>( |\t)*1( |\t)*0( |\t)*0 /dir3</expected-output>
  7269. </comparator>
  7270. <comparator>
  7271. <type>RegexpComparator</type>
  7272. <expected-output>( |\t)*1( |\t)*0( |\t)*0 /dir4</expected-output>
  7273. </comparator>
  7274. </comparators>
  7275. </test>
  7276. <test> <!-- TESTED -->
  7277. <description>count: relative path to multiple directories without globbing</description>
  7278. <test-commands>
  7279. <command>-fs NAMENODE -mkdir -p dir1</command>
  7280. <command>-fs NAMENODE -mkdir -p dir2</command>
  7281. <command>-fs NAMENODE -mkdir -p dir3</command>
  7282. <command>-fs NAMENODE -mkdir -p dir4</command>
  7283. <command>-fs NAMENODE -count dir1 dir2 dir3 dir4 </command>
  7284. </test-commands>
  7285. <cleanup-commands>
  7286. <command>-fs NAMENODE -rm -r /user</command>
  7287. </cleanup-commands>
  7288. <comparators>
  7289. <comparator>
  7290. <type>RegexpComparator</type>
  7291. <expected-output>( |\t)*1( |\t)*0( |\t)*0 dir1</expected-output>
  7292. </comparator>
  7293. <comparator>
  7294. <type>RegexpComparator</type>
  7295. <expected-output>( |\t)*1( |\t)*0( |\t)*0 dir2</expected-output>
  7296. </comparator>
  7297. <comparator>
  7298. <type>RegexpComparator</type>
  7299. <expected-output>( |\t)*1( |\t)*0( |\t)*0 dir3</expected-output>
  7300. </comparator>
  7301. <comparator>
  7302. <type>RegexpComparator</type>
  7303. <expected-output>( |\t)*1( |\t)*0( |\t)*0 dir4</expected-output>
  7304. </comparator>
  7305. </comparators>
  7306. </test>
  7307. <test> <!-- TESTED -->
  7308. <description>count: file using absolute path with -q option</description>
  7309. <test-commands>
  7310. <command>-fs NAMENODE -touchz /file1</command>
  7311. <command>-fs NAMENODE -count -q /file1</command>
  7312. </test-commands>
  7313. <cleanup-commands>
  7314. <command>-fs NAMENODE -rm /file1</command>
  7315. </cleanup-commands>
  7316. <comparators>
  7317. <comparator>
  7318. <type>RegexpComparator</type>
  7319. <expected-output>( |\t)*none( |\t)*inf( |\t)*none( |\t)*inf( |\t)*0( |\t)*1( |\t)*0 /file1</expected-output>
  7320. </comparator>
  7321. </comparators>
  7322. </test>
  7323. <test> <!-- TESTED -->
  7324. <description>count: file using relative path with -q option</description>
  7325. <test-commands>
  7326. <command>-fs NAMENODE -mkdir -p dir</command> <!-- make sure user home dir exists -->
  7327. <command>-fs NAMENODE -touchz file1</command>
  7328. <command>-fs NAMENODE -count -q file1</command>
  7329. </test-commands>
  7330. <cleanup-commands>
  7331. <command>-fs NAMENODE -rm file1</command>
  7332. </cleanup-commands>
  7333. <comparators>
  7334. <comparator>
  7335. <type>RegexpComparator</type>
  7336. <expected-output>( |\t)*none( |\t)*inf( |\t)*none( |\t)*inf( |\t)*0( |\t)*1( |\t)*0 file1</expected-output>
  7337. </comparator>
  7338. </comparators>
  7339. </test>
  7340. <test> <!-- TESTED -->
  7341. <description>count: directory using absolute path with -q option</description>
  7342. <test-commands>
  7343. <command>-fs NAMENODE -mkdir /dir1</command>
  7344. <dfs-admin-command>-fs NAMENODE -setQuota 10 /dir1 </dfs-admin-command>
  7345. <dfs-admin-command>-fs NAMENODE -setSpaceQuota 1m /dir1 </dfs-admin-command>
  7346. <command>-fs NAMENODE -count -q /dir1</command>
  7347. </test-commands>
  7348. <cleanup-commands>
  7349. <command>-fs NAMENODE -rm -r /dir1</command>
  7350. </cleanup-commands>
  7351. <comparators>
  7352. <comparator>
  7353. <type>RegexpComparator</type>
  7354. <expected-output>( |\t)*10( |\t)*9( |\t)*1048576( |\t)*1048576( |\t)*1( |\t)*0( |\t)*0 /dir1</expected-output>
  7355. </comparator>
  7356. </comparators>
  7357. </test>
  7358. <test> <!-- TESTED -->
  7359. <description>count: directory using relative path with -q option</description>
  7360. <test-commands>
  7361. <command>-fs NAMENODE -mkdir -p dir1</command>
  7362. <dfs-admin-command>-fs NAMENODE -setQuota 10 dir1 </dfs-admin-command>
  7363. <dfs-admin-command>-fs NAMENODE -setSpaceQuota 1m dir1 </dfs-admin-command>
  7364. <command>-fs NAMENODE -count -q dir1</command>
  7365. </test-commands>
  7366. <cleanup-commands>
  7367. <command>-fs NAMENODE -rm -r dir1</command>
  7368. </cleanup-commands>
  7369. <comparators>
  7370. <comparator>
  7371. <type>RegexpComparator</type>
  7372. <expected-output>( |\t)*10( |\t)*9( |\t)*1048576( |\t)*1048576( |\t)*1( |\t)*0( |\t)*0 dir1</expected-output>
  7373. </comparator>
  7374. </comparators>
  7375. </test>
  7376. <test> <!-- TESTED -->
  7377. <description>count: absolute path to file/directory that does not exist with -q option</description>
  7378. <test-commands>
  7379. <command>-fs NAMENODE -count -q /file1 </command>
  7380. </test-commands>
  7381. <cleanup-commands>
  7382. </cleanup-commands>
  7383. <comparators>
  7384. <comparator>
  7385. <type>TokenComparator</type>
  7386. <expected-output>count: `/file1': No such file or directory</expected-output>
  7387. </comparator>
  7388. </comparators>
  7389. </test>
  7390. <test> <!-- TESTED -->
  7391. <description>count: relative path to file/directory that does not exist with -q option</description>
  7392. <test-commands>
  7393. <command>-fs NAMENODE -count -q file1</command>
  7394. </test-commands>
  7395. <cleanup-commands>
  7396. </cleanup-commands>
  7397. <comparators>
  7398. <comparator>
  7399. <type>TokenComparator</type>
  7400. <expected-output>count: `file1': No such file or directory</expected-output>
  7401. </comparator>
  7402. </comparators>
  7403. </test>
  7404. <test> <!-- TESTED -->
  7405. <description>count: absolute path to multiple files using globbing with -q option</description>
  7406. <test-commands>
  7407. <command>-fs NAMENODE -touchz /file1</command>
  7408. <command>-fs NAMENODE -touchz /file2</command>
  7409. <command>-fs NAMENODE -touchz /file3</command>
  7410. <command>-fs NAMENODE -touchz /file4</command>
  7411. <command>-fs NAMENODE -count -q /file*</command>
  7412. </test-commands>
  7413. <cleanup-commands>
  7414. <command>-fs NAMENODE -rm -r /file*</command>
  7415. </cleanup-commands>
  7416. <comparators>
  7417. <comparator>
  7418. <type>RegexpComparator</type>
  7419. <expected-output>( |\t)*none( |\t)*inf( |\t)*none( |\t)*inf( |\t)*0( |\t)*1( |\t)*0 /file1</expected-output>
  7420. </comparator>
  7421. <comparator>
  7422. <type>RegexpComparator</type>
  7423. <expected-output>( |\t)*none( |\t)*inf( |\t)*none( |\t)*inf( |\t)*0( |\t)*1( |\t)*0 /file2</expected-output>
  7424. </comparator>
  7425. <comparator>
  7426. <type>RegexpComparator</type>
  7427. <expected-output>( |\t)*none( |\t)*inf( |\t)*none( |\t)*inf( |\t)*0( |\t)*1( |\t)*0 /file3</expected-output>
  7428. </comparator>
  7429. <comparator>
  7430. <type>RegexpComparator</type>
  7431. <expected-output>( |\t)*none( |\t)*inf( |\t)*none( |\t)*inf( |\t)*0( |\t)*1( |\t)*0 /file4</expected-output>
  7432. </comparator>
  7433. </comparators>
  7434. </test>
  7435. <test> <!-- TESTED -->
  7436. <description>count: relative path to multiple files using globbing with -q option</description>
  7437. <test-commands>
  7438. <command>-fs NAMENODE -touchz file1</command>
  7439. <command>-fs NAMENODE -touchz file2</command>
  7440. <command>-fs NAMENODE -touchz file3</command>
  7441. <command>-fs NAMENODE -touchz file4</command>
  7442. <command>-fs NAMENODE -count -q file*</command>
  7443. </test-commands>
  7444. <cleanup-commands>
  7445. <command>-fs NAMENODE -rm -r /user</command>
  7446. </cleanup-commands>
  7447. <comparators>
  7448. <comparator>
  7449. <type>RegexpComparator</type>
  7450. <expected-output>( |\t)*none( |\t)*inf( |\t)*none( |\t)*inf( |\t)*0( |\t)*1( |\t)*0 file1</expected-output>
  7451. </comparator>
  7452. <comparator>
  7453. <type>RegexpComparator</type>
  7454. <expected-output>( |\t)*none( |\t)*inf( |\t)*none( |\t)*inf( |\t)*0( |\t)*1( |\t)*0 file2</expected-output>
  7455. </comparator>
  7456. <comparator>
  7457. <type>RegexpComparator</type>
  7458. <expected-output>( |\t)*none( |\t)*inf( |\t)*none( |\t)*inf( |\t)*0( |\t)*1( |\t)*0 file3</expected-output>
  7459. </comparator>
  7460. <comparator>
  7461. <type>RegexpComparator</type>
  7462. <expected-output>( |\t)*none( |\t)*inf( |\t)*none( |\t)*inf( |\t)*0( |\t)*1( |\t)*0 file4</expected-output>
  7463. </comparator>
  7464. </comparators>
  7465. </test>
  7466. <test> <!-- TESTED -->
  7467. <description>count: absolute path to multiple files without globbing with -q option</description>
  7468. <test-commands>
  7469. <command>-fs NAMENODE -touchz /file1</command>
  7470. <command>-fs NAMENODE -touchz /file2</command>
  7471. <command>-fs NAMENODE -touchz /file3</command>
  7472. <command>-fs NAMENODE -touchz /file4</command>
  7473. <command>-fs NAMENODE -count -q /file1 /file2 /file3 /file4</command>
  7474. </test-commands>
  7475. <cleanup-commands>
  7476. <command>-fs NAMENODE -rm -r /file*</command>
  7477. </cleanup-commands>
  7478. <comparators>
  7479. <comparator>
  7480. <type>RegexpComparator</type>
  7481. <expected-output>( |\t)*none( |\t)*inf( |\t)*none( |\t)*inf( |\t)*0( |\t)*1( |\t)*0 /file1</expected-output>
  7482. </comparator>
  7483. <comparator>
  7484. <type>RegexpComparator</type>
  7485. <expected-output>( |\t)*none( |\t)*inf( |\t)*none( |\t)*inf( |\t)*0( |\t)*1( |\t)*0 /file2</expected-output>
  7486. </comparator>
  7487. <comparator>
  7488. <type>RegexpComparator</type>
  7489. <expected-output>( |\t)*none( |\t)*inf( |\t)*none( |\t)*inf( |\t)*0( |\t)*1( |\t)*0 /file3</expected-output>
  7490. </comparator>
  7491. <comparator>
  7492. <type>RegexpComparator</type>
  7493. <expected-output>( |\t)*none( |\t)*inf( |\t)*none( |\t)*inf( |\t)*0( |\t)*1( |\t)*0 /file4</expected-output>
  7494. </comparator>
  7495. </comparators>
  7496. </test>
  7497. <test> <!-- TESTED -->
  7498. <description>count: relative path to multiple files without globbing with -q option</description>
  7499. <test-commands>
  7500. <command>-fs NAMENODE -mkdir -p dir</command> <!-- make sure user home dir exists -->
  7501. <command>-fs NAMENODE -touchz file1</command>
  7502. <command>-fs NAMENODE -touchz file2</command>
  7503. <command>-fs NAMENODE -touchz file3</command>
  7504. <command>-fs NAMENODE -touchz file4</command>
  7505. <command>-fs NAMENODE -count -q file1 file2 file3 file4</command>
  7506. </test-commands>
  7507. <cleanup-commands>
  7508. <command>-fs NAMENODE -rm -r /user</command>
  7509. </cleanup-commands>
  7510. <comparators>
  7511. <comparator>
  7512. <type>RegexpComparator</type>
  7513. <expected-output>( |\t)*none( |\t)*inf( |\t)*none( |\t)*inf( |\t)*0( |\t)*1( |\t)*0 file1</expected-output>
  7514. </comparator>
  7515. <comparator>
  7516. <type>RegexpComparator</type>
  7517. <expected-output>( |\t)*none( |\t)*inf( |\t)*none( |\t)*inf( |\t)*0( |\t)*1( |\t)*0 file2</expected-output>
  7518. </comparator>
  7519. <comparator>
  7520. <type>RegexpComparator</type>
  7521. <expected-output>( |\t)*none( |\t)*inf( |\t)*none( |\t)*inf( |\t)*0( |\t)*1( |\t)*0 file3</expected-output>
  7522. </comparator>
  7523. <comparator>
  7524. <type>RegexpComparator</type>
  7525. <expected-output>( |\t)*none( |\t)*inf( |\t)*none( |\t)*inf( |\t)*0( |\t)*1( |\t)*0 file4</expected-output>
  7526. </comparator>
  7527. </comparators>
  7528. </test>
  7529. <test> <!-- TESTED -->
  7530. <description>count: absolute path to multiple directories using globbing with -q option</description>
  7531. <test-commands>
  7532. <command>-fs NAMENODE -mkdir /dir1</command>
  7533. <command>-fs NAMENODE -mkdir /dir2</command>
  7534. <command>-fs NAMENODE -mkdir /dir3</command>
  7535. <command>-fs NAMENODE -mkdir /dir4</command>
  7536. <dfs-admin-command>-fs NAMENODE -setQuota 10 /dir1 </dfs-admin-command>
  7537. <dfs-admin-command>-fs NAMENODE -setSpaceQuota 1m /dir1 </dfs-admin-command>
  7538. <dfs-admin-command>-fs NAMENODE -setQuota 10 /dir2 </dfs-admin-command>
  7539. <dfs-admin-command>-fs NAMENODE -setSpaceQuota 1m /dir2 </dfs-admin-command>
  7540. <dfs-admin-command>-fs NAMENODE -setQuota 10 /dir3 </dfs-admin-command>
  7541. <dfs-admin-command>-fs NAMENODE -setSpaceQuota 1m /dir3 </dfs-admin-command>
  7542. <dfs-admin-command>-fs NAMENODE -setQuota 10 /dir4 </dfs-admin-command>
  7543. <dfs-admin-command>-fs NAMENODE -setSpaceQuota 1m /dir4 </dfs-admin-command>
  7544. <command>-fs NAMENODE -count -q /dir* </command>
  7545. </test-commands>
  7546. <cleanup-commands>
  7547. <command>-fs NAMENODE -rm -r /dir*</command>
  7548. </cleanup-commands>
  7549. <comparators>
  7550. <comparator>
  7551. <type>RegexpComparator</type>
  7552. <expected-output>( |\t)*10( |\t)*9( |\t)*1048576( |\t)*1048576( |\t)*1( |\t)*0( |\t)*0 /dir1</expected-output>
  7553. </comparator>
  7554. <comparator>
  7555. <type>RegexpComparator</type>
  7556. <expected-output>( |\t)*10( |\t)*9( |\t)*1048576( |\t)*1048576( |\t)*1( |\t)*0( |\t)*0 /dir2</expected-output>
  7557. </comparator>
  7558. <comparator>
  7559. <type>RegexpComparator</type>
  7560. <expected-output>( |\t)*10( |\t)*9( |\t)*1048576( |\t)*1048576( |\t)*1( |\t)*0( |\t)*0 /dir3</expected-output>
  7561. </comparator>
  7562. <comparator>
  7563. <type>RegexpComparator</type>
  7564. <expected-output>( |\t)*10( |\t)*9( |\t)*1048576( |\t)*1048576( |\t)*1( |\t)*0( |\t)*0 /dir4</expected-output>
  7565. </comparator>
  7566. </comparators>
  7567. </test>
  7568. <test> <!-- TESTED -->
  7569. <description>count: relative path to multiple directories using globbing with -q option</description>
  7570. <test-commands>
  7571. <command>-fs NAMENODE -mkdir -p dir1</command>
  7572. <command>-fs NAMENODE -mkdir -p dir2</command>
  7573. <command>-fs NAMENODE -mkdir -p dir3</command>
  7574. <command>-fs NAMENODE -mkdir -p dir4</command>
  7575. <dfs-admin-command>-fs NAMENODE -setQuota 10 dir1 </dfs-admin-command>
  7576. <dfs-admin-command>-fs NAMENODE -setSpaceQuota 1m dir1 </dfs-admin-command>
  7577. <dfs-admin-command>-fs NAMENODE -setQuota 10 dir2 </dfs-admin-command>
  7578. <dfs-admin-command>-fs NAMENODE -setSpaceQuota 1m dir2 </dfs-admin-command>
  7579. <dfs-admin-command>-fs NAMENODE -setQuota 10 dir3 </dfs-admin-command>
  7580. <dfs-admin-command>-fs NAMENODE -setSpaceQuota 1m dir3 </dfs-admin-command>
  7581. <dfs-admin-command>-fs NAMENODE -setQuota 10 dir4 </dfs-admin-command>
  7582. <dfs-admin-command>-fs NAMENODE -setSpaceQuota 1m dir4 </dfs-admin-command>
  7583. <command>-fs NAMENODE -count -q dir* </command>
  7584. </test-commands>
  7585. <cleanup-commands>
  7586. <command>-fs NAMENODE -rm -r /user</command>
  7587. </cleanup-commands>
  7588. <comparators>
  7589. <comparator>
  7590. <type>RegexpComparator</type>
  7591. <expected-output>( |\t)*10( |\t)*9( |\t)*1048576( |\t)*1048576( |\t)*1( |\t)*0( |\t)*0 dir1</expected-output>
  7592. </comparator>
  7593. <comparator>
  7594. <type>RegexpComparator</type>
  7595. <expected-output>( |\t)*10( |\t)*9( |\t)*1048576( |\t)*1048576( |\t)*1( |\t)*0( |\t)*0 dir2</expected-output>
  7596. </comparator>
  7597. <comparator>
  7598. <type>RegexpComparator</type>
  7599. <expected-output>( |\t)*10( |\t)*9( |\t)*1048576( |\t)*1048576( |\t)*1( |\t)*0( |\t)*0 dir3</expected-output>
  7600. </comparator>
  7601. <comparator>
  7602. <type>RegexpComparator</type>
  7603. <expected-output>( |\t)*10( |\t)*9( |\t)*1048576( |\t)*1048576( |\t)*1( |\t)*0( |\t)*0 dir4</expected-output>
  7604. </comparator>
  7605. </comparators>
  7606. </test>
  7607. <test> <!-- TESTED -->
  7608. <description>count: absolute path to multiple directories without globbing with -q option</description>
  7609. <test-commands>
  7610. <command>-fs NAMENODE -mkdir /dir1</command>
  7611. <command>-fs NAMENODE -mkdir /dir2</command>
  7612. <command>-fs NAMENODE -mkdir /dir3</command>
  7613. <command>-fs NAMENODE -mkdir /dir4</command>
  7614. <dfs-admin-command>-fs NAMENODE -setQuota 10 /dir1 </dfs-admin-command>
  7615. <dfs-admin-command>-fs NAMENODE -setSpaceQuota 1m /dir1 </dfs-admin-command>
  7616. <dfs-admin-command>-fs NAMENODE -setQuota 10 /dir2 </dfs-admin-command>
  7617. <dfs-admin-command>-fs NAMENODE -setSpaceQuota 1m /dir2 </dfs-admin-command>
  7618. <dfs-admin-command>-fs NAMENODE -setQuota 10 /dir3 </dfs-admin-command>
  7619. <dfs-admin-command>-fs NAMENODE -setSpaceQuota 1m /dir3 </dfs-admin-command>
  7620. <dfs-admin-command>-fs NAMENODE -setQuota 10 /dir4 </dfs-admin-command>
  7621. <dfs-admin-command>-fs NAMENODE -setSpaceQuota 1m /dir4 </dfs-admin-command>
  7622. <command>-fs NAMENODE -count -q /dir1 /dir2 /dir3 /dir4 </command>
  7623. </test-commands>
  7624. <cleanup-commands>
  7625. <command>-fs NAMENODE -rm -r /dir*</command>
  7626. </cleanup-commands>
  7627. <comparators>
  7628. <comparator>
  7629. <type>RegexpComparator</type>
  7630. <expected-output>( |\t)*10( |\t)*9( |\t)*1048576( |\t)*1048576( |\t)*1( |\t)*0( |\t)*0 /dir1</expected-output>
  7631. </comparator>
  7632. <comparator>
  7633. <type>RegexpComparator</type>
  7634. <expected-output>( |\t)*10( |\t)*9( |\t)*1048576( |\t)*1048576( |\t)*1( |\t)*0( |\t)*0 /dir2</expected-output>
  7635. </comparator>
  7636. <comparator>
  7637. <type>RegexpComparator</type>
  7638. <expected-output>( |\t)*10( |\t)*9( |\t)*1048576( |\t)*1048576( |\t)*1( |\t)*0( |\t)*0 /dir3</expected-output>
  7639. </comparator>
  7640. <comparator>
  7641. <type>RegexpComparator</type>
  7642. <expected-output>( |\t)*10( |\t)*9( |\t)*1048576( |\t)*1048576( |\t)*1( |\t)*0( |\t)*0 /dir4</expected-output>
  7643. </comparator>
  7644. </comparators>
  7645. </test>
  7646. <test> <!-- TESTED -->
  7647. <description>count: relative path to multiple directories without globbing with -q option</description>
  7648. <test-commands>
  7649. <command>-fs NAMENODE -mkdir -p dir1</command>
  7650. <command>-fs NAMENODE -mkdir -p dir2</command>
  7651. <command>-fs NAMENODE -mkdir -p dir3</command>
  7652. <command>-fs NAMENODE -mkdir -p dir4</command>
  7653. <dfs-admin-command>-fs NAMENODE -setQuota 10 dir1 </dfs-admin-command>
  7654. <dfs-admin-command>-fs NAMENODE -setSpaceQuota 1m dir1 </dfs-admin-command>
  7655. <dfs-admin-command>-fs NAMENODE -setQuota 10 dir2 </dfs-admin-command>
  7656. <dfs-admin-command>-fs NAMENODE -setSpaceQuota 1m dir2 </dfs-admin-command>
  7657. <dfs-admin-command>-fs NAMENODE -setQuota 10 dir3 </dfs-admin-command>
  7658. <dfs-admin-command>-fs NAMENODE -setSpaceQuota 1m dir3 </dfs-admin-command>
  7659. <dfs-admin-command>-fs NAMENODE -setQuota 10 dir4 </dfs-admin-command>
  7660. <dfs-admin-command>-fs NAMENODE -setSpaceQuota 1m dir4 </dfs-admin-command>
  7661. <command>-fs NAMENODE -count -q dir1 dir2 dir3 dir4 </command>
  7662. </test-commands>
  7663. <cleanup-commands>
  7664. <command>-fs NAMENODE -rm -r /user</command>
  7665. </cleanup-commands>
  7666. <comparators>
  7667. <comparator>
  7668. <type>RegexpComparator</type>
  7669. <expected-output>( |\t)*10( |\t)*9( |\t)*1048576( |\t)*1048576( |\t)*1( |\t)*0( |\t)*0 dir1</expected-output>
  7670. </comparator>
  7671. <comparator>
  7672. <type>RegexpComparator</type>
  7673. <expected-output>( |\t)*10( |\t)*9( |\t)*1048576( |\t)*1048576( |\t)*1( |\t)*0( |\t)*0 dir2</expected-output>
  7674. </comparator>
  7675. <comparator>
  7676. <type>RegexpComparator</type>
  7677. <expected-output>( |\t)*10( |\t)*9( |\t)*1048576( |\t)*1048576( |\t)*1( |\t)*0( |\t)*0 dir3</expected-output>
  7678. </comparator>
  7679. <comparator>
  7680. <type>RegexpComparator</type>
  7681. <expected-output>( |\t)*10( |\t)*9( |\t)*1048576( |\t)*1048576( |\t)*1( |\t)*0( |\t)*0 dir4</expected-output>
  7682. </comparator>
  7683. </comparators>
  7684. </test>
  7685. <test> <!-- TESTED -->
  7686. <description>count: Test for file using hdfs:// path</description>
  7687. <test-commands>
  7688. <command>-fs NAMENODE -touchz hdfs:///file1</command>
  7689. <command>-fs NAMENODE -count hdfs:///file1</command>
  7690. </test-commands>
  7691. <cleanup-commands>
  7692. <command>-fs NAMENODE -rm hdfs:///file1</command>
  7693. </cleanup-commands>
  7694. <comparators>
  7695. <comparator>
  7696. <type>RegexpComparator</type>
  7697. <expected-output>( |\t)*0( |\t)*1( |\t)*0 hdfs:///file1</expected-output>
  7698. </comparator>
  7699. </comparators>
  7700. </test>
  7701. <test> <!-- TESTED -->
  7702. <description>count: Test for directory using hdfs:// path</description>
  7703. <test-commands>
  7704. <command>-fs NAMENODE -mkdir hdfs:///dir1</command>
  7705. <command>-fs NAMENODE -count hdfs:///dir1</command>
  7706. </test-commands>
  7707. <cleanup-commands>
  7708. <command>-fs NAMENODE -rm -r hdfs:///dir1</command>
  7709. </cleanup-commands>
  7710. <comparators>
  7711. <comparator>
  7712. <type>RegexpComparator</type>
  7713. <expected-output>( |\t)*1( |\t)*0( |\t)*0 hdfs:///dir1</expected-output>
  7714. </comparator>
  7715. </comparators>
  7716. </test>
  7717. <test> <!-- TESTED -->
  7718. <description>count: Test for hdfs:// path - file/directory that does not exist</description>
  7719. <test-commands>
  7720. <command>-fs NAMENODE -count hdfs:///file1 </command>
  7721. </test-commands>
  7722. <cleanup-commands>
  7723. </cleanup-commands>
  7724. <comparators>
  7725. <comparator>
  7726. <type>TokenComparator</type>
  7727. <expected-output>count: `hdfs:///file1': No such file or directory</expected-output>
  7728. </comparator>
  7729. </comparators>
  7730. </test>
  7731. <test> <!-- TESTED -->
  7732. <description>count: Test for hdfs:// path - multiple files using globbing</description>
  7733. <test-commands>
  7734. <command>-fs NAMENODE -touchz hdfs:///file1</command>
  7735. <command>-fs NAMENODE -touchz hdfs:///file2</command>
  7736. <command>-fs NAMENODE -touchz hdfs:///file3</command>
  7737. <command>-fs NAMENODE -touchz hdfs:///file4</command>
  7738. <command>-fs NAMENODE -count hdfs:///file*</command>
  7739. </test-commands>
  7740. <cleanup-commands>
  7741. <command>-fs NAMENODE -rm -r hdfs:///file*</command>
  7742. </cleanup-commands>
  7743. <comparators>
  7744. <comparator>
  7745. <type>RegexpComparator</type>
  7746. <expected-output>( |\t)*0( |\t)*1( |\t)*0 hdfs:///file1</expected-output>
  7747. </comparator>
  7748. <comparator>
  7749. <type>RegexpComparator</type>
  7750. <expected-output>( |\t)*0( |\t)*1( |\t)*0 hdfs:///file2</expected-output>
  7751. </comparator>
  7752. <comparator>
  7753. <type>RegexpComparator</type>
  7754. <expected-output>( |\t)*0( |\t)*1( |\t)*0 hdfs:///file3</expected-output>
  7755. </comparator>
  7756. <comparator>
  7757. <type>RegexpComparator</type>
  7758. <expected-output>( |\t)*0( |\t)*1( |\t)*0 hdfs:///file4</expected-output>
  7759. </comparator>
  7760. </comparators>
  7761. </test>
  7762. <test> <!-- TESTED -->
  7763. <description>count: Test for hdfs:// path - multiple files without globbing</description>
  7764. <test-commands>
  7765. <command>-fs NAMENODE -touchz hdfs:///file1</command>
  7766. <command>-fs NAMENODE -touchz hdfs:///file2</command>
  7767. <command>-fs NAMENODE -touchz hdfs:///file3</command>
  7768. <command>-fs NAMENODE -touchz hdfs:///file4</command>
  7769. <command>-fs NAMENODE -count hdfs:///file1 hdfs:///file2 hdfs:///file3 hdfs:///file4</command>
  7770. </test-commands>
  7771. <cleanup-commands>
  7772. <command>-fs NAMENODE -rm -r hdfs:///file*</command>
  7773. </cleanup-commands>
  7774. <comparators>
  7775. <comparator>
  7776. <type>RegexpComparator</type>
  7777. <expected-output>( |\t)*0( |\t)*1( |\t)*0 hdfs:///file1</expected-output>
  7778. </comparator>
  7779. <comparator>
  7780. <type>RegexpComparator</type>
  7781. <expected-output>( |\t)*0( |\t)*1( |\t)*0 hdfs:///file2</expected-output>
  7782. </comparator>
  7783. <comparator>
  7784. <type>RegexpComparator</type>
  7785. <expected-output>( |\t)*0( |\t)*1( |\t)*0 hdfs:///file3</expected-output>
  7786. </comparator>
  7787. <comparator>
  7788. <type>RegexpComparator</type>
  7789. <expected-output>( |\t)*0( |\t)*1( |\t)*0 hdfs:///file4</expected-output>
  7790. </comparator>
  7791. </comparators>
  7792. </test>
  7793. <test> <!-- TESTED -->
  7794. <description>count: Test for hdfs:// path - multiple directories using globbing</description>
  7795. <test-commands>
  7796. <command>-fs NAMENODE -mkdir hdfs:///dir1</command>
  7797. <command>-fs NAMENODE -mkdir hdfs:///dir2</command>
  7798. <command>-fs NAMENODE -mkdir hdfs:///dir3</command>
  7799. <command>-fs NAMENODE -mkdir hdfs:///dir4</command>
  7800. <command>-fs NAMENODE -count hdfs:///dir* </command>
  7801. </test-commands>
  7802. <cleanup-commands>
  7803. <command>-fs NAMENODE -rm -r hdfs:///dir*</command>
  7804. </cleanup-commands>
  7805. <comparators>
  7806. <comparator>
  7807. <type>RegexpComparator</type>
  7808. <expected-output>( |\t)*1( |\t)*0( |\t)*0 hdfs:///dir1</expected-output>
  7809. </comparator>
  7810. <comparator>
  7811. <type>RegexpComparator</type>
  7812. <expected-output>( |\t)*1( |\t)*0( |\t)*0 hdfs:///dir2</expected-output>
  7813. </comparator>
  7814. <comparator>
  7815. <type>RegexpComparator</type>
  7816. <expected-output>( |\t)*1( |\t)*0( |\t)*0 hdfs:///dir3</expected-output>
  7817. </comparator>
  7818. <comparator>
  7819. <type>RegexpComparator</type>
  7820. <expected-output>( |\t)*1( |\t)*0( |\t)*0 hdfs:///dir4</expected-output>
  7821. </comparator>
  7822. </comparators>
  7823. </test>
  7824. <test> <!-- TESTED -->
  7825. <description>count: Test for hdfs:// path - multiple directories without globbing</description>
  7826. <test-commands>
  7827. <command>-fs NAMENODE -mkdir hdfs:///dir1</command>
  7828. <command>-fs NAMENODE -mkdir hdfs:///dir2</command>
  7829. <command>-fs NAMENODE -mkdir hdfs:///dir3</command>
  7830. <command>-fs NAMENODE -mkdir hdfs:///dir4</command>
  7831. <command>-fs NAMENODE -count hdfs:///dir1 hdfs:///dir2 hdfs:///dir3 hdfs:///dir4 </command>
  7832. </test-commands>
  7833. <cleanup-commands>
  7834. <command>-fs NAMENODE -rm -r hdfs:///dir*</command>
  7835. </cleanup-commands>
  7836. <comparators>
  7837. <comparator>
  7838. <type>RegexpComparator</type>
  7839. <expected-output>( |\t)*1( |\t)*0( |\t)*0 hdfs:///dir1</expected-output>
  7840. </comparator>
  7841. <comparator>
  7842. <type>RegexpComparator</type>
  7843. <expected-output>( |\t)*1( |\t)*0( |\t)*0 hdfs:///dir2</expected-output>
  7844. </comparator>
  7845. <comparator>
  7846. <type>RegexpComparator</type>
  7847. <expected-output>( |\t)*1( |\t)*0( |\t)*0 hdfs:///dir3</expected-output>
  7848. </comparator>
  7849. <comparator>
  7850. <type>RegexpComparator</type>
  7851. <expected-output>( |\t)*1( |\t)*0( |\t)*0 hdfs:///dir4</expected-output>
  7852. </comparator>
  7853. </comparators>
  7854. </test>
  7855. <test> <!-- TESTED -->
  7856. <description>count: Test for file using hdfs:// path with -q option</description>
  7857. <test-commands>
  7858. <command>-fs NAMENODE -touchz hdfs:///file1</command>
  7859. <command>-fs NAMENODE -count -q hdfs:///file1</command>
  7860. </test-commands>
  7861. <cleanup-commands>
  7862. <command>-fs NAMENODE -rm hdfs:///file1</command>
  7863. </cleanup-commands>
  7864. <comparators>
  7865. <comparator>
  7866. <type>RegexpComparator</type>
  7867. <expected-output>( |\t)*none( |\t)*inf( |\t)*none( |\t)*inf( |\t)*0( |\t)*1( |\t)*0 hdfs:///file1</expected-output>
  7868. </comparator>
  7869. </comparators>
  7870. </test>
  7871. <test> <!-- TESTED -->
  7872. <description>count: Test for directory using hdfs:// path with -q option</description>
  7873. <test-commands>
  7874. <command>-fs NAMENODE -mkdir hdfs:///dir1</command>
  7875. <dfs-admin-command>-fs NAMENODE -setQuota 10 hdfs:///dir1 </dfs-admin-command>
  7876. <dfs-admin-command>-fs NAMENODE -setSpaceQuota 1m hdfs:///dir1 </dfs-admin-command>
  7877. <command>-fs NAMENODE -count -q hdfs:///dir1</command>
  7878. </test-commands>
  7879. <cleanup-commands>
  7880. <command>-fs NAMENODE -rm -r hdfs:///dir1</command>
  7881. </cleanup-commands>
  7882. <comparators>
  7883. <comparator>
  7884. <type>RegexpComparator</type>
  7885. <expected-output>( |\t)*10( |\t)*9( |\t)*1048576( |\t)*1048576( |\t)*1( |\t)*0( |\t)*0 hdfs:///dir1</expected-output>
  7886. </comparator>
  7887. </comparators>
  7888. </test>
  7889. <test> <!-- TESTED -->
  7890. <description>count: Test for hdfs:// path - file/directory that does not exist with -q option</description>
  7891. <test-commands>
  7892. <command>-fs NAMENODE -count -q hdfs:///file1 </command>
  7893. </test-commands>
  7894. <cleanup-commands>
  7895. </cleanup-commands>
  7896. <comparators>
  7897. <comparator>
  7898. <type>TokenComparator</type>
  7899. <expected-output>count: `hdfs:///file1': No such file or directory</expected-output>
  7900. </comparator>
  7901. </comparators>
  7902. </test>
  7903. <test> <!-- TESTED -->
  7904. <description>count: Test for hdfs:// path - multiple files using globbing with -q option</description>
  7905. <test-commands>
  7906. <command>-fs NAMENODE -touchz hdfs:///file1</command>
  7907. <command>-fs NAMENODE -touchz hdfs:///file2</command>
  7908. <command>-fs NAMENODE -touchz hdfs:///file3</command>
  7909. <command>-fs NAMENODE -touchz hdfs:///file4</command>
  7910. <command>-fs NAMENODE -count -q hdfs:///file*</command>
  7911. </test-commands>
  7912. <cleanup-commands>
  7913. <command>-fs NAMENODE -rm -r hdfs:///file*</command>
  7914. </cleanup-commands>
  7915. <comparators>
  7916. <comparator>
  7917. <type>RegexpComparator</type>
  7918. <expected-output>( |\t)*none( |\t)*inf( |\t)*none( |\t)*inf( |\t)*0( |\t)*1( |\t)*0 hdfs:///file1</expected-output>
  7919. </comparator>
  7920. <comparator>
  7921. <type>RegexpComparator</type>
  7922. <expected-output>( |\t)*none( |\t)*inf( |\t)*none( |\t)*inf( |\t)*0( |\t)*1( |\t)*0 hdfs:///file2</expected-output>
  7923. </comparator>
  7924. <comparator>
  7925. <type>RegexpComparator</type>
  7926. <expected-output>( |\t)*none( |\t)*inf( |\t)*none( |\t)*inf( |\t)*0( |\t)*1( |\t)*0 hdfs:///file3</expected-output>
  7927. </comparator>
  7928. <comparator>
  7929. <type>RegexpComparator</type>
  7930. <expected-output>( |\t)*none( |\t)*inf( |\t)*none( |\t)*inf( |\t)*0( |\t)*1( |\t)*0 hdfs:///file4</expected-output>
  7931. </comparator>
  7932. </comparators>
  7933. </test>
  7934. <test> <!-- TESTED -->
  7935. <description>count: Test for hdfs:// path - multiple files without globbing with -q option</description>
  7936. <test-commands>
  7937. <command>-fs NAMENODE -touchz hdfs:///file1</command>
  7938. <command>-fs NAMENODE -touchz hdfs:///file2</command>
  7939. <command>-fs NAMENODE -touchz hdfs:///file3</command>
  7940. <command>-fs NAMENODE -touchz hdfs:///file4</command>
  7941. <command>-fs NAMENODE -count -q hdfs:///file1 hdfs:///file2 hdfs:///file3 hdfs:///file4</command>
  7942. </test-commands>
  7943. <cleanup-commands>
  7944. <command>-fs NAMENODE -rm -r hdfs:///file*</command>
  7945. </cleanup-commands>
  7946. <comparators>
  7947. <comparator>
  7948. <type>RegexpComparator</type>
  7949. <expected-output>( |\t)*none( |\t)*inf( |\t)*none( |\t)*inf( |\t)*0( |\t)*1( |\t)*0 hdfs:///file1</expected-output>
  7950. </comparator>
  7951. <comparator>
  7952. <type>RegexpComparator</type>
  7953. <expected-output>( |\t)*none( |\t)*inf( |\t)*none( |\t)*inf( |\t)*0( |\t)*1( |\t)*0 hdfs:///file2</expected-output>
  7954. </comparator>
  7955. <comparator>
  7956. <type>RegexpComparator</type>
  7957. <expected-output>( |\t)*none( |\t)*inf( |\t)*none( |\t)*inf( |\t)*0( |\t)*1( |\t)*0 hdfs:///file3</expected-output>
  7958. </comparator>
  7959. <comparator>
  7960. <type>RegexpComparator</type>
  7961. <expected-output>( |\t)*none( |\t)*inf( |\t)*none( |\t)*inf( |\t)*0( |\t)*1( |\t)*0 hdfs:///file4</expected-output>
  7962. </comparator>
  7963. </comparators>
  7964. </test>
  7965. <test> <!-- TESTED -->
  7966. <description>count: Test for hdfs:// path - multiple directories using globbing with -q option</description>
  7967. <test-commands>
  7968. <command>-fs NAMENODE -mkdir hdfs:///dir1</command>
  7969. <command>-fs NAMENODE -mkdir hdfs:///dir2</command>
  7970. <command>-fs NAMENODE -mkdir hdfs:///dir3</command>
  7971. <command>-fs NAMENODE -mkdir hdfs:///dir4</command>
  7972. <dfs-admin-command>-fs NAMENODE -setQuota 10 hdfs:///dir1 </dfs-admin-command>
  7973. <dfs-admin-command>-fs NAMENODE -setSpaceQuota 1m hdfs:///dir1 </dfs-admin-command>
  7974. <dfs-admin-command>-fs NAMENODE -setQuota 10 hdfs:///dir2 </dfs-admin-command>
  7975. <dfs-admin-command>-fs NAMENODE -setSpaceQuota 1m hdfs:///dir2 </dfs-admin-command>
  7976. <dfs-admin-command>-fs NAMENODE -setQuota 10 hdfs:///dir3 </dfs-admin-command>
  7977. <dfs-admin-command>-fs NAMENODE -setSpaceQuota 1m hdfs:///dir3 </dfs-admin-command>
  7978. <dfs-admin-command>-fs NAMENODE -setQuota 10 hdfs:///dir4 </dfs-admin-command>
  7979. <dfs-admin-command>-fs NAMENODE -setSpaceQuota 1m hdfs:///dir4 </dfs-admin-command>
  7980. <command>-fs NAMENODE -count -q hdfs:///dir* </command>
  7981. </test-commands>
  7982. <cleanup-commands>
  7983. <command>-fs NAMENODE -rm -r hdfs:///dir*</command>
  7984. </cleanup-commands>
  7985. <comparators>
  7986. <comparator>
  7987. <type>RegexpComparator</type>
  7988. <expected-output>( |\t)*10( |\t)*9( |\t)*1048576( |\t)*1048576( |\t)*1( |\t)*0( |\t)*0 hdfs:///dir1</expected-output>
  7989. </comparator>
  7990. <comparator>
  7991. <type>RegexpComparator</type>
  7992. <expected-output>( |\t)*10( |\t)*9( |\t)*1048576( |\t)*1048576( |\t)*1( |\t)*0( |\t)*0 hdfs:///dir2</expected-output>
  7993. </comparator>
  7994. <comparator>
  7995. <type>RegexpComparator</type>
  7996. <expected-output>( |\t)*10( |\t)*9( |\t)*1048576( |\t)*1048576( |\t)*1( |\t)*0( |\t)*0 hdfs:///dir3</expected-output>
  7997. </comparator>
  7998. <comparator>
  7999. <type>RegexpComparator</type>
  8000. <expected-output>( |\t)*10( |\t)*9( |\t)*1048576( |\t)*1048576( |\t)*1( |\t)*0( |\t)*0 hdfs:///dir4</expected-output>
  8001. </comparator>
  8002. </comparators>
  8003. </test>
  8004. <test> <!-- TESTED -->
  8005. <description>count: Test for hdfs:// path - multiple directories without globbing with -q option</description>
  8006. <test-commands>
  8007. <command>-fs NAMENODE -mkdir hdfs:///dir1</command>
  8008. <command>-fs NAMENODE -mkdir hdfs:///dir2</command>
  8009. <command>-fs NAMENODE -mkdir hdfs:///dir3</command>
  8010. <command>-fs NAMENODE -mkdir hdfs:///dir4</command>
  8011. <dfs-admin-command>-fs NAMENODE -setQuota 10 hdfs:///dir1 </dfs-admin-command>
  8012. <dfs-admin-command>-fs NAMENODE -setSpaceQuota 1m hdfs:///dir1 </dfs-admin-command>
  8013. <dfs-admin-command>-fs NAMENODE -setQuota 10 hdfs:///dir2 </dfs-admin-command>
  8014. <dfs-admin-command>-fs NAMENODE -setSpaceQuota 1m hdfs:///dir2 </dfs-admin-command>
  8015. <dfs-admin-command>-fs NAMENODE -setQuota 10 hdfs:///dir3 </dfs-admin-command>
  8016. <dfs-admin-command>-fs NAMENODE -setSpaceQuota 1m hdfs:///dir3 </dfs-admin-command>
  8017. <dfs-admin-command>-fs NAMENODE -setQuota 10 hdfs:///dir4 </dfs-admin-command>
  8018. <dfs-admin-command>-fs NAMENODE -setSpaceQuota 1m hdfs:///dir4 </dfs-admin-command>
  8019. <command>-fs NAMENODE -count -q hdfs:///dir1 hdfs:///dir2 hdfs:///dir3 hdfs:///dir4 </command>
  8020. </test-commands>
  8021. <cleanup-commands>
  8022. <command>-fs NAMENODE -rm -r /dir*</command>
  8023. </cleanup-commands>
  8024. <comparators>
  8025. <comparator>
  8026. <type>RegexpComparator</type>
  8027. <expected-output>( |\t)*10( |\t)*9( |\t)*1048576( |\t)*1048576( |\t)*1( |\t)*0( |\t)*0 hdfs:///dir1</expected-output>
  8028. </comparator>
  8029. <comparator>
  8030. <type>RegexpComparator</type>
  8031. <expected-output>( |\t)*10( |\t)*9( |\t)*1048576( |\t)*1048576( |\t)*1( |\t)*0( |\t)*0 hdfs:///dir2</expected-output>
  8032. </comparator>
  8033. <comparator>
  8034. <type>RegexpComparator</type>
  8035. <expected-output>( |\t)*10( |\t)*9( |\t)*1048576( |\t)*1048576( |\t)*1( |\t)*0( |\t)*0 hdfs:///dir3</expected-output>
  8036. </comparator>
  8037. <comparator>
  8038. <type>RegexpComparator</type>
  8039. <expected-output>( |\t)*10( |\t)*9( |\t)*1048576( |\t)*1048576( |\t)*1( |\t)*0( |\t)*0 hdfs:///dir4</expected-output>
  8040. </comparator>
  8041. </comparators>
  8042. </test>
  8043. <test> <!-- TESTED -->
  8044. <description>count: Test for file using Namenode's path</description>
  8045. <test-commands>
  8046. <command>-fs NAMENODE -touchz NAMENODE/file1</command>
  8047. <command>-fs NAMENODE -count NAMENODE/file1</command>
  8048. </test-commands>
  8049. <cleanup-commands>
  8050. <command>-fs NAMENODE -rm NAMENODE/file1</command>
  8051. </cleanup-commands>
  8052. <comparators>
  8053. <comparator>
  8054. <type>RegexpComparator</type>
  8055. <expected-output>( |\t)*0( |\t)*1( |\t)*0 NAMENODE/file1</expected-output>
  8056. </comparator>
  8057. </comparators>
  8058. </test>
  8059. <test> <!-- TESTED -->
  8060. <description>count: Test for directory using Namenode's path</description>
  8061. <test-commands>
  8062. <command>-fs NAMENODE -mkdir NAMENODE/dir1</command>
  8063. <command>-fs NAMENODE -count NAMENODE/dir1</command>
  8064. </test-commands>
  8065. <cleanup-commands>
  8066. <command>-fs NAMENODE -rm -r NAMENODE/dir1</command>
  8067. </cleanup-commands>
  8068. <comparators>
  8069. <comparator>
  8070. <type>RegexpComparator</type>
  8071. <expected-output>( |\t)*1( |\t)*0( |\t)*0 NAMENODE/dir1</expected-output>
  8072. </comparator>
  8073. </comparators>
  8074. </test>
  8075. <test> <!-- TESTED -->
  8076. <description>count: Test for Namenode's path - file/directory that does not exist</description>
  8077. <test-commands>
  8078. <command>-fs NAMENODE -count NAMENODE/file1 </command>
  8079. </test-commands>
  8080. <cleanup-commands>
  8081. </cleanup-commands>
  8082. <comparators>
  8083. <comparator>
  8084. <type>RegexpComparator</type>
  8085. <expected-output>count: `NAMENODE/file1': No such file or directory</expected-output>
  8086. </comparator>
  8087. </comparators>
  8088. </test>
  8089. <test> <!-- TESTED -->
  8090. <description>count: Test for Namenode's path - multiple files using globbing</description>
  8091. <test-commands>
  8092. <command>-fs NAMENODE -touchz NAMENODE/file1</command>
  8093. <command>-fs NAMENODE -touchz NAMENODE/file2</command>
  8094. <command>-fs NAMENODE -touchz NAMENODE/file3</command>
  8095. <command>-fs NAMENODE -touchz NAMENODE/file4</command>
  8096. <command>-fs NAMENODE -count NAMENODE/file*</command>
  8097. </test-commands>
  8098. <cleanup-commands>
  8099. <command>-fs NAMENODE -rm -r NAMENODE/file*</command>
  8100. </cleanup-commands>
  8101. <comparators>
  8102. <comparator>
  8103. <type>RegexpComparator</type>
  8104. <expected-output>( |\t)*0( |\t)*1( |\t)*0 NAMENODE/file1</expected-output>
  8105. </comparator>
  8106. <comparator>
  8107. <type>RegexpComparator</type>
  8108. <expected-output>( |\t)*0( |\t)*1( |\t)*0 NAMENODE/file2</expected-output>
  8109. </comparator>
  8110. <comparator>
  8111. <type>RegexpComparator</type>
  8112. <expected-output>( |\t)*0( |\t)*1( |\t)*0 NAMENODE/file3</expected-output>
  8113. </comparator>
  8114. <comparator>
  8115. <type>RegexpComparator</type>
  8116. <expected-output>( |\t)*0( |\t)*1( |\t)*0 NAMENODE/file4</expected-output>
  8117. </comparator>
  8118. </comparators>
  8119. </test>
  8120. <test> <!-- TESTED -->
  8121. <description>count: Test for Namenode's path - multiple files without globbing</description>
  8122. <test-commands>
  8123. <command>-fs NAMENODE -touchz NAMENODE/file1</command>
  8124. <command>-fs NAMENODE -touchz NAMENODE/file2</command>
  8125. <command>-fs NAMENODE -touchz NAMENODE/file3</command>
  8126. <command>-fs NAMENODE -touchz NAMENODE/file4</command>
  8127. <command>-fs NAMENODE -count NAMENODE/file1 NAMENODE/file2 NAMENODE/file3 NAMENODE/file4</command>
  8128. </test-commands>
  8129. <cleanup-commands>
  8130. <command>-fs NAMENODE -rm -r NAMENODE/file*</command>
  8131. </cleanup-commands>
  8132. <comparators>
  8133. <comparator>
  8134. <type>RegexpComparator</type>
  8135. <expected-output>( |\t)*0( |\t)*1( |\t)*0 NAMENODE/file1</expected-output>
  8136. </comparator>
  8137. <comparator>
  8138. <type>RegexpComparator</type>
  8139. <expected-output>( |\t)*0( |\t)*1( |\t)*0 NAMENODE/file2</expected-output>
  8140. </comparator>
  8141. <comparator>
  8142. <type>RegexpComparator</type>
  8143. <expected-output>( |\t)*0( |\t)*1( |\t)*0 NAMENODE/file3</expected-output>
  8144. </comparator>
  8145. <comparator>
  8146. <type>RegexpComparator</type>
  8147. <expected-output>( |\t)*0( |\t)*1( |\t)*0 NAMENODE/file4</expected-output>
  8148. </comparator>
  8149. </comparators>
  8150. </test>
  8151. <test> <!-- TESTED -->
  8152. <description>count: Test for Namenode's path - multiple directories using globbing</description>
  8153. <test-commands>
  8154. <command>-fs NAMENODE -mkdir NAMENODE/dir1</command>
  8155. <command>-fs NAMENODE -mkdir NAMENODE/dir2</command>
  8156. <command>-fs NAMENODE -mkdir NAMENODE/dir3</command>
  8157. <command>-fs NAMENODE -mkdir NAMENODE/dir4</command>
  8158. <command>-fs NAMENODE -count NAMENODE/dir* </command>
  8159. </test-commands>
  8160. <cleanup-commands>
  8161. <command>-fs NAMENODE -rm -r NAMENODE/dir*</command>
  8162. </cleanup-commands>
  8163. <comparators>
  8164. <comparator>
  8165. <type>RegexpComparator</type>
  8166. <expected-output>( |\t)*1( |\t)*0( |\t)*0 NAMENODE/dir1</expected-output>
  8167. </comparator>
  8168. <comparator>
  8169. <type>RegexpComparator</type>
  8170. <expected-output>( |\t)*1( |\t)*0( |\t)*0 NAMENODE/dir2</expected-output>
  8171. </comparator>
  8172. <comparator>
  8173. <type>RegexpComparator</type>
  8174. <expected-output>( |\t)*1( |\t)*0( |\t)*0 NAMENODE/dir3</expected-output>
  8175. </comparator>
  8176. <comparator>
  8177. <type>RegexpComparator</type>
  8178. <expected-output>( |\t)*1( |\t)*0( |\t)*0 NAMENODE/dir4</expected-output>
  8179. </comparator>
  8180. </comparators>
  8181. </test>
  8182. <test> <!-- TESTED -->
  8183. <description>count: Test for Namenode's path - multiple directories without globbing</description>
  8184. <test-commands>
  8185. <command>-fs NAMENODE -mkdir NAMENODE/dir1</command>
  8186. <command>-fs NAMENODE -mkdir NAMENODE/dir2</command>
  8187. <command>-fs NAMENODE -mkdir NAMENODE/dir3</command>
  8188. <command>-fs NAMENODE -mkdir NAMENODE/dir4</command>
  8189. <command>-fs NAMENODE -count NAMENODE/dir1 NAMENODE/dir2 NAMENODE/dir3 NAMENODE/dir4 </command>
  8190. </test-commands>
  8191. <cleanup-commands>
  8192. <command>-fs NAMENODE -rm -r NAMENODE/dir*</command>
  8193. </cleanup-commands>
  8194. <comparators>
  8195. <comparator>
  8196. <type>RegexpComparator</type>
  8197. <expected-output>( |\t)*1( |\t)*0( |\t)*0 NAMENODE/dir1</expected-output>
  8198. </comparator>
  8199. <comparator>
  8200. <type>RegexpComparator</type>
  8201. <expected-output>( |\t)*1( |\t)*0( |\t)*0 NAMENODE/dir2</expected-output>
  8202. </comparator>
  8203. <comparator>
  8204. <type>RegexpComparator</type>
  8205. <expected-output>( |\t)*1( |\t)*0( |\t)*0 NAMENODE/dir3</expected-output>
  8206. </comparator>
  8207. <comparator>
  8208. <type>RegexpComparator</type>
  8209. <expected-output>( |\t)*1( |\t)*0( |\t)*0 NAMENODE/dir4</expected-output>
  8210. </comparator>
  8211. </comparators>
  8212. </test>
  8213. <test> <!-- TESTED -->
  8214. <description>count: Test for file using Namenode's path with -q option</description>
  8215. <test-commands>
  8216. <command>-fs NAMENODE -touchz NAMENODE/file1</command>
  8217. <command>-fs NAMENODE -count -q NAMENODE/file1</command>
  8218. </test-commands>
  8219. <cleanup-commands>
  8220. <command>-fs NAMENODE -rm NAMENODE/file1</command>
  8221. </cleanup-commands>
  8222. <comparators>
  8223. <comparator>
  8224. <type>RegexpComparator</type>
  8225. <expected-output>( |\t)*none( |\t)*inf( |\t)*none( |\t)*inf( |\t)*0( |\t)*1( |\t)*0 NAMENODE/file1</expected-output>
  8226. </comparator>
  8227. </comparators>
  8228. </test>
  8229. <test> <!-- TESTED -->
  8230. <description>count: Test for directory using Namenode's path with -q option</description>
  8231. <test-commands>
  8232. <command>-fs NAMENODE -mkdir NAMENODE/dir1</command>
  8233. <dfs-admin-command>-fs NAMENODE -setQuota 10 NAMENODE/dir1 </dfs-admin-command>
  8234. <dfs-admin-command>-fs NAMENODE -setSpaceQuota 1m NAMENODE/dir1 </dfs-admin-command>
  8235. <command>-fs NAMENODE -count -q NAMENODE/dir1</command>
  8236. </test-commands>
  8237. <cleanup-commands>
  8238. <command>-fs NAMENODE -rm -r NAMENODE/dir1</command>
  8239. </cleanup-commands>
  8240. <comparators>
  8241. <comparator>
  8242. <type>RegexpComparator</type>
  8243. <expected-output>( |\t)*10( |\t)*9( |\t)*1048576( |\t)*1048576( |\t)*1( |\t)*0( |\t)*0 NAMENODE/dir1</expected-output>
  8244. </comparator>
  8245. </comparators>
  8246. </test>
  8247. <test> <!-- TESTED -->
  8248. <description>count: Test for Namenode's path - file/directory that does not exist with -q option</description>
  8249. <test-commands>
  8250. <command>-fs NAMENODE -count -q NAMENODE/file1 </command>
  8251. </test-commands>
  8252. <cleanup-commands>
  8253. </cleanup-commands>
  8254. <comparators>
  8255. <comparator>
  8256. <type>RegexpComparator</type>
  8257. <expected-output>count: `NAMENODE/file1': No such file or directory</expected-output>
  8258. </comparator>
  8259. </comparators>
  8260. </test>
  8261. <test> <!-- TESTED -->
  8262. <description>count: Test for Namenode's path - multiple files using globbing with -q option</description>
  8263. <test-commands>
  8264. <command>-fs NAMENODE -touchz NAMENODE/file1</command>
  8265. <command>-fs NAMENODE -touchz NAMENODE/file2</command>
  8266. <command>-fs NAMENODE -touchz NAMENODE/file3</command>
  8267. <command>-fs NAMENODE -touchz NAMENODE/file4</command>
  8268. <command>-fs NAMENODE -count -q NAMENODE/file*</command>
  8269. </test-commands>
  8270. <cleanup-commands>
  8271. <command>-fs NAMENODE -rm -r NAMENODE/file*</command>
  8272. </cleanup-commands>
  8273. <comparators>
  8274. <comparator>
  8275. <type>RegexpComparator</type>
  8276. <expected-output>( |\t)*none( |\t)*inf( |\t)*none( |\t)*inf( |\t)*0( |\t)*1( |\t)*0 NAMENODE/file1</expected-output>
  8277. </comparator>
  8278. <comparator>
  8279. <type>RegexpComparator</type>
  8280. <expected-output>( |\t)*none( |\t)*inf( |\t)*none( |\t)*inf( |\t)*0( |\t)*1( |\t)*0 NAMENODE/file2</expected-output>
  8281. </comparator>
  8282. <comparator>
  8283. <type>RegexpComparator</type>
  8284. <expected-output>( |\t)*none( |\t)*inf( |\t)*none( |\t)*inf( |\t)*0( |\t)*1( |\t)*0 NAMENODE/file3</expected-output>
  8285. </comparator>
  8286. <comparator>
  8287. <type>RegexpComparator</type>
  8288. <expected-output>( |\t)*none( |\t)*inf( |\t)*none( |\t)*inf( |\t)*0( |\t)*1( |\t)*0 NAMENODE/file4</expected-output>
  8289. </comparator>
  8290. </comparators>
  8291. </test>
  8292. <test> <!-- TESTED -->
  8293. <description>count: Test for Namenode's path - multiple files without globbing with -q option</description>
  8294. <test-commands>
  8295. <command>-fs NAMENODE -touchz NAMENODE/file1</command>
  8296. <command>-fs NAMENODE -touchz NAMENODE/file2</command>
  8297. <command>-fs NAMENODE -touchz NAMENODE/file3</command>
  8298. <command>-fs NAMENODE -touchz NAMENODE/file4</command>
  8299. <command>-fs NAMENODE -count -q NAMENODE/file1 NAMENODE/file2 NAMENODE/file3 NAMENODE/file4</command>
  8300. </test-commands>
  8301. <cleanup-commands>
  8302. <command>-fs NAMENODE -rm -r NAMENODE/file*</command>
  8303. </cleanup-commands>
  8304. <comparators>
  8305. <comparator>
  8306. <type>RegexpComparator</type>
  8307. <expected-output>( |\t)*none( |\t)*inf( |\t)*none( |\t)*inf( |\t)*0( |\t)*1( |\t)*0 NAMENODE/file1</expected-output>
  8308. </comparator>
  8309. <comparator>
  8310. <type>RegexpComparator</type>
  8311. <expected-output>( |\t)*none( |\t)*inf( |\t)*none( |\t)*inf( |\t)*0( |\t)*1( |\t)*0 NAMENODE/file2</expected-output>
  8312. </comparator>
  8313. <comparator>
  8314. <type>RegexpComparator</type>
  8315. <expected-output>( |\t)*none( |\t)*inf( |\t)*none( |\t)*inf( |\t)*0( |\t)*1( |\t)*0 NAMENODE/file3</expected-output>
  8316. </comparator>
  8317. <comparator>
  8318. <type>RegexpComparator</type>
  8319. <expected-output>( |\t)*none( |\t)*inf( |\t)*none( |\t)*inf( |\t)*0( |\t)*1( |\t)*0 NAMENODE/file4</expected-output>
  8320. </comparator>
  8321. </comparators>
  8322. </test>
  8323. <test> <!-- TESTED -->
  8324. <description>count: Test for Namenode's path - multiple directories using globbing with -q option</description>
  8325. <test-commands>
  8326. <command>-fs NAMENODE -mkdir NAMENODE/dir1</command>
  8327. <command>-fs NAMENODE -mkdir NAMENODE/dir2</command>
  8328. <command>-fs NAMENODE -mkdir NAMENODE/dir3</command>
  8329. <command>-fs NAMENODE -mkdir NAMENODE/dir4</command>
  8330. <dfs-admin-command>-fs NAMENODE -setQuota 10 NAMENODE/dir1 </dfs-admin-command>
  8331. <dfs-admin-command>-fs NAMENODE -setSpaceQuota 1m NAMENODE/dir1 </dfs-admin-command>
  8332. <dfs-admin-command>-fs NAMENODE -setQuota 10 NAMENODE/dir2 </dfs-admin-command>
  8333. <dfs-admin-command>-fs NAMENODE -setSpaceQuota 1m NAMENODE/dir2 </dfs-admin-command>
  8334. <dfs-admin-command>-fs NAMENODE -setQuota 10 NAMENODE/dir3 </dfs-admin-command>
  8335. <dfs-admin-command>-fs NAMENODE -setSpaceQuota 1m NAMENODE/dir3 </dfs-admin-command>
  8336. <dfs-admin-command>-fs NAMENODE -setQuota 10 NAMENODE/dir4 </dfs-admin-command>
  8337. <dfs-admin-command>-fs NAMENODE -setSpaceQuota 1m NAMENODE/dir4 </dfs-admin-command>
  8338. <command>-fs NAMENODE -count -q NAMENODE/dir* </command>
  8339. </test-commands>
  8340. <cleanup-commands>
  8341. <command>-fs NAMENODE -rm -r NAMENODE/dir*</command>
  8342. </cleanup-commands>
  8343. <comparators>
  8344. <comparator>
  8345. <type>RegexpComparator</type>
  8346. <expected-output>( |\t)*10( |\t)*9( |\t)*1048576( |\t)*1048576( |\t)*1( |\t)*0( |\t)*0 NAMENODE/dir1</expected-output>
  8347. </comparator>
  8348. <comparator>
  8349. <type>RegexpComparator</type>
  8350. <expected-output>( |\t)*10( |\t)*9( |\t)*1048576( |\t)*1048576( |\t)*1( |\t)*0( |\t)*0 NAMENODE/dir2</expected-output>
  8351. </comparator>
  8352. <comparator>
  8353. <type>RegexpComparator</type>
  8354. <expected-output>( |\t)*10( |\t)*9( |\t)*1048576( |\t)*1048576( |\t)*1( |\t)*0( |\t)*0 NAMENODE/dir3</expected-output>
  8355. </comparator>
  8356. <comparator>
  8357. <type>RegexpComparator</type>
  8358. <expected-output>( |\t)*10( |\t)*9( |\t)*1048576( |\t)*1048576( |\t)*1( |\t)*0( |\t)*0 NAMENODE/dir4</expected-output>
  8359. </comparator>
  8360. </comparators>
  8361. </test>
  8362. <test> <!-- TESTED -->
  8363. <description>count: Test for Namenode's path - multiple directories without globbing with -q option</description>
  8364. <test-commands>
  8365. <command>-fs NAMENODE -mkdir NAMENODE/dir1</command>
  8366. <command>-fs NAMENODE -mkdir NAMENODE/dir2</command>
  8367. <command>-fs NAMENODE -mkdir NAMENODE/dir3</command>
  8368. <command>-fs NAMENODE -mkdir NAMENODE/dir4</command>
  8369. <dfs-admin-command>-fs NAMENODE -setQuota 10 NAMENODE/dir1 </dfs-admin-command>
  8370. <dfs-admin-command>-fs NAMENODE -setSpaceQuota 1m NAMENODE/dir1 </dfs-admin-command>
  8371. <dfs-admin-command>-fs NAMENODE -setQuota 10 NAMENODE/dir2 </dfs-admin-command>
  8372. <dfs-admin-command>-fs NAMENODE -setSpaceQuota 1m NAMENODE/dir2 </dfs-admin-command>
  8373. <dfs-admin-command>-fs NAMENODE -setQuota 10 NAMENODE/dir3 </dfs-admin-command>
  8374. <dfs-admin-command>-fs NAMENODE -setSpaceQuota 1m NAMENODE/dir3 </dfs-admin-command>
  8375. <dfs-admin-command>-fs NAMENODE -setQuota 10 NAMENODE/dir4 </dfs-admin-command>
  8376. <dfs-admin-command>-fs NAMENODE -setSpaceQuota 1m NAMENODE/dir4 </dfs-admin-command>
  8377. <command>-fs NAMENODE -count -q NAMENODE/dir1 NAMENODE/dir2 NAMENODE/dir3 NAMENODE/dir4 </command>
  8378. </test-commands>
  8379. <cleanup-commands>
  8380. <command>-fs NAMENODE -rm -r NAMENODE/dir*</command>
  8381. </cleanup-commands>
  8382. <comparators>
  8383. <comparator>
  8384. <type>RegexpComparator</type>
  8385. <expected-output>( |\t)*10( |\t)*9( |\t)*1048576( |\t)*1048576( |\t)*1( |\t)*0( |\t)*0 NAMENODE/dir1</expected-output>
  8386. </comparator>
  8387. <comparator>
  8388. <type>RegexpComparator</type>
  8389. <expected-output>( |\t)*10( |\t)*9( |\t)*1048576( |\t)*1048576( |\t)*1( |\t)*0( |\t)*0 NAMENODE/dir2</expected-output>
  8390. </comparator>
  8391. <comparator>
  8392. <type>RegexpComparator</type>
  8393. <expected-output>( |\t)*10( |\t)*9( |\t)*1048576( |\t)*1048576( |\t)*1( |\t)*0( |\t)*0 NAMENODE/dir3</expected-output>
  8394. </comparator>
  8395. <comparator>
  8396. <type>RegexpComparator</type>
  8397. <expected-output>( |\t)*10( |\t)*9( |\t)*1048576( |\t)*1048576( |\t)*1( |\t)*0( |\t)*0 NAMENODE/dir4</expected-output>
  8398. </comparator>
  8399. </comparators>
  8400. </test>
  8401. <test> <!-- TESTED -->
  8402. <description>count: file using -h option</description>
  8403. <test-commands>
  8404. <command>-fs NAMENODE -mkdir -p dir</command> <!-- make sure user home dir exists -->
  8405. <command>-fs NAMENODE -put CLITEST_DATA/data15bytes file1</command>
  8406. <command>-fs NAMENODE -put CLITEST_DATA/data1k file2</command>
  8407. <command>-fs NAMENODE -count -h file1 file2</command>
  8408. </test-commands>
  8409. <cleanup-commands>
  8410. <command>-fs NAMENODE -rm file1 file2</command>
  8411. </cleanup-commands>
  8412. <comparators>
  8413. <comparator>
  8414. <type>RegexpComparator</type>
  8415. <expected-output>( |\t)*0( |\t)*1( |\t)*15 file1</expected-output>
  8416. </comparator>
  8417. </comparators>
  8418. <comparators>
  8419. <comparator>
  8420. <type>RegexpComparator</type>
  8421. <expected-output>( |\t)*0( |\t)*1( |\t)*1\.0 K file2</expected-output>
  8422. </comparator>
  8423. </comparators>
  8424. </test>
  8425. <test> <!-- TESTED -->
  8426. <description>count: directory using -q and -h options</description>
  8427. <test-commands>
  8428. <command>-fs NAMENODE -mkdir /dir1</command>
  8429. <dfs-admin-command>-fs NAMENODE -setQuota 10 /dir1 </dfs-admin-command>
  8430. <dfs-admin-command>-fs NAMENODE -setSpaceQuota 1m /dir1 </dfs-admin-command>
  8431. <command>-fs NAMENODE -count -q -h /dir1</command>
  8432. </test-commands>
  8433. <cleanup-commands>
  8434. <command>-fs NAMENODE -rm -r /dir1</command>
  8435. </cleanup-commands>
  8436. <comparators>
  8437. <comparator>
  8438. <type>RegexpComparator</type>
  8439. <expected-output>( |\t)*10( |\t)*9( |\t)*1 M( |\t)*1 M( |\t)*1( |\t)*0( |\t)*0 /dir1</expected-output>
  8440. </comparator>
  8441. </comparators>
  8442. </test>
  8443. <test> <!-- TESTED -->
  8444. <description>count: file using absolute path showing header record</description>
  8445. <test-commands>
  8446. <command>-fs NAMENODE -touchz /file1</command>
  8447. <command>-fs NAMENODE -count -v /file1</command>
  8448. </test-commands>
  8449. <cleanup-commands>
  8450. <command>-fs NAMENODE -rm /file1</command>
  8451. </cleanup-commands>
  8452. <comparators>
  8453. <comparator>
  8454. <type>RegexpComparator</type>
  8455. <expected-output>( |\t)*DIR_COUNT FILE_COUNT CONTENT_SIZE PATHNAME</expected-output>
  8456. </comparator>
  8457. <comparator>
  8458. <type>RegexpComparator</type>
  8459. <expected-output>( |\t)*0( |\t)*1( |\t)*0 /file1</expected-output>
  8460. </comparator>
  8461. </comparators>
  8462. </test>
  8463. <test> <!-- TESTED -->
  8464. <description>count: file using absolute path with -q option and showing header record</description>
  8465. <test-commands>
  8466. <command>-fs NAMENODE -touchz /file1</command>
  8467. <command>-fs NAMENODE -count -q -v /file1</command>
  8468. </test-commands>
  8469. <cleanup-commands>
  8470. <command>-fs NAMENODE -rm /file1</command>
  8471. </cleanup-commands>
  8472. <comparators>
  8473. <comparator>
  8474. <type>RegexpComparator</type>
  8475. <expected-output>( |\t)*QUOTA REM_QUOTA SPACE_QUOTA REM_SPACE_QUOTA DIR_COUNT FILE_COUNT CONTENT_SIZE PATHNAME</expected-output>
  8476. </comparator>
  8477. <comparator>
  8478. <type>RegexpComparator</type>
  8479. <expected-output>( |\t)*none( |\t)*inf( |\t)*none( |\t)*inf( |\t)*0( |\t)*1( |\t)*0 /file1</expected-output>
  8480. </comparator>
  8481. </comparators>
  8482. </test>
  8483. <!-- Tests for chmod -->
  8484. <test> <!-- TESTED -->
  8485. <description>chmod: change permission(octal mode) of file in absolute path</description>
  8486. <test-commands>
  8487. <command>-fs NAMENODE -touchz /file1</command>
  8488. <command>-fs NAMENODE -chmod 777 /file1</command>
  8489. <command>-fs NAMENODE -ls /file1</command>
  8490. </test-commands>
  8491. <cleanup-commands>
  8492. <command>-fs NAMENODE -rm /file1</command>
  8493. </cleanup-commands>
  8494. <comparators>
  8495. <comparator>
  8496. <type>RegexpComparator</type>
  8497. <expected-output>^-rwxrwxrwx( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/file1</expected-output>
  8498. </comparator>
  8499. </comparators>
  8500. </test>
  8501. <test> <!-- TESTED -->
  8502. <description>chmod: change permission(octal mode) of file in relative path</description>
  8503. <test-commands>
  8504. <command>-fs NAMENODE -mkdir -p dir</command> <!-- make sure user home dir exists -->
  8505. <command>-fs NAMENODE -touchz file1</command>
  8506. <command>-fs NAMENODE -chmod 666 file1</command>
  8507. <command>-fs NAMENODE -ls file1</command>
  8508. </test-commands>
  8509. <cleanup-commands>
  8510. <command>-fs NAMENODE -rm file1</command>
  8511. </cleanup-commands>
  8512. <comparators>
  8513. <comparator>
  8514. <type>RegexpComparator</type>
  8515. <expected-output>^-rw-rw-rw-( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*file1</expected-output>
  8516. </comparator>
  8517. </comparators>
  8518. </test>
  8519. <test> <!-- TESTED -->
  8520. <description>chmod: change permission(octal mode) of directory in absolute path</description>
  8521. <test-commands>
  8522. <command>-fs NAMENODE -mkdir /dir0</command>
  8523. <command>-fs NAMENODE -mkdir /dir0/dir1</command>
  8524. <command>-fs NAMENODE -touchz /dir0/file0</command>
  8525. <command>-fs NAMENODE -touchz /dir0/dir1/file1</command>
  8526. <command>-fs NAMENODE -touchz /dir0/dir1/file2</command>
  8527. <command>-fs NAMENODE -chmod 777 /dir0/dir1</command>
  8528. <command>-fs NAMENODE -ls -R /dir0</command>
  8529. </test-commands>
  8530. <cleanup-commands>
  8531. <command>-fs NAMENODE -rm -r /dir0</command>
  8532. </cleanup-commands>
  8533. <comparators>
  8534. <comparator>
  8535. <type>RegexpComparator</type>
  8536. <expected-output>^drwxrwxrwx( )*-( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1</expected-output>
  8537. </comparator>
  8538. <comparator>
  8539. <type>RegexpComparator</type>
  8540. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1/file1</expected-output>
  8541. </comparator>
  8542. <comparator>
  8543. <type>RegexpComparator</type>
  8544. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1/file2</expected-output>
  8545. </comparator>
  8546. <comparator>
  8547. <type>RegexpComparator</type>
  8548. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/file0</expected-output>
  8549. </comparator>
  8550. </comparators>
  8551. </test>
  8552. <test> <!-- TESTED -->
  8553. <description>chmod: change permission(octal mode) of directory in relative path</description>
  8554. <test-commands>
  8555. <command>-fs NAMENODE -mkdir -p dir0</command>
  8556. <command>-fs NAMENODE -mkdir -p dir0/dir1</command>
  8557. <command>-fs NAMENODE -touchz dir0/file0</command>
  8558. <command>-fs NAMENODE -touchz dir0/dir1/file1</command>
  8559. <command>-fs NAMENODE -touchz dir0/dir1/file2</command>
  8560. <command>-fs NAMENODE -chmod 777 dir0/dir1</command>
  8561. <command>-fs NAMENODE -ls -R dir0</command>
  8562. </test-commands>
  8563. <cleanup-commands>
  8564. <command>-fs NAMENODE -rm -r dir0</command>
  8565. </cleanup-commands>
  8566. <comparators>
  8567. <comparator>
  8568. <type>RegexpComparator</type>
  8569. <expected-output>^drwxrwxrwx( )*-( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/dir1</expected-output>
  8570. </comparator>
  8571. <comparator>
  8572. <type>RegexpComparator</type>
  8573. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/dir1/file1</expected-output>
  8574. </comparator>
  8575. <comparator>
  8576. <type>RegexpComparator</type>
  8577. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/dir1/file2</expected-output>
  8578. </comparator>
  8579. <comparator>
  8580. <type>RegexpComparator</type>
  8581. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/file0</expected-output>
  8582. </comparator>
  8583. </comparators>
  8584. </test>
  8585. <test> <!-- TESTED -->
  8586. <description>chmod: change permission(normal mode) of file in absolute path</description>
  8587. <test-commands>
  8588. <command>-fs NAMENODE -touchz /file1</command>
  8589. <command>-fs NAMENODE -chmod a+rw /file1</command>
  8590. <command>-fs NAMENODE -ls /file1</command>
  8591. </test-commands>
  8592. <cleanup-commands>
  8593. <command>-fs NAMENODE -rm /file1</command>
  8594. </cleanup-commands>
  8595. <comparators>
  8596. <comparator>
  8597. <type>RegexpComparator</type>
  8598. <expected-output>^-rw-rw-rw-( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/file1</expected-output>
  8599. </comparator>
  8600. </comparators>
  8601. </test>
  8602. <test> <!-- TESTED -->
  8603. <description>chmod: change permission(normal mode) of file in relative path</description>
  8604. <test-commands>
  8605. <command>-fs NAMENODE -touchz file1</command>
  8606. <command>-fs NAMENODE -chmod a+rw file1</command>
  8607. <command>-fs NAMENODE -ls file1</command>
  8608. </test-commands>
  8609. <cleanup-commands>
  8610. <command>-fs NAMENODE -rm file1</command>
  8611. </cleanup-commands>
  8612. <comparators>
  8613. <comparator>
  8614. <type>RegexpComparator</type>
  8615. <expected-output>^-rw-rw-rw-( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*file1</expected-output>
  8616. </comparator>
  8617. </comparators>
  8618. </test>
  8619. <test> <!-- TESTED -->
  8620. <description>chmod: change permission(normal mode) of directory in absolute path</description>
  8621. <test-commands>
  8622. <command>-fs NAMENODE -mkdir /dir0</command>
  8623. <command>-fs NAMENODE -mkdir /dir0/dir1</command>
  8624. <command>-fs NAMENODE -touchz /dir0/file0</command>
  8625. <command>-fs NAMENODE -touchz /dir0/dir1/file1</command>
  8626. <command>-fs NAMENODE -touchz /dir0/dir1/file2</command>
  8627. <command>-fs NAMENODE -chmod a+rwx /dir0/dir1</command>
  8628. <command>-fs NAMENODE -ls -R /dir0</command>
  8629. </test-commands>
  8630. <cleanup-commands>
  8631. <command>-fs NAMENODE -rm -r /dir0</command>
  8632. </cleanup-commands>
  8633. <comparators>
  8634. <comparator>
  8635. <type>RegexpComparator</type>
  8636. <expected-output>^drwxrwxrwx( )*-( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1</expected-output>
  8637. </comparator>
  8638. <comparator>
  8639. <type>RegexpComparator</type>
  8640. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1/file1</expected-output>
  8641. </comparator>
  8642. <comparator>
  8643. <type>RegexpComparator</type>
  8644. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1/file2</expected-output>
  8645. </comparator>
  8646. <comparator>
  8647. <type>RegexpComparator</type>
  8648. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/file0</expected-output>
  8649. </comparator>
  8650. </comparators>
  8651. </test>
  8652. <test> <!-- TESTED -->
  8653. <description>chmod: change permission(normal mode) of directory in relative path</description>
  8654. <test-commands>
  8655. <command>-fs NAMENODE -mkdir -p dir0</command>
  8656. <command>-fs NAMENODE -mkdir -p dir0/dir1</command>
  8657. <command>-fs NAMENODE -touchz dir0/file0</command>
  8658. <command>-fs NAMENODE -touchz dir0/dir1/file1</command>
  8659. <command>-fs NAMENODE -touchz dir0/dir1/file2</command>
  8660. <command>-fs NAMENODE -chmod a+rwx dir0/dir1</command>
  8661. <command>-fs NAMENODE -ls -R dir0</command>
  8662. </test-commands>
  8663. <cleanup-commands>
  8664. <command>-fs NAMENODE -rm -r dir0</command>
  8665. </cleanup-commands>
  8666. <comparators>
  8667. <comparator>
  8668. <type>RegexpComparator</type>
  8669. <expected-output>^drwxrwxrwx( )*-( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/dir1</expected-output>
  8670. </comparator>
  8671. <comparator>
  8672. <type>RegexpComparator</type>
  8673. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/dir1/file1</expected-output>
  8674. </comparator>
  8675. <comparator>
  8676. <type>RegexpComparator</type>
  8677. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/dir1/file2</expected-output>
  8678. </comparator>
  8679. <comparator>
  8680. <type>RegexpComparator</type>
  8681. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/file0</expected-output>
  8682. </comparator>
  8683. </comparators>
  8684. </test>
  8685. <test> <!-- TESTED -->
  8686. <description>chmod: change permission(octal mode) of directory in absolute path recursively </description>
  8687. <test-commands>
  8688. <command>-fs NAMENODE -mkdir /dir0</command>
  8689. <command>-fs NAMENODE -mkdir /dir0/dir1</command>
  8690. <command>-fs NAMENODE -touchz /dir0/file0</command>
  8691. <command>-fs NAMENODE -touchz /dir0/dir1/file1</command>
  8692. <command>-fs NAMENODE -touchz /dir0/dir1/file2</command>
  8693. <command>-fs NAMENODE -chmod -R 777 /dir0/dir1</command>
  8694. <command>-fs NAMENODE -ls -R /dir0</command>
  8695. </test-commands>
  8696. <cleanup-commands>
  8697. <command>-fs NAMENODE -rm -r /dir0</command>
  8698. </cleanup-commands>
  8699. <comparators>
  8700. <comparator>
  8701. <type>RegexpComparator</type>
  8702. <expected-output>^drwxrwxrwx( )*-( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1</expected-output>
  8703. </comparator>
  8704. <comparator>
  8705. <type>RegexpComparator</type>
  8706. <expected-output>^-rwxrwxrwx( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1/file1</expected-output>
  8707. </comparator>
  8708. <comparator>
  8709. <type>RegexpComparator</type>
  8710. <expected-output>^-rwxrwxrwx( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1/file2</expected-output>
  8711. </comparator>
  8712. <comparator>
  8713. <type>RegexpComparator</type>
  8714. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/file0</expected-output>
  8715. </comparator>
  8716. </comparators>
  8717. </test>
  8718. <test> <!-- TESTED -->
  8719. <description>chmod: change permission(octal mode) of directory in relative path recursively</description>
  8720. <test-commands>
  8721. <command>-fs NAMENODE -mkdir -p dir0</command>
  8722. <command>-fs NAMENODE -mkdir -p dir0/dir1</command>
  8723. <command>-fs NAMENODE -touchz dir0/file0</command>
  8724. <command>-fs NAMENODE -touchz dir0/dir1/file1</command>
  8725. <command>-fs NAMENODE -touchz dir0/dir1/file2</command>
  8726. <command>-fs NAMENODE -chmod -R 777 dir0/dir1</command>
  8727. <command>-fs NAMENODE -ls -R dir0</command>
  8728. </test-commands>
  8729. <cleanup-commands>
  8730. <command>-fs NAMENODE -rm -r dir0</command>
  8731. </cleanup-commands>
  8732. <comparators>
  8733. <comparator>
  8734. <type>RegexpComparator</type>
  8735. <expected-output>^drwxrwxrwx( )*-( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/dir1</expected-output>
  8736. </comparator>
  8737. <comparator>
  8738. <type>RegexpComparator</type>
  8739. <expected-output>^-rwxrwxrwx( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/dir1/file1</expected-output>
  8740. </comparator>
  8741. <comparator>
  8742. <type>RegexpComparator</type>
  8743. <expected-output>^-rwxrwxrwx( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/dir1/file2</expected-output>
  8744. </comparator>
  8745. <comparator>
  8746. <type>RegexpComparator</type>
  8747. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/file0</expected-output>
  8748. </comparator>
  8749. </comparators>
  8750. </test>
  8751. <test> <!-- TESTED -->
  8752. <description>chmod: change permission(normal mode) of directory in absolute path recursively</description>
  8753. <test-commands>
  8754. <command>-fs NAMENODE -mkdir /dir0</command>
  8755. <command>-fs NAMENODE -mkdir /dir0/dir1</command>
  8756. <command>-fs NAMENODE -touchz /dir0/file0</command>
  8757. <command>-fs NAMENODE -touchz /dir0/dir1/file1</command>
  8758. <command>-fs NAMENODE -touchz /dir0/dir1/file2</command>
  8759. <command>-fs NAMENODE -chmod -R a+rwx /dir0/dir1</command>
  8760. <command>-fs NAMENODE -ls -R /dir0</command>
  8761. </test-commands>
  8762. <cleanup-commands>
  8763. <command>-fs NAMENODE -rm -r /dir0</command>
  8764. </cleanup-commands>
  8765. <comparators>
  8766. <comparator>
  8767. <type>RegexpComparator</type>
  8768. <expected-output>^drwxrwxrwx( )*-( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1</expected-output>
  8769. </comparator>
  8770. <comparator>
  8771. <type>RegexpComparator</type>
  8772. <expected-output>^-rwxrwxrwx( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1/file1</expected-output>
  8773. </comparator>
  8774. <comparator>
  8775. <type>RegexpComparator</type>
  8776. <expected-output>^-rwxrwxrwx( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1/file2</expected-output>
  8777. </comparator>
  8778. <comparator>
  8779. <type>RegexpComparator</type>
  8780. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/file0</expected-output>
  8781. </comparator>
  8782. </comparators>
  8783. </test>
  8784. <test> <!-- TESTED -->
  8785. <description>chmod: change permission(normal mode) of directory in relative path recursively</description>
  8786. <test-commands>
  8787. <command>-fs NAMENODE -mkdir -p dir0</command>
  8788. <command>-fs NAMENODE -mkdir -p dir0/dir1</command>
  8789. <command>-fs NAMENODE -touchz dir0/file0</command>
  8790. <command>-fs NAMENODE -touchz dir0/dir1/file1</command>
  8791. <command>-fs NAMENODE -touchz dir0/dir1/file2</command>
  8792. <command>-fs NAMENODE -chmod -R a+rwx dir0/dir1</command>
  8793. <command>-fs NAMENODE -ls -R dir0</command>
  8794. </test-commands>
  8795. <cleanup-commands>
  8796. <command>-fs NAMENODE -rm -r dir0</command>
  8797. </cleanup-commands>
  8798. <comparators>
  8799. <comparator>
  8800. <type>RegexpComparator</type>
  8801. <expected-output>^drwxrwxrwx( )*-( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/dir1</expected-output>
  8802. </comparator>
  8803. <comparator>
  8804. <type>RegexpComparator</type>
  8805. <expected-output>^-rwxrwxrwx( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/dir1/file1</expected-output>
  8806. </comparator>
  8807. <comparator>
  8808. <type>RegexpComparator</type>
  8809. <expected-output>^-rwxrwxrwx( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/dir1/file2</expected-output>
  8810. </comparator>
  8811. <comparator>
  8812. <type>RegexpComparator</type>
  8813. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/file0</expected-output>
  8814. </comparator>
  8815. </comparators>
  8816. </test>
  8817. <test> <!-- TESTED -->
  8818. <description>chmod: change permission(octal mode) of non existent file in absolute path</description>
  8819. <test-commands>
  8820. <command>-fs NAMENODE -chmod 777 /file1</command>
  8821. </test-commands>
  8822. <cleanup-commands>
  8823. <command>-fs NAMENODE -rm /file1</command>
  8824. </cleanup-commands>
  8825. <comparators>
  8826. <comparator>
  8827. <type>RegexpComparator</type>
  8828. <expected-output>^chmod: `/file1': No such file or directory</expected-output>
  8829. </comparator>
  8830. </comparators>
  8831. </test>
  8832. <test> <!-- TESTED -->
  8833. <description>chmod: change permission(octal mode) of non existent file in relative path</description>
  8834. <test-commands>
  8835. <command>-fs NAMENODE -chmod 666 file1</command>
  8836. </test-commands>
  8837. <cleanup-commands>
  8838. <command>-fs NAMENODE -rm file1</command>
  8839. </cleanup-commands>
  8840. <comparators>
  8841. <comparator>
  8842. <type>RegexpComparator</type>
  8843. <expected-output>^chmod: `file1': No such file or directory</expected-output>
  8844. </comparator>
  8845. </comparators>
  8846. </test>
  8847. <test> <!-- TESTED -->
  8848. <description>chmod: change permission(normal mode) of non existent file in absolute path</description>
  8849. <test-commands>
  8850. <command>-fs NAMENODE -chmod a+rw /file1</command>
  8851. </test-commands>
  8852. <cleanup-commands>
  8853. <command>-fs NAMENODE -rm /file1</command>
  8854. </cleanup-commands>
  8855. <comparators>
  8856. <comparator>
  8857. <type>RegexpComparator</type>
  8858. <expected-output>^chmod: `/file1': No such file or directory</expected-output>
  8859. </comparator>
  8860. </comparators>
  8861. </test>
  8862. <test> <!-- TESTED -->
  8863. <description>chmod: change permission(normal mode) of non existent file in relative path</description>
  8864. <test-commands>
  8865. <command>-fs NAMENODE -chmod a+rw file1</command>
  8866. </test-commands>
  8867. <cleanup-commands>
  8868. <command>-fs NAMENODE -rm file1</command>
  8869. </cleanup-commands>
  8870. <comparators>
  8871. <comparator>
  8872. <type>RegexpComparator</type>
  8873. <expected-output>^chmod: `file1': No such file or directory</expected-output>
  8874. </comparator>
  8875. </comparators>
  8876. </test>
  8877. <test> <!-- TESTED -->
  8878. <description>chmod: change permission(octal mode) of multiple files in absolute path using globbing</description>
  8879. <test-commands>
  8880. <command>-fs NAMENODE -touchz /file1</command>
  8881. <command>-fs NAMENODE -touchz /file2</command>
  8882. <command>-fs NAMENODE -touchz /file3</command>
  8883. <command>-fs NAMENODE -touchz /file4</command>
  8884. <command>-fs NAMENODE -chmod 777 /file* </command>
  8885. <command>-fs NAMENODE -ls -R /file*</command>
  8886. </test-commands>
  8887. <cleanup-commands>
  8888. <command>-fs NAMENODE -rm /file*</command>
  8889. </cleanup-commands>
  8890. <comparators>
  8891. <comparator>
  8892. <type>RegexpComparator</type>
  8893. <expected-output>^-rwxrwxrwx( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/file1</expected-output>
  8894. </comparator>
  8895. <comparator>
  8896. <type>RegexpComparator</type>
  8897. <expected-output>^-rwxrwxrwx( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/file2</expected-output>
  8898. </comparator>
  8899. <comparator>
  8900. <type>RegexpComparator</type>
  8901. <expected-output>^-rwxrwxrwx( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/file3</expected-output>
  8902. </comparator>
  8903. <comparator>
  8904. <type>RegexpComparator</type>
  8905. <expected-output>^-rwxrwxrwx( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/file4</expected-output>
  8906. </comparator>
  8907. </comparators>
  8908. </test>
  8909. <test> <!-- TESTED -->
  8910. <description>chmod: change permission(octal mode) of multiple files in relative path using globbing</description>
  8911. <test-commands>
  8912. <command>-fs NAMENODE -touchz file1</command>
  8913. <command>-fs NAMENODE -touchz file2</command>
  8914. <command>-fs NAMENODE -touchz file3</command>
  8915. <command>-fs NAMENODE -touchz file4</command>
  8916. <command>-fs NAMENODE -chmod 777 file* </command>
  8917. <command>-fs NAMENODE -ls -R file*</command>
  8918. </test-commands>
  8919. <cleanup-commands>
  8920. <command>-fs NAMENODE -rm file*</command>
  8921. </cleanup-commands>
  8922. <comparators>
  8923. <comparator>
  8924. <type>RegexpComparator</type>
  8925. <expected-output>^-rwxrwxrwx( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*file1</expected-output>
  8926. </comparator>
  8927. <comparator>
  8928. <type>RegexpComparator</type>
  8929. <expected-output>^-rwxrwxrwx( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*file2</expected-output>
  8930. </comparator>
  8931. <comparator>
  8932. <type>RegexpComparator</type>
  8933. <expected-output>^-rwxrwxrwx( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*file3</expected-output>
  8934. </comparator>
  8935. <comparator>
  8936. <type>RegexpComparator</type>
  8937. <expected-output>^-rwxrwxrwx( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*file4</expected-output>
  8938. </comparator>
  8939. </comparators>
  8940. </test>
  8941. <test> <!-- TESTED -->
  8942. <description>chmod: change permission(octal mode) of multiple directories in absolute path using globbing</description>
  8943. <test-commands>
  8944. <command>-fs NAMENODE -mkdir /dir0</command>
  8945. <command>-fs NAMENODE -mkdir /dir0/dir1</command>
  8946. <command>-fs NAMENODE -touchz /dir0/file0</command>
  8947. <command>-fs NAMENODE -touchz /dir0/dir1/file1</command>
  8948. <command>-fs NAMENODE -touchz /dir0/dir1/file2</command>
  8949. <command>-fs NAMENODE -mkdir /dir2</command>
  8950. <command>-fs NAMENODE -mkdir /dir2/dir1</command>
  8951. <command>-fs NAMENODE -touchz /dir2/file0</command>
  8952. <command>-fs NAMENODE -touchz /dir2/dir1/file1</command>
  8953. <command>-fs NAMENODE -touchz /dir2/dir1/file2</command>
  8954. <command>-fs NAMENODE -chmod 777 /dir*</command>
  8955. <command>-fs NAMENODE -ls -R /dir*</command>
  8956. </test-commands>
  8957. <cleanup-commands>
  8958. <command>-fs NAMENODE -rm -r /dir*</command>
  8959. </cleanup-commands>
  8960. <comparators>
  8961. <comparator>
  8962. <type>RegexpComparator</type>
  8963. <expected-output>^drwxr-xr-x( )*-( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1</expected-output>
  8964. </comparator>
  8965. <comparator>
  8966. <type>RegexpComparator</type>
  8967. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1/file1</expected-output>
  8968. </comparator>
  8969. <comparator>
  8970. <type>RegexpComparator</type>
  8971. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1/file2</expected-output>
  8972. </comparator>
  8973. <comparator>
  8974. <type>RegexpComparator</type>
  8975. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/file0</expected-output>
  8976. </comparator>
  8977. <comparator>
  8978. <type>RegexpComparator</type>
  8979. <expected-output>^drwxr-xr-x( )*-( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir2/dir1</expected-output>
  8980. </comparator>
  8981. <comparator>
  8982. <type>RegexpComparator</type>
  8983. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir2/dir1/file1</expected-output>
  8984. </comparator>
  8985. <comparator>
  8986. <type>RegexpComparator</type>
  8987. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir2/dir1/file2</expected-output>
  8988. </comparator>
  8989. <comparator>
  8990. <type>RegexpComparator</type>
  8991. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir2/file0</expected-output>
  8992. </comparator>
  8993. </comparators>
  8994. </test>
  8995. <test> <!-- TESTED -->
  8996. <description>chmod: change permission(octal mode) of multiple directories in relative path using globbing</description>
  8997. <test-commands>
  8998. <command>-fs NAMENODE -mkdir -p dir0</command>
  8999. <command>-fs NAMENODE -mkdir -p dir0/dir1</command>
  9000. <command>-fs NAMENODE -touchz dir0/file0</command>
  9001. <command>-fs NAMENODE -touchz dir0/dir1/file1</command>
  9002. <command>-fs NAMENODE -touchz dir0/dir1/file2</command>
  9003. <command>-fs NAMENODE -mkdir -p dir2</command>
  9004. <command>-fs NAMENODE -mkdir -p dir2/dir1</command>
  9005. <command>-fs NAMENODE -touchz dir2/file0</command>
  9006. <command>-fs NAMENODE -touchz dir2/dir1/file1</command>
  9007. <command>-fs NAMENODE -touchz dir2/dir1/file2</command>
  9008. <command>-fs NAMENODE -chmod 777 dir*</command>
  9009. <command>-fs NAMENODE -ls -R dir*</command>
  9010. </test-commands>
  9011. <cleanup-commands>
  9012. <command>-fs NAMENODE -rm -r dir*</command>
  9013. </cleanup-commands>
  9014. <comparators>
  9015. <comparator>
  9016. <type>RegexpComparator</type>
  9017. <expected-output>^drwxr-xr-x( )*-( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/dir1</expected-output>
  9018. </comparator>
  9019. <comparator>
  9020. <type>RegexpComparator</type>
  9021. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/dir1/file1</expected-output>
  9022. </comparator>
  9023. <comparator>
  9024. <type>RegexpComparator</type>
  9025. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/dir1/file2</expected-output>
  9026. </comparator>
  9027. <comparator>
  9028. <type>RegexpComparator</type>
  9029. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/file0</expected-output>
  9030. </comparator>
  9031. <comparator>
  9032. <type>RegexpComparator</type>
  9033. <expected-output>^drwxr-xr-x( )*-( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir2/dir1</expected-output>
  9034. </comparator>
  9035. <comparator>
  9036. <type>RegexpComparator</type>
  9037. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir2/dir1/file1</expected-output>
  9038. </comparator>
  9039. <comparator>
  9040. <type>RegexpComparator</type>
  9041. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir2/dir1/file2</expected-output>
  9042. </comparator>
  9043. <comparator>
  9044. <type>RegexpComparator</type>
  9045. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir2/file0</expected-output>
  9046. </comparator>
  9047. </comparators>
  9048. </test>
  9049. <test> <!-- TESTED -->
  9050. <description>chmod: change permission(octal mode) of multiple files in absolute path without globbing</description>
  9051. <test-commands>
  9052. <command>-fs NAMENODE -touchz /file1</command>
  9053. <command>-fs NAMENODE -touchz /file2</command>
  9054. <command>-fs NAMENODE -touchz /file3</command>
  9055. <command>-fs NAMENODE -touchz /file4</command>
  9056. <command>-fs NAMENODE -chmod 777 /file1 /file2 /file3 /file4 </command>
  9057. <command>-fs NAMENODE -ls -R /file*</command>
  9058. </test-commands>
  9059. <cleanup-commands>
  9060. <command>-fs NAMENODE -rm /file*</command>
  9061. </cleanup-commands>
  9062. <comparators>
  9063. <comparator>
  9064. <type>RegexpComparator</type>
  9065. <expected-output>^-rwxrwxrwx( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/file1</expected-output>
  9066. </comparator>
  9067. <comparator>
  9068. <type>RegexpComparator</type>
  9069. <expected-output>^-rwxrwxrwx( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/file2</expected-output>
  9070. </comparator>
  9071. <comparator>
  9072. <type>RegexpComparator</type>
  9073. <expected-output>^-rwxrwxrwx( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/file3</expected-output>
  9074. </comparator>
  9075. <comparator>
  9076. <type>RegexpComparator</type>
  9077. <expected-output>^-rwxrwxrwx( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/file4</expected-output>
  9078. </comparator>
  9079. </comparators>
  9080. </test>
  9081. <test> <!-- TESTED -->
  9082. <description>chmod: change permission(octal mode) of multiple files in relative path without globbing</description>
  9083. <test-commands>
  9084. <command>-fs NAMENODE -touchz file1</command>
  9085. <command>-fs NAMENODE -touchz file2</command>
  9086. <command>-fs NAMENODE -touchz file3</command>
  9087. <command>-fs NAMENODE -touchz file4</command>
  9088. <command>-fs NAMENODE -chmod 777 file1 file2 file3 file4 </command>
  9089. <command>-fs NAMENODE -ls -R file*</command>
  9090. </test-commands>
  9091. <cleanup-commands>
  9092. <command>-fs NAMENODE -rm file*</command>
  9093. </cleanup-commands>
  9094. <comparators>
  9095. <comparator>
  9096. <type>RegexpComparator</type>
  9097. <expected-output>^-rwxrwxrwx( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*file1</expected-output>
  9098. </comparator>
  9099. <comparator>
  9100. <type>RegexpComparator</type>
  9101. <expected-output>^-rwxrwxrwx( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*file2</expected-output>
  9102. </comparator>
  9103. <comparator>
  9104. <type>RegexpComparator</type>
  9105. <expected-output>^-rwxrwxrwx( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*file3</expected-output>
  9106. </comparator>
  9107. <comparator>
  9108. <type>RegexpComparator</type>
  9109. <expected-output>^-rwxrwxrwx( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*file4</expected-output>
  9110. </comparator>
  9111. </comparators>
  9112. </test>
  9113. <test> <!-- TESTED -->
  9114. <description>chmod: change permission(octal mode) of multiple directories in absolute path without globbing</description>
  9115. <test-commands>
  9116. <command>-fs NAMENODE -mkdir /dir0</command>
  9117. <command>-fs NAMENODE -mkdir /dir0/dir1</command>
  9118. <command>-fs NAMENODE -touchz /dir0/file0</command>
  9119. <command>-fs NAMENODE -touchz /dir0/dir1/file1</command>
  9120. <command>-fs NAMENODE -touchz /dir0/dir1/file2</command>
  9121. <command>-fs NAMENODE -mkdir /dir2</command>
  9122. <command>-fs NAMENODE -mkdir /dir2/dir1</command>
  9123. <command>-fs NAMENODE -touchz /dir2/file0</command>
  9124. <command>-fs NAMENODE -touchz /dir2/dir1/file1</command>
  9125. <command>-fs NAMENODE -touchz /dir2/dir1/file2</command>
  9126. <command>-fs NAMENODE -chmod 777 /dir0 /dir2</command>
  9127. <command>-fs NAMENODE -ls -R /dir*</command>
  9128. </test-commands>
  9129. <cleanup-commands>
  9130. <command>-fs NAMENODE -rm -r /dir*</command>
  9131. </cleanup-commands>
  9132. <comparators>
  9133. <comparator>
  9134. <type>RegexpComparator</type>
  9135. <expected-output>^drwxr-xr-x( )*-( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1</expected-output>
  9136. </comparator>
  9137. <comparator>
  9138. <type>RegexpComparator</type>
  9139. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1/file1</expected-output>
  9140. </comparator>
  9141. <comparator>
  9142. <type>RegexpComparator</type>
  9143. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1/file2</expected-output>
  9144. </comparator>
  9145. <comparator>
  9146. <type>RegexpComparator</type>
  9147. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/file0</expected-output>
  9148. </comparator>
  9149. <comparator>
  9150. <type>RegexpComparator</type>
  9151. <expected-output>^drwxr-xr-x( )*-( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir2/dir1</expected-output>
  9152. </comparator>
  9153. <comparator>
  9154. <type>RegexpComparator</type>
  9155. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir2/dir1/file1</expected-output>
  9156. </comparator>
  9157. <comparator>
  9158. <type>RegexpComparator</type>
  9159. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir2/dir1/file2</expected-output>
  9160. </comparator>
  9161. <comparator>
  9162. <type>RegexpComparator</type>
  9163. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir2/file0</expected-output>
  9164. </comparator>
  9165. </comparators>
  9166. </test>
  9167. <test> <!-- TESTED -->
  9168. <description>chmod: change permission(octal mode) of multiple directories in relative path without globbing</description>
  9169. <test-commands>
  9170. <command>-fs NAMENODE -mkdir -p dir0</command>
  9171. <command>-fs NAMENODE -mkdir -p dir0/dir1</command>
  9172. <command>-fs NAMENODE -touchz dir0/file0</command>
  9173. <command>-fs NAMENODE -touchz dir0/dir1/file1</command>
  9174. <command>-fs NAMENODE -touchz dir0/dir1/file2</command>
  9175. <command>-fs NAMENODE -mkdir -p dir2</command>
  9176. <command>-fs NAMENODE -mkdir -p dir2/dir1</command>
  9177. <command>-fs NAMENODE -touchz dir2/file0</command>
  9178. <command>-fs NAMENODE -touchz dir2/dir1/file1</command>
  9179. <command>-fs NAMENODE -touchz dir2/dir1/file2</command>
  9180. <command>-fs NAMENODE -chmod 777 dir0 dir2</command>
  9181. <command>-fs NAMENODE -ls -R dir*</command>
  9182. </test-commands>
  9183. <cleanup-commands>
  9184. <command>-fs NAMENODE -rm -r dir*</command>
  9185. </cleanup-commands>
  9186. <comparators>
  9187. <comparator>
  9188. <type>RegexpComparator</type>
  9189. <expected-output>^drwxr-xr-x( )*-( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/dir1</expected-output>
  9190. </comparator>
  9191. <comparator>
  9192. <type>RegexpComparator</type>
  9193. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/dir1/file1</expected-output>
  9194. </comparator>
  9195. <comparator>
  9196. <type>RegexpComparator</type>
  9197. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/dir1/file2</expected-output>
  9198. </comparator>
  9199. <comparator>
  9200. <type>RegexpComparator</type>
  9201. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/file0</expected-output>
  9202. </comparator>
  9203. <comparator>
  9204. <type>RegexpComparator</type>
  9205. <expected-output>^drwxr-xr-x( )*-( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir2/dir1</expected-output>
  9206. </comparator>
  9207. <comparator>
  9208. <type>RegexpComparator</type>
  9209. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir2/dir1/file1</expected-output>
  9210. </comparator>
  9211. <comparator>
  9212. <type>RegexpComparator</type>
  9213. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir2/dir1/file2</expected-output>
  9214. </comparator>
  9215. <comparator>
  9216. <type>RegexpComparator</type>
  9217. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir2/file0</expected-output>
  9218. </comparator>
  9219. </comparators>
  9220. </test>
  9221. <test> <!-- TESTED -->
  9222. <description>chmod: change permission(normal mode) of multiple files in absolute path using globbing</description>
  9223. <test-commands>
  9224. <command>-fs NAMENODE -touchz /file1</command>
  9225. <command>-fs NAMENODE -touchz /file2</command>
  9226. <command>-fs NAMENODE -touchz /file3</command>
  9227. <command>-fs NAMENODE -touchz /file4</command>
  9228. <command>-fs NAMENODE -chmod a+rw /file* </command>
  9229. <command>-fs NAMENODE -ls -R /file*</command>
  9230. </test-commands>
  9231. <cleanup-commands>
  9232. <command>-fs NAMENODE -rm /file*</command>
  9233. </cleanup-commands>
  9234. <comparators>
  9235. <comparator>
  9236. <type>RegexpComparator</type>
  9237. <expected-output>^-rw-rw-rw-( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/file1</expected-output>
  9238. </comparator>
  9239. <comparator>
  9240. <type>RegexpComparator</type>
  9241. <expected-output>^-rw-rw-rw-( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/file2</expected-output>
  9242. </comparator>
  9243. <comparator>
  9244. <type>RegexpComparator</type>
  9245. <expected-output>^-rw-rw-rw-( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/file3</expected-output>
  9246. </comparator>
  9247. <comparator>
  9248. <type>RegexpComparator</type>
  9249. <expected-output>^-rw-rw-rw-( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/file4</expected-output>
  9250. </comparator>
  9251. </comparators>
  9252. </test>
  9253. <test> <!-- TESTED -->
  9254. <description>chmod: change permission(normal mode) of multiple files in relative path using globbing</description>
  9255. <test-commands>
  9256. <command>-fs NAMENODE -touchz file1</command>
  9257. <command>-fs NAMENODE -touchz file2</command>
  9258. <command>-fs NAMENODE -touchz file3</command>
  9259. <command>-fs NAMENODE -touchz file4</command>
  9260. <command>-fs NAMENODE -chmod a+rw file* </command>
  9261. <command>-fs NAMENODE -ls -R file*</command>
  9262. </test-commands>
  9263. <cleanup-commands>
  9264. <command>-fs NAMENODE -rm file*</command>
  9265. </cleanup-commands>
  9266. <comparators>
  9267. <comparator>
  9268. <type>RegexpComparator</type>
  9269. <expected-output>^-rw-rw-rw-( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*file1</expected-output>
  9270. </comparator>
  9271. <comparator>
  9272. <type>RegexpComparator</type>
  9273. <expected-output>^-rw-rw-rw-( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*file2</expected-output>
  9274. </comparator>
  9275. <comparator>
  9276. <type>RegexpComparator</type>
  9277. <expected-output>^-rw-rw-rw-( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*file3</expected-output>
  9278. </comparator>
  9279. <comparator>
  9280. <type>RegexpComparator</type>
  9281. <expected-output>^-rw-rw-rw-( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*file4</expected-output>
  9282. </comparator>
  9283. </comparators>
  9284. </test>
  9285. <test> <!-- TESTED -->
  9286. <description>chmod: change permission(normal mode) of multiple directories in absolute path using globbing</description>
  9287. <test-commands>
  9288. <command>-fs NAMENODE -mkdir /dir0</command>
  9289. <command>-fs NAMENODE -mkdir /dir0/dir1</command>
  9290. <command>-fs NAMENODE -touchz /dir0/file0</command>
  9291. <command>-fs NAMENODE -touchz /dir0/dir1/file1</command>
  9292. <command>-fs NAMENODE -touchz /dir0/dir1/file2</command>
  9293. <command>-fs NAMENODE -mkdir /dir2</command>
  9294. <command>-fs NAMENODE -mkdir /dir2/dir1</command>
  9295. <command>-fs NAMENODE -touchz /dir2/file0</command>
  9296. <command>-fs NAMENODE -touchz /dir2/dir1/file1</command>
  9297. <command>-fs NAMENODE -touchz /dir2/dir1/file2</command>
  9298. <command>-fs NAMENODE -chmod a+rwx /dir*</command>
  9299. <command>-fs NAMENODE -ls -R /dir*</command>
  9300. </test-commands>
  9301. <cleanup-commands>
  9302. <command>-fs NAMENODE -rm -r /dir*</command>
  9303. </cleanup-commands>
  9304. <comparators>
  9305. <comparator>
  9306. <type>RegexpComparator</type>
  9307. <expected-output>^drwxr-xr-x( )*-( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1</expected-output>
  9308. </comparator>
  9309. <comparator>
  9310. <type>RegexpComparator</type>
  9311. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1/file1</expected-output>
  9312. </comparator>
  9313. <comparator>
  9314. <type>RegexpComparator</type>
  9315. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1/file2</expected-output>
  9316. </comparator>
  9317. <comparator>
  9318. <type>RegexpComparator</type>
  9319. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/file0</expected-output>
  9320. </comparator>
  9321. <comparator>
  9322. <type>RegexpComparator</type>
  9323. <expected-output>^drwxr-xr-x( )*-( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir2/dir1</expected-output>
  9324. </comparator>
  9325. <comparator>
  9326. <type>RegexpComparator</type>
  9327. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir2/dir1/file1</expected-output>
  9328. </comparator>
  9329. <comparator>
  9330. <type>RegexpComparator</type>
  9331. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir2/dir1/file2</expected-output>
  9332. </comparator>
  9333. <comparator>
  9334. <type>RegexpComparator</type>
  9335. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir2/file0</expected-output>
  9336. </comparator>
  9337. </comparators>
  9338. </test>
  9339. <test> <!-- TESTED -->
  9340. <description>chmod: change permission(normal mode) of multiple directories in relative path using globbing</description>
  9341. <test-commands>
  9342. <command>-fs NAMENODE -mkdir -p dir0</command>
  9343. <command>-fs NAMENODE -mkdir -p dir0/dir1</command>
  9344. <command>-fs NAMENODE -touchz dir0/file0</command>
  9345. <command>-fs NAMENODE -touchz dir0/dir1/file1</command>
  9346. <command>-fs NAMENODE -touchz dir0/dir1/file2</command>
  9347. <command>-fs NAMENODE -mkdir -p dir2</command>
  9348. <command>-fs NAMENODE -mkdir -p dir2/dir1</command>
  9349. <command>-fs NAMENODE -touchz dir2/file0</command>
  9350. <command>-fs NAMENODE -touchz dir2/dir1/file1</command>
  9351. <command>-fs NAMENODE -touchz dir2/dir1/file2</command>
  9352. <command>-fs NAMENODE -chmod a+rwx dir*</command>
  9353. <command>-fs NAMENODE -ls -R dir*</command>
  9354. </test-commands>
  9355. <cleanup-commands>
  9356. <command>-fs NAMENODE -rm -r dir*</command>
  9357. </cleanup-commands>
  9358. <comparators>
  9359. <comparator>
  9360. <type>RegexpComparator</type>
  9361. <expected-output>^drwxr-xr-x( )*-( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/dir1</expected-output>
  9362. </comparator>
  9363. <comparator>
  9364. <type>RegexpComparator</type>
  9365. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/dir1/file1</expected-output>
  9366. </comparator>
  9367. <comparator>
  9368. <type>RegexpComparator</type>
  9369. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/dir1/file2</expected-output>
  9370. </comparator>
  9371. <comparator>
  9372. <type>RegexpComparator</type>
  9373. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/file0</expected-output>
  9374. </comparator>
  9375. <comparator>
  9376. <type>RegexpComparator</type>
  9377. <expected-output>^drwxr-xr-x( )*-( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir2/dir1</expected-output>
  9378. </comparator>
  9379. <comparator>
  9380. <type>RegexpComparator</type>
  9381. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir2/dir1/file1</expected-output>
  9382. </comparator>
  9383. <comparator>
  9384. <type>RegexpComparator</type>
  9385. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir2/dir1/file2</expected-output>
  9386. </comparator>
  9387. <comparator>
  9388. <type>RegexpComparator</type>
  9389. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir2/file0</expected-output>
  9390. </comparator>
  9391. </comparators>
  9392. </test>
  9393. <test> <!-- TESTED -->
  9394. <description>chmod: change permission(normal mode) of multiple files in absolute path without globbing</description>
  9395. <test-commands>
  9396. <command>-fs NAMENODE -touchz /file1</command>
  9397. <command>-fs NAMENODE -touchz /file2</command>
  9398. <command>-fs NAMENODE -touchz /file3</command>
  9399. <command>-fs NAMENODE -touchz /file4</command>
  9400. <command>-fs NAMENODE -chmod a+rw /file1 /file2 /file3 /file4 </command>
  9401. <command>-fs NAMENODE -ls -R /file*</command>
  9402. </test-commands>
  9403. <cleanup-commands>
  9404. <command>-fs NAMENODE -rm /file*</command>
  9405. </cleanup-commands>
  9406. <comparators>
  9407. <comparator>
  9408. <type>RegexpComparator</type>
  9409. <expected-output>^-rw-rw-rw-( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/file1</expected-output>
  9410. </comparator>
  9411. <comparator>
  9412. <type>RegexpComparator</type>
  9413. <expected-output>^-rw-rw-rw-( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/file2</expected-output>
  9414. </comparator>
  9415. <comparator>
  9416. <type>RegexpComparator</type>
  9417. <expected-output>^-rw-rw-rw-( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/file3</expected-output>
  9418. </comparator>
  9419. <comparator>
  9420. <type>RegexpComparator</type>
  9421. <expected-output>^-rw-rw-rw-( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/file4</expected-output>
  9422. </comparator>
  9423. </comparators>
  9424. </test>
  9425. <test> <!-- TESTED -->
  9426. <description>chmod: change permission(normal mode) of multiple files in relative path without globbing</description>
  9427. <test-commands>
  9428. <command>-fs NAMENODE -touchz file1</command>
  9429. <command>-fs NAMENODE -touchz file2</command>
  9430. <command>-fs NAMENODE -touchz file3</command>
  9431. <command>-fs NAMENODE -touchz file4</command>
  9432. <command>-fs NAMENODE -chmod a+rw file1 file2 file3 file4 </command>
  9433. <command>-fs NAMENODE -ls -R file*</command>
  9434. </test-commands>
  9435. <cleanup-commands>
  9436. <command>-fs NAMENODE -rm file*</command>
  9437. </cleanup-commands>
  9438. <comparators>
  9439. <comparator>
  9440. <type>RegexpComparator</type>
  9441. <expected-output>^-rw-rw-rw-( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*file1</expected-output>
  9442. </comparator>
  9443. <comparator>
  9444. <type>RegexpComparator</type>
  9445. <expected-output>^-rw-rw-rw-( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*file2</expected-output>
  9446. </comparator>
  9447. <comparator>
  9448. <type>RegexpComparator</type>
  9449. <expected-output>^-rw-rw-rw-( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*file3</expected-output>
  9450. </comparator>
  9451. <comparator>
  9452. <type>RegexpComparator</type>
  9453. <expected-output>^-rw-rw-rw-( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*file4</expected-output>
  9454. </comparator>
  9455. </comparators>
  9456. </test>
  9457. <test> <!-- TESTED -->
  9458. <description>chmod: change permission(normal mode) of multiple directories in absolute path without globbing</description>
  9459. <test-commands>
  9460. <command>-fs NAMENODE -mkdir /dir0</command>
  9461. <command>-fs NAMENODE -mkdir /dir0/dir1</command>
  9462. <command>-fs NAMENODE -touchz /dir0/file0</command>
  9463. <command>-fs NAMENODE -touchz /dir0/dir1/file1</command>
  9464. <command>-fs NAMENODE -touchz /dir0/dir1/file2</command>
  9465. <command>-fs NAMENODE -mkdir /dir2</command>
  9466. <command>-fs NAMENODE -mkdir /dir2/dir1</command>
  9467. <command>-fs NAMENODE -touchz /dir2/file0</command>
  9468. <command>-fs NAMENODE -touchz /dir2/dir1/file1</command>
  9469. <command>-fs NAMENODE -touchz /dir2/dir1/file2</command>
  9470. <command>-fs NAMENODE -chmod a+rwx /dir0 /dir2</command>
  9471. <command>-fs NAMENODE -ls -R /dir*</command>
  9472. </test-commands>
  9473. <cleanup-commands>
  9474. <command>-fs NAMENODE -rm -r /dir*</command>
  9475. </cleanup-commands>
  9476. <comparators>
  9477. <comparator>
  9478. <type>RegexpComparator</type>
  9479. <expected-output>^drwxr-xr-x( )*-( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1</expected-output>
  9480. </comparator>
  9481. <comparator>
  9482. <type>RegexpComparator</type>
  9483. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1/file1</expected-output>
  9484. </comparator>
  9485. <comparator>
  9486. <type>RegexpComparator</type>
  9487. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1/file2</expected-output>
  9488. </comparator>
  9489. <comparator>
  9490. <type>RegexpComparator</type>
  9491. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/file0</expected-output>
  9492. </comparator>
  9493. <comparator>
  9494. <type>RegexpComparator</type>
  9495. <expected-output>^drwxr-xr-x( )*-( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir2/dir1</expected-output>
  9496. </comparator>
  9497. <comparator>
  9498. <type>RegexpComparator</type>
  9499. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir2/dir1/file1</expected-output>
  9500. </comparator>
  9501. <comparator>
  9502. <type>RegexpComparator</type>
  9503. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir2/dir1/file2</expected-output>
  9504. </comparator>
  9505. <comparator>
  9506. <type>RegexpComparator</type>
  9507. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir2/file0</expected-output>
  9508. </comparator>
  9509. </comparators>
  9510. </test>
  9511. <test> <!-- TESTED -->
  9512. <description>chmod: change permission(normal mode) of multiple directories in relative path without globbing</description>
  9513. <test-commands>
  9514. <command>-fs NAMENODE -mkdir -p dir0</command>
  9515. <command>-fs NAMENODE -mkdir -p dir0/dir1</command>
  9516. <command>-fs NAMENODE -touchz dir0/file0</command>
  9517. <command>-fs NAMENODE -touchz dir0/dir1/file1</command>
  9518. <command>-fs NAMENODE -touchz dir0/dir1/file2</command>
  9519. <command>-fs NAMENODE -mkdir -p dir2</command>
  9520. <command>-fs NAMENODE -mkdir -p dir2/dir1</command>
  9521. <command>-fs NAMENODE -touchz dir2/file0</command>
  9522. <command>-fs NAMENODE -touchz dir2/dir1/file1</command>
  9523. <command>-fs NAMENODE -touchz dir2/dir1/file2</command>
  9524. <command>-fs NAMENODE -chmod a+rwx dir0 dir2</command>
  9525. <command>-fs NAMENODE -ls -R dir*</command>
  9526. </test-commands>
  9527. <cleanup-commands>
  9528. <command>-fs NAMENODE -rm -r dir*</command>
  9529. </cleanup-commands>
  9530. <comparators>
  9531. <comparator>
  9532. <type>RegexpComparator</type>
  9533. <expected-output>^drwxr-xr-x( )*-( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/dir1</expected-output>
  9534. </comparator>
  9535. <comparator>
  9536. <type>RegexpComparator</type>
  9537. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/dir1/file1</expected-output>
  9538. </comparator>
  9539. <comparator>
  9540. <type>RegexpComparator</type>
  9541. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/dir1/file2</expected-output>
  9542. </comparator>
  9543. <comparator>
  9544. <type>RegexpComparator</type>
  9545. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/file0</expected-output>
  9546. </comparator>
  9547. <comparator>
  9548. <type>RegexpComparator</type>
  9549. <expected-output>^drwxr-xr-x( )*-( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir2/dir1</expected-output>
  9550. </comparator>
  9551. <comparator>
  9552. <type>RegexpComparator</type>
  9553. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir2/dir1/file1</expected-output>
  9554. </comparator>
  9555. <comparator>
  9556. <type>RegexpComparator</type>
  9557. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir2/dir1/file2</expected-output>
  9558. </comparator>
  9559. <comparator>
  9560. <type>RegexpComparator</type>
  9561. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir2/file0</expected-output>
  9562. </comparator>
  9563. </comparators>
  9564. </test>
  9565. <test> <!-- TESTED -->
  9566. <description>chmod: change permission(octal mode) of multiple directories in absolute path recursively using globbing</description>
  9567. <test-commands>
  9568. <command>-fs NAMENODE -mkdir /dir0</command>
  9569. <command>-fs NAMENODE -mkdir /dir0/dir1</command>
  9570. <command>-fs NAMENODE -touchz /dir0/file0</command>
  9571. <command>-fs NAMENODE -touchz /dir0/dir1/file1</command>
  9572. <command>-fs NAMENODE -touchz /dir0/dir1/file2</command>
  9573. <command>-fs NAMENODE -mkdir /dir2</command>
  9574. <command>-fs NAMENODE -mkdir /dir2/dir1</command>
  9575. <command>-fs NAMENODE -touchz /dir2/file0</command>
  9576. <command>-fs NAMENODE -touchz /dir2/dir1/file1</command>
  9577. <command>-fs NAMENODE -touchz /dir2/dir1/file2</command>
  9578. <command>-fs NAMENODE -chmod -R 777 /dir*</command>
  9579. <command>-fs NAMENODE -ls -R /dir*</command>
  9580. </test-commands>
  9581. <cleanup-commands>
  9582. <command>-fs NAMENODE -rm -r /dir*</command>
  9583. </cleanup-commands>
  9584. <comparators>
  9585. <comparator>
  9586. <type>RegexpComparator</type>
  9587. <expected-output>^drwxrwxrwx( )*-( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1</expected-output>
  9588. </comparator>
  9589. <comparator>
  9590. <type>RegexpComparator</type>
  9591. <expected-output>^-rwxrwxrwx( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1/file1</expected-output>
  9592. </comparator>
  9593. <comparator>
  9594. <type>RegexpComparator</type>
  9595. <expected-output>^-rwxrwxrwx( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1/file2</expected-output>
  9596. </comparator>
  9597. <comparator>
  9598. <type>RegexpComparator</type>
  9599. <expected-output>^-rwxrwxrwx( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/file0</expected-output>
  9600. </comparator>
  9601. <comparator>
  9602. <type>RegexpComparator</type>
  9603. <expected-output>^drwxrwxrwx( )*-( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir2/dir1</expected-output>
  9604. </comparator>
  9605. <comparator>
  9606. <type>RegexpComparator</type>
  9607. <expected-output>^-rwxrwxrwx( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir2/dir1/file1</expected-output>
  9608. </comparator>
  9609. <comparator>
  9610. <type>RegexpComparator</type>
  9611. <expected-output>^-rwxrwxrwx( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir2/dir1/file2</expected-output>
  9612. </comparator>
  9613. <comparator>
  9614. <type>RegexpComparator</type>
  9615. <expected-output>^-rwxrwxrwx( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir2/file0</expected-output>
  9616. </comparator>
  9617. </comparators>
  9618. </test>
  9619. <test> <!-- TESTED -->
  9620. <description>chmod: change permission(octal mode) of multiple directories in relative path recursively using globbing</description>
  9621. <test-commands>
  9622. <command>-fs NAMENODE -mkdir -p dir0</command>
  9623. <command>-fs NAMENODE -mkdir -p dir0/dir1</command>
  9624. <command>-fs NAMENODE -touchz dir0/file0</command>
  9625. <command>-fs NAMENODE -touchz dir0/dir1/file1</command>
  9626. <command>-fs NAMENODE -touchz dir0/dir1/file2</command>
  9627. <command>-fs NAMENODE -mkdir -p dir2</command>
  9628. <command>-fs NAMENODE -mkdir -p dir2/dir1</command>
  9629. <command>-fs NAMENODE -touchz dir2/file0</command>
  9630. <command>-fs NAMENODE -touchz dir2/dir1/file1</command>
  9631. <command>-fs NAMENODE -touchz dir2/dir1/file2</command>
  9632. <command>-fs NAMENODE -chmod -R 777 dir*</command>
  9633. <command>-fs NAMENODE -ls -R dir*</command>
  9634. </test-commands>
  9635. <cleanup-commands>
  9636. <command>-fs NAMENODE -rm -r dir*</command>
  9637. </cleanup-commands>
  9638. <comparators>
  9639. <comparator>
  9640. <type>RegexpComparator</type>
  9641. <expected-output>^drwxrwxrwx( )*-( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/dir1</expected-output>
  9642. </comparator>
  9643. <comparator>
  9644. <type>RegexpComparator</type>
  9645. <expected-output>^-rwxrwxrwx( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/dir1/file1</expected-output>
  9646. </comparator>
  9647. <comparator>
  9648. <type>RegexpComparator</type>
  9649. <expected-output>^-rwxrwxrwx( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/dir1/file2</expected-output>
  9650. </comparator>
  9651. <comparator>
  9652. <type>RegexpComparator</type>
  9653. <expected-output>^-rwxrwxrwx( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/file0</expected-output>
  9654. </comparator>
  9655. <comparator>
  9656. <type>RegexpComparator</type>
  9657. <expected-output>^drwxrwxrwx( )*-( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir2/dir1</expected-output>
  9658. </comparator>
  9659. <comparator>
  9660. <type>RegexpComparator</type>
  9661. <expected-output>^-rwxrwxrwx( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir2/dir1/file1</expected-output>
  9662. </comparator>
  9663. <comparator>
  9664. <type>RegexpComparator</type>
  9665. <expected-output>^-rwxrwxrwx( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir2/dir1/file2</expected-output>
  9666. </comparator>
  9667. <comparator>
  9668. <type>RegexpComparator</type>
  9669. <expected-output>^-rwxrwxrwx( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir2/file0</expected-output>
  9670. </comparator>
  9671. </comparators>
  9672. </test>
  9673. <test> <!-- TESTED -->
  9674. <description>chmod: change permission(octal mode) of multiple directories in absolute path recursively without globbing</description>
  9675. <test-commands>
  9676. <command>-fs NAMENODE -mkdir /dir0</command>
  9677. <command>-fs NAMENODE -mkdir /dir0/dir1</command>
  9678. <command>-fs NAMENODE -touchz /dir0/file0</command>
  9679. <command>-fs NAMENODE -touchz /dir0/dir1/file1</command>
  9680. <command>-fs NAMENODE -touchz /dir0/dir1/file2</command>
  9681. <command>-fs NAMENODE -mkdir /dir2</command>
  9682. <command>-fs NAMENODE -mkdir /dir2/dir1</command>
  9683. <command>-fs NAMENODE -touchz /dir2/file0</command>
  9684. <command>-fs NAMENODE -touchz /dir2/dir1/file1</command>
  9685. <command>-fs NAMENODE -touchz /dir2/dir1/file2</command>
  9686. <command>-fs NAMENODE -chmod -R 777 /dir0 /dir2</command>
  9687. <command>-fs NAMENODE -ls -R /dir*</command>
  9688. </test-commands>
  9689. <cleanup-commands>
  9690. <command>-fs NAMENODE -rm -r /dir*</command>
  9691. </cleanup-commands>
  9692. <comparators>
  9693. <comparator>
  9694. <type>RegexpComparator</type>
  9695. <expected-output>^drwxrwxrwx( )*-( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1</expected-output>
  9696. </comparator>
  9697. <comparator>
  9698. <type>RegexpComparator</type>
  9699. <expected-output>^-rwxrwxrwx( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1/file1</expected-output>
  9700. </comparator>
  9701. <comparator>
  9702. <type>RegexpComparator</type>
  9703. <expected-output>^-rwxrwxrwx( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1/file2</expected-output>
  9704. </comparator>
  9705. <comparator>
  9706. <type>RegexpComparator</type>
  9707. <expected-output>^-rwxrwxrwx( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/file0</expected-output>
  9708. </comparator>
  9709. <comparator>
  9710. <type>RegexpComparator</type>
  9711. <expected-output>^drwxrwxrwx( )*-( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir2/dir1</expected-output>
  9712. </comparator>
  9713. <comparator>
  9714. <type>RegexpComparator</type>
  9715. <expected-output>^-rwxrwxrwx( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir2/dir1/file1</expected-output>
  9716. </comparator>
  9717. <comparator>
  9718. <type>RegexpComparator</type>
  9719. <expected-output>^-rwxrwxrwx( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir2/dir1/file2</expected-output>
  9720. </comparator>
  9721. <comparator>
  9722. <type>RegexpComparator</type>
  9723. <expected-output>^-rwxrwxrwx( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir2/file0</expected-output>
  9724. </comparator>
  9725. </comparators>
  9726. </test>
  9727. <test> <!-- TESTED -->
  9728. <description>chmod: change permission(octal mode) of multiple directories in relative path recursively without globbing</description>
  9729. <test-commands>
  9730. <command>-fs NAMENODE -mkdir -p dir0</command>
  9731. <command>-fs NAMENODE -mkdir -p dir0/dir1</command>
  9732. <command>-fs NAMENODE -touchz dir0/file0</command>
  9733. <command>-fs NAMENODE -touchz dir0/dir1/file1</command>
  9734. <command>-fs NAMENODE -touchz dir0/dir1/file2</command>
  9735. <command>-fs NAMENODE -mkdir -p dir2</command>
  9736. <command>-fs NAMENODE -mkdir -p dir2/dir1</command>
  9737. <command>-fs NAMENODE -touchz dir2/file0</command>
  9738. <command>-fs NAMENODE -touchz dir2/dir1/file1</command>
  9739. <command>-fs NAMENODE -touchz dir2/dir1/file2</command>
  9740. <command>-fs NAMENODE -chmod -R 777 dir0 dir2</command>
  9741. <command>-fs NAMENODE -ls -R dir*</command>
  9742. </test-commands>
  9743. <cleanup-commands>
  9744. <command>-fs NAMENODE -rm -r dir*</command>
  9745. </cleanup-commands>
  9746. <comparators>
  9747. <comparator>
  9748. <type>RegexpComparator</type>
  9749. <expected-output>^drwxrwxrwx( )*-( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/dir1</expected-output>
  9750. </comparator>
  9751. <comparator>
  9752. <type>RegexpComparator</type>
  9753. <expected-output>^-rwxrwxrwx( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/dir1/file1</expected-output>
  9754. </comparator>
  9755. <comparator>
  9756. <type>RegexpComparator</type>
  9757. <expected-output>^-rwxrwxrwx( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/dir1/file2</expected-output>
  9758. </comparator>
  9759. <comparator>
  9760. <type>RegexpComparator</type>
  9761. <expected-output>^-rwxrwxrwx( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/file0</expected-output>
  9762. </comparator>
  9763. <comparator>
  9764. <type>RegexpComparator</type>
  9765. <expected-output>^drwxrwxrwx( )*-( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir2/dir1</expected-output>
  9766. </comparator>
  9767. <comparator>
  9768. <type>RegexpComparator</type>
  9769. <expected-output>^-rwxrwxrwx( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir2/dir1/file1</expected-output>
  9770. </comparator>
  9771. <comparator>
  9772. <type>RegexpComparator</type>
  9773. <expected-output>^-rwxrwxrwx( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir2/dir1/file2</expected-output>
  9774. </comparator>
  9775. <comparator>
  9776. <type>RegexpComparator</type>
  9777. <expected-output>^-rwxrwxrwx( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir2/file0</expected-output>
  9778. </comparator>
  9779. </comparators>
  9780. </test>
  9781. <test> <!-- TESTED -->
  9782. <description>chmod: change permission(normal mode) of multiple directories in absolute path recursively using globbing</description>
  9783. <test-commands>
  9784. <command>-fs NAMENODE -mkdir /dir0</command>
  9785. <command>-fs NAMENODE -mkdir /dir0/dir1</command>
  9786. <command>-fs NAMENODE -touchz /dir0/file0</command>
  9787. <command>-fs NAMENODE -touchz /dir0/dir1/file1</command>
  9788. <command>-fs NAMENODE -touchz /dir0/dir1/file2</command>
  9789. <command>-fs NAMENODE -mkdir /dir2</command>
  9790. <command>-fs NAMENODE -mkdir /dir2/dir1</command>
  9791. <command>-fs NAMENODE -touchz /dir2/file0</command>
  9792. <command>-fs NAMENODE -touchz /dir2/dir1/file1</command>
  9793. <command>-fs NAMENODE -touchz /dir2/dir1/file2</command>
  9794. <command>-fs NAMENODE -chmod -R a+rwx /dir*</command>
  9795. <command>-fs NAMENODE -ls -R /dir*</command>
  9796. </test-commands>
  9797. <cleanup-commands>
  9798. <command>-fs NAMENODE -rm -r /dir*</command>
  9799. </cleanup-commands>
  9800. <comparators>
  9801. <comparator>
  9802. <type>RegexpComparator</type>
  9803. <expected-output>^drwxrwxrwx( )*-( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1</expected-output>
  9804. </comparator>
  9805. <comparator>
  9806. <type>RegexpComparator</type>
  9807. <expected-output>^-rwxrwxrwx( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1/file1</expected-output>
  9808. </comparator>
  9809. <comparator>
  9810. <type>RegexpComparator</type>
  9811. <expected-output>^-rwxrwxrwx( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1/file2</expected-output>
  9812. </comparator>
  9813. <comparator>
  9814. <type>RegexpComparator</type>
  9815. <expected-output>^-rwxrwxrwx( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/file0</expected-output>
  9816. </comparator>
  9817. <comparator>
  9818. <type>RegexpComparator</type>
  9819. <expected-output>^drwxrwxrwx( )*-( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir2/dir1</expected-output>
  9820. </comparator>
  9821. <comparator>
  9822. <type>RegexpComparator</type>
  9823. <expected-output>^-rwxrwxrwx( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir2/dir1/file1</expected-output>
  9824. </comparator>
  9825. <comparator>
  9826. <type>RegexpComparator</type>
  9827. <expected-output>^-rwxrwxrwx( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir2/dir1/file2</expected-output>
  9828. </comparator>
  9829. <comparator>
  9830. <type>RegexpComparator</type>
  9831. <expected-output>^-rwxrwxrwx( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir2/file0</expected-output>
  9832. </comparator>
  9833. </comparators>
  9834. </test>
  9835. <test> <!-- TESTED -->
  9836. <description>chmod: change permission(normal mode) of multiple directories in relative path recursively using globbing</description>
  9837. <test-commands>
  9838. <command>-fs NAMENODE -mkdir -p dir0</command>
  9839. <command>-fs NAMENODE -mkdir -p dir0/dir1</command>
  9840. <command>-fs NAMENODE -touchz dir0/file0</command>
  9841. <command>-fs NAMENODE -touchz dir0/dir1/file1</command>
  9842. <command>-fs NAMENODE -touchz dir0/dir1/file2</command>
  9843. <command>-fs NAMENODE -mkdir -p dir2</command>
  9844. <command>-fs NAMENODE -mkdir -p dir2/dir1</command>
  9845. <command>-fs NAMENODE -touchz dir2/file0</command>
  9846. <command>-fs NAMENODE -touchz dir2/dir1/file1</command>
  9847. <command>-fs NAMENODE -touchz dir2/dir1/file2</command>
  9848. <command>-fs NAMENODE -chmod -R a+rwx dir*</command>
  9849. <command>-fs NAMENODE -ls -R dir*</command>
  9850. </test-commands>
  9851. <cleanup-commands>
  9852. <command>-fs NAMENODE -rm -r dir*</command>
  9853. </cleanup-commands>
  9854. <comparators>
  9855. <comparator>
  9856. <type>RegexpComparator</type>
  9857. <expected-output>^drwxrwxrwx( )*-( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/dir1</expected-output>
  9858. </comparator>
  9859. <comparator>
  9860. <type>RegexpComparator</type>
  9861. <expected-output>^-rwxrwxrwx( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/dir1/file1</expected-output>
  9862. </comparator>
  9863. <comparator>
  9864. <type>RegexpComparator</type>
  9865. <expected-output>^-rwxrwxrwx( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/dir1/file2</expected-output>
  9866. </comparator>
  9867. <comparator>
  9868. <type>RegexpComparator</type>
  9869. <expected-output>^-rwxrwxrwx( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/file0</expected-output>
  9870. </comparator>
  9871. <comparator>
  9872. <type>RegexpComparator</type>
  9873. <expected-output>^drwxrwxrwx( )*-( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir2/dir1</expected-output>
  9874. </comparator>
  9875. <comparator>
  9876. <type>RegexpComparator</type>
  9877. <expected-output>^-rwxrwxrwx( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir2/dir1/file1</expected-output>
  9878. </comparator>
  9879. <comparator>
  9880. <type>RegexpComparator</type>
  9881. <expected-output>^-rwxrwxrwx( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir2/dir1/file2</expected-output>
  9882. </comparator>
  9883. <comparator>
  9884. <type>RegexpComparator</type>
  9885. <expected-output>^-rwxrwxrwx( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir2/file0</expected-output>
  9886. </comparator>
  9887. </comparators>
  9888. </test>
  9889. <test> <!-- TESTED -->
  9890. <description>chmod: change permission(normal mode) of multiple directories in absolute path recursively without globbing</description>
  9891. <test-commands>
  9892. <command>-fs NAMENODE -mkdir /dir0</command>
  9893. <command>-fs NAMENODE -mkdir /dir0/dir1</command>
  9894. <command>-fs NAMENODE -touchz /dir0/file0</command>
  9895. <command>-fs NAMENODE -touchz /dir0/dir1/file1</command>
  9896. <command>-fs NAMENODE -touchz /dir0/dir1/file2</command>
  9897. <command>-fs NAMENODE -mkdir /dir2</command>
  9898. <command>-fs NAMENODE -mkdir /dir2/dir1</command>
  9899. <command>-fs NAMENODE -touchz /dir2/file0</command>
  9900. <command>-fs NAMENODE -touchz /dir2/dir1/file1</command>
  9901. <command>-fs NAMENODE -touchz /dir2/dir1/file2</command>
  9902. <command>-fs NAMENODE -chmod -R a+rwx /dir0 /dir2</command>
  9903. <command>-fs NAMENODE -ls -R /dir*</command>
  9904. </test-commands>
  9905. <cleanup-commands>
  9906. <command>-fs NAMENODE -rm -r /dir*</command>
  9907. </cleanup-commands>
  9908. <comparators>
  9909. <comparator>
  9910. <type>RegexpComparator</type>
  9911. <expected-output>^drwxrwxrwx( )*-( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1</expected-output>
  9912. </comparator>
  9913. <comparator>
  9914. <type>RegexpComparator</type>
  9915. <expected-output>^-rwxrwxrwx( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1/file1</expected-output>
  9916. </comparator>
  9917. <comparator>
  9918. <type>RegexpComparator</type>
  9919. <expected-output>^-rwxrwxrwx( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1/file2</expected-output>
  9920. </comparator>
  9921. <comparator>
  9922. <type>RegexpComparator</type>
  9923. <expected-output>^-rwxrwxrwx( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/file0</expected-output>
  9924. </comparator>
  9925. <comparator>
  9926. <type>RegexpComparator</type>
  9927. <expected-output>^drwxrwxrwx( )*-( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir2/dir1</expected-output>
  9928. </comparator>
  9929. <comparator>
  9930. <type>RegexpComparator</type>
  9931. <expected-output>^-rwxrwxrwx( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir2/dir1/file1</expected-output>
  9932. </comparator>
  9933. <comparator>
  9934. <type>RegexpComparator</type>
  9935. <expected-output>^-rwxrwxrwx( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir2/dir1/file2</expected-output>
  9936. </comparator>
  9937. <comparator>
  9938. <type>RegexpComparator</type>
  9939. <expected-output>^-rwxrwxrwx( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir2/file0</expected-output>
  9940. </comparator>
  9941. </comparators>
  9942. </test>
  9943. <test> <!-- TESTED -->
  9944. <description>chmod: change permission(normal mode) of multiple directories in relative path recursively without globbing</description>
  9945. <test-commands>
  9946. <command>-fs NAMENODE -mkdir -p dir0</command>
  9947. <command>-fs NAMENODE -mkdir -p dir0/dir1</command>
  9948. <command>-fs NAMENODE -touchz dir0/file0</command>
  9949. <command>-fs NAMENODE -touchz dir0/dir1/file1</command>
  9950. <command>-fs NAMENODE -touchz dir0/dir1/file2</command>
  9951. <command>-fs NAMENODE -mkdir -p dir2</command>
  9952. <command>-fs NAMENODE -mkdir -p dir2/dir1</command>
  9953. <command>-fs NAMENODE -touchz dir2/file0</command>
  9954. <command>-fs NAMENODE -touchz dir2/dir1/file1</command>
  9955. <command>-fs NAMENODE -touchz dir2/dir1/file2</command>
  9956. <command>-fs NAMENODE -chmod -R a+rwx dir0 dir2</command>
  9957. <command>-fs NAMENODE -ls -R dir*</command>
  9958. </test-commands>
  9959. <cleanup-commands>
  9960. <command>-fs NAMENODE -rm -r dir*</command>
  9961. </cleanup-commands>
  9962. <comparators>
  9963. <comparator>
  9964. <type>RegexpComparator</type>
  9965. <expected-output>^drwxrwxrwx( )*-( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/dir1</expected-output>
  9966. </comparator>
  9967. <comparator>
  9968. <type>RegexpComparator</type>
  9969. <expected-output>^-rwxrwxrwx( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/dir1/file1</expected-output>
  9970. </comparator>
  9971. <comparator>
  9972. <type>RegexpComparator</type>
  9973. <expected-output>^-rwxrwxrwx( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/dir1/file2</expected-output>
  9974. </comparator>
  9975. <comparator>
  9976. <type>RegexpComparator</type>
  9977. <expected-output>^-rwxrwxrwx( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/file0</expected-output>
  9978. </comparator>
  9979. <comparator>
  9980. <type>RegexpComparator</type>
  9981. <expected-output>^drwxrwxrwx( )*-( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir2/dir1</expected-output>
  9982. </comparator>
  9983. <comparator>
  9984. <type>RegexpComparator</type>
  9985. <expected-output>^-rwxrwxrwx( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir2/dir1/file1</expected-output>
  9986. </comparator>
  9987. <comparator>
  9988. <type>RegexpComparator</type>
  9989. <expected-output>^-rwxrwxrwx( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir2/dir1/file2</expected-output>
  9990. </comparator>
  9991. <comparator>
  9992. <type>RegexpComparator</type>
  9993. <expected-output>^-rwxrwxrwx( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir2/file0</expected-output>
  9994. </comparator>
  9995. </comparators>
  9996. </test>
  9997. <test> <!-- TESTED -->
  9998. <description>chmod: invalid value in octal mode of file in absolute path</description>
  9999. <test-commands>
  10000. <command>-fs NAMENODE -touchz /file1</command>
  10001. <command>-fs NAMENODE -chmod 999 /file1</command>
  10002. </test-commands>
  10003. <cleanup-commands>
  10004. <command>-fs NAMENODE -rm /file1</command>
  10005. </cleanup-commands>
  10006. <comparators>
  10007. <comparator>
  10008. <type>RegexpComparator</type>
  10009. <expected-output>^-chmod: chmod : mode '999' does not match the expected pattern.</expected-output>
  10010. </comparator>
  10011. </comparators>
  10012. </test>
  10013. <test> <!-- TESTED -->
  10014. <description>chmod: invalid value in octal mode of file in relative path</description>
  10015. <test-commands>
  10016. <command>-fs NAMENODE -touchz file1</command>
  10017. <command>-fs NAMENODE -chmod 999 file1</command>
  10018. </test-commands>
  10019. <cleanup-commands>
  10020. <command>-fs NAMENODE -rm file1</command>
  10021. </cleanup-commands>
  10022. <comparators>
  10023. <comparator>
  10024. <type>RegexpComparator</type>
  10025. <expected-output>^-chmod: chmod : mode '999' does not match the expected pattern.</expected-output>
  10026. </comparator>
  10027. </comparators>
  10028. </test>
  10029. <test> <!-- TESTED -->
  10030. <description>chmod: invalid value in normal mode of file in absolute path</description>
  10031. <test-commands>
  10032. <command>-fs NAMENODE -touchz /file1</command>
  10033. <command>-fs NAMENODE -chmod r+def /file1</command>
  10034. </test-commands>
  10035. <cleanup-commands>
  10036. <command>-fs NAMENODE -rm /file1</command>
  10037. </cleanup-commands>
  10038. <comparators>
  10039. <comparator>
  10040. <type>RegexpComparator</type>
  10041. <expected-output>^-chmod: chmod : mode \'r\+def\' does not match the expected pattern.</expected-output>
  10042. </comparator>
  10043. </comparators>
  10044. </test>
  10045. <test> <!-- TESTED -->
  10046. <description>chmod: invalid value in normal mode of file in relative path</description>
  10047. <test-commands>
  10048. <command>-fs NAMENODE -touchz file1</command>
  10049. <command>-fs NAMENODE -chmod r+def file1</command>
  10050. </test-commands>
  10051. <cleanup-commands>
  10052. <command>-fs NAMENODE -rm file1</command>
  10053. </cleanup-commands>
  10054. <comparators>
  10055. <comparator>
  10056. <type>RegexpComparator</type>
  10057. <expected-output>^-chmod: chmod : mode \'r\+def\' does not match the expected pattern.</expected-output>
  10058. </comparator>
  10059. </comparators>
  10060. </test>
  10061. <test> <!-- TESTED -->
  10062. <description>chmod: change permission(octal mode) of file in hdfs:// path</description>
  10063. <test-commands>
  10064. <command>-fs NAMENODE -touchz hdfs:///file1</command>
  10065. <command>-fs NAMENODE -chmod 777 hdfs:///file1</command>
  10066. <command>-fs NAMENODE -ls hdfs:///file1</command>
  10067. </test-commands>
  10068. <cleanup-commands>
  10069. <command>-fs NAMENODE -rm hdfs:///file1</command>
  10070. </cleanup-commands>
  10071. <comparators>
  10072. <comparator>
  10073. <type>RegexpComparator</type>
  10074. <expected-output>^-rwxrwxrwx( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///file1</expected-output>
  10075. </comparator>
  10076. </comparators>
  10077. </test>
  10078. <test> <!-- TESTED -->
  10079. <description>chmod: change permission(octal mode) of directory in hdfs:// path</description>
  10080. <test-commands>
  10081. <command>-fs NAMENODE -mkdir hdfs:///dir0</command>
  10082. <command>-fs NAMENODE -mkdir hdfs:///dir0/dir1</command>
  10083. <command>-fs NAMENODE -touchz hdfs:///dir0/file0</command>
  10084. <command>-fs NAMENODE -touchz hdfs:///dir0/dir1/file1</command>
  10085. <command>-fs NAMENODE -touchz hdfs:///dir0/dir1/file2</command>
  10086. <command>-fs NAMENODE -chmod 777 hdfs:///dir0/dir1</command>
  10087. <command>-fs NAMENODE -ls -R hdfs:///dir0</command>
  10088. </test-commands>
  10089. <cleanup-commands>
  10090. <command>-fs NAMENODE -rm -r hdfs:///dir0</command>
  10091. </cleanup-commands>
  10092. <comparators>
  10093. <comparator>
  10094. <type>RegexpComparator</type>
  10095. <expected-output>^drwxrwxrwx( )*-( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir0/dir1</expected-output>
  10096. </comparator>
  10097. <comparator>
  10098. <type>RegexpComparator</type>
  10099. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir0/dir1/file1</expected-output>
  10100. </comparator>
  10101. <comparator>
  10102. <type>RegexpComparator</type>
  10103. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir0/dir1/file2</expected-output>
  10104. </comparator>
  10105. <comparator>
  10106. <type>RegexpComparator</type>
  10107. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir0/file0</expected-output>
  10108. </comparator>
  10109. </comparators>
  10110. </test>
  10111. <test> <!-- TESTED -->
  10112. <description>chmod: change permission(normal mode) of file in hdfs:// path</description>
  10113. <test-commands>
  10114. <command>-fs NAMENODE -touchz hdfs:///file1</command>
  10115. <command>-fs NAMENODE -chmod a+rw hdfs:///file1</command>
  10116. <command>-fs NAMENODE -ls hdfs:///file1</command>
  10117. </test-commands>
  10118. <cleanup-commands>
  10119. <command>-fs NAMENODE -rm hdfs:///file1</command>
  10120. </cleanup-commands>
  10121. <comparators>
  10122. <comparator>
  10123. <type>RegexpComparator</type>
  10124. <expected-output>^-rw-rw-rw-( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///file1</expected-output>
  10125. </comparator>
  10126. </comparators>
  10127. </test>
  10128. <test> <!-- TESTED -->
  10129. <description>chmod: change permission(normal mode) of directory in hdfs:// path</description>
  10130. <test-commands>
  10131. <command>-fs NAMENODE -mkdir hdfs:///dir0</command>
  10132. <command>-fs NAMENODE -mkdir hdfs:///dir0/dir1</command>
  10133. <command>-fs NAMENODE -touchz hdfs:///dir0/file0</command>
  10134. <command>-fs NAMENODE -touchz hdfs:///dir0/dir1/file1</command>
  10135. <command>-fs NAMENODE -touchz hdfs:///dir0/dir1/file2</command>
  10136. <command>-fs NAMENODE -chmod a+rwx hdfs:///dir0/dir1</command>
  10137. <command>-fs NAMENODE -ls -R hdfs:///dir0</command>
  10138. </test-commands>
  10139. <cleanup-commands>
  10140. <command>-fs NAMENODE -rm -r hdfs:///dir0</command>
  10141. </cleanup-commands>
  10142. <comparators>
  10143. <comparator>
  10144. <type>RegexpComparator</type>
  10145. <expected-output>^drwxrwxrwx( )*-( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir0/dir1</expected-output>
  10146. </comparator>
  10147. <comparator>
  10148. <type>RegexpComparator</type>
  10149. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir0/dir1/file1</expected-output>
  10150. </comparator>
  10151. <comparator>
  10152. <type>RegexpComparator</type>
  10153. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir0/dir1/file2</expected-output>
  10154. </comparator>
  10155. <comparator>
  10156. <type>RegexpComparator</type>
  10157. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir0/file0</expected-output>
  10158. </comparator>
  10159. </comparators>
  10160. </test>
  10161. <test> <!-- TESTED -->
  10162. <description>chmod: change permission(octal mode) of directory in hdfs:// path recursively </description>
  10163. <test-commands>
  10164. <command>-fs NAMENODE -mkdir hdfs:///dir0</command>
  10165. <command>-fs NAMENODE -mkdir hdfs:///dir0/dir1</command>
  10166. <command>-fs NAMENODE -touchz hdfs:///dir0/file0</command>
  10167. <command>-fs NAMENODE -touchz hdfs:///dir0/dir1/file1</command>
  10168. <command>-fs NAMENODE -touchz hdfs:///dir0/dir1/file2</command>
  10169. <command>-fs NAMENODE -chmod -R 777 hdfs:///dir0/dir1</command>
  10170. <command>-fs NAMENODE -ls -R hdfs:///dir0</command>
  10171. </test-commands>
  10172. <cleanup-commands>
  10173. <command>-fs NAMENODE -rm -r hdfs:///dir0</command>
  10174. </cleanup-commands>
  10175. <comparators>
  10176. <comparator>
  10177. <type>RegexpComparator</type>
  10178. <expected-output>^drwxrwxrwx( )*-( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir0/dir1</expected-output>
  10179. </comparator>
  10180. <comparator>
  10181. <type>RegexpComparator</type>
  10182. <expected-output>^-rwxrwxrwx( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir0/dir1/file1</expected-output>
  10183. </comparator>
  10184. <comparator>
  10185. <type>RegexpComparator</type>
  10186. <expected-output>^-rwxrwxrwx( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir0/dir1/file2</expected-output>
  10187. </comparator>
  10188. <comparator>
  10189. <type>RegexpComparator</type>
  10190. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir0/file0</expected-output>
  10191. </comparator>
  10192. </comparators>
  10193. </test>
  10194. <test> <!-- TESTED -->
  10195. <description>chmod: change permission(normal mode) of directory in hdfs:// path recursively</description>
  10196. <test-commands>
  10197. <command>-fs NAMENODE -mkdir hdfs:///dir0</command>
  10198. <command>-fs NAMENODE -mkdir hdfs:///dir0/dir1</command>
  10199. <command>-fs NAMENODE -touchz hdfs:///dir0/file0</command>
  10200. <command>-fs NAMENODE -touchz hdfs:///dir0/dir1/file1</command>
  10201. <command>-fs NAMENODE -touchz hdfs:///dir0/dir1/file2</command>
  10202. <command>-fs NAMENODE -chmod -R a+rwx hdfs:///dir0/dir1</command>
  10203. <command>-fs NAMENODE -ls -R hdfs:///dir0</command>
  10204. </test-commands>
  10205. <cleanup-commands>
  10206. <command>-fs NAMENODE -rm -r hdfs:///dir0</command>
  10207. </cleanup-commands>
  10208. <comparators>
  10209. <comparator>
  10210. <type>RegexpComparator</type>
  10211. <expected-output>^drwxrwxrwx( )*-( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir0/dir1</expected-output>
  10212. </comparator>
  10213. <comparator>
  10214. <type>RegexpComparator</type>
  10215. <expected-output>^-rwxrwxrwx( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir0/dir1/file1</expected-output>
  10216. </comparator>
  10217. <comparator>
  10218. <type>RegexpComparator</type>
  10219. <expected-output>^-rwxrwxrwx( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir0/dir1/file2</expected-output>
  10220. </comparator>
  10221. <comparator>
  10222. <type>RegexpComparator</type>
  10223. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir0/file0</expected-output>
  10224. </comparator>
  10225. </comparators>
  10226. </test>
  10227. <test> <!-- TESTED -->
  10228. <description>chmod: change permission(octal mode) of non existent file in hdfs:// path</description>
  10229. <test-commands>
  10230. <command>-fs NAMENODE -chmod 777 hdfs:///file1</command>
  10231. </test-commands>
  10232. <cleanup-commands>
  10233. <command>-fs NAMENODE -rm hdfs:///file1</command>
  10234. </cleanup-commands>
  10235. <comparators>
  10236. <comparator>
  10237. <type>RegexpComparator</type>
  10238. <expected-output>^chmod: `hdfs:///file1': No such file or directory</expected-output>
  10239. </comparator>
  10240. </comparators>
  10241. </test>
  10242. <test> <!-- TESTED -->
  10243. <description>chmod: change permission(normal mode) of non existent file in hdfs:// path</description>
  10244. <test-commands>
  10245. <command>-fs NAMENODE -chmod a+rw hdfs:///file1</command>
  10246. </test-commands>
  10247. <cleanup-commands>
  10248. <command>-fs NAMENODE -rm hdfs:///file1</command>
  10249. </cleanup-commands>
  10250. <comparators>
  10251. <comparator>
  10252. <type>RegexpComparator</type>
  10253. <expected-output>^chmod: `hdfs:///file1': No such file or directory</expected-output>
  10254. </comparator>
  10255. </comparators>
  10256. </test>
  10257. <test> <!-- TESTED -->
  10258. <description>chmod: change permission(octal mode) of multiple files in hdfs:// path using globbing</description>
  10259. <test-commands>
  10260. <command>-fs NAMENODE -touchz hdfs:///file1</command>
  10261. <command>-fs NAMENODE -touchz hdfs:///file2</command>
  10262. <command>-fs NAMENODE -touchz hdfs:///file3</command>
  10263. <command>-fs NAMENODE -touchz hdfs:///file4</command>
  10264. <command>-fs NAMENODE -chmod 777 hdfs:///file* </command>
  10265. <command>-fs NAMENODE -ls -R hdfs:///file*</command>
  10266. </test-commands>
  10267. <cleanup-commands>
  10268. <command>-fs NAMENODE -rm hdfs:///file*</command>
  10269. </cleanup-commands>
  10270. <comparators>
  10271. <comparator>
  10272. <type>RegexpComparator</type>
  10273. <expected-output>^-rwxrwxrwx( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///file1</expected-output>
  10274. </comparator>
  10275. <comparator>
  10276. <type>RegexpComparator</type>
  10277. <expected-output>^-rwxrwxrwx( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///file2</expected-output>
  10278. </comparator>
  10279. <comparator>
  10280. <type>RegexpComparator</type>
  10281. <expected-output>^-rwxrwxrwx( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///file3</expected-output>
  10282. </comparator>
  10283. <comparator>
  10284. <type>RegexpComparator</type>
  10285. <expected-output>^-rwxrwxrwx( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///file4</expected-output>
  10286. </comparator>
  10287. </comparators>
  10288. </test>
  10289. <test> <!-- TESTED -->
  10290. <description>chmod: change permission(octal mode) of multiple directories in hdfs:// path using globbing</description>
  10291. <test-commands>
  10292. <command>-fs NAMENODE -mkdir hdfs:///dir0</command>
  10293. <command>-fs NAMENODE -mkdir hdfs:///dir0/dir1</command>
  10294. <command>-fs NAMENODE -touchz hdfs:///dir0/file0</command>
  10295. <command>-fs NAMENODE -touchz hdfs:///dir0/dir1/file1</command>
  10296. <command>-fs NAMENODE -touchz hdfs:///dir0/dir1/file2</command>
  10297. <command>-fs NAMENODE -mkdir hdfs:///dir2</command>
  10298. <command>-fs NAMENODE -mkdir hdfs:///dir2/dir1</command>
  10299. <command>-fs NAMENODE -touchz hdfs:///dir2/file0</command>
  10300. <command>-fs NAMENODE -touchz hdfs:///dir2/dir1/file1</command>
  10301. <command>-fs NAMENODE -touchz hdfs:///dir2/dir1/file2</command>
  10302. <command>-fs NAMENODE -chmod 777 hdfs:///dir*</command>
  10303. <command>-fs NAMENODE -ls -R hdfs:///dir*</command>
  10304. </test-commands>
  10305. <cleanup-commands>
  10306. <command>-fs NAMENODE -rm -r hdfs:///dir*</command>
  10307. </cleanup-commands>
  10308. <comparators>
  10309. <comparator>
  10310. <type>RegexpComparator</type>
  10311. <expected-output>^drwxr-xr-x( )*-( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir0/dir1</expected-output>
  10312. </comparator>
  10313. <comparator>
  10314. <type>RegexpComparator</type>
  10315. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir0/dir1/file1</expected-output>
  10316. </comparator>
  10317. <comparator>
  10318. <type>RegexpComparator</type>
  10319. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir0/dir1/file2</expected-output>
  10320. </comparator>
  10321. <comparator>
  10322. <type>RegexpComparator</type>
  10323. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir0/file0</expected-output>
  10324. </comparator>
  10325. <comparator>
  10326. <type>RegexpComparator</type>
  10327. <expected-output>^drwxr-xr-x( )*-( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir2/dir1</expected-output>
  10328. </comparator>
  10329. <comparator>
  10330. <type>RegexpComparator</type>
  10331. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir2/dir1/file1</expected-output>
  10332. </comparator>
  10333. <comparator>
  10334. <type>RegexpComparator</type>
  10335. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir2/dir1/file2</expected-output>
  10336. </comparator>
  10337. <comparator>
  10338. <type>RegexpComparator</type>
  10339. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir2/file0</expected-output>
  10340. </comparator>
  10341. </comparators>
  10342. </test>
  10343. <test> <!-- TESTED -->
  10344. <description>chmod: change permission(octal mode) of multiple files in hdfs:// path without globbing</description>
  10345. <test-commands>
  10346. <command>-fs NAMENODE -touchz hdfs:///file1</command>
  10347. <command>-fs NAMENODE -touchz hdfs:///file2</command>
  10348. <command>-fs NAMENODE -touchz hdfs:///file3</command>
  10349. <command>-fs NAMENODE -touchz hdfs:///file4</command>
  10350. <command>-fs NAMENODE -chmod 777 hdfs:///file1 hdfs:///file2 hdfs:///file3 hdfs:///file4 </command>
  10351. <command>-fs NAMENODE -ls -R hdfs:///file*</command>
  10352. </test-commands>
  10353. <cleanup-commands>
  10354. <command>-fs NAMENODE -rm hdfs:///file*</command>
  10355. </cleanup-commands>
  10356. <comparators>
  10357. <comparator>
  10358. <type>RegexpComparator</type>
  10359. <expected-output>^-rwxrwxrwx( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///file1</expected-output>
  10360. </comparator>
  10361. <comparator>
  10362. <type>RegexpComparator</type>
  10363. <expected-output>^-rwxrwxrwx( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///file2</expected-output>
  10364. </comparator>
  10365. <comparator>
  10366. <type>RegexpComparator</type>
  10367. <expected-output>^-rwxrwxrwx( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///file3</expected-output>
  10368. </comparator>
  10369. <comparator>
  10370. <type>RegexpComparator</type>
  10371. <expected-output>^-rwxrwxrwx( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///file4</expected-output>
  10372. </comparator>
  10373. </comparators>
  10374. </test>
  10375. <test> <!-- TESTED -->
  10376. <description>chmod: change permission(octal mode) of multiple directories in hdfs:// path without globbing</description>
  10377. <test-commands>
  10378. <command>-fs NAMENODE -mkdir hdfs:///dir0</command>
  10379. <command>-fs NAMENODE -mkdir hdfs:///dir0/dir1</command>
  10380. <command>-fs NAMENODE -touchz hdfs:///dir0/file0</command>
  10381. <command>-fs NAMENODE -touchz hdfs:///dir0/dir1/file1</command>
  10382. <command>-fs NAMENODE -touchz hdfs:///dir0/dir1/file2</command>
  10383. <command>-fs NAMENODE -mkdir hdfs:///dir2</command>
  10384. <command>-fs NAMENODE -mkdir hdfs:///dir2/dir1</command>
  10385. <command>-fs NAMENODE -touchz hdfs:///dir2/file0</command>
  10386. <command>-fs NAMENODE -touchz hdfs:///dir2/dir1/file1</command>
  10387. <command>-fs NAMENODE -touchz hdfs:///dir2/dir1/file2</command>
  10388. <command>-fs NAMENODE -chmod 777 hdfs:///dir0 hdfs:///dir2</command>
  10389. <command>-fs NAMENODE -ls -R hdfs:///dir*</command>
  10390. </test-commands>
  10391. <cleanup-commands>
  10392. <command>-fs NAMENODE -rm -r hdfs:///dir*</command>
  10393. </cleanup-commands>
  10394. <comparators>
  10395. <comparator>
  10396. <type>RegexpComparator</type>
  10397. <expected-output>^drwxr-xr-x( )*-( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir0/dir1</expected-output>
  10398. </comparator>
  10399. <comparator>
  10400. <type>RegexpComparator</type>
  10401. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir0/dir1/file1</expected-output>
  10402. </comparator>
  10403. <comparator>
  10404. <type>RegexpComparator</type>
  10405. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir0/dir1/file2</expected-output>
  10406. </comparator>
  10407. <comparator>
  10408. <type>RegexpComparator</type>
  10409. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir0/file0</expected-output>
  10410. </comparator>
  10411. <comparator>
  10412. <type>RegexpComparator</type>
  10413. <expected-output>^drwxr-xr-x( )*-( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir2/dir1</expected-output>
  10414. </comparator>
  10415. <comparator>
  10416. <type>RegexpComparator</type>
  10417. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir2/dir1/file1</expected-output>
  10418. </comparator>
  10419. <comparator>
  10420. <type>RegexpComparator</type>
  10421. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir2/dir1/file2</expected-output>
  10422. </comparator>
  10423. <comparator>
  10424. <type>RegexpComparator</type>
  10425. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir2/file0</expected-output>
  10426. </comparator>
  10427. </comparators>
  10428. </test>
  10429. <test> <!-- TESTED -->
  10430. <description>chmod: change permission(normal mode) of multiple files in hdfs:// path using globbing</description>
  10431. <test-commands>
  10432. <command>-fs NAMENODE -touchz hdfs:///file1</command>
  10433. <command>-fs NAMENODE -touchz hdfs:///file2</command>
  10434. <command>-fs NAMENODE -touchz hdfs:///file3</command>
  10435. <command>-fs NAMENODE -touchz hdfs:///file4</command>
  10436. <command>-fs NAMENODE -chmod a+rw hdfs:///file* </command>
  10437. <command>-fs NAMENODE -ls -R hdfs:///file*</command>
  10438. </test-commands>
  10439. <cleanup-commands>
  10440. <command>-fs NAMENODE -rm hdfs:///file*</command>
  10441. </cleanup-commands>
  10442. <comparators>
  10443. <comparator>
  10444. <type>RegexpComparator</type>
  10445. <expected-output>^-rw-rw-rw-( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///file1</expected-output>
  10446. </comparator>
  10447. <comparator>
  10448. <type>RegexpComparator</type>
  10449. <expected-output>^-rw-rw-rw-( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///file2</expected-output>
  10450. </comparator>
  10451. <comparator>
  10452. <type>RegexpComparator</type>
  10453. <expected-output>^-rw-rw-rw-( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///file3</expected-output>
  10454. </comparator>
  10455. <comparator>
  10456. <type>RegexpComparator</type>
  10457. <expected-output>^-rw-rw-rw-( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///file4</expected-output>
  10458. </comparator>
  10459. </comparators>
  10460. </test>
  10461. <test> <!-- TESTED -->
  10462. <description>chmod: change permission(normal mode) of multiple directories in hdfs:// path using globbing</description>
  10463. <test-commands>
  10464. <command>-fs NAMENODE -mkdir hdfs:///dir0</command>
  10465. <command>-fs NAMENODE -mkdir hdfs:///dir0/dir1</command>
  10466. <command>-fs NAMENODE -touchz hdfs:///dir0/file0</command>
  10467. <command>-fs NAMENODE -touchz hdfs:///dir0/dir1/file1</command>
  10468. <command>-fs NAMENODE -touchz hdfs:///dir0/dir1/file2</command>
  10469. <command>-fs NAMENODE -mkdir hdfs:///dir2</command>
  10470. <command>-fs NAMENODE -mkdir hdfs:///dir2/dir1</command>
  10471. <command>-fs NAMENODE -touchz hdfs:///dir2/file0</command>
  10472. <command>-fs NAMENODE -touchz hdfs:///dir2/dir1/file1</command>
  10473. <command>-fs NAMENODE -touchz hdfs:///dir2/dir1/file2</command>
  10474. <command>-fs NAMENODE -chmod a+rwx hdfs:///dir*</command>
  10475. <command>-fs NAMENODE -ls -R hdfs:///dir*</command>
  10476. </test-commands>
  10477. <cleanup-commands>
  10478. <command>-fs NAMENODE -rm -r hdfs:///dir*</command>
  10479. </cleanup-commands>
  10480. <comparators>
  10481. <comparator>
  10482. <type>RegexpComparator</type>
  10483. <expected-output>^drwxr-xr-x( )*-( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir0/dir1</expected-output>
  10484. </comparator>
  10485. <comparator>
  10486. <type>RegexpComparator</type>
  10487. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir0/dir1/file1</expected-output>
  10488. </comparator>
  10489. <comparator>
  10490. <type>RegexpComparator</type>
  10491. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir0/dir1/file2</expected-output>
  10492. </comparator>
  10493. <comparator>
  10494. <type>RegexpComparator</type>
  10495. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir0/file0</expected-output>
  10496. </comparator>
  10497. <comparator>
  10498. <type>RegexpComparator</type>
  10499. <expected-output>^drwxr-xr-x( )*-( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir2/dir1</expected-output>
  10500. </comparator>
  10501. <comparator>
  10502. <type>RegexpComparator</type>
  10503. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir2/dir1/file1</expected-output>
  10504. </comparator>
  10505. <comparator>
  10506. <type>RegexpComparator</type>
  10507. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir2/dir1/file2</expected-output>
  10508. </comparator>
  10509. <comparator>
  10510. <type>RegexpComparator</type>
  10511. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir2/file0</expected-output>
  10512. </comparator>
  10513. </comparators>
  10514. </test>
  10515. <test> <!-- TESTED -->
  10516. <description>chmod: change permission(normal mode) of multiple files in hdfs:// path without globbing</description>
  10517. <test-commands>
  10518. <command>-fs NAMENODE -touchz hdfs:///file1</command>
  10519. <command>-fs NAMENODE -touchz hdfs:///file2</command>
  10520. <command>-fs NAMENODE -touchz hdfs:///file3</command>
  10521. <command>-fs NAMENODE -touchz hdfs:///file4</command>
  10522. <command>-fs NAMENODE -chmod a+rw hdfs:///file1 hdfs:///file2 hdfs:///file3 hdfs:///file4 </command>
  10523. <command>-fs NAMENODE -ls -R hdfs:///file*</command>
  10524. </test-commands>
  10525. <cleanup-commands>
  10526. <command>-fs NAMENODE -rm hdfs:///file*</command>
  10527. </cleanup-commands>
  10528. <comparators>
  10529. <comparator>
  10530. <type>RegexpComparator</type>
  10531. <expected-output>^-rw-rw-rw-( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///file1</expected-output>
  10532. </comparator>
  10533. <comparator>
  10534. <type>RegexpComparator</type>
  10535. <expected-output>^-rw-rw-rw-( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///file2</expected-output>
  10536. </comparator>
  10537. <comparator>
  10538. <type>RegexpComparator</type>
  10539. <expected-output>^-rw-rw-rw-( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///file3</expected-output>
  10540. </comparator>
  10541. <comparator>
  10542. <type>RegexpComparator</type>
  10543. <expected-output>^-rw-rw-rw-( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///file4</expected-output>
  10544. </comparator>
  10545. </comparators>
  10546. </test>
  10547. <test> <!-- TESTED -->
  10548. <description>chmod: change permission(normal mode) of multiple directories in hdfs:// path without globbing</description>
  10549. <test-commands>
  10550. <command>-fs NAMENODE -mkdir hdfs:///dir0</command>
  10551. <command>-fs NAMENODE -mkdir hdfs:///dir0/dir1</command>
  10552. <command>-fs NAMENODE -touchz hdfs:///dir0/file0</command>
  10553. <command>-fs NAMENODE -touchz hdfs:///dir0/dir1/file1</command>
  10554. <command>-fs NAMENODE -touchz hdfs:///dir0/dir1/file2</command>
  10555. <command>-fs NAMENODE -mkdir hdfs:///dir2</command>
  10556. <command>-fs NAMENODE -mkdir hdfs:///dir2/dir1</command>
  10557. <command>-fs NAMENODE -touchz hdfs:///dir2/file0</command>
  10558. <command>-fs NAMENODE -touchz hdfs:///dir2/dir1/file1</command>
  10559. <command>-fs NAMENODE -touchz hdfs:///dir2/dir1/file2</command>
  10560. <command>-fs NAMENODE -chmod a+rwx hdfs:///dir0 hdfs:///dir2</command>
  10561. <command>-fs NAMENODE -ls -R hdfs:///dir*</command>
  10562. </test-commands>
  10563. <cleanup-commands>
  10564. <command>-fs NAMENODE -rm -r hdfs:///dir*</command>
  10565. </cleanup-commands>
  10566. <comparators>
  10567. <comparator>
  10568. <type>RegexpComparator</type>
  10569. <expected-output>^drwxr-xr-x( )*-( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir0/dir1</expected-output>
  10570. </comparator>
  10571. <comparator>
  10572. <type>RegexpComparator</type>
  10573. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir0/dir1/file1</expected-output>
  10574. </comparator>
  10575. <comparator>
  10576. <type>RegexpComparator</type>
  10577. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir0/dir1/file2</expected-output>
  10578. </comparator>
  10579. <comparator>
  10580. <type>RegexpComparator</type>
  10581. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir0/file0</expected-output>
  10582. </comparator>
  10583. <comparator>
  10584. <type>RegexpComparator</type>
  10585. <expected-output>^drwxr-xr-x( )*-( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir2/dir1</expected-output>
  10586. </comparator>
  10587. <comparator>
  10588. <type>RegexpComparator</type>
  10589. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir2/dir1/file1</expected-output>
  10590. </comparator>
  10591. <comparator>
  10592. <type>RegexpComparator</type>
  10593. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir2/dir1/file2</expected-output>
  10594. </comparator>
  10595. <comparator>
  10596. <type>RegexpComparator</type>
  10597. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir2/file0</expected-output>
  10598. </comparator>
  10599. </comparators>
  10600. </test>
  10601. <test> <!-- TESTED -->
  10602. <description>chmod: change permission(octal mode) of multiple directories in hdfs:// path recursively using globbing</description>
  10603. <test-commands>
  10604. <command>-fs NAMENODE -mkdir hdfs:///dir0</command>
  10605. <command>-fs NAMENODE -mkdir hdfs:///dir0/dir1</command>
  10606. <command>-fs NAMENODE -touchz hdfs:///dir0/file0</command>
  10607. <command>-fs NAMENODE -touchz hdfs:///dir0/dir1/file1</command>
  10608. <command>-fs NAMENODE -touchz hdfs:///dir0/dir1/file2</command>
  10609. <command>-fs NAMENODE -mkdir hdfs:///dir2</command>
  10610. <command>-fs NAMENODE -mkdir hdfs:///dir2/dir1</command>
  10611. <command>-fs NAMENODE -touchz hdfs:///dir2/file0</command>
  10612. <command>-fs NAMENODE -touchz hdfs:///dir2/dir1/file1</command>
  10613. <command>-fs NAMENODE -touchz hdfs:///dir2/dir1/file2</command>
  10614. <command>-fs NAMENODE -chmod -R 777 hdfs:///dir*</command>
  10615. <command>-fs NAMENODE -ls -R hdfs:///dir*</command>
  10616. </test-commands>
  10617. <cleanup-commands>
  10618. <command>-fs NAMENODE -rm -r hdfs:///dir*</command>
  10619. </cleanup-commands>
  10620. <comparators>
  10621. <comparator>
  10622. <type>RegexpComparator</type>
  10623. <expected-output>^drwxrwxrwx( )*-( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir0/dir1</expected-output>
  10624. </comparator>
  10625. <comparator>
  10626. <type>RegexpComparator</type>
  10627. <expected-output>^-rwxrwxrwx( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir0/dir1/file1</expected-output>
  10628. </comparator>
  10629. <comparator>
  10630. <type>RegexpComparator</type>
  10631. <expected-output>^-rwxrwxrwx( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir0/dir1/file2</expected-output>
  10632. </comparator>
  10633. <comparator>
  10634. <type>RegexpComparator</type>
  10635. <expected-output>^-rwxrwxrwx( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir0/file0</expected-output>
  10636. </comparator>
  10637. <comparator>
  10638. <type>RegexpComparator</type>
  10639. <expected-output>^drwxrwxrwx( )*-( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir2/dir1</expected-output>
  10640. </comparator>
  10641. <comparator>
  10642. <type>RegexpComparator</type>
  10643. <expected-output>^-rwxrwxrwx( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir2/dir1/file1</expected-output>
  10644. </comparator>
  10645. <comparator>
  10646. <type>RegexpComparator</type>
  10647. <expected-output>^-rwxrwxrwx( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir2/dir1/file2</expected-output>
  10648. </comparator>
  10649. <comparator>
  10650. <type>RegexpComparator</type>
  10651. <expected-output>^-rwxrwxrwx( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir2/file0</expected-output>
  10652. </comparator>
  10653. </comparators>
  10654. </test>
  10655. <test> <!-- TESTED -->
  10656. <description>chmod: change permission(octal mode) of multiple directories in hdfs:// path recursively without globbing</description>
  10657. <test-commands>
  10658. <command>-fs NAMENODE -mkdir hdfs:///dir0</command>
  10659. <command>-fs NAMENODE -mkdir hdfs:///dir0/dir1</command>
  10660. <command>-fs NAMENODE -touchz hdfs:///dir0/file0</command>
  10661. <command>-fs NAMENODE -touchz hdfs:///dir0/dir1/file1</command>
  10662. <command>-fs NAMENODE -touchz hdfs:///dir0/dir1/file2</command>
  10663. <command>-fs NAMENODE -mkdir hdfs:///dir2</command>
  10664. <command>-fs NAMENODE -mkdir hdfs:///dir2/dir1</command>
  10665. <command>-fs NAMENODE -touchz hdfs:///dir2/file0</command>
  10666. <command>-fs NAMENODE -touchz hdfs:///dir2/dir1/file1</command>
  10667. <command>-fs NAMENODE -touchz hdfs:///dir2/dir1/file2</command>
  10668. <command>-fs NAMENODE -chmod -R 777 hdfs:///dir0 hdfs:///dir2</command>
  10669. <command>-fs NAMENODE -ls -R hdfs:///dir*</command>
  10670. </test-commands>
  10671. <cleanup-commands>
  10672. <command>-fs NAMENODE -rm -r hdfs:///dir*</command>
  10673. </cleanup-commands>
  10674. <comparators>
  10675. <comparator>
  10676. <type>RegexpComparator</type>
  10677. <expected-output>^drwxrwxrwx( )*-( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir0/dir1</expected-output>
  10678. </comparator>
  10679. <comparator>
  10680. <type>RegexpComparator</type>
  10681. <expected-output>^-rwxrwxrwx( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir0/dir1/file1</expected-output>
  10682. </comparator>
  10683. <comparator>
  10684. <type>RegexpComparator</type>
  10685. <expected-output>^-rwxrwxrwx( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir0/dir1/file2</expected-output>
  10686. </comparator>
  10687. <comparator>
  10688. <type>RegexpComparator</type>
  10689. <expected-output>^-rwxrwxrwx( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir0/file0</expected-output>
  10690. </comparator>
  10691. <comparator>
  10692. <type>RegexpComparator</type>
  10693. <expected-output>^drwxrwxrwx( )*-( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir2/dir1</expected-output>
  10694. </comparator>
  10695. <comparator>
  10696. <type>RegexpComparator</type>
  10697. <expected-output>^-rwxrwxrwx( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir2/dir1/file1</expected-output>
  10698. </comparator>
  10699. <comparator>
  10700. <type>RegexpComparator</type>
  10701. <expected-output>^-rwxrwxrwx( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir2/dir1/file2</expected-output>
  10702. </comparator>
  10703. <comparator>
  10704. <type>RegexpComparator</type>
  10705. <expected-output>^-rwxrwxrwx( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir2/file0</expected-output>
  10706. </comparator>
  10707. </comparators>
  10708. </test>
  10709. <test> <!-- TESTED -->
  10710. <description>chmod: change permission(normal mode) of multiple directories in hdfs:// path recursively using globbing</description>
  10711. <test-commands>
  10712. <command>-fs NAMENODE -mkdir hdfs:///dir0</command>
  10713. <command>-fs NAMENODE -mkdir hdfs:///dir0/dir1</command>
  10714. <command>-fs NAMENODE -touchz hdfs:///dir0/file0</command>
  10715. <command>-fs NAMENODE -touchz hdfs:///dir0/dir1/file1</command>
  10716. <command>-fs NAMENODE -touchz hdfs:///dir0/dir1/file2</command>
  10717. <command>-fs NAMENODE -mkdir hdfs:///dir2</command>
  10718. <command>-fs NAMENODE -mkdir hdfs:///dir2/dir1</command>
  10719. <command>-fs NAMENODE -touchz hdfs:///dir2/file0</command>
  10720. <command>-fs NAMENODE -touchz hdfs:///dir2/dir1/file1</command>
  10721. <command>-fs NAMENODE -touchz hdfs:///dir2/dir1/file2</command>
  10722. <command>-fs NAMENODE -chmod -R a+rwx hdfs:///dir*</command>
  10723. <command>-fs NAMENODE -ls -R hdfs:///dir*</command>
  10724. </test-commands>
  10725. <cleanup-commands>
  10726. <command>-fs NAMENODE -rm -r hdfs:///dir*</command>
  10727. </cleanup-commands>
  10728. <comparators>
  10729. <comparator>
  10730. <type>RegexpComparator</type>
  10731. <expected-output>^drwxrwxrwx( )*-( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir0/dir1</expected-output>
  10732. </comparator>
  10733. <comparator>
  10734. <type>RegexpComparator</type>
  10735. <expected-output>^-rwxrwxrwx( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir0/dir1/file1</expected-output>
  10736. </comparator>
  10737. <comparator>
  10738. <type>RegexpComparator</type>
  10739. <expected-output>^-rwxrwxrwx( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir0/dir1/file2</expected-output>
  10740. </comparator>
  10741. <comparator>
  10742. <type>RegexpComparator</type>
  10743. <expected-output>^-rwxrwxrwx( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir0/file0</expected-output>
  10744. </comparator>
  10745. <comparator>
  10746. <type>RegexpComparator</type>
  10747. <expected-output>^drwxrwxrwx( )*-( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir2/dir1</expected-output>
  10748. </comparator>
  10749. <comparator>
  10750. <type>RegexpComparator</type>
  10751. <expected-output>^-rwxrwxrwx( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir2/dir1/file1</expected-output>
  10752. </comparator>
  10753. <comparator>
  10754. <type>RegexpComparator</type>
  10755. <expected-output>^-rwxrwxrwx( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir2/dir1/file2</expected-output>
  10756. </comparator>
  10757. <comparator>
  10758. <type>RegexpComparator</type>
  10759. <expected-output>^-rwxrwxrwx( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir2/file0</expected-output>
  10760. </comparator>
  10761. </comparators>
  10762. </test>
  10763. <test> <!-- TESTED -->
  10764. <description>chmod: change permission(normal mode) of multiple directories in hdfs:// path recursively without globbing</description>
  10765. <test-commands>
  10766. <command>-fs NAMENODE -mkdir hdfs:///dir0</command>
  10767. <command>-fs NAMENODE -mkdir hdfs:///dir0/dir1</command>
  10768. <command>-fs NAMENODE -touchz hdfs:///dir0/file0</command>
  10769. <command>-fs NAMENODE -touchz hdfs:///dir0/dir1/file1</command>
  10770. <command>-fs NAMENODE -touchz hdfs:///dir0/dir1/file2</command>
  10771. <command>-fs NAMENODE -mkdir hdfs:///dir2</command>
  10772. <command>-fs NAMENODE -mkdir hdfs:///dir2/dir1</command>
  10773. <command>-fs NAMENODE -touchz hdfs:///dir2/file0</command>
  10774. <command>-fs NAMENODE -touchz hdfs:///dir2/dir1/file1</command>
  10775. <command>-fs NAMENODE -touchz hdfs:///dir2/dir1/file2</command>
  10776. <command>-fs NAMENODE -chmod -R a+rwx hdfs:///dir0 hdfs:///dir2</command>
  10777. <command>-fs NAMENODE -ls -R hdfs:///dir*</command>
  10778. </test-commands>
  10779. <cleanup-commands>
  10780. <command>-fs NAMENODE -rm -r hdfs:///dir*</command>
  10781. </cleanup-commands>
  10782. <comparators>
  10783. <comparator>
  10784. <type>RegexpComparator</type>
  10785. <expected-output>^drwxrwxrwx( )*-( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir0/dir1</expected-output>
  10786. </comparator>
  10787. <comparator>
  10788. <type>RegexpComparator</type>
  10789. <expected-output>^-rwxrwxrwx( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir0/dir1/file1</expected-output>
  10790. </comparator>
  10791. <comparator>
  10792. <type>RegexpComparator</type>
  10793. <expected-output>^-rwxrwxrwx( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir0/dir1/file2</expected-output>
  10794. </comparator>
  10795. <comparator>
  10796. <type>RegexpComparator</type>
  10797. <expected-output>^-rwxrwxrwx( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir0/file0</expected-output>
  10798. </comparator>
  10799. <comparator>
  10800. <type>RegexpComparator</type>
  10801. <expected-output>^drwxrwxrwx( )*-( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir2/dir1</expected-output>
  10802. </comparator>
  10803. <comparator>
  10804. <type>RegexpComparator</type>
  10805. <expected-output>^-rwxrwxrwx( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir2/dir1/file1</expected-output>
  10806. </comparator>
  10807. <comparator>
  10808. <type>RegexpComparator</type>
  10809. <expected-output>^-rwxrwxrwx( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir2/dir1/file2</expected-output>
  10810. </comparator>
  10811. <comparator>
  10812. <type>RegexpComparator</type>
  10813. <expected-output>^-rwxrwxrwx( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir2/file0</expected-output>
  10814. </comparator>
  10815. </comparators>
  10816. </test>
  10817. <test> <!-- TESTED -->
  10818. <description>chmod: invalid value in octal mode of file in hdfs:// path</description>
  10819. <test-commands>
  10820. <command>-fs NAMENODE -touchz hdfs:///file1</command>
  10821. <command>-fs NAMENODE -chmod 999 hdfs:///file1</command>
  10822. </test-commands>
  10823. <cleanup-commands>
  10824. <command>-fs NAMENODE -rm hdfs:///file1</command>
  10825. </cleanup-commands>
  10826. <comparators>
  10827. <comparator>
  10828. <type>RegexpComparator</type>
  10829. <expected-output>^-chmod: chmod : mode '999' does not match the expected pattern.</expected-output>
  10830. </comparator>
  10831. </comparators>
  10832. </test>
  10833. <test> <!-- TESTED -->
  10834. <description>chmod: invalid value in normal mode of file in hdfs:// path</description>
  10835. <test-commands>
  10836. <command>-fs NAMENODE -touchz hdfs:///file1</command>
  10837. <command>-fs NAMENODE -chmod rdef hdfs:///file1</command>
  10838. </test-commands>
  10839. <cleanup-commands>
  10840. <command>-fs NAMENODE -rm hdfs:///file1</command>
  10841. </cleanup-commands>
  10842. <comparators>
  10843. <comparator>
  10844. <type>RegexpComparator</type>
  10845. <expected-output>^-chmod: chmod : mode \'rdef\' does not match the expected pattern.</expected-output>
  10846. </comparator>
  10847. </comparators>
  10848. </test>
  10849. <!-- Tests for chmod -->
  10850. <test> <!-- TESTED -->
  10851. <description>chmod: change permission(octal mode) of file in Namenode's path</description>
  10852. <test-commands>
  10853. <command>-fs NAMENODE -touchz NAMENODE/file1</command>
  10854. <command>-fs NAMENODE -chmod 777 NAMENODE/file1</command>
  10855. <command>-fs NAMENODE -ls NAMENODE/file1</command>
  10856. </test-commands>
  10857. <cleanup-commands>
  10858. <command>-fs NAMENODE -rm NAMENODE/file1</command>
  10859. </cleanup-commands>
  10860. <comparators>
  10861. <comparator>
  10862. <type>RegexpComparator</type>
  10863. <expected-output>^-rwxrwxrwx( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/file1</expected-output>
  10864. </comparator>
  10865. </comparators>
  10866. </test>
  10867. <test> <!-- TESTED -->
  10868. <description>chmod: change permission(octal mode) of directory in Namenode's path</description>
  10869. <test-commands>
  10870. <command>-fs NAMENODE -mkdir NAMENODE/dir0</command>
  10871. <command>-fs NAMENODE -mkdir NAMENODE/dir0/dir1</command>
  10872. <command>-fs NAMENODE -touchz NAMENODE/dir0/file0</command>
  10873. <command>-fs NAMENODE -touchz NAMENODE/dir0/dir1/file1</command>
  10874. <command>-fs NAMENODE -touchz NAMENODE/dir0/dir1/file2</command>
  10875. <command>-fs NAMENODE -chmod 777 NAMENODE/dir0/dir1</command>
  10876. <command>-fs NAMENODE -ls -R NAMENODE/dir0</command>
  10877. </test-commands>
  10878. <cleanup-commands>
  10879. <command>-fs NAMENODE -rm -r NAMENODE/dir0</command>
  10880. </cleanup-commands>
  10881. <comparators>
  10882. <comparator>
  10883. <type>RegexpComparator</type>
  10884. <expected-output>^drwxrwxrwx( )*-( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir0/dir1</expected-output>
  10885. </comparator>
  10886. <comparator>
  10887. <type>RegexpComparator</type>
  10888. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir0/dir1/file1</expected-output>
  10889. </comparator>
  10890. <comparator>
  10891. <type>RegexpComparator</type>
  10892. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir0/dir1/file2</expected-output>
  10893. </comparator>
  10894. <comparator>
  10895. <type>RegexpComparator</type>
  10896. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir0/file0</expected-output>
  10897. </comparator>
  10898. </comparators>
  10899. </test>
  10900. <test> <!-- TESTED -->
  10901. <description>chmod: change permission(normal mode) of file in Namenode's path</description>
  10902. <test-commands>
  10903. <command>-fs NAMENODE -touchz NAMENODE/file1</command>
  10904. <command>-fs NAMENODE -chmod a+rw NAMENODE/file1</command>
  10905. <command>-fs NAMENODE -ls NAMENODE/file1</command>
  10906. </test-commands>
  10907. <cleanup-commands>
  10908. <command>-fs NAMENODE -rm NAMENODE/file1</command>
  10909. </cleanup-commands>
  10910. <comparators>
  10911. <comparator>
  10912. <type>RegexpComparator</type>
  10913. <expected-output>^-rw-rw-rw-( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/file1</expected-output>
  10914. </comparator>
  10915. </comparators>
  10916. </test>
  10917. <test> <!-- TESTED -->
  10918. <description>chmod: change permission(normal mode) of directory in Namenode's path</description>
  10919. <test-commands>
  10920. <command>-fs NAMENODE -mkdir NAMENODE/dir0</command>
  10921. <command>-fs NAMENODE -mkdir NAMENODE/dir0/dir1</command>
  10922. <command>-fs NAMENODE -touchz NAMENODE/dir0/file0</command>
  10923. <command>-fs NAMENODE -touchz NAMENODE/dir0/dir1/file1</command>
  10924. <command>-fs NAMENODE -touchz NAMENODE/dir0/dir1/file2</command>
  10925. <command>-fs NAMENODE -chmod a+rwx NAMENODE/dir0/dir1</command>
  10926. <command>-fs NAMENODE -ls -R NAMENODE/dir0</command>
  10927. </test-commands>
  10928. <cleanup-commands>
  10929. <command>-fs NAMENODE -rm -r NAMENODE/dir0</command>
  10930. </cleanup-commands>
  10931. <comparators>
  10932. <comparator>
  10933. <type>RegexpComparator</type>
  10934. <expected-output>^drwxrwxrwx( )*-( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir0/dir1</expected-output>
  10935. </comparator>
  10936. <comparator>
  10937. <type>RegexpComparator</type>
  10938. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir0/dir1/file1</expected-output>
  10939. </comparator>
  10940. <comparator>
  10941. <type>RegexpComparator</type>
  10942. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir0/dir1/file2</expected-output>
  10943. </comparator>
  10944. <comparator>
  10945. <type>RegexpComparator</type>
  10946. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir0/file0</expected-output>
  10947. </comparator>
  10948. </comparators>
  10949. </test>
  10950. <test> <!-- TESTED -->
  10951. <description>chmod: change permission(octal mode) of directory in Namenode's path recursively </description>
  10952. <test-commands>
  10953. <command>-fs NAMENODE -mkdir NAMENODE/dir0</command>
  10954. <command>-fs NAMENODE -mkdir NAMENODE/dir0/dir1</command>
  10955. <command>-fs NAMENODE -touchz NAMENODE/dir0/file0</command>
  10956. <command>-fs NAMENODE -touchz NAMENODE/dir0/dir1/file1</command>
  10957. <command>-fs NAMENODE -touchz NAMENODE/dir0/dir1/file2</command>
  10958. <command>-fs NAMENODE -chmod -R 777 NAMENODE/dir0/dir1</command>
  10959. <command>-fs NAMENODE -ls -R NAMENODE/dir0</command>
  10960. </test-commands>
  10961. <cleanup-commands>
  10962. <command>-fs NAMENODE -rm -r NAMENODE/dir0</command>
  10963. </cleanup-commands>
  10964. <comparators>
  10965. <comparator>
  10966. <type>RegexpComparator</type>
  10967. <expected-output>^drwxrwxrwx( )*-( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir0/dir1</expected-output>
  10968. </comparator>
  10969. <comparator>
  10970. <type>RegexpComparator</type>
  10971. <expected-output>^-rwxrwxrwx( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir0/dir1/file1</expected-output>
  10972. </comparator>
  10973. <comparator>
  10974. <type>RegexpComparator</type>
  10975. <expected-output>^-rwxrwxrwx( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir0/dir1/file2</expected-output>
  10976. </comparator>
  10977. <comparator>
  10978. <type>RegexpComparator</type>
  10979. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir0/file0</expected-output>
  10980. </comparator>
  10981. </comparators>
  10982. </test>
  10983. <test> <!-- TESTED -->
  10984. <description>chmod: change permission(normal mode) of directory in Namenode's path recursively</description>
  10985. <test-commands>
  10986. <command>-fs NAMENODE -mkdir NAMENODE/dir0</command>
  10987. <command>-fs NAMENODE -mkdir NAMENODE/dir0/dir1</command>
  10988. <command>-fs NAMENODE -touchz NAMENODE/dir0/file0</command>
  10989. <command>-fs NAMENODE -touchz NAMENODE/dir0/dir1/file1</command>
  10990. <command>-fs NAMENODE -touchz NAMENODE/dir0/dir1/file2</command>
  10991. <command>-fs NAMENODE -chmod -R a+rwx NAMENODE/dir0/dir1</command>
  10992. <command>-fs NAMENODE -ls -R NAMENODE/dir0</command>
  10993. </test-commands>
  10994. <cleanup-commands>
  10995. <command>-fs NAMENODE -rm -r NAMENODE/dir0</command>
  10996. </cleanup-commands>
  10997. <comparators>
  10998. <comparator>
  10999. <type>RegexpComparator</type>
  11000. <expected-output>^drwxrwxrwx( )*-( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir0/dir1</expected-output>
  11001. </comparator>
  11002. <comparator>
  11003. <type>RegexpComparator</type>
  11004. <expected-output>^-rwxrwxrwx( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir0/dir1/file1</expected-output>
  11005. </comparator>
  11006. <comparator>
  11007. <type>RegexpComparator</type>
  11008. <expected-output>^-rwxrwxrwx( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir0/dir1/file2</expected-output>
  11009. </comparator>
  11010. <comparator>
  11011. <type>RegexpComparator</type>
  11012. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir0/file0</expected-output>
  11013. </comparator>
  11014. </comparators>
  11015. </test>
  11016. <test> <!-- TESTED -->
  11017. <description>chmod: change permission(octal mode) of non existent file in Namenode's path</description>
  11018. <test-commands>
  11019. <command>-fs NAMENODE -chmod 777 NAMENODE/file1</command>
  11020. </test-commands>
  11021. <cleanup-commands>
  11022. <command>-fs NAMENODE -rm NAMENODE/file1</command>
  11023. </cleanup-commands>
  11024. <comparators>
  11025. <comparator>
  11026. <type>RegexpComparator</type>
  11027. <expected-output>^chmod: `NAMENODE/file1': No such file or directory</expected-output>
  11028. </comparator>
  11029. </comparators>
  11030. </test>
  11031. <test> <!-- TESTED -->
  11032. <description>chmod: change permission(normal mode) of non existent file in Namenode's path</description>
  11033. <test-commands>
  11034. <command>-fs NAMENODE -chmod a+rw NAMENODE/file1</command>
  11035. </test-commands>
  11036. <cleanup-commands>
  11037. <command>-fs NAMENODE -rm NAMENODE/file1</command>
  11038. </cleanup-commands>
  11039. <comparators>
  11040. <comparator>
  11041. <type>RegexpComparator</type>
  11042. <expected-output>^chmod: `NAMENODE/file1': No such file or directory</expected-output>
  11043. </comparator>
  11044. </comparators>
  11045. </test>
  11046. <test> <!-- TESTED -->
  11047. <description>chmod: change permission(octal mode) of multiple files in Namenode's path using globbing</description>
  11048. <test-commands>
  11049. <command>-fs NAMENODE -touchz NAMENODE/file1</command>
  11050. <command>-fs NAMENODE -touchz NAMENODE/file2</command>
  11051. <command>-fs NAMENODE -touchz NAMENODE/file3</command>
  11052. <command>-fs NAMENODE -touchz NAMENODE/file4</command>
  11053. <command>-fs NAMENODE -chmod 777 NAMENODE/file* </command>
  11054. <command>-fs NAMENODE -ls -R NAMENODE/file*</command>
  11055. </test-commands>
  11056. <cleanup-commands>
  11057. <command>-fs NAMENODE -rm NAMENODE/file*</command>
  11058. </cleanup-commands>
  11059. <comparators>
  11060. <comparator>
  11061. <type>RegexpComparator</type>
  11062. <expected-output>^-rwxrwxrwx( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/file1</expected-output>
  11063. </comparator>
  11064. <comparator>
  11065. <type>RegexpComparator</type>
  11066. <expected-output>^-rwxrwxrwx( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/file2</expected-output>
  11067. </comparator>
  11068. <comparator>
  11069. <type>RegexpComparator</type>
  11070. <expected-output>^-rwxrwxrwx( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/file3</expected-output>
  11071. </comparator>
  11072. <comparator>
  11073. <type>RegexpComparator</type>
  11074. <expected-output>^-rwxrwxrwx( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/file4</expected-output>
  11075. </comparator>
  11076. </comparators>
  11077. </test>
  11078. <test> <!-- TESTED -->
  11079. <description>chmod: change permission(octal mode) of multiple directories in Namenode's path using globbing</description>
  11080. <test-commands>
  11081. <command>-fs NAMENODE -mkdir NAMENODE/dir0</command>
  11082. <command>-fs NAMENODE -mkdir NAMENODE/dir0/dir1</command>
  11083. <command>-fs NAMENODE -touchz NAMENODE/dir0/file0</command>
  11084. <command>-fs NAMENODE -touchz NAMENODE/dir0/dir1/file1</command>
  11085. <command>-fs NAMENODE -touchz NAMENODE/dir0/dir1/file2</command>
  11086. <command>-fs NAMENODE -mkdir NAMENODE/dir2</command>
  11087. <command>-fs NAMENODE -mkdir NAMENODE/dir2/dir1</command>
  11088. <command>-fs NAMENODE -touchz NAMENODE/dir2/file0</command>
  11089. <command>-fs NAMENODE -touchz NAMENODE/dir2/dir1/file1</command>
  11090. <command>-fs NAMENODE -touchz NAMENODE/dir2/dir1/file2</command>
  11091. <command>-fs NAMENODE -chmod 777 NAMENODE/dir*</command>
  11092. <command>-fs NAMENODE -ls -R NAMENODE/dir*</command>
  11093. </test-commands>
  11094. <cleanup-commands>
  11095. <command>-fs NAMENODE -rm -r NAMENODE/dir*</command>
  11096. </cleanup-commands>
  11097. <comparators>
  11098. <comparator>
  11099. <type>RegexpComparator</type>
  11100. <expected-output>^drwxr-xr-x( )*-( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir0/dir1</expected-output>
  11101. </comparator>
  11102. <comparator>
  11103. <type>RegexpComparator</type>
  11104. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir0/dir1/file1</expected-output>
  11105. </comparator>
  11106. <comparator>
  11107. <type>RegexpComparator</type>
  11108. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir0/dir1/file2</expected-output>
  11109. </comparator>
  11110. <comparator>
  11111. <type>RegexpComparator</type>
  11112. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir0/file0</expected-output>
  11113. </comparator>
  11114. <comparator>
  11115. <type>RegexpComparator</type>
  11116. <expected-output>^drwxr-xr-x( )*-( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir2/dir1</expected-output>
  11117. </comparator>
  11118. <comparator>
  11119. <type>RegexpComparator</type>
  11120. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir2/dir1/file1</expected-output>
  11121. </comparator>
  11122. <comparator>
  11123. <type>RegexpComparator</type>
  11124. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir2/dir1/file2</expected-output>
  11125. </comparator>
  11126. <comparator>
  11127. <type>RegexpComparator</type>
  11128. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir2/file0</expected-output>
  11129. </comparator>
  11130. </comparators>
  11131. </test>
  11132. <test> <!-- TESTED -->
  11133. <description>chmod: change permission(octal mode) of multiple files in Namenode's path without globbing</description>
  11134. <test-commands>
  11135. <command>-fs NAMENODE -touchz NAMENODE/file1</command>
  11136. <command>-fs NAMENODE -touchz NAMENODE/file2</command>
  11137. <command>-fs NAMENODE -touchz NAMENODE/file3</command>
  11138. <command>-fs NAMENODE -touchz NAMENODE/file4</command>
  11139. <command>-fs NAMENODE -chmod 777 NAMENODE/file1 NAMENODE/file2 NAMENODE/file3 NAMENODE/file4 </command>
  11140. <command>-fs NAMENODE -ls -R NAMENODE/file*</command>
  11141. </test-commands>
  11142. <cleanup-commands>
  11143. <command>-fs NAMENODE -rm NAMENODE/file*</command>
  11144. </cleanup-commands>
  11145. <comparators>
  11146. <comparator>
  11147. <type>RegexpComparator</type>
  11148. <expected-output>^-rwxrwxrwx( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/file1</expected-output>
  11149. </comparator>
  11150. <comparator>
  11151. <type>RegexpComparator</type>
  11152. <expected-output>^-rwxrwxrwx( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/file2</expected-output>
  11153. </comparator>
  11154. <comparator>
  11155. <type>RegexpComparator</type>
  11156. <expected-output>^-rwxrwxrwx( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/file3</expected-output>
  11157. </comparator>
  11158. <comparator>
  11159. <type>RegexpComparator</type>
  11160. <expected-output>^-rwxrwxrwx( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/file4</expected-output>
  11161. </comparator>
  11162. </comparators>
  11163. </test>
  11164. <test> <!-- TESTED -->
  11165. <description>chmod: change permission(octal mode) of multiple directories in Namenode's path without globbing</description>
  11166. <test-commands>
  11167. <command>-fs NAMENODE -mkdir NAMENODE/dir0</command>
  11168. <command>-fs NAMENODE -mkdir NAMENODE/dir0/dir1</command>
  11169. <command>-fs NAMENODE -touchz NAMENODE/dir0/file0</command>
  11170. <command>-fs NAMENODE -touchz NAMENODE/dir0/dir1/file1</command>
  11171. <command>-fs NAMENODE -touchz NAMENODE/dir0/dir1/file2</command>
  11172. <command>-fs NAMENODE -mkdir NAMENODE/dir2</command>
  11173. <command>-fs NAMENODE -mkdir NAMENODE/dir2/dir1</command>
  11174. <command>-fs NAMENODE -touchz NAMENODE/dir2/file0</command>
  11175. <command>-fs NAMENODE -touchz NAMENODE/dir2/dir1/file1</command>
  11176. <command>-fs NAMENODE -touchz NAMENODE/dir2/dir1/file2</command>
  11177. <command>-fs NAMENODE -chmod 777 NAMENODE/dir0 NAMENODE/dir2</command>
  11178. <command>-fs NAMENODE -ls -R NAMENODE/dir*</command>
  11179. </test-commands>
  11180. <cleanup-commands>
  11181. <command>-fs NAMENODE -rm -r NAMENODE/dir*</command>
  11182. </cleanup-commands>
  11183. <comparators>
  11184. <comparator>
  11185. <type>RegexpComparator</type>
  11186. <expected-output>^drwxr-xr-x( )*-( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir0/dir1</expected-output>
  11187. </comparator>
  11188. <comparator>
  11189. <type>RegexpComparator</type>
  11190. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir0/dir1/file1</expected-output>
  11191. </comparator>
  11192. <comparator>
  11193. <type>RegexpComparator</type>
  11194. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir0/dir1/file2</expected-output>
  11195. </comparator>
  11196. <comparator>
  11197. <type>RegexpComparator</type>
  11198. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir0/file0</expected-output>
  11199. </comparator>
  11200. <comparator>
  11201. <type>RegexpComparator</type>
  11202. <expected-output>^drwxr-xr-x( )*-( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir2/dir1</expected-output>
  11203. </comparator>
  11204. <comparator>
  11205. <type>RegexpComparator</type>
  11206. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir2/dir1/file1</expected-output>
  11207. </comparator>
  11208. <comparator>
  11209. <type>RegexpComparator</type>
  11210. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir2/dir1/file2</expected-output>
  11211. </comparator>
  11212. <comparator>
  11213. <type>RegexpComparator</type>
  11214. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir2/file0</expected-output>
  11215. </comparator>
  11216. </comparators>
  11217. </test>
  11218. <test> <!-- TESTED -->
  11219. <description>chmod: change permission(normal mode) of multiple files in Namenode's path using globbing</description>
  11220. <test-commands>
  11221. <command>-fs NAMENODE -touchz NAMENODE/file1</command>
  11222. <command>-fs NAMENODE -touchz NAMENODE/file2</command>
  11223. <command>-fs NAMENODE -touchz NAMENODE/file3</command>
  11224. <command>-fs NAMENODE -touchz NAMENODE/file4</command>
  11225. <command>-fs NAMENODE -chmod a+rw NAMENODE/file* </command>
  11226. <command>-fs NAMENODE -ls -R NAMENODE/file*</command>
  11227. </test-commands>
  11228. <cleanup-commands>
  11229. <command>-fs NAMENODE -rm NAMENODE/file*</command>
  11230. </cleanup-commands>
  11231. <comparators>
  11232. <comparator>
  11233. <type>RegexpComparator</type>
  11234. <expected-output>^-rw-rw-rw-( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/file1</expected-output>
  11235. </comparator>
  11236. <comparator>
  11237. <type>RegexpComparator</type>
  11238. <expected-output>^-rw-rw-rw-( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/file2</expected-output>
  11239. </comparator>
  11240. <comparator>
  11241. <type>RegexpComparator</type>
  11242. <expected-output>^-rw-rw-rw-( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/file3</expected-output>
  11243. </comparator>
  11244. <comparator>
  11245. <type>RegexpComparator</type>
  11246. <expected-output>^-rw-rw-rw-( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/file4</expected-output>
  11247. </comparator>
  11248. </comparators>
  11249. </test>
  11250. <test> <!-- TESTED -->
  11251. <description>chmod: change permission(normal mode) of multiple directories in Namenode's path using globbing</description>
  11252. <test-commands>
  11253. <command>-fs NAMENODE -mkdir NAMENODE/dir0</command>
  11254. <command>-fs NAMENODE -mkdir NAMENODE/dir0/dir1</command>
  11255. <command>-fs NAMENODE -touchz NAMENODE/dir0/file0</command>
  11256. <command>-fs NAMENODE -touchz NAMENODE/dir0/dir1/file1</command>
  11257. <command>-fs NAMENODE -touchz NAMENODE/dir0/dir1/file2</command>
  11258. <command>-fs NAMENODE -mkdir NAMENODE/dir2</command>
  11259. <command>-fs NAMENODE -mkdir NAMENODE/dir2/dir1</command>
  11260. <command>-fs NAMENODE -touchz NAMENODE/dir2/file0</command>
  11261. <command>-fs NAMENODE -touchz NAMENODE/dir2/dir1/file1</command>
  11262. <command>-fs NAMENODE -touchz NAMENODE/dir2/dir1/file2</command>
  11263. <command>-fs NAMENODE -chmod a+rwx NAMENODE/dir*</command>
  11264. <command>-fs NAMENODE -ls -R NAMENODE/dir*</command>
  11265. </test-commands>
  11266. <cleanup-commands>
  11267. <command>-fs NAMENODE -rm -r NAMENODE/dir*</command>
  11268. </cleanup-commands>
  11269. <comparators>
  11270. <comparator>
  11271. <type>RegexpComparator</type>
  11272. <expected-output>^drwxr-xr-x( )*-( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir0/dir1</expected-output>
  11273. </comparator>
  11274. <comparator>
  11275. <type>RegexpComparator</type>
  11276. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir0/dir1/file1</expected-output>
  11277. </comparator>
  11278. <comparator>
  11279. <type>RegexpComparator</type>
  11280. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir0/dir1/file2</expected-output>
  11281. </comparator>
  11282. <comparator>
  11283. <type>RegexpComparator</type>
  11284. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir0/file0</expected-output>
  11285. </comparator>
  11286. <comparator>
  11287. <type>RegexpComparator</type>
  11288. <expected-output>^drwxr-xr-x( )*-( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir2/dir1</expected-output>
  11289. </comparator>
  11290. <comparator>
  11291. <type>RegexpComparator</type>
  11292. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir2/dir1/file1</expected-output>
  11293. </comparator>
  11294. <comparator>
  11295. <type>RegexpComparator</type>
  11296. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir2/dir1/file2</expected-output>
  11297. </comparator>
  11298. <comparator>
  11299. <type>RegexpComparator</type>
  11300. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir2/file0</expected-output>
  11301. </comparator>
  11302. </comparators>
  11303. </test>
  11304. <test> <!-- TESTED -->
  11305. <description>chmod: change permission(normal mode) of multiple files in Namenode's path without globbing</description>
  11306. <test-commands>
  11307. <command>-fs NAMENODE -touchz NAMENODE/file1</command>
  11308. <command>-fs NAMENODE -touchz NAMENODE/file2</command>
  11309. <command>-fs NAMENODE -touchz NAMENODE/file3</command>
  11310. <command>-fs NAMENODE -touchz NAMENODE/file4</command>
  11311. <command>-fs NAMENODE -chmod a+rw NAMENODE/file1 NAMENODE/file2 NAMENODE/file3 NAMENODE/file4 </command>
  11312. <command>-fs NAMENODE -ls -R NAMENODE/file*</command>
  11313. </test-commands>
  11314. <cleanup-commands>
  11315. <command>-fs NAMENODE -rm NAMENODE/file*</command>
  11316. </cleanup-commands>
  11317. <comparators>
  11318. <comparator>
  11319. <type>RegexpComparator</type>
  11320. <expected-output>^-rw-rw-rw-( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/file1</expected-output>
  11321. </comparator>
  11322. <comparator>
  11323. <type>RegexpComparator</type>
  11324. <expected-output>^-rw-rw-rw-( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/file2</expected-output>
  11325. </comparator>
  11326. <comparator>
  11327. <type>RegexpComparator</type>
  11328. <expected-output>^-rw-rw-rw-( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/file3</expected-output>
  11329. </comparator>
  11330. <comparator>
  11331. <type>RegexpComparator</type>
  11332. <expected-output>^-rw-rw-rw-( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/file4</expected-output>
  11333. </comparator>
  11334. </comparators>
  11335. </test>
  11336. <test> <!-- TESTED -->
  11337. <description>chmod: change permission(normal mode) of multiple directories in Namenode's path without globbing</description>
  11338. <test-commands>
  11339. <command>-fs NAMENODE -mkdir NAMENODE/dir0</command>
  11340. <command>-fs NAMENODE -mkdir NAMENODE/dir0/dir1</command>
  11341. <command>-fs NAMENODE -touchz NAMENODE/dir0/file0</command>
  11342. <command>-fs NAMENODE -touchz NAMENODE/dir0/dir1/file1</command>
  11343. <command>-fs NAMENODE -touchz NAMENODE/dir0/dir1/file2</command>
  11344. <command>-fs NAMENODE -mkdir NAMENODE/dir2</command>
  11345. <command>-fs NAMENODE -mkdir NAMENODE/dir2/dir1</command>
  11346. <command>-fs NAMENODE -touchz NAMENODE/dir2/file0</command>
  11347. <command>-fs NAMENODE -touchz NAMENODE/dir2/dir1/file1</command>
  11348. <command>-fs NAMENODE -touchz NAMENODE/dir2/dir1/file2</command>
  11349. <command>-fs NAMENODE -chmod a+rwx NAMENODE/dir0 NAMENODE/dir2</command>
  11350. <command>-fs NAMENODE -ls -R NAMENODE/dir*</command>
  11351. </test-commands>
  11352. <cleanup-commands>
  11353. <command>-fs NAMENODE -rm -r NAMENODE/dir*</command>
  11354. </cleanup-commands>
  11355. <comparators>
  11356. <comparator>
  11357. <type>RegexpComparator</type>
  11358. <expected-output>^drwxr-xr-x( )*-( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir0/dir1</expected-output>
  11359. </comparator>
  11360. <comparator>
  11361. <type>RegexpComparator</type>
  11362. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir0/dir1/file1</expected-output>
  11363. </comparator>
  11364. <comparator>
  11365. <type>RegexpComparator</type>
  11366. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir0/dir1/file2</expected-output>
  11367. </comparator>
  11368. <comparator>
  11369. <type>RegexpComparator</type>
  11370. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir0/file0</expected-output>
  11371. </comparator>
  11372. <comparator>
  11373. <type>RegexpComparator</type>
  11374. <expected-output>^drwxr-xr-x( )*-( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir2/dir1</expected-output>
  11375. </comparator>
  11376. <comparator>
  11377. <type>RegexpComparator</type>
  11378. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir2/dir1/file1</expected-output>
  11379. </comparator>
  11380. <comparator>
  11381. <type>RegexpComparator</type>
  11382. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir2/dir1/file2</expected-output>
  11383. </comparator>
  11384. <comparator>
  11385. <type>RegexpComparator</type>
  11386. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir2/file0</expected-output>
  11387. </comparator>
  11388. </comparators>
  11389. </test>
  11390. <test> <!-- TESTED -->
  11391. <description>chmod: change permission(octal mode) of multiple directories in Namenode's path recursively using globbing</description>
  11392. <test-commands>
  11393. <command>-fs NAMENODE -mkdir NAMENODE/dir0</command>
  11394. <command>-fs NAMENODE -mkdir NAMENODE/dir0/dir1</command>
  11395. <command>-fs NAMENODE -touchz NAMENODE/dir0/file0</command>
  11396. <command>-fs NAMENODE -touchz NAMENODE/dir0/dir1/file1</command>
  11397. <command>-fs NAMENODE -touchz NAMENODE/dir0/dir1/file2</command>
  11398. <command>-fs NAMENODE -mkdir NAMENODE/dir2</command>
  11399. <command>-fs NAMENODE -mkdir NAMENODE/dir2/dir1</command>
  11400. <command>-fs NAMENODE -touchz NAMENODE/dir2/file0</command>
  11401. <command>-fs NAMENODE -touchz NAMENODE/dir2/dir1/file1</command>
  11402. <command>-fs NAMENODE -touchz NAMENODE/dir2/dir1/file2</command>
  11403. <command>-fs NAMENODE -chmod -R 777 NAMENODE/dir*</command>
  11404. <command>-fs NAMENODE -ls -R NAMENODE/dir*</command>
  11405. </test-commands>
  11406. <cleanup-commands>
  11407. <command>-fs NAMENODE -rm -r NAMENODE/dir*</command>
  11408. </cleanup-commands>
  11409. <comparators>
  11410. <comparator>
  11411. <type>RegexpComparator</type>
  11412. <expected-output>^drwxrwxrwx( )*-( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir0/dir1</expected-output>
  11413. </comparator>
  11414. <comparator>
  11415. <type>RegexpComparator</type>
  11416. <expected-output>^-rwxrwxrwx( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir0/dir1/file1</expected-output>
  11417. </comparator>
  11418. <comparator>
  11419. <type>RegexpComparator</type>
  11420. <expected-output>^-rwxrwxrwx( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir0/dir1/file2</expected-output>
  11421. </comparator>
  11422. <comparator>
  11423. <type>RegexpComparator</type>
  11424. <expected-output>^-rwxrwxrwx( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir0/file0</expected-output>
  11425. </comparator>
  11426. <comparator>
  11427. <type>RegexpComparator</type>
  11428. <expected-output>^drwxrwxrwx( )*-( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir2/dir1</expected-output>
  11429. </comparator>
  11430. <comparator>
  11431. <type>RegexpComparator</type>
  11432. <expected-output>^-rwxrwxrwx( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir2/dir1/file1</expected-output>
  11433. </comparator>
  11434. <comparator>
  11435. <type>RegexpComparator</type>
  11436. <expected-output>^-rwxrwxrwx( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir2/dir1/file2</expected-output>
  11437. </comparator>
  11438. <comparator>
  11439. <type>RegexpComparator</type>
  11440. <expected-output>^-rwxrwxrwx( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir2/file0</expected-output>
  11441. </comparator>
  11442. </comparators>
  11443. </test>
  11444. <test> <!-- TESTED -->
  11445. <description>chmod: change permission(octal mode) of multiple directories in Namenode's path recursively without globbing</description>
  11446. <test-commands>
  11447. <command>-fs NAMENODE -mkdir NAMENODE/dir0</command>
  11448. <command>-fs NAMENODE -mkdir NAMENODE/dir0/dir1</command>
  11449. <command>-fs NAMENODE -touchz NAMENODE/dir0/file0</command>
  11450. <command>-fs NAMENODE -touchz NAMENODE/dir0/dir1/file1</command>
  11451. <command>-fs NAMENODE -touchz NAMENODE/dir0/dir1/file2</command>
  11452. <command>-fs NAMENODE -mkdir NAMENODE/dir2</command>
  11453. <command>-fs NAMENODE -mkdir NAMENODE/dir2/dir1</command>
  11454. <command>-fs NAMENODE -touchz NAMENODE/dir2/file0</command>
  11455. <command>-fs NAMENODE -touchz NAMENODE/dir2/dir1/file1</command>
  11456. <command>-fs NAMENODE -touchz NAMENODE/dir2/dir1/file2</command>
  11457. <command>-fs NAMENODE -chmod -R 777 NAMENODE/dir0 NAMENODE/dir2</command>
  11458. <command>-fs NAMENODE -ls -R NAMENODE/dir*</command>
  11459. </test-commands>
  11460. <cleanup-commands>
  11461. <command>-fs NAMENODE -rm -r NAMENODE/dir*</command>
  11462. </cleanup-commands>
  11463. <comparators>
  11464. <comparator>
  11465. <type>RegexpComparator</type>
  11466. <expected-output>^drwxrwxrwx( )*-( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir0/dir1</expected-output>
  11467. </comparator>
  11468. <comparator>
  11469. <type>RegexpComparator</type>
  11470. <expected-output>^-rwxrwxrwx( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir0/dir1/file1</expected-output>
  11471. </comparator>
  11472. <comparator>
  11473. <type>RegexpComparator</type>
  11474. <expected-output>^-rwxrwxrwx( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir0/dir1/file2</expected-output>
  11475. </comparator>
  11476. <comparator>
  11477. <type>RegexpComparator</type>
  11478. <expected-output>^-rwxrwxrwx( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir0/file0</expected-output>
  11479. </comparator>
  11480. <comparator>
  11481. <type>RegexpComparator</type>
  11482. <expected-output>^drwxrwxrwx( )*-( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir2/dir1</expected-output>
  11483. </comparator>
  11484. <comparator>
  11485. <type>RegexpComparator</type>
  11486. <expected-output>^-rwxrwxrwx( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir2/dir1/file1</expected-output>
  11487. </comparator>
  11488. <comparator>
  11489. <type>RegexpComparator</type>
  11490. <expected-output>^-rwxrwxrwx( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir2/dir1/file2</expected-output>
  11491. </comparator>
  11492. <comparator>
  11493. <type>RegexpComparator</type>
  11494. <expected-output>^-rwxrwxrwx( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir2/file0</expected-output>
  11495. </comparator>
  11496. </comparators>
  11497. </test>
  11498. <test> <!-- TESTED -->
  11499. <description>chmod: change permission(normal mode) of multiple directories in Namenode's path recursively using globbing</description>
  11500. <test-commands>
  11501. <command>-fs NAMENODE -mkdir NAMENODE/dir0</command>
  11502. <command>-fs NAMENODE -mkdir NAMENODE/dir0/dir1</command>
  11503. <command>-fs NAMENODE -touchz NAMENODE/dir0/file0</command>
  11504. <command>-fs NAMENODE -touchz NAMENODE/dir0/dir1/file1</command>
  11505. <command>-fs NAMENODE -touchz NAMENODE/dir0/dir1/file2</command>
  11506. <command>-fs NAMENODE -mkdir NAMENODE/dir2</command>
  11507. <command>-fs NAMENODE -mkdir NAMENODE/dir2/dir1</command>
  11508. <command>-fs NAMENODE -touchz NAMENODE/dir2/file0</command>
  11509. <command>-fs NAMENODE -touchz NAMENODE/dir2/dir1/file1</command>
  11510. <command>-fs NAMENODE -touchz NAMENODE/dir2/dir1/file2</command>
  11511. <command>-fs NAMENODE -chmod -R a+rwx NAMENODE/dir*</command>
  11512. <command>-fs NAMENODE -ls -R NAMENODE/dir*</command>
  11513. </test-commands>
  11514. <cleanup-commands>
  11515. <command>-fs NAMENODE -rm -r NAMENODE/dir*</command>
  11516. </cleanup-commands>
  11517. <comparators>
  11518. <comparator>
  11519. <type>RegexpComparator</type>
  11520. <expected-output>^drwxrwxrwx( )*-( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir0/dir1</expected-output>
  11521. </comparator>
  11522. <comparator>
  11523. <type>RegexpComparator</type>
  11524. <expected-output>^-rwxrwxrwx( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir0/dir1/file1</expected-output>
  11525. </comparator>
  11526. <comparator>
  11527. <type>RegexpComparator</type>
  11528. <expected-output>^-rwxrwxrwx( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir0/dir1/file2</expected-output>
  11529. </comparator>
  11530. <comparator>
  11531. <type>RegexpComparator</type>
  11532. <expected-output>^-rwxrwxrwx( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir0/file0</expected-output>
  11533. </comparator>
  11534. <comparator>
  11535. <type>RegexpComparator</type>
  11536. <expected-output>^drwxrwxrwx( )*-( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir2/dir1</expected-output>
  11537. </comparator>
  11538. <comparator>
  11539. <type>RegexpComparator</type>
  11540. <expected-output>^-rwxrwxrwx( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir2/dir1/file1</expected-output>
  11541. </comparator>
  11542. <comparator>
  11543. <type>RegexpComparator</type>
  11544. <expected-output>^-rwxrwxrwx( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir2/dir1/file2</expected-output>
  11545. </comparator>
  11546. <comparator>
  11547. <type>RegexpComparator</type>
  11548. <expected-output>^-rwxrwxrwx( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir2/file0</expected-output>
  11549. </comparator>
  11550. </comparators>
  11551. </test>
  11552. <test> <!-- TESTED -->
  11553. <description>chmod: change permission(normal mode) of multiple directories in Namenode's path recursively without globbing</description>
  11554. <test-commands>
  11555. <command>-fs NAMENODE -mkdir NAMENODE/dir0</command>
  11556. <command>-fs NAMENODE -mkdir NAMENODE/dir0/dir1</command>
  11557. <command>-fs NAMENODE -touchz NAMENODE/dir0/file0</command>
  11558. <command>-fs NAMENODE -touchz NAMENODE/dir0/dir1/file1</command>
  11559. <command>-fs NAMENODE -touchz NAMENODE/dir0/dir1/file2</command>
  11560. <command>-fs NAMENODE -mkdir NAMENODE/dir2</command>
  11561. <command>-fs NAMENODE -mkdir NAMENODE/dir2/dir1</command>
  11562. <command>-fs NAMENODE -touchz NAMENODE/dir2/file0</command>
  11563. <command>-fs NAMENODE -touchz NAMENODE/dir2/dir1/file1</command>
  11564. <command>-fs NAMENODE -touchz NAMENODE/dir2/dir1/file2</command>
  11565. <command>-fs NAMENODE -chmod -R a+rwx NAMENODE/dir0 NAMENODE/dir2</command>
  11566. <command>-fs NAMENODE -ls -R NAMENODE/dir*</command>
  11567. </test-commands>
  11568. <cleanup-commands>
  11569. <command>-fs NAMENODE -rm -r NAMENODE/dir*</command>
  11570. </cleanup-commands>
  11571. <comparators>
  11572. <comparator>
  11573. <type>RegexpComparator</type>
  11574. <expected-output>^drwxrwxrwx( )*-( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir0/dir1</expected-output>
  11575. </comparator>
  11576. <comparator>
  11577. <type>RegexpComparator</type>
  11578. <expected-output>^-rwxrwxrwx( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir0/dir1/file1</expected-output>
  11579. </comparator>
  11580. <comparator>
  11581. <type>RegexpComparator</type>
  11582. <expected-output>^-rwxrwxrwx( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir0/dir1/file2</expected-output>
  11583. </comparator>
  11584. <comparator>
  11585. <type>RegexpComparator</type>
  11586. <expected-output>^-rwxrwxrwx( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir0/file0</expected-output>
  11587. </comparator>
  11588. <comparator>
  11589. <type>RegexpComparator</type>
  11590. <expected-output>^drwxrwxrwx( )*-( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir2/dir1</expected-output>
  11591. </comparator>
  11592. <comparator>
  11593. <type>RegexpComparator</type>
  11594. <expected-output>^-rwxrwxrwx( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir2/dir1/file1</expected-output>
  11595. </comparator>
  11596. <comparator>
  11597. <type>RegexpComparator</type>
  11598. <expected-output>^-rwxrwxrwx( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir2/dir1/file2</expected-output>
  11599. </comparator>
  11600. <comparator>
  11601. <type>RegexpComparator</type>
  11602. <expected-output>^-rwxrwxrwx( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir2/file0</expected-output>
  11603. </comparator>
  11604. </comparators>
  11605. </test>
  11606. <test> <!-- TESTED -->
  11607. <description>chmod: invalid value in octal mode of file in Namenode's path</description>
  11608. <test-commands>
  11609. <command>-fs NAMENODE -touchz NAMENODE/file1</command>
  11610. <command>-fs NAMENODE -chmod 999 NAMENODE/file1</command>
  11611. </test-commands>
  11612. <cleanup-commands>
  11613. <command>-fs NAMENODE -rm NAMENODE/file1</command>
  11614. </cleanup-commands>
  11615. <comparators>
  11616. <comparator>
  11617. <type>RegexpComparator</type>
  11618. <expected-output>^-chmod: chmod : mode '999' does not match the expected pattern.</expected-output>
  11619. </comparator>
  11620. </comparators>
  11621. </test>
  11622. <test> <!-- TESTED -->
  11623. <description>chmod: invalid value in normal mode of file in Namenode's path</description>
  11624. <test-commands>
  11625. <command>-fs NAMENODE -touchz NAMENODE/file1</command>
  11626. <command>-fs NAMENODE -chmod rdef NAMENODE/file1</command>
  11627. </test-commands>
  11628. <cleanup-commands>
  11629. <command>-fs NAMENODE -rm NAMENODE/file1</command>
  11630. </cleanup-commands>
  11631. <comparators>
  11632. <comparator>
  11633. <type>RegexpComparator</type>
  11634. <expected-output>^-chmod: chmod : mode \'rdef\' does not match the expected pattern.</expected-output>
  11635. </comparator>
  11636. </comparators>
  11637. </test>
  11638. <!-- Tests for chown -->
  11639. <test> <!-- TESTED -->
  11640. <description>chown: change ownership of file in hdfs:// path</description>
  11641. <test-commands>
  11642. <command>-fs NAMENODE -touchz hdfs:///file1</command>
  11643. <command>-fs NAMENODE -chown newowner:newgroup hdfs:///file1</command>
  11644. <command>-fs NAMENODE -ls hdfs:///file1</command>
  11645. </test-commands>
  11646. <cleanup-commands>
  11647. <command>-fs NAMENODE -rm hdfs:///file1</command>
  11648. </cleanup-commands>
  11649. <comparators>
  11650. <comparator>
  11651. <type>RegexpComparator</type>
  11652. <expected-output>^-rw-r--r--( )*1( )*newowner( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///file1</expected-output>
  11653. </comparator>
  11654. </comparators>
  11655. </test>
  11656. <test> <!-- TESTED -->
  11657. <description>chown: change ownership of directory in hdfs:// path</description>
  11658. <test-commands>
  11659. <command>-fs NAMENODE -mkdir hdfs:///dir0</command>
  11660. <command>-fs NAMENODE -mkdir hdfs:///dir0/dir1</command>
  11661. <command>-fs NAMENODE -touchz hdfs:///dir0/file0</command>
  11662. <command>-fs NAMENODE -touchz hdfs:///dir0/dir1/file1</command>
  11663. <command>-fs NAMENODE -touchz hdfs:///dir0/dir1/file2</command>
  11664. <command>-fs NAMENODE -chown newowner:newgroup hdfs:///dir0/dir1</command>
  11665. <command>-fs NAMENODE -ls -R hdfs:///dir0</command>
  11666. </test-commands>
  11667. <cleanup-commands>
  11668. <command>-fs NAMENODE -rm -r hdfs:///dir0</command>
  11669. </cleanup-commands>
  11670. <comparators>
  11671. <comparator>
  11672. <type>RegexpComparator</type>
  11673. <expected-output>^drwxr-xr-x( )*-( )*newowner( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir0/dir1</expected-output>
  11674. </comparator>
  11675. <comparator>
  11676. <type>RegexpComparator</type>
  11677. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir0/dir1/file1</expected-output>
  11678. </comparator>
  11679. <comparator>
  11680. <type>RegexpComparator</type>
  11681. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir0/dir1/file2</expected-output>
  11682. </comparator>
  11683. <comparator>
  11684. <type>RegexpComparator</type>
  11685. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir0/file0</expected-output>
  11686. </comparator>
  11687. </comparators>
  11688. </test>
  11689. <test> <!-- TESTED -->
  11690. <description>chown: change ownership of directory in hdfs:// path recursively </description>
  11691. <test-commands>
  11692. <command>-fs NAMENODE -mkdir hdfs:///dir0</command>
  11693. <command>-fs NAMENODE -mkdir hdfs:///dir0/dir1</command>
  11694. <command>-fs NAMENODE -touchz hdfs:///dir0/file0</command>
  11695. <command>-fs NAMENODE -touchz hdfs:///dir0/dir1/file1</command>
  11696. <command>-fs NAMENODE -touchz hdfs:///dir0/dir1/file2</command>
  11697. <command>-fs NAMENODE -chown -R newowner:newgroup hdfs:///dir0/dir1</command>
  11698. <command>-fs NAMENODE -ls -R hdfs:///dir0</command>
  11699. </test-commands>
  11700. <cleanup-commands>
  11701. <command>-fs NAMENODE -rm -r hdfs:///dir0</command>
  11702. </cleanup-commands>
  11703. <comparators>
  11704. <comparator>
  11705. <type>RegexpComparator</type>
  11706. <expected-output>^drwxr-xr-x( )*-( )*newowner( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir0/dir1</expected-output>
  11707. </comparator>
  11708. <comparator>
  11709. <type>RegexpComparator</type>
  11710. <expected-output>^-rw-r--r--( )*1( )*newowner( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir0/dir1/file1</expected-output>
  11711. </comparator>
  11712. <comparator>
  11713. <type>RegexpComparator</type>
  11714. <expected-output>^-rw-r--r--( )*1( )*newowner( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir0/dir1/file2</expected-output>
  11715. </comparator>
  11716. <comparator>
  11717. <type>RegexpComparator</type>
  11718. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir0/file0</expected-output>
  11719. </comparator>
  11720. </comparators>
  11721. </test>
  11722. <test> <!-- TESTED -->
  11723. <description>chown: change ownership of non existent file in hdfs:// path</description>
  11724. <test-commands>
  11725. <command>-fs NAMENODE -chown newowner:newgroup hdfs:///file1</command>
  11726. </test-commands>
  11727. <cleanup-commands>
  11728. <command>-fs NAMENODE -rm hdfs:///file1</command>
  11729. </cleanup-commands>
  11730. <comparators>
  11731. <comparator>
  11732. <type>RegexpComparator</type>
  11733. <expected-output>^chown: `hdfs:///file1': No such file or directory</expected-output>
  11734. </comparator>
  11735. </comparators>
  11736. </test>
  11737. <test> <!-- TESTED -->
  11738. <description>chown: change ownership of multiple files in hdfs:// path using globbing</description>
  11739. <test-commands>
  11740. <command>-fs NAMENODE -touchz hdfs:///file1</command>
  11741. <command>-fs NAMENODE -touchz hdfs:///file2</command>
  11742. <command>-fs NAMENODE -touchz hdfs:///file3</command>
  11743. <command>-fs NAMENODE -touchz hdfs:///file4</command>
  11744. <command>-fs NAMENODE -chown newowner:newgroup hdfs:///file* </command>
  11745. <command>-fs NAMENODE -ls -R hdfs:///file*</command>
  11746. </test-commands>
  11747. <cleanup-commands>
  11748. <command>-fs NAMENODE -rm hdfs:///file*</command>
  11749. </cleanup-commands>
  11750. <comparators>
  11751. <comparator>
  11752. <type>RegexpComparator</type>
  11753. <expected-output>^-rw-r--r--( )*1( )*newowner( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///file1</expected-output>
  11754. </comparator>
  11755. <comparator>
  11756. <type>RegexpComparator</type>
  11757. <expected-output>^-rw-r--r--( )*1( )*newowner( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///file2</expected-output>
  11758. </comparator>
  11759. <comparator>
  11760. <type>RegexpComparator</type>
  11761. <expected-output>^-rw-r--r--( )*1( )*newowner( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///file3</expected-output>
  11762. </comparator>
  11763. <comparator>
  11764. <type>RegexpComparator</type>
  11765. <expected-output>^-rw-r--r--( )*1( )*newowner( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///file4</expected-output>
  11766. </comparator>
  11767. </comparators>
  11768. </test>
  11769. <test> <!-- TESTED -->
  11770. <description>chown: change ownership of multiple directories in hdfs:// path using globbing</description>
  11771. <test-commands>
  11772. <command>-fs NAMENODE -mkdir hdfs:///dir0</command>
  11773. <command>-fs NAMENODE -mkdir hdfs:///dir0/dir1</command>
  11774. <command>-fs NAMENODE -touchz hdfs:///dir0/file0</command>
  11775. <command>-fs NAMENODE -touchz hdfs:///dir0/dir1/file1</command>
  11776. <command>-fs NAMENODE -touchz hdfs:///dir0/dir1/file2</command>
  11777. <command>-fs NAMENODE -mkdir hdfs:///dir2</command>
  11778. <command>-fs NAMENODE -mkdir hdfs:///dir2/dir1</command>
  11779. <command>-fs NAMENODE -touchz hdfs:///dir2/file0</command>
  11780. <command>-fs NAMENODE -touchz hdfs:///dir2/dir1/file1</command>
  11781. <command>-fs NAMENODE -touchz hdfs:///dir2/dir1/file2</command>
  11782. <command>-fs NAMENODE -chown newowner:newgroup hdfs:///dir*</command>
  11783. <command>-fs NAMENODE -ls -R hdfs:///dir*</command>
  11784. </test-commands>
  11785. <cleanup-commands>
  11786. <command>-fs NAMENODE -rm -r hdfs:///dir*</command>
  11787. </cleanup-commands>
  11788. <comparators>
  11789. <comparator>
  11790. <type>RegexpComparator</type>
  11791. <expected-output>^drwxr-xr-x( )*-( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir0/dir1</expected-output>
  11792. </comparator>
  11793. <comparator>
  11794. <type>RegexpComparator</type>
  11795. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir0/dir1/file1</expected-output>
  11796. </comparator>
  11797. <comparator>
  11798. <type>RegexpComparator</type>
  11799. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir0/dir1/file2</expected-output>
  11800. </comparator>
  11801. <comparator>
  11802. <type>RegexpComparator</type>
  11803. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir0/file0</expected-output>
  11804. </comparator>
  11805. <comparator>
  11806. <type>RegexpComparator</type>
  11807. <expected-output>^drwxr-xr-x( )*-( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir2/dir1</expected-output>
  11808. </comparator>
  11809. <comparator>
  11810. <type>RegexpComparator</type>
  11811. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir2/dir1/file1</expected-output>
  11812. </comparator>
  11813. <comparator>
  11814. <type>RegexpComparator</type>
  11815. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir2/dir1/file2</expected-output>
  11816. </comparator>
  11817. <comparator>
  11818. <type>RegexpComparator</type>
  11819. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir2/file0</expected-output>
  11820. </comparator>
  11821. </comparators>
  11822. </test>
  11823. <test> <!-- TESTED -->
  11824. <description>chown: change ownership of multiple files in hdfs:// path without globbing</description>
  11825. <test-commands>
  11826. <command>-fs NAMENODE -touchz hdfs:///file1</command>
  11827. <command>-fs NAMENODE -touchz hdfs:///file2</command>
  11828. <command>-fs NAMENODE -touchz hdfs:///file3</command>
  11829. <command>-fs NAMENODE -touchz hdfs:///file4</command>
  11830. <command>-fs NAMENODE -chown newowner:newgroup hdfs:///file1 hdfs:///file2 hdfs:///file3 hdfs:///file4 </command>
  11831. <command>-fs NAMENODE -ls -R hdfs:///file*</command>
  11832. </test-commands>
  11833. <cleanup-commands>
  11834. <command>-fs NAMENODE -rm hdfs:///file*</command>
  11835. </cleanup-commands>
  11836. <comparators>
  11837. <comparator>
  11838. <type>RegexpComparator</type>
  11839. <expected-output>^-rw-r--r--( )*1( )*newowner( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///file1</expected-output>
  11840. </comparator>
  11841. <comparator>
  11842. <type>RegexpComparator</type>
  11843. <expected-output>^-rw-r--r--( )*1( )*newowner( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///file2</expected-output>
  11844. </comparator>
  11845. <comparator>
  11846. <type>RegexpComparator</type>
  11847. <expected-output>^-rw-r--r--( )*1( )*newowner( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///file3</expected-output>
  11848. </comparator>
  11849. <comparator>
  11850. <type>RegexpComparator</type>
  11851. <expected-output>^-rw-r--r--( )*1( )*newowner( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///file4</expected-output>
  11852. </comparator>
  11853. </comparators>
  11854. </test>
  11855. <test> <!-- TESTED -->
  11856. <description>chown: change ownership of multiple directories in hdfs:// path without globbing</description>
  11857. <test-commands>
  11858. <command>-fs NAMENODE -mkdir hdfs:///dir0</command>
  11859. <command>-fs NAMENODE -mkdir hdfs:///dir0/dir1</command>
  11860. <command>-fs NAMENODE -touchz hdfs:///dir0/file0</command>
  11861. <command>-fs NAMENODE -touchz hdfs:///dir0/dir1/file1</command>
  11862. <command>-fs NAMENODE -touchz hdfs:///dir0/dir1/file2</command>
  11863. <command>-fs NAMENODE -mkdir hdfs:///dir2</command>
  11864. <command>-fs NAMENODE -mkdir hdfs:///dir2/dir1</command>
  11865. <command>-fs NAMENODE -touchz hdfs:///dir2/file0</command>
  11866. <command>-fs NAMENODE -touchz hdfs:///dir2/dir1/file1</command>
  11867. <command>-fs NAMENODE -touchz hdfs:///dir2/dir1/file2</command>
  11868. <command>-fs NAMENODE -chown newowner:newgroup hdfs:///dir0 hdfs:///dir2</command>
  11869. <command>-fs NAMENODE -ls -R hdfs:///dir*</command>
  11870. </test-commands>
  11871. <cleanup-commands>
  11872. <command>-fs NAMENODE -rm -r hdfs:///dir*</command>
  11873. </cleanup-commands>
  11874. <comparators>
  11875. <comparator>
  11876. <type>RegexpComparator</type>
  11877. <expected-output>^drwxr-xr-x( )*-( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir0/dir1</expected-output>
  11878. </comparator>
  11879. <comparator>
  11880. <type>RegexpComparator</type>
  11881. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir0/dir1/file1</expected-output>
  11882. </comparator>
  11883. <comparator>
  11884. <type>RegexpComparator</type>
  11885. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir0/dir1/file2</expected-output>
  11886. </comparator>
  11887. <comparator>
  11888. <type>RegexpComparator</type>
  11889. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir0/file0</expected-output>
  11890. </comparator>
  11891. <comparator>
  11892. <type>RegexpComparator</type>
  11893. <expected-output>^drwxr-xr-x( )*-( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir2/dir1</expected-output>
  11894. </comparator>
  11895. <comparator>
  11896. <type>RegexpComparator</type>
  11897. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir2/dir1/file1</expected-output>
  11898. </comparator>
  11899. <comparator>
  11900. <type>RegexpComparator</type>
  11901. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir2/dir1/file2</expected-output>
  11902. </comparator>
  11903. <comparator>
  11904. <type>RegexpComparator</type>
  11905. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir2/file0</expected-output>
  11906. </comparator>
  11907. </comparators>
  11908. </test>
  11909. <test> <!-- TESTED -->
  11910. <description>chown: change ownership of multiple directories recursively in hdfs:// path using globbing</description>
  11911. <test-commands>
  11912. <command>-fs NAMENODE -mkdir hdfs:///dir0</command>
  11913. <command>-fs NAMENODE -mkdir hdfs:///dir0/dir1</command>
  11914. <command>-fs NAMENODE -touchz hdfs:///dir0/file0</command>
  11915. <command>-fs NAMENODE -touchz hdfs:///dir0/dir1/file1</command>
  11916. <command>-fs NAMENODE -touchz hdfs:///dir0/dir1/file2</command>
  11917. <command>-fs NAMENODE -mkdir hdfs:///dir2</command>
  11918. <command>-fs NAMENODE -mkdir hdfs:///dir2/dir1</command>
  11919. <command>-fs NAMENODE -touchz hdfs:///dir2/file0</command>
  11920. <command>-fs NAMENODE -touchz hdfs:///dir2/dir1/file1</command>
  11921. <command>-fs NAMENODE -touchz hdfs:///dir2/dir1/file2</command>
  11922. <command>-fs NAMENODE -chown -R newowner:newgroup hdfs:///dir*</command>
  11923. <command>-fs NAMENODE -ls -R hdfs:///dir*</command>
  11924. </test-commands>
  11925. <cleanup-commands>
  11926. <command>-fs NAMENODE -rm -r hdfs:///dir*</command>
  11927. </cleanup-commands>
  11928. <comparators>
  11929. <comparator>
  11930. <type>RegexpComparator</type>
  11931. <expected-output>^drwxr-xr-x( )*-( )*newowner( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir0/dir1</expected-output>
  11932. </comparator>
  11933. <comparator>
  11934. <type>RegexpComparator</type>
  11935. <expected-output>^-rw-r--r--( )*1( )*newowner( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir0/dir1/file1</expected-output>
  11936. </comparator>
  11937. <comparator>
  11938. <type>RegexpComparator</type>
  11939. <expected-output>^-rw-r--r--( )*1( )*newowner( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir0/dir1/file2</expected-output>
  11940. </comparator>
  11941. <comparator>
  11942. <type>RegexpComparator</type>
  11943. <expected-output>^-rw-r--r--( )*1( )*newowner( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir0/file0</expected-output>
  11944. </comparator>
  11945. <comparator>
  11946. <type>RegexpComparator</type>
  11947. <expected-output>^drwxr-xr-x( )*-( )*newowner( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir2/dir1</expected-output>
  11948. </comparator>
  11949. <comparator>
  11950. <type>RegexpComparator</type>
  11951. <expected-output>^-rw-r--r--( )*1( )*newowner( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir2/dir1/file1</expected-output>
  11952. </comparator>
  11953. <comparator>
  11954. <type>RegexpComparator</type>
  11955. <expected-output>^-rw-r--r--( )*1( )*newowner( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir2/dir1/file2</expected-output>
  11956. </comparator>
  11957. <comparator>
  11958. <type>RegexpComparator</type>
  11959. <expected-output>^-rw-r--r--( )*1( )*newowner( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir2/file0</expected-output>
  11960. </comparator>
  11961. </comparators>
  11962. </test>
  11963. <test> <!-- TESTED -->
  11964. <description>chown: change ownership of multiple directories recursively in hdfs:// path without globbing</description>
  11965. <test-commands>
  11966. <command>-fs NAMENODE -mkdir hdfs:///dir0</command>
  11967. <command>-fs NAMENODE -mkdir hdfs:///dir0/dir1</command>
  11968. <command>-fs NAMENODE -touchz hdfs:///dir0/file0</command>
  11969. <command>-fs NAMENODE -touchz hdfs:///dir0/dir1/file1</command>
  11970. <command>-fs NAMENODE -touchz hdfs:///dir0/dir1/file2</command>
  11971. <command>-fs NAMENODE -mkdir hdfs:///dir2</command>
  11972. <command>-fs NAMENODE -mkdir hdfs:///dir2/dir1</command>
  11973. <command>-fs NAMENODE -touchz hdfs:///dir2/file0</command>
  11974. <command>-fs NAMENODE -touchz hdfs:///dir2/dir1/file1</command>
  11975. <command>-fs NAMENODE -touchz hdfs:///dir2/dir1/file2</command>
  11976. <command>-fs NAMENODE -chown -R newowner:newgroup hdfs:///dir0 hdfs:///dir2</command>
  11977. <command>-fs NAMENODE -ls -R hdfs:///dir*</command>
  11978. </test-commands>
  11979. <cleanup-commands>
  11980. <command>-fs NAMENODE -rm -r hdfs:///dir*</command>
  11981. </cleanup-commands>
  11982. <comparators>
  11983. <comparator>
  11984. <type>RegexpComparator</type>
  11985. <expected-output>^drwxr-xr-x( )*-( )*newowner( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir0/dir1</expected-output>
  11986. </comparator>
  11987. <comparator>
  11988. <type>RegexpComparator</type>
  11989. <expected-output>^-rw-r--r--( )*1( )*newowner( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir0/dir1/file1</expected-output>
  11990. </comparator>
  11991. <comparator>
  11992. <type>RegexpComparator</type>
  11993. <expected-output>^-rw-r--r--( )*1( )*newowner( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir0/dir1/file2</expected-output>
  11994. </comparator>
  11995. <comparator>
  11996. <type>RegexpComparator</type>
  11997. <expected-output>^-rw-r--r--( )*1( )*newowner( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir0/file0</expected-output>
  11998. </comparator>
  11999. <comparator>
  12000. <type>RegexpComparator</type>
  12001. <expected-output>^drwxr-xr-x( )*-( )*newowner( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir2/dir1</expected-output>
  12002. </comparator>
  12003. <comparator>
  12004. <type>RegexpComparator</type>
  12005. <expected-output>^-rw-r--r--( )*1( )*newowner( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir2/dir1/file1</expected-output>
  12006. </comparator>
  12007. <comparator>
  12008. <type>RegexpComparator</type>
  12009. <expected-output>^-rw-r--r--( )*1( )*newowner( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir2/dir1/file2</expected-output>
  12010. </comparator>
  12011. <comparator>
  12012. <type>RegexpComparator</type>
  12013. <expected-output>^-rw-r--r--( )*1( )*newowner( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir2/file0</expected-output>
  12014. </comparator>
  12015. </comparators>
  12016. </test>
  12017. <test> <!-- TESTED -->
  12018. <description>chown: invalid option for owner of file in hdfs:// path</description>
  12019. <test-commands>
  12020. <command>-fs NAMENODE -touchz hdfs:///file1</command>
  12021. <command>-fs NAMENODE -chown %:newgroup hdfs:///file1</command>
  12022. </test-commands>
  12023. <cleanup-commands>
  12024. <command>-fs NAMENODE -rm hdfs:///file1</command>
  12025. </cleanup-commands>
  12026. <comparators>
  12027. <comparator>
  12028. <type>RegexpComparator</type>
  12029. <expected-output>^-chown: '%:newgroup' does not match expected pattern for \[owner\]\[:group\].</expected-output>
  12030. </comparator>
  12031. </comparators>
  12032. </test>
  12033. <test> <!-- TESTED -->
  12034. <description>chown: invalid option for group of file in hdfs:// path</description>
  12035. <test-commands>
  12036. <command>-fs NAMENODE -touchz hdfs:///file1</command>
  12037. <command>-fs NAMENODE -chown newowner:% hdfs:///file1</command>
  12038. </test-commands>
  12039. <cleanup-commands>
  12040. <command>-fs NAMENODE -rm hdfs:///file1</command>
  12041. </cleanup-commands>
  12042. <comparators>
  12043. <comparator>
  12044. <type>RegexpComparator</type>
  12045. <expected-output>^-chown: 'newowner:%' does not match expected pattern for \[owner\]\[:group\].</expected-output>
  12046. </comparator>
  12047. </comparators>
  12048. </test>
  12049. <!-- Tests for chown -->
  12050. <test> <!-- TESTED -->
  12051. <description>chown: change ownership of file in absolute path</description>
  12052. <test-commands>
  12053. <command>-fs NAMENODE -touchz /file1</command>
  12054. <command>-fs NAMENODE -chown newowner:newgroup /file1</command>
  12055. <command>-fs NAMENODE -ls /file1</command>
  12056. </test-commands>
  12057. <cleanup-commands>
  12058. <command>-fs NAMENODE -rm /file1</command>
  12059. </cleanup-commands>
  12060. <comparators>
  12061. <comparator>
  12062. <type>RegexpComparator</type>
  12063. <expected-output>^-rw-r--r--( )*1( )*newowner( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/file1</expected-output>
  12064. </comparator>
  12065. </comparators>
  12066. </test>
  12067. <test> <!-- TESTED -->
  12068. <description>chown: change ownership of file in relative path</description>
  12069. <test-commands>
  12070. <command>-fs NAMENODE -touchz file1</command>
  12071. <command>-fs NAMENODE -chown newowner:newgroup file1</command>
  12072. <command>-fs NAMENODE -ls file1</command>
  12073. </test-commands>
  12074. <cleanup-commands>
  12075. <command>-fs NAMENODE -rm file1</command>
  12076. </cleanup-commands>
  12077. <comparators>
  12078. <comparator>
  12079. <type>RegexpComparator</type>
  12080. <expected-output>^-rw-r--r--( )*1( )*newowner( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*file1</expected-output>
  12081. </comparator>
  12082. </comparators>
  12083. </test>
  12084. <test> <!-- TESTED -->
  12085. <description>chown: change ownership of directory in absolute path</description>
  12086. <test-commands>
  12087. <command>-fs NAMENODE -mkdir /dir0</command>
  12088. <command>-fs NAMENODE -mkdir /dir0/dir1</command>
  12089. <command>-fs NAMENODE -touchz /dir0/file0</command>
  12090. <command>-fs NAMENODE -touchz /dir0/dir1/file1</command>
  12091. <command>-fs NAMENODE -touchz /dir0/dir1/file2</command>
  12092. <command>-fs NAMENODE -chown newowner:newgroup /dir0/dir1</command>
  12093. <command>-fs NAMENODE -ls -R /dir0</command>
  12094. </test-commands>
  12095. <cleanup-commands>
  12096. <command>-fs NAMENODE -rm -r /dir0</command>
  12097. </cleanup-commands>
  12098. <comparators>
  12099. <comparator>
  12100. <type>RegexpComparator</type>
  12101. <expected-output>^drwxr-xr-x( )*-( )*newowner( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1</expected-output>
  12102. </comparator>
  12103. <comparator>
  12104. <type>RegexpComparator</type>
  12105. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1/file1</expected-output>
  12106. </comparator>
  12107. <comparator>
  12108. <type>RegexpComparator</type>
  12109. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1/file2</expected-output>
  12110. </comparator>
  12111. <comparator>
  12112. <type>RegexpComparator</type>
  12113. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/file0</expected-output>
  12114. </comparator>
  12115. </comparators>
  12116. </test>
  12117. <test> <!-- TESTED -->
  12118. <description>chown: change ownership of directory in relative path</description>
  12119. <test-commands>
  12120. <command>-fs NAMENODE -mkdir -p dir0</command>
  12121. <command>-fs NAMENODE -mkdir -p dir0/dir1</command>
  12122. <command>-fs NAMENODE -touchz dir0/file0</command>
  12123. <command>-fs NAMENODE -touchz dir0/dir1/file1</command>
  12124. <command>-fs NAMENODE -touchz dir0/dir1/file2</command>
  12125. <command>-fs NAMENODE -chown newowner:newgroup dir0/dir1</command>
  12126. <command>-fs NAMENODE -ls -R dir0</command>
  12127. </test-commands>
  12128. <cleanup-commands>
  12129. <command>-fs NAMENODE -rm -r dir0</command>
  12130. </cleanup-commands>
  12131. <comparators>
  12132. <comparator>
  12133. <type>RegexpComparator</type>
  12134. <expected-output>^drwxr-xr-x( )*-( )*newowner( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/dir1</expected-output>
  12135. </comparator>
  12136. <comparator>
  12137. <type>RegexpComparator</type>
  12138. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/dir1/file1</expected-output>
  12139. </comparator>
  12140. <comparator>
  12141. <type>RegexpComparator</type>
  12142. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/dir1/file2</expected-output>
  12143. </comparator>
  12144. <comparator>
  12145. <type>RegexpComparator</type>
  12146. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/file0</expected-output>
  12147. </comparator>
  12148. </comparators>
  12149. </test>
  12150. <test> <!-- TESTED -->
  12151. <description>chown: change ownership of directory in absolute path recursively </description>
  12152. <test-commands>
  12153. <command>-fs NAMENODE -mkdir /dir0</command>
  12154. <command>-fs NAMENODE -mkdir /dir0/dir1</command>
  12155. <command>-fs NAMENODE -touchz /dir0/file0</command>
  12156. <command>-fs NAMENODE -touchz /dir0/dir1/file1</command>
  12157. <command>-fs NAMENODE -touchz /dir0/dir1/file2</command>
  12158. <command>-fs NAMENODE -chown -R newowner:newgroup /dir0/dir1</command>
  12159. <command>-fs NAMENODE -ls -R /dir0</command>
  12160. </test-commands>
  12161. <cleanup-commands>
  12162. <command>-fs NAMENODE -rm -r /dir0</command>
  12163. </cleanup-commands>
  12164. <comparators>
  12165. <comparator>
  12166. <type>RegexpComparator</type>
  12167. <expected-output>^drwxr-xr-x( )*-( )*newowner( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1</expected-output>
  12168. </comparator>
  12169. <comparator>
  12170. <type>RegexpComparator</type>
  12171. <expected-output>^-rw-r--r--( )*1( )*newowner( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1/file1</expected-output>
  12172. </comparator>
  12173. <comparator>
  12174. <type>RegexpComparator</type>
  12175. <expected-output>^-rw-r--r--( )*1( )*newowner( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1/file2</expected-output>
  12176. </comparator>
  12177. <comparator>
  12178. <type>RegexpComparator</type>
  12179. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/file0</expected-output>
  12180. </comparator>
  12181. </comparators>
  12182. </test>
  12183. <test> <!-- TESTED -->
  12184. <description>chown: change ownership of directory in relative path recursively </description>
  12185. <test-commands>
  12186. <command>-fs NAMENODE -mkdir -p dir0</command>
  12187. <command>-fs NAMENODE -mkdir -p dir0/dir1</command>
  12188. <command>-fs NAMENODE -touchz dir0/file0</command>
  12189. <command>-fs NAMENODE -touchz dir0/dir1/file1</command>
  12190. <command>-fs NAMENODE -touchz dir0/dir1/file2</command>
  12191. <command>-fs NAMENODE -chown -R newowner:newgroup dir0/dir1</command>
  12192. <command>-fs NAMENODE -ls -R dir0</command>
  12193. </test-commands>
  12194. <cleanup-commands>
  12195. <command>-fs NAMENODE -rm -r dir0</command>
  12196. </cleanup-commands>
  12197. <comparators>
  12198. <comparator>
  12199. <type>RegexpComparator</type>
  12200. <expected-output>^drwxr-xr-x( )*-( )*newowner( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/dir1</expected-output>
  12201. </comparator>
  12202. <comparator>
  12203. <type>RegexpComparator</type>
  12204. <expected-output>^-rw-r--r--( )*1( )*newowner( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/dir1/file1</expected-output>
  12205. </comparator>
  12206. <comparator>
  12207. <type>RegexpComparator</type>
  12208. <expected-output>^-rw-r--r--( )*1( )*newowner( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/dir1/file2</expected-output>
  12209. </comparator>
  12210. <comparator>
  12211. <type>RegexpComparator</type>
  12212. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/file0</expected-output>
  12213. </comparator>
  12214. </comparators>
  12215. </test>
  12216. <test> <!-- TESTED -->
  12217. <description>chown: change ownership of non existent file in absolute path</description>
  12218. <test-commands>
  12219. <command>-fs NAMENODE -chown newowner:newgroup /file1</command>
  12220. </test-commands>
  12221. <cleanup-commands>
  12222. <command>-fs NAMENODE -rm /file1</command>
  12223. </cleanup-commands>
  12224. <comparators>
  12225. <comparator>
  12226. <type>RegexpComparator</type>
  12227. <expected-output>^chown: `/file1': No such file or directory</expected-output>
  12228. </comparator>
  12229. </comparators>
  12230. </test>
  12231. <test> <!-- TESTED -->
  12232. <description>chown: change ownership of non existent file in relative path</description>
  12233. <test-commands>
  12234. <command>-fs NAMENODE -chown newowner:newgroup file1</command>
  12235. </test-commands>
  12236. <cleanup-commands>
  12237. <command>-fs NAMENODE -rm file1</command>
  12238. </cleanup-commands>
  12239. <comparators>
  12240. <comparator>
  12241. <type>RegexpComparator</type>
  12242. <expected-output>^chown: `file1': No such file or directory</expected-output>
  12243. </comparator>
  12244. </comparators>
  12245. </test>
  12246. <test> <!-- TESTED -->
  12247. <description>chown: change ownership of multiple files in absolute path using globbing</description>
  12248. <test-commands>
  12249. <command>-fs NAMENODE -touchz /file1</command>
  12250. <command>-fs NAMENODE -touchz /file2</command>
  12251. <command>-fs NAMENODE -touchz /file3</command>
  12252. <command>-fs NAMENODE -touchz /file4</command>
  12253. <command>-fs NAMENODE -chown newowner:newgroup /file* </command>
  12254. <command>-fs NAMENODE -ls -R /file*</command>
  12255. </test-commands>
  12256. <cleanup-commands>
  12257. <command>-fs NAMENODE -rm /file*</command>
  12258. </cleanup-commands>
  12259. <comparators>
  12260. <comparator>
  12261. <type>RegexpComparator</type>
  12262. <expected-output>^-rw-r--r--( )*1( )*newowner( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/file1</expected-output>
  12263. </comparator>
  12264. <comparator>
  12265. <type>RegexpComparator</type>
  12266. <expected-output>^-rw-r--r--( )*1( )*newowner( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/file2</expected-output>
  12267. </comparator>
  12268. <comparator>
  12269. <type>RegexpComparator</type>
  12270. <expected-output>^-rw-r--r--( )*1( )*newowner( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/file3</expected-output>
  12271. </comparator>
  12272. <comparator>
  12273. <type>RegexpComparator</type>
  12274. <expected-output>^-rw-r--r--( )*1( )*newowner( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/file4</expected-output>
  12275. </comparator>
  12276. </comparators>
  12277. </test>
  12278. <test> <!-- TESTED -->
  12279. <description>chown: change ownership of multiple files in relative path using globbing</description>
  12280. <test-commands>
  12281. <command>-fs NAMENODE -touchz file1</command>
  12282. <command>-fs NAMENODE -touchz file2</command>
  12283. <command>-fs NAMENODE -touchz file3</command>
  12284. <command>-fs NAMENODE -touchz file4</command>
  12285. <command>-fs NAMENODE -chown newowner:newgroup file* </command>
  12286. <command>-fs NAMENODE -ls -R file*</command>
  12287. </test-commands>
  12288. <cleanup-commands>
  12289. <command>-fs NAMENODE -rm file*</command>
  12290. </cleanup-commands>
  12291. <comparators>
  12292. <comparator>
  12293. <type>RegexpComparator</type>
  12294. <expected-output>^-rw-r--r--( )*1( )*newowner( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*file1</expected-output>
  12295. </comparator>
  12296. <comparator>
  12297. <type>RegexpComparator</type>
  12298. <expected-output>^-rw-r--r--( )*1( )*newowner( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*file2</expected-output>
  12299. </comparator>
  12300. <comparator>
  12301. <type>RegexpComparator</type>
  12302. <expected-output>^-rw-r--r--( )*1( )*newowner( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*file3</expected-output>
  12303. </comparator>
  12304. <comparator>
  12305. <type>RegexpComparator</type>
  12306. <expected-output>^-rw-r--r--( )*1( )*newowner( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*file4</expected-output>
  12307. </comparator>
  12308. </comparators>
  12309. </test>
  12310. <test> <!-- TESTED -->
  12311. <description>chown: change ownership of multiple directories in absolute path using globbing</description>
  12312. <test-commands>
  12313. <command>-fs NAMENODE -mkdir /dir0</command>
  12314. <command>-fs NAMENODE -mkdir /dir0/dir1</command>
  12315. <command>-fs NAMENODE -touchz /dir0/file0</command>
  12316. <command>-fs NAMENODE -touchz /dir0/dir1/file1</command>
  12317. <command>-fs NAMENODE -touchz /dir0/dir1/file2</command>
  12318. <command>-fs NAMENODE -mkdir /dir2</command>
  12319. <command>-fs NAMENODE -mkdir /dir2/dir1</command>
  12320. <command>-fs NAMENODE -touchz /dir2/file0</command>
  12321. <command>-fs NAMENODE -touchz /dir2/dir1/file1</command>
  12322. <command>-fs NAMENODE -touchz /dir2/dir1/file2</command>
  12323. <command>-fs NAMENODE -chown newowner:newgroup /dir*</command>
  12324. <command>-fs NAMENODE -ls -R /dir*</command>
  12325. </test-commands>
  12326. <cleanup-commands>
  12327. <command>-fs NAMENODE -rm -r /dir*</command>
  12328. </cleanup-commands>
  12329. <comparators>
  12330. <comparator>
  12331. <type>RegexpComparator</type>
  12332. <expected-output>^drwxr-xr-x( )*-( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1</expected-output>
  12333. </comparator>
  12334. <comparator>
  12335. <type>RegexpComparator</type>
  12336. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1/file1</expected-output>
  12337. </comparator>
  12338. <comparator>
  12339. <type>RegexpComparator</type>
  12340. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1/file2</expected-output>
  12341. </comparator>
  12342. <comparator>
  12343. <type>RegexpComparator</type>
  12344. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/file0</expected-output>
  12345. </comparator>
  12346. <comparator>
  12347. <type>RegexpComparator</type>
  12348. <expected-output>^drwxr-xr-x( )*-( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir2/dir1</expected-output>
  12349. </comparator>
  12350. <comparator>
  12351. <type>RegexpComparator</type>
  12352. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir2/dir1/file1</expected-output>
  12353. </comparator>
  12354. <comparator>
  12355. <type>RegexpComparator</type>
  12356. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir2/dir1/file2</expected-output>
  12357. </comparator>
  12358. <comparator>
  12359. <type>RegexpComparator</type>
  12360. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir2/file0</expected-output>
  12361. </comparator>
  12362. </comparators>
  12363. </test>
  12364. <test> <!-- TESTED -->
  12365. <description>chown: change ownership of multiple directories in relative path using globbing</description>
  12366. <test-commands>
  12367. <command>-fs NAMENODE -mkdir -p dir0</command>
  12368. <command>-fs NAMENODE -mkdir -p dir0/dir1</command>
  12369. <command>-fs NAMENODE -touchz dir0/file0</command>
  12370. <command>-fs NAMENODE -touchz dir0/dir1/file1</command>
  12371. <command>-fs NAMENODE -touchz dir0/dir1/file2</command>
  12372. <command>-fs NAMENODE -mkdir -p dir2</command>
  12373. <command>-fs NAMENODE -mkdir -p dir2/dir1</command>
  12374. <command>-fs NAMENODE -touchz dir2/file0</command>
  12375. <command>-fs NAMENODE -touchz dir2/dir1/file1</command>
  12376. <command>-fs NAMENODE -touchz dir2/dir1/file2</command>
  12377. <command>-fs NAMENODE -chown newowner:newgroup dir*</command>
  12378. <command>-fs NAMENODE -ls -R dir*</command>
  12379. </test-commands>
  12380. <cleanup-commands>
  12381. <command>-fs NAMENODE -rm -r dir*</command>
  12382. </cleanup-commands>
  12383. <comparators>
  12384. <comparator>
  12385. <type>RegexpComparator</type>
  12386. <expected-output>^drwxr-xr-x( )*-( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/dir1</expected-output>
  12387. </comparator>
  12388. <comparator>
  12389. <type>RegexpComparator</type>
  12390. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/dir1/file1</expected-output>
  12391. </comparator>
  12392. <comparator>
  12393. <type>RegexpComparator</type>
  12394. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/dir1/file2</expected-output>
  12395. </comparator>
  12396. <comparator>
  12397. <type>RegexpComparator</type>
  12398. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/file0</expected-output>
  12399. </comparator>
  12400. <comparator>
  12401. <type>RegexpComparator</type>
  12402. <expected-output>^drwxr-xr-x( )*-( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir2/dir1</expected-output>
  12403. </comparator>
  12404. <comparator>
  12405. <type>RegexpComparator</type>
  12406. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir2/dir1/file1</expected-output>
  12407. </comparator>
  12408. <comparator>
  12409. <type>RegexpComparator</type>
  12410. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir2/dir1/file2</expected-output>
  12411. </comparator>
  12412. <comparator>
  12413. <type>RegexpComparator</type>
  12414. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir2/file0</expected-output>
  12415. </comparator>
  12416. </comparators>
  12417. </test>
  12418. <test> <!-- TESTED -->
  12419. <description>chown: change ownership of multiple files in absolute path without globbing</description>
  12420. <test-commands>
  12421. <command>-fs NAMENODE -touchz /file1</command>
  12422. <command>-fs NAMENODE -touchz /file2</command>
  12423. <command>-fs NAMENODE -touchz /file3</command>
  12424. <command>-fs NAMENODE -touchz /file4</command>
  12425. <command>-fs NAMENODE -chown newowner:newgroup /file1 /file2 /file3 /file4 </command>
  12426. <command>-fs NAMENODE -ls -R /file*</command>
  12427. </test-commands>
  12428. <cleanup-commands>
  12429. <command>-fs NAMENODE -rm /file*</command>
  12430. </cleanup-commands>
  12431. <comparators>
  12432. <comparator>
  12433. <type>RegexpComparator</type>
  12434. <expected-output>^-rw-r--r--( )*1( )*newowner( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/file1</expected-output>
  12435. </comparator>
  12436. <comparator>
  12437. <type>RegexpComparator</type>
  12438. <expected-output>^-rw-r--r--( )*1( )*newowner( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/file2</expected-output>
  12439. </comparator>
  12440. <comparator>
  12441. <type>RegexpComparator</type>
  12442. <expected-output>^-rw-r--r--( )*1( )*newowner( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/file3</expected-output>
  12443. </comparator>
  12444. <comparator>
  12445. <type>RegexpComparator</type>
  12446. <expected-output>^-rw-r--r--( )*1( )*newowner( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/file4</expected-output>
  12447. </comparator>
  12448. </comparators>
  12449. </test>
  12450. <test> <!-- TESTED -->
  12451. <description>chown: change ownership of multiple files in relative path without globbing</description>
  12452. <test-commands>
  12453. <command>-fs NAMENODE -touchz file1</command>
  12454. <command>-fs NAMENODE -touchz file2</command>
  12455. <command>-fs NAMENODE -touchz file3</command>
  12456. <command>-fs NAMENODE -touchz file4</command>
  12457. <command>-fs NAMENODE -chown newowner:newgroup file1 file2 file3 file4 </command>
  12458. <command>-fs NAMENODE -ls -R file*</command>
  12459. </test-commands>
  12460. <cleanup-commands>
  12461. <command>-fs NAMENODE -rm file*</command>
  12462. </cleanup-commands>
  12463. <comparators>
  12464. <comparator>
  12465. <type>RegexpComparator</type>
  12466. <expected-output>^-rw-r--r--( )*1( )*newowner( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*file1</expected-output>
  12467. </comparator>
  12468. <comparator>
  12469. <type>RegexpComparator</type>
  12470. <expected-output>^-rw-r--r--( )*1( )*newowner( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*file2</expected-output>
  12471. </comparator>
  12472. <comparator>
  12473. <type>RegexpComparator</type>
  12474. <expected-output>^-rw-r--r--( )*1( )*newowner( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*file3</expected-output>
  12475. </comparator>
  12476. <comparator>
  12477. <type>RegexpComparator</type>
  12478. <expected-output>^-rw-r--r--( )*1( )*newowner( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*file4</expected-output>
  12479. </comparator>
  12480. </comparators>
  12481. </test>
  12482. <test> <!-- TESTED -->
  12483. <description>chown: change ownership of multiple directories in absolute path without globbing</description>
  12484. <test-commands>
  12485. <command>-fs NAMENODE -mkdir /dir0</command>
  12486. <command>-fs NAMENODE -mkdir /dir0/dir1</command>
  12487. <command>-fs NAMENODE -touchz /dir0/file0</command>
  12488. <command>-fs NAMENODE -touchz /dir0/dir1/file1</command>
  12489. <command>-fs NAMENODE -touchz /dir0/dir1/file2</command>
  12490. <command>-fs NAMENODE -mkdir /dir2</command>
  12491. <command>-fs NAMENODE -mkdir /dir2/dir1</command>
  12492. <command>-fs NAMENODE -touchz /dir2/file0</command>
  12493. <command>-fs NAMENODE -touchz /dir2/dir1/file1</command>
  12494. <command>-fs NAMENODE -touchz /dir2/dir1/file2</command>
  12495. <command>-fs NAMENODE -chown newowner:newgroup /dir0 /dir2</command>
  12496. <command>-fs NAMENODE -ls -R /dir*</command>
  12497. </test-commands>
  12498. <cleanup-commands>
  12499. <command>-fs NAMENODE -rm -r /dir*</command>
  12500. </cleanup-commands>
  12501. <comparators>
  12502. <comparator>
  12503. <type>RegexpComparator</type>
  12504. <expected-output>^drwxr-xr-x( )*-( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1</expected-output>
  12505. </comparator>
  12506. <comparator>
  12507. <type>RegexpComparator</type>
  12508. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1/file1</expected-output>
  12509. </comparator>
  12510. <comparator>
  12511. <type>RegexpComparator</type>
  12512. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1/file2</expected-output>
  12513. </comparator>
  12514. <comparator>
  12515. <type>RegexpComparator</type>
  12516. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/file0</expected-output>
  12517. </comparator>
  12518. <comparator>
  12519. <type>RegexpComparator</type>
  12520. <expected-output>^drwxr-xr-x( )*-( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir2/dir1</expected-output>
  12521. </comparator>
  12522. <comparator>
  12523. <type>RegexpComparator</type>
  12524. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir2/dir1/file1</expected-output>
  12525. </comparator>
  12526. <comparator>
  12527. <type>RegexpComparator</type>
  12528. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir2/dir1/file2</expected-output>
  12529. </comparator>
  12530. <comparator>
  12531. <type>RegexpComparator</type>
  12532. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir2/file0</expected-output>
  12533. </comparator>
  12534. </comparators>
  12535. </test>
  12536. <test> <!-- TESTED -->
  12537. <description>chown: change ownership of multiple directories in relative path without globbing</description>
  12538. <test-commands>
  12539. <command>-fs NAMENODE -mkdir -p dir0</command>
  12540. <command>-fs NAMENODE -mkdir -p dir0/dir1</command>
  12541. <command>-fs NAMENODE -touchz dir0/file0</command>
  12542. <command>-fs NAMENODE -touchz dir0/dir1/file1</command>
  12543. <command>-fs NAMENODE -touchz dir0/dir1/file2</command>
  12544. <command>-fs NAMENODE -mkdir -p dir2</command>
  12545. <command>-fs NAMENODE -mkdir -p dir2/dir1</command>
  12546. <command>-fs NAMENODE -touchz dir2/file0</command>
  12547. <command>-fs NAMENODE -touchz dir2/dir1/file1</command>
  12548. <command>-fs NAMENODE -touchz dir2/dir1/file2</command>
  12549. <command>-fs NAMENODE -chown newowner:newgroup dir0 dir2</command>
  12550. <command>-fs NAMENODE -ls -R dir*</command>
  12551. </test-commands>
  12552. <cleanup-commands>
  12553. <command>-fs NAMENODE -rm -r dir*</command>
  12554. </cleanup-commands>
  12555. <comparators>
  12556. <comparator>
  12557. <type>RegexpComparator</type>
  12558. <expected-output>^drwxr-xr-x( )*-( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/dir1</expected-output>
  12559. </comparator>
  12560. <comparator>
  12561. <type>RegexpComparator</type>
  12562. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/dir1/file1</expected-output>
  12563. </comparator>
  12564. <comparator>
  12565. <type>RegexpComparator</type>
  12566. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/dir1/file2</expected-output>
  12567. </comparator>
  12568. <comparator>
  12569. <type>RegexpComparator</type>
  12570. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/file0</expected-output>
  12571. </comparator>
  12572. <comparator>
  12573. <type>RegexpComparator</type>
  12574. <expected-output>^drwxr-xr-x( )*-( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir2/dir1</expected-output>
  12575. </comparator>
  12576. <comparator>
  12577. <type>RegexpComparator</type>
  12578. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir2/dir1/file1</expected-output>
  12579. </comparator>
  12580. <comparator>
  12581. <type>RegexpComparator</type>
  12582. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir2/dir1/file2</expected-output>
  12583. </comparator>
  12584. <comparator>
  12585. <type>RegexpComparator</type>
  12586. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir2/file0</expected-output>
  12587. </comparator>
  12588. </comparators>
  12589. </test>
  12590. <test> <!-- TESTED -->
  12591. <description>chown: change ownership of multiple directories recursively in absolute path using globbing</description>
  12592. <test-commands>
  12593. <command>-fs NAMENODE -mkdir /dir0</command>
  12594. <command>-fs NAMENODE -mkdir /dir0/dir1</command>
  12595. <command>-fs NAMENODE -touchz /dir0/file0</command>
  12596. <command>-fs NAMENODE -touchz /dir0/dir1/file1</command>
  12597. <command>-fs NAMENODE -touchz /dir0/dir1/file2</command>
  12598. <command>-fs NAMENODE -mkdir /dir2</command>
  12599. <command>-fs NAMENODE -mkdir /dir2/dir1</command>
  12600. <command>-fs NAMENODE -touchz /dir2/file0</command>
  12601. <command>-fs NAMENODE -touchz /dir2/dir1/file1</command>
  12602. <command>-fs NAMENODE -touchz /dir2/dir1/file2</command>
  12603. <command>-fs NAMENODE -chown -R newowner:newgroup /dir*</command>
  12604. <command>-fs NAMENODE -ls -R /dir*</command>
  12605. </test-commands>
  12606. <cleanup-commands>
  12607. <command>-fs NAMENODE -rm -r /dir*</command>
  12608. </cleanup-commands>
  12609. <comparators>
  12610. <comparator>
  12611. <type>RegexpComparator</type>
  12612. <expected-output>^drwxr-xr-x( )*-( )*newowner( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1</expected-output>
  12613. </comparator>
  12614. <comparator>
  12615. <type>RegexpComparator</type>
  12616. <expected-output>^-rw-r--r--( )*1( )*newowner( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1/file1</expected-output>
  12617. </comparator>
  12618. <comparator>
  12619. <type>RegexpComparator</type>
  12620. <expected-output>^-rw-r--r--( )*1( )*newowner( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1/file2</expected-output>
  12621. </comparator>
  12622. <comparator>
  12623. <type>RegexpComparator</type>
  12624. <expected-output>^-rw-r--r--( )*1( )*newowner( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/file0</expected-output>
  12625. </comparator>
  12626. <comparator>
  12627. <type>RegexpComparator</type>
  12628. <expected-output>^drwxr-xr-x( )*-( )*newowner( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir2/dir1</expected-output>
  12629. </comparator>
  12630. <comparator>
  12631. <type>RegexpComparator</type>
  12632. <expected-output>^-rw-r--r--( )*1( )*newowner( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir2/dir1/file1</expected-output>
  12633. </comparator>
  12634. <comparator>
  12635. <type>RegexpComparator</type>
  12636. <expected-output>^-rw-r--r--( )*1( )*newowner( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir2/dir1/file2</expected-output>
  12637. </comparator>
  12638. <comparator>
  12639. <type>RegexpComparator</type>
  12640. <expected-output>^-rw-r--r--( )*1( )*newowner( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir2/file0</expected-output>
  12641. </comparator>
  12642. </comparators>
  12643. </test>
  12644. <test> <!-- TESTED -->
  12645. <description>chown: change ownership of multiple directories recursively in relative path using globbing</description>
  12646. <test-commands>
  12647. <command>-fs NAMENODE -mkdir -p dir0</command>
  12648. <command>-fs NAMENODE -mkdir -p dir0/dir1</command>
  12649. <command>-fs NAMENODE -touchz dir0/file0</command>
  12650. <command>-fs NAMENODE -touchz dir0/dir1/file1</command>
  12651. <command>-fs NAMENODE -touchz dir0/dir1/file2</command>
  12652. <command>-fs NAMENODE -mkdir -p dir2</command>
  12653. <command>-fs NAMENODE -mkdir -p dir2/dir1</command>
  12654. <command>-fs NAMENODE -touchz dir2/file0</command>
  12655. <command>-fs NAMENODE -touchz dir2/dir1/file1</command>
  12656. <command>-fs NAMENODE -touchz dir2/dir1/file2</command>
  12657. <command>-fs NAMENODE -chown -R newowner:newgroup dir*</command>
  12658. <command>-fs NAMENODE -ls -R dir*</command>
  12659. </test-commands>
  12660. <cleanup-commands>
  12661. <command>-fs NAMENODE -rm -r dir*</command>
  12662. </cleanup-commands>
  12663. <comparators>
  12664. <comparator>
  12665. <type>RegexpComparator</type>
  12666. <expected-output>^drwxr-xr-x( )*-( )*newowner( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/dir1</expected-output>
  12667. </comparator>
  12668. <comparator>
  12669. <type>RegexpComparator</type>
  12670. <expected-output>^-rw-r--r--( )*1( )*newowner( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/dir1/file1</expected-output>
  12671. </comparator>
  12672. <comparator>
  12673. <type>RegexpComparator</type>
  12674. <expected-output>^-rw-r--r--( )*1( )*newowner( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/dir1/file2</expected-output>
  12675. </comparator>
  12676. <comparator>
  12677. <type>RegexpComparator</type>
  12678. <expected-output>^-rw-r--r--( )*1( )*newowner( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/file0</expected-output>
  12679. </comparator>
  12680. <comparator>
  12681. <type>RegexpComparator</type>
  12682. <expected-output>^drwxr-xr-x( )*-( )*newowner( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir2/dir1</expected-output>
  12683. </comparator>
  12684. <comparator>
  12685. <type>RegexpComparator</type>
  12686. <expected-output>^-rw-r--r--( )*1( )*newowner( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir2/dir1/file1</expected-output>
  12687. </comparator>
  12688. <comparator>
  12689. <type>RegexpComparator</type>
  12690. <expected-output>^-rw-r--r--( )*1( )*newowner( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir2/dir1/file2</expected-output>
  12691. </comparator>
  12692. <comparator>
  12693. <type>RegexpComparator</type>
  12694. <expected-output>^-rw-r--r--( )*1( )*newowner( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir2/file0</expected-output>
  12695. </comparator>
  12696. </comparators>
  12697. </test>
  12698. <test> <!-- TESTED -->
  12699. <description>chown: change ownership of multiple directories recursively in absolute path without globbing</description>
  12700. <test-commands>
  12701. <command>-fs NAMENODE -mkdir /dir0</command>
  12702. <command>-fs NAMENODE -mkdir /dir0/dir1</command>
  12703. <command>-fs NAMENODE -touchz /dir0/file0</command>
  12704. <command>-fs NAMENODE -touchz /dir0/dir1/file1</command>
  12705. <command>-fs NAMENODE -touchz /dir0/dir1/file2</command>
  12706. <command>-fs NAMENODE -mkdir /dir2</command>
  12707. <command>-fs NAMENODE -mkdir /dir2/dir1</command>
  12708. <command>-fs NAMENODE -touchz /dir2/file0</command>
  12709. <command>-fs NAMENODE -touchz /dir2/dir1/file1</command>
  12710. <command>-fs NAMENODE -touchz /dir2/dir1/file2</command>
  12711. <command>-fs NAMENODE -chown -R newowner:newgroup /dir0 /dir2</command>
  12712. <command>-fs NAMENODE -ls -R /dir*</command>
  12713. </test-commands>
  12714. <cleanup-commands>
  12715. <command>-fs NAMENODE -rm -r /dir*</command>
  12716. </cleanup-commands>
  12717. <comparators>
  12718. <comparator>
  12719. <type>RegexpComparator</type>
  12720. <expected-output>^drwxr-xr-x( )*-( )*newowner( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1</expected-output>
  12721. </comparator>
  12722. <comparator>
  12723. <type>RegexpComparator</type>
  12724. <expected-output>^-rw-r--r--( )*1( )*newowner( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1/file1</expected-output>
  12725. </comparator>
  12726. <comparator>
  12727. <type>RegexpComparator</type>
  12728. <expected-output>^-rw-r--r--( )*1( )*newowner( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1/file2</expected-output>
  12729. </comparator>
  12730. <comparator>
  12731. <type>RegexpComparator</type>
  12732. <expected-output>^-rw-r--r--( )*1( )*newowner( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/file0</expected-output>
  12733. </comparator>
  12734. <comparator>
  12735. <type>RegexpComparator</type>
  12736. <expected-output>^drwxr-xr-x( )*-( )*newowner( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir2/dir1</expected-output>
  12737. </comparator>
  12738. <comparator>
  12739. <type>RegexpComparator</type>
  12740. <expected-output>^-rw-r--r--( )*1( )*newowner( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir2/dir1/file1</expected-output>
  12741. </comparator>
  12742. <comparator>
  12743. <type>RegexpComparator</type>
  12744. <expected-output>^-rw-r--r--( )*1( )*newowner( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir2/dir1/file2</expected-output>
  12745. </comparator>
  12746. <comparator>
  12747. <type>RegexpComparator</type>
  12748. <expected-output>^-rw-r--r--( )*1( )*newowner( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir2/file0</expected-output>
  12749. </comparator>
  12750. </comparators>
  12751. </test>
  12752. <test> <!-- TESTED -->
  12753. <description>chown: change ownership of multiple directories recursively in relative path without globbing</description>
  12754. <test-commands>
  12755. <command>-fs NAMENODE -mkdir -p dir0</command>
  12756. <command>-fs NAMENODE -mkdir -p dir0/dir1</command>
  12757. <command>-fs NAMENODE -touchz dir0/file0</command>
  12758. <command>-fs NAMENODE -touchz dir0/dir1/file1</command>
  12759. <command>-fs NAMENODE -touchz dir0/dir1/file2</command>
  12760. <command>-fs NAMENODE -mkdir -p dir2</command>
  12761. <command>-fs NAMENODE -mkdir -p dir2/dir1</command>
  12762. <command>-fs NAMENODE -touchz dir2/file0</command>
  12763. <command>-fs NAMENODE -touchz dir2/dir1/file1</command>
  12764. <command>-fs NAMENODE -touchz dir2/dir1/file2</command>
  12765. <command>-fs NAMENODE -chown -R newowner:newgroup dir0 dir2</command>
  12766. <command>-fs NAMENODE -ls -R dir*</command>
  12767. </test-commands>
  12768. <cleanup-commands>
  12769. <command>-fs NAMENODE -rm -r dir*</command>
  12770. </cleanup-commands>
  12771. <comparators>
  12772. <comparator>
  12773. <type>RegexpComparator</type>
  12774. <expected-output>^drwxr-xr-x( )*-( )*newowner( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/dir1</expected-output>
  12775. </comparator>
  12776. <comparator>
  12777. <type>RegexpComparator</type>
  12778. <expected-output>^-rw-r--r--( )*1( )*newowner( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/dir1/file1</expected-output>
  12779. </comparator>
  12780. <comparator>
  12781. <type>RegexpComparator</type>
  12782. <expected-output>^-rw-r--r--( )*1( )*newowner( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/dir1/file2</expected-output>
  12783. </comparator>
  12784. <comparator>
  12785. <type>RegexpComparator</type>
  12786. <expected-output>^-rw-r--r--( )*1( )*newowner( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/file0</expected-output>
  12787. </comparator>
  12788. <comparator>
  12789. <type>RegexpComparator</type>
  12790. <expected-output>^drwxr-xr-x( )*-( )*newowner( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir2/dir1</expected-output>
  12791. </comparator>
  12792. <comparator>
  12793. <type>RegexpComparator</type>
  12794. <expected-output>^-rw-r--r--( )*1( )*newowner( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir2/dir1/file1</expected-output>
  12795. </comparator>
  12796. <comparator>
  12797. <type>RegexpComparator</type>
  12798. <expected-output>^-rw-r--r--( )*1( )*newowner( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir2/dir1/file2</expected-output>
  12799. </comparator>
  12800. <comparator>
  12801. <type>RegexpComparator</type>
  12802. <expected-output>^-rw-r--r--( )*1( )*newowner( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir2/file0</expected-output>
  12803. </comparator>
  12804. </comparators>
  12805. </test>
  12806. <test> <!-- TESTED -->
  12807. <description>chown: invalid option for owner of file in absolute path</description>
  12808. <test-commands>
  12809. <command>-fs NAMENODE -touchz /file1</command>
  12810. <command>-fs NAMENODE -chown %:newgroup /file1</command>
  12811. </test-commands>
  12812. <cleanup-commands>
  12813. <command>-fs NAMENODE -rm /file1</command>
  12814. </cleanup-commands>
  12815. <comparators>
  12816. <comparator>
  12817. <type>RegexpComparator</type>
  12818. <expected-output>^-chown: '%:newgroup' does not match expected pattern for \[owner\]\[:group\].</expected-output>
  12819. </comparator>
  12820. </comparators>
  12821. </test>
  12822. <test> <!-- TESTED -->
  12823. <description>chown: invalid option for owner of file in relative path</description>
  12824. <test-commands>
  12825. <command>-fs NAMENODE -touchz file1</command>
  12826. <command>-fs NAMENODE -chown %:newgroup file1</command>
  12827. </test-commands>
  12828. <cleanup-commands>
  12829. <command>-fs NAMENODE -rm file1</command>
  12830. </cleanup-commands>
  12831. <comparators>
  12832. <comparator>
  12833. <type>RegexpComparator</type>
  12834. <expected-output>^-chown: '%:newgroup' does not match expected pattern for \[owner\]\[:group\].</expected-output>
  12835. </comparator>
  12836. </comparators>
  12837. </test>
  12838. <test> <!-- TESTED -->
  12839. <description>chown: invalid option for group of file in absolute path</description>
  12840. <test-commands>
  12841. <command>-fs NAMENODE -touchz /file1</command>
  12842. <command>-fs NAMENODE -chown newowner:% /file1</command>
  12843. </test-commands>
  12844. <cleanup-commands>
  12845. <command>-fs NAMENODE -rm /file1</command>
  12846. </cleanup-commands>
  12847. <comparators>
  12848. <comparator>
  12849. <type>RegexpComparator</type>
  12850. <expected-output>^-chown: 'newowner:%' does not match expected pattern for \[owner\]\[:group\].</expected-output>
  12851. </comparator>
  12852. </comparators>
  12853. </test>
  12854. <test> <!-- TESTED -->
  12855. <description>chown: invalid option for group of file in relative path</description>
  12856. <test-commands>
  12857. <command>-fs NAMENODE -touchz file1</command>
  12858. <command>-fs NAMENODE -chown newowner:% file1</command>
  12859. </test-commands>
  12860. <cleanup-commands>
  12861. <command>-fs NAMENODE -rm file1</command>
  12862. </cleanup-commands>
  12863. <comparators>
  12864. <comparator>
  12865. <type>RegexpComparator</type>
  12866. <expected-output>^-chown: 'newowner:%' does not match expected pattern for \[owner\]\[:group\].</expected-output>
  12867. </comparator>
  12868. </comparators>
  12869. </test>
  12870. <test> <!-- TESTED -->
  12871. <description>chown: change ownership of file in Namenode's path</description>
  12872. <test-commands>
  12873. <command>-fs NAMENODE -touchz NAMENODE/file1</command>
  12874. <command>-fs NAMENODE -chown newowner:newgroup NAMENODE/file1</command>
  12875. <command>-fs NAMENODE -ls NAMENODE/file1</command>
  12876. </test-commands>
  12877. <cleanup-commands>
  12878. <command>-fs NAMENODE -rm NAMENODE/file1</command>
  12879. </cleanup-commands>
  12880. <comparators>
  12881. <comparator>
  12882. <type>RegexpComparator</type>
  12883. <expected-output>^-rw-r--r--( )*1( )*newowner( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/file1</expected-output>
  12884. </comparator>
  12885. </comparators>
  12886. </test>
  12887. <test> <!-- TESTED -->
  12888. <description>chown: change ownership of directory in Namenode's path</description>
  12889. <test-commands>
  12890. <command>-fs NAMENODE -mkdir NAMENODE/dir0</command>
  12891. <command>-fs NAMENODE -mkdir NAMENODE/dir0/dir1</command>
  12892. <command>-fs NAMENODE -touchz NAMENODE/dir0/file0</command>
  12893. <command>-fs NAMENODE -touchz NAMENODE/dir0/dir1/file1</command>
  12894. <command>-fs NAMENODE -touchz NAMENODE/dir0/dir1/file2</command>
  12895. <command>-fs NAMENODE -chown newowner:newgroup NAMENODE/dir0/dir1</command>
  12896. <command>-fs NAMENODE -ls -R NAMENODE/dir0</command>
  12897. </test-commands>
  12898. <cleanup-commands>
  12899. <command>-fs NAMENODE -rm -r NAMENODE/dir0</command>
  12900. </cleanup-commands>
  12901. <comparators>
  12902. <comparator>
  12903. <type>RegexpComparator</type>
  12904. <expected-output>^drwxr-xr-x( )*-( )*newowner( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir0/dir1</expected-output>
  12905. </comparator>
  12906. <comparator>
  12907. <type>RegexpComparator</type>
  12908. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir0/dir1/file1</expected-output>
  12909. </comparator>
  12910. <comparator>
  12911. <type>RegexpComparator</type>
  12912. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir0/dir1/file2</expected-output>
  12913. </comparator>
  12914. <comparator>
  12915. <type>RegexpComparator</type>
  12916. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir0/file0</expected-output>
  12917. </comparator>
  12918. </comparators>
  12919. </test>
  12920. <test> <!-- TESTED -->
  12921. <description>chown: change ownership of directory in Namenode's path recursively </description>
  12922. <test-commands>
  12923. <command>-fs NAMENODE -mkdir NAMENODE/dir0</command>
  12924. <command>-fs NAMENODE -mkdir NAMENODE/dir0/dir1</command>
  12925. <command>-fs NAMENODE -touchz NAMENODE/dir0/file0</command>
  12926. <command>-fs NAMENODE -touchz NAMENODE/dir0/dir1/file1</command>
  12927. <command>-fs NAMENODE -touchz NAMENODE/dir0/dir1/file2</command>
  12928. <command>-fs NAMENODE -chown -R newowner:newgroup NAMENODE/dir0/dir1</command>
  12929. <command>-fs NAMENODE -ls -R NAMENODE/dir0</command>
  12930. </test-commands>
  12931. <cleanup-commands>
  12932. <command>-fs NAMENODE -rm -r NAMENODE/dir0</command>
  12933. </cleanup-commands>
  12934. <comparators>
  12935. <comparator>
  12936. <type>RegexpComparator</type>
  12937. <expected-output>^drwxr-xr-x( )*-( )*newowner( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir0/dir1</expected-output>
  12938. </comparator>
  12939. <comparator>
  12940. <type>RegexpComparator</type>
  12941. <expected-output>^-rw-r--r--( )*1( )*newowner( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir0/dir1/file1</expected-output>
  12942. </comparator>
  12943. <comparator>
  12944. <type>RegexpComparator</type>
  12945. <expected-output>^-rw-r--r--( )*1( )*newowner( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir0/dir1/file2</expected-output>
  12946. </comparator>
  12947. <comparator>
  12948. <type>RegexpComparator</type>
  12949. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir0/file0</expected-output>
  12950. </comparator>
  12951. </comparators>
  12952. </test>
  12953. <test> <!-- TESTED -->
  12954. <description>chown: change ownership of non existent file in Namenode's path</description>
  12955. <test-commands>
  12956. <command>-fs NAMENODE -chown newowner:newgroup NAMENODE/file1</command>
  12957. </test-commands>
  12958. <cleanup-commands>
  12959. <command>-fs NAMENODE -rm NAMENODE/file1</command>
  12960. </cleanup-commands>
  12961. <comparators>
  12962. <comparator>
  12963. <type>RegexpComparator</type>
  12964. <expected-output>^chown: `NAMENODE/file1': No such file or directory</expected-output>
  12965. </comparator>
  12966. </comparators>
  12967. </test>
  12968. <test> <!-- TESTED -->
  12969. <description>chown: change ownership of multiple files in Namenode's path using globbing</description>
  12970. <test-commands>
  12971. <command>-fs NAMENODE -touchz NAMENODE/file1</command>
  12972. <command>-fs NAMENODE -touchz NAMENODE/file2</command>
  12973. <command>-fs NAMENODE -touchz NAMENODE/file3</command>
  12974. <command>-fs NAMENODE -touchz NAMENODE/file4</command>
  12975. <command>-fs NAMENODE -chown newowner:newgroup NAMENODE/file* </command>
  12976. <command>-fs NAMENODE -ls -R NAMENODE/file*</command>
  12977. </test-commands>
  12978. <cleanup-commands>
  12979. <command>-fs NAMENODE -rm NAMENODE/file*</command>
  12980. </cleanup-commands>
  12981. <comparators>
  12982. <comparator>
  12983. <type>RegexpComparator</type>
  12984. <expected-output>^-rw-r--r--( )*1( )*newowner( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/file1</expected-output>
  12985. </comparator>
  12986. <comparator>
  12987. <type>RegexpComparator</type>
  12988. <expected-output>^-rw-r--r--( )*1( )*newowner( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/file2</expected-output>
  12989. </comparator>
  12990. <comparator>
  12991. <type>RegexpComparator</type>
  12992. <expected-output>^-rw-r--r--( )*1( )*newowner( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/file3</expected-output>
  12993. </comparator>
  12994. <comparator>
  12995. <type>RegexpComparator</type>
  12996. <expected-output>^-rw-r--r--( )*1( )*newowner( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/file4</expected-output>
  12997. </comparator>
  12998. </comparators>
  12999. </test>
  13000. <test> <!-- TESTED -->
  13001. <description>chown: change ownership of multiple directories in Namenode's path using globbing</description>
  13002. <test-commands>
  13003. <command>-fs NAMENODE -mkdir NAMENODE/dir0</command>
  13004. <command>-fs NAMENODE -mkdir NAMENODE/dir0/dir1</command>
  13005. <command>-fs NAMENODE -touchz NAMENODE/dir0/file0</command>
  13006. <command>-fs NAMENODE -touchz NAMENODE/dir0/dir1/file1</command>
  13007. <command>-fs NAMENODE -touchz NAMENODE/dir0/dir1/file2</command>
  13008. <command>-fs NAMENODE -mkdir NAMENODE/dir2</command>
  13009. <command>-fs NAMENODE -mkdir NAMENODE/dir2/dir1</command>
  13010. <command>-fs NAMENODE -touchz NAMENODE/dir2/file0</command>
  13011. <command>-fs NAMENODE -touchz NAMENODE/dir2/dir1/file1</command>
  13012. <command>-fs NAMENODE -touchz NAMENODE/dir2/dir1/file2</command>
  13013. <command>-fs NAMENODE -chown newowner:newgroup NAMENODE/dir*</command>
  13014. <command>-fs NAMENODE -ls -R NAMENODE/dir*</command>
  13015. </test-commands>
  13016. <cleanup-commands>
  13017. <command>-fs NAMENODE -rm -r NAMENODE/dir*</command>
  13018. </cleanup-commands>
  13019. <comparators>
  13020. <comparator>
  13021. <type>RegexpComparator</type>
  13022. <expected-output>^drwxr-xr-x( )*-( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir0/dir1</expected-output>
  13023. </comparator>
  13024. <comparator>
  13025. <type>RegexpComparator</type>
  13026. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir0/dir1/file1</expected-output>
  13027. </comparator>
  13028. <comparator>
  13029. <type>RegexpComparator</type>
  13030. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir0/dir1/file2</expected-output>
  13031. </comparator>
  13032. <comparator>
  13033. <type>RegexpComparator</type>
  13034. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir0/file0</expected-output>
  13035. </comparator>
  13036. <comparator>
  13037. <type>RegexpComparator</type>
  13038. <expected-output>^drwxr-xr-x( )*-( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir2/dir1</expected-output>
  13039. </comparator>
  13040. <comparator>
  13041. <type>RegexpComparator</type>
  13042. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir2/dir1/file1</expected-output>
  13043. </comparator>
  13044. <comparator>
  13045. <type>RegexpComparator</type>
  13046. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir2/dir1/file2</expected-output>
  13047. </comparator>
  13048. <comparator>
  13049. <type>RegexpComparator</type>
  13050. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir2/file0</expected-output>
  13051. </comparator>
  13052. </comparators>
  13053. </test>
  13054. <test> <!-- TESTED -->
  13055. <description>chown: change ownership of multiple files in Namenode's path without globbing</description>
  13056. <test-commands>
  13057. <command>-fs NAMENODE -touchz NAMENODE/file1</command>
  13058. <command>-fs NAMENODE -touchz NAMENODE/file2</command>
  13059. <command>-fs NAMENODE -touchz NAMENODE/file3</command>
  13060. <command>-fs NAMENODE -touchz NAMENODE/file4</command>
  13061. <command>-fs NAMENODE -chown newowner:newgroup NAMENODE/file1 NAMENODE/file2 NAMENODE/file3 NAMENODE/file4 </command>
  13062. <command>-fs NAMENODE -ls -R NAMENODE/file*</command>
  13063. </test-commands>
  13064. <cleanup-commands>
  13065. <command>-fs NAMENODE -rm NAMENODE/file*</command>
  13066. </cleanup-commands>
  13067. <comparators>
  13068. <comparator>
  13069. <type>RegexpComparator</type>
  13070. <expected-output>^-rw-r--r--( )*1( )*newowner( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/file1</expected-output>
  13071. </comparator>
  13072. <comparator>
  13073. <type>RegexpComparator</type>
  13074. <expected-output>^-rw-r--r--( )*1( )*newowner( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/file2</expected-output>
  13075. </comparator>
  13076. <comparator>
  13077. <type>RegexpComparator</type>
  13078. <expected-output>^-rw-r--r--( )*1( )*newowner( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/file3</expected-output>
  13079. </comparator>
  13080. <comparator>
  13081. <type>RegexpComparator</type>
  13082. <expected-output>^-rw-r--r--( )*1( )*newowner( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/file4</expected-output>
  13083. </comparator>
  13084. </comparators>
  13085. </test>
  13086. <test> <!-- TESTED -->
  13087. <description>chown: change ownership of multiple directories in Namenode's path without globbing</description>
  13088. <test-commands>
  13089. <command>-fs NAMENODE -mkdir NAMENODE/dir0</command>
  13090. <command>-fs NAMENODE -mkdir NAMENODE/dir0/dir1</command>
  13091. <command>-fs NAMENODE -touchz NAMENODE/dir0/file0</command>
  13092. <command>-fs NAMENODE -touchz NAMENODE/dir0/dir1/file1</command>
  13093. <command>-fs NAMENODE -touchz NAMENODE/dir0/dir1/file2</command>
  13094. <command>-fs NAMENODE -mkdir NAMENODE/dir2</command>
  13095. <command>-fs NAMENODE -mkdir NAMENODE/dir2/dir1</command>
  13096. <command>-fs NAMENODE -touchz NAMENODE/dir2/file0</command>
  13097. <command>-fs NAMENODE -touchz NAMENODE/dir2/dir1/file1</command>
  13098. <command>-fs NAMENODE -touchz NAMENODE/dir2/dir1/file2</command>
  13099. <command>-fs NAMENODE -chown newowner:newgroup NAMENODE/dir0 NAMENODE/dir2</command>
  13100. <command>-fs NAMENODE -ls -R NAMENODE/dir*</command>
  13101. </test-commands>
  13102. <cleanup-commands>
  13103. <command>-fs NAMENODE -rm -r NAMENODE/dir*</command>
  13104. </cleanup-commands>
  13105. <comparators>
  13106. <comparator>
  13107. <type>RegexpComparator</type>
  13108. <expected-output>^drwxr-xr-x( )*-( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir0/dir1</expected-output>
  13109. </comparator>
  13110. <comparator>
  13111. <type>RegexpComparator</type>
  13112. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir0/dir1/file1</expected-output>
  13113. </comparator>
  13114. <comparator>
  13115. <type>RegexpComparator</type>
  13116. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir0/dir1/file2</expected-output>
  13117. </comparator>
  13118. <comparator>
  13119. <type>RegexpComparator</type>
  13120. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir0/file0</expected-output>
  13121. </comparator>
  13122. <comparator>
  13123. <type>RegexpComparator</type>
  13124. <expected-output>^drwxr-xr-x( )*-( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir2/dir1</expected-output>
  13125. </comparator>
  13126. <comparator>
  13127. <type>RegexpComparator</type>
  13128. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir2/dir1/file1</expected-output>
  13129. </comparator>
  13130. <comparator>
  13131. <type>RegexpComparator</type>
  13132. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir2/dir1/file2</expected-output>
  13133. </comparator>
  13134. <comparator>
  13135. <type>RegexpComparator</type>
  13136. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir2/file0</expected-output>
  13137. </comparator>
  13138. </comparators>
  13139. </test>
  13140. <test> <!-- TESTED -->
  13141. <description>chown: change ownership of multiple directories recursively in Namenode's path using globbing</description>
  13142. <test-commands>
  13143. <command>-fs NAMENODE -mkdir NAMENODE/dir0</command>
  13144. <command>-fs NAMENODE -mkdir NAMENODE/dir0/dir1</command>
  13145. <command>-fs NAMENODE -touchz NAMENODE/dir0/file0</command>
  13146. <command>-fs NAMENODE -touchz NAMENODE/dir0/dir1/file1</command>
  13147. <command>-fs NAMENODE -touchz NAMENODE/dir0/dir1/file2</command>
  13148. <command>-fs NAMENODE -mkdir NAMENODE/dir2</command>
  13149. <command>-fs NAMENODE -mkdir NAMENODE/dir2/dir1</command>
  13150. <command>-fs NAMENODE -touchz NAMENODE/dir2/file0</command>
  13151. <command>-fs NAMENODE -touchz NAMENODE/dir2/dir1/file1</command>
  13152. <command>-fs NAMENODE -touchz NAMENODE/dir2/dir1/file2</command>
  13153. <command>-fs NAMENODE -chown -R newowner:newgroup NAMENODE/dir*</command>
  13154. <command>-fs NAMENODE -ls -R NAMENODE/dir*</command>
  13155. </test-commands>
  13156. <cleanup-commands>
  13157. <command>-fs NAMENODE -rm -r NAMENODE/dir*</command>
  13158. </cleanup-commands>
  13159. <comparators>
  13160. <comparator>
  13161. <type>RegexpComparator</type>
  13162. <expected-output>^drwxr-xr-x( )*-( )*newowner( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir0/dir1</expected-output>
  13163. </comparator>
  13164. <comparator>
  13165. <type>RegexpComparator</type>
  13166. <expected-output>^-rw-r--r--( )*1( )*newowner( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir0/dir1/file1</expected-output>
  13167. </comparator>
  13168. <comparator>
  13169. <type>RegexpComparator</type>
  13170. <expected-output>^-rw-r--r--( )*1( )*newowner( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir0/dir1/file2</expected-output>
  13171. </comparator>
  13172. <comparator>
  13173. <type>RegexpComparator</type>
  13174. <expected-output>^-rw-r--r--( )*1( )*newowner( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir0/file0</expected-output>
  13175. </comparator>
  13176. <comparator>
  13177. <type>RegexpComparator</type>
  13178. <expected-output>^drwxr-xr-x( )*-( )*newowner( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir2/dir1</expected-output>
  13179. </comparator>
  13180. <comparator>
  13181. <type>RegexpComparator</type>
  13182. <expected-output>^-rw-r--r--( )*1( )*newowner( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir2/dir1/file1</expected-output>
  13183. </comparator>
  13184. <comparator>
  13185. <type>RegexpComparator</type>
  13186. <expected-output>^-rw-r--r--( )*1( )*newowner( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir2/dir1/file2</expected-output>
  13187. </comparator>
  13188. <comparator>
  13189. <type>RegexpComparator</type>
  13190. <expected-output>^-rw-r--r--( )*1( )*newowner( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir2/file0</expected-output>
  13191. </comparator>
  13192. </comparators>
  13193. </test>
  13194. <test> <!-- TESTED -->
  13195. <description>chown: change ownership of multiple directories recursively in Namenode's path without globbing</description>
  13196. <test-commands>
  13197. <command>-fs NAMENODE -mkdir NAMENODE/dir0</command>
  13198. <command>-fs NAMENODE -mkdir NAMENODE/dir0/dir1</command>
  13199. <command>-fs NAMENODE -touchz NAMENODE/dir0/file0</command>
  13200. <command>-fs NAMENODE -touchz NAMENODE/dir0/dir1/file1</command>
  13201. <command>-fs NAMENODE -touchz NAMENODE/dir0/dir1/file2</command>
  13202. <command>-fs NAMENODE -mkdir NAMENODE/dir2</command>
  13203. <command>-fs NAMENODE -mkdir NAMENODE/dir2/dir1</command>
  13204. <command>-fs NAMENODE -touchz NAMENODE/dir2/file0</command>
  13205. <command>-fs NAMENODE -touchz NAMENODE/dir2/dir1/file1</command>
  13206. <command>-fs NAMENODE -touchz NAMENODE/dir2/dir1/file2</command>
  13207. <command>-fs NAMENODE -chown -R newowner:newgroup NAMENODE/dir0 NAMENODE/dir2</command>
  13208. <command>-fs NAMENODE -ls -R NAMENODE/dir*</command>
  13209. </test-commands>
  13210. <cleanup-commands>
  13211. <command>-fs NAMENODE -rm -r NAMENODE/dir*</command>
  13212. </cleanup-commands>
  13213. <comparators>
  13214. <comparator>
  13215. <type>RegexpComparator</type>
  13216. <expected-output>^drwxr-xr-x( )*-( )*newowner( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir0/dir1</expected-output>
  13217. </comparator>
  13218. <comparator>
  13219. <type>RegexpComparator</type>
  13220. <expected-output>^-rw-r--r--( )*1( )*newowner( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir0/dir1/file1</expected-output>
  13221. </comparator>
  13222. <comparator>
  13223. <type>RegexpComparator</type>
  13224. <expected-output>^-rw-r--r--( )*1( )*newowner( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir0/dir1/file2</expected-output>
  13225. </comparator>
  13226. <comparator>
  13227. <type>RegexpComparator</type>
  13228. <expected-output>^-rw-r--r--( )*1( )*newowner( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir0/file0</expected-output>
  13229. </comparator>
  13230. <comparator>
  13231. <type>RegexpComparator</type>
  13232. <expected-output>^drwxr-xr-x( )*-( )*newowner( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir2/dir1</expected-output>
  13233. </comparator>
  13234. <comparator>
  13235. <type>RegexpComparator</type>
  13236. <expected-output>^-rw-r--r--( )*1( )*newowner( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir2/dir1/file1</expected-output>
  13237. </comparator>
  13238. <comparator>
  13239. <type>RegexpComparator</type>
  13240. <expected-output>^-rw-r--r--( )*1( )*newowner( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir2/dir1/file2</expected-output>
  13241. </comparator>
  13242. <comparator>
  13243. <type>RegexpComparator</type>
  13244. <expected-output>^-rw-r--r--( )*1( )*newowner( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir2/file0</expected-output>
  13245. </comparator>
  13246. </comparators>
  13247. </test>
  13248. <test> <!-- TESTED -->
  13249. <description>chown: invalid option for owner of file in Namenode's path</description>
  13250. <test-commands>
  13251. <command>-fs NAMENODE -touchz NAMENODE/file1</command>
  13252. <command>-fs NAMENODE -chown %:newgroup NAMENODE/file1</command>
  13253. </test-commands>
  13254. <cleanup-commands>
  13255. <command>-fs NAMENODE -rm NAMENODE/file1</command>
  13256. </cleanup-commands>
  13257. <comparators>
  13258. <comparator>
  13259. <type>RegexpComparator</type>
  13260. <expected-output>^-chown: '%:newgroup' does not match expected pattern for \[owner\]\[:group\].</expected-output>
  13261. </comparator>
  13262. </comparators>
  13263. </test>
  13264. <test> <!-- TESTED -->
  13265. <description>chown: invalid option for group of file in Namenode's path</description>
  13266. <test-commands>
  13267. <command>-fs NAMENODE -touchz NAMENODE/file1</command>
  13268. <command>-fs NAMENODE -chown newowner:% NAMENODE/file1</command>
  13269. </test-commands>
  13270. <cleanup-commands>
  13271. <command>-fs NAMENODE -rm NAMENODE/file1</command>
  13272. </cleanup-commands>
  13273. <comparators>
  13274. <comparator>
  13275. <type>RegexpComparator</type>
  13276. <expected-output>^-chown: 'newowner:%' does not match expected pattern for \[owner\]\[:group\].</expected-output>
  13277. </comparator>
  13278. </comparators>
  13279. </test>
  13280. <!-- Tests for chgrp -->
  13281. <test> <!-- TESTED -->
  13282. <description>chgrp: change group of file in absolute path</description>
  13283. <test-commands>
  13284. <command>-fs NAMENODE -touchz /file1</command>
  13285. <command>-fs NAMENODE -chgrp newgroup /file1</command>
  13286. <command>-fs NAMENODE -ls /file1</command>
  13287. </test-commands>
  13288. <cleanup-commands>
  13289. <command>-fs NAMENODE -rm /file1</command>
  13290. </cleanup-commands>
  13291. <comparators>
  13292. <comparator>
  13293. <type>RegexpComparator</type>
  13294. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/file1</expected-output>
  13295. </comparator>
  13296. </comparators>
  13297. </test>
  13298. <test> <!-- TESTED -->
  13299. <description>chgrp: change group of file in relative path</description>
  13300. <test-commands>
  13301. <command>-fs NAMENODE -touchz file1</command>
  13302. <command>-fs NAMENODE -chgrp newgroup file1</command>
  13303. <command>-fs NAMENODE -ls file1</command>
  13304. </test-commands>
  13305. <cleanup-commands>
  13306. <command>-fs NAMENODE -rm file1</command>
  13307. </cleanup-commands>
  13308. <comparators>
  13309. <comparator>
  13310. <type>RegexpComparator</type>
  13311. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*file1</expected-output>
  13312. </comparator>
  13313. </comparators>
  13314. </test>
  13315. <test> <!-- TESTED -->
  13316. <description>chgrp: change group of directory in absolute path</description>
  13317. <test-commands>
  13318. <command>-fs NAMENODE -mkdir /dir0</command>
  13319. <command>-fs NAMENODE -mkdir /dir0/dir1</command>
  13320. <command>-fs NAMENODE -touchz /dir0/file0</command>
  13321. <command>-fs NAMENODE -touchz /dir0/dir1/file1</command>
  13322. <command>-fs NAMENODE -touchz /dir0/dir1/file2</command>
  13323. <command>-fs NAMENODE -chgrp newgroup /dir0/dir1</command>
  13324. <command>-fs NAMENODE -ls -R /dir0</command>
  13325. </test-commands>
  13326. <cleanup-commands>
  13327. <command>-fs NAMENODE -rm -r /dir0</command>
  13328. </cleanup-commands>
  13329. <comparators>
  13330. <comparator>
  13331. <type>RegexpComparator</type>
  13332. <expected-output>^drwxr-xr-x( )*-( )*USERNAME( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1</expected-output>
  13333. </comparator>
  13334. <comparator>
  13335. <type>RegexpComparator</type>
  13336. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1/file1</expected-output>
  13337. </comparator>
  13338. <comparator>
  13339. <type>RegexpComparator</type>
  13340. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1/file2</expected-output>
  13341. </comparator>
  13342. <comparator>
  13343. <type>RegexpComparator</type>
  13344. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/file0</expected-output>
  13345. </comparator>
  13346. </comparators>
  13347. </test>
  13348. <test> <!-- TESTED -->
  13349. <description>chgrp: change group of directory in relative path</description>
  13350. <test-commands>
  13351. <command>-fs NAMENODE -mkdir -p dir0</command>
  13352. <command>-fs NAMENODE -mkdir -p dir0/dir1</command>
  13353. <command>-fs NAMENODE -touchz dir0/file0</command>
  13354. <command>-fs NAMENODE -touchz dir0/dir1/file1</command>
  13355. <command>-fs NAMENODE -touchz dir0/dir1/file2</command>
  13356. <command>-fs NAMENODE -chgrp newgroup dir0/dir1</command>
  13357. <command>-fs NAMENODE -ls -R dir0</command>
  13358. </test-commands>
  13359. <cleanup-commands>
  13360. <command>-fs NAMENODE -rm -r dir0</command>
  13361. </cleanup-commands>
  13362. <comparators>
  13363. <comparator>
  13364. <type>RegexpComparator</type>
  13365. <expected-output>^drwxr-xr-x( )*-( )*USERNAME( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/dir1</expected-output>
  13366. </comparator>
  13367. <comparator>
  13368. <type>RegexpComparator</type>
  13369. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/dir1/file1</expected-output>
  13370. </comparator>
  13371. <comparator>
  13372. <type>RegexpComparator</type>
  13373. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/dir1/file2</expected-output>
  13374. </comparator>
  13375. <comparator>
  13376. <type>RegexpComparator</type>
  13377. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/file0</expected-output>
  13378. </comparator>
  13379. </comparators>
  13380. </test>
  13381. <test> <!-- TESTED -->
  13382. <description>chgrp: change group of directory in absolute path recursively </description>
  13383. <test-commands>
  13384. <command>-fs NAMENODE -mkdir /dir0</command>
  13385. <command>-fs NAMENODE -mkdir /dir0/dir1</command>
  13386. <command>-fs NAMENODE -touchz /dir0/file0</command>
  13387. <command>-fs NAMENODE -touchz /dir0/dir1/file1</command>
  13388. <command>-fs NAMENODE -touchz /dir0/dir1/file2</command>
  13389. <command>-fs NAMENODE -chgrp -R newgroup /dir0/dir1</command>
  13390. <command>-fs NAMENODE -ls -R /dir0</command>
  13391. </test-commands>
  13392. <cleanup-commands>
  13393. <command>-fs NAMENODE -rm -r /dir0</command>
  13394. </cleanup-commands>
  13395. <comparators>
  13396. <comparator>
  13397. <type>RegexpComparator</type>
  13398. <expected-output>^drwxr-xr-x( )*-( )*USERNAME( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1</expected-output>
  13399. </comparator>
  13400. <comparator>
  13401. <type>RegexpComparator</type>
  13402. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1/file1</expected-output>
  13403. </comparator>
  13404. <comparator>
  13405. <type>RegexpComparator</type>
  13406. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1/file2</expected-output>
  13407. </comparator>
  13408. <comparator>
  13409. <type>RegexpComparator</type>
  13410. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/file0</expected-output>
  13411. </comparator>
  13412. </comparators>
  13413. </test>
  13414. <test> <!-- TESTED -->
  13415. <description>chgrp: change group of directory in relative path recursively </description>
  13416. <test-commands>
  13417. <command>-fs NAMENODE -mkdir -p dir0</command>
  13418. <command>-fs NAMENODE -mkdir -p dir0/dir1</command>
  13419. <command>-fs NAMENODE -touchz dir0/file0</command>
  13420. <command>-fs NAMENODE -touchz dir0/dir1/file1</command>
  13421. <command>-fs NAMENODE -touchz dir0/dir1/file2</command>
  13422. <command>-fs NAMENODE -chgrp -R newgroup dir0/dir1</command>
  13423. <command>-fs NAMENODE -ls -R dir0</command>
  13424. </test-commands>
  13425. <cleanup-commands>
  13426. <command>-fs NAMENODE -rm -r dir0</command>
  13427. </cleanup-commands>
  13428. <comparators>
  13429. <comparator>
  13430. <type>RegexpComparator</type>
  13431. <expected-output>^drwxr-xr-x( )*-( )*USERNAME( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/dir1</expected-output>
  13432. </comparator>
  13433. <comparator>
  13434. <type>RegexpComparator</type>
  13435. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/dir1/file1</expected-output>
  13436. </comparator>
  13437. <comparator>
  13438. <type>RegexpComparator</type>
  13439. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/dir1/file2</expected-output>
  13440. </comparator>
  13441. <comparator>
  13442. <type>RegexpComparator</type>
  13443. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/file0</expected-output>
  13444. </comparator>
  13445. </comparators>
  13446. </test>
  13447. <test> <!-- TESTED -->
  13448. <description>chgrp: change group of non existent file in absolute path</description>
  13449. <test-commands>
  13450. <command>-fs NAMENODE -chgrp newgroup /file1</command>
  13451. </test-commands>
  13452. <cleanup-commands>
  13453. <command>-fs NAMENODE -rm /file1</command>
  13454. </cleanup-commands>
  13455. <comparators>
  13456. <comparator>
  13457. <type>RegexpComparator</type>
  13458. <expected-output>^chgrp: `/file1': No such file or directory</expected-output>
  13459. </comparator>
  13460. </comparators>
  13461. </test>
  13462. <test> <!-- TESTED -->
  13463. <description>chgrp: change group of non existent file in relative path</description>
  13464. <test-commands>
  13465. <command>-fs NAMENODE -chgrp newgroup file1</command>
  13466. </test-commands>
  13467. <cleanup-commands>
  13468. <command>-fs NAMENODE -rm file1</command>
  13469. </cleanup-commands>
  13470. <comparators>
  13471. <comparator>
  13472. <type>RegexpComparator</type>
  13473. <expected-output>^chgrp: `file1': No such file or directory</expected-output>
  13474. </comparator>
  13475. </comparators>
  13476. </test>
  13477. <test> <!-- TESTED -->
  13478. <description>chgrp: change group of multiple files in absolute path using globbing</description>
  13479. <test-commands>
  13480. <command>-fs NAMENODE -touchz /file1</command>
  13481. <command>-fs NAMENODE -touchz /file2</command>
  13482. <command>-fs NAMENODE -touchz /file3</command>
  13483. <command>-fs NAMENODE -touchz /file4</command>
  13484. <command>-fs NAMENODE -chgrp newgroup /file* </command>
  13485. <command>-fs NAMENODE -ls -R /file*</command>
  13486. </test-commands>
  13487. <cleanup-commands>
  13488. <command>-fs NAMENODE -rm /file*</command>
  13489. </cleanup-commands>
  13490. <comparators>
  13491. <comparator>
  13492. <type>RegexpComparator</type>
  13493. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/file1</expected-output>
  13494. </comparator>
  13495. <comparator>
  13496. <type>RegexpComparator</type>
  13497. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/file2</expected-output>
  13498. </comparator>
  13499. <comparator>
  13500. <type>RegexpComparator</type>
  13501. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/file3</expected-output>
  13502. </comparator>
  13503. <comparator>
  13504. <type>RegexpComparator</type>
  13505. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/file4</expected-output>
  13506. </comparator>
  13507. </comparators>
  13508. </test>
  13509. <test> <!-- TESTED -->
  13510. <description>chgrp: change group of multiple files in relative path using globbing</description>
  13511. <test-commands>
  13512. <command>-fs NAMENODE -touchz file1</command>
  13513. <command>-fs NAMENODE -touchz file2</command>
  13514. <command>-fs NAMENODE -touchz file3</command>
  13515. <command>-fs NAMENODE -touchz file4</command>
  13516. <command>-fs NAMENODE -chgrp newgroup file* </command>
  13517. <command>-fs NAMENODE -ls -R file*</command>
  13518. </test-commands>
  13519. <cleanup-commands>
  13520. <command>-fs NAMENODE -rm file*</command>
  13521. </cleanup-commands>
  13522. <comparators>
  13523. <comparator>
  13524. <type>RegexpComparator</type>
  13525. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*file1</expected-output>
  13526. </comparator>
  13527. <comparator>
  13528. <type>RegexpComparator</type>
  13529. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*file2</expected-output>
  13530. </comparator>
  13531. <comparator>
  13532. <type>RegexpComparator</type>
  13533. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*file3</expected-output>
  13534. </comparator>
  13535. <comparator>
  13536. <type>RegexpComparator</type>
  13537. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*file4</expected-output>
  13538. </comparator>
  13539. </comparators>
  13540. </test>
  13541. <test> <!-- TESTED -->
  13542. <description>chgrp: change group of multiple directories in absolute path using globbing</description>
  13543. <test-commands>
  13544. <command>-fs NAMENODE -mkdir /dir0</command>
  13545. <command>-fs NAMENODE -mkdir /dir0/dir1</command>
  13546. <command>-fs NAMENODE -touchz /dir0/file0</command>
  13547. <command>-fs NAMENODE -touchz /dir0/dir1/file1</command>
  13548. <command>-fs NAMENODE -touchz /dir0/dir1/file2</command>
  13549. <command>-fs NAMENODE -mkdir /dir2</command>
  13550. <command>-fs NAMENODE -mkdir /dir2/dir1</command>
  13551. <command>-fs NAMENODE -touchz /dir2/file0</command>
  13552. <command>-fs NAMENODE -touchz /dir2/dir1/file1</command>
  13553. <command>-fs NAMENODE -touchz /dir2/dir1/file2</command>
  13554. <command>-fs NAMENODE -chgrp newgroup /dir*</command>
  13555. <command>-fs NAMENODE -ls -R /dir*</command>
  13556. </test-commands>
  13557. <cleanup-commands>
  13558. <command>-fs NAMENODE -rm -r /dir*</command>
  13559. </cleanup-commands>
  13560. <comparators>
  13561. <comparator>
  13562. <type>RegexpComparator</type>
  13563. <expected-output>^drwxr-xr-x( )*-( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1</expected-output>
  13564. </comparator>
  13565. <comparator>
  13566. <type>RegexpComparator</type>
  13567. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1/file1</expected-output>
  13568. </comparator>
  13569. <comparator>
  13570. <type>RegexpComparator</type>
  13571. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1/file2</expected-output>
  13572. </comparator>
  13573. <comparator>
  13574. <type>RegexpComparator</type>
  13575. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/file0</expected-output>
  13576. </comparator>
  13577. <comparator>
  13578. <type>RegexpComparator</type>
  13579. <expected-output>^drwxr-xr-x( )*-( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir2/dir1</expected-output>
  13580. </comparator>
  13581. <comparator>
  13582. <type>RegexpComparator</type>
  13583. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir2/dir1/file1</expected-output>
  13584. </comparator>
  13585. <comparator>
  13586. <type>RegexpComparator</type>
  13587. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir2/dir1/file2</expected-output>
  13588. </comparator>
  13589. <comparator>
  13590. <type>RegexpComparator</type>
  13591. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir2/file0</expected-output>
  13592. </comparator>
  13593. </comparators>
  13594. </test>
  13595. <test> <!-- TESTED -->
  13596. <description>chgrp: change group of multiple directories in relative path using globbing</description>
  13597. <test-commands>
  13598. <command>-fs NAMENODE -mkdir -p dir0</command>
  13599. <command>-fs NAMENODE -mkdir -p dir0/dir1</command>
  13600. <command>-fs NAMENODE -touchz dir0/file0</command>
  13601. <command>-fs NAMENODE -touchz dir0/dir1/file1</command>
  13602. <command>-fs NAMENODE -touchz dir0/dir1/file2</command>
  13603. <command>-fs NAMENODE -mkdir -p dir2</command>
  13604. <command>-fs NAMENODE -mkdir -p dir2/dir1</command>
  13605. <command>-fs NAMENODE -touchz dir2/file0</command>
  13606. <command>-fs NAMENODE -touchz dir2/dir1/file1</command>
  13607. <command>-fs NAMENODE -touchz dir2/dir1/file2</command>
  13608. <command>-fs NAMENODE -chgrp newgroup dir*</command>
  13609. <command>-fs NAMENODE -ls -R dir*</command>
  13610. </test-commands>
  13611. <cleanup-commands>
  13612. <command>-fs NAMENODE -rm -r dir*</command>
  13613. </cleanup-commands>
  13614. <comparators>
  13615. <comparator>
  13616. <type>RegexpComparator</type>
  13617. <expected-output>^drwxr-xr-x( )*-( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/dir1</expected-output>
  13618. </comparator>
  13619. <comparator>
  13620. <type>RegexpComparator</type>
  13621. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/dir1/file1</expected-output>
  13622. </comparator>
  13623. <comparator>
  13624. <type>RegexpComparator</type>
  13625. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/dir1/file2</expected-output>
  13626. </comparator>
  13627. <comparator>
  13628. <type>RegexpComparator</type>
  13629. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/file0</expected-output>
  13630. </comparator>
  13631. <comparator>
  13632. <type>RegexpComparator</type>
  13633. <expected-output>^drwxr-xr-x( )*-( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir2/dir1</expected-output>
  13634. </comparator>
  13635. <comparator>
  13636. <type>RegexpComparator</type>
  13637. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir2/dir1/file1</expected-output>
  13638. </comparator>
  13639. <comparator>
  13640. <type>RegexpComparator</type>
  13641. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir2/dir1/file2</expected-output>
  13642. </comparator>
  13643. <comparator>
  13644. <type>RegexpComparator</type>
  13645. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir2/file0</expected-output>
  13646. </comparator>
  13647. </comparators>
  13648. </test>
  13649. <test> <!-- TESTED -->
  13650. <description>chgrp: change of multiple files in absolute path without globbing</description>
  13651. <test-commands>
  13652. <command>-fs NAMENODE -touchz /file1</command>
  13653. <command>-fs NAMENODE -touchz /file2</command>
  13654. <command>-fs NAMENODE -touchz /file3</command>
  13655. <command>-fs NAMENODE -touchz /file4</command>
  13656. <command>-fs NAMENODE -chgrp newgroup /file1 /file2 /file3 /file4 </command>
  13657. <command>-fs NAMENODE -ls -R /file*</command>
  13658. </test-commands>
  13659. <cleanup-commands>
  13660. <command>-fs NAMENODE -rm /file*</command>
  13661. </cleanup-commands>
  13662. <comparators>
  13663. <comparator>
  13664. <type>RegexpComparator</type>
  13665. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/file1</expected-output>
  13666. </comparator>
  13667. <comparator>
  13668. <type>RegexpComparator</type>
  13669. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/file2</expected-output>
  13670. </comparator>
  13671. <comparator>
  13672. <type>RegexpComparator</type>
  13673. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/file3</expected-output>
  13674. </comparator>
  13675. <comparator>
  13676. <type>RegexpComparator</type>
  13677. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/file4</expected-output>
  13678. </comparator>
  13679. </comparators>
  13680. </test>
  13681. <test> <!-- TESTED -->
  13682. <description>chgrp: change group of multiple files in relative path without globbing</description>
  13683. <test-commands>
  13684. <command>-fs NAMENODE -touchz file1</command>
  13685. <command>-fs NAMENODE -touchz file2</command>
  13686. <command>-fs NAMENODE -touchz file3</command>
  13687. <command>-fs NAMENODE -touchz file4</command>
  13688. <command>-fs NAMENODE -chgrp newgroup file1 file2 file3 file4 </command>
  13689. <command>-fs NAMENODE -ls -R file*</command>
  13690. </test-commands>
  13691. <cleanup-commands>
  13692. <command>-fs NAMENODE -rm file*</command>
  13693. </cleanup-commands>
  13694. <comparators>
  13695. <comparator>
  13696. <type>RegexpComparator</type>
  13697. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*file1</expected-output>
  13698. </comparator>
  13699. <comparator>
  13700. <type>RegexpComparator</type>
  13701. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*file2</expected-output>
  13702. </comparator>
  13703. <comparator>
  13704. <type>RegexpComparator</type>
  13705. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*file3</expected-output>
  13706. </comparator>
  13707. <comparator>
  13708. <type>RegexpComparator</type>
  13709. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*file4</expected-output>
  13710. </comparator>
  13711. </comparators>
  13712. </test>
  13713. <test> <!-- TESTED -->
  13714. <description>chgrp: change group of multiple directories in absolute path without globbing</description>
  13715. <test-commands>
  13716. <command>-fs NAMENODE -mkdir /dir0</command>
  13717. <command>-fs NAMENODE -mkdir /dir0/dir1</command>
  13718. <command>-fs NAMENODE -touchz /dir0/file0</command>
  13719. <command>-fs NAMENODE -touchz /dir0/dir1/file1</command>
  13720. <command>-fs NAMENODE -touchz /dir0/dir1/file2</command>
  13721. <command>-fs NAMENODE -mkdir /dir2</command>
  13722. <command>-fs NAMENODE -mkdir /dir2/dir1</command>
  13723. <command>-fs NAMENODE -touchz /dir2/file0</command>
  13724. <command>-fs NAMENODE -touchz /dir2/dir1/file1</command>
  13725. <command>-fs NAMENODE -touchz /dir2/dir1/file2</command>
  13726. <command>-fs NAMENODE -chgrp newgroup /dir0 /dir2</command>
  13727. <command>-fs NAMENODE -ls -R /dir*</command>
  13728. </test-commands>
  13729. <cleanup-commands>
  13730. <command>-fs NAMENODE -rm -r /dir*</command>
  13731. </cleanup-commands>
  13732. <comparators>
  13733. <comparator>
  13734. <type>RegexpComparator</type>
  13735. <expected-output>^drwxr-xr-x( )*-( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1</expected-output>
  13736. </comparator>
  13737. <comparator>
  13738. <type>RegexpComparator</type>
  13739. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1/file1</expected-output>
  13740. </comparator>
  13741. <comparator>
  13742. <type>RegexpComparator</type>
  13743. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1/file2</expected-output>
  13744. </comparator>
  13745. <comparator>
  13746. <type>RegexpComparator</type>
  13747. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/file0</expected-output>
  13748. </comparator>
  13749. <comparator>
  13750. <type>RegexpComparator</type>
  13751. <expected-output>^drwxr-xr-x( )*-( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir2/dir1</expected-output>
  13752. </comparator>
  13753. <comparator>
  13754. <type>RegexpComparator</type>
  13755. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir2/dir1/file1</expected-output>
  13756. </comparator>
  13757. <comparator>
  13758. <type>RegexpComparator</type>
  13759. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir2/dir1/file2</expected-output>
  13760. </comparator>
  13761. <comparator>
  13762. <type>RegexpComparator</type>
  13763. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir2/file0</expected-output>
  13764. </comparator>
  13765. </comparators>
  13766. </test>
  13767. <test> <!-- TESTED -->
  13768. <description>chgrp: change group of multiple directories in relative path without globbing</description>
  13769. <test-commands>
  13770. <command>-fs NAMENODE -mkdir -p dir0</command>
  13771. <command>-fs NAMENODE -mkdir -p dir0/dir1</command>
  13772. <command>-fs NAMENODE -touchz dir0/file0</command>
  13773. <command>-fs NAMENODE -touchz dir0/dir1/file1</command>
  13774. <command>-fs NAMENODE -touchz dir0/dir1/file2</command>
  13775. <command>-fs NAMENODE -mkdir -p dir2</command>
  13776. <command>-fs NAMENODE -mkdir -p dir2/dir1</command>
  13777. <command>-fs NAMENODE -touchz dir2/file0</command>
  13778. <command>-fs NAMENODE -touchz dir2/dir1/file1</command>
  13779. <command>-fs NAMENODE -touchz dir2/dir1/file2</command>
  13780. <command>-fs NAMENODE -chgrp newgroup dir0 dir2</command>
  13781. <command>-fs NAMENODE -ls -R dir*</command>
  13782. </test-commands>
  13783. <cleanup-commands>
  13784. <command>-fs NAMENODE -rm -r dir*</command>
  13785. </cleanup-commands>
  13786. <comparators>
  13787. <comparator>
  13788. <type>RegexpComparator</type>
  13789. <expected-output>^drwxr-xr-x( )*-( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/dir1</expected-output>
  13790. </comparator>
  13791. <comparator>
  13792. <type>RegexpComparator</type>
  13793. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/dir1/file1</expected-output>
  13794. </comparator>
  13795. <comparator>
  13796. <type>RegexpComparator</type>
  13797. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/dir1/file2</expected-output>
  13798. </comparator>
  13799. <comparator>
  13800. <type>RegexpComparator</type>
  13801. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/file0</expected-output>
  13802. </comparator>
  13803. <comparator>
  13804. <type>RegexpComparator</type>
  13805. <expected-output>^drwxr-xr-x( )*-( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir2/dir1</expected-output>
  13806. </comparator>
  13807. <comparator>
  13808. <type>RegexpComparator</type>
  13809. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir2/dir1/file1</expected-output>
  13810. </comparator>
  13811. <comparator>
  13812. <type>RegexpComparator</type>
  13813. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir2/dir1/file2</expected-output>
  13814. </comparator>
  13815. <comparator>
  13816. <type>RegexpComparator</type>
  13817. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir2/file0</expected-output>
  13818. </comparator>
  13819. </comparators>
  13820. </test>
  13821. <test> <!-- TESTED -->
  13822. <description>chgrp: change group of multiple directories recursively in absolute path using globbing</description>
  13823. <test-commands>
  13824. <command>-fs NAMENODE -mkdir /dir0</command>
  13825. <command>-fs NAMENODE -mkdir /dir0/dir1</command>
  13826. <command>-fs NAMENODE -touchz /dir0/file0</command>
  13827. <command>-fs NAMENODE -touchz /dir0/dir1/file1</command>
  13828. <command>-fs NAMENODE -touchz /dir0/dir1/file2</command>
  13829. <command>-fs NAMENODE -mkdir /dir2</command>
  13830. <command>-fs NAMENODE -mkdir /dir2/dir1</command>
  13831. <command>-fs NAMENODE -touchz /dir2/file0</command>
  13832. <command>-fs NAMENODE -touchz /dir2/dir1/file1</command>
  13833. <command>-fs NAMENODE -touchz /dir2/dir1/file2</command>
  13834. <command>-fs NAMENODE -chgrp -R newgroup /dir*</command>
  13835. <command>-fs NAMENODE -ls -R /dir*</command>
  13836. </test-commands>
  13837. <cleanup-commands>
  13838. <command>-fs NAMENODE -rm -r /dir*</command>
  13839. </cleanup-commands>
  13840. <comparators>
  13841. <comparator>
  13842. <type>RegexpComparator</type>
  13843. <expected-output>^drwxr-xr-x( )*-( )*USERNAME( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1</expected-output>
  13844. </comparator>
  13845. <comparator>
  13846. <type>RegexpComparator</type>
  13847. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1/file1</expected-output>
  13848. </comparator>
  13849. <comparator>
  13850. <type>RegexpComparator</type>
  13851. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1/file2</expected-output>
  13852. </comparator>
  13853. <comparator>
  13854. <type>RegexpComparator</type>
  13855. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/file0</expected-output>
  13856. </comparator>
  13857. <comparator>
  13858. <type>RegexpComparator</type>
  13859. <expected-output>^drwxr-xr-x( )*-( )*USERNAME( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir2/dir1</expected-output>
  13860. </comparator>
  13861. <comparator>
  13862. <type>RegexpComparator</type>
  13863. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir2/dir1/file1</expected-output>
  13864. </comparator>
  13865. <comparator>
  13866. <type>RegexpComparator</type>
  13867. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir2/dir1/file2</expected-output>
  13868. </comparator>
  13869. <comparator>
  13870. <type>RegexpComparator</type>
  13871. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir2/file0</expected-output>
  13872. </comparator>
  13873. </comparators>
  13874. </test>
  13875. <test> <!-- TESTED -->
  13876. <description>chgrp: change group of multiple directories recursively in relative path using globbing</description>
  13877. <test-commands>
  13878. <command>-fs NAMENODE -mkdir -p dir0</command>
  13879. <command>-fs NAMENODE -mkdir -p dir0/dir1</command>
  13880. <command>-fs NAMENODE -touchz dir0/file0</command>
  13881. <command>-fs NAMENODE -touchz dir0/dir1/file1</command>
  13882. <command>-fs NAMENODE -touchz dir0/dir1/file2</command>
  13883. <command>-fs NAMENODE -mkdir -p dir2</command>
  13884. <command>-fs NAMENODE -mkdir -p dir2/dir1</command>
  13885. <command>-fs NAMENODE -touchz dir2/file0</command>
  13886. <command>-fs NAMENODE -touchz dir2/dir1/file1</command>
  13887. <command>-fs NAMENODE -touchz dir2/dir1/file2</command>
  13888. <command>-fs NAMENODE -chgrp -R newgroup dir*</command>
  13889. <command>-fs NAMENODE -ls -R dir*</command>
  13890. </test-commands>
  13891. <cleanup-commands>
  13892. <command>-fs NAMENODE -rm -r dir*</command>
  13893. </cleanup-commands>
  13894. <comparators>
  13895. <comparator>
  13896. <type>RegexpComparator</type>
  13897. <expected-output>^drwxr-xr-x( )*-( )*USERNAME( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/dir1</expected-output>
  13898. </comparator>
  13899. <comparator>
  13900. <type>RegexpComparator</type>
  13901. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/dir1/file1</expected-output>
  13902. </comparator>
  13903. <comparator>
  13904. <type>RegexpComparator</type>
  13905. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/dir1/file2</expected-output>
  13906. </comparator>
  13907. <comparator>
  13908. <type>RegexpComparator</type>
  13909. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/file0</expected-output>
  13910. </comparator>
  13911. <comparator>
  13912. <type>RegexpComparator</type>
  13913. <expected-output>^drwxr-xr-x( )*-( )*USERNAME( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir2/dir1</expected-output>
  13914. </comparator>
  13915. <comparator>
  13916. <type>RegexpComparator</type>
  13917. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir2/dir1/file1</expected-output>
  13918. </comparator>
  13919. <comparator>
  13920. <type>RegexpComparator</type>
  13921. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir2/dir1/file2</expected-output>
  13922. </comparator>
  13923. <comparator>
  13924. <type>RegexpComparator</type>
  13925. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir2/file0</expected-output>
  13926. </comparator>
  13927. </comparators>
  13928. </test>
  13929. <test> <!-- TESTED -->
  13930. <description>chgrp: change group of multiple directories recursively in absolute path without globbing</description>
  13931. <test-commands>
  13932. <command>-fs NAMENODE -mkdir /dir0</command>
  13933. <command>-fs NAMENODE -mkdir /dir0/dir1</command>
  13934. <command>-fs NAMENODE -touchz /dir0/file0</command>
  13935. <command>-fs NAMENODE -touchz /dir0/dir1/file1</command>
  13936. <command>-fs NAMENODE -touchz /dir0/dir1/file2</command>
  13937. <command>-fs NAMENODE -mkdir /dir2</command>
  13938. <command>-fs NAMENODE -mkdir /dir2/dir1</command>
  13939. <command>-fs NAMENODE -touchz /dir2/file0</command>
  13940. <command>-fs NAMENODE -touchz /dir2/dir1/file1</command>
  13941. <command>-fs NAMENODE -touchz /dir2/dir1/file2</command>
  13942. <command>-fs NAMENODE -chgrp -R newgroup /dir0 /dir2</command>
  13943. <command>-fs NAMENODE -ls -R /dir*</command>
  13944. </test-commands>
  13945. <cleanup-commands>
  13946. <command>-fs NAMENODE -rm -r /dir*</command>
  13947. </cleanup-commands>
  13948. <comparators>
  13949. <comparator>
  13950. <type>RegexpComparator</type>
  13951. <expected-output>^drwxr-xr-x( )*-( )*USERNAME( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1</expected-output>
  13952. </comparator>
  13953. <comparator>
  13954. <type>RegexpComparator</type>
  13955. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1/file1</expected-output>
  13956. </comparator>
  13957. <comparator>
  13958. <type>RegexpComparator</type>
  13959. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1/file2</expected-output>
  13960. </comparator>
  13961. <comparator>
  13962. <type>RegexpComparator</type>
  13963. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/file0</expected-output>
  13964. </comparator>
  13965. <comparator>
  13966. <type>RegexpComparator</type>
  13967. <expected-output>^drwxr-xr-x( )*-( )*USERNAME( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir2/dir1</expected-output>
  13968. </comparator>
  13969. <comparator>
  13970. <type>RegexpComparator</type>
  13971. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir2/dir1/file1</expected-output>
  13972. </comparator>
  13973. <comparator>
  13974. <type>RegexpComparator</type>
  13975. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir2/dir1/file2</expected-output>
  13976. </comparator>
  13977. <comparator>
  13978. <type>RegexpComparator</type>
  13979. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir2/file0</expected-output>
  13980. </comparator>
  13981. </comparators>
  13982. </test>
  13983. <test> <!-- TESTED -->
  13984. <description>chgrp: change group of multiple directories recursively in relative path without globbing</description>
  13985. <test-commands>
  13986. <command>-fs NAMENODE -mkdir -p dir0</command>
  13987. <command>-fs NAMENODE -mkdir -p dir0/dir1</command>
  13988. <command>-fs NAMENODE -touchz dir0/file0</command>
  13989. <command>-fs NAMENODE -touchz dir0/dir1/file1</command>
  13990. <command>-fs NAMENODE -touchz dir0/dir1/file2</command>
  13991. <command>-fs NAMENODE -mkdir -p dir2</command>
  13992. <command>-fs NAMENODE -mkdir -p dir2/dir1</command>
  13993. <command>-fs NAMENODE -touchz dir2/file0</command>
  13994. <command>-fs NAMENODE -touchz dir2/dir1/file1</command>
  13995. <command>-fs NAMENODE -touchz dir2/dir1/file2</command>
  13996. <command>-fs NAMENODE -chgrp -R newgroup dir0 dir2</command>
  13997. <command>-fs NAMENODE -ls -R dir*</command>
  13998. </test-commands>
  13999. <cleanup-commands>
  14000. <command>-fs NAMENODE -rm -r dir*</command>
  14001. </cleanup-commands>
  14002. <comparators>
  14003. <comparator>
  14004. <type>RegexpComparator</type>
  14005. <expected-output>^drwxr-xr-x( )*-( )*USERNAME( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/dir1</expected-output>
  14006. </comparator>
  14007. <comparator>
  14008. <type>RegexpComparator</type>
  14009. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/dir1/file1</expected-output>
  14010. </comparator>
  14011. <comparator>
  14012. <type>RegexpComparator</type>
  14013. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/dir1/file2</expected-output>
  14014. </comparator>
  14015. <comparator>
  14016. <type>RegexpComparator</type>
  14017. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/file0</expected-output>
  14018. </comparator>
  14019. <comparator>
  14020. <type>RegexpComparator</type>
  14021. <expected-output>^drwxr-xr-x( )*-( )*USERNAME( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir2/dir1</expected-output>
  14022. </comparator>
  14023. <comparator>
  14024. <type>RegexpComparator</type>
  14025. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir2/dir1/file1</expected-output>
  14026. </comparator>
  14027. <comparator>
  14028. <type>RegexpComparator</type>
  14029. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir2/dir1/file2</expected-output>
  14030. </comparator>
  14031. <comparator>
  14032. <type>RegexpComparator</type>
  14033. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir2/file0</expected-output>
  14034. </comparator>
  14035. </comparators>
  14036. </test>
  14037. <test> <!-- TESTED -->
  14038. <description>chgrp: invalid option for group of file in absolute path</description>
  14039. <test-commands>
  14040. <command>-fs NAMENODE -touchz /file1</command>
  14041. <command>-fs NAMENODE -chgrp % /file1</command>
  14042. </test-commands>
  14043. <cleanup-commands>
  14044. <command>-fs NAMENODE -rm /file1</command>
  14045. </cleanup-commands>
  14046. <comparators>
  14047. <comparator>
  14048. <type>RegexpComparator</type>
  14049. <expected-output>^-chgrp: '%' does not match expected pattern for group</expected-output>
  14050. </comparator>
  14051. </comparators>
  14052. </test>
  14053. <test> <!-- TESTED -->
  14054. <description>chgrp: invalid option for group of file in relative path</description>
  14055. <test-commands>
  14056. <command>-fs NAMENODE -touchz file1</command>
  14057. <command>-fs NAMENODE -chgrp % file1</command>
  14058. </test-commands>
  14059. <cleanup-commands>
  14060. <command>-fs NAMENODE -rm file1</command>
  14061. </cleanup-commands>
  14062. <comparators>
  14063. <comparator>
  14064. <type>RegexpComparator</type>
  14065. <expected-output>^-chgrp: '%' does not match expected pattern for group</expected-output>
  14066. </comparator>
  14067. </comparators>
  14068. </test>
  14069. <test> <!-- TESTED -->
  14070. <description>chgrp: change group of file in hdfs:// path</description>
  14071. <test-commands>
  14072. <command>-fs NAMENODE -touchz hdfs:///file1</command>
  14073. <command>-fs NAMENODE -chgrp newgroup hdfs:///file1</command>
  14074. <command>-fs NAMENODE -ls hdfs:///file1</command>
  14075. </test-commands>
  14076. <cleanup-commands>
  14077. <command>-fs NAMENODE -rm hdfs:///file1</command>
  14078. </cleanup-commands>
  14079. <comparators>
  14080. <comparator>
  14081. <type>RegexpComparator</type>
  14082. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///file1</expected-output>
  14083. </comparator>
  14084. </comparators>
  14085. </test>
  14086. <test> <!-- TESTED -->
  14087. <description>chgrp: change group of directory in hdfs:// path</description>
  14088. <test-commands>
  14089. <command>-fs NAMENODE -mkdir hdfs:///dir0</command>
  14090. <command>-fs NAMENODE -mkdir hdfs:///dir0/dir1</command>
  14091. <command>-fs NAMENODE -touchz hdfs:///dir0/file0</command>
  14092. <command>-fs NAMENODE -touchz hdfs:///dir0/dir1/file1</command>
  14093. <command>-fs NAMENODE -touchz hdfs:///dir0/dir1/file2</command>
  14094. <command>-fs NAMENODE -chgrp newgroup hdfs:///dir0/dir1</command>
  14095. <command>-fs NAMENODE -ls -R hdfs:///dir0</command>
  14096. </test-commands>
  14097. <cleanup-commands>
  14098. <command>-fs NAMENODE -rm -r hdfs:///dir0</command>
  14099. </cleanup-commands>
  14100. <comparators>
  14101. <comparator>
  14102. <type>RegexpComparator</type>
  14103. <expected-output>^drwxr-xr-x( )*-( )*USERNAME( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir0/dir1</expected-output>
  14104. </comparator>
  14105. <comparator>
  14106. <type>RegexpComparator</type>
  14107. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir0/dir1/file1</expected-output>
  14108. </comparator>
  14109. <comparator>
  14110. <type>RegexpComparator</type>
  14111. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir0/dir1/file2</expected-output>
  14112. </comparator>
  14113. <comparator>
  14114. <type>RegexpComparator</type>
  14115. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir0/file0</expected-output>
  14116. </comparator>
  14117. </comparators>
  14118. </test>
  14119. <test> <!-- TESTED -->
  14120. <description>chgrp: change group of directory in hdfs:// path recursively </description>
  14121. <test-commands>
  14122. <command>-fs NAMENODE -mkdir hdfs:///dir0</command>
  14123. <command>-fs NAMENODE -mkdir hdfs:///dir0/dir1</command>
  14124. <command>-fs NAMENODE -touchz hdfs:///dir0/file0</command>
  14125. <command>-fs NAMENODE -touchz hdfs:///dir0/dir1/file1</command>
  14126. <command>-fs NAMENODE -touchz hdfs:///dir0/dir1/file2</command>
  14127. <command>-fs NAMENODE -chgrp -R newgroup hdfs:///dir0/dir1</command>
  14128. <command>-fs NAMENODE -ls -R hdfs:///dir0</command>
  14129. </test-commands>
  14130. <cleanup-commands>
  14131. <command>-fs NAMENODE -rm -r hdfs:///dir0</command>
  14132. </cleanup-commands>
  14133. <comparators>
  14134. <comparator>
  14135. <type>RegexpComparator</type>
  14136. <expected-output>^drwxr-xr-x( )*-( )*USERNAME( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir0/dir1</expected-output>
  14137. </comparator>
  14138. <comparator>
  14139. <type>RegexpComparator</type>
  14140. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir0/dir1/file1</expected-output>
  14141. </comparator>
  14142. <comparator>
  14143. <type>RegexpComparator</type>
  14144. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir0/dir1/file2</expected-output>
  14145. </comparator>
  14146. <comparator>
  14147. <type>RegexpComparator</type>
  14148. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir0/file0</expected-output>
  14149. </comparator>
  14150. </comparators>
  14151. </test>
  14152. <test> <!-- TESTED -->
  14153. <description>chgrp: change group of non existent file in hdfs:// path</description>
  14154. <test-commands>
  14155. <command>-fs NAMENODE -chgrp newgroup hdfs:///file1</command>
  14156. </test-commands>
  14157. <cleanup-commands>
  14158. <command>-fs NAMENODE -rm hdfs:///file1</command>
  14159. </cleanup-commands>
  14160. <comparators>
  14161. <comparator>
  14162. <type>RegexpComparator</type>
  14163. <expected-output>^chgrp: `hdfs:///file1': No such file or directory</expected-output>
  14164. </comparator>
  14165. </comparators>
  14166. </test>
  14167. <test> <!-- TESTED -->
  14168. <description>chgrp: change group of multiple files in hdfs:// path using globbing</description>
  14169. <test-commands>
  14170. <command>-fs NAMENODE -touchz hdfs:///file1</command>
  14171. <command>-fs NAMENODE -touchz hdfs:///file2</command>
  14172. <command>-fs NAMENODE -touchz hdfs:///file3</command>
  14173. <command>-fs NAMENODE -touchz hdfs:///file4</command>
  14174. <command>-fs NAMENODE -chgrp newgroup hdfs:///file* </command>
  14175. <command>-fs NAMENODE -ls -R hdfs:///file*</command>
  14176. </test-commands>
  14177. <cleanup-commands>
  14178. <command>-fs NAMENODE -rm hdfs:///file*</command>
  14179. </cleanup-commands>
  14180. <comparators>
  14181. <comparator>
  14182. <type>RegexpComparator</type>
  14183. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///file1</expected-output>
  14184. </comparator>
  14185. <comparator>
  14186. <type>RegexpComparator</type>
  14187. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///file2</expected-output>
  14188. </comparator>
  14189. <comparator>
  14190. <type>RegexpComparator</type>
  14191. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///file3</expected-output>
  14192. </comparator>
  14193. <comparator>
  14194. <type>RegexpComparator</type>
  14195. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///file4</expected-output>
  14196. </comparator>
  14197. </comparators>
  14198. </test>
  14199. <test> <!-- TESTED -->
  14200. <description>chgrp: change group of multiple directories in hdfs:// path using globbing</description>
  14201. <test-commands>
  14202. <command>-fs NAMENODE -mkdir hdfs:///dir0</command>
  14203. <command>-fs NAMENODE -mkdir hdfs:///dir0/dir1</command>
  14204. <command>-fs NAMENODE -touchz hdfs:///dir0/file0</command>
  14205. <command>-fs NAMENODE -touchz hdfs:///dir0/dir1/file1</command>
  14206. <command>-fs NAMENODE -touchz hdfs:///dir0/dir1/file2</command>
  14207. <command>-fs NAMENODE -mkdir hdfs:///dir2</command>
  14208. <command>-fs NAMENODE -mkdir hdfs:///dir2/dir1</command>
  14209. <command>-fs NAMENODE -touchz hdfs:///dir2/file0</command>
  14210. <command>-fs NAMENODE -touchz hdfs:///dir2/dir1/file1</command>
  14211. <command>-fs NAMENODE -touchz hdfs:///dir2/dir1/file2</command>
  14212. <command>-fs NAMENODE -chgrp newgroup hdfs:///dir*</command>
  14213. <command>-fs NAMENODE -ls -R hdfs:///dir*</command>
  14214. </test-commands>
  14215. <cleanup-commands>
  14216. <command>-fs NAMENODE -rm -r hdfs:///dir*</command>
  14217. </cleanup-commands>
  14218. <comparators>
  14219. <comparator>
  14220. <type>RegexpComparator</type>
  14221. <expected-output>^drwxr-xr-x( )*-( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir0/dir1</expected-output>
  14222. </comparator>
  14223. <comparator>
  14224. <type>RegexpComparator</type>
  14225. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir0/dir1/file1</expected-output>
  14226. </comparator>
  14227. <comparator>
  14228. <type>RegexpComparator</type>
  14229. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir0/dir1/file2</expected-output>
  14230. </comparator>
  14231. <comparator>
  14232. <type>RegexpComparator</type>
  14233. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir0/file0</expected-output>
  14234. </comparator>
  14235. <comparator>
  14236. <type>RegexpComparator</type>
  14237. <expected-output>^drwxr-xr-x( )*-( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir2/dir1</expected-output>
  14238. </comparator>
  14239. <comparator>
  14240. <type>RegexpComparator</type>
  14241. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir2/dir1/file1</expected-output>
  14242. </comparator>
  14243. <comparator>
  14244. <type>RegexpComparator</type>
  14245. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir2/dir1/file2</expected-output>
  14246. </comparator>
  14247. <comparator>
  14248. <type>RegexpComparator</type>
  14249. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir2/file0</expected-output>
  14250. </comparator>
  14251. </comparators>
  14252. </test>
  14253. <test> <!-- TESTED -->
  14254. <description>chgrp: change of multiple files in hdfs:// path without globbing</description>
  14255. <test-commands>
  14256. <command>-fs NAMENODE -touchz hdfs:///file1</command>
  14257. <command>-fs NAMENODE -touchz hdfs:///file2</command>
  14258. <command>-fs NAMENODE -touchz hdfs:///file3</command>
  14259. <command>-fs NAMENODE -touchz hdfs:///file4</command>
  14260. <command>-fs NAMENODE -chgrp newgroup hdfs:///file1 hdfs:///file2 hdfs:///file3 hdfs:///file4 </command>
  14261. <command>-fs NAMENODE -ls -R hdfs:///file*</command>
  14262. </test-commands>
  14263. <cleanup-commands>
  14264. <command>-fs NAMENODE -rm hdfs:///file*</command>
  14265. </cleanup-commands>
  14266. <comparators>
  14267. <comparator>
  14268. <type>RegexpComparator</type>
  14269. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///file1</expected-output>
  14270. </comparator>
  14271. <comparator>
  14272. <type>RegexpComparator</type>
  14273. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///file2</expected-output>
  14274. </comparator>
  14275. <comparator>
  14276. <type>RegexpComparator</type>
  14277. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///file3</expected-output>
  14278. </comparator>
  14279. <comparator>
  14280. <type>RegexpComparator</type>
  14281. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///file4</expected-output>
  14282. </comparator>
  14283. </comparators>
  14284. </test>
  14285. <test> <!-- TESTED -->
  14286. <description>chgrp: change group of multiple directories in hdfs:// path without globbing</description>
  14287. <test-commands>
  14288. <command>-fs NAMENODE -mkdir hdfs:///dir0</command>
  14289. <command>-fs NAMENODE -mkdir hdfs:///dir0/dir1</command>
  14290. <command>-fs NAMENODE -touchz hdfs:///dir0/file0</command>
  14291. <command>-fs NAMENODE -touchz hdfs:///dir0/dir1/file1</command>
  14292. <command>-fs NAMENODE -touchz hdfs:///dir0/dir1/file2</command>
  14293. <command>-fs NAMENODE -mkdir hdfs:///dir2</command>
  14294. <command>-fs NAMENODE -mkdir hdfs:///dir2/dir1</command>
  14295. <command>-fs NAMENODE -touchz hdfs:///dir2/file0</command>
  14296. <command>-fs NAMENODE -touchz hdfs:///dir2/dir1/file1</command>
  14297. <command>-fs NAMENODE -touchz hdfs:///dir2/dir1/file2</command>
  14298. <command>-fs NAMENODE -chgrp newgroup hdfs:///dir0 hdfs:///dir2</command>
  14299. <command>-fs NAMENODE -ls -R hdfs:///dir*</command>
  14300. </test-commands>
  14301. <cleanup-commands>
  14302. <command>-fs NAMENODE -rm -r hdfs:///dir*</command>
  14303. </cleanup-commands>
  14304. <comparators>
  14305. <comparator>
  14306. <type>RegexpComparator</type>
  14307. <expected-output>^drwxr-xr-x( )*-( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir0/dir1</expected-output>
  14308. </comparator>
  14309. <comparator>
  14310. <type>RegexpComparator</type>
  14311. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir0/dir1/file1</expected-output>
  14312. </comparator>
  14313. <comparator>
  14314. <type>RegexpComparator</type>
  14315. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir0/dir1/file2</expected-output>
  14316. </comparator>
  14317. <comparator>
  14318. <type>RegexpComparator</type>
  14319. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir0/file0</expected-output>
  14320. </comparator>
  14321. <comparator>
  14322. <type>RegexpComparator</type>
  14323. <expected-output>^drwxr-xr-x( )*-( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir2/dir1</expected-output>
  14324. </comparator>
  14325. <comparator>
  14326. <type>RegexpComparator</type>
  14327. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir2/dir1/file1</expected-output>
  14328. </comparator>
  14329. <comparator>
  14330. <type>RegexpComparator</type>
  14331. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir2/dir1/file2</expected-output>
  14332. </comparator>
  14333. <comparator>
  14334. <type>RegexpComparator</type>
  14335. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir2/file0</expected-output>
  14336. </comparator>
  14337. </comparators>
  14338. </test>
  14339. <test> <!-- TESTED -->
  14340. <description>chgrp: change group of multiple directories recursively in hdfs:// path using globbing</description>
  14341. <test-commands>
  14342. <command>-fs NAMENODE -mkdir hdfs:///dir0</command>
  14343. <command>-fs NAMENODE -mkdir hdfs:///dir0/dir1</command>
  14344. <command>-fs NAMENODE -touchz hdfs:///dir0/file0</command>
  14345. <command>-fs NAMENODE -touchz hdfs:///dir0/dir1/file1</command>
  14346. <command>-fs NAMENODE -touchz hdfs:///dir0/dir1/file2</command>
  14347. <command>-fs NAMENODE -mkdir hdfs:///dir2</command>
  14348. <command>-fs NAMENODE -mkdir hdfs:///dir2/dir1</command>
  14349. <command>-fs NAMENODE -touchz hdfs:///dir2/file0</command>
  14350. <command>-fs NAMENODE -touchz hdfs:///dir2/dir1/file1</command>
  14351. <command>-fs NAMENODE -touchz hdfs:///dir2/dir1/file2</command>
  14352. <command>-fs NAMENODE -chgrp -R newgroup hdfs:///dir*</command>
  14353. <command>-fs NAMENODE -ls -R hdfs:///dir*</command>
  14354. </test-commands>
  14355. <cleanup-commands>
  14356. <command>-fs NAMENODE -rm -r hdfs:///dir*</command>
  14357. </cleanup-commands>
  14358. <comparators>
  14359. <comparator>
  14360. <type>RegexpComparator</type>
  14361. <expected-output>^drwxr-xr-x( )*-( )*USERNAME( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir0/dir1</expected-output>
  14362. </comparator>
  14363. <comparator>
  14364. <type>RegexpComparator</type>
  14365. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir0/dir1/file1</expected-output>
  14366. </comparator>
  14367. <comparator>
  14368. <type>RegexpComparator</type>
  14369. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir0/dir1/file2</expected-output>
  14370. </comparator>
  14371. <comparator>
  14372. <type>RegexpComparator</type>
  14373. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir0/file0</expected-output>
  14374. </comparator>
  14375. <comparator>
  14376. <type>RegexpComparator</type>
  14377. <expected-output>^drwxr-xr-x( )*-( )*USERNAME( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir2/dir1</expected-output>
  14378. </comparator>
  14379. <comparator>
  14380. <type>RegexpComparator</type>
  14381. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir2/dir1/file1</expected-output>
  14382. </comparator>
  14383. <comparator>
  14384. <type>RegexpComparator</type>
  14385. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir2/dir1/file2</expected-output>
  14386. </comparator>
  14387. <comparator>
  14388. <type>RegexpComparator</type>
  14389. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir2/file0</expected-output>
  14390. </comparator>
  14391. </comparators>
  14392. </test>
  14393. <test> <!-- TESTED -->
  14394. <description>chgrp: change group of multiple directories recursively in hdfs:// path without globbing</description>
  14395. <test-commands>
  14396. <command>-fs NAMENODE -mkdir hdfs:///dir0</command>
  14397. <command>-fs NAMENODE -mkdir hdfs:///dir0/dir1</command>
  14398. <command>-fs NAMENODE -touchz hdfs:///dir0/file0</command>
  14399. <command>-fs NAMENODE -touchz hdfs:///dir0/dir1/file1</command>
  14400. <command>-fs NAMENODE -touchz hdfs:///dir0/dir1/file2</command>
  14401. <command>-fs NAMENODE -mkdir hdfs:///dir2</command>
  14402. <command>-fs NAMENODE -mkdir hdfs:///dir2/dir1</command>
  14403. <command>-fs NAMENODE -touchz hdfs:///dir2/file0</command>
  14404. <command>-fs NAMENODE -touchz hdfs:///dir2/dir1/file1</command>
  14405. <command>-fs NAMENODE -touchz hdfs:///dir2/dir1/file2</command>
  14406. <command>-fs NAMENODE -chgrp -R newgroup hdfs:///dir0 hdfs:///dir2</command>
  14407. <command>-fs NAMENODE -ls -R hdfs:///dir*</command>
  14408. </test-commands>
  14409. <cleanup-commands>
  14410. <command>-fs NAMENODE -rm -r hdfs:///dir*</command>
  14411. </cleanup-commands>
  14412. <comparators>
  14413. <comparator>
  14414. <type>RegexpComparator</type>
  14415. <expected-output>^drwxr-xr-x( )*-( )*USERNAME( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir0/dir1</expected-output>
  14416. </comparator>
  14417. <comparator>
  14418. <type>RegexpComparator</type>
  14419. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir0/dir1/file1</expected-output>
  14420. </comparator>
  14421. <comparator>
  14422. <type>RegexpComparator</type>
  14423. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir0/dir1/file2</expected-output>
  14424. </comparator>
  14425. <comparator>
  14426. <type>RegexpComparator</type>
  14427. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir0/file0</expected-output>
  14428. </comparator>
  14429. <comparator>
  14430. <type>RegexpComparator</type>
  14431. <expected-output>^drwxr-xr-x( )*-( )*USERNAME( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir2/dir1</expected-output>
  14432. </comparator>
  14433. <comparator>
  14434. <type>RegexpComparator</type>
  14435. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir2/dir1/file1</expected-output>
  14436. </comparator>
  14437. <comparator>
  14438. <type>RegexpComparator</type>
  14439. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir2/dir1/file2</expected-output>
  14440. </comparator>
  14441. <comparator>
  14442. <type>RegexpComparator</type>
  14443. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir2/file0</expected-output>
  14444. </comparator>
  14445. </comparators>
  14446. </test>
  14447. <test> <!-- TESTED -->
  14448. <description>chgrp: invalid option for group of file in hdfs:// path</description>
  14449. <test-commands>
  14450. <command>-fs NAMENODE -touchz hdfs:///file1</command>
  14451. <command>-fs NAMENODE -chgrp % hdfs:///file1</command>
  14452. </test-commands>
  14453. <cleanup-commands>
  14454. <command>-fs NAMENODE -rm hdfs:///file1</command>
  14455. </cleanup-commands>
  14456. <comparators>
  14457. <comparator>
  14458. <type>RegexpComparator</type>
  14459. <expected-output>^-chgrp: '%' does not match expected pattern for group</expected-output>
  14460. </comparator>
  14461. </comparators>
  14462. </test>
  14463. <!-- Tests for chgrp -->
  14464. <test> <!-- TESTED -->
  14465. <description>chgrp: change group of file in Namenode's path</description>
  14466. <test-commands>
  14467. <command>-fs NAMENODE -touchz NAMENODE/file1</command>
  14468. <command>-fs NAMENODE -chgrp newgroup NAMENODE/file1</command>
  14469. <command>-fs NAMENODE -ls NAMENODE/file1</command>
  14470. </test-commands>
  14471. <cleanup-commands>
  14472. <command>-fs NAMENODE -rm NAMENODE/file1</command>
  14473. </cleanup-commands>
  14474. <comparators>
  14475. <comparator>
  14476. <type>RegexpComparator</type>
  14477. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/file1</expected-output>
  14478. </comparator>
  14479. </comparators>
  14480. </test>
  14481. <test> <!-- TESTED -->
  14482. <description>chgrp: change group of directory in Namenode's path</description>
  14483. <test-commands>
  14484. <command>-fs NAMENODE -mkdir NAMENODE/dir0</command>
  14485. <command>-fs NAMENODE -mkdir NAMENODE/dir0/dir1</command>
  14486. <command>-fs NAMENODE -touchz NAMENODE/dir0/file0</command>
  14487. <command>-fs NAMENODE -touchz NAMENODE/dir0/dir1/file1</command>
  14488. <command>-fs NAMENODE -touchz NAMENODE/dir0/dir1/file2</command>
  14489. <command>-fs NAMENODE -chgrp newgroup NAMENODE/dir0/dir1</command>
  14490. <command>-fs NAMENODE -ls -R NAMENODE/dir0</command>
  14491. </test-commands>
  14492. <cleanup-commands>
  14493. <command>-fs NAMENODE -rm -r NAMENODE/dir0</command>
  14494. </cleanup-commands>
  14495. <comparators>
  14496. <comparator>
  14497. <type>RegexpComparator</type>
  14498. <expected-output>^drwxr-xr-x( )*-( )*USERNAME( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir0/dir1</expected-output>
  14499. </comparator>
  14500. <comparator>
  14501. <type>RegexpComparator</type>
  14502. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir0/dir1/file1</expected-output>
  14503. </comparator>
  14504. <comparator>
  14505. <type>RegexpComparator</type>
  14506. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir0/dir1/file2</expected-output>
  14507. </comparator>
  14508. <comparator>
  14509. <type>RegexpComparator</type>
  14510. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir0/file0</expected-output>
  14511. </comparator>
  14512. </comparators>
  14513. </test>
  14514. <test> <!-- TESTED -->
  14515. <description>chgrp: change group of directory in Namenode's path recursively </description>
  14516. <test-commands>
  14517. <command>-fs NAMENODE -mkdir NAMENODE/dir0</command>
  14518. <command>-fs NAMENODE -mkdir NAMENODE/dir0/dir1</command>
  14519. <command>-fs NAMENODE -touchz NAMENODE/dir0/file0</command>
  14520. <command>-fs NAMENODE -touchz NAMENODE/dir0/dir1/file1</command>
  14521. <command>-fs NAMENODE -touchz NAMENODE/dir0/dir1/file2</command>
  14522. <command>-fs NAMENODE -chgrp -R newgroup NAMENODE/dir0/dir1</command>
  14523. <command>-fs NAMENODE -ls -R NAMENODE/dir0</command>
  14524. </test-commands>
  14525. <cleanup-commands>
  14526. <command>-fs NAMENODE -rm -r NAMENODE/dir0</command>
  14527. </cleanup-commands>
  14528. <comparators>
  14529. <comparator>
  14530. <type>RegexpComparator</type>
  14531. <expected-output>^drwxr-xr-x( )*-( )*USERNAME( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir0/dir1</expected-output>
  14532. </comparator>
  14533. <comparator>
  14534. <type>RegexpComparator</type>
  14535. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir0/dir1/file1</expected-output>
  14536. </comparator>
  14537. <comparator>
  14538. <type>RegexpComparator</type>
  14539. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir0/dir1/file2</expected-output>
  14540. </comparator>
  14541. <comparator>
  14542. <type>RegexpComparator</type>
  14543. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir0/file0</expected-output>
  14544. </comparator>
  14545. </comparators>
  14546. </test>
  14547. <test> <!-- TESTED -->
  14548. <description>chgrp: change group of non existent file in Namenode's path</description>
  14549. <test-commands>
  14550. <command>-fs NAMENODE -chgrp newgroup NAMENODE/file1</command>
  14551. </test-commands>
  14552. <cleanup-commands>
  14553. <command>-fs NAMENODE -rm NAMENODE/file1</command>
  14554. </cleanup-commands>
  14555. <comparators>
  14556. <comparator>
  14557. <type>RegexpComparator</type>
  14558. <expected-output>^chgrp: `NAMENODE/file1': No such file or directory</expected-output>
  14559. </comparator>
  14560. </comparators>
  14561. </test>
  14562. <test> <!-- TESTED -->
  14563. <description>chgrp: change group of multiple files in Namenode's path using globbing</description>
  14564. <test-commands>
  14565. <command>-fs NAMENODE -touchz NAMENODE/file1</command>
  14566. <command>-fs NAMENODE -touchz NAMENODE/file2</command>
  14567. <command>-fs NAMENODE -touchz NAMENODE/file3</command>
  14568. <command>-fs NAMENODE -touchz NAMENODE/file4</command>
  14569. <command>-fs NAMENODE -chgrp newgroup NAMENODE/file* </command>
  14570. <command>-fs NAMENODE -ls -R NAMENODE/file*</command>
  14571. </test-commands>
  14572. <cleanup-commands>
  14573. <command>-fs NAMENODE -rm NAMENODE/file*</command>
  14574. </cleanup-commands>
  14575. <comparators>
  14576. <comparator>
  14577. <type>RegexpComparator</type>
  14578. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/file1</expected-output>
  14579. </comparator>
  14580. <comparator>
  14581. <type>RegexpComparator</type>
  14582. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/file2</expected-output>
  14583. </comparator>
  14584. <comparator>
  14585. <type>RegexpComparator</type>
  14586. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/file3</expected-output>
  14587. </comparator>
  14588. <comparator>
  14589. <type>RegexpComparator</type>
  14590. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/file4</expected-output>
  14591. </comparator>
  14592. </comparators>
  14593. </test>
  14594. <test> <!-- TESTED -->
  14595. <description>chgrp: change group of multiple directories in Namenode's path using globbing</description>
  14596. <test-commands>
  14597. <command>-fs NAMENODE -mkdir NAMENODE/dir0</command>
  14598. <command>-fs NAMENODE -mkdir NAMENODE/dir0/dir1</command>
  14599. <command>-fs NAMENODE -touchz NAMENODE/dir0/file0</command>
  14600. <command>-fs NAMENODE -touchz NAMENODE/dir0/dir1/file1</command>
  14601. <command>-fs NAMENODE -touchz NAMENODE/dir0/dir1/file2</command>
  14602. <command>-fs NAMENODE -mkdir NAMENODE/dir2</command>
  14603. <command>-fs NAMENODE -mkdir NAMENODE/dir2/dir1</command>
  14604. <command>-fs NAMENODE -touchz NAMENODE/dir2/file0</command>
  14605. <command>-fs NAMENODE -touchz NAMENODE/dir2/dir1/file1</command>
  14606. <command>-fs NAMENODE -touchz NAMENODE/dir2/dir1/file2</command>
  14607. <command>-fs NAMENODE -chgrp newgroup NAMENODE/dir*</command>
  14608. <command>-fs NAMENODE -ls -R NAMENODE/dir*</command>
  14609. </test-commands>
  14610. <cleanup-commands>
  14611. <command>-fs NAMENODE -rm -r NAMENODE/dir*</command>
  14612. </cleanup-commands>
  14613. <comparators>
  14614. <comparator>
  14615. <type>RegexpComparator</type>
  14616. <expected-output>^drwxr-xr-x( )*-( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir0/dir1</expected-output>
  14617. </comparator>
  14618. <comparator>
  14619. <type>RegexpComparator</type>
  14620. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir0/dir1/file1</expected-output>
  14621. </comparator>
  14622. <comparator>
  14623. <type>RegexpComparator</type>
  14624. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir0/dir1/file2</expected-output>
  14625. </comparator>
  14626. <comparator>
  14627. <type>RegexpComparator</type>
  14628. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir0/file0</expected-output>
  14629. </comparator>
  14630. <comparator>
  14631. <type>RegexpComparator</type>
  14632. <expected-output>^drwxr-xr-x( )*-( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir2/dir1</expected-output>
  14633. </comparator>
  14634. <comparator>
  14635. <type>RegexpComparator</type>
  14636. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir2/dir1/file1</expected-output>
  14637. </comparator>
  14638. <comparator>
  14639. <type>RegexpComparator</type>
  14640. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir2/dir1/file2</expected-output>
  14641. </comparator>
  14642. <comparator>
  14643. <type>RegexpComparator</type>
  14644. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir2/file0</expected-output>
  14645. </comparator>
  14646. </comparators>
  14647. </test>
  14648. <test> <!-- TESTED -->
  14649. <description>chgrp: change of multiple files in Namenode's path without globbing</description>
  14650. <test-commands>
  14651. <command>-fs NAMENODE -touchz NAMENODE/file1</command>
  14652. <command>-fs NAMENODE -touchz NAMENODE/file2</command>
  14653. <command>-fs NAMENODE -touchz NAMENODE/file3</command>
  14654. <command>-fs NAMENODE -touchz NAMENODE/file4</command>
  14655. <command>-fs NAMENODE -chgrp newgroup NAMENODE/file1 NAMENODE/file2 NAMENODE/file3 NAMENODE/file4 </command>
  14656. <command>-fs NAMENODE -ls -R NAMENODE/file*</command>
  14657. </test-commands>
  14658. <cleanup-commands>
  14659. <command>-fs NAMENODE -rm NAMENODE/file*</command>
  14660. </cleanup-commands>
  14661. <comparators>
  14662. <comparator>
  14663. <type>RegexpComparator</type>
  14664. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/file1</expected-output>
  14665. </comparator>
  14666. <comparator>
  14667. <type>RegexpComparator</type>
  14668. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/file2</expected-output>
  14669. </comparator>
  14670. <comparator>
  14671. <type>RegexpComparator</type>
  14672. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/file3</expected-output>
  14673. </comparator>
  14674. <comparator>
  14675. <type>RegexpComparator</type>
  14676. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/file4</expected-output>
  14677. </comparator>
  14678. </comparators>
  14679. </test>
  14680. <test> <!-- TESTED -->
  14681. <description>chgrp: change group of multiple directories in Namenode's path without globbing</description>
  14682. <test-commands>
  14683. <command>-fs NAMENODE -mkdir NAMENODE/dir0</command>
  14684. <command>-fs NAMENODE -mkdir NAMENODE/dir0/dir1</command>
  14685. <command>-fs NAMENODE -touchz NAMENODE/dir0/file0</command>
  14686. <command>-fs NAMENODE -touchz NAMENODE/dir0/dir1/file1</command>
  14687. <command>-fs NAMENODE -touchz NAMENODE/dir0/dir1/file2</command>
  14688. <command>-fs NAMENODE -mkdir NAMENODE/dir2</command>
  14689. <command>-fs NAMENODE -mkdir NAMENODE/dir2/dir1</command>
  14690. <command>-fs NAMENODE -touchz NAMENODE/dir2/file0</command>
  14691. <command>-fs NAMENODE -touchz NAMENODE/dir2/dir1/file1</command>
  14692. <command>-fs NAMENODE -touchz NAMENODE/dir2/dir1/file2</command>
  14693. <command>-fs NAMENODE -chgrp newgroup NAMENODE/dir0 NAMENODE/dir2</command>
  14694. <command>-fs NAMENODE -ls -R NAMENODE/dir*</command>
  14695. </test-commands>
  14696. <cleanup-commands>
  14697. <command>-fs NAMENODE -rm -r NAMENODE/dir*</command>
  14698. </cleanup-commands>
  14699. <comparators>
  14700. <comparator>
  14701. <type>RegexpComparator</type>
  14702. <expected-output>^drwxr-xr-x( )*-( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir0/dir1</expected-output>
  14703. </comparator>
  14704. <comparator>
  14705. <type>RegexpComparator</type>
  14706. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir0/dir1/file1</expected-output>
  14707. </comparator>
  14708. <comparator>
  14709. <type>RegexpComparator</type>
  14710. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir0/dir1/file2</expected-output>
  14711. </comparator>
  14712. <comparator>
  14713. <type>RegexpComparator</type>
  14714. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir0/file0</expected-output>
  14715. </comparator>
  14716. <comparator>
  14717. <type>RegexpComparator</type>
  14718. <expected-output>^drwxr-xr-x( )*-( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir2/dir1</expected-output>
  14719. </comparator>
  14720. <comparator>
  14721. <type>RegexpComparator</type>
  14722. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir2/dir1/file1</expected-output>
  14723. </comparator>
  14724. <comparator>
  14725. <type>RegexpComparator</type>
  14726. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir2/dir1/file2</expected-output>
  14727. </comparator>
  14728. <comparator>
  14729. <type>RegexpComparator</type>
  14730. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir2/file0</expected-output>
  14731. </comparator>
  14732. </comparators>
  14733. </test>
  14734. <test> <!-- TESTED -->
  14735. <description>chgrp: change group of multiple directories recursively in Namenode's path using globbing</description>
  14736. <test-commands>
  14737. <command>-fs NAMENODE -mkdir NAMENODE/dir0</command>
  14738. <command>-fs NAMENODE -mkdir NAMENODE/dir0/dir1</command>
  14739. <command>-fs NAMENODE -touchz NAMENODE/dir0/file0</command>
  14740. <command>-fs NAMENODE -touchz NAMENODE/dir0/dir1/file1</command>
  14741. <command>-fs NAMENODE -touchz NAMENODE/dir0/dir1/file2</command>
  14742. <command>-fs NAMENODE -mkdir NAMENODE/dir2</command>
  14743. <command>-fs NAMENODE -mkdir NAMENODE/dir2/dir1</command>
  14744. <command>-fs NAMENODE -touchz NAMENODE/dir2/file0</command>
  14745. <command>-fs NAMENODE -touchz NAMENODE/dir2/dir1/file1</command>
  14746. <command>-fs NAMENODE -touchz NAMENODE/dir2/dir1/file2</command>
  14747. <command>-fs NAMENODE -chgrp -R newgroup NAMENODE/dir*</command>
  14748. <command>-fs NAMENODE -ls -R NAMENODE/dir*</command>
  14749. </test-commands>
  14750. <cleanup-commands>
  14751. <command>-fs NAMENODE -rm -r NAMENODE/dir*</command>
  14752. </cleanup-commands>
  14753. <comparators>
  14754. <comparator>
  14755. <type>RegexpComparator</type>
  14756. <expected-output>^drwxr-xr-x( )*-( )*USERNAME( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir0/dir1</expected-output>
  14757. </comparator>
  14758. <comparator>
  14759. <type>RegexpComparator</type>
  14760. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir0/dir1/file1</expected-output>
  14761. </comparator>
  14762. <comparator>
  14763. <type>RegexpComparator</type>
  14764. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir0/dir1/file2</expected-output>
  14765. </comparator>
  14766. <comparator>
  14767. <type>RegexpComparator</type>
  14768. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir0/file0</expected-output>
  14769. </comparator>
  14770. <comparator>
  14771. <type>RegexpComparator</type>
  14772. <expected-output>^drwxr-xr-x( )*-( )*USERNAME( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir2/dir1</expected-output>
  14773. </comparator>
  14774. <comparator>
  14775. <type>RegexpComparator</type>
  14776. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir2/dir1/file1</expected-output>
  14777. </comparator>
  14778. <comparator>
  14779. <type>RegexpComparator</type>
  14780. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir2/dir1/file2</expected-output>
  14781. </comparator>
  14782. <comparator>
  14783. <type>RegexpComparator</type>
  14784. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir2/file0</expected-output>
  14785. </comparator>
  14786. </comparators>
  14787. </test>
  14788. <test> <!-- TESTED -->
  14789. <description>chgrp: change group of multiple directories recursively in Namenode's path without globbing</description>
  14790. <test-commands>
  14791. <command>-fs NAMENODE -mkdir NAMENODE/dir0</command>
  14792. <command>-fs NAMENODE -mkdir NAMENODE/dir0/dir1</command>
  14793. <command>-fs NAMENODE -touchz NAMENODE/dir0/file0</command>
  14794. <command>-fs NAMENODE -touchz NAMENODE/dir0/dir1/file1</command>
  14795. <command>-fs NAMENODE -touchz NAMENODE/dir0/dir1/file2</command>
  14796. <command>-fs NAMENODE -mkdir NAMENODE/dir2</command>
  14797. <command>-fs NAMENODE -mkdir NAMENODE/dir2/dir1</command>
  14798. <command>-fs NAMENODE -touchz NAMENODE/dir2/file0</command>
  14799. <command>-fs NAMENODE -touchz NAMENODE/dir2/dir1/file1</command>
  14800. <command>-fs NAMENODE -touchz NAMENODE/dir2/dir1/file2</command>
  14801. <command>-fs NAMENODE -chgrp -R newgroup NAMENODE/dir0 NAMENODE/dir2</command>
  14802. <command>-fs NAMENODE -ls -R NAMENODE/dir*</command>
  14803. </test-commands>
  14804. <cleanup-commands>
  14805. <command>-fs NAMENODE -rm -r NAMENODE/dir*</command>
  14806. </cleanup-commands>
  14807. <comparators>
  14808. <comparator>
  14809. <type>RegexpComparator</type>
  14810. <expected-output>^drwxr-xr-x( )*-( )*USERNAME( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir0/dir1</expected-output>
  14811. </comparator>
  14812. <comparator>
  14813. <type>RegexpComparator</type>
  14814. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir0/dir1/file1</expected-output>
  14815. </comparator>
  14816. <comparator>
  14817. <type>RegexpComparator</type>
  14818. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir0/dir1/file2</expected-output>
  14819. </comparator>
  14820. <comparator>
  14821. <type>RegexpComparator</type>
  14822. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir0/file0</expected-output>
  14823. </comparator>
  14824. <comparator>
  14825. <type>RegexpComparator</type>
  14826. <expected-output>^drwxr-xr-x( )*-( )*USERNAME( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir2/dir1</expected-output>
  14827. </comparator>
  14828. <comparator>
  14829. <type>RegexpComparator</type>
  14830. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir2/dir1/file1</expected-output>
  14831. </comparator>
  14832. <comparator>
  14833. <type>RegexpComparator</type>
  14834. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir2/dir1/file2</expected-output>
  14835. </comparator>
  14836. <comparator>
  14837. <type>RegexpComparator</type>
  14838. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir2/file0</expected-output>
  14839. </comparator>
  14840. </comparators>
  14841. </test>
  14842. <test> <!-- TESTED -->
  14843. <description>chgrp: invalid option for group of file in Namenode's path</description>
  14844. <test-commands>
  14845. <command>-fs NAMENODE -touchz NAMENODE/file1</command>
  14846. <command>-fs NAMENODE -chgrp % NAMENODE/file1</command>
  14847. </test-commands>
  14848. <cleanup-commands>
  14849. <command>-fs NAMENODE -rm NAMENODE/file1</command>
  14850. </cleanup-commands>
  14851. <comparators>
  14852. <comparator>
  14853. <type>RegexpComparator</type>
  14854. <expected-output>^-chgrp: '%' does not match expected pattern for group</expected-output>
  14855. </comparator>
  14856. </comparators>
  14857. </test>
  14858. <test> <!--Tested -->
  14859. <description>help: help for dfsadmin report</description>
  14860. <test-commands>
  14861. <dfs-admin-command>-fs NAMENODE -help report</dfs-admin-command>
  14862. </test-commands>
  14863. <cleanup-commands>
  14864. </cleanup-commands>
  14865. <comparators>
  14866. <comparator>
  14867. <type>RegexpComparator</type>
  14868. <expected-output>^-report \[-live\] \[-dead\] \[-decommissioning\]:(.)*</expected-output>
  14869. </comparator>
  14870. <comparator>
  14871. <type>RegexpComparator</type>
  14872. <expected-output>^[ \t]*Reports basic filesystem information and statistics.( )*</expected-output>
  14873. </comparator>
  14874. </comparators>
  14875. </test>
  14876. <test> <!--Tested -->
  14877. <description>help: help for dfsadmin safemode</description>
  14878. <test-commands>
  14879. <dfs-admin-command>-fs NAMENODE -help safemode</dfs-admin-command>
  14880. </test-commands>
  14881. <cleanup-commands>
  14882. </cleanup-commands>
  14883. <comparators>
  14884. <comparator>
  14885. <type>RegexpComparator</type>
  14886. <expected-output>^-safemode &lt;enter\|leave\|get\|wait&gt;:( |\t)*Safe mode maintenance command.( )*</expected-output>
  14887. </comparator>
  14888. <comparator>
  14889. <type>RegexpComparator</type>
  14890. <expected-output>^( |\t)*Safe mode is a Namenode state in which it( )*</expected-output>
  14891. </comparator>
  14892. <comparator>
  14893. <type>RegexpComparator</type>
  14894. <expected-output>^( |\t)*1.( )*does not accept changes to the name space \(read-only\)( )*</expected-output>
  14895. </comparator>
  14896. <comparator>
  14897. <type>RegexpComparator</type>
  14898. <expected-output>^( |\t)*2.( )*does not replicate or delete blocks.( )*</expected-output>
  14899. </comparator>
  14900. <comparator>
  14901. <type>RegexpComparator</type>
  14902. <expected-output>^( |\t)*Safe mode is entered automatically at Namenode startup, and( )*</expected-output>
  14903. </comparator>
  14904. <comparator>
  14905. <type>RegexpComparator</type>
  14906. <expected-output>^( |\t)*leaves safe mode automatically when the configured minimum( )*</expected-output>
  14907. </comparator>
  14908. <comparator>
  14909. <type>RegexpComparator</type>
  14910. <expected-output>^( |\t)*percentage of blocks satisfies the minimum replication( )*</expected-output>
  14911. </comparator>
  14912. <comparator>
  14913. <type>RegexpComparator</type>
  14914. <expected-output>^( |\t)*condition. Safe mode can also be entered manually, but then( )*</expected-output>
  14915. </comparator>
  14916. <comparator>
  14917. <type>RegexpComparator</type>
  14918. <expected-output>^( |\t)*it can only be turned off manually as well.( )*</expected-output>
  14919. </comparator>
  14920. </comparators>
  14921. </test>
  14922. <test> <!--Tested -->
  14923. <description>help: help for dfsadmin refreshNodes</description>
  14924. <test-commands>
  14925. <dfs-admin-command>-fs NAMENODE -help refreshNodes</dfs-admin-command>
  14926. </test-commands>
  14927. <cleanup-commands>
  14928. </cleanup-commands>
  14929. <comparators>
  14930. <comparator>
  14931. <type>RegexpComparator</type>
  14932. <expected-output>^-refreshNodes:( |\t)*Updates the namenode with the set of datanodes allowed to connect to the namenode.( )*</expected-output>
  14933. </comparator>
  14934. <comparator>
  14935. <type>RegexpComparator</type>
  14936. <expected-output>^( |\t)*Namenode re-reads datanode hostnames from the file defined by( )*</expected-output>
  14937. </comparator>
  14938. <comparator>
  14939. <type>RegexpComparator</type>
  14940. <expected-output>^( |\t)*dfs.hosts, dfs.hosts.exclude configuration parameters.( )*</expected-output>
  14941. </comparator>
  14942. <comparator>
  14943. <type>RegexpComparator</type>
  14944. <expected-output>^( |\t)*Hosts defined in dfs.hosts are the datanodes that are part of( )*</expected-output>
  14945. </comparator>
  14946. <comparator>
  14947. <type>RegexpComparator</type>
  14948. <expected-output>^( |\t)*the cluster. If there are entries in dfs.hosts, only the hosts( )*</expected-output>
  14949. </comparator>
  14950. <comparator>
  14951. <type>RegexpComparator</type>
  14952. <expected-output>^( |\t)*in it are allowed to register with the namenode.( )*</expected-output>
  14953. </comparator>
  14954. <comparator>
  14955. <type>RegexpComparator</type>
  14956. <expected-output>^( |\t)*Entries in dfs.hosts.exclude are datanodes that need to be( )*</expected-output>
  14957. </comparator>
  14958. <comparator>
  14959. <type>RegexpComparator</type>
  14960. <expected-output>^( |\t)*decommissioned. Datanodes complete decommissioning when ( )*</expected-output>
  14961. </comparator>
  14962. <comparator>
  14963. <type>RegexpComparator</type>
  14964. <expected-output>^( |\t)*all the replicas from them are replicated to other datanodes.( )*</expected-output>
  14965. </comparator>
  14966. <comparator>
  14967. <type>RegexpComparator</type>
  14968. <expected-output>^( |\t)*Decommissioned nodes are not automatically shutdown and( )*</expected-output>
  14969. </comparator>
  14970. <comparator>
  14971. <type>RegexpComparator</type>
  14972. <expected-output>^( |\t)*are not chosen for writing new replicas.( )*</expected-output>
  14973. </comparator>
  14974. </comparators>
  14975. </test>
  14976. <test> <!--Tested -->
  14977. <description>help: help for dfsadmin finalizeUpgrade</description>
  14978. <test-commands>
  14979. <dfs-admin-command>-fs NAMENODE -help finalizeUpgrade</dfs-admin-command>
  14980. </test-commands>
  14981. <cleanup-commands>
  14982. </cleanup-commands>
  14983. <comparators>
  14984. <comparator>
  14985. <type>RegexpComparator</type>
  14986. <expected-output>^-finalizeUpgrade:( )*Finalize upgrade of HDFS.( )*</expected-output>
  14987. </comparator>
  14988. <comparator>
  14989. <type>RegexpComparator</type>
  14990. <expected-output>^( |\t)*Datanodes delete their previous version working directories,( )*</expected-output>
  14991. </comparator>
  14992. <comparator>
  14993. <type>RegexpComparator</type>
  14994. <expected-output>^( |\t)*followed by Namenode doing the same.( )*</expected-output>
  14995. </comparator>
  14996. <comparator>
  14997. <type>RegexpComparator</type>
  14998. <expected-output>^( |\t)*This completes the upgrade process.( )*</expected-output>
  14999. </comparator>
  15000. </comparators>
  15001. </test>
  15002. <test> <!--Tested -->
  15003. <description>help: help for dfsadmin metasave</description>
  15004. <test-commands>
  15005. <dfs-admin-command>-fs NAMENODE -help metasave</dfs-admin-command>
  15006. </test-commands>
  15007. <cleanup-commands>
  15008. </cleanup-commands>
  15009. <comparators>
  15010. <comparator>
  15011. <type>RegexpComparator</type>
  15012. <expected-output>^-metasave &lt;filename&gt;:( |\t)*Save Namenode's primary data structures( )*</expected-output>
  15013. </comparator>
  15014. <comparator>
  15015. <type>RegexpComparator</type>
  15016. <expected-output>^( |\t)*to &lt;filename&gt; in the directory specified by hadoop.log.dir property.( )*</expected-output>
  15017. </comparator>
  15018. <comparator>
  15019. <type>RegexpComparator</type>
  15020. <expected-output>^( |\t)*&lt;filename&gt; will contain one line for each of the following( )*</expected-output>
  15021. </comparator>
  15022. <comparator>
  15023. <type>RegexpComparator</type>
  15024. <expected-output>^( |\t)*1. Datanodes heart beating with Namenode( )*</expected-output>
  15025. </comparator>
  15026. <comparator>
  15027. <type>RegexpComparator</type>
  15028. <expected-output>^( |\t)*2. Blocks waiting to be replicated( )*</expected-output>
  15029. </comparator>
  15030. <comparator>
  15031. <type>RegexpComparator</type>
  15032. <expected-output>^( |\t)*3. Blocks currrently being replicated( )*</expected-output>
  15033. </comparator>
  15034. <comparator>
  15035. <type>RegexpComparator</type>
  15036. <expected-output>^( |\t)*4. Blocks waiting to be deleted( )*</expected-output>
  15037. </comparator>
  15038. </comparators>
  15039. </test>
  15040. <test> <!--Tested -->
  15041. <description>help: help for dfsadmin setQuota</description>
  15042. <test-commands>
  15043. <dfs-admin-command>-fs NAMENODE -help setQuota</dfs-admin-command>
  15044. </test-commands>
  15045. <cleanup-commands>
  15046. </cleanup-commands>
  15047. <comparators>
  15048. <comparator>
  15049. <type>RegexpComparator</type>
  15050. <expected-output>^-setQuota &lt;quota&gt; &lt;dirname&gt;...&lt;dirname&gt;: Set the quota &lt;quota&gt; for each directory &lt;dirName&gt;.( )*</expected-output>
  15051. </comparator>
  15052. <comparator>
  15053. <type>RegexpComparator</type>
  15054. <expected-output>^( |\t)*The directory quota is a long integer that puts a hard limit( )*</expected-output>
  15055. </comparator>
  15056. <comparator>
  15057. <type>RegexpComparator</type>
  15058. <expected-output>^( |\t)*on the number of names in the directory tree( )*</expected-output>
  15059. </comparator>
  15060. <comparator>
  15061. <type>RegexpComparator</type>
  15062. <expected-output>^( |\t)*For each directory, attempt to set the quota. An error will be reported if( )*</expected-output>
  15063. </comparator>
  15064. <comparator>
  15065. <type>RegexpComparator</type>
  15066. <expected-output>^( |\t)*1. N is not a positive integer, or( )*</expected-output>
  15067. </comparator>
  15068. <comparator>
  15069. <type>RegexpComparator</type>
  15070. <expected-output>^( |\t)*2. User is not an administrator, or( )*</expected-output>
  15071. </comparator>
  15072. <comparator>
  15073. <type>RegexpComparator</type>
  15074. <expected-output>^( |\t)*3. The directory does not exist or is a file.( )*</expected-output>
  15075. </comparator>
  15076. </comparators>
  15077. </test>
  15078. <test> <!--Tested -->
  15079. <description>help: help for dfsadmin clrQuota</description>
  15080. <test-commands>
  15081. <dfs-admin-command>-fs NAMENODE -help clrQuota</dfs-admin-command>
  15082. </test-commands>
  15083. <cleanup-commands>
  15084. </cleanup-commands>
  15085. <comparators>
  15086. <comparator>
  15087. <type>RegexpComparator</type>
  15088. <expected-output>^-clrQuota &lt;dirname&gt;...&lt;dirname&gt;: Clear the quota for each directory &lt;dirName&gt;.( )*</expected-output>
  15089. </comparator>
  15090. <comparator>
  15091. <type>RegexpComparator</type>
  15092. <expected-output>^( |\t)*For each directory, attempt to clear the quota. An error will be reported if( )*</expected-output>
  15093. </comparator>
  15094. <comparator>
  15095. <type>RegexpComparator</type>
  15096. <expected-output>^( |\t)*1. the directory does not exist or is a file, or( )*</expected-output>
  15097. </comparator>
  15098. <comparator>
  15099. <type>RegexpComparator</type>
  15100. <expected-output>^( |\t)*2. user is not an administrator.( )*</expected-output>
  15101. </comparator>
  15102. <comparator>
  15103. <type>RegexpComparator</type>
  15104. <expected-output>^( |\t)*It does not fault if the directory has no quota.( )*</expected-output>
  15105. </comparator>
  15106. </comparators>
  15107. </test>
  15108. <test> <!--Tested -->
  15109. <description>help: help for dfsadmin setSpaceQuota</description>
  15110. <test-commands>
  15111. <dfs-admin-command>-fs NAMENODE -help setSpaceQuota</dfs-admin-command>
  15112. </test-commands>
  15113. <cleanup-commands>
  15114. </cleanup-commands>
  15115. <comparators>
  15116. <comparator>
  15117. <type>RegexpComparator</type>
  15118. <expected-output>^-setSpaceQuota &lt;quota&gt; &lt;dirname&gt;...&lt;dirname&gt; -storageType &lt;storagetype&gt;: Set the disk space quota &lt;quota&gt; for each directory &lt;dirName&gt;.( )*</expected-output>
  15119. </comparator>
  15120. <comparator>
  15121. <type>RegexpComparator</type>
  15122. <expected-output>^( |\t)*The space quota is a long integer that puts a hard limit( )*</expected-output>
  15123. </comparator>
  15124. <comparator>
  15125. <type>RegexpComparator</type>
  15126. <expected-output>^( |\t)*on the total size of all the files under the directory tree.( )*</expected-output>
  15127. </comparator>
  15128. <comparator>
  15129. <type>RegexpComparator</type>
  15130. <expected-output>^( |\t)*2. user is not an administrator, or( )*</expected-output>
  15131. </comparator>
  15132. <comparator>
  15133. <type>RegexpComparator</type>
  15134. <expected-output>^( |\t)*3. the directory does not exist or is a file.( )*</expected-output>
  15135. </comparator>
  15136. <comparator>
  15137. <type>RegexpComparator</type>
  15138. <expected-output>^( |\t)*The storage type specific quota is set when -storageType option is specified.( )*</expected-output>
  15139. </comparator>
  15140. </comparators>
  15141. </test>
  15142. <test> <!--Tested -->
  15143. <description>help: help for dfsadmin clrSpaceQuota</description>
  15144. <test-commands>
  15145. <dfs-admin-command>-fs NAMENODE -help clrSpaceQuota</dfs-admin-command>
  15146. </test-commands>
  15147. <cleanup-commands>
  15148. </cleanup-commands>
  15149. <comparators>
  15150. <comparator>
  15151. <type>RegexpComparator</type>
  15152. <expected-output>^-clrSpaceQuota &lt;dirname&gt;...&lt;dirname&gt; -storageType &lt;storagetype&gt;: Clear the disk space quota for each directory &lt;dirName&gt;.( )*</expected-output>
  15153. </comparator>
  15154. <comparator>
  15155. <type>RegexpComparator</type>
  15156. <expected-output>^( |\t)*For each directory, attempt to clear the quota. An error will be reported if( )*</expected-output>
  15157. </comparator>
  15158. <comparator>
  15159. <type>RegexpComparator</type>
  15160. <expected-output>^( |\t)*1. the directory does not exist or is a file, or( )*</expected-output>
  15161. </comparator>
  15162. <comparator>
  15163. <type>RegexpComparator</type>
  15164. <expected-output>^( |\t)*2. user is not an administrator.( )*</expected-output>
  15165. </comparator>
  15166. <comparator>
  15167. <type>RegexpComparator</type>
  15168. <expected-output>^( |\t)*It does not fault if the directory has no quota.( )*</expected-output>
  15169. </comparator>
  15170. <comparator>
  15171. <type>RegexpComparator</type>
  15172. <expected-output>^( |\t)*The storage type specific quota is cleared when -storageType option is specified.( )*</expected-output>
  15173. </comparator>
  15174. </comparators>
  15175. </test>
  15176. <test> <!--Tested -->
  15177. <description>help: help for dfsadmin refreshServiceAcl</description>
  15178. <test-commands>
  15179. <dfs-admin-command>-fs NAMENODE -help refreshServiceAcl</dfs-admin-command>
  15180. </test-commands>
  15181. <cleanup-commands>
  15182. </cleanup-commands>
  15183. <comparators>
  15184. <comparator>
  15185. <type>RegexpComparator</type>
  15186. <expected-output>^-refreshServiceAcl: Reload the service-level authorization policy file( )*</expected-output>
  15187. </comparator>
  15188. <comparator>
  15189. <type>RegexpComparator</type>
  15190. <expected-output>^( |\t)*Namenode will reload the authorization policy file.( )*</expected-output>
  15191. </comparator>
  15192. </comparators>
  15193. </test>
  15194. <test> <!--Tested -->
  15195. <description>help: help for dfsadmin help</description>
  15196. <test-commands>
  15197. <dfs-admin-command>-fs NAMENODE -help help</dfs-admin-command>
  15198. </test-commands>
  15199. <cleanup-commands>
  15200. </cleanup-commands>
  15201. <comparators>
  15202. <comparator>
  15203. <type>RegexpComparator</type>
  15204. <expected-output>^-help \[cmd\]:( |\t)*Displays help for the given command or all commands if none( )*</expected-output>
  15205. </comparator>
  15206. <comparator>
  15207. <type>RegexpComparator</type>
  15208. <expected-output>^( |\t)*is specified.( )*</expected-output>
  15209. </comparator>
  15210. </comparators>
  15211. </test>
  15212. <test> <!--Tested -->
  15213. <description>verifying error messages for quota commands - setting quota on a file</description>
  15214. <test-commands>
  15215. <command>-fs NAMENODE -mkdir /test </command>
  15216. <command>-fs NAMENODE -touchz /test/file1 </command>
  15217. <dfs-admin-command>-fs NAMENODE -setQuota 1 /test/file1 </dfs-admin-command>
  15218. </test-commands>
  15219. <cleanup-commands>
  15220. <dfs-admin-command>-fs NAMENODE -setQuota 5 /test </dfs-admin-command>
  15221. <!-- Same directory will be used in the next test -->
  15222. </cleanup-commands>
  15223. <comparators>
  15224. <comparator>
  15225. <type>SubstringComparator</type>
  15226. <expected-output>setQuota: `/test/file1': Is not a directory</expected-output>
  15227. </comparator>
  15228. </comparators>
  15229. </test>
  15230. <test> <!--Tested -->
  15231. <description>verifying error messages for quota commands - setting quota on non-existing file</description>
  15232. <test-commands>
  15233. <dfs-admin-command>-fs NAMENODE -setSpaceQuota 1g /test1 </dfs-admin-command>
  15234. </test-commands>
  15235. <cleanup-commands>
  15236. <!-- Same directory will be used in the next test -->
  15237. </cleanup-commands>
  15238. <comparators>
  15239. <comparator>
  15240. <type>SubstringComparator</type>
  15241. <expected-output>setSpaceQuota: Directory does not exist: /test1</expected-output>
  15242. </comparator>
  15243. </comparators>
  15244. </test>
  15245. <test> <!--Tested -->
  15246. <description>verifying error messages for quota commands - exceeding quota</description>
  15247. <test-commands>
  15248. <dfs-admin-command>-fs NAMENODE -setQuota 3 /test </dfs-admin-command>
  15249. <command>-fs NAMENODE -touchz /test/file0 </command>
  15250. <command>-fs NAMENODE -mkdir /test/test1 </command>
  15251. </test-commands>
  15252. <cleanup-commands>
  15253. <!-- Same directory(/test) will be used in the next test -->
  15254. </cleanup-commands>
  15255. <comparators>
  15256. <comparator>
  15257. <type>SubstringComparator</type>
  15258. <expected-output>The NameSpace quota (directories and files) of directory /test is exceeded</expected-output>
  15259. </comparator>
  15260. </comparators>
  15261. </test>
  15262. <test> <!--Tested -->
  15263. <description>verifying error messages for quota commands - setting not valid quota</description>
  15264. <test-commands>
  15265. <dfs-admin-command>-fs NAMENODE -setQuota 0 /test </dfs-admin-command>
  15266. </test-commands>
  15267. <cleanup-commands>
  15268. <!-- Same directory will be used in the next test -->
  15269. </cleanup-commands>
  15270. <comparators>
  15271. <comparator>
  15272. <type>SubstringComparator</type>
  15273. <expected-output>Invalid values for quota : 0</expected-output>
  15274. </comparator>
  15275. </comparators>
  15276. </test>
  15277. <test> <!--Tested -->
  15278. <description>verifying error messages for quota commands - setting not valid space quota</description>
  15279. <test-commands>
  15280. <dfs-admin-command>-fs NAMENODE -setSpaceQuota a5 /test </dfs-admin-command>
  15281. </test-commands>
  15282. <cleanup-commands>
  15283. <!-- Same directory will be used in the next test -->
  15284. </cleanup-commands>
  15285. <comparators>
  15286. <comparator>
  15287. <type>SubstringComparator</type>
  15288. <expected-output>setSpaceQuota: "a5" is not a valid value for a quota.</expected-output>
  15289. </comparator>
  15290. </comparators>
  15291. </test>
  15292. <test> <!--Tested -->
  15293. <description>verifying error messages for quota commands - clearQuota on non existing file</description>
  15294. <test-commands>
  15295. <dfs-admin-command>-fs NAMENODE -clrQuota /test1 </dfs-admin-command>
  15296. </test-commands>
  15297. <cleanup-commands>
  15298. <command>-fs NAMENODE -rm -r /test </command>
  15299. </cleanup-commands>
  15300. <comparators>
  15301. <comparator>
  15302. <type>SubstringComparator</type>
  15303. <expected-output>clrQuota: Directory does not exist: /test1</expected-output>
  15304. </comparator>
  15305. </comparators>
  15306. </test>
  15307. <test> <!--Tested -->
  15308. <description>verifying error messages for quota commands - using globing</description>
  15309. <test-commands>
  15310. <command>-fs NAMENODE -mkdir /dir1</command>
  15311. <command>-fs NAMENODE -mkdir /dir2</command>
  15312. <command>-fs NAMENODE -mkdir /dir3</command>
  15313. <dfs-admin-command>-fs NAMENODE -setSpaceQuota 1k /dir* </dfs-admin-command>
  15314. <command>-fs NAMENODE -put CLITEST_DATA/data15bytes /dir1/</command>
  15315. </test-commands>
  15316. <cleanup-commands>
  15317. <command>-fs NAMENODE -rm -r /dir* </command>
  15318. </cleanup-commands>
  15319. <comparators>
  15320. <comparator>
  15321. <type>RegexpComparator</type>
  15322. <expected-output>put: The DiskSpace quota of /dir1 is exceeded: quota = 1024 B = 1 KB but diskspace consumed = [0-9]+ B = [0-9.]+ [KMG]B*</expected-output>
  15323. </comparator>
  15324. </comparators>
  15325. </test>
  15326. <test> <!--Tested -->
  15327. <description>verifying error messages for quota commands - setting quota using globing</description>
  15328. <test-commands>
  15329. <command>-fs NAMENODE -mkdir /dir1</command>
  15330. <command>-fs NAMENODE -mkdir /dir2</command>
  15331. <command>-fs NAMENODE -mkdir /dir3</command>
  15332. <dfs-admin-command>-fs NAMENODE -setQuota 1 /dir* </dfs-admin-command>
  15333. <command>-fs NAMENODE -mkdir /dir1/dir4</command>
  15334. </test-commands>
  15335. <cleanup-commands>
  15336. <command>-fs NAMENODE -rm -r /dir* </command>
  15337. </cleanup-commands>
  15338. <comparators>
  15339. <comparator>
  15340. <type>SubstringComparator</type>
  15341. <expected-output>mkdir: The NameSpace quota (directories and files) of directory /dir1 is exceeded: quota=1 file count=2</expected-output>
  15342. </comparator>
  15343. </comparators>
  15344. </test>
  15345. <test> <!--Tested -->
  15346. <description>refreshServiceAcl: refreshing security authorization policy for namenode</description>
  15347. <test-commands>
  15348. <dfs-admin-command>-fs NAMENODE -refreshServiceAcl </dfs-admin-command>
  15349. </test-commands>
  15350. <cleanup-commands>
  15351. <!-- No cleanup -->
  15352. </cleanup-commands>
  15353. <comparators>
  15354. <comparator>
  15355. <type>RegexpComparator</type>
  15356. <expected-output>Refresh service acl successful(\n)*</expected-output>
  15357. </comparator>
  15358. </comparators>
  15359. </test><!--
  15360. <test> Tested
  15361. <description>refreshServiceAcl: verifying error message while refreshing security authorization policy for namenode</description>
  15362. <test-commands>
  15363. hadoop-policy.xml for tests has
  15364. security.refresh.policy.protocol.acl = ${user.name}
  15365. <dfs-admin-command>-fs NAMENODE -Dhadoop.job.ugi=blah,blah -refreshServiceAcl </dfs-admin-command>
  15366. </test-commands>
  15367. <cleanup-commands>
  15368. No cleanup
  15369. </cleanup-commands>
  15370. <comparators>
  15371. <comparator>
  15372. <type>SubstringComparator</type>
  15373. <expected-output>access denied</expected-output>
  15374. </comparator>
  15375. </comparators>
  15376. </test>
  15377. --><!-- Test for safemode -->
  15378. <test> <!-- TESTED -->
  15379. <description>safemode: Test for enter - Namenode is not in safemode</description>
  15380. <test-commands>
  15381. <dfs-admin-command>-fs NAMENODE -safemode enter</dfs-admin-command>
  15382. </test-commands>
  15383. <cleanup-commands>
  15384. <dfs-admin-command>-fs NAMENODE -safemode leave</dfs-admin-command>
  15385. </cleanup-commands>
  15386. <comparators>
  15387. <comparator>
  15388. <type>TokenComparator</type>
  15389. <expected-output>Safe mode is ON</expected-output>
  15390. </comparator>
  15391. </comparators>
  15392. </test>
  15393. <test> <!-- TESTED -->
  15394. <description>safemode: Test for enter - Namenode is already in safemode</description>
  15395. <test-commands>
  15396. <dfs-admin-command>-fs NAMENODE -safemode enter</dfs-admin-command>
  15397. <dfs-admin-command>-fs NAMENODE -safemode enter</dfs-admin-command>
  15398. </test-commands>
  15399. <cleanup-commands>
  15400. <dfs-admin-command>-fs NAMENODE -safemode leave</dfs-admin-command>
  15401. </cleanup-commands>
  15402. <comparators>
  15403. <comparator>
  15404. <type>TokenComparator</type>
  15405. <expected-output>Safe mode is ON</expected-output>
  15406. </comparator>
  15407. </comparators>
  15408. </test>
  15409. <test> <!-- TESTED -->
  15410. <description>safemode: Test for leave - Namenode is already in safemode</description>
  15411. <test-commands>
  15412. <dfs-admin-command>-fs NAMENODE -safemode enter</dfs-admin-command>
  15413. <dfs-admin-command>-fs NAMENODE -safemode leave</dfs-admin-command>
  15414. </test-commands>
  15415. <cleanup-commands>
  15416. <!-- No cleanup -->
  15417. </cleanup-commands>
  15418. <comparators>
  15419. <comparator>
  15420. <type>TokenComparator</type>
  15421. <expected-output>Safe mode is OFF</expected-output>
  15422. </comparator>
  15423. </comparators>
  15424. </test>
  15425. <test> <!-- TESTED -->
  15426. <description>safemode: Test for leave - Namenode is not in safemode</description>
  15427. <test-commands>
  15428. <dfs-admin-command>-fs NAMENODE -safemode leave</dfs-admin-command>
  15429. </test-commands>
  15430. <cleanup-commands>
  15431. <!-- No cleanup -->
  15432. </cleanup-commands>
  15433. <comparators>
  15434. <comparator>
  15435. <type>TokenComparator</type>
  15436. <expected-output>Safe mode is OFF</expected-output>
  15437. </comparator>
  15438. </comparators>
  15439. </test>
  15440. <test> <!-- TESTED -->
  15441. <description>safemode: Test for get - Namenode is not in safemode</description>
  15442. <test-commands>
  15443. <dfs-admin-command>-fs NAMENODE -safemode leave</dfs-admin-command>
  15444. <dfs-admin-command>-fs NAMENODE -safemode get</dfs-admin-command>
  15445. </test-commands>
  15446. <cleanup-commands>
  15447. <!-- No cleanup -->
  15448. </cleanup-commands>
  15449. <comparators>
  15450. <comparator>
  15451. <type>TokenComparator</type>
  15452. <expected-output>Safe mode is OFF</expected-output>
  15453. </comparator>
  15454. </comparators>
  15455. </test>
  15456. <test> <!-- TESTED -->
  15457. <description>safemode:Test for get - Namenode is already in safemode</description>
  15458. <test-commands>
  15459. <dfs-admin-command>-fs NAMENODE -safemode enter</dfs-admin-command>
  15460. <dfs-admin-command>-fs NAMENODE -safemode get</dfs-admin-command>
  15461. </test-commands>
  15462. <cleanup-commands>
  15463. <dfs-admin-command>-fs NAMENODE -safemode leave</dfs-admin-command>
  15464. </cleanup-commands>
  15465. <comparators>
  15466. <comparator>
  15467. <type>TokenComparator</type>
  15468. <expected-output>Safe mode is ON</expected-output>
  15469. </comparator>
  15470. </comparators>
  15471. </test>
  15472. <test> <!-- TESTED -->
  15473. <description>safemode: Test for wait - Namenode is not in safemode</description>
  15474. <test-commands>
  15475. <dfs-admin-command>-fs NAMENODE -safemode leave</dfs-admin-command>
  15476. <dfs-admin-command>-fs NAMENODE -safemode wait</dfs-admin-command>
  15477. </test-commands>
  15478. <cleanup-commands>
  15479. <!-- No cleanup -->
  15480. </cleanup-commands>
  15481. <comparators>
  15482. <comparator>
  15483. <type>TokenComparator</type>
  15484. <expected-output>Safe mode is OFF</expected-output>
  15485. </comparator>
  15486. </comparators>
  15487. </test>
  15488. <test> <!-- TESTED -->
  15489. <description>safemode: Test for wait - Namenode is already in safemode</description>
  15490. <test-commands>
  15491. <dfs-admin-command>-fs NAMENODE -safemode enter</dfs-admin-command>
  15492. <dfs-admin-command>-fs NAMENODE -safemode wait &amp;</dfs-admin-command>
  15493. <dfs-admin-command>-fs NAMENODE -safemode leave</dfs-admin-command>
  15494. </test-commands>
  15495. <cleanup-commands>
  15496. <!-- No cleanup -->
  15497. </cleanup-commands>
  15498. <comparators>
  15499. <comparator>
  15500. <type>TokenComparator</type>
  15501. <expected-output>Safe mode is OFF</expected-output>
  15502. </comparator>
  15503. </comparators>
  15504. </test>
  15505. <!-- Test for report -->
  15506. <test> <!-- TESTED -->
  15507. <description>report: Displays the report about the Datanodes</description>
  15508. <test-commands>
  15509. <dfs-admin-command>-fs NAMENODE -report</dfs-admin-command>
  15510. </test-commands>
  15511. <cleanup-commands>
  15512. <!-- no cleanup cmd -->
  15513. </cleanup-commands>
  15514. <comparators>
  15515. <comparator>
  15516. <type>RegexpComparator</type>
  15517. <expected-output>Configured Capacity: [0-9]+ \([0-9\.]+ [BKMGT]+\)</expected-output>
  15518. </comparator>
  15519. <comparator>
  15520. <type>RegexpComparator</type>
  15521. <expected-output>Present Capacity: [0-9]+ \([0-9\.]+ [BKMGT]+\)</expected-output>
  15522. </comparator>
  15523. <comparator>
  15524. <type>RegexpComparator</type>
  15525. <expected-output>DFS Remaining: [0-9]+ \([0-9\.]+ [BKMGT]+\)</expected-output>
  15526. </comparator>
  15527. <comparator>
  15528. <type>RegexpComparator</type>
  15529. <expected-output>DFS Used: [0-9]+ \([0-9\.]+ [BKMGT]+\)</expected-output>
  15530. </comparator>
  15531. <comparator>
  15532. <type>RegexpComparator</type>
  15533. <expected-output>DFS Used\%: [0-9\.]+%</expected-output>
  15534. </comparator>
  15535. <comparator>
  15536. <type>RegexpComparator</type>
  15537. <expected-output>Live datanodes \([0-9]+\):</expected-output>
  15538. </comparator>
  15539. <comparator>
  15540. <type>RegexpComparator</type>
  15541. <expected-output>Name: [0-9\.:]+ \([-.a-zA-z0-9\.]+\)</expected-output>
  15542. </comparator>
  15543. <comparator>
  15544. <type>RegexpComparator</type>
  15545. <expected-output>Hostname: [-.a-zA-z0-9\.]+</expected-output>
  15546. </comparator>
  15547. <comparator>
  15548. <type>RegexpComparator</type>
  15549. <expected-output>Decommission Status : [a-zA-Z]+</expected-output>
  15550. </comparator>
  15551. <comparator>
  15552. <type>RegexpComparator</type>
  15553. <expected-output>Non DFS Used: [0-9]+ \([0-9\.]+ [BKMGT]+\)</expected-output>
  15554. </comparator>
  15555. <comparator>
  15556. <type>RegexpComparator</type>
  15557. <expected-output>DFS Remaining%: [0-9\.]+%</expected-output>
  15558. </comparator>
  15559. <comparator>
  15560. <type>RegexpComparator</type>
  15561. <expected-output>Last contact: [a-zA-Z]+ [a-zA-Z]+ [0-9]+ [0-9:]+ [A-Z\-\+\:0-9]+ [0-9]+</expected-output>
  15562. </comparator>
  15563. <comparator>
  15564. <type>TokenComparator</type>
  15565. <expected-output>Live datanodes</expected-output>
  15566. </comparator>
  15567. </comparators>
  15568. </test>
  15569. <!-- Test for saveNamespace -->
  15570. <test> <!-- TESTED -->
  15571. <description>saveNamespace: to save the namespace when safemode is ON</description>
  15572. <test-commands>
  15573. <dfs-admin-command>-fs NAMENODE -safemode enter</dfs-admin-command>
  15574. <dfs-admin-command>-fs NAMENODE -saveNamespace</dfs-admin-command>
  15575. </test-commands>
  15576. <cleanup-commands>
  15577. <dfs-admin-command>-fs NAMENODE -safemode leave</dfs-admin-command>
  15578. </cleanup-commands>
  15579. <comparators>
  15580. <comparator>
  15581. <type>RegexpComparator</type>
  15582. <expected-output>Save namespace successful(\n)*</expected-output>
  15583. </comparator>
  15584. </comparators>
  15585. </test>
  15586. <test> <!-- TESTED -->
  15587. <description>saveNamespace: to save the namespace when safemode is OFF</description>
  15588. <test-commands>
  15589. <dfs-admin-command>-fs NAMENODE -safemode leave</dfs-admin-command>
  15590. <dfs-admin-command>-fs NAMENODE -saveNamespace</dfs-admin-command>
  15591. </test-commands>
  15592. <cleanup-commands>
  15593. <dfs-admin-command>-fs NAMENODE -safemode leave</dfs-admin-command>
  15594. </cleanup-commands>
  15595. <comparators>
  15596. <comparator>
  15597. <type>TokenComparator</type>
  15598. <expected-output>saveNamespace: Safe mode should be turned ON in order to create namespace image.</expected-output>
  15599. </comparator>
  15600. </comparators>
  15601. </test>
  15602. <!-- Test for rollEdits -->
  15603. <test> <!-- TESTED -->
  15604. <description>rollEdits: test rollEdits admin command</description>
  15605. <test-commands>
  15606. <dfs-admin-command>-fs NAMENODE -rollEdits</dfs-admin-command>
  15607. </test-commands>
  15608. <cleanup-commands>
  15609. <!-- no cleanup -->
  15610. </cleanup-commands>
  15611. <comparators>
  15612. <comparator>
  15613. <type>RegexpComparator</type>
  15614. <expected-output>New segment starts at txid \d+</expected-output>
  15615. </comparator>
  15616. </comparators>
  15617. </test>
  15618. <!-- Test for refreshNodes -->
  15619. <test> <!-- TESTED -->
  15620. <description>refreshNodes: to refresh the nodes</description>
  15621. <test-commands>
  15622. <dfs-admin-command>-fs NAMENODE -refreshNodes</dfs-admin-command>
  15623. <dfs-admin-command>-fs NAMENODE -report</dfs-admin-command>
  15624. </test-commands>
  15625. <cleanup-commands>
  15626. <!-- no cleanup -->
  15627. </cleanup-commands>
  15628. <comparators>
  15629. <comparator>
  15630. <type>RegexpComparator</type>
  15631. <expected-output>Configured Capacity: [0-9]+ \([0-9\.]+ [BKMGT]+\)</expected-output>
  15632. </comparator>
  15633. <comparator>
  15634. <type>RegexpComparator</type>
  15635. <expected-output>Present Capacity: [0-9]+ \([0-9\.]+ [BKMGT]+\)</expected-output>
  15636. </comparator>
  15637. <comparator>
  15638. <type>RegexpComparator</type>
  15639. <expected-output>DFS Remaining: [0-9]+ \([0-9\.]+ [BKMGT]+\)</expected-output>
  15640. </comparator>
  15641. <comparator>
  15642. <type>RegexpComparator</type>
  15643. <expected-output>DFS Used: [0-9]+ \([0-9\.]+ [BKMGT]+\)</expected-output>
  15644. </comparator>
  15645. <comparator>
  15646. <type>RegexpComparator</type>
  15647. <expected-output>DFS Used\%: [0-9\.]+%</expected-output>
  15648. </comparator>
  15649. <comparator>
  15650. <type>RegexpComparator</type>
  15651. <expected-output>Name: [0-9\.:]+ \([-.a-zA-z0-9\.]+\)</expected-output>
  15652. </comparator>
  15653. <comparator>
  15654. <type>RegexpComparator</type>
  15655. <expected-output>Hostname: [-.a-zA-z0-9\.]+</expected-output>
  15656. </comparator>
  15657. <comparator>
  15658. <type>RegexpComparator</type>
  15659. <expected-output>Decommission Status : [a-zA-Z]+</expected-output>
  15660. </comparator>
  15661. <comparator>
  15662. <type>RegexpComparator</type>
  15663. <expected-output>Non DFS Used: [0-9]+ \([0-9\.]+ [BKMGT]+\)</expected-output>
  15664. </comparator>
  15665. <comparator>
  15666. <type>RegexpComparator</type>
  15667. <expected-output>DFS Remaining%: [0-9\.]+%</expected-output>
  15668. </comparator>
  15669. <comparator>
  15670. <type>RegexpComparator</type>
  15671. <expected-output>Last contact: [a-zA-Z]+ [a-zA-Z]+ [0-9]+ [0-9:]+ [A-Z\-\+\:0-9]+ [0-9]+</expected-output>
  15672. </comparator>
  15673. <comparator>
  15674. <type>TokenComparator</type>
  15675. <expected-output>Live datanodes</expected-output>
  15676. </comparator>
  15677. </comparators>
  15678. </test>
  15679. <!-- Test for metasave -->
  15680. <test> <!-- TESTED -->
  15681. <description>metasave: to save metadata</description>
  15682. <test-commands>
  15683. <dfs-admin-command>-fs NAMENODE -metasave metafile</dfs-admin-command>
  15684. </test-commands>
  15685. <cleanup-commands>
  15686. <!-- No cleanup -->
  15687. </cleanup-commands>
  15688. <comparators>
  15689. <comparator>
  15690. <type>RegexpComparator</type>
  15691. <expected-output>Created metasave file metafile in the log directory of namenode hdfs:\/\/[-.a-zA-Z0-9\.:]+</expected-output>
  15692. </comparator>
  15693. </comparators>
  15694. </test>
  15695. <!-- Test for clrSpacequota -->
  15696. <test> <!-- TESTED -->
  15697. <description>clrSpaceQuota: Namenode is already in safemode</description>
  15698. <test-commands>
  15699. <command>-fs NAMENODE -mkdir test</command>
  15700. <dfs-admin-command>-fs NAMENODE -setSpaceQuota 15 test</dfs-admin-command>
  15701. <dfs-admin-command>-fs NAMENODE -clrSpaceQuota test</dfs-admin-command>
  15702. </test-commands>
  15703. <cleanup-commands>
  15704. <command>-fs NAMENODE -rm -r test</command>
  15705. </cleanup-commands>
  15706. <comparators>
  15707. <comparator>
  15708. <type>ExactComparator</type>
  15709. <expected-output></expected-output>
  15710. </comparator>
  15711. </comparators>
  15712. </test>
  15713. <test> <!-- Tested -->
  15714. <description>printTopology: verifying that the topology map is what we expect</description>
  15715. <test-commands>
  15716. <dfs-admin-command>-fs NAMENODE -printTopology</dfs-admin-command>
  15717. </test-commands>
  15718. <cleanup-commands>
  15719. <!-- No cleanup -->
  15720. </cleanup-commands>
  15721. <comparators>
  15722. <!-- miniDFS cluster started in CLITestHelper is set to match this output -->
  15723. <comparator>
  15724. <type>RegexpAcrossOutputComparator</type>
  15725. <expected-output>^Rack: \/rack1\s*127\.0\.0\.1:\d+\s\([-.a-zA-Z0-9]+\)\s*127\.0\.0\.1:\d+\s\([-.a-zA-Z0-9]+\)</expected-output>
  15726. </comparator>
  15727. <comparator>
  15728. <type>RegexpAcrossOutputComparator</type>
  15729. <expected-output>Rack: \/rack2\s*127\.0\.0\.1:\d+\s\([-.a-zA-Z0-9]+\)\s*127\.0\.0\.1:\d+\s\([-.a-zA-Z0-9]+\)\s*127\.0\.0\.1:\d+\s\([-.a-zA-Z0-9]+\)</expected-output>
  15730. </comparator>
  15731. <comparator>
  15732. <type>RegexpAcrossOutputComparator</type>
  15733. <expected-output>Rack: \/rack3\s*127\.0\.0\.1:\d+\s\([-.a-zA-Z0-9]+\)</expected-output>
  15734. </comparator>
  15735. <comparator>
  15736. <type>RegexpAcrossOutputComparator</type>
  15737. <expected-output>Rack: \/rack4\s*127\.0\.0\.1:\d+\s\([-.a-zA-Z0-9]+\)\s*127\.0\.0\.1:\d+\s\([-.a-zA-Z0-9]+\)</expected-output>
  15738. </comparator>
  15739. </comparators>
  15740. </test>
  15741. <!-- DFS tests -->
  15742. <test>
  15743. <description>appendToFile</description>
  15744. <test-commands>
  15745. <command>-fs NAMENODE -mkdir -p /user/USERNAME/dir1</command>
  15746. <command>-fs NAMENODE -touchz /user/USERNAME/dir1/file0</command>
  15747. <command>-fs NAMENODE -appendToFile CLITEST_DATA/data15bytes /user/USERNAME/dir1/file0</command>
  15748. <command>-fs NAMENODE -cat /user/USERNAME/dir1/file0</command>
  15749. </test-commands>
  15750. <cleanup-commands>
  15751. <command>-fs NAMENODE -rm -r /user/USERNAME</command>
  15752. </cleanup-commands>
  15753. <comparators>
  15754. <comparator>
  15755. <type>RegexpComparator</type>
  15756. <expected-output>12345678901234</expected-output>
  15757. </comparator>
  15758. </comparators>
  15759. </test>
  15760. <test>
  15761. <description>text</description>
  15762. <test-commands>
  15763. <command>-fs NAMENODE -mkdir -p /user/USERNAME/dir1</command>
  15764. <command>-fs NAMENODE -put CLITEST_DATA/data15bytes /user/USERNAME/dir1/file0</command>
  15765. <command>-fs NAMENODE -text /user/USERNAME/dir1/file0</command>
  15766. </test-commands>
  15767. <cleanup-commands>
  15768. <command>-fs NAMENODE -rm -r /user/USERNAME/dir1</command>
  15769. </cleanup-commands>
  15770. <comparators>
  15771. <comparator>
  15772. <type>RegexpComparator</type>
  15773. <expected-output>12345678901234</expected-output>
  15774. </comparator>
  15775. </comparators>
  15776. </test>
  15777. <test>
  15778. <description>rmdir</description>
  15779. <test-commands>
  15780. <command>-fs NAMENODE -mkdir -p /user/USERNAME/dir1</command>
  15781. <command>-fs NAMENODE -rmdir /user/USERNAME/dir1</command>
  15782. <command>-fs NAMENODE -ls /user/USERNAME/</command>
  15783. </test-commands>
  15784. <cleanup-commands>
  15785. <command>-fs NAMENODE -rm -r /user/USERNAME</command>
  15786. </cleanup-commands>
  15787. <comparators>
  15788. <comparator>
  15789. <type>ExactComparator</type>
  15790. <expected-output></expected-output>
  15791. </comparator>
  15792. </comparators>
  15793. </test>
  15794. <test>
  15795. <description>rmdir with ignore-fail-on-non-empty</description>
  15796. <test-commands>
  15797. <command>-fs NAMENODE -mkdir -p /user/USERNAME/dir1</command>
  15798. <command>-fs NAMENODE -put CLITEST_DATA/data15bytes /user/USERNAME/dir1/file0</command>
  15799. <command>-fs NAMENODE -rmdir --ignore-fail-on-non-empty /user/USERNAME/dir1</command>
  15800. <command>-fs NAMENODE -ls /user/USERNAME/</command>
  15801. </test-commands>
  15802. <cleanup-commands>
  15803. <command>-fs NAMENODE -rm -r /user/USERNAME</command>
  15804. </cleanup-commands>
  15805. <comparators>
  15806. <comparator>
  15807. <type>RegexpComparator</type>
  15808. <expected-output>Found 1 items</expected-output>
  15809. </comparator>
  15810. <comparator>
  15811. <type>RegexpComparator</type>
  15812. <expected-output>^drwxr-xr-x( )*-( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/user/USERNAME/dir1</expected-output>
  15813. </comparator>
  15814. </comparators>
  15815. </test>
  15816. <test>
  15817. <description>df</description>
  15818. <test-commands>
  15819. <command>-fs NAMENODE -mkdir -p /user/USERNAME/dir1</command>
  15820. <command>-fs NAMENODE -put CLITEST_DATA/data15bytes /user/USERNAME/dir1/file0</command>
  15821. <command>-fs NAMENODE -df /user/USERNAME</command>
  15822. </test-commands>
  15823. <cleanup-commands>
  15824. <command>-fs NAMENODE -rm -r /user/USERNAME</command>
  15825. </cleanup-commands>
  15826. <comparators>
  15827. <comparator>
  15828. <type>RegexpComparator</type>
  15829. <expected-output>Filesystem( )*Size( )*Used( )*Available( )*Use%.*</expected-output>
  15830. </comparator>
  15831. </comparators>
  15832. </test>
  15833. <test>
  15834. <description>expunge</description>
  15835. <test-commands>
  15836. <command>-fs NAMENODE -expunge</command>
  15837. </test-commands>
  15838. <cleanup-commands>
  15839. <command></command>
  15840. </cleanup-commands>
  15841. <comparators>
  15842. <comparator>
  15843. <type>ExactComparator</type>
  15844. <expected-output></expected-output>
  15845. </comparator>
  15846. </comparators>
  15847. </test>
  15848. <test>
  15849. <description>getmerge</description>
  15850. <test-commands>
  15851. <command>-fs NAMENODE -mkdir -p /user/USERNAME/dir1</command>
  15852. <command>-fs NAMENODE -copyFromLocal CLITEST_DATA/data15bytes /user/USERNAME/dir1</command>
  15853. <command>-fs NAMENODE -copyFromLocal CLITEST_DATA/data30bytes /user/USERNAME/dir1</command>
  15854. <command>-fs NAMENODE -getmerge /user/USERNAME/dir1 data</command>
  15855. <command>-cat data</command>
  15856. </test-commands>
  15857. <cleanup-commands>
  15858. <command>-fs NAMENODE -rm -r /user/USERNAME</command>
  15859. <command>rm data</command>
  15860. </cleanup-commands>
  15861. <comparators>
  15862. <comparator>
  15863. <type>RegexpComparator</type>
  15864. <expected-output>12345678901234.*</expected-output>
  15865. </comparator>
  15866. </comparators>
  15867. </test>
  15868. <!-- Tests for snapshots -->
  15869. <test>
  15870. <description>allowSnapshot</description>
  15871. <test-commands>
  15872. <command>-fs NAMENODE -mkdir -p /user/USERNAME/dir1</command>
  15873. <dfs-admin-command>-fs NAMENODE -allowSnapshot /user/USERNAME/dir1</dfs-admin-command>
  15874. </test-commands>
  15875. <cleanup-commands>
  15876. <dfs-admin-command>-fs NAMENODE -disallowSnapshot /user/USERNAME/dir1</dfs-admin-command>
  15877. <command>-fs NAMENODE -rm -r /user/USERNAME</command>
  15878. </cleanup-commands>
  15879. <comparators>
  15880. <comparator>
  15881. <type>RegexpComparator</type>
  15882. <expected-output>Allowing snaphot on /user/USERNAME/dir1 succeeded</expected-output>
  15883. </comparator>
  15884. </comparators>
  15885. </test>
  15886. <test>
  15887. <description>disallowSnapshot</description>
  15888. <test-commands>
  15889. <command>-fs NAMENODE -mkdir -p /user/USERNAME/dir1</command>
  15890. <dfs-admin-command>-fs NAMENODE -allowSnapshot /user/USERNAME/dir1</dfs-admin-command>
  15891. <dfs-admin-command>-fs NAMENODE -disallowSnapshot /user/USERNAME/dir1</dfs-admin-command>
  15892. </test-commands>
  15893. <cleanup-commands>
  15894. <command>-fs NAMENODE -rm -r /user/USERNAME</command>
  15895. </cleanup-commands>
  15896. <comparators>
  15897. <comparator>
  15898. <type>RegexpComparator</type>
  15899. <expected-output>Disallowing snaphot on /user/USERNAME/dir1 succeeded</expected-output>
  15900. </comparator>
  15901. </comparators>
  15902. </test>
  15903. <test>
  15904. <description>createSnapshot</description>
  15905. <test-commands>
  15906. <command>-fs NAMENODE -mkdir -p /user/USERNAME/dir1</command>
  15907. <dfs-admin-command>-fs NAMENODE -allowSnapshot /user/USERNAME/dir1</dfs-admin-command>
  15908. <command>-fs NAMENODE -createSnapshot /user/USERNAME/dir1 snapshot1</command>
  15909. </test-commands>
  15910. <cleanup-commands>
  15911. <command>-fs NAMENODE -deleteSnapshot /user/USERNAME/dir1 snapshot1</command>
  15912. <dfs-admin-command>-fs NAMENODE -disallowSnapshot /user/USERNAME/dir1</dfs-admin-command>
  15913. <command>-fs NAMENODE -rm -r /user/USERNAME</command>
  15914. </cleanup-commands>
  15915. <comparators>
  15916. <comparator>
  15917. <type>RegexpComparator</type>
  15918. <expected-output>Created snapshot /user/USERNAME/dir1/.snapshot/snapshot1</expected-output>
  15919. </comparator>
  15920. </comparators>
  15921. </test>
  15922. <test>
  15923. <description>renameSnapshot</description>
  15924. <test-commands>
  15925. <command>-fs NAMENODE -mkdir -p /user/USERNAME/dir1</command>
  15926. <dfs-admin-command>-fs NAMENODE -allowSnapshot /user/USERNAME/dir1</dfs-admin-command>
  15927. <command>-fs NAMENODE -createSnapshot /user/USERNAME/dir1 snapshot1</command>
  15928. <command>-fs NAMENODE -renameSnapshot /user/USERNAME/dir1 snapshot1 snapshot2</command>
  15929. <command>-fs NAMENODE -ls /user/USERNAME/dir1/.snapshot</command>
  15930. </test-commands>
  15931. <cleanup-commands>
  15932. <command>-fs NAMENODE -deleteSnapshot /user/USERNAME/dir1 snapshot2</command>
  15933. <dfs-admin-command>-fs NAMENODE -disallowSnapshot /user/USERNAME/dir1</dfs-admin-command>
  15934. <command>-fs NAMENODE -rm -r /user/USERNAME</command>
  15935. </cleanup-commands>
  15936. <comparators>
  15937. <comparator>
  15938. <type>RegexpComparator</type>
  15939. <expected-output>Found 1 items</expected-output>
  15940. </comparator>
  15941. <comparator>
  15942. <type>RegexpComparator</type>
  15943. <expected-output>^drwxr-xr-x( )*-( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/user/USERNAME/dir1/.snapshot/snapshot2</expected-output>
  15944. </comparator>
  15945. </comparators>
  15946. </test>
  15947. <test>
  15948. <description>deleteSnapshot</description>
  15949. <test-commands>
  15950. <command>-fs NAMENODE -mkdir -p /user/USERNAME/dir1</command>
  15951. <dfs-admin-command>-fs NAMENODE -allowSnapshot /user/USERNAME/dir1</dfs-admin-command>
  15952. <command>-fs NAMENODE -createSnapshot /user/USERNAME/dir1 snapshot1</command>
  15953. <command>-fs NAMENODE -deleteSnapshot /user/USERNAME/dir1 snapshot1</command>
  15954. <command>-fs NAMENODE -ls /user/USERNAME/dir1/.snapshot</command>
  15955. </test-commands>
  15956. <cleanup-commands>
  15957. <dfs-admin-command>-fs NAMENODE -disallowSnapshot /user/USERNAME/dir1</dfs-admin-command>
  15958. <command>-fs NAMENODE -rm -r /user/USERNAME</command>
  15959. </cleanup-commands>
  15960. <comparators>
  15961. <comparator>
  15962. <type>ExactComparator</type>
  15963. <expected-output></expected-output>
  15964. </comparator>
  15965. </comparators>
  15966. </test>
  15967. <!-- DFSadmin tests -->
  15968. <test>
  15969. <description>refreshUserToGroupsMappings</description>
  15970. <test-commands>
  15971. <dfs-admin-command>-fs NAMENODE -refreshUserToGroupsMappings</dfs-admin-command>
  15972. </test-commands>
  15973. <cleanup-commands>
  15974. <command></command>
  15975. </cleanup-commands>
  15976. <comparators>
  15977. <comparator>
  15978. <type>RegexpComparator</type>
  15979. <expected-output>Refresh user to groups mapping successful(\n)*</expected-output>
  15980. </comparator>
  15981. </comparators>
  15982. </test>
  15983. <test>
  15984. <description>refreshSuperUserGroupsConfiguration</description>
  15985. <test-commands>
  15986. <dfs-admin-command>-fs NAMENODE -refreshSuperUserGroupsConfiguration</dfs-admin-command>
  15987. </test-commands>
  15988. <cleanup-commands>
  15989. <command></command>
  15990. </cleanup-commands>
  15991. <comparators>
  15992. <comparator>
  15993. <type>RegexpComparator</type>
  15994. <expected-output>Refresh super user groups configuration successful(\n)*</expected-output>
  15995. </comparator>
  15996. </comparators>
  15997. </test>
  15998. <test>
  15999. <description>setQuota</description>
  16000. <test-commands>
  16001. <command>-fs NAMENODE -mkdir -p /user/USERNAME/dir1</command>
  16002. <dfs-admin-command>-fs NAMENODE -setQuota 3 /user/USERNAME/dir1</dfs-admin-command>
  16003. <command>-fs NAMENODE -count -q /user/USERNAME/dir1</command>
  16004. </test-commands>
  16005. <cleanup-commands>
  16006. <command>-fs NAMENODE -rm -r /user/USERNAME</command>
  16007. </cleanup-commands>
  16008. <comparators>
  16009. <comparator>
  16010. <type>RegexpComparator</type>
  16011. <expected-output>( )*3.*/user/USERNAME/dir1</expected-output>
  16012. </comparator>
  16013. </comparators>
  16014. </test>
  16015. <test>
  16016. <description>clrQuota</description>
  16017. <test-commands>
  16018. <command>-fs NAMENODE -mkdir -p /user/USERNAME/dir1</command>
  16019. <dfs-admin-command>-fs NAMENODE -setQuota 3 /user/USERNAME/dir1</dfs-admin-command>
  16020. <dfs-admin-command>-fs NAMENODE -clrQuota /user/USERNAME/dir1</dfs-admin-command>
  16021. <command>-fs NAMENODE -count -q /user/USERNAME/dir1</command>
  16022. </test-commands>
  16023. <cleanup-commands>
  16024. <command>-fs NAMENODE -rm -r /user/USERNAME</command>
  16025. </cleanup-commands>
  16026. <comparators>
  16027. <comparator>
  16028. <type>RegexpComparator</type>
  16029. <expected-output>( )*none.*/user/USERNAME/dir1</expected-output>
  16030. </comparator>
  16031. </comparators>
  16032. </test>
  16033. <test>
  16034. <description>setSpaceQuota</description>
  16035. <test-commands>
  16036. <command>-fs NAMENODE -mkdir -p /user/USERNAME/dir1</command>
  16037. <dfs-admin-command>-fs NAMENODE -setSpaceQuota 1G /user/USERNAME/dir1</dfs-admin-command>
  16038. </test-commands>
  16039. <cleanup-commands>
  16040. <command>-fs NAMENODE -rm -r /user/USERNAME/dir1</command>
  16041. </cleanup-commands>
  16042. <comparators>
  16043. <comparator>
  16044. <type>ExactComparator</type>
  16045. <expected-output></expected-output>
  16046. </comparator>
  16047. </comparators>
  16048. </test>
  16049. <test>
  16050. <description>setBalancerBandwidth</description>
  16051. <test-commands>
  16052. <dfs-admin-command>-fs NAMENODE -setBalancerBandwidth 104857600</dfs-admin-command>
  16053. </test-commands>
  16054. <cleanup-commands>
  16055. <command></command>
  16056. </cleanup-commands>
  16057. <comparators>
  16058. <comparator>
  16059. <type>RegexpComparator</type>
  16060. <expected-output>Balancer bandwidth is set to 104857600(\n)*</expected-output>
  16061. </comparator>
  16062. </comparators>
  16063. </test>
  16064. <test>
  16065. <description>finalizeUpgrade</description>
  16066. <test-commands>
  16067. <dfs-admin-command>-fs NAMENODE -finalizeUpgrade</dfs-admin-command>
  16068. </test-commands>
  16069. <cleanup-commands>
  16070. <command></command>
  16071. </cleanup-commands>
  16072. <comparators>
  16073. <comparator>
  16074. <type>SubstringComparator</type>
  16075. <expected-output>Finalize upgrade successful</expected-output>
  16076. </comparator>
  16077. </comparators>
  16078. </test>
  16079. <!-- Tests for moveFromLocal -->
  16080. <test> <!-- TESTED -->
  16081. <description>moveFromLocal: moving non existent file(absolute path)</description>
  16082. <test-commands>
  16083. <command>-fs NAMENODE -mkdir -p /user/USERNAME/dir</command>
  16084. <command>-fs NAMENODE -moveFromLocal /user/wrongdata /user/USERNAME/dir</command>
  16085. </test-commands>
  16086. <cleanup-commands>
  16087. <command>-fs NAMENODE -rm -r /user/USERNAME</command>
  16088. </cleanup-commands>
  16089. <comparators>
  16090. <comparator>
  16091. <type>TokenComparator</type>
  16092. <expected-output>moveFromLocal: `/user/wrongdata': No such file or directory</expected-output>
  16093. </comparator>
  16094. </comparators>
  16095. </test>
  16096. <test> <!-- TESTED -->
  16097. <description>moveFromLocal: moving non existent file(relative path)</description>
  16098. <test-commands>
  16099. <command>-fs NAMENODE -mkdir -p /user/USERNAME/dir</command> <!-- make sure user home dir exists -->
  16100. <command>-fs NAMENODE -moveFromLocal wrongdata /user/USERNAME/dir</command>
  16101. </test-commands>
  16102. <cleanup-commands>
  16103. <command>-fs NAMENODE -rm -r /user/USERNAME</command>
  16104. </cleanup-commands>
  16105. <comparators>
  16106. <comparator>
  16107. <type>TokenComparator</type>
  16108. <expected-output>moveFromLocal: `wrongdata': No such file or directory</expected-output>
  16109. </comparator>
  16110. </comparators>
  16111. </test>
  16112. <test> <!-- TESTED -->
  16113. <description>moveFromLocal: moving many files into an existing file</description>
  16114. <test-commands>
  16115. <command>-fs NAMENODE -cp CLITEST_DATA/data15bytes data15bytes</command>
  16116. <command>-fs NAMENODE -cp CLITEST_DATA/data30bytes data30bytes</command>
  16117. <command>-fs NAMENODE -mkdir -p /user/USERNAME/dir</command>
  16118. <command>-fs NAMENODE -touchz /user/USERNAME/dir/file0</command>
  16119. <command>-fs NAMENODE -moveFromLocal data15bytes data30bytes /user/USERNAME/dir/file0</command>
  16120. </test-commands>
  16121. <cleanup-commands>
  16122. <command>-fs NAMENODE -rm -r /user/USERNAME</command>
  16123. </cleanup-commands>
  16124. <comparators>
  16125. <comparator>
  16126. <type>RegexpComparator</type>
  16127. <expected-output>moveFromLocal: `/user/USERNAME/dir/file0': Is not a directory</expected-output>
  16128. </comparator>
  16129. </comparators>
  16130. </test>
  16131. <test> <!-- TESTED -->
  16132. <description>moveFromLocal: moving many files into a non existent directory</description>
  16133. <test-commands>
  16134. <command>-fs NAMENODE -cp CLITEST_DATA/data15bytes data15bytes</command>
  16135. <command>-fs NAMENODE -cp CLITEST_DATA/data30bytes data30bytes</command>
  16136. <command>-fs NAMENODE -moveFromLocal data15bytes data30bytes /user/USERNAME/dir/wrongdir</command>
  16137. </test-commands>
  16138. <cleanup-commands>
  16139. <command>-fs NAMENODE -rm -r /user/USERNAME</command>
  16140. </cleanup-commands>
  16141. <comparators>
  16142. <comparator>
  16143. <type>RegexpComparator</type>
  16144. <expected-output>^moveFromLocal: `/user/USERNAME/dir/wrongdir': No such file or directory</expected-output>
  16145. </comparator>
  16146. </comparators>
  16147. </test>
  16148. <test> <!-- TESTED -->
  16149. <description>moveFromLocal: Test for hdfs:// path - moving non existent file</description>
  16150. <test-commands>
  16151. <command>-fs NAMENODE -mkdir -p /user/USERNAME/dir</command>
  16152. <command>-fs NAMENODE -moveFromLocal /user/wrongdata hdfs:///user/USERNAME/dir/file</command>
  16153. </test-commands>
  16154. <cleanup-commands>
  16155. <command>-fs NAMENODE -rm -r hdfs:///*</command>
  16156. </cleanup-commands>
  16157. <comparators>
  16158. <comparator>
  16159. <type>TokenComparator</type>
  16160. <expected-output>moveFromLocal: `/user/wrongdata': No such file or directory</expected-output>
  16161. </comparator>
  16162. </comparators>
  16163. </test>
  16164. <test> <!-- TESTED -->
  16165. <description>moveFromLocal: Test for hdfs:// path - moving many files into an existing file</description>
  16166. <test-commands>
  16167. <command>-fs NAMENODE -cp CLITEST_DATA/data15bytes data15bytes</command>
  16168. <command>-fs NAMENODE -cp CLITEST_DATA/data30bytes data30bytes</command>
  16169. <command>-fs NAMENODE -mkdir -p /user/USERNAME/dir</command>
  16170. <command>-fs NAMENODE -touchz hdfs:///user/USERNAME/dir/file</command>
  16171. <command>-fs NAMENODE -moveFromLocal data15bytes data30bytes hdfs:///user/USERNAME/dir/file</command>
  16172. </test-commands>
  16173. <cleanup-commands>
  16174. <command>-fs NAMENODE -rm -r hdfs:///*</command>
  16175. </cleanup-commands>
  16176. <comparators>
  16177. <comparator>
  16178. <type>RegexpComparator</type>
  16179. <expected-output>moveFromLocal: `hdfs:///user/USERNAME/dir/file': Is not a directory</expected-output>
  16180. </comparator>
  16181. </comparators>
  16182. </test>
  16183. <test> <!-- TESTED -->
  16184. <description>moveFromLocal: Test for hdfs:// path - moving many files into a non existent directory</description>
  16185. <test-commands>
  16186. <command>-fs NAMENODE -cp CLITEST_DATA/data15bytes data15bytes</command>
  16187. <command>-fs NAMENODE -cp CLITEST_DATA/data30bytes data30bytes</command>
  16188. <command>-fs NAMENODE -moveFromLocal data15bytes data30bytes hdfs:///user/USERNAME/dir/wrongdir</command>
  16189. </test-commands>
  16190. <cleanup-commands>
  16191. <command>-fs NAMENODE -rm -r hdfs:///*</command>
  16192. </cleanup-commands>
  16193. <comparators>
  16194. <comparator>
  16195. <type>RegexpComparator</type>
  16196. <expected-output>moveFromLocal: `hdfs:///user/USERNAME/dir/wrongdir': No such file or directory</expected-output>
  16197. </comparator>
  16198. </comparators>
  16199. </test>
  16200. <test> <!-- TESTED -->
  16201. <description>moveFromLocal: Test for Namenode's path - moving non existent file</description>
  16202. <test-commands>
  16203. <command>-fs NAMENODE -mkdir -p NAMENODE/user/USERNAME/dir</command>
  16204. <command>-fs NAMENODE -moveFromLocal /user/wrongdata NAMENODE/user/USERNAME/dir</command>
  16205. </test-commands>
  16206. <cleanup-commands>
  16207. <command>-fs NAMENODE -rm -r NAMENODE/*</command>
  16208. </cleanup-commands>
  16209. <comparators>
  16210. <comparator>
  16211. <type>TokenComparator</type>
  16212. <expected-output>moveFromLocal: `/user/wrongdata': No such file or directory</expected-output>
  16213. </comparator>
  16214. </comparators>
  16215. </test>
  16216. <test> <!-- TESTED -->
  16217. <description>moveFromLocal: Test for Namenode's path - moving many files into an existing file</description>
  16218. <test-commands>
  16219. <command>-fs NAMENODE -mkdir -p NAMENODE/user/USERNAME/dir</command>
  16220. <command>-fs NAMENODE -touchz NAMENODE/user/USERNAME/dir/file0</command>
  16221. <command>-fs NAMENODE -cp CLITEST_DATA/data15bytes data15bytes</command>
  16222. <command>-fs NAMENODE -cp CLITEST_DATA/data30bytes data30bytes</command>
  16223. <command>-fs NAMENODE -moveFromLocal data15bytes data30bytes NAMENODE/user/USERNAME/dir/file0</command>
  16224. </test-commands>
  16225. <cleanup-commands>
  16226. <command>-fs NAMENODE -rm -r NAMENODE/*</command>
  16227. </cleanup-commands>
  16228. <comparators>
  16229. <comparator>
  16230. <type>RegexpComparator</type>
  16231. <expected-output>moveFromLocal: `hdfs://\w+[-.a-z0-9]*:[0-9]+/user/USERNAME/dir/file0': Is not a directory</expected-output>
  16232. </comparator>
  16233. </comparators>
  16234. </test>
  16235. <test> <!-- TESTED -->
  16236. <description>moveFromLocal: Test for Namenode's path - moving many files into a non existent directory</description>
  16237. <test-commands>
  16238. <command>-fs NAMENODE -mkdir -p NAMENODE/user/USERNAME</command>
  16239. <command>-fs NAMENODE -touchz NAMENODE/user/USERNAME/dir/file0</command>
  16240. <command>-fs NAMENODE -cp CLITEST_DATA/data15bytes data15bytes</command>
  16241. <command>-fs NAMENODE -cp CLITEST_DATA/data30bytes data30bytes</command>
  16242. <command>-fs NAMENODE -moveFromLocal data15bytes data30bytes NAMENODE/user/USERNAME/wrongdir</command>
  16243. </test-commands>
  16244. <cleanup-commands>
  16245. <command>-fs NAMENODE -rm -r NAMENODE/*</command>
  16246. </cleanup-commands>
  16247. <comparators>
  16248. <comparator>
  16249. <type>RegexpComparator</type>
  16250. <expected-output>moveFromLocal: `hdfs://\w+[-.a-z0-9]*:[0-9]+/user/USERNAME/wrongdir': No such file or directory</expected-output>
  16251. </comparator>
  16252. </comparators>
  16253. </test>
  16254. <test> <!--Tested -->
  16255. <description>Verifying chmod operation is not permitted in safemode</description>
  16256. <test-commands>
  16257. <command>-fs NAMENODE -mkdir /test </command>
  16258. <command>-fs NAMENODE -touchz /test/file1 </command>
  16259. <dfs-admin-command>-fs NAMENODE -safemode enter </dfs-admin-command>
  16260. <command>-fs NAMENODE -chmod 777 /test/file1 </command>
  16261. </test-commands>
  16262. <cleanup-commands>
  16263. <dfs-admin-command>-fs NAMENODE -safemode leave </dfs-admin-command>
  16264. <dfs-admin-command>-fs NAMENODE -rm -r /test </dfs-admin-command>
  16265. </cleanup-commands>
  16266. <comparators>
  16267. <comparator>
  16268. <type>SubstringComparator</type>
  16269. <expected-output>Cannot set permission for /test/file1. Name node is in safe mode.</expected-output>
  16270. </comparator>
  16271. </comparators>
  16272. </test>
  16273. <test> <!--Tested -->
  16274. <description>Verifying chown operation is not permitted in safemode</description>
  16275. <test-commands>
  16276. <command>-fs NAMENODE -mkdir /test </command>
  16277. <command>-fs NAMENODE -touchz /test/file1 </command>
  16278. <dfs-admin-command>-fs NAMENODE -safemode enter </dfs-admin-command>
  16279. <command>-fs NAMENODE -chown newgroup /test/file1 </command>
  16280. </test-commands>
  16281. <cleanup-commands>
  16282. <dfs-admin-command>-fs NAMENODE -safemode leave </dfs-admin-command>
  16283. <dfs-admin-command>-fs NAMENODE -rm -r /test </dfs-admin-command>
  16284. </cleanup-commands>
  16285. <comparators>
  16286. <comparator>
  16287. <type>SubstringComparator</type>
  16288. <expected-output>Cannot set owner for /test/file1. Name node is in safe mode.</expected-output>
  16289. </comparator>
  16290. </comparators>
  16291. </test>
  16292. <test> <!--Tested -->
  16293. <description>Verifying chgrp operation is not permitted in safemode</description>
  16294. <test-commands>
  16295. <command>-fs NAMENODE -mkdir /test </command>
  16296. <command>-fs NAMENODE -touchz /test/file1 </command>
  16297. <dfs-admin-command>-fs NAMENODE -safemode enter </dfs-admin-command>
  16298. <command>-fs NAMENODE -chgrp newgroup /test/file1 </command>
  16299. </test-commands>
  16300. <cleanup-commands>
  16301. <dfs-admin-command>-fs NAMENODE -safemode leave </dfs-admin-command>
  16302. <dfs-admin-command>-fs NAMENODE -rm -r /test </dfs-admin-command>
  16303. </cleanup-commands>
  16304. <comparators>
  16305. <comparator>
  16306. <type>SubstringComparator</type>
  16307. <expected-output>Cannot set owner for /test/file1. Name node is in safe mode.</expected-output>
  16308. </comparator>
  16309. </comparators>
  16310. </test>
  16311. <test> <!--Tested -->
  16312. <description>Verifying setQuota operation is not permitted in safemode</description>
  16313. <test-commands>
  16314. <command>-fs NAMENODE -mkdir /test </command>
  16315. <dfs-admin-command>-fs NAMENODE -safemode enter </dfs-admin-command>
  16316. <dfs-admin-command>-fs NAMENODE -setQuota 100 /test </dfs-admin-command>
  16317. </test-commands>
  16318. <cleanup-commands>
  16319. <dfs-admin-command>-fs NAMENODE -safemode leave </dfs-admin-command>
  16320. <dfs-admin-command>-fs NAMENODE -rm -r /test </dfs-admin-command>
  16321. </cleanup-commands>
  16322. <comparators>
  16323. <comparator>
  16324. <type>SubstringComparator</type>
  16325. <expected-output>setQuota: Cannot set quota on /test. Name node is in safe mode.</expected-output>
  16326. </comparator>
  16327. </comparators>
  16328. </test>
  16329. <test> <!--Tested -->
  16330. <description>Verifying clrQuota operation is not permitted in safemode</description>
  16331. <test-commands>
  16332. <command>-fs NAMENODE -mkdir /test </command>
  16333. <dfs-admin-command>-fs NAMENODE -safemode enter </dfs-admin-command>
  16334. <dfs-admin-command>-fs NAMENODE -clrQuota /test </dfs-admin-command>
  16335. </test-commands>
  16336. <cleanup-commands>
  16337. <dfs-admin-command>-fs NAMENODE -safemode leave </dfs-admin-command>
  16338. <dfs-admin-command>-fs NAMENODE -rm -r /test </dfs-admin-command>
  16339. </cleanup-commands>
  16340. <comparators>
  16341. <comparator>
  16342. <type>SubstringComparator</type>
  16343. <expected-output>clrQuota: Cannot set quota on /test. Name node is in safe mode.</expected-output>
  16344. </comparator>
  16345. </comparators>
  16346. </test>
  16347. <test> <!--Tested -->
  16348. <description>Verifying setSpaceQuota operation is not permitted in safemode</description>
  16349. <test-commands>
  16350. <command>-fs NAMENODE -mkdir /test </command>
  16351. <dfs-admin-command>-fs NAMENODE -safemode enter </dfs-admin-command>
  16352. <dfs-admin-command>-fs NAMENODE -setSpaceQuota 100 /test </dfs-admin-command>
  16353. </test-commands>
  16354. <cleanup-commands>
  16355. <dfs-admin-command>-fs NAMENODE -safemode leave </dfs-admin-command>
  16356. <dfs-admin-command>-fs NAMENODE -rm -r /test </dfs-admin-command>
  16357. </cleanup-commands>
  16358. <comparators>
  16359. <comparator>
  16360. <type>SubstringComparator</type>
  16361. <expected-output>setSpaceQuota: Cannot set quota on /test. Name node is in safe mode.</expected-output>
  16362. </comparator>
  16363. </comparators>
  16364. </test>
  16365. <test> <!--Tested -->
  16366. <description>Verifying clrSpaceQuota operation is not permitted in safemode</description>
  16367. <test-commands>
  16368. <command>-fs NAMENODE -mkdir /test </command>
  16369. <dfs-admin-command>-fs NAMENODE -safemode enter </dfs-admin-command>
  16370. <dfs-admin-command>-fs NAMENODE -clrSpaceQuota /test </dfs-admin-command>
  16371. </test-commands>
  16372. <cleanup-commands>
  16373. <dfs-admin-command>-fs NAMENODE -safemode leave </dfs-admin-command>
  16374. <dfs-admin-command>-fs NAMENODE -rm -r /test </dfs-admin-command>
  16375. </cleanup-commands>
  16376. <comparators>
  16377. <comparator>
  16378. <type>SubstringComparator</type>
  16379. <expected-output>clrSpaceQuota: Cannot set quota on /test. Name node is in safe mode.</expected-output>
  16380. </comparator>
  16381. </comparators>
  16382. </test>
  16383. <!-- Tests for find -->
  16384. <test> <!-- TESTED -->
  16385. <description>find: default expression</description>
  16386. <test-commands>
  16387. <command>-fs NAMENODE -mkdir /donotfind</command>
  16388. <command>-fs NAMENODE -mkdir donotfind</command>
  16389. <command>-fs NAMENODE -mkdir /findtest</command>
  16390. <command>-fs NAMENODE -mkdir /findtest/item1</command>
  16391. <command>-fs NAMENODE -mkdir /findtest/item1/item1a</command>
  16392. <command>-fs NAMENODE -touchz /findtest/item1/item1a/item1aa</command>
  16393. <command>-fs NAMENODE -put CLITEST_DATA/data60bytes /findtest/item1/item1b</command>
  16394. <command>-fs NAMENODE -put CLITEST_DATA/data60bytes /findtest/item2</command>
  16395. <command>-fs NAMENODE -mkdir /findtest/item3</command>
  16396. <command>-fs NAMENODE -mkdir /findtest/item4</command>
  16397. <command>-fs NAMENODE -mkdir /findtest/item4/item4a</command>
  16398. <command>-fs NAMENODE -put CLITEST_DATA/data120bytes /findtest/item4/item4b</command>
  16399. <command>-fs NAMENODE -put CLITEST_DATA/data1k /findtest/item5</command>
  16400. <command>-fs NAMENODE -find /findtest</command>
  16401. </test-commands>
  16402. <cleanup-commands>
  16403. <command>-fs NAMENODE -rm -r /donotfind</command>
  16404. <command>-fs NAMENODE -rm -r donotfind</command>
  16405. <command>-fs NAMENODE -rm -r /findtest</command>
  16406. </cleanup-commands>
  16407. <comparators>
  16408. <comparator>
  16409. <type>RegexpAcrossOutputComparator</type>
  16410. <expected-output>^/findtest
  16411. /findtest/item1
  16412. /findtest/item1/item1a
  16413. /findtest/item1/item1a/item1aa
  16414. /findtest/item1/item1b
  16415. /findtest/item2
  16416. /findtest/item3
  16417. /findtest/item4
  16418. /findtest/item4/item4a
  16419. /findtest/item4/item4b
  16420. /findtest/item5
  16421. $</expected-output>
  16422. </comparator>
  16423. </comparators>
  16424. </test>
  16425. <test> <!-- TESTED -->
  16426. <description>find: -print </description>
  16427. <test-commands>
  16428. <command>-fs NAMENODE -mkdir /donotfind</command>
  16429. <command>-fs NAMENODE -mkdir donotfind</command>
  16430. <command>-fs NAMENODE -mkdir /findtest</command>
  16431. <command>-fs NAMENODE -mkdir /findtest/item1</command>
  16432. <command>-fs NAMENODE -mkdir /findtest/item1/item1a</command>
  16433. <command>-fs NAMENODE -touchz /findtest/item1/item1a/item1aa</command>
  16434. <command>-fs NAMENODE -put CLITEST_DATA/data60bytes /findtest/item1/item1b</command>
  16435. <command>-fs NAMENODE -put CLITEST_DATA/data60bytes /findtest/item2</command>
  16436. <command>-fs NAMENODE -mkdir /findtest/item3</command>
  16437. <command>-fs NAMENODE -mkdir /findtest/item4</command>
  16438. <command>-fs NAMENODE -mkdir /findtest/item4/item4a</command>
  16439. <command>-fs NAMENODE -put CLITEST_DATA/data120bytes /findtest/item4/item4b</command>
  16440. <command>-fs NAMENODE -put CLITEST_DATA/data1k /findtest/item5</command>
  16441. <command>-fs NAMENODE -find /findtest -print</command>
  16442. </test-commands>
  16443. <cleanup-commands>
  16444. <command>-fs NAMENODE -rm -r /donotfind</command>
  16445. <command>-fs NAMENODE -rm -r donotfind</command>
  16446. <command>-fs NAMENODE -rm -r /findtest</command>
  16447. </cleanup-commands>
  16448. <comparators>
  16449. <comparator>
  16450. <type>RegexpAcrossOutputComparator</type>
  16451. <expected-output>^/findtest
  16452. /findtest/item1
  16453. /findtest/item1/item1a
  16454. /findtest/item1/item1a/item1aa
  16455. /findtest/item1/item1b
  16456. /findtest/item2
  16457. /findtest/item3
  16458. /findtest/item4
  16459. /findtest/item4/item4a
  16460. /findtest/item4/item4b
  16461. /findtest/item5
  16462. $</expected-output>
  16463. </comparator>
  16464. </comparators>
  16465. </test>
  16466. <test> <!-- TESTED -->
  16467. <description>find: -print (relative path) </description>
  16468. <test-commands>
  16469. <command>-fs NAMENODE -mkdir /donotfind</command>
  16470. <command>-fs NAMENODE -mkdir -p donotfind</command>
  16471. <command>-fs NAMENODE -mkdir -p findtest</command>
  16472. <command>-fs NAMENODE -mkdir -p findtest/item1</command>
  16473. <command>-fs NAMENODE -mkdir -p findtest/item1/item1a</command>
  16474. <command>-fs NAMENODE -touchz findtest/item1/item1a/item1aa</command>
  16475. <command>-fs NAMENODE -put CLITEST_DATA/data60bytes findtest/item1/item1b</command>
  16476. <command>-fs NAMENODE -put CLITEST_DATA/data60bytes findtest/item2</command>
  16477. <command>-fs NAMENODE -mkdir -p findtest/item3</command>
  16478. <command>-fs NAMENODE -mkdir -p findtest/item4</command>
  16479. <command>-fs NAMENODE -mkdir -p findtest/item4/item4a</command>
  16480. <command>-fs NAMENODE -put CLITEST_DATA/data120bytes findtest/item4/item4b</command>
  16481. <command>-fs NAMENODE -put CLITEST_DATA/data1k findtest/item5</command>
  16482. <command>-fs NAMENODE -find findtest -print</command>
  16483. </test-commands>
  16484. <cleanup-commands>
  16485. <command>-fs NAMENODE -rm -r /donotfind</command>
  16486. <command>-fs NAMENODE -rm -r donotfind</command>
  16487. <command>-fs NAMENODE -rm -r findtest</command>
  16488. </cleanup-commands>
  16489. <comparators>
  16490. <comparator>
  16491. <type>RegexpAcrossOutputComparator</type>
  16492. <expected-output>^findtest
  16493. findtest/item1
  16494. findtest/item1/item1a
  16495. findtest/item1/item1a/item1aa
  16496. findtest/item1/item1b
  16497. findtest/item2
  16498. findtest/item3
  16499. findtest/item4
  16500. findtest/item4/item4a
  16501. findtest/item4/item4b
  16502. findtest/item5
  16503. $</expected-output>
  16504. </comparator>
  16505. </comparators>
  16506. </test>
  16507. <test> <!-- TESTED -->
  16508. <description>find: -print (cwd) </description>
  16509. <test-commands>
  16510. <command>-fs NAMENODE -mkdir /donotfind</command>
  16511. <command>-fs NAMENODE -mkdir findtest</command>
  16512. <command>-fs NAMENODE -mkdir findtest/item1</command>
  16513. <command>-fs NAMENODE -mkdir findtest/item1/item1a</command>
  16514. <command>-fs NAMENODE -touchz findtest/item1/item1a/item1aa</command>
  16515. <command>-fs NAMENODE -put CLITEST_DATA/data60bytes findtest/item1/item1b</command>
  16516. <command>-fs NAMENODE -put CLITEST_DATA/data60bytes findtest/item2</command>
  16517. <command>-fs NAMENODE -mkdir findtest/item3</command>
  16518. <command>-fs NAMENODE -mkdir findtest/item4</command>
  16519. <command>-fs NAMENODE -mkdir findtest/item4/item4a</command>
  16520. <command>-fs NAMENODE -put CLITEST_DATA/data120bytes findtest/item4/item4b</command>
  16521. <command>-fs NAMENODE -put CLITEST_DATA/data1k findtest/item5</command>
  16522. <command>-fs NAMENODE -find -print</command>
  16523. </test-commands>
  16524. <cleanup-commands>
  16525. <command>-fs NAMENODE -rm -r findtest</command>
  16526. <command>-fs NAMENODE -rm -r /donotfind</command>
  16527. </cleanup-commands>
  16528. <comparators>
  16529. <comparator>
  16530. <type>RegexpAcrossOutputComparator</type>
  16531. <expected-output>^.
  16532. findtest
  16533. findtest/item1
  16534. findtest/item1/item1a
  16535. findtest/item1/item1a/item1aa
  16536. findtest/item1/item1b
  16537. findtest/item2
  16538. findtest/item3
  16539. findtest/item4
  16540. findtest/item4/item4a
  16541. findtest/item4/item4b
  16542. findtest/item5
  16543. $</expected-output>
  16544. </comparator>
  16545. </comparators>
  16546. </test>
  16547. <test> <!-- TESTED -->
  16548. <description>find: -name </description>
  16549. <test-commands>
  16550. <command>-fs NAMENODE -mkdir /findtest</command>
  16551. <command>-fs NAMENODE -mkdir /findtest/item1</command>
  16552. <command>-fs NAMENODE -mkdir /findtest/item1/item1a</command>
  16553. <command>-fs NAMENODE -touchz /findtest/item1/item1a/item1aa</command>
  16554. <command>-fs NAMENODE -put CLITEST_DATA/data60bytes /findtest/item1/item1b</command>
  16555. <command>-fs NAMENODE -put CLITEST_DATA/data60bytes /findtest/item2</command>
  16556. <command>-fs NAMENODE -mkdir /findtest/item3</command>
  16557. <command>-fs NAMENODE -mkdir /findtest/item4</command>
  16558. <command>-fs NAMENODE -mkdir /findtest/item4/item4a</command>
  16559. <command>-fs NAMENODE -put CLITEST_DATA/data120bytes /findtest/item4/item4b</command>
  16560. <command>-fs NAMENODE -put CLITEST_DATA/data1k /findtest/item5</command>
  16561. <command>-fs NAMENODE -find /findtest -name item*a</command>
  16562. </test-commands>
  16563. <cleanup-commands>
  16564. <command>-fs NAMENODE -rm -r /findtest</command>
  16565. </cleanup-commands>
  16566. <comparators>
  16567. <comparator>
  16568. <type>RegexpAcrossOutputComparator</type>
  16569. <expected-output>^/findtest/item1/item1a
  16570. /findtest/item1/item1a/item1aa
  16571. /findtest/item4/item4a
  16572. $</expected-output>
  16573. </comparator>
  16574. </comparators>
  16575. </test>
  16576. <test> <!-- TESTED -->
  16577. <description>find: -iname </description>
  16578. <test-commands>
  16579. <command>-fs NAMENODE -mkdir /findtest</command>
  16580. <command>-fs NAMENODE -mkdir /findtest/item1</command>
  16581. <command>-fs NAMENODE -mkdir /findtest/item1/item1a</command>
  16582. <command>-fs NAMENODE -touchz /findtest/item1/item1a/item1aa</command>
  16583. <command>-fs NAMENODE -put CLITEST_DATA/data60bytes /findtest/item1/item1b</command>
  16584. <command>-fs NAMENODE -put CLITEST_DATA/data60bytes /findtest/item2</command>
  16585. <command>-fs NAMENODE -mkdir /findtest/item3</command>
  16586. <command>-fs NAMENODE -mkdir /findtest/item4</command>
  16587. <command>-fs NAMENODE -mkdir /findtest/item4/item4a</command>
  16588. <command>-fs NAMENODE -put CLITEST_DATA/data120bytes /findtest/item4/item4b</command>
  16589. <command>-fs NAMENODE -put CLITEST_DATA/data1k /findtest/item5</command>
  16590. <command>-fs NAMENODE -find /findtest -iname ITEM*a</command>
  16591. </test-commands>
  16592. <cleanup-commands>
  16593. <command>-fs NAMENODE -rm -r /findtest</command>
  16594. </cleanup-commands>
  16595. <comparators>
  16596. <comparator>
  16597. <type>RegexpAcrossOutputComparator</type>
  16598. <expected-output>^/findtest/item1/item1a
  16599. /findtest/item1/item1a/item1aa
  16600. /findtest/item4/item4a
  16601. $</expected-output>
  16602. </comparator>
  16603. </comparators>
  16604. </test>
  16605. <test> <!-- TESTED -->
  16606. <description>truncate to 5 bytes after waiting for block recovery to complete</description>
  16607. <test-commands>
  16608. <command>-fs NAMENODE -mkdir -p /user/USERNAME/dir0</command>
  16609. <command>-fs NAMENODE -put CLITEST_DATA/data120bytes /user/USERNAME/dir0</command>
  16610. <command>-fs NAMENODE -truncate -w 5 /user/USERNAME/dir0/data120bytes</command>
  16611. <command>-fs NAMENODE -cat /user/USERNAME/dir0/data120bytes</command>
  16612. </test-commands>
  16613. <cleanup-commands>
  16614. <command>-fs NAMENODE -rm -r /user/USERNAME/dir0</command>
  16615. </cleanup-commands>
  16616. <comparators>
  16617. <comparator>
  16618. <type>RegexpComparator</type>
  16619. <expected-output>12345</expected-output>
  16620. </comparator>
  16621. </comparators>
  16622. </test>
  16623. <test> <!-- TESTED -->
  16624. <description>truncate to greater length than length of file</description>
  16625. <test-commands>
  16626. <command>-fs NAMENODE -mkdir /user/USERNAME/dir0</command>
  16627. <command>-fs NAMENODE -put CLITEST_DATA/data15bytes /user/USERNAME/dir0</command>
  16628. <command>-fs NAMENODE -truncate -w 50 /user/USERNAME/dir0/data15bytes</command>
  16629. <command>-fs NAMENODE -cat /user/USERNAME/dir0/data15bytes</command>
  16630. </test-commands>
  16631. <cleanup-commands>
  16632. <command>-fs NAMENODE -rm -r /user/USERNAME/dir0</command>
  16633. </cleanup-commands>
  16634. <comparators>
  16635. <comparator>
  16636. <type>RegexpComparator</type>
  16637. <expected-output>12345678901234</expected-output>
  16638. </comparator>
  16639. </comparators>
  16640. </test>
  16641. </tests>
  16642. </configuration>