testHDFSConf.xml 786 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734883489349034913492349334943495349634973498349935003501350235033504350535063507350835093510351135123513351435153516351735183519352035213522352335243525352635273528352935303531353235333534353535363537353835393540354135423543354435453546354735483549355035513552355335543555355635573558355935603561356235633564356535663567356835693570357135723573357435753576357735783579358035813582358335843585358635873588358935903591359235933594359535963597359835993600360136023603360436053606360736083609361036113612361336143615361636173618361936203621362236233624362536263627362836293630363136323633363436353636363736383639364036413642364336443645364636473648364936503651365236533654365536563657365836593660366136623663366436653666366736683669367036713672367336743675367636773678367936803681368236833684368536863687368836893690369136923693369436953696369736983699370037013702370337043705370637073708370937103711371237133714371537163717371837193720372137223723372437253726372737283729373037313732373337343735373637373738373937403741374237433744374537463747374837493750375137523753375437553756375737583759376037613762376337643765376637673768376937703771377237733774377537763777377837793780378137823783378437853786378737883789379037913792379337943795379637973798379938003801380238033804380538063807380838093810381138123813381438153816381738183819382038213822382338243825382638273828382938303831383238333834383538363837383838393840384138423843384438453846384738483849385038513852385338543855385638573858385938603861386238633864386538663867386838693870387138723873387438753876387738783879388038813882388338843885388638873888388938903891389238933894389538963897389838993900390139023903390439053906390739083909391039113912391339143915391639173918391939203921392239233924392539263927392839293930393139323933393439353936393739383939394039413942394339443945394639473948394939503951395239533954395539563957395839593960396139623963396439653966396739683969397039713972397339743975397639773978397939803981398239833984398539863987398839893990399139923993399439953996399739983999400040014002400340044005400640074008400940104011401240134014401540164017401840194020402140224023402440254026402740284029403040314032403340344035403640374038403940404041404240434044404540464047404840494050405140524053405440554056405740584059406040614062406340644065406640674068406940704071407240734074407540764077407840794080408140824083408440854086408740884089409040914092409340944095409640974098409941004101410241034104410541064107410841094110411141124113411441154116411741184119412041214122412341244125412641274128412941304131413241334134413541364137413841394140414141424143414441454146414741484149415041514152415341544155415641574158415941604161416241634164416541664167416841694170417141724173417441754176417741784179418041814182418341844185418641874188418941904191419241934194419541964197419841994200420142024203420442054206420742084209421042114212421342144215421642174218421942204221422242234224422542264227422842294230423142324233423442354236423742384239424042414242424342444245424642474248424942504251425242534254425542564257425842594260426142624263426442654266426742684269427042714272427342744275427642774278427942804281428242834284428542864287428842894290429142924293429442954296429742984299430043014302430343044305430643074308430943104311431243134314431543164317431843194320432143224323432443254326432743284329433043314332433343344335433643374338433943404341434243434344434543464347434843494350435143524353435443554356435743584359436043614362436343644365436643674368436943704371437243734374437543764377437843794380438143824383438443854386438743884389439043914392439343944395439643974398439944004401440244034404440544064407440844094410441144124413441444154416441744184419442044214422442344244425442644274428442944304431443244334434443544364437443844394440444144424443444444454446444744484449445044514452445344544455445644574458445944604461446244634464446544664467446844694470447144724473447444754476447744784479448044814482448344844485448644874488448944904491449244934494449544964497449844994500450145024503450445054506450745084509451045114512451345144515451645174518451945204521452245234524452545264527452845294530453145324533453445354536453745384539454045414542454345444545454645474548454945504551455245534554455545564557455845594560456145624563456445654566456745684569457045714572457345744575457645774578457945804581458245834584458545864587458845894590459145924593459445954596459745984599460046014602460346044605460646074608460946104611461246134614461546164617461846194620462146224623462446254626462746284629463046314632463346344635463646374638463946404641464246434644464546464647464846494650465146524653465446554656465746584659466046614662466346644665466646674668466946704671467246734674467546764677467846794680468146824683468446854686468746884689469046914692469346944695469646974698469947004701470247034704470547064707470847094710471147124713471447154716471747184719472047214722472347244725472647274728472947304731473247334734473547364737473847394740474147424743474447454746474747484749475047514752475347544755475647574758475947604761476247634764476547664767476847694770477147724773477447754776477747784779478047814782478347844785478647874788478947904791479247934794479547964797479847994800480148024803480448054806480748084809481048114812481348144815481648174818481948204821482248234824482548264827482848294830483148324833483448354836483748384839484048414842484348444845484648474848484948504851485248534854485548564857485848594860486148624863486448654866486748684869487048714872487348744875487648774878487948804881488248834884488548864887488848894890489148924893489448954896489748984899490049014902490349044905490649074908490949104911491249134914491549164917491849194920492149224923492449254926492749284929493049314932493349344935493649374938493949404941494249434944494549464947494849494950495149524953495449554956495749584959496049614962496349644965496649674968496949704971497249734974497549764977497849794980498149824983498449854986498749884989499049914992499349944995499649974998499950005001500250035004500550065007500850095010501150125013501450155016501750185019502050215022502350245025502650275028502950305031503250335034503550365037503850395040504150425043504450455046504750485049505050515052505350545055505650575058505950605061506250635064506550665067506850695070507150725073507450755076507750785079508050815082508350845085508650875088508950905091509250935094509550965097509850995100510151025103510451055106510751085109511051115112511351145115511651175118511951205121512251235124512551265127512851295130513151325133513451355136513751385139514051415142514351445145514651475148514951505151515251535154515551565157515851595160516151625163516451655166516751685169517051715172517351745175517651775178517951805181518251835184518551865187518851895190519151925193519451955196519751985199520052015202520352045205520652075208520952105211521252135214521552165217521852195220522152225223522452255226522752285229523052315232523352345235523652375238523952405241524252435244524552465247524852495250525152525253525452555256525752585259526052615262526352645265526652675268526952705271527252735274527552765277527852795280528152825283528452855286528752885289529052915292529352945295529652975298529953005301530253035304530553065307530853095310531153125313531453155316531753185319532053215322532353245325532653275328532953305331533253335334533553365337533853395340534153425343534453455346534753485349535053515352535353545355535653575358535953605361536253635364536553665367536853695370537153725373537453755376537753785379538053815382538353845385538653875388538953905391539253935394539553965397539853995400540154025403540454055406540754085409541054115412541354145415541654175418541954205421542254235424542554265427542854295430543154325433543454355436543754385439544054415442544354445445544654475448544954505451545254535454545554565457545854595460546154625463546454655466546754685469547054715472547354745475547654775478547954805481548254835484548554865487548854895490549154925493549454955496549754985499550055015502550355045505550655075508550955105511551255135514551555165517551855195520552155225523552455255526552755285529553055315532553355345535553655375538553955405541554255435544554555465547554855495550555155525553555455555556555755585559556055615562556355645565556655675568556955705571557255735574557555765577557855795580558155825583558455855586558755885589559055915592559355945595559655975598559956005601560256035604560556065607560856095610561156125613561456155616561756185619562056215622562356245625562656275628562956305631563256335634563556365637563856395640564156425643564456455646564756485649565056515652565356545655565656575658565956605661566256635664566556665667566856695670567156725673567456755676567756785679568056815682568356845685568656875688568956905691569256935694569556965697569856995700570157025703570457055706570757085709571057115712571357145715571657175718571957205721572257235724572557265727572857295730573157325733573457355736573757385739574057415742574357445745574657475748574957505751575257535754575557565757575857595760576157625763576457655766576757685769577057715772577357745775577657775778577957805781578257835784578557865787578857895790579157925793579457955796579757985799580058015802580358045805580658075808580958105811581258135814581558165817581858195820582158225823582458255826582758285829583058315832583358345835583658375838583958405841584258435844584558465847584858495850585158525853585458555856585758585859586058615862586358645865586658675868586958705871587258735874587558765877587858795880588158825883588458855886588758885889589058915892589358945895589658975898589959005901590259035904590559065907590859095910591159125913591459155916591759185919592059215922592359245925592659275928592959305931593259335934593559365937593859395940594159425943594459455946594759485949595059515952595359545955595659575958595959605961596259635964596559665967596859695970597159725973597459755976597759785979598059815982598359845985598659875988598959905991599259935994599559965997599859996000600160026003600460056006600760086009601060116012601360146015601660176018601960206021602260236024602560266027602860296030603160326033603460356036603760386039604060416042604360446045604660476048604960506051605260536054605560566057605860596060606160626063606460656066606760686069607060716072607360746075607660776078607960806081608260836084608560866087608860896090609160926093609460956096609760986099610061016102610361046105610661076108610961106111611261136114611561166117611861196120612161226123612461256126612761286129613061316132613361346135613661376138613961406141614261436144614561466147614861496150615161526153615461556156615761586159616061616162616361646165616661676168616961706171617261736174617561766177617861796180618161826183618461856186618761886189619061916192619361946195619661976198619962006201620262036204620562066207620862096210621162126213621462156216621762186219622062216222622362246225622662276228622962306231623262336234623562366237623862396240624162426243624462456246624762486249625062516252625362546255625662576258625962606261626262636264626562666267626862696270627162726273627462756276627762786279628062816282628362846285628662876288628962906291629262936294629562966297629862996300630163026303630463056306630763086309631063116312631363146315631663176318631963206321632263236324632563266327632863296330633163326333633463356336633763386339634063416342634363446345634663476348634963506351635263536354635563566357635863596360636163626363636463656366636763686369637063716372637363746375637663776378637963806381638263836384638563866387638863896390639163926393639463956396639763986399640064016402640364046405640664076408640964106411641264136414641564166417641864196420642164226423642464256426642764286429643064316432643364346435643664376438643964406441644264436444644564466447644864496450645164526453645464556456645764586459646064616462646364646465646664676468646964706471647264736474647564766477647864796480648164826483648464856486648764886489649064916492649364946495649664976498649965006501650265036504650565066507650865096510651165126513651465156516651765186519652065216522652365246525652665276528652965306531653265336534653565366537653865396540654165426543654465456546654765486549655065516552655365546555655665576558655965606561656265636564656565666567656865696570657165726573657465756576657765786579658065816582658365846585658665876588658965906591659265936594659565966597659865996600660166026603660466056606660766086609661066116612661366146615661666176618661966206621662266236624662566266627662866296630663166326633663466356636663766386639664066416642664366446645664666476648664966506651665266536654665566566657665866596660666166626663666466656666666766686669667066716672667366746675667666776678667966806681668266836684668566866687668866896690669166926693669466956696669766986699670067016702670367046705670667076708670967106711671267136714671567166717671867196720672167226723672467256726672767286729673067316732673367346735673667376738673967406741674267436744674567466747674867496750675167526753675467556756675767586759676067616762676367646765676667676768676967706771677267736774677567766777677867796780678167826783678467856786678767886789679067916792679367946795679667976798679968006801680268036804680568066807680868096810681168126813681468156816681768186819682068216822682368246825682668276828682968306831683268336834683568366837683868396840684168426843684468456846684768486849685068516852685368546855685668576858685968606861686268636864686568666867686868696870687168726873687468756876687768786879688068816882688368846885688668876888688968906891689268936894689568966897689868996900690169026903690469056906690769086909691069116912691369146915691669176918691969206921692269236924692569266927692869296930693169326933693469356936693769386939694069416942694369446945694669476948694969506951695269536954695569566957695869596960696169626963696469656966696769686969697069716972697369746975697669776978697969806981698269836984698569866987698869896990699169926993699469956996699769986999700070017002700370047005700670077008700970107011701270137014701570167017701870197020702170227023702470257026702770287029703070317032703370347035703670377038703970407041704270437044704570467047704870497050705170527053705470557056705770587059706070617062706370647065706670677068706970707071707270737074707570767077707870797080708170827083708470857086708770887089709070917092709370947095709670977098709971007101710271037104710571067107710871097110711171127113711471157116711771187119712071217122712371247125712671277128712971307131713271337134713571367137713871397140714171427143714471457146714771487149715071517152715371547155715671577158715971607161716271637164716571667167716871697170717171727173717471757176717771787179718071817182718371847185718671877188718971907191719271937194719571967197719871997200720172027203720472057206720772087209721072117212721372147215721672177218721972207221722272237224722572267227722872297230723172327233723472357236723772387239724072417242724372447245724672477248724972507251725272537254725572567257725872597260726172627263726472657266726772687269727072717272727372747275727672777278727972807281728272837284728572867287728872897290729172927293729472957296729772987299730073017302730373047305730673077308730973107311731273137314731573167317731873197320732173227323732473257326732773287329733073317332733373347335733673377338733973407341734273437344734573467347734873497350735173527353735473557356735773587359736073617362736373647365736673677368736973707371737273737374737573767377737873797380738173827383738473857386738773887389739073917392739373947395739673977398739974007401740274037404740574067407740874097410741174127413741474157416741774187419742074217422742374247425742674277428742974307431743274337434743574367437743874397440744174427443744474457446744774487449745074517452745374547455745674577458745974607461746274637464746574667467746874697470747174727473747474757476747774787479748074817482748374847485748674877488748974907491749274937494749574967497749874997500750175027503750475057506750775087509751075117512751375147515751675177518751975207521752275237524752575267527752875297530753175327533753475357536753775387539754075417542754375447545754675477548754975507551755275537554755575567557755875597560756175627563756475657566756775687569757075717572757375747575757675777578757975807581758275837584758575867587758875897590759175927593759475957596759775987599760076017602760376047605760676077608760976107611761276137614761576167617761876197620762176227623762476257626762776287629763076317632763376347635763676377638763976407641764276437644764576467647764876497650765176527653765476557656765776587659766076617662766376647665766676677668766976707671767276737674767576767677767876797680768176827683768476857686768776887689769076917692769376947695769676977698769977007701770277037704770577067707770877097710771177127713771477157716771777187719772077217722772377247725772677277728772977307731773277337734773577367737773877397740774177427743774477457746774777487749775077517752775377547755775677577758775977607761776277637764776577667767776877697770777177727773777477757776777777787779778077817782778377847785778677877788778977907791779277937794779577967797779877997800780178027803780478057806780778087809781078117812781378147815781678177818781978207821782278237824782578267827782878297830783178327833783478357836783778387839784078417842784378447845784678477848784978507851785278537854785578567857785878597860786178627863786478657866786778687869787078717872787378747875787678777878787978807881788278837884788578867887788878897890789178927893789478957896789778987899790079017902790379047905790679077908790979107911791279137914791579167917791879197920792179227923792479257926792779287929793079317932793379347935793679377938793979407941794279437944794579467947794879497950795179527953795479557956795779587959796079617962796379647965796679677968796979707971797279737974797579767977797879797980798179827983798479857986798779887989799079917992799379947995799679977998799980008001800280038004800580068007800880098010801180128013801480158016801780188019802080218022802380248025802680278028802980308031803280338034803580368037803880398040804180428043804480458046804780488049805080518052805380548055805680578058805980608061806280638064806580668067806880698070807180728073807480758076807780788079808080818082808380848085808680878088808980908091809280938094809580968097809880998100810181028103810481058106810781088109811081118112811381148115811681178118811981208121812281238124812581268127812881298130813181328133813481358136813781388139814081418142814381448145814681478148814981508151815281538154815581568157815881598160816181628163816481658166816781688169817081718172817381748175817681778178817981808181818281838184818581868187818881898190819181928193819481958196819781988199820082018202820382048205820682078208820982108211821282138214821582168217821882198220822182228223822482258226822782288229823082318232823382348235823682378238823982408241824282438244824582468247824882498250825182528253825482558256825782588259826082618262826382648265826682678268826982708271827282738274827582768277827882798280828182828283828482858286828782888289829082918292829382948295829682978298829983008301830283038304830583068307830883098310831183128313831483158316831783188319832083218322832383248325832683278328832983308331833283338334833583368337833883398340834183428343834483458346834783488349835083518352835383548355835683578358835983608361836283638364836583668367836883698370837183728373837483758376837783788379838083818382838383848385838683878388838983908391839283938394839583968397839883998400840184028403840484058406840784088409841084118412841384148415841684178418841984208421842284238424842584268427842884298430843184328433843484358436843784388439844084418442844384448445844684478448844984508451845284538454845584568457845884598460846184628463846484658466846784688469847084718472847384748475847684778478847984808481848284838484848584868487848884898490849184928493849484958496849784988499850085018502850385048505850685078508850985108511851285138514851585168517851885198520852185228523852485258526852785288529853085318532853385348535853685378538853985408541854285438544854585468547854885498550855185528553855485558556855785588559856085618562856385648565856685678568856985708571857285738574857585768577857885798580858185828583858485858586858785888589859085918592859385948595859685978598859986008601860286038604860586068607860886098610861186128613861486158616861786188619862086218622862386248625862686278628862986308631863286338634863586368637863886398640864186428643864486458646864786488649865086518652865386548655865686578658865986608661866286638664866586668667866886698670867186728673867486758676867786788679868086818682868386848685868686878688868986908691869286938694869586968697869886998700870187028703870487058706870787088709871087118712871387148715871687178718871987208721872287238724872587268727872887298730873187328733873487358736873787388739874087418742874387448745874687478748874987508751875287538754875587568757875887598760876187628763876487658766876787688769877087718772877387748775877687778778877987808781878287838784878587868787878887898790879187928793879487958796879787988799880088018802880388048805880688078808880988108811881288138814881588168817881888198820882188228823882488258826882788288829883088318832883388348835883688378838883988408841884288438844884588468847884888498850885188528853885488558856885788588859886088618862886388648865886688678868886988708871887288738874887588768877887888798880888188828883888488858886888788888889889088918892889388948895889688978898889989008901890289038904890589068907890889098910891189128913891489158916891789188919892089218922892389248925892689278928892989308931893289338934893589368937893889398940894189428943894489458946894789488949895089518952895389548955895689578958895989608961896289638964896589668967896889698970897189728973897489758976897789788979898089818982898389848985898689878988898989908991899289938994899589968997899889999000900190029003900490059006900790089009901090119012901390149015901690179018901990209021902290239024902590269027902890299030903190329033903490359036903790389039904090419042904390449045904690479048904990509051905290539054905590569057905890599060906190629063906490659066906790689069907090719072907390749075907690779078907990809081908290839084908590869087908890899090909190929093909490959096909790989099910091019102910391049105910691079108910991109111911291139114911591169117911891199120912191229123912491259126912791289129913091319132913391349135913691379138913991409141914291439144914591469147914891499150915191529153915491559156915791589159916091619162916391649165916691679168916991709171917291739174917591769177917891799180918191829183918491859186918791889189919091919192919391949195919691979198919992009201920292039204920592069207920892099210921192129213921492159216921792189219922092219222922392249225922692279228922992309231923292339234923592369237923892399240924192429243924492459246924792489249925092519252925392549255925692579258925992609261926292639264926592669267926892699270927192729273927492759276927792789279928092819282928392849285928692879288928992909291929292939294929592969297929892999300930193029303930493059306930793089309931093119312931393149315931693179318931993209321932293239324932593269327932893299330933193329333933493359336933793389339934093419342934393449345934693479348934993509351935293539354935593569357935893599360936193629363936493659366936793689369937093719372937393749375937693779378937993809381938293839384938593869387938893899390939193929393939493959396939793989399940094019402940394049405940694079408940994109411941294139414941594169417941894199420942194229423942494259426942794289429943094319432943394349435943694379438943994409441944294439444944594469447944894499450945194529453945494559456945794589459946094619462946394649465946694679468946994709471947294739474947594769477947894799480948194829483948494859486948794889489949094919492949394949495949694979498949995009501950295039504950595069507950895099510951195129513951495159516951795189519952095219522952395249525952695279528952995309531953295339534953595369537953895399540954195429543954495459546954795489549955095519552955395549555955695579558955995609561956295639564956595669567956895699570957195729573957495759576957795789579958095819582958395849585958695879588958995909591959295939594959595969597959895999600960196029603960496059606960796089609961096119612961396149615961696179618961996209621962296239624962596269627962896299630963196329633963496359636963796389639964096419642964396449645964696479648964996509651965296539654965596569657965896599660966196629663966496659666966796689669967096719672967396749675967696779678967996809681968296839684968596869687968896899690969196929693969496959696969796989699970097019702970397049705970697079708970997109711971297139714971597169717971897199720972197229723972497259726972797289729973097319732973397349735973697379738973997409741974297439744974597469747974897499750975197529753975497559756975797589759976097619762976397649765976697679768976997709771977297739774977597769777977897799780978197829783978497859786978797889789979097919792979397949795979697979798979998009801980298039804980598069807980898099810981198129813981498159816981798189819982098219822982398249825982698279828982998309831983298339834983598369837983898399840984198429843984498459846984798489849985098519852985398549855985698579858985998609861986298639864986598669867986898699870987198729873987498759876987798789879988098819882988398849885988698879888988998909891989298939894989598969897989898999900990199029903990499059906990799089909991099119912991399149915991699179918991999209921992299239924992599269927992899299930993199329933993499359936993799389939994099419942994399449945994699479948994999509951995299539954995599569957995899599960996199629963996499659966996799689969997099719972997399749975997699779978997999809981998299839984998599869987998899899990999199929993999499959996999799989999100001000110002100031000410005100061000710008100091001010011100121001310014100151001610017100181001910020100211002210023100241002510026100271002810029100301003110032100331003410035100361003710038100391004010041100421004310044100451004610047100481004910050100511005210053100541005510056100571005810059100601006110062100631006410065100661006710068100691007010071100721007310074100751007610077100781007910080100811008210083100841008510086100871008810089100901009110092100931009410095100961009710098100991010010101101021010310104101051010610107101081010910110101111011210113101141011510116101171011810119101201012110122101231012410125101261012710128101291013010131101321013310134101351013610137101381013910140101411014210143101441014510146101471014810149101501015110152101531015410155101561015710158101591016010161101621016310164101651016610167101681016910170101711017210173101741017510176101771017810179101801018110182101831018410185101861018710188101891019010191101921019310194101951019610197101981019910200102011020210203102041020510206102071020810209102101021110212102131021410215102161021710218102191022010221102221022310224102251022610227102281022910230102311023210233102341023510236102371023810239102401024110242102431024410245102461024710248102491025010251102521025310254102551025610257102581025910260102611026210263102641026510266102671026810269102701027110272102731027410275102761027710278102791028010281102821028310284102851028610287102881028910290102911029210293102941029510296102971029810299103001030110302103031030410305103061030710308103091031010311103121031310314103151031610317103181031910320103211032210323103241032510326103271032810329103301033110332103331033410335103361033710338103391034010341103421034310344103451034610347103481034910350103511035210353103541035510356103571035810359103601036110362103631036410365103661036710368103691037010371103721037310374103751037610377103781037910380103811038210383103841038510386103871038810389103901039110392103931039410395103961039710398103991040010401104021040310404104051040610407104081040910410104111041210413104141041510416104171041810419104201042110422104231042410425104261042710428104291043010431104321043310434104351043610437104381043910440104411044210443104441044510446104471044810449104501045110452104531045410455104561045710458104591046010461104621046310464104651046610467104681046910470104711047210473104741047510476104771047810479104801048110482104831048410485104861048710488104891049010491104921049310494104951049610497104981049910500105011050210503105041050510506105071050810509105101051110512105131051410515105161051710518105191052010521105221052310524105251052610527105281052910530105311053210533105341053510536105371053810539105401054110542105431054410545105461054710548105491055010551105521055310554105551055610557105581055910560105611056210563105641056510566105671056810569105701057110572105731057410575105761057710578105791058010581105821058310584105851058610587105881058910590105911059210593105941059510596105971059810599106001060110602106031060410605106061060710608106091061010611106121061310614106151061610617106181061910620106211062210623106241062510626106271062810629106301063110632106331063410635106361063710638106391064010641106421064310644106451064610647106481064910650106511065210653106541065510656106571065810659106601066110662106631066410665106661066710668106691067010671106721067310674106751067610677106781067910680106811068210683106841068510686106871068810689106901069110692106931069410695106961069710698106991070010701107021070310704107051070610707107081070910710107111071210713107141071510716107171071810719107201072110722107231072410725107261072710728107291073010731107321073310734107351073610737107381073910740107411074210743107441074510746107471074810749107501075110752107531075410755107561075710758107591076010761107621076310764107651076610767107681076910770107711077210773107741077510776107771077810779107801078110782107831078410785107861078710788107891079010791107921079310794107951079610797107981079910800108011080210803108041080510806108071080810809108101081110812108131081410815108161081710818108191082010821108221082310824108251082610827108281082910830108311083210833108341083510836108371083810839108401084110842108431084410845108461084710848108491085010851108521085310854108551085610857108581085910860108611086210863108641086510866108671086810869108701087110872108731087410875108761087710878108791088010881108821088310884108851088610887108881088910890108911089210893108941089510896108971089810899109001090110902109031090410905109061090710908109091091010911109121091310914109151091610917109181091910920109211092210923109241092510926109271092810929109301093110932109331093410935109361093710938109391094010941109421094310944109451094610947109481094910950109511095210953109541095510956109571095810959109601096110962109631096410965109661096710968109691097010971109721097310974109751097610977109781097910980109811098210983109841098510986109871098810989109901099110992109931099410995109961099710998109991100011001110021100311004110051100611007110081100911010110111101211013110141101511016110171101811019110201102111022110231102411025110261102711028110291103011031110321103311034110351103611037110381103911040110411104211043110441104511046110471104811049110501105111052110531105411055110561105711058110591106011061110621106311064110651106611067110681106911070110711107211073110741107511076110771107811079110801108111082110831108411085110861108711088110891109011091110921109311094110951109611097110981109911100111011110211103111041110511106111071110811109111101111111112111131111411115111161111711118111191112011121111221112311124111251112611127111281112911130111311113211133111341113511136111371113811139111401114111142111431114411145111461114711148111491115011151111521115311154111551115611157111581115911160111611116211163111641116511166111671116811169111701117111172111731117411175111761117711178111791118011181111821118311184111851118611187111881118911190111911119211193111941119511196111971119811199112001120111202112031120411205112061120711208112091121011211112121121311214112151121611217112181121911220112211122211223112241122511226112271122811229112301123111232112331123411235112361123711238112391124011241112421124311244112451124611247112481124911250112511125211253112541125511256112571125811259112601126111262112631126411265112661126711268112691127011271112721127311274112751127611277112781127911280112811128211283112841128511286112871128811289112901129111292112931129411295112961129711298112991130011301113021130311304113051130611307113081130911310113111131211313113141131511316113171131811319113201132111322113231132411325113261132711328113291133011331113321133311334113351133611337113381133911340113411134211343113441134511346113471134811349113501135111352113531135411355113561135711358113591136011361113621136311364113651136611367113681136911370113711137211373113741137511376113771137811379113801138111382113831138411385113861138711388113891139011391113921139311394113951139611397113981139911400114011140211403114041140511406114071140811409114101141111412114131141411415114161141711418114191142011421114221142311424114251142611427114281142911430114311143211433114341143511436114371143811439114401144111442114431144411445114461144711448114491145011451114521145311454114551145611457114581145911460114611146211463114641146511466114671146811469114701147111472114731147411475114761147711478114791148011481114821148311484114851148611487114881148911490114911149211493114941149511496114971149811499115001150111502115031150411505115061150711508115091151011511115121151311514115151151611517115181151911520115211152211523115241152511526115271152811529115301153111532115331153411535115361153711538115391154011541115421154311544115451154611547115481154911550115511155211553115541155511556115571155811559115601156111562115631156411565115661156711568115691157011571115721157311574115751157611577115781157911580115811158211583115841158511586115871158811589115901159111592115931159411595115961159711598115991160011601116021160311604116051160611607116081160911610116111161211613116141161511616116171161811619116201162111622116231162411625116261162711628116291163011631116321163311634116351163611637116381163911640116411164211643116441164511646116471164811649116501165111652116531165411655116561165711658116591166011661116621166311664116651166611667116681166911670116711167211673116741167511676116771167811679116801168111682116831168411685116861168711688116891169011691116921169311694116951169611697116981169911700117011170211703117041170511706117071170811709117101171111712117131171411715117161171711718117191172011721117221172311724117251172611727117281172911730117311173211733117341173511736117371173811739117401174111742117431174411745117461174711748117491175011751117521175311754117551175611757117581175911760117611176211763117641176511766117671176811769117701177111772117731177411775117761177711778117791178011781117821178311784117851178611787117881178911790117911179211793117941179511796117971179811799118001180111802118031180411805118061180711808118091181011811118121181311814118151181611817118181181911820118211182211823118241182511826118271182811829118301183111832118331183411835118361183711838118391184011841118421184311844118451184611847118481184911850118511185211853118541185511856118571185811859118601186111862118631186411865118661186711868118691187011871118721187311874118751187611877118781187911880118811188211883118841188511886118871188811889118901189111892118931189411895118961189711898118991190011901119021190311904119051190611907119081190911910119111191211913119141191511916119171191811919119201192111922119231192411925119261192711928119291193011931119321193311934119351193611937119381193911940119411194211943119441194511946119471194811949119501195111952119531195411955119561195711958119591196011961119621196311964119651196611967119681196911970119711197211973119741197511976119771197811979119801198111982119831198411985119861198711988119891199011991119921199311994119951199611997119981199912000120011200212003120041200512006120071200812009120101201112012120131201412015120161201712018120191202012021120221202312024120251202612027120281202912030120311203212033120341203512036120371203812039120401204112042120431204412045120461204712048120491205012051120521205312054120551205612057120581205912060120611206212063120641206512066120671206812069120701207112072120731207412075120761207712078120791208012081120821208312084120851208612087120881208912090120911209212093120941209512096120971209812099121001210112102121031210412105121061210712108121091211012111121121211312114121151211612117121181211912120121211212212123121241212512126121271212812129121301213112132121331213412135121361213712138121391214012141121421214312144121451214612147121481214912150121511215212153121541215512156121571215812159121601216112162121631216412165121661216712168121691217012171121721217312174121751217612177121781217912180121811218212183121841218512186121871218812189121901219112192121931219412195121961219712198121991220012201122021220312204122051220612207122081220912210122111221212213122141221512216122171221812219122201222112222122231222412225122261222712228122291223012231122321223312234122351223612237122381223912240122411224212243122441224512246122471224812249122501225112252122531225412255122561225712258122591226012261122621226312264122651226612267122681226912270122711227212273122741227512276122771227812279122801228112282122831228412285122861228712288122891229012291122921229312294122951229612297122981229912300123011230212303123041230512306123071230812309123101231112312123131231412315123161231712318123191232012321123221232312324123251232612327123281232912330123311233212333123341233512336123371233812339123401234112342123431234412345123461234712348123491235012351123521235312354123551235612357123581235912360123611236212363123641236512366123671236812369123701237112372123731237412375123761237712378123791238012381123821238312384123851238612387123881238912390123911239212393123941239512396123971239812399124001240112402124031240412405124061240712408124091241012411124121241312414124151241612417124181241912420124211242212423124241242512426124271242812429124301243112432124331243412435124361243712438124391244012441124421244312444124451244612447124481244912450124511245212453124541245512456124571245812459124601246112462124631246412465124661246712468124691247012471124721247312474124751247612477124781247912480124811248212483124841248512486124871248812489124901249112492124931249412495124961249712498124991250012501125021250312504125051250612507125081250912510125111251212513125141251512516125171251812519125201252112522125231252412525125261252712528125291253012531125321253312534125351253612537125381253912540125411254212543125441254512546125471254812549125501255112552125531255412555125561255712558125591256012561125621256312564125651256612567125681256912570125711257212573125741257512576125771257812579125801258112582125831258412585125861258712588125891259012591125921259312594125951259612597125981259912600126011260212603126041260512606126071260812609126101261112612126131261412615126161261712618126191262012621126221262312624126251262612627126281262912630126311263212633126341263512636126371263812639126401264112642126431264412645126461264712648126491265012651126521265312654126551265612657126581265912660126611266212663126641266512666126671266812669126701267112672126731267412675126761267712678126791268012681126821268312684126851268612687126881268912690126911269212693126941269512696126971269812699127001270112702127031270412705127061270712708127091271012711127121271312714127151271612717127181271912720127211272212723127241272512726127271272812729127301273112732127331273412735127361273712738127391274012741127421274312744127451274612747127481274912750127511275212753127541275512756127571275812759127601276112762127631276412765127661276712768127691277012771127721277312774127751277612777127781277912780127811278212783127841278512786127871278812789127901279112792127931279412795127961279712798127991280012801128021280312804128051280612807128081280912810128111281212813128141281512816128171281812819128201282112822128231282412825128261282712828128291283012831128321283312834128351283612837128381283912840128411284212843128441284512846128471284812849128501285112852128531285412855128561285712858128591286012861128621286312864128651286612867128681286912870128711287212873128741287512876128771287812879128801288112882128831288412885128861288712888128891289012891128921289312894128951289612897128981289912900129011290212903129041290512906129071290812909129101291112912129131291412915129161291712918129191292012921129221292312924129251292612927129281292912930129311293212933129341293512936129371293812939129401294112942129431294412945129461294712948129491295012951129521295312954129551295612957129581295912960129611296212963129641296512966129671296812969129701297112972129731297412975129761297712978129791298012981129821298312984129851298612987129881298912990129911299212993129941299512996129971299812999130001300113002130031300413005130061300713008130091301013011130121301313014130151301613017130181301913020130211302213023130241302513026130271302813029130301303113032130331303413035130361303713038130391304013041130421304313044130451304613047130481304913050130511305213053130541305513056130571305813059130601306113062130631306413065130661306713068130691307013071130721307313074130751307613077130781307913080130811308213083130841308513086130871308813089130901309113092130931309413095130961309713098130991310013101131021310313104131051310613107131081310913110131111311213113131141311513116131171311813119131201312113122131231312413125131261312713128131291313013131131321313313134131351313613137131381313913140131411314213143131441314513146131471314813149131501315113152131531315413155131561315713158131591316013161131621316313164131651316613167131681316913170131711317213173131741317513176131771317813179131801318113182131831318413185131861318713188131891319013191131921319313194131951319613197131981319913200132011320213203132041320513206132071320813209132101321113212132131321413215132161321713218132191322013221132221322313224132251322613227132281322913230132311323213233132341323513236132371323813239132401324113242132431324413245132461324713248132491325013251132521325313254132551325613257132581325913260132611326213263132641326513266132671326813269132701327113272132731327413275132761327713278132791328013281132821328313284132851328613287132881328913290132911329213293132941329513296132971329813299133001330113302133031330413305133061330713308133091331013311133121331313314133151331613317133181331913320133211332213323133241332513326133271332813329133301333113332133331333413335133361333713338133391334013341133421334313344133451334613347133481334913350133511335213353133541335513356133571335813359133601336113362133631336413365133661336713368133691337013371133721337313374133751337613377133781337913380133811338213383133841338513386133871338813389133901339113392133931339413395133961339713398133991340013401134021340313404134051340613407134081340913410134111341213413134141341513416134171341813419134201342113422134231342413425134261342713428134291343013431134321343313434134351343613437134381343913440134411344213443134441344513446134471344813449134501345113452134531345413455134561345713458134591346013461134621346313464134651346613467134681346913470134711347213473134741347513476134771347813479134801348113482134831348413485134861348713488134891349013491134921349313494134951349613497134981349913500135011350213503135041350513506135071350813509135101351113512135131351413515135161351713518135191352013521135221352313524135251352613527135281352913530135311353213533135341353513536135371353813539135401354113542135431354413545135461354713548135491355013551135521355313554135551355613557135581355913560135611356213563135641356513566135671356813569135701357113572135731357413575135761357713578135791358013581135821358313584135851358613587135881358913590135911359213593135941359513596135971359813599136001360113602136031360413605136061360713608136091361013611136121361313614136151361613617136181361913620136211362213623136241362513626136271362813629136301363113632136331363413635136361363713638136391364013641136421364313644136451364613647136481364913650136511365213653136541365513656136571365813659136601366113662136631366413665136661366713668136691367013671136721367313674136751367613677136781367913680136811368213683136841368513686136871368813689136901369113692136931369413695136961369713698136991370013701137021370313704137051370613707137081370913710137111371213713137141371513716137171371813719137201372113722137231372413725137261372713728137291373013731137321373313734137351373613737137381373913740137411374213743137441374513746137471374813749137501375113752137531375413755137561375713758137591376013761137621376313764137651376613767137681376913770137711377213773137741377513776137771377813779137801378113782137831378413785137861378713788137891379013791137921379313794137951379613797137981379913800138011380213803138041380513806138071380813809138101381113812138131381413815138161381713818138191382013821138221382313824138251382613827138281382913830138311383213833138341383513836138371383813839138401384113842138431384413845138461384713848138491385013851138521385313854138551385613857138581385913860138611386213863138641386513866138671386813869138701387113872138731387413875138761387713878138791388013881138821388313884138851388613887138881388913890138911389213893138941389513896138971389813899139001390113902139031390413905139061390713908139091391013911139121391313914139151391613917139181391913920139211392213923139241392513926139271392813929139301393113932139331393413935139361393713938139391394013941139421394313944139451394613947139481394913950139511395213953139541395513956139571395813959139601396113962139631396413965139661396713968139691397013971139721397313974139751397613977139781397913980139811398213983139841398513986139871398813989139901399113992139931399413995139961399713998139991400014001140021400314004140051400614007140081400914010140111401214013140141401514016140171401814019140201402114022140231402414025140261402714028140291403014031140321403314034140351403614037140381403914040140411404214043140441404514046140471404814049140501405114052140531405414055140561405714058140591406014061140621406314064140651406614067140681406914070140711407214073140741407514076140771407814079140801408114082140831408414085140861408714088140891409014091140921409314094140951409614097140981409914100141011410214103141041410514106141071410814109141101411114112141131411414115141161411714118141191412014121141221412314124141251412614127141281412914130141311413214133141341413514136141371413814139141401414114142141431414414145141461414714148141491415014151141521415314154141551415614157141581415914160141611416214163141641416514166141671416814169141701417114172141731417414175141761417714178141791418014181141821418314184141851418614187141881418914190141911419214193141941419514196141971419814199142001420114202142031420414205142061420714208142091421014211142121421314214142151421614217142181421914220142211422214223142241422514226142271422814229142301423114232142331423414235142361423714238142391424014241142421424314244142451424614247142481424914250142511425214253142541425514256142571425814259142601426114262142631426414265142661426714268142691427014271142721427314274142751427614277142781427914280142811428214283142841428514286142871428814289142901429114292142931429414295142961429714298142991430014301143021430314304143051430614307143081430914310143111431214313143141431514316143171431814319143201432114322143231432414325143261432714328143291433014331143321433314334143351433614337143381433914340143411434214343143441434514346143471434814349143501435114352143531435414355143561435714358143591436014361143621436314364143651436614367143681436914370143711437214373143741437514376143771437814379143801438114382143831438414385143861438714388143891439014391143921439314394143951439614397143981439914400144011440214403144041440514406144071440814409144101441114412144131441414415144161441714418144191442014421144221442314424144251442614427144281442914430144311443214433144341443514436144371443814439144401444114442144431444414445144461444714448144491445014451144521445314454144551445614457144581445914460144611446214463144641446514466144671446814469144701447114472144731447414475144761447714478144791448014481144821448314484144851448614487144881448914490144911449214493144941449514496144971449814499145001450114502145031450414505145061450714508145091451014511145121451314514145151451614517145181451914520145211452214523145241452514526145271452814529145301453114532145331453414535145361453714538145391454014541145421454314544145451454614547145481454914550145511455214553145541455514556145571455814559145601456114562145631456414565145661456714568145691457014571145721457314574145751457614577145781457914580145811458214583145841458514586145871458814589145901459114592145931459414595145961459714598145991460014601146021460314604146051460614607146081460914610146111461214613146141461514616146171461814619146201462114622146231462414625146261462714628146291463014631146321463314634146351463614637146381463914640146411464214643146441464514646146471464814649146501465114652146531465414655146561465714658146591466014661146621466314664146651466614667146681466914670146711467214673146741467514676146771467814679146801468114682146831468414685146861468714688146891469014691146921469314694146951469614697146981469914700147011470214703147041470514706147071470814709147101471114712147131471414715147161471714718147191472014721147221472314724147251472614727147281472914730147311473214733147341473514736147371473814739147401474114742147431474414745147461474714748147491475014751147521475314754147551475614757147581475914760147611476214763147641476514766147671476814769147701477114772147731477414775147761477714778147791478014781147821478314784147851478614787147881478914790147911479214793147941479514796147971479814799148001480114802148031480414805148061480714808148091481014811148121481314814148151481614817148181481914820148211482214823148241482514826148271482814829148301483114832148331483414835148361483714838148391484014841148421484314844148451484614847148481484914850148511485214853148541485514856148571485814859148601486114862148631486414865148661486714868148691487014871148721487314874148751487614877148781487914880148811488214883148841488514886148871488814889148901489114892148931489414895148961489714898148991490014901149021490314904149051490614907149081490914910149111491214913149141491514916149171491814919149201492114922149231492414925149261492714928149291493014931149321493314934149351493614937149381493914940149411494214943149441494514946149471494814949149501495114952149531495414955149561495714958149591496014961149621496314964149651496614967149681496914970149711497214973149741497514976149771497814979149801498114982149831498414985149861498714988149891499014991149921499314994149951499614997149981499915000150011500215003150041500515006150071500815009150101501115012150131501415015150161501715018150191502015021150221502315024150251502615027150281502915030150311503215033150341503515036150371503815039150401504115042150431504415045150461504715048150491505015051150521505315054150551505615057150581505915060150611506215063150641506515066150671506815069150701507115072150731507415075150761507715078150791508015081150821508315084150851508615087150881508915090150911509215093150941509515096150971509815099151001510115102151031510415105151061510715108151091511015111151121511315114151151511615117151181511915120151211512215123151241512515126151271512815129151301513115132151331513415135151361513715138151391514015141151421514315144151451514615147151481514915150151511515215153151541515515156151571515815159151601516115162151631516415165151661516715168151691517015171151721517315174151751517615177151781517915180151811518215183151841518515186151871518815189151901519115192151931519415195151961519715198151991520015201152021520315204152051520615207152081520915210152111521215213152141521515216152171521815219152201522115222152231522415225152261522715228152291523015231152321523315234152351523615237152381523915240152411524215243152441524515246152471524815249152501525115252152531525415255152561525715258152591526015261152621526315264152651526615267152681526915270152711527215273152741527515276152771527815279152801528115282152831528415285152861528715288152891529015291152921529315294152951529615297152981529915300153011530215303153041530515306153071530815309153101531115312153131531415315153161531715318153191532015321153221532315324153251532615327153281532915330153311533215333153341533515336153371533815339153401534115342153431534415345153461534715348153491535015351153521535315354153551535615357153581535915360153611536215363153641536515366153671536815369153701537115372153731537415375153761537715378153791538015381153821538315384153851538615387153881538915390153911539215393153941539515396153971539815399154001540115402154031540415405154061540715408154091541015411154121541315414154151541615417154181541915420154211542215423154241542515426154271542815429154301543115432154331543415435154361543715438154391544015441154421544315444154451544615447154481544915450154511545215453154541545515456154571545815459154601546115462154631546415465154661546715468154691547015471154721547315474154751547615477154781547915480154811548215483154841548515486154871548815489154901549115492154931549415495154961549715498154991550015501155021550315504155051550615507155081550915510155111551215513155141551515516155171551815519155201552115522155231552415525155261552715528155291553015531155321553315534155351553615537155381553915540155411554215543155441554515546155471554815549155501555115552155531555415555155561555715558155591556015561155621556315564155651556615567155681556915570155711557215573155741557515576155771557815579155801558115582155831558415585155861558715588155891559015591155921559315594155951559615597155981559915600156011560215603156041560515606156071560815609156101561115612156131561415615156161561715618156191562015621156221562315624156251562615627156281562915630156311563215633156341563515636156371563815639156401564115642156431564415645156461564715648156491565015651156521565315654156551565615657156581565915660156611566215663156641566515666156671566815669156701567115672156731567415675156761567715678156791568015681156821568315684156851568615687156881568915690156911569215693156941569515696156971569815699157001570115702157031570415705157061570715708157091571015711157121571315714157151571615717157181571915720157211572215723157241572515726157271572815729157301573115732157331573415735157361573715738157391574015741157421574315744157451574615747157481574915750157511575215753157541575515756157571575815759157601576115762157631576415765157661576715768157691577015771157721577315774157751577615777157781577915780157811578215783157841578515786157871578815789157901579115792157931579415795157961579715798157991580015801158021580315804158051580615807158081580915810158111581215813158141581515816158171581815819158201582115822158231582415825158261582715828158291583015831158321583315834158351583615837158381583915840158411584215843158441584515846158471584815849158501585115852158531585415855158561585715858158591586015861158621586315864158651586615867158681586915870158711587215873158741587515876158771587815879158801588115882158831588415885158861588715888158891589015891158921589315894158951589615897158981589915900159011590215903159041590515906159071590815909159101591115912159131591415915159161591715918159191592015921159221592315924159251592615927159281592915930159311593215933159341593515936159371593815939159401594115942159431594415945159461594715948159491595015951159521595315954159551595615957159581595915960159611596215963159641596515966159671596815969159701597115972159731597415975159761597715978159791598015981159821598315984159851598615987159881598915990159911599215993159941599515996159971599815999160001600116002160031600416005160061600716008160091601016011160121601316014160151601616017160181601916020160211602216023160241602516026160271602816029160301603116032160331603416035160361603716038160391604016041160421604316044160451604616047160481604916050160511605216053160541605516056160571605816059160601606116062160631606416065160661606716068160691607016071160721607316074160751607616077160781607916080160811608216083160841608516086160871608816089160901609116092160931609416095160961609716098160991610016101161021610316104161051610616107161081610916110161111611216113161141611516116161171611816119161201612116122161231612416125161261612716128161291613016131161321613316134161351613616137161381613916140161411614216143161441614516146161471614816149161501615116152161531615416155161561615716158161591616016161161621616316164161651616616167161681616916170161711617216173161741617516176161771617816179161801618116182161831618416185161861618716188161891619016191161921619316194161951619616197161981619916200162011620216203162041620516206162071620816209162101621116212162131621416215162161621716218162191622016221162221622316224162251622616227162281622916230162311623216233162341623516236162371623816239162401624116242162431624416245162461624716248162491625016251162521625316254162551625616257162581625916260162611626216263162641626516266162671626816269162701627116272162731627416275162761627716278162791628016281162821628316284162851628616287162881628916290162911629216293162941629516296162971629816299163001630116302163031630416305163061630716308163091631016311163121631316314163151631616317163181631916320163211632216323163241632516326163271632816329163301633116332163331633416335163361633716338163391634016341163421634316344163451634616347163481634916350163511635216353163541635516356163571635816359163601636116362163631636416365163661636716368163691637016371163721637316374163751637616377163781637916380163811638216383163841638516386163871638816389163901639116392163931639416395163961639716398163991640016401164021640316404164051640616407164081640916410164111641216413164141641516416164171641816419164201642116422164231642416425164261642716428164291643016431164321643316434164351643616437164381643916440164411644216443164441644516446164471644816449164501645116452164531645416455164561645716458164591646016461164621646316464164651646616467164681646916470164711647216473164741647516476164771647816479164801648116482164831648416485164861648716488164891649016491164921649316494164951649616497164981649916500165011650216503165041650516506165071650816509165101651116512165131651416515165161651716518165191652016521165221652316524165251652616527165281652916530165311653216533165341653516536165371653816539165401654116542165431654416545165461654716548165491655016551165521655316554165551655616557165581655916560165611656216563165641656516566165671656816569165701657116572165731657416575165761657716578165791658016581165821658316584165851658616587165881658916590165911659216593165941659516596165971659816599166001660116602166031660416605166061660716608166091661016611166121661316614166151661616617166181661916620166211662216623166241662516626166271662816629166301663116632166331663416635166361663716638166391664016641166421664316644166451664616647166481664916650166511665216653166541665516656166571665816659166601666116662166631666416665166661666716668166691667016671166721667316674166751667616677166781667916680166811668216683166841668516686166871668816689166901669116692166931669416695166961669716698166991670016701167021670316704167051670616707167081670916710167111671216713167141671516716167171671816719167201672116722167231672416725167261672716728167291673016731167321673316734167351673616737167381673916740167411674216743167441674516746167471674816749167501675116752167531675416755167561675716758167591676016761167621676316764167651676616767167681676916770167711677216773167741677516776167771677816779167801678116782167831678416785167861678716788167891679016791167921679316794167951679616797167981679916800168011680216803168041680516806168071680816809168101681116812168131681416815168161681716818168191682016821168221682316824168251682616827168281682916830168311683216833168341683516836168371683816839168401684116842168431684416845168461684716848168491685016851168521685316854168551685616857168581685916860168611686216863168641686516866168671686816869168701687116872168731687416875168761687716878168791688016881168821688316884168851688616887168881688916890168911689216893168941689516896168971689816899169001690116902169031690416905169061690716908169091691016911169121691316914169151691616917169181691916920169211692216923169241692516926169271692816929169301693116932169331693416935169361693716938169391694016941169421694316944169451694616947169481694916950169511695216953169541695516956169571695816959169601696116962169631696416965169661696716968169691697016971169721697316974169751697616977169781697916980169811698216983169841698516986169871698816989169901699116992169931699416995169961699716998169991700017001170021700317004170051700617007170081700917010170111701217013170141701517016170171701817019170201702117022170231702417025170261702717028170291703017031170321703317034170351703617037170381703917040170411704217043170441704517046170471704817049170501705117052170531705417055170561705717058170591706017061170621706317064170651706617067170681706917070170711707217073170741707517076170771707817079170801708117082170831708417085170861708717088170891709017091170921709317094170951709617097170981709917100171011710217103171041710517106171071710817109171101711117112171131711417115171161711717118171191712017121171221712317124171251712617127171281712917130171311713217133171341713517136171371713817139171401714117142171431714417145171461714717148171491715017151171521715317154171551715617157171581715917160171611716217163171641716517166171671716817169171701717117172171731717417175171761717717178171791718017181171821718317184171851718617187171881718917190171911719217193171941719517196171971719817199172001720117202172031720417205172061720717208172091721017211172121721317214172151721617217172181721917220172211722217223172241722517226172271722817229172301723117232172331723417235172361723717238172391724017241172421724317244172451724617247172481724917250172511725217253172541725517256172571725817259172601726117262172631726417265172661726717268172691727017271172721727317274172751727617277172781727917280172811728217283172841728517286172871728817289172901729117292172931729417295172961729717298172991730017301173021730317304173051730617307173081730917310173111731217313173141731517316173171731817319173201732117322173231732417325173261732717328173291733017331173321733317334173351733617337173381733917340173411734217343173441734517346173471734817349173501735117352173531735417355173561735717358173591736017361173621736317364173651736617367173681736917370173711737217373173741737517376173771737817379173801738117382173831738417385173861738717388173891739017391173921739317394173951739617397173981739917400174011740217403174041740517406174071740817409174101741117412174131741417415174161741717418174191742017421174221742317424174251742617427174281742917430174311743217433174341743517436174371743817439174401744117442174431744417445174461744717448174491745017451174521745317454174551745617457174581745917460174611746217463174641746517466174671746817469174701747117472174731747417475174761747717478174791748017481174821748317484174851748617487174881748917490174911749217493174941749517496
  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+/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+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+data120bytes</expected-output>
  1226. </comparator>
  1227. <comparator>
  1228. <type>RegexpComparator</type>
  1229. <expected-output>^15\s+data15bytes</expected-output>
  1230. </comparator>
  1231. <comparator>
  1232. <type>RegexpComparator</type>
  1233. <expected-output>^30\s+data30bytes</expected-output>
  1234. </comparator>
  1235. <comparator>
  1236. <type>RegexpComparator</type>
  1237. <expected-output>^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+/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+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)*/dir0/data15bytes</expected-output>
  1292. </comparator>
  1293. <comparator>
  1294. <type>RegexpComparator</type>
  1295. <expected-output>^30( |\t)*/dir0/data30bytes</expected-output>
  1296. </comparator>
  1297. <comparator>
  1298. <type>RegexpComparator</type>
  1299. <expected-output>^60( |\t)*/dir0/data60bytes</expected-output>
  1300. </comparator>
  1301. <comparator>
  1302. <type>RegexpComparator</type>
  1303. <expected-output>^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+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+hdfs:///data120bytes</expected-output>
  1339. </comparator>
  1340. <comparator>
  1341. <type>RegexpComparator</type>
  1342. <expected-output>^15\s+hdfs:///data15bytes</expected-output>
  1343. </comparator>
  1344. <comparator>
  1345. <type>RegexpComparator</type>
  1346. <expected-output>^30\s+hdfs:///data30bytes</expected-output>
  1347. </comparator>
  1348. <comparator>
  1349. <type>RegexpComparator</type>
  1350. <expected-output>^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+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+hdfs:///dir0/data15bytes</expected-output>
  1386. </comparator>
  1387. <comparator>
  1388. <type>RegexpComparator</type>
  1389. <expected-output>^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)*hdfs:///dir0/data15bytes</expected-output>
  1410. </comparator>
  1411. <comparator>
  1412. <type>RegexpComparator</type>
  1413. <expected-output>^30( |\t)*hdfs:///dir0/data30bytes</expected-output>
  1414. </comparator>
  1415. <comparator>
  1416. <type>RegexpComparator</type>
  1417. <expected-output>^60( |\t)*hdfs:///dir0/data60bytes</expected-output>
  1418. </comparator>
  1419. <comparator>
  1420. <type>RegexpComparator</type>
  1421. <expected-output>^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)*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)*NAMENODE/data15bytes</expected-output>
  1457. </comparator>
  1458. <comparator>
  1459. <type>RegexpComparator</type>
  1460. <expected-output>^30( |\t)*NAMENODE/data30bytes</expected-output>
  1461. </comparator>
  1462. <comparator>
  1463. <type>RegexpComparator</type>
  1464. <expected-output>^60( |\t)*NAMENODE/data60bytes</expected-output>
  1465. </comparator>
  1466. <comparator>
  1467. <type>RegexpComparator</type>
  1468. <expected-output>^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)*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)*NAMENODE/dir0/data15bytes</expected-output>
  1506. </comparator>
  1507. <comparator>
  1508. <type>RegexpComparator</type>
  1509. <expected-output>^30( |\t)*NAMENODE/dir0/data30bytes</expected-output>
  1510. </comparator>
  1511. <comparator>
  1512. <type>RegexpComparator</type>
  1513. <expected-output>^60( |\t)*NAMENODE/dir0/data60bytes</expected-output>
  1514. </comparator>
  1515. <comparator>
  1516. <type>RegexpComparator</type>
  1517. <expected-output>^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+/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+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+/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+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+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+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+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+/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+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+/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+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+/dir0/data15bytes</expected-output>
  4115. </comparator>
  4116. <comparator>
  4117. <type>RegexpComparator</type>
  4118. <expected-output>^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+dir0/data15bytes</expected-output>
  4136. </comparator>
  4137. <comparator>
  4138. <type>RegexpComparator</type>
  4139. <expected-output>^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+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+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+hdfs:///dir0/data15bytes</expected-output>
  4312. </comparator>
  4313. <comparator>
  4314. <type>RegexpComparator</type>
  4315. <expected-output>^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+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+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+NAMENODE/dir0/data15bytes</expected-output>
  4429. </comparator>
  4430. <comparator>
  4431. <type>RegexpComparator</type>
  4432. <expected-output>^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+/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+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+/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+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+/dir0/data15bytes</expected-output>
  4582. </comparator>
  4583. <comparator>
  4584. <type>RegexpComparator</type>
  4585. <expected-output>^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+dir0/data15bytes</expected-output>
  4603. </comparator>
  4604. <comparator>
  4605. <type>RegexpComparator</type>
  4606. <expected-output>^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+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+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+hdfs:///dir0/data15bytes</expected-output>
  4781. </comparator>
  4782. <comparator>
  4783. <type>RegexpComparator</type>
  4784. <expected-output>^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+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+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+NAMENODE/dir0/data15bytes</expected-output>
  4901. </comparator>
  4902. <comparator>
  4903. <type>RegexpComparator</type>
  4904. <expected-output>^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. <test> <!-- TESTED -->
  5034. <description>getmerge: basic</description>
  5035. <test-commands>
  5036. <command>-fs NAMENODE -mkdir -p /user/USERNAME/dir1</command>
  5037. <command>-fs NAMENODE -copyFromLocal CLITEST_DATA/data15bytes /user/USERNAME/dir1</command>
  5038. <command>-fs NAMENODE -copyFromLocal CLITEST_DATA/data30bytes /user/USERNAME/dir1</command>
  5039. <command>-fs NAMENODE -getmerge /user/USERNAME/dir1 CLITEST_DATA/file</command>
  5040. <command>-cat CLITEST_DATA/file</command>
  5041. </test-commands>
  5042. <cleanup-commands>
  5043. <command>-fs NAMENODE -rm -r /user/USERNAME CLITEST_DATA/file</command>
  5044. <command>rm data</command>
  5045. </cleanup-commands>
  5046. <comparators>
  5047. <comparator>
  5048. <type>ExactComparator</type>
  5049. <expected-output>12345678901234
  5050. 12345678901234
  5051. 12345678901234
  5052. </expected-output>
  5053. </comparator>
  5054. </comparators>
  5055. </test>
  5056. <test> <!-- TESTED -->
  5057. <description>getmerge: with file</description>
  5058. <test-commands>
  5059. <command>-fs NAMENODE -mkdir -p /user/USERNAME/dir1</command>
  5060. <command>-fs NAMENODE -copyFromLocal CLITEST_DATA/data15bytes /user/USERNAME/dir1</command>
  5061. <command>-fs NAMENODE -getmerge /user/USERNAME/dir1/data15bytes CLITEST_DATA/file</command>
  5062. <command>-cat CLITEST_DATA/file</command>
  5063. </test-commands>
  5064. <cleanup-commands>
  5065. <command>-fs NAMENODE -rm -r /user/USERNAME CLITEST_DATA/file</command>
  5066. <command>rm data</command>
  5067. </cleanup-commands>
  5068. <comparators>
  5069. <comparator>
  5070. <type>ExactComparator</type>
  5071. <expected-output>12345678901234
  5072. </expected-output>
  5073. </comparator>
  5074. </comparators>
  5075. </test>
  5076. <test> <!-- TESTED -->
  5077. <description>getmerge: with multiple files</description>
  5078. <test-commands>
  5079. <command>-fs NAMENODE -mkdir -p /user/USERNAME/dir1</command>
  5080. <command>-fs NAMENODE -copyFromLocal CLITEST_DATA/data15bytes /user/USERNAME/dir1</command>
  5081. <command>-fs NAMENODE -copyFromLocal CLITEST_DATA/data30bytes /user/USERNAME/dir1</command>
  5082. <command>-fs NAMENODE -getmerge /user/USERNAME/dir1/data15bytes /user/USERNAME/dir1/data30bytes CLITEST_DATA/file</command>
  5083. <command>-cat CLITEST_DATA/file</command>
  5084. </test-commands>
  5085. <cleanup-commands>
  5086. <command>-fs NAMENODE -rm -r /user/USERNAME CLITEST_DATA/file</command>
  5087. <command>rm data</command>
  5088. </cleanup-commands>
  5089. <comparators>
  5090. <comparator>
  5091. <type>ExactComparator</type>
  5092. <expected-output>12345678901234
  5093. 12345678901234
  5094. 12345678901234
  5095. </expected-output>
  5096. </comparator>
  5097. </comparators>
  5098. </test>
  5099. <test> <!-- TESTED -->
  5100. <description>getmerge: with newlines</description>
  5101. <test-commands>
  5102. <command>-fs NAMENODE -mkdir -p /user/USERNAME/dir1</command>
  5103. <command>-fs NAMENODE -copyFromLocal CLITEST_DATA/data15bytes /user/USERNAME/dir1</command>
  5104. <command>-fs NAMENODE -copyFromLocal CLITEST_DATA/data30bytes /user/USERNAME/dir1</command>
  5105. <command>-fs NAMENODE -getmerge -nl /user/USERNAME/dir1 CLITEST_DATA/file</command>
  5106. <command>-cat CLITEST_DATA/file</command>
  5107. </test-commands>
  5108. <cleanup-commands>
  5109. <command>-fs NAMENODE -rm -r /user/USERNAME CLITEST_DATA/file</command>
  5110. <command>rm data</command>
  5111. </cleanup-commands>
  5112. <comparators>
  5113. <comparator>
  5114. <type>ExactComparator</type>
  5115. <expected-output>12345678901234
  5116. 12345678901234
  5117. 12345678901234
  5118. </expected-output>
  5119. </comparator>
  5120. </comparators>
  5121. </test>
  5122. <test> <!-- TESTED -->
  5123. <description>getmerge: with multiple files and newlines</description>
  5124. <test-commands>
  5125. <command>-fs NAMENODE -mkdir -p /user/USERNAME/dir1</command>
  5126. <command>-fs NAMENODE -copyFromLocal CLITEST_DATA/data15bytes /user/USERNAME/dir1</command>
  5127. <command>-fs NAMENODE -copyFromLocal CLITEST_DATA/data30bytes /user/USERNAME/dir1</command>
  5128. <command>-fs NAMENODE -getmerge -nl /user/USERNAME/dir1/data15bytes /user/USERNAME/dir1/data30bytes CLITEST_DATA/file</command>
  5129. <command>-cat CLITEST_DATA/file</command>
  5130. </test-commands>
  5131. <cleanup-commands>
  5132. <command>-fs NAMENODE -rm -r /user/USERNAME CLITEST_DATA/file</command>
  5133. <command>rm data</command>
  5134. </cleanup-commands>
  5135. <comparators>
  5136. <comparator>
  5137. <type>ExactComparator</type>
  5138. <expected-output>12345678901234
  5139. 12345678901234
  5140. 12345678901234
  5141. </expected-output>
  5142. </comparator>
  5143. </comparators>
  5144. </test>
  5145. <!-- Tests for cat -->
  5146. <test> <!-- TESTED -->
  5147. <description>cat: contents of file(absolute path)</description>
  5148. <test-commands>
  5149. <command>-fs NAMENODE -put CLITEST_DATA/data15bytes /data15bytes</command>
  5150. <command>-fs NAMENODE -cat /data15bytes</command>
  5151. </test-commands>
  5152. <cleanup-commands>
  5153. <command>-fs NAMENODE -rm /data15bytes</command>
  5154. </cleanup-commands>
  5155. <comparators>
  5156. <comparator>
  5157. <type>TokenComparator</type>
  5158. <expected-output>12345678901234</expected-output>
  5159. </comparator>
  5160. </comparators>
  5161. </test>
  5162. <test>
  5163. <description>cat: contents of file(relative path)</description>
  5164. <test-commands>
  5165. <command>-fs NAMENODE -mkdir -p dir</command> <!-- make sure user home dir exists -->
  5166. <command>-fs NAMENODE -touchz test</command>
  5167. <command>-fs NAMENODE -put CLITEST_DATA/data15bytes data15bytes</command>
  5168. <command>-fs NAMENODE -cat data15bytes</command>
  5169. </test-commands>
  5170. <cleanup-commands>
  5171. <command>-fs NAMENODE -rm -r /user</command>
  5172. </cleanup-commands>
  5173. <comparators>
  5174. <comparator>
  5175. <type>TokenComparator</type>
  5176. <expected-output>12345678901234</expected-output>
  5177. </comparator>
  5178. </comparators>
  5179. </test>
  5180. <test> <!-- TESTED -->
  5181. <description>cat: contents of files(absolute path) using globbing</description>
  5182. <test-commands>
  5183. <command>-fs NAMENODE -mkdir /dir0</command>
  5184. <command>-fs NAMENODE -put CLITEST_DATA/data15bytes /dir0/data15bytes</command>
  5185. <command>-fs NAMENODE -put CLITEST_DATA/data30bytes /dir0/data30bytes</command>
  5186. <command>-fs NAMENODE -put CLITEST_DATA/data60bytes /dir0/data60bytes</command>
  5187. <command>-fs NAMENODE -put CLITEST_DATA/data120bytes /dir0/data120bytes</command>
  5188. <command>-fs NAMENODE -cat /dir0/data*</command>
  5189. </test-commands>
  5190. <cleanup-commands>
  5191. <command>-fs NAMENODE -rm -r /dir0</command>
  5192. </cleanup-commands>
  5193. <comparators>
  5194. <comparator>
  5195. <type>RegexpComparator</type>
  5196. <expected-output>12345678901234.*</expected-output>
  5197. </comparator>
  5198. </comparators>
  5199. </test>
  5200. <test> <!-- TESTED-->
  5201. <description>cat: contents of files(relative path) using globbing</description>
  5202. <test-commands>
  5203. <command>-fs NAMENODE -mkdir -p dir0</command>
  5204. <command>-fs NAMENODE -put CLITEST_DATA/data15bytes dir0/data15bytes</command>
  5205. <command>-fs NAMENODE -put CLITEST_DATA/data30bytes dir0/data30bytes</command>
  5206. <command>-fs NAMENODE -put CLITEST_DATA/data60bytes dir0/data60bytes</command>
  5207. <command>-fs NAMENODE -put CLITEST_DATA/data120bytes dir0/data120bytes</command>
  5208. <command>-fs NAMENODE -cat dir0/data*</command>
  5209. </test-commands>
  5210. <cleanup-commands>
  5211. <command>-fs NAMENODE -rm -r /user</command>
  5212. </cleanup-commands>
  5213. <comparators>
  5214. <comparator>
  5215. <type>RegexpComparator</type>
  5216. <expected-output>12345678901234.*</expected-output>
  5217. </comparator>
  5218. </comparators>
  5219. </test>
  5220. <test> <!-- TESTED -->
  5221. <description>cat: contents of files(absolute path) without globbing</description>
  5222. <test-commands>
  5223. <command>-fs NAMENODE -mkdir /dir0</command>
  5224. <command>-fs NAMENODE -put CLITEST_DATA/data15bytes /dir0/data15bytes</command>
  5225. <command>-fs NAMENODE -put CLITEST_DATA/data30bytes /dir0/data30bytes</command>
  5226. <command>-fs NAMENODE -put CLITEST_DATA/data60bytes /dir0/data60bytes</command>
  5227. <command>-fs NAMENODE -put CLITEST_DATA/data120bytes /dir0/data120bytes</command>
  5228. <command>-fs NAMENODE -cat /dir0/data15bytes /dir0/data30bytes /dir0/data60bytes /dir0/data120bytes</command>
  5229. </test-commands>
  5230. <cleanup-commands>
  5231. <command>-fs NAMENODE -rm -r /dir0</command>
  5232. </cleanup-commands>
  5233. <comparators>
  5234. <comparator>
  5235. <type>RegexpComparator</type>
  5236. <expected-output>12345678901234.*</expected-output>
  5237. </comparator>
  5238. </comparators>
  5239. </test>
  5240. <test> <!-- TESTED-->
  5241. <description>cat: contents of files(relative path) without globbing</description>
  5242. <test-commands>
  5243. <command>-fs NAMENODE -mkdir -p dir0</command>
  5244. <command>-fs NAMENODE -put CLITEST_DATA/data15bytes dir0/data15bytes</command>
  5245. <command>-fs NAMENODE -put CLITEST_DATA/data30bytes dir0/data30bytes</command>
  5246. <command>-fs NAMENODE -put CLITEST_DATA/data60bytes dir0/data60bytes</command>
  5247. <command>-fs NAMENODE -put CLITEST_DATA/data120bytes dir0/data120bytes</command>
  5248. <command>-fs NAMENODE -cat dir0/data15bytes dir0/data30bytes dir0/data60bytes dir0/data120bytes</command>
  5249. </test-commands>
  5250. <cleanup-commands>
  5251. <command>-fs NAMENODE -rm -r /user</command>
  5252. </cleanup-commands>
  5253. <comparators>
  5254. <comparator>
  5255. <type>RegexpComparator</type>
  5256. <expected-output>12345678901234.*</expected-output>
  5257. </comparator>
  5258. </comparators>
  5259. </test>
  5260. <test> <!-- TESTED -->
  5261. <description>cat: contents of file(absolute path) that does not exist</description>
  5262. <test-commands>
  5263. <command>-fs NAMENODE -cat /file</command>
  5264. </test-commands>
  5265. <cleanup-commands>
  5266. </cleanup-commands>
  5267. <comparators>
  5268. <comparator>
  5269. <type>RegexpComparator</type>
  5270. <expected-output>^cat: `/file': No such file or directory</expected-output>
  5271. </comparator>
  5272. </comparators>
  5273. </test>
  5274. <test> <!-- TESTED -->
  5275. <description>cat: contents of file(relative path) that does not exist</description>
  5276. <test-commands>
  5277. <command>-fs NAMENODE -cat file</command>
  5278. </test-commands>
  5279. <cleanup-commands>
  5280. </cleanup-commands>
  5281. <comparators>
  5282. <comparator>
  5283. <type>RegexpComparator</type>
  5284. <expected-output>^cat: `file': No such file or directory</expected-output>
  5285. </comparator>
  5286. </comparators>
  5287. </test>
  5288. <test> <!-- TESTED -->
  5289. <description>cat: contents of directory(absolute path)</description>
  5290. <test-commands>
  5291. <command>-fs NAMENODE -mkdir /dir1</command>
  5292. <command>-fs NAMENODE -cat /dir1</command>
  5293. </test-commands>
  5294. <cleanup-commands>
  5295. <command>-fs NAMENODE -rm -r /dir1</command>
  5296. </cleanup-commands>
  5297. <comparators>
  5298. <comparator>
  5299. <type>RegexpComparator</type>
  5300. <expected-output>^cat: `/dir1': Is a directory</expected-output>
  5301. </comparator>
  5302. </comparators>
  5303. </test>
  5304. <test> <!-- TESTED -->
  5305. <description>cat: contents of directory(relative path)</description>
  5306. <test-commands>
  5307. <command>-fs NAMENODE -mkdir -p dir1</command>
  5308. <command>-fs NAMENODE -cat dir1</command>
  5309. </test-commands>
  5310. <cleanup-commands>
  5311. <command>-fs NAMENODE -rm -r dir1</command>
  5312. </cleanup-commands>
  5313. <comparators>
  5314. <comparator>
  5315. <type>RegexpComparator</type>
  5316. <expected-output>^cat: `dir1': Is a directory</expected-output>
  5317. </comparator>
  5318. </comparators>
  5319. </test>
  5320. <test> <!-- TESTED -->
  5321. <description>cat: Test for hdfs:// path - content of file</description>
  5322. <test-commands>
  5323. <command>-fs NAMENODE -put CLITEST_DATA/data15bytes hdfs:///data15bytes</command>
  5324. <command>-fs NAMENODE -cat hdfs:///data15bytes</command>
  5325. </test-commands>
  5326. <cleanup-commands>
  5327. <command>-fs NAMENODE -rm hdfs:///data15bytes</command>
  5328. </cleanup-commands>
  5329. <comparators>
  5330. <comparator>
  5331. <type>TokenComparator</type>
  5332. <expected-output>12345678901234</expected-output>
  5333. </comparator>
  5334. </comparators>
  5335. </test>
  5336. <test> <!-- TESTED -->
  5337. <description>cat: Test for hdfs:// path - contents of files using globbing</description>
  5338. <test-commands>
  5339. <command>-fs NAMENODE -mkdir hdfs:///dir0</command>
  5340. <command>-fs NAMENODE -put CLITEST_DATA/data15bytes hdfs:///dir0/data15bytes</command>
  5341. <command>-fs NAMENODE -put CLITEST_DATA/data30bytes hdfs:///dir0/data30bytes</command>
  5342. <command>-fs NAMENODE -put CLITEST_DATA/data60bytes hdfs:///dir0/data60bytes</command>
  5343. <command>-fs NAMENODE -put CLITEST_DATA/data120bytes hdfs:///dir0/data120bytes</command>
  5344. <command>-fs NAMENODE -cat hdfs:///dir0/data*</command>
  5345. </test-commands>
  5346. <cleanup-commands>
  5347. <command>-fs NAMENODE -rm -r hdfs:///dir0</command>
  5348. </cleanup-commands>
  5349. <comparators>
  5350. <comparator>
  5351. <type>RegexpComparator</type>
  5352. <expected-output>12345678901234.*</expected-output>
  5353. </comparator>
  5354. </comparators>
  5355. </test>
  5356. <test> <!-- TESTED -->
  5357. <description>cat: Test for hdfs:// path - contents of files without globbing</description>
  5358. <test-commands>
  5359. <command>-fs NAMENODE -mkdir hdfs:///dir0</command>
  5360. <command>-fs NAMENODE -put CLITEST_DATA/data15bytes hdfs:///dir0/data15bytes</command>
  5361. <command>-fs NAMENODE -put CLITEST_DATA/data30bytes hdfs:///dir0/data30bytes</command>
  5362. <command>-fs NAMENODE -put CLITEST_DATA/data60bytes hdfs:///dir0/data60bytes</command>
  5363. <command>-fs NAMENODE -put CLITEST_DATA/data120bytes hdfs:///dir0/data120bytes</command>
  5364. <command>-fs NAMENODE -cat hdfs:///dir0/data15bytes hdfs:///dir0/data30bytes hdfs:///dir0/data60bytes hdfs:///dir0/data120bytes</command>
  5365. </test-commands>
  5366. <cleanup-commands>
  5367. <command>-fs NAMENODE -rm -r hdfs:///dir0</command>
  5368. </cleanup-commands>
  5369. <comparators>
  5370. <comparator>
  5371. <type>RegexpComparator</type>
  5372. <expected-output>12345678901234.*</expected-output>
  5373. </comparator>
  5374. </comparators>
  5375. </test>
  5376. <test> <!-- TESTED -->
  5377. <description>cat: Test for hdfs:// path - contents of file that does not exist</description>
  5378. <test-commands>
  5379. <command>-fs NAMENODE -cat hdfs:///file</command>
  5380. </test-commands>
  5381. <cleanup-commands>
  5382. </cleanup-commands>
  5383. <comparators>
  5384. <comparator>
  5385. <type>RegexpComparator</type>
  5386. <expected-output>^cat: `hdfs:///file': No such file or directory</expected-output>
  5387. </comparator>
  5388. </comparators>
  5389. </test>
  5390. <test> <!-- TESTED -->
  5391. <description>cat: Test for hdfs:// path - contents of directory</description>
  5392. <test-commands>
  5393. <command>-fs NAMENODE -mkdir hdfs:///dir1</command>
  5394. <command>-fs NAMENODE -cat hdfs:///dir1</command>
  5395. </test-commands>
  5396. <cleanup-commands>
  5397. <command>-fs NAMENODE -rm -r hdfs:///dir1</command>
  5398. </cleanup-commands>
  5399. <comparators>
  5400. <comparator>
  5401. <type>RegexpComparator</type>
  5402. <expected-output>^cat: `hdfs:///dir1': Is a directory</expected-output>
  5403. </comparator>
  5404. </comparators>
  5405. </test>
  5406. <!-- Tests for cat using Namenode's path -->
  5407. <test> <!-- TESTED -->
  5408. <description>cat: Test for Namenode's path - content of file</description>
  5409. <test-commands>
  5410. <command>-fs NAMENODE -put CLITEST_DATA/data15bytes NAMENODE/data15bytes</command>
  5411. <command>-fs NAMENODE -cat NAMENODE/data15bytes</command>
  5412. </test-commands>
  5413. <cleanup-commands>
  5414. <command>-fs NAMENODE -rm NAMENODE/data15bytes</command>
  5415. </cleanup-commands>
  5416. <comparators>
  5417. <comparator>
  5418. <type>TokenComparator</type>
  5419. <expected-output>12345678901234</expected-output>
  5420. </comparator>
  5421. </comparators>
  5422. </test>
  5423. <test> <!-- TESTED -->
  5424. <description>cat: Test for Namenode's path - contents of files using globbing</description>
  5425. <test-commands>
  5426. <command>-fs NAMENODE -mkdir NAMENODE/dir0</command>
  5427. <command>-fs NAMENODE -put CLITEST_DATA/data15bytes NAMENODE/dir0/data15bytes</command>
  5428. <command>-fs NAMENODE -put CLITEST_DATA/data30bytes NAMENODE/dir0/data30bytes</command>
  5429. <command>-fs NAMENODE -put CLITEST_DATA/data60bytes NAMENODE/dir0/data60bytes</command>
  5430. <command>-fs NAMENODE -put CLITEST_DATA/data120bytes NAMENODE/dir0/data120bytes</command>
  5431. <command>-fs NAMENODE -cat NAMENODE/dir0/data*</command>
  5432. </test-commands>
  5433. <cleanup-commands>
  5434. <command>-fs NAMENODE -rm -r NAMENODE/dir0</command>
  5435. </cleanup-commands>
  5436. <comparators>
  5437. <comparator>
  5438. <type>RegexpComparator</type>
  5439. <expected-output>12345678901234.*</expected-output>
  5440. </comparator>
  5441. </comparators>
  5442. </test>
  5443. <test> <!-- TESTED -->
  5444. <description>cat: Test for Namenode's path - contents of files without globbing</description>
  5445. <test-commands>
  5446. <command>-fs NAMENODE -mkdir NAMENODE/dir0</command>
  5447. <command>-fs NAMENODE -put CLITEST_DATA/data15bytes NAMENODE/dir0/data15bytes</command>
  5448. <command>-fs NAMENODE -put CLITEST_DATA/data30bytes NAMENODE/dir0/data30bytes</command>
  5449. <command>-fs NAMENODE -put CLITEST_DATA/data60bytes NAMENODE/dir0/data60bytes</command>
  5450. <command>-fs NAMENODE -put CLITEST_DATA/data120bytes NAMENODE/dir0/data120bytes</command>
  5451. <command>-fs NAMENODE -cat NAMENODE/dir0/data15bytes NAMENODE/dir0/data30bytes NAMENODE/dir0/data60bytes NAMENODE/dir0/data120bytes</command>
  5452. </test-commands>
  5453. <cleanup-commands>
  5454. <command>-fs NAMENODE -rm -r NAMENODE/dir0</command>
  5455. </cleanup-commands>
  5456. <comparators>
  5457. <comparator>
  5458. <type>RegexpComparator</type>
  5459. <expected-output>12345678901234.*</expected-output>
  5460. </comparator>
  5461. </comparators>
  5462. </test>
  5463. <test> <!-- TESTED -->
  5464. <description>cat: Test for Namenode's path - contents of file that does not exist</description>
  5465. <test-commands>
  5466. <command>-fs NAMENODE -cat NAMENODE/file</command>
  5467. </test-commands>
  5468. <cleanup-commands>
  5469. </cleanup-commands>
  5470. <comparators>
  5471. <comparator>
  5472. <type>RegexpComparator</type>
  5473. <expected-output>^cat: `NAMENODE/file': No such file or directory</expected-output>
  5474. </comparator>
  5475. </comparators>
  5476. </test>
  5477. <test> <!-- TESTED -->
  5478. <description>cat: Test for Namenode's path - contents of directory</description>
  5479. <test-commands>
  5480. <command>-fs NAMENODE -mkdir NAMENODE/dir1</command>
  5481. <command>-fs NAMENODE -cat NAMENODE/dir1</command>
  5482. </test-commands>
  5483. <cleanup-commands>
  5484. <command>-fs NAMENODE -rm -r NAMENODE/dir1</command>
  5485. </cleanup-commands>
  5486. <comparators>
  5487. <comparator>
  5488. <type>RegexpComparator</type>
  5489. <expected-output>^cat: `NAMENODE/dir1': Is a directory</expected-output>
  5490. </comparator>
  5491. </comparators>
  5492. </test>
  5493. <!-- Tests for copyToLocal -->
  5494. <test> <!-- TESTED -->
  5495. <description>copyToLocal: non existent relative path</description>
  5496. <test-commands>
  5497. <command>-fs NAMENODE -copyToLocal file CLITEST_DATA/file</command>
  5498. </test-commands>
  5499. <cleanup-commands>
  5500. <command>-fs NAMENODE -rm -r /user</command>
  5501. </cleanup-commands>
  5502. <comparators>
  5503. <comparator>
  5504. <type>RegexpComparator</type>
  5505. <expected-output>copyToLocal: `.*': No such file or directory</expected-output>
  5506. </comparator>
  5507. </comparators>
  5508. </test>
  5509. <test> <!-- TESTED -->
  5510. <description>copyToLocal: non existent absolute path</description>
  5511. <test-commands>
  5512. <command>-fs NAMENODE -copyToLocal /user/file CLITEST_DATA/file</command>
  5513. </test-commands>
  5514. <cleanup-commands>
  5515. <command>-fs NAMENODE -rm -r /user</command>
  5516. </cleanup-commands>
  5517. <comparators>
  5518. <comparator>
  5519. <type>RegexpComparator</type>
  5520. <expected-output>copyToLocal: `.*': No such file or directory</expected-output>
  5521. </comparator>
  5522. </comparators>
  5523. </test>
  5524. <test> <!-- TESTED -->
  5525. <description>copyToLocal: Test for hdfs:// path - non existent file/directory</description>
  5526. <test-commands>
  5527. <command>-fs NAMENODE -copyToLocal hdfs:///file CLITEST_DATA/file</command>
  5528. </test-commands>
  5529. <cleanup-commands>
  5530. <command>-fs NAMENODE -rm -r hdfs:///*</command>
  5531. </cleanup-commands>
  5532. <comparators>
  5533. <comparator>
  5534. <type>RegexpComparator</type>
  5535. <expected-output>copyToLocal: `.*': No such file or directory</expected-output>
  5536. </comparator>
  5537. </comparators>
  5538. </test>
  5539. <test> <!-- TESTED -->
  5540. <description>copyToLocal: Test for Namenode's path - non existent file/directory</description>
  5541. <test-commands>
  5542. <command>-fs NAMENODE -copyToLocal NAMENODE/file CLITEST_DATA/file</command>
  5543. </test-commands>
  5544. <cleanup-commands>
  5545. <command>-fs NAMENODE -rm -r NAMENODE/*</command>
  5546. </cleanup-commands>
  5547. <comparators>
  5548. <comparator>
  5549. <type>RegexpComparator</type>
  5550. <expected-output>copyToLocal: `.*': No such file or directory</expected-output>
  5551. </comparator>
  5552. </comparators>
  5553. </test>
  5554. <test> <!-- TESTED-->
  5555. <description>checksum: checksum of files(relative path) using globbing</description>
  5556. <test-commands>
  5557. <command>-fs NAMENODE -mkdir -p dir0</command>
  5558. <command>-fs NAMENODE -put CLITEST_DATA/data15bytes dir0/data15bytes</command>
  5559. <command>-fs NAMENODE -put CLITEST_DATA/data30bytes dir0/data30bytes</command>
  5560. <command>-fs NAMENODE -put CLITEST_DATA/data60bytes dir0/data60bytes</command>
  5561. <command>-fs NAMENODE -put CLITEST_DATA/data120bytes dir0/data120bytes</command>
  5562. <command>-fs NAMENODE -checksum dir0/data*</command>
  5563. </test-commands>
  5564. <cleanup-commands>
  5565. <command>-fs NAMENODE -rm -r /user</command>
  5566. </cleanup-commands>
  5567. <comparators>
  5568. <comparator>
  5569. <type>RegexpComparator</type>
  5570. <expected-output>^dir0/data120bytes\tMD5-of-0MD5-of-512CRC32C\t000002000000000000000000a58cdc3c0967fc8cddb7fed5960d06f2</expected-output>
  5571. </comparator>
  5572. <comparator>
  5573. <type>RegexpComparator</type>
  5574. <expected-output>^dir0/data15bytes\tMD5-of-0MD5-of-512CRC32C\t0000020000000000000000007267e9528002723a30939aefc238d665</expected-output>
  5575. </comparator>
  5576. <comparator>
  5577. <type>RegexpComparator</type>
  5578. <expected-output>^dir0/data30bytes\tMD5-of-0MD5-of-512CRC32C\t000002000000000000000000fc09371298117c4943cf089b4bd79c96</expected-output>
  5579. </comparator>
  5580. <comparator>
  5581. <type>RegexpComparator</type>
  5582. <expected-output>^dir0/data60bytes\tMD5-of-0MD5-of-512CRC32C\t000002000000000000000000009476431d851dd7b0a8d057a404d7b9</expected-output>
  5583. </comparator>
  5584. </comparators>
  5585. </test>
  5586. <!-- Tests for moveToLocal -->
  5587. <!-- Not yet implemented -->
  5588. <!-- Tests for mkdir -->
  5589. <test> <!-- TESTED -->
  5590. <description>mkdir: creating directory (absolute path) </description>
  5591. <test-commands>
  5592. <command>-fs NAMENODE -mkdir /dir0</command>
  5593. <command>-fs NAMENODE -du -s /dir0</command>
  5594. </test-commands>
  5595. <cleanup-commands>
  5596. <command>-fs NAMENODE -rm /user</command>
  5597. </cleanup-commands>
  5598. <comparators>
  5599. <comparator>
  5600. <type>RegexpComparator</type>
  5601. <expected-output>^0\s+/dir0</expected-output>
  5602. </comparator>
  5603. </comparators>
  5604. </test>
  5605. <test> <!-- TESTED -->
  5606. <description>mkdir: creating directory (absolute path) </description>
  5607. <test-commands>
  5608. <command>-fs NAMENODE -mkdir /dir0</command>
  5609. <command>-fs NAMENODE -mkdir /dir0/b/</command>
  5610. <command>-fs NAMENODE -du -s /dir0/b</command>
  5611. </test-commands>
  5612. <cleanup-commands>
  5613. <command>-fs NAMENODE -rm /user</command>
  5614. </cleanup-commands>
  5615. <comparators>
  5616. <comparator>
  5617. <type>RegexpComparator</type>
  5618. <expected-output>^0\s+/dir0/b</expected-output>
  5619. </comparator>
  5620. </comparators>
  5621. </test>
  5622. <test> <!-- TESTED -->
  5623. <description>mkdir: creating directory (relative path) </description>
  5624. <test-commands>
  5625. <command>-fs NAMENODE -mkdir -p dir0 </command>
  5626. <command>-fs NAMENODE -du -s dir0</command>
  5627. </test-commands>
  5628. <cleanup-commands>
  5629. <command>-fs NAMENODE -rm /user</command>
  5630. </cleanup-commands>
  5631. <comparators>
  5632. <comparator>
  5633. <type>RegexpComparator</type>
  5634. <expected-output>^0\s+dir0</expected-output>
  5635. </comparator>
  5636. </comparators>
  5637. </test>
  5638. <test> <!-- TESTED -->
  5639. <description>mkdir: creating many directories (absolute path) </description>
  5640. <test-commands>
  5641. <command>-fs NAMENODE -mkdir /dir0 </command>
  5642. <command>-fs NAMENODE -mkdir /dir1 </command>
  5643. <command>-fs NAMENODE -mkdir /dir2 </command>
  5644. <command>-fs NAMENODE -mkdir /dir3 </command>
  5645. <command>-fs NAMENODE -du -s /dir*</command>
  5646. </test-commands>
  5647. <cleanup-commands>
  5648. <command>-fs NAMENODE -rm /dir*</command>
  5649. </cleanup-commands>
  5650. <comparators>
  5651. <comparator>
  5652. <type>RegexpComparator</type>
  5653. <expected-output>^0\s+/dir0</expected-output>
  5654. </comparator>
  5655. <comparator>
  5656. <type>RegexpComparator</type>
  5657. <expected-output>^0\s+/dir1</expected-output>
  5658. </comparator>
  5659. <comparator>
  5660. <type>RegexpComparator</type>
  5661. <expected-output>^0\s+/dir2</expected-output>
  5662. </comparator>
  5663. <comparator>
  5664. <type>RegexpComparator</type>
  5665. <expected-output>^0\s+/dir3</expected-output>
  5666. </comparator>
  5667. </comparators>
  5668. </test>
  5669. <test> <!-- TESTED -->
  5670. <description>mkdir: creating many directories (relative path) </description>
  5671. <test-commands>
  5672. <command>-fs NAMENODE -mkdir -p dir0 </command>
  5673. <command>-fs NAMENODE -mkdir -p dir1 </command>
  5674. <command>-fs NAMENODE -mkdir -p dir2 </command>
  5675. <command>-fs NAMENODE -mkdir -p dir3 </command>
  5676. <command>-fs NAMENODE -du -s dir*</command>
  5677. </test-commands>
  5678. <cleanup-commands>
  5679. <command>-fs NAMENODE -rm /user</command>
  5680. </cleanup-commands>
  5681. <comparators>
  5682. <comparator>
  5683. <type>RegexpComparator</type>
  5684. <expected-output>^0\s+dir0</expected-output>
  5685. </comparator>
  5686. <comparator>
  5687. <type>RegexpComparator</type>
  5688. <expected-output>^0\s+dir1</expected-output>
  5689. </comparator>
  5690. <comparator>
  5691. <type>RegexpComparator</type>
  5692. <expected-output>^0\s+dir2</expected-output>
  5693. </comparator>
  5694. <comparator>
  5695. <type>RegexpComparator</type>
  5696. <expected-output>^0\s+dir3</expected-output>
  5697. </comparator>
  5698. </comparators>
  5699. </test>
  5700. <test> <!-- TESTED -->
  5701. <description>mkdir: creating a directory with the name of an already existing directory</description>
  5702. <test-commands>
  5703. <command>-fs NAMENODE -mkdir /dir0</command>
  5704. <command>-fs NAMENODE -mkdir /dir0</command>
  5705. </test-commands>
  5706. <cleanup-commands>
  5707. <command>-fs NAMENODE -rm -r /dir0</command>
  5708. </cleanup-commands>
  5709. <comparators>
  5710. <comparator>
  5711. <type>TokenComparator</type>
  5712. <expected-output>mkdir: `/dir0': File exists</expected-output>
  5713. </comparator>
  5714. </comparators>
  5715. </test>
  5716. <test> <!-- TESTED -->
  5717. <description>mkdir: creating a directory with the name of an already existing file</description>
  5718. <test-commands>
  5719. <command>-fs NAMENODE -put CLITEST_DATA/data15bytes data15bytes</command>
  5720. <command>-fs NAMENODE -mkdir -p data15bytes</command>
  5721. </test-commands>
  5722. <cleanup-commands>
  5723. <command>-fs NAMENODE -rm -r data15bytes</command>
  5724. </cleanup-commands>
  5725. <comparators>
  5726. <comparator>
  5727. <type>TokenComparator</type>
  5728. <expected-output>mkdir: `data15bytes': Is not a directory</expected-output>
  5729. </comparator>
  5730. </comparators>
  5731. </test>
  5732. <test> <!-- TESTED -->
  5733. <description>mkdir: Test for hdfs:// path - creating directory</description>
  5734. <test-commands>
  5735. <command>-fs NAMENODE -mkdir hdfs:///dir0</command>
  5736. <command>-fs NAMENODE -du -s hdfs:///dir0</command>
  5737. </test-commands>
  5738. <cleanup-commands>
  5739. <command>-fs NAMENODE -rm hdfs:///*</command>
  5740. </cleanup-commands>
  5741. <comparators>
  5742. <comparator>
  5743. <type>RegexpComparator</type>
  5744. <expected-output>^0\s+hdfs:///dir0</expected-output>
  5745. </comparator>
  5746. </comparators>
  5747. </test>
  5748. <test> <!-- TESTED -->
  5749. <description>mkdir: Test for hdfs:// path - creating many directories</description>
  5750. <test-commands>
  5751. <command>-fs NAMENODE -mkdir hdfs:///dir0 hdfs:///dir1 hdfs:///dir2 hdfs:///dir3 </command>
  5752. <command>-fs NAMENODE -du -s hdfs:///dir*</command>
  5753. </test-commands>
  5754. <cleanup-commands>
  5755. <command>-fs NAMENODE -rm hdfs:///dir*</command>
  5756. </cleanup-commands>
  5757. <comparators>
  5758. <comparator>
  5759. <type>RegexpComparator</type>
  5760. <expected-output>^0\s+hdfs:///dir0</expected-output>
  5761. </comparator>
  5762. <comparator>
  5763. <type>RegexpComparator</type>
  5764. <expected-output>^0\s+hdfs:///dir1</expected-output>
  5765. </comparator>
  5766. <comparator>
  5767. <type>RegexpComparator</type>
  5768. <expected-output>^0\s+hdfs:///dir2</expected-output>
  5769. </comparator>
  5770. <comparator>
  5771. <type>RegexpComparator</type>
  5772. <expected-output>^0\s+hdfs:///dir3</expected-output>
  5773. </comparator>
  5774. </comparators>
  5775. </test>
  5776. <test> <!-- TESTED -->
  5777. <description>mkdir: Test for hdfs:// path - creating a directory with the name of an already existing directory</description>
  5778. <test-commands>
  5779. <command>-fs NAMENODE -mkdir hdfs:///dir0</command>
  5780. <command>-fs NAMENODE -mkdir hdfs:///dir0</command>
  5781. </test-commands>
  5782. <cleanup-commands>
  5783. <command>-fs NAMENODE -rm -r hdfs:///dir0</command>
  5784. </cleanup-commands>
  5785. <comparators>
  5786. <comparator>
  5787. <type>TokenComparator</type>
  5788. <expected-output>mkdir: `hdfs:///dir0': File exists</expected-output>
  5789. </comparator>
  5790. </comparators>
  5791. </test>
  5792. <test> <!-- TESTED -->
  5793. <description>mkdir: Test for hdfs:// path - creating a directory with the name of an already existing file</description>
  5794. <test-commands>
  5795. <command>-fs NAMENODE -put CLITEST_DATA/data15bytes hdfs:///data15bytes</command>
  5796. <command>-fs NAMENODE -mkdir hdfs:///data15bytes</command>
  5797. </test-commands>
  5798. <cleanup-commands>
  5799. <command>-fs NAMENODE -rm -r hdfs:///data15bytes</command>
  5800. </cleanup-commands>
  5801. <comparators>
  5802. <comparator>
  5803. <type>TokenComparator</type>
  5804. <expected-output>mkdir: `hdfs:///data15bytes': Is not a directory</expected-output>
  5805. </comparator>
  5806. </comparators>
  5807. </test>
  5808. <test> <!-- TESTED -->
  5809. <description>mkdir: Test for Namenode's path - creating directory</description>
  5810. <test-commands>
  5811. <command>-fs NAMENODE -mkdir NAMENODE/dir0</command>
  5812. <command>-fs NAMENODE -du -s NAMENODE/dir0</command>
  5813. </test-commands>
  5814. <cleanup-commands>
  5815. <command>-fs NAMENODE -rm NAMENODE/*</command>
  5816. </cleanup-commands>
  5817. <comparators>
  5818. <comparator>
  5819. <type>RegexpComparator</type>
  5820. <expected-output>^0\s+NAMENODE/dir0</expected-output>
  5821. </comparator>
  5822. </comparators>
  5823. </test>
  5824. <test> <!-- TESTED -->
  5825. <description>mkdir: Test for Namenode's path - creating many directories</description>
  5826. <test-commands>
  5827. <command>-fs NAMENODE -mkdir NAMENODE/dir0 NAMENODE/dir1 NAMENODE/dir2 NAMENODE/dir3</command>
  5828. <command>-fs NAMENODE -du -s NAMENODE/dir*</command>
  5829. </test-commands>
  5830. <cleanup-commands>
  5831. <command>-fs NAMENODE -rm NAMENODE/dir*</command>
  5832. </cleanup-commands>
  5833. <comparators>
  5834. <comparator>
  5835. <type>RegexpComparator</type>
  5836. <expected-output>^0\s+NAMENODE/dir0</expected-output>
  5837. </comparator>
  5838. <comparator>
  5839. <type>RegexpComparator</type>
  5840. <expected-output>^0\s+NAMENODE/dir1</expected-output>
  5841. </comparator>
  5842. <comparator>
  5843. <type>RegexpComparator</type>
  5844. <expected-output>^0\s+NAMENODE/dir2</expected-output>
  5845. </comparator>
  5846. <comparator>
  5847. <type>RegexpComparator</type>
  5848. <expected-output>^0\s+NAMENODE/dir3</expected-output>
  5849. </comparator>
  5850. </comparators>
  5851. </test>
  5852. <test> <!-- TESTED -->
  5853. <description>mkdir: Test for NAMENODE path - creating a directory with the name of an already existing directory</description>
  5854. <test-commands>
  5855. <command>-fs NAMENODE -mkdir NAMENODE/dir0</command>
  5856. <command>-fs NAMENODE -mkdir NAMENODE/dir0</command>
  5857. </test-commands>
  5858. <cleanup-commands>
  5859. <command>-fs NAMENODE -rm -r NAMENODE/dir0</command>
  5860. </cleanup-commands>
  5861. <comparators>
  5862. <comparator>
  5863. <type>RegexpComparator</type>
  5864. <expected-output>mkdir: `hdfs://\w+[-.a-z0-9]*:[0-9]+/dir0': File exists</expected-output>
  5865. </comparator>
  5866. </comparators>
  5867. </test>
  5868. <test> <!-- TESTED -->
  5869. <description>mkdir: Test for Namenode's path - creating a directory with the name of an already existing file</description>
  5870. <test-commands>
  5871. <command>-fs NAMENODE -put CLITEST_DATA/data15bytes NAMENODE/data15bytes</command>
  5872. <command>-fs NAMENODE -mkdir NAMENODE/data15bytes</command>
  5873. </test-commands>
  5874. <cleanup-commands>
  5875. <command>-fs NAMENODE -rm -r NAMENODE/data15bytes</command>
  5876. </cleanup-commands>
  5877. <comparators>
  5878. <comparator>
  5879. <type>RegexpComparator</type>
  5880. <expected-output>mkdir: `hdfs://\w+[-.a-z0-9]*:[0-9]+/data15bytes': Is not a directory</expected-output>
  5881. </comparator>
  5882. </comparators>
  5883. </test>
  5884. <test> <!-- TESTED -->
  5885. <description>mkdir: Test create of directory with no parent and no -p fails</description>
  5886. <test-commands>
  5887. <command>-fs NAMENODE -rm -r -f dir0</command>
  5888. <command>-fs NAMENODE -mkdir dir0/dir1</command>
  5889. </test-commands>
  5890. <cleanup-commands>
  5891. <command>-fs NAMENODE -rm -r dir0</command>
  5892. </cleanup-commands>
  5893. <comparators>
  5894. <comparator>
  5895. <type>RegexpComparator</type>
  5896. <expected-output>mkdir: `dir0/dir1': No such file or directory</expected-output>
  5897. </comparator>
  5898. </comparators>
  5899. </test>
  5900. <test> <!-- TESTED -->
  5901. <description>mkdir: Test recreate of existing directory fails</description>
  5902. <test-commands>
  5903. <command>-fs NAMENODE -rm -r -f dir0</command>
  5904. <command>-fs NAMENODE -mkdir -p dir0/dir1</command>
  5905. <command>-fs NAMENODE -mkdir dir0/dir1</command>
  5906. </test-commands>
  5907. <cleanup-commands>
  5908. <command>-fs NAMENODE -rm -r dir0</command>
  5909. </cleanup-commands>
  5910. <comparators>
  5911. <comparator>
  5912. <type>RegexpComparator</type>
  5913. <expected-output>mkdir: `dir0/dir1': File exists</expected-output>
  5914. </comparator>
  5915. </comparators>
  5916. </test>
  5917. <test> <!-- TESTED -->
  5918. <description>mkdir: Test recreate of existing directory with -p succeeds</description>
  5919. <test-commands>
  5920. <command>-fs NAMENODE -rm -r -f dir0</command>
  5921. <command>-fs NAMENODE -mkdir -p dir0/dir1</command>
  5922. <command>-fs NAMENODE -mkdir -p dir0/dir1</command>
  5923. </test-commands>
  5924. <cleanup-commands>
  5925. <command>-fs NAMENODE -rm -r dir0</command>
  5926. </cleanup-commands>
  5927. <comparators>
  5928. <comparator>
  5929. <type>ExactComparator</type>
  5930. <expected-output></expected-output>
  5931. </comparator>
  5932. </comparators>
  5933. </test>
  5934. <!--Tests for setrep-->
  5935. <test> <!-- TESTED -->
  5936. <description>setrep: existent file (absolute path)</description>
  5937. <test-commands>
  5938. <command>-fs NAMENODE -mkdir /dir0</command>
  5939. <command>-fs NAMENODE -touchz /dir0/file0</command>
  5940. <command>-fs NAMENODE -setrep 2 /dir0/file0</command>
  5941. </test-commands>
  5942. <cleanup-commands>
  5943. <command>-fs NAMENODE -rm -r /user</command>
  5944. </cleanup-commands>
  5945. <comparators>
  5946. <comparator>
  5947. <type>RegexpComparator</type>
  5948. <expected-output>^Replication 2 set: /dir0/file0</expected-output>
  5949. </comparator>
  5950. </comparators>
  5951. </test>
  5952. <test> <!-- TESTED -->
  5953. <description>setrep: existent file (relative path)</description>
  5954. <test-commands>
  5955. <command>-fs NAMENODE -mkdir -p dir</command> <!-- make sure user home dir exists -->
  5956. <command>-fs NAMENODE -touchz file0</command>
  5957. <command>-fs NAMENODE -setrep 2 file0</command>
  5958. </test-commands>
  5959. <cleanup-commands>
  5960. <command>-fs NAMENODE -rm -r /user</command>
  5961. </cleanup-commands>
  5962. <comparators>
  5963. <comparator>
  5964. <type>RegexpComparator</type>
  5965. <expected-output>^Replication 2 set: file0</expected-output>
  5966. </comparator>
  5967. </comparators>
  5968. </test>
  5969. <test> <!-- TESTED -->
  5970. <description>setrep: existent directory (absolute path)</description>
  5971. <test-commands>
  5972. <command>-fs NAMENODE -mkdir /dir0</command>
  5973. <command>-fs NAMENODE -touchz /dir0/file0</command>
  5974. <command>-fs NAMENODE -touchz /dir0/file1</command>
  5975. <command>-fs NAMENODE -setrep 2 /dir0</command>
  5976. </test-commands>
  5977. <cleanup-commands>
  5978. <command>-fs NAMENODE -rm -r /user</command>
  5979. </cleanup-commands>
  5980. <comparators>
  5981. <comparator>
  5982. <type>RegexpComparator</type>
  5983. <expected-output>^Replication 2 set: /dir0/file0</expected-output>
  5984. </comparator>
  5985. <comparator>
  5986. <type>RegexpComparator</type>
  5987. <expected-output>^Replication 2 set: /dir0/file1</expected-output>
  5988. </comparator>
  5989. </comparators>
  5990. </test>
  5991. <test> <!-- TESTED -->
  5992. <description>setrep: existent directory (relative path)</description>
  5993. <test-commands>
  5994. <command>-fs NAMENODE -mkdir -p dir0</command>
  5995. <command>-fs NAMENODE -touchz dir0/file0</command>
  5996. <command>-fs NAMENODE -touchz dir0/file1</command>
  5997. <command>-fs NAMENODE -setrep 2 dir0</command>
  5998. </test-commands>
  5999. <cleanup-commands>
  6000. <command>-fs NAMENODE -rm -r /user</command>
  6001. </cleanup-commands>
  6002. <comparators>
  6003. <comparator>
  6004. <type>RegexpComparator</type>
  6005. <expected-output>^Replication 2 set: dir0/file0</expected-output>
  6006. </comparator>
  6007. <comparator>
  6008. <type>RegexpComparator</type>
  6009. <expected-output>^Replication 2 set: dir0/file1</expected-output>
  6010. </comparator>
  6011. </comparators>
  6012. </test>
  6013. <test> <!-- TESTED -->
  6014. <description>setrep: -R ignored for existing file</description>
  6015. <test-commands>
  6016. <command>-fs NAMENODE -mkdir -p dir0</command>
  6017. <command>-fs NAMENODE -touchz dir0/file0</command>
  6018. <command>-fs NAMENODE -setrep -R 2 dir0/file0</command>
  6019. </test-commands>
  6020. <cleanup-commands>
  6021. <command>-fs NAMENODE -rm -r /user</command>
  6022. </cleanup-commands>
  6023. <comparators>
  6024. <comparator>
  6025. <type>RegexpComparator</type>
  6026. <expected-output>^Replication 2 set: dir0/file0</expected-output>
  6027. </comparator>
  6028. </comparators>
  6029. </test>
  6030. <test> <!-- TESTED -->
  6031. <description>setrep: non existent file (absolute path)</description>
  6032. <test-commands>
  6033. <command>-fs NAMENODE -setrep 2 /dir0/file</command>
  6034. </test-commands>
  6035. <cleanup-commands>
  6036. <command>-fs NAMENODE -rm -r /user</command>
  6037. </cleanup-commands>
  6038. <comparators>
  6039. <comparator>
  6040. <type>RegexpComparator</type>
  6041. <expected-output>^setrep: `/dir0/file': No such file or directory</expected-output>
  6042. </comparator>
  6043. </comparators>
  6044. </test>
  6045. <test> <!-- TESTED -->
  6046. <description>setrep: non existent file (relative path)</description>
  6047. <test-commands>
  6048. <command>-fs NAMENODE -setrep 2 file0</command>
  6049. </test-commands>
  6050. <cleanup-commands>
  6051. <command>-fs NAMENODE -rm -r /user</command>
  6052. </cleanup-commands>
  6053. <comparators>
  6054. <comparator>
  6055. <type>RegexpComparator</type>
  6056. <expected-output>^setrep: `file0': No such file or directory</expected-output>
  6057. </comparator>
  6058. </comparators>
  6059. </test>
  6060. <test> <!-- TESTED -->
  6061. <description>setrep: Test for hdfs:// path - existent file</description>
  6062. <test-commands>
  6063. <command>-fs NAMENODE -mkdir hdfs:///dir0/</command>
  6064. <command>-fs NAMENODE -touchz hdfs:///dir0/file0</command>
  6065. <command>-fs NAMENODE -setrep 2 hdfs:///dir0/file0</command>
  6066. </test-commands>
  6067. <cleanup-commands>
  6068. <command>-fs NAMENODE -rm -r hdfs:///*</command>
  6069. </cleanup-commands>
  6070. <comparators>
  6071. <comparator>
  6072. <type>RegexpComparator</type>
  6073. <expected-output>^Replication 2 set: hdfs:///dir0/file0</expected-output>
  6074. </comparator>
  6075. </comparators>
  6076. </test>
  6077. <test> <!-- TESTED -->
  6078. <description>setrep: Test for hdfs:// path - existent directory</description>
  6079. <test-commands>
  6080. <command>-fs NAMENODE -mkdir hdfs:///dir0/</command>
  6081. <command>-fs NAMENODE -touchz hdfs:///dir0/file0</command>
  6082. <command>-fs NAMENODE -touchz hdfs:///dir0/file1</command>
  6083. <command>-fs NAMENODE -setrep 2 hdfs:///dir0</command>
  6084. </test-commands>
  6085. <cleanup-commands>
  6086. <command>-fs NAMENODE -rm -r hdfs:///*</command>
  6087. </cleanup-commands>
  6088. <comparators>
  6089. <comparator>
  6090. <type>RegexpComparator</type>
  6091. <expected-output>^Replication 2 set: hdfs:///dir0/file0</expected-output>
  6092. </comparator>
  6093. <comparator>
  6094. <type>RegexpComparator</type>
  6095. <expected-output>^Replication 2 set: hdfs:///dir0/file1</expected-output>
  6096. </comparator>
  6097. </comparators>
  6098. </test>
  6099. <test> <!-- TESTED -->
  6100. <description>setrep: Test for hdfs:// path - non existent file</description>
  6101. <test-commands>
  6102. <command>-fs NAMENODE -mkdir hdfs:///dir0/</command>
  6103. <command>-fs NAMENODE -setrep 2 hdfs:///dir0/file</command>
  6104. </test-commands>
  6105. <cleanup-commands>
  6106. <command>-fs NAMENODE -rm -r hdfs:///*</command>
  6107. </cleanup-commands>
  6108. <comparators>
  6109. <comparator>
  6110. <type>RegexpComparator</type>
  6111. <expected-output>^setrep: `hdfs:///dir0/file': No such file or directory</expected-output>
  6112. </comparator>
  6113. </comparators>
  6114. </test>
  6115. <test> <!-- TESTED -->
  6116. <description>setrep: Test for Namenode's path - existent file</description>
  6117. <test-commands>
  6118. <command>-fs NAMENODE -mkdir NAMENODE/dir0/</command>
  6119. <command>-fs NAMENODE -touchz NAMENODE/dir0/file0</command>
  6120. <command>-fs NAMENODE -setrep 2 NAMENODE/dir0/file0</command>
  6121. </test-commands>
  6122. <cleanup-commands>
  6123. <command>-fs NAMENODE -rm -r NAMENODE/*</command>
  6124. </cleanup-commands>
  6125. <comparators>
  6126. <comparator>
  6127. <type>RegexpComparator</type>
  6128. <expected-output>^Replication 2 set: NAMENODE/dir0/file0</expected-output>
  6129. </comparator>
  6130. </comparators>
  6131. </test>
  6132. <test> <!-- TESTED -->
  6133. <description>setrep: Test for Namenode's path - existent directory</description>
  6134. <test-commands>
  6135. <command>-fs NAMENODE -mkdir -p NAMENODE/dir0</command>
  6136. <command>-fs NAMENODE -touchz NAMENODE/dir0/file0</command>
  6137. <command>-fs NAMENODE -touchz NAMENODE/dir0/file1</command>
  6138. <command>-fs NAMENODE -setrep 2 NAMENODE/dir0</command>
  6139. </test-commands>
  6140. <cleanup-commands>
  6141. <command>-fs NAMENODE -rm -r NAMENODE/*</command>
  6142. </cleanup-commands>
  6143. <comparators>
  6144. <comparator>
  6145. <type>RegexpComparator</type>
  6146. <expected-output>^Replication 2 set: NAMENODE/dir0/file0</expected-output>
  6147. </comparator>
  6148. <comparator>
  6149. <type>RegexpComparator</type>
  6150. <expected-output>^Replication 2 set: NAMENODE/dir0/file1</expected-output>
  6151. </comparator>
  6152. </comparators>
  6153. </test>
  6154. <test> <!-- TESTED -->
  6155. <description>setrep: Test for Namenode's path - non existent file</description>
  6156. <test-commands>
  6157. <command>-fs NAMENODE -setrep 2 NAMENODE/dir0/file</command>
  6158. </test-commands>
  6159. <cleanup-commands>
  6160. <command>-fs NAMENODE -rm -r NAMENODE/*</command>
  6161. </cleanup-commands>
  6162. <comparators>
  6163. <comparator>
  6164. <type>RegexpComparator</type>
  6165. <expected-output>^setrep: `hdfs://\w+[-.a-z0-9]*:[0-9]+/dir0/file': No such file or directory</expected-output>
  6166. </comparator>
  6167. </comparators>
  6168. </test>
  6169. <test> <!-- TESTED -->
  6170. <description>setrep: invalid replication factor -- too high</description>
  6171. <test-commands>
  6172. <command>-fs NAMENODE -mkdir -p /dir0</command>
  6173. <command>-fs NAMENODE -touchz /dir0/file0</command>
  6174. <command>-fs NAMENODE -setrep 1025 /dir0/file0</command>
  6175. </test-commands>
  6176. <cleanup-commands>
  6177. <command>-fs NAMENODE -rm -r /user</command>
  6178. </cleanup-commands>
  6179. <comparators>
  6180. <comparator>
  6181. <type>RegexpComparator</type>
  6182. <expected-output>^setrep: Requested replication factor of 1025 exceeds maximum of [0-9]+ for /dir0/file0</expected-output>
  6183. </comparator>
  6184. </comparators>
  6185. </test>
  6186. <test> <!-- TESTED -->
  6187. <description>setrep: invalid replication factor -- 0</description>
  6188. <test-commands>
  6189. <command>-fs NAMENODE -mkdir -p dir0</command>
  6190. <command>-fs NAMENODE -touchz dir0/file0</command>
  6191. <command>-fs NAMENODE -setrep 0 dir0/file0</command>
  6192. </test-commands>
  6193. <cleanup-commands>
  6194. <command>-fs NAMENODE -rm -r /user</command>
  6195. </cleanup-commands>
  6196. <comparators>
  6197. <comparator>
  6198. <type>RegexpComparator</type>
  6199. <expected-output>^-setrep: replication must be >= 1</expected-output>
  6200. </comparator>
  6201. </comparators>
  6202. </test>
  6203. <test> <!-- TESTED -->
  6204. <description>setrep: invalid replication factor -- NaN</description>
  6205. <test-commands>
  6206. <command>-fs NAMENODE -mkdir -p dir0</command>
  6207. <command>-fs NAMENODE -touchz dir0/file0</command>
  6208. <command>-fs NAMENODE -setrep three dir0/file0</command>
  6209. </test-commands>
  6210. <cleanup-commands>
  6211. <command>-fs NAMENODE -rm -r /user</command>
  6212. </cleanup-commands>
  6213. <comparators>
  6214. <comparator>
  6215. <type>RegexpComparator</type>
  6216. <expected-output>^setrep: Illegal replication, a positive integer expected</expected-output>
  6217. </comparator>
  6218. </comparators>
  6219. </test>
  6220. <!-- Tests for touchz-->
  6221. <test> <!-- TESTED -->
  6222. <description>touchz: touching file (absolute path) </description>
  6223. <test-commands>
  6224. <command>-fs NAMENODE -mkdir /user</command>
  6225. <command>-fs NAMENODE -touchz /user/file0</command>
  6226. <command>-fs NAMENODE -du /user/file0</command>
  6227. </test-commands>
  6228. <cleanup-commands>
  6229. <command>-fs NAMENODE -rm /user</command>
  6230. </cleanup-commands>
  6231. <comparators>
  6232. <comparator>
  6233. <type>RegexpComparator</type>
  6234. <expected-output>^0\s+/user/file0</expected-output>
  6235. </comparator>
  6236. </comparators>
  6237. </test>
  6238. <test> <!-- TESTED -->
  6239. <description>touchz: touching file in non-existent directory </description>
  6240. <test-commands>
  6241. <command>-fs NAMENODE -touchz file0 </command>
  6242. </test-commands>
  6243. <cleanup-commands>
  6244. </cleanup-commands>
  6245. <comparators>
  6246. <comparator>
  6247. <type>RegexpComparator</type>
  6248. <expected-output>touchz: `file0': No such file or directory</expected-output>
  6249. </comparator>
  6250. </comparators>
  6251. </test>
  6252. <test> <!-- TESTED -->
  6253. <description>touchz: touching file(relative path) </description>
  6254. <test-commands>
  6255. <command>-fs NAMENODE -mkdir -p dir</command> <!-- make sure user home dir exists -->
  6256. <command>-fs NAMENODE -touchz file0 </command>
  6257. <command>-fs NAMENODE -du file0</command>
  6258. </test-commands>
  6259. <cleanup-commands>
  6260. <command>-fs NAMENODE -rm /user</command>
  6261. </cleanup-commands>
  6262. <comparators>
  6263. <comparator>
  6264. <type>RegexpComparator</type>
  6265. <expected-output>^0\s+file0</expected-output>
  6266. </comparator>
  6267. </comparators>
  6268. </test>
  6269. <test> <!-- TESTED -->
  6270. <description>touchz: touching many files </description>
  6271. <test-commands>
  6272. <command>-fs NAMENODE -mkdir -p dir</command> <!-- make sure user home dir exists -->
  6273. <command>-fs NAMENODE -touchz file0 file1 file2</command>
  6274. <command>-fs NAMENODE -du file*</command>
  6275. </test-commands>
  6276. <cleanup-commands>
  6277. <command>-fs NAMENODE -rm /user</command>
  6278. </cleanup-commands>
  6279. <comparators>
  6280. <comparator>
  6281. <type>RegexpComparator</type>
  6282. <expected-output>^0( |\t)*file0</expected-output>
  6283. <expected-output>^0( |\t)*file1</expected-output>
  6284. <expected-output>^0( |\t)*file2</expected-output>
  6285. </comparator>
  6286. </comparators>
  6287. </test>
  6288. <test> <!-- TESTED -->
  6289. <description>touchz: touching already existing file </description>
  6290. <test-commands>
  6291. <command>-fs NAMENODE -mkdir -p dir</command> <!-- make sure user home dir exists -->
  6292. <command>-fs NAMENODE -put CLITEST_DATA/data15bytes data15bytes</command>
  6293. <command>-fs NAMENODE -touchz data15bytes</command>
  6294. </test-commands>
  6295. <cleanup-commands>
  6296. <command>-fs NAMENODE -rm data15bytes</command>
  6297. </cleanup-commands>
  6298. <comparators>
  6299. <comparator>
  6300. <type>TokenComparator</type>
  6301. <expected-output>touchz: `data15bytes': Not a zero-length file</expected-output>
  6302. </comparator>
  6303. </comparators>
  6304. </test>
  6305. <test> <!-- TESTED -->
  6306. <description>touchz: Test for hdfs:// path - touching file</description>
  6307. <test-commands>
  6308. <command>-fs NAMENODE -mkdir -p hdfs:///user/</command>
  6309. <command>-fs NAMENODE -touchz hdfs:///user/file0</command>
  6310. <command>-fs NAMENODE -du hdfs:///user/file0</command>
  6311. </test-commands>
  6312. <cleanup-commands>
  6313. <command>-fs NAMENODE -rm hdfs:///user</command>
  6314. </cleanup-commands>
  6315. <comparators>
  6316. <comparator>
  6317. <type>RegexpComparator</type>
  6318. <expected-output>^0\s+hdfs:///user/file0</expected-output>
  6319. </comparator>
  6320. </comparators>
  6321. </test>
  6322. <test> <!-- TESTED -->
  6323. <description>touchz: Test for hdfs:// path - touching many files </description>
  6324. <test-commands>
  6325. <command>-fs NAMENODE -touchz hdfs:///file0 hdfs:///file1 hdfs:///file2</command>
  6326. <command>-fs NAMENODE -du hdfs:///file*</command>
  6327. </test-commands>
  6328. <cleanup-commands>
  6329. <command>-fs NAMENODE -rm hdfs:///user</command>
  6330. </cleanup-commands>
  6331. <comparators>
  6332. <comparator>
  6333. <type>RegexpComparator</type>
  6334. <expected-output>^0( |\t)*hdfs:///file0</expected-output>
  6335. <expected-output>^0( |\t)*hdfs:///file1</expected-output>
  6336. <expected-output>^0( |\t)*hdfs:///file2</expected-output>
  6337. </comparator>
  6338. </comparators>
  6339. </test>
  6340. <test> <!-- TESTED -->
  6341. <description>touchz: Test for hdfs:// path - touching already existing file </description>
  6342. <test-commands>
  6343. <command>-fs NAMENODE -put CLITEST_DATA/data15bytes hdfs:///data15bytes</command>
  6344. <command>-fs NAMENODE -touchz hdfs:///data15bytes</command>
  6345. </test-commands>
  6346. <cleanup-commands>
  6347. <command>-fs NAMENODE -rm hdfs:///data15bytes</command>
  6348. </cleanup-commands>
  6349. <comparators>
  6350. <comparator>
  6351. <type>TokenComparator</type>
  6352. <expected-output>touchz: `hdfs:///data15bytes': Not a zero-length file</expected-output>
  6353. </comparator>
  6354. </comparators>
  6355. </test>
  6356. <test> <!-- TESTED -->
  6357. <description>touchz: Test for Namenode's path - touching file</description>
  6358. <test-commands>
  6359. <command>-fs NAMENODE -touchz NAMENODE/user/file0</command>
  6360. <command>-fs NAMENODE -du NAMENODE/user/file0</command>
  6361. </test-commands>
  6362. <cleanup-commands>
  6363. <command>-fs NAMENODE -rm NAMENODE/user</command>
  6364. </cleanup-commands>
  6365. <comparators>
  6366. <comparator>
  6367. <type>RegexpComparator</type>
  6368. <expected-output>^0\s+NAMENODE/user/file0</expected-output>
  6369. </comparator>
  6370. </comparators>
  6371. </test>
  6372. <test> <!-- TESTED -->
  6373. <description>touchz: Test for Namenode path - touching many files </description>
  6374. <test-commands>
  6375. <command>-fs NAMENODE -touchz NAMENODE/file0 NAMENODE/file1 NAMENODE/file2</command>
  6376. <command>-fs NAMENODE -du NAMENODE/file*</command>
  6377. </test-commands>
  6378. <cleanup-commands>
  6379. <command>-fs NAMENODE -rm NAMENODE/user</command>
  6380. </cleanup-commands>
  6381. <comparators>
  6382. <comparator>
  6383. <type>RegexpComparator</type>
  6384. <expected-output>^0\s+hdfs://\w+[-.a-z0-9]*:[0-9]+/file0</expected-output>
  6385. <expected-output>^0\s+hdfs://\w+[-.a-z0-9]*:[0-9]+/file1</expected-output>
  6386. <expected-output>^0\s+hdfs://\w+[-.a-z0-9]*:[0-9]+/file2</expected-output>
  6387. </comparator>
  6388. </comparators>
  6389. </test>
  6390. <test> <!-- TESTED -->
  6391. <description>touchz: Test for Namenode's path - touching already existing file </description>
  6392. <test-commands>
  6393. <command>-fs NAMENODE -put CLITEST_DATA/data15bytes NAMENODE/data15bytes</command>
  6394. <command>-fs NAMENODE -touchz NAMENODE/data15bytes</command>
  6395. </test-commands>
  6396. <cleanup-commands>
  6397. <command>-fs NAMENODE -rm NAMENODE/data15bytes</command>
  6398. </cleanup-commands>
  6399. <comparators>
  6400. <comparator>
  6401. <type>RegexpComparator</type>
  6402. <expected-output>touchz: `hdfs://\w+[-.a-z0-9]*:[0-9]+/data15bytes': Not a zero-length file</expected-output>
  6403. </comparator>
  6404. </comparators>
  6405. </test>
  6406. <!--Tests for test-->
  6407. <test> <!-- TESTED -->
  6408. <description>test: non existent file (absolute path)</description>
  6409. <test-commands>
  6410. <command>-fs NAMENODE -test -z /dir0/file</command>
  6411. </test-commands>
  6412. <cleanup-commands>
  6413. <command>-fs NAMENODE -rm -r /user</command>
  6414. </cleanup-commands>
  6415. <comparators>
  6416. <comparator>
  6417. <type>ExactComparator</type>
  6418. <expected-output></expected-output>
  6419. </comparator>
  6420. </comparators>
  6421. </test>
  6422. <test> <!-- TESTED -->
  6423. <description>test: non existent file (relative path)</description>
  6424. <test-commands>
  6425. <command>-fs NAMENODE -test -z file</command>
  6426. </test-commands>
  6427. <cleanup-commands>
  6428. <command>-fs NAMENODE -rm -r /user</command>
  6429. </cleanup-commands>
  6430. <comparators>
  6431. <comparator>
  6432. <type>ExactComparator</type>
  6433. <expected-output></expected-output>
  6434. </comparator>
  6435. </comparators>
  6436. </test>
  6437. <test> <!-- TESTED -->
  6438. <description>test: non existent directory (absolute path)</description>
  6439. <test-commands>
  6440. <command>-fs NAMENODE -test -d /dir</command>
  6441. </test-commands>
  6442. <cleanup-commands>
  6443. <command>-fs NAMENODE -rm -r /user</command>
  6444. </cleanup-commands>
  6445. <comparators>
  6446. <comparator>
  6447. <type>ExactComparator</type>
  6448. <expected-output></expected-output>
  6449. </comparator>
  6450. </comparators>
  6451. </test>
  6452. <test> <!-- TESTED -->
  6453. <description>test: non existent directory (relative path)</description>
  6454. <test-commands>
  6455. <command>-fs NAMENODE -test -d dir0</command>
  6456. </test-commands>
  6457. <cleanup-commands>
  6458. <command>-fs NAMENODE -rm -r /user</command>
  6459. </cleanup-commands>
  6460. <comparators>
  6461. <comparator>
  6462. <type>ExactComparator</type>
  6463. <expected-output></expected-output>
  6464. </comparator>
  6465. </comparators>
  6466. </test>
  6467. <test> <!-- TESTED -->
  6468. <description>test: Test for hdfs:// path - non existent file</description>
  6469. <test-commands>
  6470. <command>-fs NAMENODE -test -z hdfs:///dir0/file</command>
  6471. </test-commands>
  6472. <cleanup-commands>
  6473. <command>-fs NAMENODE -rm -r hdfs:///dir0</command>
  6474. </cleanup-commands>
  6475. <comparators>
  6476. <comparator>
  6477. <type>ExactComparator</type>
  6478. <expected-output></expected-output>
  6479. </comparator>
  6480. </comparators>
  6481. </test>
  6482. <test> <!-- TESTED -->
  6483. <description>test: Test for hdfs:// path - non existent directory</description>
  6484. <test-commands>
  6485. <command>-fs NAMENODE -test -d hdfs:///dir</command>
  6486. </test-commands>
  6487. <cleanup-commands>
  6488. <command>-fs NAMENODE -rm -r hdfs:///dir</command>
  6489. </cleanup-commands>
  6490. <comparators>
  6491. <comparator>
  6492. <type>ExactComparator</type>
  6493. <expected-output></expected-output>
  6494. </comparator>
  6495. </comparators>
  6496. </test>
  6497. <test> <!-- TESTED -->
  6498. <description>test: Test for Namenode's path - non existent file</description>
  6499. <test-commands>
  6500. <command>-fs NAMENODE -test -z NAMENODE/dir0/file</command>
  6501. </test-commands>
  6502. <cleanup-commands>
  6503. <command>-fs NAMENODE -rm -r NAMENODE/dir0</command>
  6504. </cleanup-commands>
  6505. <comparators>
  6506. <comparator>
  6507. <type>ExactComparator</type>
  6508. <expected-output></expected-output>
  6509. </comparator>
  6510. </comparators>
  6511. </test>
  6512. <test> <!-- TESTED -->
  6513. <description>test: Test for Namenode's path - non existent directory</description>
  6514. <test-commands>
  6515. <command>-fs NAMENODE -test -d NAMENODE/dir</command>
  6516. </test-commands>
  6517. <cleanup-commands>
  6518. <command>-fs NAMENODE -rm -r NAMENODE/dir</command>
  6519. </cleanup-commands>
  6520. <comparators>
  6521. <comparator>
  6522. <type>ExactComparator</type>
  6523. <expected-output></expected-output>
  6524. </comparator>
  6525. </comparators>
  6526. </test>
  6527. <!--Tests for stat -->
  6528. <test> <!-- TESTED -->
  6529. <description>stat: statistics about file(absolute path)</description>
  6530. <test-commands>
  6531. <command>-fs NAMENODE -put CLITEST_DATA/data60bytes /data60bytes</command>
  6532. <command>-fs NAMENODE -stat "%n-%b" /data60bytes</command>
  6533. </test-commands>
  6534. <cleanup-commands>
  6535. <command>-fs NAMENODE -rm -r /data60bytes</command>
  6536. </cleanup-commands>
  6537. <comparators>
  6538. <comparator>
  6539. <type>TokenComparator</type>
  6540. <expected-output>data60bytes-60</expected-output>
  6541. </comparator>
  6542. </comparators>
  6543. </test>
  6544. <test> <!-- TESTED -->
  6545. <description>stat: statistics about file(relative path)</description>
  6546. <test-commands>
  6547. <command>-fs NAMENODE -mkdir -p dir</command> <!-- make sure user home dir exists -->
  6548. <command>-fs NAMENODE -touchz test</command>
  6549. <command>-fs NAMENODE -put CLITEST_DATA/data60bytes data60bytes</command>
  6550. <command>-fs NAMENODE -stat "%n-%b" data60bytes</command>
  6551. </test-commands>
  6552. <cleanup-commands>
  6553. <command>-fs NAMENODE -rm -r /user</command>
  6554. </cleanup-commands>
  6555. <comparators>
  6556. <comparator>
  6557. <type>TokenComparator</type>
  6558. <expected-output>data60bytes-60</expected-output>
  6559. </comparator>
  6560. </comparators>
  6561. </test>
  6562. <test> <!-- TESTED -->
  6563. <description>stat: statistics about directory(absolute path)</description>
  6564. <test-commands>
  6565. <command>-fs NAMENODE -mkdir /dirtest</command>
  6566. <command>-fs NAMENODE -stat "%n-%b-%o" /dirtest</command>
  6567. </test-commands>
  6568. <cleanup-commands>
  6569. <command>-fs NAMENODE -rm -r /dirtest</command>
  6570. </cleanup-commands>
  6571. <comparators>
  6572. <comparator>
  6573. <type>TokenComparator</type>
  6574. <expected-output>dirtest-0-0</expected-output>
  6575. </comparator>
  6576. </comparators>
  6577. </test>
  6578. <test> <!-- TESTED -->
  6579. <description>stat: statistics about directory(relative path)</description>
  6580. <test-commands>
  6581. <command>-fs NAMENODE -mkdir -p dirtest</command>
  6582. <command>-fs NAMENODE -stat "%n-%b-%o" dirtest</command>
  6583. </test-commands>
  6584. <cleanup-commands>
  6585. <command>-fs NAMENODE -rm -r /user</command>
  6586. </cleanup-commands>
  6587. <comparators>
  6588. <comparator>
  6589. <type>TokenComparator</type>
  6590. <expected-output>dirtest-0-0</expected-output>
  6591. </comparator>
  6592. </comparators>
  6593. </test>
  6594. <test> <!-- TESTED -->
  6595. <description>stat: statistics about files (absolute path) using globbing</description>
  6596. <test-commands>
  6597. <command>-fs NAMENODE -mkdir /dir0</command>
  6598. <command>-fs NAMENODE -put CLITEST_DATA/data15bytes /dir0/data15bytes</command>
  6599. <command>-fs NAMENODE -put CLITEST_DATA/data30bytes /dir0/data30bytes</command>
  6600. <command>-fs NAMENODE -put CLITEST_DATA/data60bytes /dir0/data60bytes</command>
  6601. <command>-fs NAMENODE -put CLITEST_DATA/data120bytes /dir0/data120bytes</command>
  6602. <command>-fs NAMENODE -mkdir /dir0/datadir</command>
  6603. <command>-fs NAMENODE -stat "%n-%b" /dir0/data*</command>
  6604. </test-commands>
  6605. <cleanup-commands>
  6606. <command>-fs NAMENODE -rm -r /dir0</command>
  6607. </cleanup-commands>
  6608. <comparators>
  6609. <comparator>
  6610. <type>TokenComparator</type>
  6611. <expected-output>data15bytes-15</expected-output>
  6612. </comparator>
  6613. <comparator>
  6614. <type>TokenComparator</type>
  6615. <expected-output>data30bytes-30</expected-output>
  6616. </comparator>
  6617. <comparator>
  6618. <type>TokenComparator</type>
  6619. <expected-output>data60bytes-60</expected-output>
  6620. </comparator>
  6621. <comparator>
  6622. <type>TokenComparator</type>
  6623. <expected-output>data120bytes-120</expected-output>
  6624. </comparator>
  6625. <comparator>
  6626. <type>TokenComparator</type>
  6627. <expected-output>datadir-0</expected-output>
  6628. </comparator>
  6629. </comparators>
  6630. </test>
  6631. <test> <!-- TESTED -->
  6632. <description>stat: statistics about files (relative path) using globbing</description>
  6633. <test-commands>
  6634. <command>-fs NAMENODE -mkdir -p dir</command> <!-- make sure user home dir exists -->
  6635. <command>-fs NAMENODE -touchz test</command>
  6636. <command>-fs NAMENODE -put CLITEST_DATA/data15bytes data15bytes</command>
  6637. <command>-fs NAMENODE -put CLITEST_DATA/data30bytes data30bytes</command>
  6638. <command>-fs NAMENODE -put CLITEST_DATA/data60bytes data60bytes</command>
  6639. <command>-fs NAMENODE -put CLITEST_DATA/data120bytes data120bytes</command>
  6640. <command>-fs NAMENODE -mkdir -p datadir</command>
  6641. <command>-fs NAMENODE -stat "%n-%b" data*</command>
  6642. </test-commands>
  6643. <cleanup-commands>
  6644. <command>-fs NAMENODE -rm -r /user</command>
  6645. </cleanup-commands>
  6646. <comparators>
  6647. <comparator>
  6648. <type>TokenComparator</type>
  6649. <expected-output>data15bytes-15</expected-output>
  6650. </comparator>
  6651. <comparator>
  6652. <type>TokenComparator</type>
  6653. <expected-output>data30bytes-30</expected-output>
  6654. </comparator>
  6655. <comparator>
  6656. <type>TokenComparator</type>
  6657. <expected-output>data60bytes-60</expected-output>
  6658. </comparator>
  6659. <comparator>
  6660. <type>TokenComparator</type>
  6661. <expected-output>data120bytes-120</expected-output>
  6662. </comparator>
  6663. <comparator>
  6664. <type>TokenComparator</type>
  6665. <expected-output>datadir-0</expected-output>
  6666. </comparator>
  6667. </comparators>
  6668. </test>
  6669. <test> <!-- TESTED -->
  6670. <description>stat: statistics about file or directory(absolute path) that does not exist</description>
  6671. <test-commands>
  6672. <command>-fs NAMENODE -stat /file</command>
  6673. </test-commands>
  6674. <cleanup-commands>
  6675. </cleanup-commands>
  6676. <comparators>
  6677. <comparator>
  6678. <type>RegexpComparator</type>
  6679. <expected-output>^stat: `/file': No such file or directory</expected-output>
  6680. </comparator>
  6681. </comparators>
  6682. </test>
  6683. <test> <!-- TESTED -->
  6684. <description>stat: statistics about file or directory(relative path) that does not exist </description>
  6685. <test-commands>
  6686. <command>-fs NAMENODE -stat file1</command>
  6687. </test-commands>
  6688. <cleanup-commands>
  6689. </cleanup-commands>
  6690. <comparators>
  6691. <comparator>
  6692. <type>RegexpComparator</type>
  6693. <expected-output>^stat: `file1': No such file or directory</expected-output>
  6694. </comparator>
  6695. </comparators>
  6696. </test>
  6697. <test> <!-- TESTED -->
  6698. <description>stat: Test for hdfs:// path - statistics about file</description>
  6699. <test-commands>
  6700. <command>-fs NAMENODE -put CLITEST_DATA/data60bytes hdfs:///data60bytes</command>
  6701. <command>-fs NAMENODE -stat "%n-%b" hdfs:///data60bytes</command>
  6702. </test-commands>
  6703. <cleanup-commands>
  6704. <command>-fs NAMENODE -rm -r hdfs:///data60bytes</command>
  6705. </cleanup-commands>
  6706. <comparators>
  6707. <comparator>
  6708. <type>TokenComparator</type>
  6709. <expected-output>data60bytes-60</expected-output>
  6710. </comparator>
  6711. </comparators>
  6712. </test>
  6713. <test> <!-- TESTED -->
  6714. <description>stat: Test for hdfs:// path - statistics about directory</description>
  6715. <test-commands>
  6716. <command>-fs NAMENODE -mkdir hdfs:///dirtest</command>
  6717. <command>-fs NAMENODE -stat "%n-%b-%o" hdfs:///dirtest</command>
  6718. </test-commands>
  6719. <cleanup-commands>
  6720. <command>-fs NAMENODE -rm -r hdfs:///dirtest</command>
  6721. </cleanup-commands>
  6722. <comparators>
  6723. <comparator>
  6724. <type>TokenComparator</type>
  6725. <expected-output>dirtest-0-0</expected-output>
  6726. </comparator>
  6727. </comparators>
  6728. </test>
  6729. <test> <!-- TESTED -->
  6730. <description>stat: Test for hdfs:// path - statistics about files using globbing</description>
  6731. <test-commands>
  6732. <command>-fs NAMENODE -mkdir /dir0</command>
  6733. <command>-fs NAMENODE -put CLITEST_DATA/data15bytes hdfs:///dir0/data15bytes</command>
  6734. <command>-fs NAMENODE -put CLITEST_DATA/data30bytes hdfs:///dir0/data30bytes</command>
  6735. <command>-fs NAMENODE -put CLITEST_DATA/data60bytes hdfs:///dir0/data60bytes</command>
  6736. <command>-fs NAMENODE -put CLITEST_DATA/data120bytes hdfs:///dir0/data120bytes</command>
  6737. <command>-fs NAMENODE -mkdir -p hdfs:///dir0/datadir</command>
  6738. <command>-fs NAMENODE -stat "%n-%b" hdfs:///dir0/data*</command>
  6739. </test-commands>
  6740. <cleanup-commands>
  6741. <command>-fs NAMENODE -rm -r hdfs:///dir0</command>
  6742. </cleanup-commands>
  6743. <comparators>
  6744. <comparator>
  6745. <type>TokenComparator</type>
  6746. <expected-output>data15bytes-15</expected-output>
  6747. </comparator>
  6748. <comparator>
  6749. <type>TokenComparator</type>
  6750. <expected-output>data30bytes-30</expected-output>
  6751. </comparator>
  6752. <comparator>
  6753. <type>TokenComparator</type>
  6754. <expected-output>data60bytes-60</expected-output>
  6755. </comparator>
  6756. <comparator>
  6757. <type>TokenComparator</type>
  6758. <expected-output>data120bytes-120</expected-output>
  6759. </comparator>
  6760. <comparator>
  6761. <type>TokenComparator</type>
  6762. <expected-output>datadir-0</expected-output>
  6763. </comparator>
  6764. </comparators>
  6765. </test>
  6766. <test> <!-- TESTED -->
  6767. <description>stat: Test for hdfs:// path - statistics about file or directory that does not exist</description>
  6768. <test-commands>
  6769. <command>-fs NAMENODE -stat hdfs:///file</command>
  6770. </test-commands>
  6771. <cleanup-commands>
  6772. </cleanup-commands>
  6773. <comparators>
  6774. <comparator>
  6775. <type>RegexpComparator</type>
  6776. <expected-output>^stat: `hdfs:///file': No such file or directory</expected-output>
  6777. </comparator>
  6778. </comparators>
  6779. </test>
  6780. <test> <!-- TESTED -->
  6781. <description>stat: Test for Namenode's path - statistics about file</description>
  6782. <test-commands>
  6783. <command>-fs NAMENODE -put CLITEST_DATA/data60bytes NAMENODE/data60bytes</command>
  6784. <command>-fs NAMENODE -stat "%n-%b" NAMENODE/data60bytes</command>
  6785. </test-commands>
  6786. <cleanup-commands>
  6787. <command>-fs NAMENODE -rm -r NAMENODE/data60bytes</command>
  6788. </cleanup-commands>
  6789. <comparators>
  6790. <comparator>
  6791. <type>TokenComparator</type>
  6792. <expected-output>data60bytes-60</expected-output>
  6793. </comparator>
  6794. </comparators>
  6795. </test>
  6796. <test> <!-- TESTED -->
  6797. <description>stat: Test for Namenode's path - statistics about directory</description>
  6798. <test-commands>
  6799. <command>-fs NAMENODE -mkdir NAMENODE/dirtest</command>
  6800. <command>-fs NAMENODE -stat "%n-%b-%o" NAMENODE/dirtest</command>
  6801. </test-commands>
  6802. <cleanup-commands>
  6803. <command>-fs NAMENODE -rm -r NAMENODE/dirtest</command>
  6804. </cleanup-commands>
  6805. <comparators>
  6806. <comparator>
  6807. <type>TokenComparator</type>
  6808. <expected-output>dirtest-0-0</expected-output>
  6809. </comparator>
  6810. </comparators>
  6811. </test>
  6812. <test> <!-- TESTED -->
  6813. <description>stat: Test for Namenode's path - statistics about files using globbing</description>
  6814. <test-commands>
  6815. <command>-fs NAMENODE -mkdir /dir0</command>
  6816. <command>-fs NAMENODE -put CLITEST_DATA/data15bytes NAMENODE/dir0/data15bytes</command>
  6817. <command>-fs NAMENODE -put CLITEST_DATA/data30bytes NAMENODE/dir0/data30bytes</command>
  6818. <command>-fs NAMENODE -put CLITEST_DATA/data60bytes NAMENODE/dir0/data60bytes</command>
  6819. <command>-fs NAMENODE -put CLITEST_DATA/data120bytes NAMENODE/dir0/data120bytes</command>
  6820. <command>-fs NAMENODE -mkdir -p NAMENODE/dir0/datadir</command>
  6821. <command>-fs NAMENODE -stat "%n-%b" NAMENODE/dir0/data*</command>
  6822. </test-commands>
  6823. <cleanup-commands>
  6824. <command>-fs NAMENODE -rm -r NAMENODE/dir0</command>
  6825. </cleanup-commands>
  6826. <comparators>
  6827. <comparator>
  6828. <type>TokenComparator</type>
  6829. <expected-output>data15bytes-15</expected-output>
  6830. </comparator>
  6831. <comparator>
  6832. <type>TokenComparator</type>
  6833. <expected-output>data30bytes-30</expected-output>
  6834. </comparator>
  6835. <comparator>
  6836. <type>TokenComparator</type>
  6837. <expected-output>data60bytes-60</expected-output>
  6838. </comparator>
  6839. <comparator>
  6840. <type>TokenComparator</type>
  6841. <expected-output>data120bytes-120</expected-output>
  6842. </comparator>
  6843. <comparator>
  6844. <type>TokenComparator</type>
  6845. <expected-output>datadir-0</expected-output>
  6846. </comparator>
  6847. </comparators>
  6848. </test>
  6849. <test> <!-- TESTED -->
  6850. <description>stat: Test for Namenode's path - statistics about file or directory that does not exist</description>
  6851. <test-commands>
  6852. <command>-fs NAMENODE -stat NAMENODE/file</command>
  6853. </test-commands>
  6854. <cleanup-commands>
  6855. </cleanup-commands>
  6856. <comparators>
  6857. <comparator>
  6858. <type>RegexpComparator</type>
  6859. <expected-output>^stat: `hdfs://\w+[-.a-z0-9]*:[0-9]+/file': No such file or directory</expected-output>
  6860. </comparator>
  6861. </comparators>
  6862. </test>
  6863. <!-- Tests for tail -->
  6864. <test> <!-- TESTED -->
  6865. <description>tail: contents of file(absolute path)</description>
  6866. <test-commands>
  6867. <command>-fs NAMENODE -put CLITEST_DATA/data15bytes /data15bytes</command>
  6868. <command>-fs NAMENODE -tail /data15bytes</command>
  6869. </test-commands>
  6870. <cleanup-commands>
  6871. <command>-fs NAMENODE -rm /user</command>
  6872. </cleanup-commands>
  6873. <comparators>
  6874. <comparator>
  6875. <type>TokenComparator</type>
  6876. <expected-output>12345678901234</expected-output>
  6877. </comparator>
  6878. </comparators>
  6879. </test>
  6880. <test> <!--TESTED-->
  6881. <description>tail: contents of file(relative path)</description>
  6882. <test-commands>
  6883. <command>-fs NAMENODE -mkdir -p dir</command> <!-- make sure user home dir exists -->
  6884. <command>-fs NAMENODE -touchz test</command>
  6885. <command>-fs NAMENODE -put CLITEST_DATA/data15bytes data15bytes</command>
  6886. <command>-fs NAMENODE -tail data15bytes</command>
  6887. </test-commands>
  6888. <cleanup-commands>
  6889. <command>-fs NAMENODE -rm -r /user</command>
  6890. </cleanup-commands>
  6891. <comparators>
  6892. <comparator>
  6893. <type>TokenComparator</type>
  6894. <expected-output>12345678901234</expected-output>
  6895. </comparator>
  6896. </comparators>
  6897. </test>
  6898. <test> <!-- TESTED -->
  6899. <description>tail: contents of files(absolute path) using globbing</description>
  6900. <test-commands>
  6901. <command>-fs NAMENODE -touchz /file1</command>
  6902. <command>-fs NAMENODE -touchz /file2</command>
  6903. <command>-fs NAMENODE -touchz /file3</command>
  6904. <command>-fs NAMENODE -touchz /file4</command>
  6905. <command>-fs NAMENODE -tail /file*</command>
  6906. </test-commands>
  6907. <cleanup-commands>
  6908. <command>-fs NAMENODE -rm -r /user</command>
  6909. </cleanup-commands>
  6910. <comparators>
  6911. <comparator>
  6912. <type>RegexpComparator</type>
  6913. <expected-output>^tail: `/file\*': No such file or directory</expected-output>
  6914. </comparator>
  6915. </comparators>
  6916. </test>
  6917. <test> <!-- TESTED -->
  6918. <description>tail: contents of files(relative path) using globbing</description>
  6919. <test-commands>
  6920. <command>-fs NAMENODE -touchz file1</command>
  6921. <command>-fs NAMENODE -touchz file2</command>
  6922. <command>-fs NAMENODE -touchz file3</command>
  6923. <command>-fs NAMENODE -touchz file4</command>
  6924. <command>-fs NAMENODE -tail file*</command>
  6925. </test-commands>
  6926. <cleanup-commands>
  6927. <command>-fs NAMENODE -rm -r /user</command>
  6928. </cleanup-commands>
  6929. <comparators>
  6930. <comparator>
  6931. <type>RegexpComparator</type>
  6932. <expected-output>^tail: `file\*': No such file or directory</expected-output>
  6933. </comparator>
  6934. </comparators>
  6935. </test>
  6936. <test> <!-- TESTED -->
  6937. <description>tail: contents of file(absolute path) that does not exist</description>
  6938. <test-commands>
  6939. <command>-fs NAMENODE -tail /file</command>
  6940. </test-commands>
  6941. <cleanup-commands>
  6942. </cleanup-commands>
  6943. <comparators>
  6944. <comparator>
  6945. <type>RegexpComparator</type>
  6946. <expected-output>^tail: `/file': No such file or directory</expected-output>
  6947. </comparator>
  6948. </comparators>
  6949. </test>
  6950. <test> <!-- TESTED -->
  6951. <description>tail: contents of file(relative path) that does not exist</description>
  6952. <test-commands>
  6953. <command>-fs NAMENODE -tail file1</command>
  6954. </test-commands>
  6955. <cleanup-commands>
  6956. </cleanup-commands>
  6957. <comparators>
  6958. <comparator>
  6959. <type>RegexpComparator</type>
  6960. <expected-output>^tail: `file1': No such file or directory</expected-output>
  6961. </comparator>
  6962. </comparators>
  6963. </test>
  6964. <test> <!-- TESTED -->
  6965. <description>tail: contents of directory(absolute path) </description>
  6966. <test-commands>
  6967. <command>-fs NAMENODE -mkdir /dir1</command>
  6968. <command>-fs NAMENODE -tail /dir1</command>
  6969. </test-commands>
  6970. <cleanup-commands>
  6971. <command>-fs NAMENODE -rm -r /dir1</command>
  6972. </cleanup-commands>
  6973. <comparators>
  6974. <comparator>
  6975. <type>RegexpComparator</type>
  6976. <expected-output>^tail: `/dir1': Is a directory</expected-output>
  6977. </comparator>
  6978. </comparators>
  6979. </test>
  6980. <test> <!-- TESTED -->
  6981. <description>tail: contents of directory(relative path)</description>
  6982. <test-commands>
  6983. <command>-fs NAMENODE -mkdir -p dir1</command>
  6984. <command>-fs NAMENODE -tail dir1</command>
  6985. </test-commands>
  6986. <cleanup-commands>
  6987. <command>-fs NAMENODE -rm -r dir1</command>
  6988. </cleanup-commands>
  6989. <comparators>
  6990. <comparator>
  6991. <type>RegexpComparator</type>
  6992. <expected-output>^tail: `dir1': Is a directory</expected-output>
  6993. </comparator>
  6994. </comparators>
  6995. </test>
  6996. <test> <!-- TESTED -->
  6997. <description>tail: Test for hdfs:// path - contents of file</description>
  6998. <test-commands>
  6999. <command>-fs NAMENODE -put CLITEST_DATA/data15bytes hdfs:///data15bytes</command>
  7000. <command>-fs NAMENODE -tail hdfs:///data15bytes</command>
  7001. </test-commands>
  7002. <cleanup-commands>
  7003. <command>-fs NAMENODE -rm hdfs:///*</command>
  7004. </cleanup-commands>
  7005. <comparators>
  7006. <comparator>
  7007. <type>TokenComparator</type>
  7008. <expected-output>12345678901234</expected-output>
  7009. </comparator>
  7010. </comparators>
  7011. </test>
  7012. <test> <!-- TESTED -->
  7013. <description>tail: Test for hdfs:// path - contents of files using globbing</description>
  7014. <test-commands>
  7015. <command>-fs NAMENODE -touchz hdfs:///file1</command>
  7016. <command>-fs NAMENODE -touchz hdfs:///file2</command>
  7017. <command>-fs NAMENODE -touchz hdfs:///file3</command>
  7018. <command>-fs NAMENODE -touchz hdfs:///file4</command>
  7019. <command>-fs NAMENODE -tail hdfs:///file*</command>
  7020. </test-commands>
  7021. <cleanup-commands>
  7022. <command>-fs NAMENODE -rm -r hdfs:///*</command>
  7023. </cleanup-commands>
  7024. <comparators>
  7025. <comparator>
  7026. <type>RegexpComparator</type>
  7027. <expected-output>^tail: `hdfs:///file\*': No such file or directory</expected-output>
  7028. </comparator>
  7029. </comparators>
  7030. </test>
  7031. <test> <!-- TESTED -->
  7032. <description>tail: Test for hdfs:// path - contents of file that does not exist</description>
  7033. <test-commands>
  7034. <command>-fs NAMENODE -tail hdfs:///file</command>
  7035. </test-commands>
  7036. <cleanup-commands>
  7037. </cleanup-commands>
  7038. <comparators>
  7039. <comparator>
  7040. <type>RegexpComparator</type>
  7041. <expected-output>^tail: `hdfs:///file': No such file or directory</expected-output>
  7042. </comparator>
  7043. </comparators>
  7044. </test>
  7045. <test> <!-- TESTED -->
  7046. <description>tail: Test for hdfs:// path - contents of directory</description>
  7047. <test-commands>
  7048. <command>-fs NAMENODE -mkdir hdfs:///dir1</command>
  7049. <command>-fs NAMENODE -tail hdfs:///dir1</command>
  7050. </test-commands>
  7051. <cleanup-commands>
  7052. <command>-fs NAMENODE -rm -r hdfs:///dir1</command>
  7053. </cleanup-commands>
  7054. <comparators>
  7055. <comparator>
  7056. <type>RegexpComparator</type>
  7057. <expected-output>^tail: `hdfs:///dir1': Is a directory</expected-output>
  7058. </comparator>
  7059. </comparators>
  7060. </test>
  7061. <test> <!-- TESTED -->
  7062. <description>tail: Test for Namenode's path - contents of file</description>
  7063. <test-commands>
  7064. <command>-fs NAMENODE -put CLITEST_DATA/data15bytes NAMENODE/data15bytes</command>
  7065. <command>-fs NAMENODE -tail NAMENODE/data15bytes</command>
  7066. </test-commands>
  7067. <cleanup-commands>
  7068. <command>-fs NAMENODE -rm NAMENODE/*</command>
  7069. </cleanup-commands>
  7070. <comparators>
  7071. <comparator>
  7072. <type>TokenComparator</type>
  7073. <expected-output>12345678901234</expected-output>
  7074. </comparator>
  7075. </comparators>
  7076. </test>
  7077. <test> <!-- TESTED -->
  7078. <description>tail: Test for Namenode's path - contents of files using globbing</description>
  7079. <test-commands>
  7080. <command>-fs NAMENODE -touchz NAMENODE/file1</command>
  7081. <command>-fs NAMENODE -touchz NAMENODE/file2</command>
  7082. <command>-fs NAMENODE -touchz NAMENODE/file3</command>
  7083. <command>-fs NAMENODE -touchz NAMENODE/file4</command>
  7084. <command>-fs NAMENODE -tail NAMENODE/file*</command>
  7085. </test-commands>
  7086. <cleanup-commands>
  7087. <command>-fs NAMENODE -rm -r NAMENODE/*</command>
  7088. </cleanup-commands>
  7089. <comparators>
  7090. <comparator>
  7091. <type>RegexpComparator</type>
  7092. <expected-output>^tail: `hdfs://\w+[-.a-z0-9]*:[0-9]+/file\*': No such file or directory</expected-output>
  7093. </comparator>
  7094. </comparators>
  7095. </test>
  7096. <test> <!-- TESTED -->
  7097. <description>tail: Test for Namenode's path - contents of file that does not exist</description>
  7098. <test-commands>
  7099. <command>-fs NAMENODE -tail NAMENODE/file</command>
  7100. </test-commands>
  7101. <cleanup-commands>
  7102. </cleanup-commands>
  7103. <comparators>
  7104. <comparator>
  7105. <type>RegexpComparator</type>
  7106. <expected-output>^tail: `hdfs://\w+[-.a-z0-9]*:[0-9]+/file': No such file or directory</expected-output>
  7107. </comparator>
  7108. </comparators>
  7109. </test>
  7110. <test> <!-- TESTED -->
  7111. <description>tail: Test for Namenode's path - contents of directory</description>
  7112. <test-commands>
  7113. <command>-fs NAMENODE -mkdir NAMENODE/dir1</command>
  7114. <command>-fs NAMENODE -tail NAMENODE/dir1</command>
  7115. </test-commands>
  7116. <cleanup-commands>
  7117. <command>-fs NAMENODE -rm -r NAMENODE/dir1</command>
  7118. </cleanup-commands>
  7119. <comparators>
  7120. <comparator>
  7121. <type>RegexpComparator</type>
  7122. <expected-output>^tail: `hdfs://\w+[-.a-z0-9]*:[0-9]+/dir1': Is a directory</expected-output>
  7123. </comparator>
  7124. </comparators>
  7125. </test>
  7126. <!-- Tests for count -->
  7127. <test> <!-- TESTED -->
  7128. <description>count: file using absolute path</description>
  7129. <test-commands>
  7130. <command>-fs NAMENODE -touchz /file1</command>
  7131. <command>-fs NAMENODE -count /file1</command>
  7132. </test-commands>
  7133. <cleanup-commands>
  7134. <command>-fs NAMENODE -rm /file1</command>
  7135. </cleanup-commands>
  7136. <comparators>
  7137. <comparator>
  7138. <type>RegexpComparator</type>
  7139. <expected-output>( |\t)*0( |\t)*1( |\t)*0 /file1</expected-output>
  7140. </comparator>
  7141. </comparators>
  7142. </test>
  7143. <test> <!-- TESTED -->
  7144. <description>count: file using relative path</description>
  7145. <test-commands>
  7146. <command>-fs NAMENODE -mkdir -p dir</command> <!-- make sure user home dir exists -->
  7147. <command>-fs NAMENODE -touchz file1</command>
  7148. <command>-fs NAMENODE -count file1</command>
  7149. </test-commands>
  7150. <cleanup-commands>
  7151. <command>-fs NAMENODE -rm file1</command>
  7152. </cleanup-commands>
  7153. <comparators>
  7154. <comparator>
  7155. <type>RegexpComparator</type>
  7156. <expected-output>( |\t)*0( |\t)*1( |\t)*0 file1</expected-output>
  7157. </comparator>
  7158. </comparators>
  7159. </test>
  7160. <test> <!-- TESTED -->
  7161. <description>count: directory using absolute path</description>
  7162. <test-commands>
  7163. <command>-fs NAMENODE -mkdir /dir1</command>
  7164. <command>-fs NAMENODE -count /dir1</command>
  7165. </test-commands>
  7166. <cleanup-commands>
  7167. <command>-fs NAMENODE -rm -r /dir1</command>
  7168. </cleanup-commands>
  7169. <comparators>
  7170. <comparator>
  7171. <type>RegexpComparator</type>
  7172. <expected-output>( |\t)*1( |\t)*0( |\t)*0 /dir1</expected-output>
  7173. </comparator>
  7174. </comparators>
  7175. </test>
  7176. <test> <!-- TESTED -->
  7177. <description>count: directory using relative path</description>
  7178. <test-commands>
  7179. <command>-fs NAMENODE -mkdir -p dir1</command>
  7180. <command>-fs NAMENODE -count dir1</command>
  7181. </test-commands>
  7182. <cleanup-commands>
  7183. <command>-fs NAMENODE -rm -r dir1</command>
  7184. </cleanup-commands>
  7185. <comparators>
  7186. <comparator>
  7187. <type>RegexpComparator</type>
  7188. <expected-output>( |\t)*1( |\t)*0( |\t)*0 dir1</expected-output>
  7189. </comparator>
  7190. </comparators>
  7191. </test>
  7192. <test> <!-- TESTED -->
  7193. <description>count: absolute path to file/directory that does not exist</description>
  7194. <test-commands>
  7195. <command>-fs NAMENODE -count /file1 </command>
  7196. </test-commands>
  7197. <cleanup-commands>
  7198. </cleanup-commands>
  7199. <comparators>
  7200. <comparator>
  7201. <type>TokenComparator</type>
  7202. <expected-output>count: `/file1': No such file or directory</expected-output>
  7203. </comparator>
  7204. </comparators>
  7205. </test>
  7206. <test> <!-- TESTED -->
  7207. <description>count: relative path to file/directory that does not exist</description>
  7208. <test-commands>
  7209. <command>-fs NAMENODE -count file1</command>
  7210. </test-commands>
  7211. <cleanup-commands>
  7212. </cleanup-commands>
  7213. <comparators>
  7214. <comparator>
  7215. <type>TokenComparator</type>
  7216. <expected-output>count: `file1': No such file or directory</expected-output>
  7217. </comparator>
  7218. </comparators>
  7219. </test>
  7220. <test> <!-- TESTED -->
  7221. <description>count: absolute path to multiple files using globbing</description>
  7222. <test-commands>
  7223. <command>-fs NAMENODE -touchz /file1</command>
  7224. <command>-fs NAMENODE -touchz /file2</command>
  7225. <command>-fs NAMENODE -touchz /file3</command>
  7226. <command>-fs NAMENODE -touchz /file4</command>
  7227. <command>-fs NAMENODE -count /file*</command>
  7228. </test-commands>
  7229. <cleanup-commands>
  7230. <command>-fs NAMENODE -rm -r /file*</command>
  7231. </cleanup-commands>
  7232. <comparators>
  7233. <comparator>
  7234. <type>RegexpComparator</type>
  7235. <expected-output>( |\t)*0( |\t)*1( |\t)*0 /file1</expected-output>
  7236. </comparator>
  7237. <comparator>
  7238. <type>RegexpComparator</type>
  7239. <expected-output>( |\t)*0( |\t)*1( |\t)*0 /file2</expected-output>
  7240. </comparator>
  7241. <comparator>
  7242. <type>RegexpComparator</type>
  7243. <expected-output>( |\t)*0( |\t)*1( |\t)*0 /file3</expected-output>
  7244. </comparator>
  7245. <comparator>
  7246. <type>RegexpComparator</type>
  7247. <expected-output>( |\t)*0( |\t)*1( |\t)*0 /file4</expected-output>
  7248. </comparator>
  7249. </comparators>
  7250. </test>
  7251. <test> <!-- TESTED -->
  7252. <description>count: relative path to multiple files using globbing</description>
  7253. <test-commands>
  7254. <command>-fs NAMENODE -touchz file1</command>
  7255. <command>-fs NAMENODE -touchz file2</command>
  7256. <command>-fs NAMENODE -touchz file3</command>
  7257. <command>-fs NAMENODE -touchz file4</command>
  7258. <command>-fs NAMENODE -count file*</command>
  7259. </test-commands>
  7260. <cleanup-commands>
  7261. <command>-fs NAMENODE -rm -r /user</command>
  7262. </cleanup-commands>
  7263. <comparators>
  7264. <comparator>
  7265. <type>RegexpComparator</type>
  7266. <expected-output>( |\t)*0( |\t)*1( |\t)*0 file1</expected-output>
  7267. </comparator>
  7268. <comparator>
  7269. <type>RegexpComparator</type>
  7270. <expected-output>( |\t)*0( |\t)*1( |\t)*0 file2</expected-output>
  7271. </comparator>
  7272. <comparator>
  7273. <type>RegexpComparator</type>
  7274. <expected-output>( |\t)*0( |\t)*1( |\t)*0 file3</expected-output>
  7275. </comparator>
  7276. <comparator>
  7277. <type>RegexpComparator</type>
  7278. <expected-output>( |\t)*0( |\t)*1( |\t)*0 file4</expected-output>
  7279. </comparator>
  7280. </comparators>
  7281. </test>
  7282. <test> <!-- TESTED -->
  7283. <description>count: absolute path to multiple files without globbing</description>
  7284. <test-commands>
  7285. <command>-fs NAMENODE -touchz /file1</command>
  7286. <command>-fs NAMENODE -touchz /file2</command>
  7287. <command>-fs NAMENODE -touchz /file3</command>
  7288. <command>-fs NAMENODE -touchz /file4</command>
  7289. <command>-fs NAMENODE -count /file1 /file2 /file3 /file4</command>
  7290. </test-commands>
  7291. <cleanup-commands>
  7292. <command>-fs NAMENODE -rm -r /file*</command>
  7293. </cleanup-commands>
  7294. <comparators>
  7295. <comparator>
  7296. <type>RegexpComparator</type>
  7297. <expected-output>( |\t)*0( |\t)*1( |\t)*0 /file1</expected-output>
  7298. </comparator>
  7299. <comparator>
  7300. <type>RegexpComparator</type>
  7301. <expected-output>( |\t)*0( |\t)*1( |\t)*0 /file2</expected-output>
  7302. </comparator>
  7303. <comparator>
  7304. <type>RegexpComparator</type>
  7305. <expected-output>( |\t)*0( |\t)*1( |\t)*0 /file3</expected-output>
  7306. </comparator>
  7307. <comparator>
  7308. <type>RegexpComparator</type>
  7309. <expected-output>( |\t)*0( |\t)*1( |\t)*0 /file4</expected-output>
  7310. </comparator>
  7311. </comparators>
  7312. </test>
  7313. <test> <!-- TESTED -->
  7314. <description>count: relative path to multiple files without globbing</description>
  7315. <test-commands>
  7316. <command>-fs NAMENODE -mkdir -p dir</command> <!-- make sure user home dir exists -->
  7317. <command>-fs NAMENODE -touchz file1</command>
  7318. <command>-fs NAMENODE -touchz file2</command>
  7319. <command>-fs NAMENODE -touchz file3</command>
  7320. <command>-fs NAMENODE -touchz file4</command>
  7321. <command>-fs NAMENODE -count file1 file2 file3 file4</command>
  7322. </test-commands>
  7323. <cleanup-commands>
  7324. <command>-fs NAMENODE -rm -r /user</command>
  7325. </cleanup-commands>
  7326. <comparators>
  7327. <comparator>
  7328. <type>RegexpComparator</type>
  7329. <expected-output>( |\t)*0( |\t)*1( |\t)*0 file1</expected-output>
  7330. </comparator>
  7331. <comparator>
  7332. <type>RegexpComparator</type>
  7333. <expected-output>( |\t)*0( |\t)*1( |\t)*0 file2</expected-output>
  7334. </comparator>
  7335. <comparator>
  7336. <type>RegexpComparator</type>
  7337. <expected-output>( |\t)*0( |\t)*1( |\t)*0 file3</expected-output>
  7338. </comparator>
  7339. <comparator>
  7340. <type>RegexpComparator</type>
  7341. <expected-output>( |\t)*0( |\t)*1( |\t)*0 file4</expected-output>
  7342. </comparator>
  7343. </comparators>
  7344. </test>
  7345. <test> <!-- TESTED -->
  7346. <description>count: absolute path to multiple directories using globbing</description>
  7347. <test-commands>
  7348. <command>-fs NAMENODE -mkdir /dir1</command>
  7349. <command>-fs NAMENODE -mkdir /dir2</command>
  7350. <command>-fs NAMENODE -mkdir /dir3</command>
  7351. <command>-fs NAMENODE -mkdir /dir4</command>
  7352. <command>-fs NAMENODE -count /dir* </command>
  7353. </test-commands>
  7354. <cleanup-commands>
  7355. <command>-fs NAMENODE -rm -r /dir*</command>
  7356. </cleanup-commands>
  7357. <comparators>
  7358. <comparator>
  7359. <type>RegexpComparator</type>
  7360. <expected-output>( |\t)*1( |\t)*0( |\t)*0 /dir1</expected-output>
  7361. </comparator>
  7362. <comparator>
  7363. <type>RegexpComparator</type>
  7364. <expected-output>( |\t)*1( |\t)*0( |\t)*0 /dir2</expected-output>
  7365. </comparator>
  7366. <comparator>
  7367. <type>RegexpComparator</type>
  7368. <expected-output>( |\t)*1( |\t)*0( |\t)*0 /dir3</expected-output>
  7369. </comparator>
  7370. <comparator>
  7371. <type>RegexpComparator</type>
  7372. <expected-output>( |\t)*1( |\t)*0( |\t)*0 /dir4</expected-output>
  7373. </comparator>
  7374. </comparators>
  7375. </test>
  7376. <test> <!-- TESTED -->
  7377. <description>count: relative path to multiple directories using globbing</description>
  7378. <test-commands>
  7379. <command>-fs NAMENODE -mkdir -p dir1</command>
  7380. <command>-fs NAMENODE -mkdir -p dir2</command>
  7381. <command>-fs NAMENODE -mkdir -p dir3</command>
  7382. <command>-fs NAMENODE -mkdir -p dir4</command>
  7383. <command>-fs NAMENODE -count dir* </command>
  7384. </test-commands>
  7385. <cleanup-commands>
  7386. <command>-fs NAMENODE -rm -r /user</command>
  7387. </cleanup-commands>
  7388. <comparators>
  7389. <comparator>
  7390. <type>RegexpComparator</type>
  7391. <expected-output>( |\t)*1( |\t)*0( |\t)*0 dir1</expected-output>
  7392. </comparator>
  7393. <comparator>
  7394. <type>RegexpComparator</type>
  7395. <expected-output>( |\t)*1( |\t)*0( |\t)*0 dir2</expected-output>
  7396. </comparator>
  7397. <comparator>
  7398. <type>RegexpComparator</type>
  7399. <expected-output>( |\t)*1( |\t)*0( |\t)*0 dir3</expected-output>
  7400. </comparator>
  7401. <comparator>
  7402. <type>RegexpComparator</type>
  7403. <expected-output>( |\t)*1( |\t)*0( |\t)*0 dir4</expected-output>
  7404. </comparator>
  7405. </comparators>
  7406. </test>
  7407. <test> <!-- TESTED -->
  7408. <description>count: absolute path to multiple directories without globbing</description>
  7409. <test-commands>
  7410. <command>-fs NAMENODE -mkdir /dir1</command>
  7411. <command>-fs NAMENODE -mkdir /dir2</command>
  7412. <command>-fs NAMENODE -mkdir /dir3</command>
  7413. <command>-fs NAMENODE -mkdir /dir4</command>
  7414. <command>-fs NAMENODE -count /dir1 /dir2 /dir3 /dir4 </command>
  7415. </test-commands>
  7416. <cleanup-commands>
  7417. <command>-fs NAMENODE -rm -r /dir*</command>
  7418. </cleanup-commands>
  7419. <comparators>
  7420. <comparator>
  7421. <type>RegexpComparator</type>
  7422. <expected-output>( |\t)*1( |\t)*0( |\t)*0 /dir1</expected-output>
  7423. </comparator>
  7424. <comparator>
  7425. <type>RegexpComparator</type>
  7426. <expected-output>( |\t)*1( |\t)*0( |\t)*0 /dir2</expected-output>
  7427. </comparator>
  7428. <comparator>
  7429. <type>RegexpComparator</type>
  7430. <expected-output>( |\t)*1( |\t)*0( |\t)*0 /dir3</expected-output>
  7431. </comparator>
  7432. <comparator>
  7433. <type>RegexpComparator</type>
  7434. <expected-output>( |\t)*1( |\t)*0( |\t)*0 /dir4</expected-output>
  7435. </comparator>
  7436. </comparators>
  7437. </test>
  7438. <test> <!-- TESTED -->
  7439. <description>count: relative path to multiple directories without globbing</description>
  7440. <test-commands>
  7441. <command>-fs NAMENODE -mkdir -p dir1</command>
  7442. <command>-fs NAMENODE -mkdir -p dir2</command>
  7443. <command>-fs NAMENODE -mkdir -p dir3</command>
  7444. <command>-fs NAMENODE -mkdir -p dir4</command>
  7445. <command>-fs NAMENODE -count dir1 dir2 dir3 dir4 </command>
  7446. </test-commands>
  7447. <cleanup-commands>
  7448. <command>-fs NAMENODE -rm -r /user</command>
  7449. </cleanup-commands>
  7450. <comparators>
  7451. <comparator>
  7452. <type>RegexpComparator</type>
  7453. <expected-output>( |\t)*1( |\t)*0( |\t)*0 dir1</expected-output>
  7454. </comparator>
  7455. <comparator>
  7456. <type>RegexpComparator</type>
  7457. <expected-output>( |\t)*1( |\t)*0( |\t)*0 dir2</expected-output>
  7458. </comparator>
  7459. <comparator>
  7460. <type>RegexpComparator</type>
  7461. <expected-output>( |\t)*1( |\t)*0( |\t)*0 dir3</expected-output>
  7462. </comparator>
  7463. <comparator>
  7464. <type>RegexpComparator</type>
  7465. <expected-output>( |\t)*1( |\t)*0( |\t)*0 dir4</expected-output>
  7466. </comparator>
  7467. </comparators>
  7468. </test>
  7469. <test> <!-- TESTED -->
  7470. <description>count: file using absolute path with -q option</description>
  7471. <test-commands>
  7472. <command>-fs NAMENODE -touchz /file1</command>
  7473. <command>-fs NAMENODE -count -q /file1</command>
  7474. </test-commands>
  7475. <cleanup-commands>
  7476. <command>-fs NAMENODE -rm /file1</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. </comparators>
  7484. </test>
  7485. <test> <!-- TESTED -->
  7486. <description>count: file using relative path with -q option</description>
  7487. <test-commands>
  7488. <command>-fs NAMENODE -mkdir -p dir</command> <!-- make sure user home dir exists -->
  7489. <command>-fs NAMENODE -touchz file1</command>
  7490. <command>-fs NAMENODE -count -q file1</command>
  7491. </test-commands>
  7492. <cleanup-commands>
  7493. <command>-fs NAMENODE -rm file1</command>
  7494. </cleanup-commands>
  7495. <comparators>
  7496. <comparator>
  7497. <type>RegexpComparator</type>
  7498. <expected-output>( |\t)*none( |\t)*inf( |\t)*none( |\t)*inf( |\t)*0( |\t)*1( |\t)*0 file1</expected-output>
  7499. </comparator>
  7500. </comparators>
  7501. </test>
  7502. <test> <!-- TESTED -->
  7503. <description>count: directory using absolute path with -q option</description>
  7504. <test-commands>
  7505. <command>-fs NAMENODE -mkdir /dir1</command>
  7506. <dfs-admin-command>-fs NAMENODE -setQuota 10 /dir1 </dfs-admin-command>
  7507. <dfs-admin-command>-fs NAMENODE -setSpaceQuota 1m /dir1 </dfs-admin-command>
  7508. <command>-fs NAMENODE -count -q /dir1</command>
  7509. </test-commands>
  7510. <cleanup-commands>
  7511. <command>-fs NAMENODE -rm -r /dir1</command>
  7512. </cleanup-commands>
  7513. <comparators>
  7514. <comparator>
  7515. <type>RegexpComparator</type>
  7516. <expected-output>( |\t)*10( |\t)*9( |\t)*1048576( |\t)*1048576( |\t)*1( |\t)*0( |\t)*0 /dir1</expected-output>
  7517. </comparator>
  7518. </comparators>
  7519. </test>
  7520. <test> <!-- TESTED -->
  7521. <description>setSpaceQuota -storageType: directory with quota by storage type</description>
  7522. <test-commands>
  7523. <command>-fs NAMENODE -mkdir /ttt</command>
  7524. <dfs-admin-command>-fs NAMENODE -setSpaceQuota 1m -storageType DISK /ttt </dfs-admin-command>
  7525. <command>-fs NAMENODE -count -q -t DISK /ttt</command>
  7526. </test-commands>
  7527. <cleanup-commands>
  7528. <command>-fs NAMENODE -rm -r /ttt</command>
  7529. </cleanup-commands>
  7530. <comparators>
  7531. <comparator>
  7532. <type>RegexpComparator</type>
  7533. <expected-output>( |\t)*1048576( |\t)*1048576 /ttt</expected-output>
  7534. </comparator>
  7535. </comparators>
  7536. </test>
  7537. <test> <!-- TESTED -->
  7538. <description>clrSpaceQuota -storageType: directory quota by storage type</description>
  7539. <test-commands>
  7540. <command>-fs NAMENODE -mkdir /ttt</command>
  7541. <dfs-admin-command>-fs NAMENODE -setSpaceQuota 1m -storageType DISK /ttt </dfs-admin-command>
  7542. <command>-fs NAMENODE -count -q -t DISK /ttt</command>
  7543. <dfs-admin-command>-fs NAMENODE -clrSpaceQuota -storageType DISK /ttt </dfs-admin-command>
  7544. <command>-fs NAMENODE -count -q -t DISK /ttt</command>
  7545. </test-commands>
  7546. <cleanup-commands>
  7547. <command>-fs NAMENODE -rm -r /ttt</command>
  7548. </cleanup-commands>
  7549. <comparators>
  7550. <comparator>
  7551. <type>RegexpComparator</type>
  7552. <expected-output>( |\t)*none( |\t)*inf /ttt</expected-output>
  7553. </comparator>
  7554. </comparators>
  7555. </test>
  7556. <test> <!-- TESTED -->
  7557. <description>count: directory using relative path with -q option</description>
  7558. <test-commands>
  7559. <command>-fs NAMENODE -mkdir -p dir1</command>
  7560. <dfs-admin-command>-fs NAMENODE -setQuota 10 dir1 </dfs-admin-command>
  7561. <dfs-admin-command>-fs NAMENODE -setSpaceQuota 1m dir1 </dfs-admin-command>
  7562. <command>-fs NAMENODE -count -q dir1</command>
  7563. </test-commands>
  7564. <cleanup-commands>
  7565. <command>-fs NAMENODE -rm -r dir1</command>
  7566. </cleanup-commands>
  7567. <comparators>
  7568. <comparator>
  7569. <type>RegexpComparator</type>
  7570. <expected-output>( |\t)*10( |\t)*9( |\t)*1048576( |\t)*1048576( |\t)*1( |\t)*0( |\t)*0 dir1</expected-output>
  7571. </comparator>
  7572. </comparators>
  7573. </test>
  7574. <test> <!-- TESTED -->
  7575. <description>count: absolute path to file/directory that does not exist with -q option</description>
  7576. <test-commands>
  7577. <command>-fs NAMENODE -count -q /file1 </command>
  7578. </test-commands>
  7579. <cleanup-commands>
  7580. </cleanup-commands>
  7581. <comparators>
  7582. <comparator>
  7583. <type>TokenComparator</type>
  7584. <expected-output>count: `/file1': No such file or directory</expected-output>
  7585. </comparator>
  7586. </comparators>
  7587. </test>
  7588. <test> <!-- TESTED -->
  7589. <description>count: relative path to file/directory that does not exist with -q option</description>
  7590. <test-commands>
  7591. <command>-fs NAMENODE -count -q file1</command>
  7592. </test-commands>
  7593. <cleanup-commands>
  7594. </cleanup-commands>
  7595. <comparators>
  7596. <comparator>
  7597. <type>TokenComparator</type>
  7598. <expected-output>count: `file1': No such file or directory</expected-output>
  7599. </comparator>
  7600. </comparators>
  7601. </test>
  7602. <test> <!-- TESTED -->
  7603. <description>count: absolute path to multiple files using globbing with -q option</description>
  7604. <test-commands>
  7605. <command>-fs NAMENODE -touchz /file1</command>
  7606. <command>-fs NAMENODE -touchz /file2</command>
  7607. <command>-fs NAMENODE -touchz /file3</command>
  7608. <command>-fs NAMENODE -touchz /file4</command>
  7609. <command>-fs NAMENODE -count -q /file*</command>
  7610. </test-commands>
  7611. <cleanup-commands>
  7612. <command>-fs NAMENODE -rm -r /file*</command>
  7613. </cleanup-commands>
  7614. <comparators>
  7615. <comparator>
  7616. <type>RegexpComparator</type>
  7617. <expected-output>( |\t)*none( |\t)*inf( |\t)*none( |\t)*inf( |\t)*0( |\t)*1( |\t)*0 /file1</expected-output>
  7618. </comparator>
  7619. <comparator>
  7620. <type>RegexpComparator</type>
  7621. <expected-output>( |\t)*none( |\t)*inf( |\t)*none( |\t)*inf( |\t)*0( |\t)*1( |\t)*0 /file2</expected-output>
  7622. </comparator>
  7623. <comparator>
  7624. <type>RegexpComparator</type>
  7625. <expected-output>( |\t)*none( |\t)*inf( |\t)*none( |\t)*inf( |\t)*0( |\t)*1( |\t)*0 /file3</expected-output>
  7626. </comparator>
  7627. <comparator>
  7628. <type>RegexpComparator</type>
  7629. <expected-output>( |\t)*none( |\t)*inf( |\t)*none( |\t)*inf( |\t)*0( |\t)*1( |\t)*0 /file4</expected-output>
  7630. </comparator>
  7631. </comparators>
  7632. </test>
  7633. <test> <!-- TESTED -->
  7634. <description>count: relative path to multiple files using globbing with -q option</description>
  7635. <test-commands>
  7636. <command>-fs NAMENODE -touchz file1</command>
  7637. <command>-fs NAMENODE -touchz file2</command>
  7638. <command>-fs NAMENODE -touchz file3</command>
  7639. <command>-fs NAMENODE -touchz file4</command>
  7640. <command>-fs NAMENODE -count -q file*</command>
  7641. </test-commands>
  7642. <cleanup-commands>
  7643. <command>-fs NAMENODE -rm -r /user</command>
  7644. </cleanup-commands>
  7645. <comparators>
  7646. <comparator>
  7647. <type>RegexpComparator</type>
  7648. <expected-output>( |\t)*none( |\t)*inf( |\t)*none( |\t)*inf( |\t)*0( |\t)*1( |\t)*0 file1</expected-output>
  7649. </comparator>
  7650. <comparator>
  7651. <type>RegexpComparator</type>
  7652. <expected-output>( |\t)*none( |\t)*inf( |\t)*none( |\t)*inf( |\t)*0( |\t)*1( |\t)*0 file2</expected-output>
  7653. </comparator>
  7654. <comparator>
  7655. <type>RegexpComparator</type>
  7656. <expected-output>( |\t)*none( |\t)*inf( |\t)*none( |\t)*inf( |\t)*0( |\t)*1( |\t)*0 file3</expected-output>
  7657. </comparator>
  7658. <comparator>
  7659. <type>RegexpComparator</type>
  7660. <expected-output>( |\t)*none( |\t)*inf( |\t)*none( |\t)*inf( |\t)*0( |\t)*1( |\t)*0 file4</expected-output>
  7661. </comparator>
  7662. </comparators>
  7663. </test>
  7664. <test> <!-- TESTED -->
  7665. <description>count: absolute path to multiple files without globbing with -q option</description>
  7666. <test-commands>
  7667. <command>-fs NAMENODE -touchz /file1</command>
  7668. <command>-fs NAMENODE -touchz /file2</command>
  7669. <command>-fs NAMENODE -touchz /file3</command>
  7670. <command>-fs NAMENODE -touchz /file4</command>
  7671. <command>-fs NAMENODE -count -q /file1 /file2 /file3 /file4</command>
  7672. </test-commands>
  7673. <cleanup-commands>
  7674. <command>-fs NAMENODE -rm -r /file*</command>
  7675. </cleanup-commands>
  7676. <comparators>
  7677. <comparator>
  7678. <type>RegexpComparator</type>
  7679. <expected-output>( |\t)*none( |\t)*inf( |\t)*none( |\t)*inf( |\t)*0( |\t)*1( |\t)*0 /file1</expected-output>
  7680. </comparator>
  7681. <comparator>
  7682. <type>RegexpComparator</type>
  7683. <expected-output>( |\t)*none( |\t)*inf( |\t)*none( |\t)*inf( |\t)*0( |\t)*1( |\t)*0 /file2</expected-output>
  7684. </comparator>
  7685. <comparator>
  7686. <type>RegexpComparator</type>
  7687. <expected-output>( |\t)*none( |\t)*inf( |\t)*none( |\t)*inf( |\t)*0( |\t)*1( |\t)*0 /file3</expected-output>
  7688. </comparator>
  7689. <comparator>
  7690. <type>RegexpComparator</type>
  7691. <expected-output>( |\t)*none( |\t)*inf( |\t)*none( |\t)*inf( |\t)*0( |\t)*1( |\t)*0 /file4</expected-output>
  7692. </comparator>
  7693. </comparators>
  7694. </test>
  7695. <test> <!-- TESTED -->
  7696. <description>count: relative path to multiple files without globbing with -q option</description>
  7697. <test-commands>
  7698. <command>-fs NAMENODE -mkdir -p dir</command> <!-- make sure user home dir exists -->
  7699. <command>-fs NAMENODE -touchz file1</command>
  7700. <command>-fs NAMENODE -touchz file2</command>
  7701. <command>-fs NAMENODE -touchz file3</command>
  7702. <command>-fs NAMENODE -touchz file4</command>
  7703. <command>-fs NAMENODE -count -q file1 file2 file3 file4</command>
  7704. </test-commands>
  7705. <cleanup-commands>
  7706. <command>-fs NAMENODE -rm -r /user</command>
  7707. </cleanup-commands>
  7708. <comparators>
  7709. <comparator>
  7710. <type>RegexpComparator</type>
  7711. <expected-output>( |\t)*none( |\t)*inf( |\t)*none( |\t)*inf( |\t)*0( |\t)*1( |\t)*0 file1</expected-output>
  7712. </comparator>
  7713. <comparator>
  7714. <type>RegexpComparator</type>
  7715. <expected-output>( |\t)*none( |\t)*inf( |\t)*none( |\t)*inf( |\t)*0( |\t)*1( |\t)*0 file2</expected-output>
  7716. </comparator>
  7717. <comparator>
  7718. <type>RegexpComparator</type>
  7719. <expected-output>( |\t)*none( |\t)*inf( |\t)*none( |\t)*inf( |\t)*0( |\t)*1( |\t)*0 file3</expected-output>
  7720. </comparator>
  7721. <comparator>
  7722. <type>RegexpComparator</type>
  7723. <expected-output>( |\t)*none( |\t)*inf( |\t)*none( |\t)*inf( |\t)*0( |\t)*1( |\t)*0 file4</expected-output>
  7724. </comparator>
  7725. </comparators>
  7726. </test>
  7727. <test> <!-- TESTED -->
  7728. <description>count: absolute path to multiple directories using globbing with -q option</description>
  7729. <test-commands>
  7730. <command>-fs NAMENODE -mkdir /dir1</command>
  7731. <command>-fs NAMENODE -mkdir /dir2</command>
  7732. <command>-fs NAMENODE -mkdir /dir3</command>
  7733. <command>-fs NAMENODE -mkdir /dir4</command>
  7734. <dfs-admin-command>-fs NAMENODE -setQuota 10 /dir1 </dfs-admin-command>
  7735. <dfs-admin-command>-fs NAMENODE -setSpaceQuota 1m /dir1 </dfs-admin-command>
  7736. <dfs-admin-command>-fs NAMENODE -setQuota 10 /dir2 </dfs-admin-command>
  7737. <dfs-admin-command>-fs NAMENODE -setSpaceQuota 1m /dir2 </dfs-admin-command>
  7738. <dfs-admin-command>-fs NAMENODE -setQuota 10 /dir3 </dfs-admin-command>
  7739. <dfs-admin-command>-fs NAMENODE -setSpaceQuota 1m /dir3 </dfs-admin-command>
  7740. <dfs-admin-command>-fs NAMENODE -setQuota 10 /dir4 </dfs-admin-command>
  7741. <dfs-admin-command>-fs NAMENODE -setSpaceQuota 1m /dir4 </dfs-admin-command>
  7742. <command>-fs NAMENODE -count -q /dir* </command>
  7743. </test-commands>
  7744. <cleanup-commands>
  7745. <command>-fs NAMENODE -rm -r /dir*</command>
  7746. </cleanup-commands>
  7747. <comparators>
  7748. <comparator>
  7749. <type>RegexpComparator</type>
  7750. <expected-output>( |\t)*10( |\t)*9( |\t)*1048576( |\t)*1048576( |\t)*1( |\t)*0( |\t)*0 /dir1</expected-output>
  7751. </comparator>
  7752. <comparator>
  7753. <type>RegexpComparator</type>
  7754. <expected-output>( |\t)*10( |\t)*9( |\t)*1048576( |\t)*1048576( |\t)*1( |\t)*0( |\t)*0 /dir2</expected-output>
  7755. </comparator>
  7756. <comparator>
  7757. <type>RegexpComparator</type>
  7758. <expected-output>( |\t)*10( |\t)*9( |\t)*1048576( |\t)*1048576( |\t)*1( |\t)*0( |\t)*0 /dir3</expected-output>
  7759. </comparator>
  7760. <comparator>
  7761. <type>RegexpComparator</type>
  7762. <expected-output>( |\t)*10( |\t)*9( |\t)*1048576( |\t)*1048576( |\t)*1( |\t)*0( |\t)*0 /dir4</expected-output>
  7763. </comparator>
  7764. </comparators>
  7765. </test>
  7766. <test> <!-- TESTED -->
  7767. <description>count: relative path to multiple directories using globbing with -q option</description>
  7768. <test-commands>
  7769. <command>-fs NAMENODE -mkdir -p dir1</command>
  7770. <command>-fs NAMENODE -mkdir -p dir2</command>
  7771. <command>-fs NAMENODE -mkdir -p dir3</command>
  7772. <command>-fs NAMENODE -mkdir -p dir4</command>
  7773. <dfs-admin-command>-fs NAMENODE -setQuota 10 dir1 </dfs-admin-command>
  7774. <dfs-admin-command>-fs NAMENODE -setSpaceQuota 1m dir1 </dfs-admin-command>
  7775. <dfs-admin-command>-fs NAMENODE -setQuota 10 dir2 </dfs-admin-command>
  7776. <dfs-admin-command>-fs NAMENODE -setSpaceQuota 1m dir2 </dfs-admin-command>
  7777. <dfs-admin-command>-fs NAMENODE -setQuota 10 dir3 </dfs-admin-command>
  7778. <dfs-admin-command>-fs NAMENODE -setSpaceQuota 1m dir3 </dfs-admin-command>
  7779. <dfs-admin-command>-fs NAMENODE -setQuota 10 dir4 </dfs-admin-command>
  7780. <dfs-admin-command>-fs NAMENODE -setSpaceQuota 1m dir4 </dfs-admin-command>
  7781. <command>-fs NAMENODE -count -q dir* </command>
  7782. </test-commands>
  7783. <cleanup-commands>
  7784. <command>-fs NAMENODE -rm -r /user</command>
  7785. </cleanup-commands>
  7786. <comparators>
  7787. <comparator>
  7788. <type>RegexpComparator</type>
  7789. <expected-output>( |\t)*10( |\t)*9( |\t)*1048576( |\t)*1048576( |\t)*1( |\t)*0( |\t)*0 dir1</expected-output>
  7790. </comparator>
  7791. <comparator>
  7792. <type>RegexpComparator</type>
  7793. <expected-output>( |\t)*10( |\t)*9( |\t)*1048576( |\t)*1048576( |\t)*1( |\t)*0( |\t)*0 dir2</expected-output>
  7794. </comparator>
  7795. <comparator>
  7796. <type>RegexpComparator</type>
  7797. <expected-output>( |\t)*10( |\t)*9( |\t)*1048576( |\t)*1048576( |\t)*1( |\t)*0( |\t)*0 dir3</expected-output>
  7798. </comparator>
  7799. <comparator>
  7800. <type>RegexpComparator</type>
  7801. <expected-output>( |\t)*10( |\t)*9( |\t)*1048576( |\t)*1048576( |\t)*1( |\t)*0( |\t)*0 dir4</expected-output>
  7802. </comparator>
  7803. </comparators>
  7804. </test>
  7805. <test> <!-- TESTED -->
  7806. <description>count: absolute path to multiple directories without globbing with -q option</description>
  7807. <test-commands>
  7808. <command>-fs NAMENODE -mkdir /dir1</command>
  7809. <command>-fs NAMENODE -mkdir /dir2</command>
  7810. <command>-fs NAMENODE -mkdir /dir3</command>
  7811. <command>-fs NAMENODE -mkdir /dir4</command>
  7812. <dfs-admin-command>-fs NAMENODE -setQuota 10 /dir1 </dfs-admin-command>
  7813. <dfs-admin-command>-fs NAMENODE -setSpaceQuota 1m /dir1 </dfs-admin-command>
  7814. <dfs-admin-command>-fs NAMENODE -setQuota 10 /dir2 </dfs-admin-command>
  7815. <dfs-admin-command>-fs NAMENODE -setSpaceQuota 1m /dir2 </dfs-admin-command>
  7816. <dfs-admin-command>-fs NAMENODE -setQuota 10 /dir3 </dfs-admin-command>
  7817. <dfs-admin-command>-fs NAMENODE -setSpaceQuota 1m /dir3 </dfs-admin-command>
  7818. <dfs-admin-command>-fs NAMENODE -setQuota 10 /dir4 </dfs-admin-command>
  7819. <dfs-admin-command>-fs NAMENODE -setSpaceQuota 1m /dir4 </dfs-admin-command>
  7820. <command>-fs NAMENODE -count -q /dir1 /dir2 /dir3 /dir4 </command>
  7821. </test-commands>
  7822. <cleanup-commands>
  7823. <command>-fs NAMENODE -rm -r /dir*</command>
  7824. </cleanup-commands>
  7825. <comparators>
  7826. <comparator>
  7827. <type>RegexpComparator</type>
  7828. <expected-output>( |\t)*10( |\t)*9( |\t)*1048576( |\t)*1048576( |\t)*1( |\t)*0( |\t)*0 /dir1</expected-output>
  7829. </comparator>
  7830. <comparator>
  7831. <type>RegexpComparator</type>
  7832. <expected-output>( |\t)*10( |\t)*9( |\t)*1048576( |\t)*1048576( |\t)*1( |\t)*0( |\t)*0 /dir2</expected-output>
  7833. </comparator>
  7834. <comparator>
  7835. <type>RegexpComparator</type>
  7836. <expected-output>( |\t)*10( |\t)*9( |\t)*1048576( |\t)*1048576( |\t)*1( |\t)*0( |\t)*0 /dir3</expected-output>
  7837. </comparator>
  7838. <comparator>
  7839. <type>RegexpComparator</type>
  7840. <expected-output>( |\t)*10( |\t)*9( |\t)*1048576( |\t)*1048576( |\t)*1( |\t)*0( |\t)*0 /dir4</expected-output>
  7841. </comparator>
  7842. </comparators>
  7843. </test>
  7844. <test> <!-- TESTED -->
  7845. <description>count: relative path to multiple directories without globbing with -q option</description>
  7846. <test-commands>
  7847. <command>-fs NAMENODE -mkdir -p dir1</command>
  7848. <command>-fs NAMENODE -mkdir -p dir2</command>
  7849. <command>-fs NAMENODE -mkdir -p dir3</command>
  7850. <command>-fs NAMENODE -mkdir -p dir4</command>
  7851. <dfs-admin-command>-fs NAMENODE -setQuota 10 dir1 </dfs-admin-command>
  7852. <dfs-admin-command>-fs NAMENODE -setSpaceQuota 1m dir1 </dfs-admin-command>
  7853. <dfs-admin-command>-fs NAMENODE -setQuota 10 dir2 </dfs-admin-command>
  7854. <dfs-admin-command>-fs NAMENODE -setSpaceQuota 1m dir2 </dfs-admin-command>
  7855. <dfs-admin-command>-fs NAMENODE -setQuota 10 dir3 </dfs-admin-command>
  7856. <dfs-admin-command>-fs NAMENODE -setSpaceQuota 1m dir3 </dfs-admin-command>
  7857. <dfs-admin-command>-fs NAMENODE -setQuota 10 dir4 </dfs-admin-command>
  7858. <dfs-admin-command>-fs NAMENODE -setSpaceQuota 1m dir4 </dfs-admin-command>
  7859. <command>-fs NAMENODE -count -q dir1 dir2 dir3 dir4 </command>
  7860. </test-commands>
  7861. <cleanup-commands>
  7862. <command>-fs NAMENODE -rm -r /user</command>
  7863. </cleanup-commands>
  7864. <comparators>
  7865. <comparator>
  7866. <type>RegexpComparator</type>
  7867. <expected-output>( |\t)*10( |\t)*9( |\t)*1048576( |\t)*1048576( |\t)*1( |\t)*0( |\t)*0 dir1</expected-output>
  7868. </comparator>
  7869. <comparator>
  7870. <type>RegexpComparator</type>
  7871. <expected-output>( |\t)*10( |\t)*9( |\t)*1048576( |\t)*1048576( |\t)*1( |\t)*0( |\t)*0 dir2</expected-output>
  7872. </comparator>
  7873. <comparator>
  7874. <type>RegexpComparator</type>
  7875. <expected-output>( |\t)*10( |\t)*9( |\t)*1048576( |\t)*1048576( |\t)*1( |\t)*0( |\t)*0 dir3</expected-output>
  7876. </comparator>
  7877. <comparator>
  7878. <type>RegexpComparator</type>
  7879. <expected-output>( |\t)*10( |\t)*9( |\t)*1048576( |\t)*1048576( |\t)*1( |\t)*0( |\t)*0 dir4</expected-output>
  7880. </comparator>
  7881. </comparators>
  7882. </test>
  7883. <test> <!-- TESTED -->
  7884. <description>count: Test for file using hdfs:// path</description>
  7885. <test-commands>
  7886. <command>-fs NAMENODE -touchz hdfs:///file1</command>
  7887. <command>-fs NAMENODE -count hdfs:///file1</command>
  7888. </test-commands>
  7889. <cleanup-commands>
  7890. <command>-fs NAMENODE -rm hdfs:///file1</command>
  7891. </cleanup-commands>
  7892. <comparators>
  7893. <comparator>
  7894. <type>RegexpComparator</type>
  7895. <expected-output>( |\t)*0( |\t)*1( |\t)*0 hdfs:///file1</expected-output>
  7896. </comparator>
  7897. </comparators>
  7898. </test>
  7899. <test> <!-- TESTED -->
  7900. <description>count: Test for directory using hdfs:// path</description>
  7901. <test-commands>
  7902. <command>-fs NAMENODE -mkdir hdfs:///dir1</command>
  7903. <command>-fs NAMENODE -count hdfs:///dir1</command>
  7904. </test-commands>
  7905. <cleanup-commands>
  7906. <command>-fs NAMENODE -rm -r hdfs:///dir1</command>
  7907. </cleanup-commands>
  7908. <comparators>
  7909. <comparator>
  7910. <type>RegexpComparator</type>
  7911. <expected-output>( |\t)*1( |\t)*0( |\t)*0 hdfs:///dir1</expected-output>
  7912. </comparator>
  7913. </comparators>
  7914. </test>
  7915. <test> <!-- TESTED -->
  7916. <description>count: Test for hdfs:// path - file/directory that does not exist</description>
  7917. <test-commands>
  7918. <command>-fs NAMENODE -count hdfs:///file1 </command>
  7919. </test-commands>
  7920. <cleanup-commands>
  7921. </cleanup-commands>
  7922. <comparators>
  7923. <comparator>
  7924. <type>TokenComparator</type>
  7925. <expected-output>count: `hdfs:///file1': No such file or directory</expected-output>
  7926. </comparator>
  7927. </comparators>
  7928. </test>
  7929. <test> <!-- TESTED -->
  7930. <description>count: Test for hdfs:// path - multiple files using globbing</description>
  7931. <test-commands>
  7932. <command>-fs NAMENODE -touchz hdfs:///file1</command>
  7933. <command>-fs NAMENODE -touchz hdfs:///file2</command>
  7934. <command>-fs NAMENODE -touchz hdfs:///file3</command>
  7935. <command>-fs NAMENODE -touchz hdfs:///file4</command>
  7936. <command>-fs NAMENODE -count hdfs:///file*</command>
  7937. </test-commands>
  7938. <cleanup-commands>
  7939. <command>-fs NAMENODE -rm -r hdfs:///file*</command>
  7940. </cleanup-commands>
  7941. <comparators>
  7942. <comparator>
  7943. <type>RegexpComparator</type>
  7944. <expected-output>( |\t)*0( |\t)*1( |\t)*0 hdfs:///file1</expected-output>
  7945. </comparator>
  7946. <comparator>
  7947. <type>RegexpComparator</type>
  7948. <expected-output>( |\t)*0( |\t)*1( |\t)*0 hdfs:///file2</expected-output>
  7949. </comparator>
  7950. <comparator>
  7951. <type>RegexpComparator</type>
  7952. <expected-output>( |\t)*0( |\t)*1( |\t)*0 hdfs:///file3</expected-output>
  7953. </comparator>
  7954. <comparator>
  7955. <type>RegexpComparator</type>
  7956. <expected-output>( |\t)*0( |\t)*1( |\t)*0 hdfs:///file4</expected-output>
  7957. </comparator>
  7958. </comparators>
  7959. </test>
  7960. <test> <!-- TESTED -->
  7961. <description>count: Test for hdfs:// path - multiple files without globbing</description>
  7962. <test-commands>
  7963. <command>-fs NAMENODE -touchz hdfs:///file1</command>
  7964. <command>-fs NAMENODE -touchz hdfs:///file2</command>
  7965. <command>-fs NAMENODE -touchz hdfs:///file3</command>
  7966. <command>-fs NAMENODE -touchz hdfs:///file4</command>
  7967. <command>-fs NAMENODE -count hdfs:///file1 hdfs:///file2 hdfs:///file3 hdfs:///file4</command>
  7968. </test-commands>
  7969. <cleanup-commands>
  7970. <command>-fs NAMENODE -rm -r hdfs:///file*</command>
  7971. </cleanup-commands>
  7972. <comparators>
  7973. <comparator>
  7974. <type>RegexpComparator</type>
  7975. <expected-output>( |\t)*0( |\t)*1( |\t)*0 hdfs:///file1</expected-output>
  7976. </comparator>
  7977. <comparator>
  7978. <type>RegexpComparator</type>
  7979. <expected-output>( |\t)*0( |\t)*1( |\t)*0 hdfs:///file2</expected-output>
  7980. </comparator>
  7981. <comparator>
  7982. <type>RegexpComparator</type>
  7983. <expected-output>( |\t)*0( |\t)*1( |\t)*0 hdfs:///file3</expected-output>
  7984. </comparator>
  7985. <comparator>
  7986. <type>RegexpComparator</type>
  7987. <expected-output>( |\t)*0( |\t)*1( |\t)*0 hdfs:///file4</expected-output>
  7988. </comparator>
  7989. </comparators>
  7990. </test>
  7991. <test> <!-- TESTED -->
  7992. <description>count: Test for hdfs:// path - multiple directories using globbing</description>
  7993. <test-commands>
  7994. <command>-fs NAMENODE -mkdir hdfs:///dir1</command>
  7995. <command>-fs NAMENODE -mkdir hdfs:///dir2</command>
  7996. <command>-fs NAMENODE -mkdir hdfs:///dir3</command>
  7997. <command>-fs NAMENODE -mkdir hdfs:///dir4</command>
  7998. <command>-fs NAMENODE -count hdfs:///dir* </command>
  7999. </test-commands>
  8000. <cleanup-commands>
  8001. <command>-fs NAMENODE -rm -r hdfs:///dir*</command>
  8002. </cleanup-commands>
  8003. <comparators>
  8004. <comparator>
  8005. <type>RegexpComparator</type>
  8006. <expected-output>( |\t)*1( |\t)*0( |\t)*0 hdfs:///dir1</expected-output>
  8007. </comparator>
  8008. <comparator>
  8009. <type>RegexpComparator</type>
  8010. <expected-output>( |\t)*1( |\t)*0( |\t)*0 hdfs:///dir2</expected-output>
  8011. </comparator>
  8012. <comparator>
  8013. <type>RegexpComparator</type>
  8014. <expected-output>( |\t)*1( |\t)*0( |\t)*0 hdfs:///dir3</expected-output>
  8015. </comparator>
  8016. <comparator>
  8017. <type>RegexpComparator</type>
  8018. <expected-output>( |\t)*1( |\t)*0( |\t)*0 hdfs:///dir4</expected-output>
  8019. </comparator>
  8020. </comparators>
  8021. </test>
  8022. <test> <!-- TESTED -->
  8023. <description>count: Test for hdfs:// path - multiple directories without globbing</description>
  8024. <test-commands>
  8025. <command>-fs NAMENODE -mkdir hdfs:///dir1</command>
  8026. <command>-fs NAMENODE -mkdir hdfs:///dir2</command>
  8027. <command>-fs NAMENODE -mkdir hdfs:///dir3</command>
  8028. <command>-fs NAMENODE -mkdir hdfs:///dir4</command>
  8029. <command>-fs NAMENODE -count hdfs:///dir1 hdfs:///dir2 hdfs:///dir3 hdfs:///dir4 </command>
  8030. </test-commands>
  8031. <cleanup-commands>
  8032. <command>-fs NAMENODE -rm -r hdfs:///dir*</command>
  8033. </cleanup-commands>
  8034. <comparators>
  8035. <comparator>
  8036. <type>RegexpComparator</type>
  8037. <expected-output>( |\t)*1( |\t)*0( |\t)*0 hdfs:///dir1</expected-output>
  8038. </comparator>
  8039. <comparator>
  8040. <type>RegexpComparator</type>
  8041. <expected-output>( |\t)*1( |\t)*0( |\t)*0 hdfs:///dir2</expected-output>
  8042. </comparator>
  8043. <comparator>
  8044. <type>RegexpComparator</type>
  8045. <expected-output>( |\t)*1( |\t)*0( |\t)*0 hdfs:///dir3</expected-output>
  8046. </comparator>
  8047. <comparator>
  8048. <type>RegexpComparator</type>
  8049. <expected-output>( |\t)*1( |\t)*0( |\t)*0 hdfs:///dir4</expected-output>
  8050. </comparator>
  8051. </comparators>
  8052. </test>
  8053. <test> <!-- TESTED -->
  8054. <description>count: Test for file using hdfs:// path with -q option</description>
  8055. <test-commands>
  8056. <command>-fs NAMENODE -touchz hdfs:///file1</command>
  8057. <command>-fs NAMENODE -count -q hdfs:///file1</command>
  8058. </test-commands>
  8059. <cleanup-commands>
  8060. <command>-fs NAMENODE -rm hdfs:///file1</command>
  8061. </cleanup-commands>
  8062. <comparators>
  8063. <comparator>
  8064. <type>RegexpComparator</type>
  8065. <expected-output>( |\t)*none( |\t)*inf( |\t)*none( |\t)*inf( |\t)*0( |\t)*1( |\t)*0 hdfs:///file1</expected-output>
  8066. </comparator>
  8067. </comparators>
  8068. </test>
  8069. <test> <!-- TESTED -->
  8070. <description>count: Test for directory using hdfs:// path with -q option</description>
  8071. <test-commands>
  8072. <command>-fs NAMENODE -mkdir hdfs:///dir1</command>
  8073. <dfs-admin-command>-fs NAMENODE -setQuota 10 hdfs:///dir1 </dfs-admin-command>
  8074. <dfs-admin-command>-fs NAMENODE -setSpaceQuota 1m hdfs:///dir1 </dfs-admin-command>
  8075. <command>-fs NAMENODE -count -q hdfs:///dir1</command>
  8076. </test-commands>
  8077. <cleanup-commands>
  8078. <command>-fs NAMENODE -rm -r hdfs:///dir1</command>
  8079. </cleanup-commands>
  8080. <comparators>
  8081. <comparator>
  8082. <type>RegexpComparator</type>
  8083. <expected-output>( |\t)*10( |\t)*9( |\t)*1048576( |\t)*1048576( |\t)*1( |\t)*0( |\t)*0 hdfs:///dir1</expected-output>
  8084. </comparator>
  8085. </comparators>
  8086. </test>
  8087. <test> <!-- TESTED -->
  8088. <description>count: Test for hdfs:// path - file/directory that does not exist with -q option</description>
  8089. <test-commands>
  8090. <command>-fs NAMENODE -count -q hdfs:///file1 </command>
  8091. </test-commands>
  8092. <cleanup-commands>
  8093. </cleanup-commands>
  8094. <comparators>
  8095. <comparator>
  8096. <type>TokenComparator</type>
  8097. <expected-output>count: `hdfs:///file1': No such file or directory</expected-output>
  8098. </comparator>
  8099. </comparators>
  8100. </test>
  8101. <test> <!-- TESTED -->
  8102. <description>count: Test for hdfs:// path - multiple files using globbing with -q option</description>
  8103. <test-commands>
  8104. <command>-fs NAMENODE -touchz hdfs:///file1</command>
  8105. <command>-fs NAMENODE -touchz hdfs:///file2</command>
  8106. <command>-fs NAMENODE -touchz hdfs:///file3</command>
  8107. <command>-fs NAMENODE -touchz hdfs:///file4</command>
  8108. <command>-fs NAMENODE -count -q hdfs:///file*</command>
  8109. </test-commands>
  8110. <cleanup-commands>
  8111. <command>-fs NAMENODE -rm -r hdfs:///file*</command>
  8112. </cleanup-commands>
  8113. <comparators>
  8114. <comparator>
  8115. <type>RegexpComparator</type>
  8116. <expected-output>( |\t)*none( |\t)*inf( |\t)*none( |\t)*inf( |\t)*0( |\t)*1( |\t)*0 hdfs:///file1</expected-output>
  8117. </comparator>
  8118. <comparator>
  8119. <type>RegexpComparator</type>
  8120. <expected-output>( |\t)*none( |\t)*inf( |\t)*none( |\t)*inf( |\t)*0( |\t)*1( |\t)*0 hdfs:///file2</expected-output>
  8121. </comparator>
  8122. <comparator>
  8123. <type>RegexpComparator</type>
  8124. <expected-output>( |\t)*none( |\t)*inf( |\t)*none( |\t)*inf( |\t)*0( |\t)*1( |\t)*0 hdfs:///file3</expected-output>
  8125. </comparator>
  8126. <comparator>
  8127. <type>RegexpComparator</type>
  8128. <expected-output>( |\t)*none( |\t)*inf( |\t)*none( |\t)*inf( |\t)*0( |\t)*1( |\t)*0 hdfs:///file4</expected-output>
  8129. </comparator>
  8130. </comparators>
  8131. </test>
  8132. <test> <!-- TESTED -->
  8133. <description>count: Test for hdfs:// path - multiple files without globbing with -q option</description>
  8134. <test-commands>
  8135. <command>-fs NAMENODE -touchz hdfs:///file1</command>
  8136. <command>-fs NAMENODE -touchz hdfs:///file2</command>
  8137. <command>-fs NAMENODE -touchz hdfs:///file3</command>
  8138. <command>-fs NAMENODE -touchz hdfs:///file4</command>
  8139. <command>-fs NAMENODE -count -q hdfs:///file1 hdfs:///file2 hdfs:///file3 hdfs:///file4</command>
  8140. </test-commands>
  8141. <cleanup-commands>
  8142. <command>-fs NAMENODE -rm -r hdfs:///file*</command>
  8143. </cleanup-commands>
  8144. <comparators>
  8145. <comparator>
  8146. <type>RegexpComparator</type>
  8147. <expected-output>( |\t)*none( |\t)*inf( |\t)*none( |\t)*inf( |\t)*0( |\t)*1( |\t)*0 hdfs:///file1</expected-output>
  8148. </comparator>
  8149. <comparator>
  8150. <type>RegexpComparator</type>
  8151. <expected-output>( |\t)*none( |\t)*inf( |\t)*none( |\t)*inf( |\t)*0( |\t)*1( |\t)*0 hdfs:///file2</expected-output>
  8152. </comparator>
  8153. <comparator>
  8154. <type>RegexpComparator</type>
  8155. <expected-output>( |\t)*none( |\t)*inf( |\t)*none( |\t)*inf( |\t)*0( |\t)*1( |\t)*0 hdfs:///file3</expected-output>
  8156. </comparator>
  8157. <comparator>
  8158. <type>RegexpComparator</type>
  8159. <expected-output>( |\t)*none( |\t)*inf( |\t)*none( |\t)*inf( |\t)*0( |\t)*1( |\t)*0 hdfs:///file4</expected-output>
  8160. </comparator>
  8161. </comparators>
  8162. </test>
  8163. <test> <!-- TESTED -->
  8164. <description>count: Test for hdfs:// path - multiple directories using globbing with -q option</description>
  8165. <test-commands>
  8166. <command>-fs NAMENODE -mkdir hdfs:///dir1</command>
  8167. <command>-fs NAMENODE -mkdir hdfs:///dir2</command>
  8168. <command>-fs NAMENODE -mkdir hdfs:///dir3</command>
  8169. <command>-fs NAMENODE -mkdir hdfs:///dir4</command>
  8170. <dfs-admin-command>-fs NAMENODE -setQuota 10 hdfs:///dir1 </dfs-admin-command>
  8171. <dfs-admin-command>-fs NAMENODE -setSpaceQuota 1m hdfs:///dir1 </dfs-admin-command>
  8172. <dfs-admin-command>-fs NAMENODE -setQuota 10 hdfs:///dir2 </dfs-admin-command>
  8173. <dfs-admin-command>-fs NAMENODE -setSpaceQuota 1m hdfs:///dir2 </dfs-admin-command>
  8174. <dfs-admin-command>-fs NAMENODE -setQuota 10 hdfs:///dir3 </dfs-admin-command>
  8175. <dfs-admin-command>-fs NAMENODE -setSpaceQuota 1m hdfs:///dir3 </dfs-admin-command>
  8176. <dfs-admin-command>-fs NAMENODE -setQuota 10 hdfs:///dir4 </dfs-admin-command>
  8177. <dfs-admin-command>-fs NAMENODE -setSpaceQuota 1m hdfs:///dir4 </dfs-admin-command>
  8178. <command>-fs NAMENODE -count -q hdfs:///dir* </command>
  8179. </test-commands>
  8180. <cleanup-commands>
  8181. <command>-fs NAMENODE -rm -r hdfs:///dir*</command>
  8182. </cleanup-commands>
  8183. <comparators>
  8184. <comparator>
  8185. <type>RegexpComparator</type>
  8186. <expected-output>( |\t)*10( |\t)*9( |\t)*1048576( |\t)*1048576( |\t)*1( |\t)*0( |\t)*0 hdfs:///dir1</expected-output>
  8187. </comparator>
  8188. <comparator>
  8189. <type>RegexpComparator</type>
  8190. <expected-output>( |\t)*10( |\t)*9( |\t)*1048576( |\t)*1048576( |\t)*1( |\t)*0( |\t)*0 hdfs:///dir2</expected-output>
  8191. </comparator>
  8192. <comparator>
  8193. <type>RegexpComparator</type>
  8194. <expected-output>( |\t)*10( |\t)*9( |\t)*1048576( |\t)*1048576( |\t)*1( |\t)*0( |\t)*0 hdfs:///dir3</expected-output>
  8195. </comparator>
  8196. <comparator>
  8197. <type>RegexpComparator</type>
  8198. <expected-output>( |\t)*10( |\t)*9( |\t)*1048576( |\t)*1048576( |\t)*1( |\t)*0( |\t)*0 hdfs:///dir4</expected-output>
  8199. </comparator>
  8200. </comparators>
  8201. </test>
  8202. <test> <!-- TESTED -->
  8203. <description>count: Test for hdfs:// path - multiple directories without globbing with -q option</description>
  8204. <test-commands>
  8205. <command>-fs NAMENODE -mkdir hdfs:///dir1</command>
  8206. <command>-fs NAMENODE -mkdir hdfs:///dir2</command>
  8207. <command>-fs NAMENODE -mkdir hdfs:///dir3</command>
  8208. <command>-fs NAMENODE -mkdir hdfs:///dir4</command>
  8209. <dfs-admin-command>-fs NAMENODE -setQuota 10 hdfs:///dir1 </dfs-admin-command>
  8210. <dfs-admin-command>-fs NAMENODE -setSpaceQuota 1m hdfs:///dir1 </dfs-admin-command>
  8211. <dfs-admin-command>-fs NAMENODE -setQuota 10 hdfs:///dir2 </dfs-admin-command>
  8212. <dfs-admin-command>-fs NAMENODE -setSpaceQuota 1m hdfs:///dir2 </dfs-admin-command>
  8213. <dfs-admin-command>-fs NAMENODE -setQuota 10 hdfs:///dir3 </dfs-admin-command>
  8214. <dfs-admin-command>-fs NAMENODE -setSpaceQuota 1m hdfs:///dir3 </dfs-admin-command>
  8215. <dfs-admin-command>-fs NAMENODE -setQuota 10 hdfs:///dir4 </dfs-admin-command>
  8216. <dfs-admin-command>-fs NAMENODE -setSpaceQuota 1m hdfs:///dir4 </dfs-admin-command>
  8217. <command>-fs NAMENODE -count -q hdfs:///dir1 hdfs:///dir2 hdfs:///dir3 hdfs:///dir4 </command>
  8218. </test-commands>
  8219. <cleanup-commands>
  8220. <command>-fs NAMENODE -rm -r /dir*</command>
  8221. </cleanup-commands>
  8222. <comparators>
  8223. <comparator>
  8224. <type>RegexpComparator</type>
  8225. <expected-output>( |\t)*10( |\t)*9( |\t)*1048576( |\t)*1048576( |\t)*1( |\t)*0( |\t)*0 hdfs:///dir1</expected-output>
  8226. </comparator>
  8227. <comparator>
  8228. <type>RegexpComparator</type>
  8229. <expected-output>( |\t)*10( |\t)*9( |\t)*1048576( |\t)*1048576( |\t)*1( |\t)*0( |\t)*0 hdfs:///dir2</expected-output>
  8230. </comparator>
  8231. <comparator>
  8232. <type>RegexpComparator</type>
  8233. <expected-output>( |\t)*10( |\t)*9( |\t)*1048576( |\t)*1048576( |\t)*1( |\t)*0( |\t)*0 hdfs:///dir3</expected-output>
  8234. </comparator>
  8235. <comparator>
  8236. <type>RegexpComparator</type>
  8237. <expected-output>( |\t)*10( |\t)*9( |\t)*1048576( |\t)*1048576( |\t)*1( |\t)*0( |\t)*0 hdfs:///dir4</expected-output>
  8238. </comparator>
  8239. </comparators>
  8240. </test>
  8241. <test> <!-- TESTED -->
  8242. <description>count: Test for file using Namenode's path</description>
  8243. <test-commands>
  8244. <command>-fs NAMENODE -touchz NAMENODE/file1</command>
  8245. <command>-fs NAMENODE -count NAMENODE/file1</command>
  8246. </test-commands>
  8247. <cleanup-commands>
  8248. <command>-fs NAMENODE -rm NAMENODE/file1</command>
  8249. </cleanup-commands>
  8250. <comparators>
  8251. <comparator>
  8252. <type>RegexpComparator</type>
  8253. <expected-output>( |\t)*0( |\t)*1( |\t)*0 NAMENODE/file1</expected-output>
  8254. </comparator>
  8255. </comparators>
  8256. </test>
  8257. <test> <!-- TESTED -->
  8258. <description>count: Test for directory using Namenode's path</description>
  8259. <test-commands>
  8260. <command>-fs NAMENODE -mkdir NAMENODE/dir1</command>
  8261. <command>-fs NAMENODE -count NAMENODE/dir1</command>
  8262. </test-commands>
  8263. <cleanup-commands>
  8264. <command>-fs NAMENODE -rm -r NAMENODE/dir1</command>
  8265. </cleanup-commands>
  8266. <comparators>
  8267. <comparator>
  8268. <type>RegexpComparator</type>
  8269. <expected-output>( |\t)*1( |\t)*0( |\t)*0 NAMENODE/dir1</expected-output>
  8270. </comparator>
  8271. </comparators>
  8272. </test>
  8273. <test> <!-- TESTED -->
  8274. <description>count: Test for Namenode's path - file/directory that does not exist</description>
  8275. <test-commands>
  8276. <command>-fs NAMENODE -count NAMENODE/file1 </command>
  8277. </test-commands>
  8278. <cleanup-commands>
  8279. </cleanup-commands>
  8280. <comparators>
  8281. <comparator>
  8282. <type>RegexpComparator</type>
  8283. <expected-output>count: `NAMENODE/file1': No such file or directory</expected-output>
  8284. </comparator>
  8285. </comparators>
  8286. </test>
  8287. <test> <!-- TESTED -->
  8288. <description>count: Test for Namenode's path - multiple files using globbing</description>
  8289. <test-commands>
  8290. <command>-fs NAMENODE -touchz NAMENODE/file1</command>
  8291. <command>-fs NAMENODE -touchz NAMENODE/file2</command>
  8292. <command>-fs NAMENODE -touchz NAMENODE/file3</command>
  8293. <command>-fs NAMENODE -touchz NAMENODE/file4</command>
  8294. <command>-fs NAMENODE -count NAMENODE/file*</command>
  8295. </test-commands>
  8296. <cleanup-commands>
  8297. <command>-fs NAMENODE -rm -r NAMENODE/file*</command>
  8298. </cleanup-commands>
  8299. <comparators>
  8300. <comparator>
  8301. <type>RegexpComparator</type>
  8302. <expected-output>( |\t)*0( |\t)*1( |\t)*0 NAMENODE/file1</expected-output>
  8303. </comparator>
  8304. <comparator>
  8305. <type>RegexpComparator</type>
  8306. <expected-output>( |\t)*0( |\t)*1( |\t)*0 NAMENODE/file2</expected-output>
  8307. </comparator>
  8308. <comparator>
  8309. <type>RegexpComparator</type>
  8310. <expected-output>( |\t)*0( |\t)*1( |\t)*0 NAMENODE/file3</expected-output>
  8311. </comparator>
  8312. <comparator>
  8313. <type>RegexpComparator</type>
  8314. <expected-output>( |\t)*0( |\t)*1( |\t)*0 NAMENODE/file4</expected-output>
  8315. </comparator>
  8316. </comparators>
  8317. </test>
  8318. <test> <!-- TESTED -->
  8319. <description>count: Test for Namenode's path - multiple files without globbing</description>
  8320. <test-commands>
  8321. <command>-fs NAMENODE -touchz NAMENODE/file1</command>
  8322. <command>-fs NAMENODE -touchz NAMENODE/file2</command>
  8323. <command>-fs NAMENODE -touchz NAMENODE/file3</command>
  8324. <command>-fs NAMENODE -touchz NAMENODE/file4</command>
  8325. <command>-fs NAMENODE -count NAMENODE/file1 NAMENODE/file2 NAMENODE/file3 NAMENODE/file4</command>
  8326. </test-commands>
  8327. <cleanup-commands>
  8328. <command>-fs NAMENODE -rm -r NAMENODE/file*</command>
  8329. </cleanup-commands>
  8330. <comparators>
  8331. <comparator>
  8332. <type>RegexpComparator</type>
  8333. <expected-output>( |\t)*0( |\t)*1( |\t)*0 NAMENODE/file1</expected-output>
  8334. </comparator>
  8335. <comparator>
  8336. <type>RegexpComparator</type>
  8337. <expected-output>( |\t)*0( |\t)*1( |\t)*0 NAMENODE/file2</expected-output>
  8338. </comparator>
  8339. <comparator>
  8340. <type>RegexpComparator</type>
  8341. <expected-output>( |\t)*0( |\t)*1( |\t)*0 NAMENODE/file3</expected-output>
  8342. </comparator>
  8343. <comparator>
  8344. <type>RegexpComparator</type>
  8345. <expected-output>( |\t)*0( |\t)*1( |\t)*0 NAMENODE/file4</expected-output>
  8346. </comparator>
  8347. </comparators>
  8348. </test>
  8349. <test> <!-- TESTED -->
  8350. <description>count: Test for Namenode's path - multiple directories using globbing</description>
  8351. <test-commands>
  8352. <command>-fs NAMENODE -mkdir NAMENODE/dir1</command>
  8353. <command>-fs NAMENODE -mkdir NAMENODE/dir2</command>
  8354. <command>-fs NAMENODE -mkdir NAMENODE/dir3</command>
  8355. <command>-fs NAMENODE -mkdir NAMENODE/dir4</command>
  8356. <command>-fs NAMENODE -count NAMENODE/dir* </command>
  8357. </test-commands>
  8358. <cleanup-commands>
  8359. <command>-fs NAMENODE -rm -r NAMENODE/dir*</command>
  8360. </cleanup-commands>
  8361. <comparators>
  8362. <comparator>
  8363. <type>RegexpComparator</type>
  8364. <expected-output>( |\t)*1( |\t)*0( |\t)*0 NAMENODE/dir1</expected-output>
  8365. </comparator>
  8366. <comparator>
  8367. <type>RegexpComparator</type>
  8368. <expected-output>( |\t)*1( |\t)*0( |\t)*0 NAMENODE/dir2</expected-output>
  8369. </comparator>
  8370. <comparator>
  8371. <type>RegexpComparator</type>
  8372. <expected-output>( |\t)*1( |\t)*0( |\t)*0 NAMENODE/dir3</expected-output>
  8373. </comparator>
  8374. <comparator>
  8375. <type>RegexpComparator</type>
  8376. <expected-output>( |\t)*1( |\t)*0( |\t)*0 NAMENODE/dir4</expected-output>
  8377. </comparator>
  8378. </comparators>
  8379. </test>
  8380. <test> <!-- TESTED -->
  8381. <description>count: Test for Namenode's path - multiple directories without globbing</description>
  8382. <test-commands>
  8383. <command>-fs NAMENODE -mkdir NAMENODE/dir1</command>
  8384. <command>-fs NAMENODE -mkdir NAMENODE/dir2</command>
  8385. <command>-fs NAMENODE -mkdir NAMENODE/dir3</command>
  8386. <command>-fs NAMENODE -mkdir NAMENODE/dir4</command>
  8387. <command>-fs NAMENODE -count NAMENODE/dir1 NAMENODE/dir2 NAMENODE/dir3 NAMENODE/dir4 </command>
  8388. </test-commands>
  8389. <cleanup-commands>
  8390. <command>-fs NAMENODE -rm -r NAMENODE/dir*</command>
  8391. </cleanup-commands>
  8392. <comparators>
  8393. <comparator>
  8394. <type>RegexpComparator</type>
  8395. <expected-output>( |\t)*1( |\t)*0( |\t)*0 NAMENODE/dir1</expected-output>
  8396. </comparator>
  8397. <comparator>
  8398. <type>RegexpComparator</type>
  8399. <expected-output>( |\t)*1( |\t)*0( |\t)*0 NAMENODE/dir2</expected-output>
  8400. </comparator>
  8401. <comparator>
  8402. <type>RegexpComparator</type>
  8403. <expected-output>( |\t)*1( |\t)*0( |\t)*0 NAMENODE/dir3</expected-output>
  8404. </comparator>
  8405. <comparator>
  8406. <type>RegexpComparator</type>
  8407. <expected-output>( |\t)*1( |\t)*0( |\t)*0 NAMENODE/dir4</expected-output>
  8408. </comparator>
  8409. </comparators>
  8410. </test>
  8411. <test> <!-- TESTED -->
  8412. <description>count: Test for file using Namenode's path with -q option</description>
  8413. <test-commands>
  8414. <command>-fs NAMENODE -touchz NAMENODE/file1</command>
  8415. <command>-fs NAMENODE -count -q NAMENODE/file1</command>
  8416. </test-commands>
  8417. <cleanup-commands>
  8418. <command>-fs NAMENODE -rm NAMENODE/file1</command>
  8419. </cleanup-commands>
  8420. <comparators>
  8421. <comparator>
  8422. <type>RegexpComparator</type>
  8423. <expected-output>( |\t)*none( |\t)*inf( |\t)*none( |\t)*inf( |\t)*0( |\t)*1( |\t)*0 NAMENODE/file1</expected-output>
  8424. </comparator>
  8425. </comparators>
  8426. </test>
  8427. <test> <!-- TESTED -->
  8428. <description>count: Test for directory using Namenode's path with -q option</description>
  8429. <test-commands>
  8430. <command>-fs NAMENODE -mkdir NAMENODE/dir1</command>
  8431. <dfs-admin-command>-fs NAMENODE -setQuota 10 NAMENODE/dir1 </dfs-admin-command>
  8432. <dfs-admin-command>-fs NAMENODE -setSpaceQuota 1m NAMENODE/dir1 </dfs-admin-command>
  8433. <command>-fs NAMENODE -count -q NAMENODE/dir1</command>
  8434. </test-commands>
  8435. <cleanup-commands>
  8436. <command>-fs NAMENODE -rm -r NAMENODE/dir1</command>
  8437. </cleanup-commands>
  8438. <comparators>
  8439. <comparator>
  8440. <type>RegexpComparator</type>
  8441. <expected-output>( |\t)*10( |\t)*9( |\t)*1048576( |\t)*1048576( |\t)*1( |\t)*0( |\t)*0 NAMENODE/dir1</expected-output>
  8442. </comparator>
  8443. </comparators>
  8444. </test>
  8445. <test> <!-- TESTED -->
  8446. <description>count: Test for Namenode's path - file/directory that does not exist with -q option</description>
  8447. <test-commands>
  8448. <command>-fs NAMENODE -count -q NAMENODE/file1 </command>
  8449. </test-commands>
  8450. <cleanup-commands>
  8451. </cleanup-commands>
  8452. <comparators>
  8453. <comparator>
  8454. <type>RegexpComparator</type>
  8455. <expected-output>count: `NAMENODE/file1': No such file or directory</expected-output>
  8456. </comparator>
  8457. </comparators>
  8458. </test>
  8459. <test> <!-- TESTED -->
  8460. <description>count: Test for Namenode's path - multiple files using globbing with -q option</description>
  8461. <test-commands>
  8462. <command>-fs NAMENODE -touchz NAMENODE/file1</command>
  8463. <command>-fs NAMENODE -touchz NAMENODE/file2</command>
  8464. <command>-fs NAMENODE -touchz NAMENODE/file3</command>
  8465. <command>-fs NAMENODE -touchz NAMENODE/file4</command>
  8466. <command>-fs NAMENODE -count -q NAMENODE/file*</command>
  8467. </test-commands>
  8468. <cleanup-commands>
  8469. <command>-fs NAMENODE -rm -r NAMENODE/file*</command>
  8470. </cleanup-commands>
  8471. <comparators>
  8472. <comparator>
  8473. <type>RegexpComparator</type>
  8474. <expected-output>( |\t)*none( |\t)*inf( |\t)*none( |\t)*inf( |\t)*0( |\t)*1( |\t)*0 NAMENODE/file1</expected-output>
  8475. </comparator>
  8476. <comparator>
  8477. <type>RegexpComparator</type>
  8478. <expected-output>( |\t)*none( |\t)*inf( |\t)*none( |\t)*inf( |\t)*0( |\t)*1( |\t)*0 NAMENODE/file2</expected-output>
  8479. </comparator>
  8480. <comparator>
  8481. <type>RegexpComparator</type>
  8482. <expected-output>( |\t)*none( |\t)*inf( |\t)*none( |\t)*inf( |\t)*0( |\t)*1( |\t)*0 NAMENODE/file3</expected-output>
  8483. </comparator>
  8484. <comparator>
  8485. <type>RegexpComparator</type>
  8486. <expected-output>( |\t)*none( |\t)*inf( |\t)*none( |\t)*inf( |\t)*0( |\t)*1( |\t)*0 NAMENODE/file4</expected-output>
  8487. </comparator>
  8488. </comparators>
  8489. </test>
  8490. <test> <!-- TESTED -->
  8491. <description>count: Test for Namenode's path - multiple files without globbing with -q option</description>
  8492. <test-commands>
  8493. <command>-fs NAMENODE -touchz NAMENODE/file1</command>
  8494. <command>-fs NAMENODE -touchz NAMENODE/file2</command>
  8495. <command>-fs NAMENODE -touchz NAMENODE/file3</command>
  8496. <command>-fs NAMENODE -touchz NAMENODE/file4</command>
  8497. <command>-fs NAMENODE -count -q NAMENODE/file1 NAMENODE/file2 NAMENODE/file3 NAMENODE/file4</command>
  8498. </test-commands>
  8499. <cleanup-commands>
  8500. <command>-fs NAMENODE -rm -r NAMENODE/file*</command>
  8501. </cleanup-commands>
  8502. <comparators>
  8503. <comparator>
  8504. <type>RegexpComparator</type>
  8505. <expected-output>( |\t)*none( |\t)*inf( |\t)*none( |\t)*inf( |\t)*0( |\t)*1( |\t)*0 NAMENODE/file1</expected-output>
  8506. </comparator>
  8507. <comparator>
  8508. <type>RegexpComparator</type>
  8509. <expected-output>( |\t)*none( |\t)*inf( |\t)*none( |\t)*inf( |\t)*0( |\t)*1( |\t)*0 NAMENODE/file2</expected-output>
  8510. </comparator>
  8511. <comparator>
  8512. <type>RegexpComparator</type>
  8513. <expected-output>( |\t)*none( |\t)*inf( |\t)*none( |\t)*inf( |\t)*0( |\t)*1( |\t)*0 NAMENODE/file3</expected-output>
  8514. </comparator>
  8515. <comparator>
  8516. <type>RegexpComparator</type>
  8517. <expected-output>( |\t)*none( |\t)*inf( |\t)*none( |\t)*inf( |\t)*0( |\t)*1( |\t)*0 NAMENODE/file4</expected-output>
  8518. </comparator>
  8519. </comparators>
  8520. </test>
  8521. <test> <!-- TESTED -->
  8522. <description>count: Test for Namenode's path - multiple directories using globbing with -q option</description>
  8523. <test-commands>
  8524. <command>-fs NAMENODE -mkdir NAMENODE/dir1</command>
  8525. <command>-fs NAMENODE -mkdir NAMENODE/dir2</command>
  8526. <command>-fs NAMENODE -mkdir NAMENODE/dir3</command>
  8527. <command>-fs NAMENODE -mkdir NAMENODE/dir4</command>
  8528. <dfs-admin-command>-fs NAMENODE -setQuota 10 NAMENODE/dir1 </dfs-admin-command>
  8529. <dfs-admin-command>-fs NAMENODE -setSpaceQuota 1m NAMENODE/dir1 </dfs-admin-command>
  8530. <dfs-admin-command>-fs NAMENODE -setQuota 10 NAMENODE/dir2 </dfs-admin-command>
  8531. <dfs-admin-command>-fs NAMENODE -setSpaceQuota 1m NAMENODE/dir2 </dfs-admin-command>
  8532. <dfs-admin-command>-fs NAMENODE -setQuota 10 NAMENODE/dir3 </dfs-admin-command>
  8533. <dfs-admin-command>-fs NAMENODE -setSpaceQuota 1m NAMENODE/dir3 </dfs-admin-command>
  8534. <dfs-admin-command>-fs NAMENODE -setQuota 10 NAMENODE/dir4 </dfs-admin-command>
  8535. <dfs-admin-command>-fs NAMENODE -setSpaceQuota 1m NAMENODE/dir4 </dfs-admin-command>
  8536. <command>-fs NAMENODE -count -q NAMENODE/dir* </command>
  8537. </test-commands>
  8538. <cleanup-commands>
  8539. <command>-fs NAMENODE -rm -r NAMENODE/dir*</command>
  8540. </cleanup-commands>
  8541. <comparators>
  8542. <comparator>
  8543. <type>RegexpComparator</type>
  8544. <expected-output>( |\t)*10( |\t)*9( |\t)*1048576( |\t)*1048576( |\t)*1( |\t)*0( |\t)*0 NAMENODE/dir1</expected-output>
  8545. </comparator>
  8546. <comparator>
  8547. <type>RegexpComparator</type>
  8548. <expected-output>( |\t)*10( |\t)*9( |\t)*1048576( |\t)*1048576( |\t)*1( |\t)*0( |\t)*0 NAMENODE/dir2</expected-output>
  8549. </comparator>
  8550. <comparator>
  8551. <type>RegexpComparator</type>
  8552. <expected-output>( |\t)*10( |\t)*9( |\t)*1048576( |\t)*1048576( |\t)*1( |\t)*0( |\t)*0 NAMENODE/dir3</expected-output>
  8553. </comparator>
  8554. <comparator>
  8555. <type>RegexpComparator</type>
  8556. <expected-output>( |\t)*10( |\t)*9( |\t)*1048576( |\t)*1048576( |\t)*1( |\t)*0( |\t)*0 NAMENODE/dir4</expected-output>
  8557. </comparator>
  8558. </comparators>
  8559. </test>
  8560. <test> <!-- TESTED -->
  8561. <description>count: Test for Namenode's path - multiple directories without globbing with -q option</description>
  8562. <test-commands>
  8563. <command>-fs NAMENODE -mkdir NAMENODE/dir1</command>
  8564. <command>-fs NAMENODE -mkdir NAMENODE/dir2</command>
  8565. <command>-fs NAMENODE -mkdir NAMENODE/dir3</command>
  8566. <command>-fs NAMENODE -mkdir NAMENODE/dir4</command>
  8567. <dfs-admin-command>-fs NAMENODE -setQuota 10 NAMENODE/dir1 </dfs-admin-command>
  8568. <dfs-admin-command>-fs NAMENODE -setSpaceQuota 1m NAMENODE/dir1 </dfs-admin-command>
  8569. <dfs-admin-command>-fs NAMENODE -setQuota 10 NAMENODE/dir2 </dfs-admin-command>
  8570. <dfs-admin-command>-fs NAMENODE -setSpaceQuota 1m NAMENODE/dir2 </dfs-admin-command>
  8571. <dfs-admin-command>-fs NAMENODE -setQuota 10 NAMENODE/dir3 </dfs-admin-command>
  8572. <dfs-admin-command>-fs NAMENODE -setSpaceQuota 1m NAMENODE/dir3 </dfs-admin-command>
  8573. <dfs-admin-command>-fs NAMENODE -setQuota 10 NAMENODE/dir4 </dfs-admin-command>
  8574. <dfs-admin-command>-fs NAMENODE -setSpaceQuota 1m NAMENODE/dir4 </dfs-admin-command>
  8575. <command>-fs NAMENODE -count -q NAMENODE/dir1 NAMENODE/dir2 NAMENODE/dir3 NAMENODE/dir4 </command>
  8576. </test-commands>
  8577. <cleanup-commands>
  8578. <command>-fs NAMENODE -rm -r NAMENODE/dir*</command>
  8579. </cleanup-commands>
  8580. <comparators>
  8581. <comparator>
  8582. <type>RegexpComparator</type>
  8583. <expected-output>( |\t)*10( |\t)*9( |\t)*1048576( |\t)*1048576( |\t)*1( |\t)*0( |\t)*0 NAMENODE/dir1</expected-output>
  8584. </comparator>
  8585. <comparator>
  8586. <type>RegexpComparator</type>
  8587. <expected-output>( |\t)*10( |\t)*9( |\t)*1048576( |\t)*1048576( |\t)*1( |\t)*0( |\t)*0 NAMENODE/dir2</expected-output>
  8588. </comparator>
  8589. <comparator>
  8590. <type>RegexpComparator</type>
  8591. <expected-output>( |\t)*10( |\t)*9( |\t)*1048576( |\t)*1048576( |\t)*1( |\t)*0( |\t)*0 NAMENODE/dir3</expected-output>
  8592. </comparator>
  8593. <comparator>
  8594. <type>RegexpComparator</type>
  8595. <expected-output>( |\t)*10( |\t)*9( |\t)*1048576( |\t)*1048576( |\t)*1( |\t)*0( |\t)*0 NAMENODE/dir4</expected-output>
  8596. </comparator>
  8597. </comparators>
  8598. </test>
  8599. <test> <!-- TESTED -->
  8600. <description>count: file using -h option</description>
  8601. <test-commands>
  8602. <command>-fs NAMENODE -mkdir -p dir</command> <!-- make sure user home dir exists -->
  8603. <command>-fs NAMENODE -put CLITEST_DATA/data15bytes file1</command>
  8604. <command>-fs NAMENODE -put CLITEST_DATA/data1k file2</command>
  8605. <command>-fs NAMENODE -count -h file1 file2</command>
  8606. </test-commands>
  8607. <cleanup-commands>
  8608. <command>-fs NAMENODE -rm file1 file2</command>
  8609. </cleanup-commands>
  8610. <comparators>
  8611. <comparator>
  8612. <type>RegexpComparator</type>
  8613. <expected-output>( |\t)*0( |\t)*1( |\t)*15 file1</expected-output>
  8614. </comparator>
  8615. </comparators>
  8616. <comparators>
  8617. <comparator>
  8618. <type>RegexpComparator</type>
  8619. <expected-output>( |\t)*0( |\t)*1( |\t)*1\.0 K file2</expected-output>
  8620. </comparator>
  8621. </comparators>
  8622. </test>
  8623. <test> <!-- TESTED -->
  8624. <description>count: directory using -q and -h options</description>
  8625. <test-commands>
  8626. <command>-fs NAMENODE -mkdir /dir1</command>
  8627. <dfs-admin-command>-fs NAMENODE -setQuota 10 /dir1 </dfs-admin-command>
  8628. <dfs-admin-command>-fs NAMENODE -setSpaceQuota 1m /dir1 </dfs-admin-command>
  8629. <command>-fs NAMENODE -count -q -h /dir1</command>
  8630. </test-commands>
  8631. <cleanup-commands>
  8632. <command>-fs NAMENODE -rm -r /dir1</command>
  8633. </cleanup-commands>
  8634. <comparators>
  8635. <comparator>
  8636. <type>RegexpComparator</type>
  8637. <expected-output>( |\t)*10( |\t)*9( |\t)*1 M( |\t)*1 M( |\t)*1( |\t)*0( |\t)*0 /dir1</expected-output>
  8638. </comparator>
  8639. </comparators>
  8640. </test>
  8641. <test> <!-- TESTED -->
  8642. <description>count: file using absolute path showing header record</description>
  8643. <test-commands>
  8644. <command>-fs NAMENODE -touchz /file1</command>
  8645. <command>-fs NAMENODE -count -v /file1</command>
  8646. </test-commands>
  8647. <cleanup-commands>
  8648. <command>-fs NAMENODE -rm /file1</command>
  8649. </cleanup-commands>
  8650. <comparators>
  8651. <comparator>
  8652. <type>RegexpComparator</type>
  8653. <expected-output>( |\t)*DIR_COUNT FILE_COUNT CONTENT_SIZE PATHNAME</expected-output>
  8654. </comparator>
  8655. <comparator>
  8656. <type>RegexpComparator</type>
  8657. <expected-output>( |\t)*0( |\t)*1( |\t)*0 /file1</expected-output>
  8658. </comparator>
  8659. </comparators>
  8660. </test>
  8661. <test> <!-- TESTED -->
  8662. <description>count: file using absolute path with -q option and showing header record</description>
  8663. <test-commands>
  8664. <command>-fs NAMENODE -touchz /file1</command>
  8665. <command>-fs NAMENODE -count -q -v /file1</command>
  8666. </test-commands>
  8667. <cleanup-commands>
  8668. <command>-fs NAMENODE -rm /file1</command>
  8669. </cleanup-commands>
  8670. <comparators>
  8671. <comparator>
  8672. <type>RegexpComparator</type>
  8673. <expected-output>( |\t)*QUOTA REM_QUOTA SPACE_QUOTA REM_SPACE_QUOTA DIR_COUNT FILE_COUNT CONTENT_SIZE PATHNAME</expected-output>
  8674. </comparator>
  8675. <comparator>
  8676. <type>RegexpComparator</type>
  8677. <expected-output>( |\t)*none( |\t)*inf( |\t)*none( |\t)*inf( |\t)*0( |\t)*1( |\t)*0 /file1</expected-output>
  8678. </comparator>
  8679. </comparators>
  8680. </test>
  8681. <!-- Tests for chmod -->
  8682. <test> <!-- TESTED -->
  8683. <description>chmod: change permission(octal mode) of file in absolute path</description>
  8684. <test-commands>
  8685. <command>-fs NAMENODE -touchz /file1</command>
  8686. <command>-fs NAMENODE -chmod 777 /file1</command>
  8687. <command>-fs NAMENODE -ls /file1</command>
  8688. </test-commands>
  8689. <cleanup-commands>
  8690. <command>-fs NAMENODE -rm /file1</command>
  8691. </cleanup-commands>
  8692. <comparators>
  8693. <comparator>
  8694. <type>RegexpComparator</type>
  8695. <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>
  8696. </comparator>
  8697. </comparators>
  8698. </test>
  8699. <test> <!-- TESTED -->
  8700. <description>chmod: change permission(octal mode) of file in relative path</description>
  8701. <test-commands>
  8702. <command>-fs NAMENODE -mkdir -p dir</command> <!-- make sure user home dir exists -->
  8703. <command>-fs NAMENODE -touchz file1</command>
  8704. <command>-fs NAMENODE -chmod 666 file1</command>
  8705. <command>-fs NAMENODE -ls file1</command>
  8706. </test-commands>
  8707. <cleanup-commands>
  8708. <command>-fs NAMENODE -rm file1</command>
  8709. </cleanup-commands>
  8710. <comparators>
  8711. <comparator>
  8712. <type>RegexpComparator</type>
  8713. <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>
  8714. </comparator>
  8715. </comparators>
  8716. </test>
  8717. <test> <!-- TESTED -->
  8718. <description>chmod: change permission(octal mode) of directory in absolute path</description>
  8719. <test-commands>
  8720. <command>-fs NAMENODE -mkdir /dir0</command>
  8721. <command>-fs NAMENODE -mkdir /dir0/dir1</command>
  8722. <command>-fs NAMENODE -touchz /dir0/file0</command>
  8723. <command>-fs NAMENODE -touchz /dir0/dir1/file1</command>
  8724. <command>-fs NAMENODE -touchz /dir0/dir1/file2</command>
  8725. <command>-fs NAMENODE -chmod 777 /dir0/dir1</command>
  8726. <command>-fs NAMENODE -ls -R /dir0</command>
  8727. </test-commands>
  8728. <cleanup-commands>
  8729. <command>-fs NAMENODE -rm -r /dir0</command>
  8730. </cleanup-commands>
  8731. <comparators>
  8732. <comparator>
  8733. <type>RegexpComparator</type>
  8734. <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>
  8735. </comparator>
  8736. <comparator>
  8737. <type>RegexpComparator</type>
  8738. <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>
  8739. </comparator>
  8740. <comparator>
  8741. <type>RegexpComparator</type>
  8742. <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>
  8743. </comparator>
  8744. <comparator>
  8745. <type>RegexpComparator</type>
  8746. <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>
  8747. </comparator>
  8748. </comparators>
  8749. </test>
  8750. <test> <!-- TESTED -->
  8751. <description>chmod: change permission(octal mode) of directory in relative path</description>
  8752. <test-commands>
  8753. <command>-fs NAMENODE -mkdir -p dir0</command>
  8754. <command>-fs NAMENODE -mkdir -p dir0/dir1</command>
  8755. <command>-fs NAMENODE -touchz dir0/file0</command>
  8756. <command>-fs NAMENODE -touchz dir0/dir1/file1</command>
  8757. <command>-fs NAMENODE -touchz dir0/dir1/file2</command>
  8758. <command>-fs NAMENODE -chmod 777 dir0/dir1</command>
  8759. <command>-fs NAMENODE -ls -R dir0</command>
  8760. </test-commands>
  8761. <cleanup-commands>
  8762. <command>-fs NAMENODE -rm -r dir0</command>
  8763. </cleanup-commands>
  8764. <comparators>
  8765. <comparator>
  8766. <type>RegexpComparator</type>
  8767. <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>
  8768. </comparator>
  8769. <comparator>
  8770. <type>RegexpComparator</type>
  8771. <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>
  8772. </comparator>
  8773. <comparator>
  8774. <type>RegexpComparator</type>
  8775. <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>
  8776. </comparator>
  8777. <comparator>
  8778. <type>RegexpComparator</type>
  8779. <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>
  8780. </comparator>
  8781. </comparators>
  8782. </test>
  8783. <test> <!-- TESTED -->
  8784. <description>chmod: change permission(normal mode) of file in absolute path</description>
  8785. <test-commands>
  8786. <command>-fs NAMENODE -touchz /file1</command>
  8787. <command>-fs NAMENODE -chmod a+rw /file1</command>
  8788. <command>-fs NAMENODE -ls /file1</command>
  8789. </test-commands>
  8790. <cleanup-commands>
  8791. <command>-fs NAMENODE -rm /file1</command>
  8792. </cleanup-commands>
  8793. <comparators>
  8794. <comparator>
  8795. <type>RegexpComparator</type>
  8796. <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>
  8797. </comparator>
  8798. </comparators>
  8799. </test>
  8800. <test> <!-- TESTED -->
  8801. <description>chmod: change permission(normal mode) of file in relative path</description>
  8802. <test-commands>
  8803. <command>-fs NAMENODE -touchz file1</command>
  8804. <command>-fs NAMENODE -chmod a+rw file1</command>
  8805. <command>-fs NAMENODE -ls file1</command>
  8806. </test-commands>
  8807. <cleanup-commands>
  8808. <command>-fs NAMENODE -rm file1</command>
  8809. </cleanup-commands>
  8810. <comparators>
  8811. <comparator>
  8812. <type>RegexpComparator</type>
  8813. <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>
  8814. </comparator>
  8815. </comparators>
  8816. </test>
  8817. <test> <!-- TESTED -->
  8818. <description>chmod: change permission(normal mode) of directory in absolute path</description>
  8819. <test-commands>
  8820. <command>-fs NAMENODE -mkdir /dir0</command>
  8821. <command>-fs NAMENODE -mkdir /dir0/dir1</command>
  8822. <command>-fs NAMENODE -touchz /dir0/file0</command>
  8823. <command>-fs NAMENODE -touchz /dir0/dir1/file1</command>
  8824. <command>-fs NAMENODE -touchz /dir0/dir1/file2</command>
  8825. <command>-fs NAMENODE -chmod a+rwx /dir0/dir1</command>
  8826. <command>-fs NAMENODE -ls -R /dir0</command>
  8827. </test-commands>
  8828. <cleanup-commands>
  8829. <command>-fs NAMENODE -rm -r /dir0</command>
  8830. </cleanup-commands>
  8831. <comparators>
  8832. <comparator>
  8833. <type>RegexpComparator</type>
  8834. <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>
  8835. </comparator>
  8836. <comparator>
  8837. <type>RegexpComparator</type>
  8838. <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>
  8839. </comparator>
  8840. <comparator>
  8841. <type>RegexpComparator</type>
  8842. <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>
  8843. </comparator>
  8844. <comparator>
  8845. <type>RegexpComparator</type>
  8846. <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>
  8847. </comparator>
  8848. </comparators>
  8849. </test>
  8850. <test> <!-- TESTED -->
  8851. <description>chmod: change permission(normal mode) of directory in relative path</description>
  8852. <test-commands>
  8853. <command>-fs NAMENODE -mkdir -p dir0</command>
  8854. <command>-fs NAMENODE -mkdir -p dir0/dir1</command>
  8855. <command>-fs NAMENODE -touchz dir0/file0</command>
  8856. <command>-fs NAMENODE -touchz dir0/dir1/file1</command>
  8857. <command>-fs NAMENODE -touchz dir0/dir1/file2</command>
  8858. <command>-fs NAMENODE -chmod a+rwx dir0/dir1</command>
  8859. <command>-fs NAMENODE -ls -R dir0</command>
  8860. </test-commands>
  8861. <cleanup-commands>
  8862. <command>-fs NAMENODE -rm -r dir0</command>
  8863. </cleanup-commands>
  8864. <comparators>
  8865. <comparator>
  8866. <type>RegexpComparator</type>
  8867. <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>
  8868. </comparator>
  8869. <comparator>
  8870. <type>RegexpComparator</type>
  8871. <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>
  8872. </comparator>
  8873. <comparator>
  8874. <type>RegexpComparator</type>
  8875. <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>
  8876. </comparator>
  8877. <comparator>
  8878. <type>RegexpComparator</type>
  8879. <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>
  8880. </comparator>
  8881. </comparators>
  8882. </test>
  8883. <test> <!-- TESTED -->
  8884. <description>chmod: change permission(octal mode) of directory in absolute path recursively </description>
  8885. <test-commands>
  8886. <command>-fs NAMENODE -mkdir /dir0</command>
  8887. <command>-fs NAMENODE -mkdir /dir0/dir1</command>
  8888. <command>-fs NAMENODE -touchz /dir0/file0</command>
  8889. <command>-fs NAMENODE -touchz /dir0/dir1/file1</command>
  8890. <command>-fs NAMENODE -touchz /dir0/dir1/file2</command>
  8891. <command>-fs NAMENODE -chmod -R 777 /dir0/dir1</command>
  8892. <command>-fs NAMENODE -ls -R /dir0</command>
  8893. </test-commands>
  8894. <cleanup-commands>
  8895. <command>-fs NAMENODE -rm -r /dir0</command>
  8896. </cleanup-commands>
  8897. <comparators>
  8898. <comparator>
  8899. <type>RegexpComparator</type>
  8900. <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>
  8901. </comparator>
  8902. <comparator>
  8903. <type>RegexpComparator</type>
  8904. <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>
  8905. </comparator>
  8906. <comparator>
  8907. <type>RegexpComparator</type>
  8908. <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>
  8909. </comparator>
  8910. <comparator>
  8911. <type>RegexpComparator</type>
  8912. <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>
  8913. </comparator>
  8914. </comparators>
  8915. </test>
  8916. <test> <!-- TESTED -->
  8917. <description>chmod: change permission(octal mode) of directory in relative path recursively</description>
  8918. <test-commands>
  8919. <command>-fs NAMENODE -mkdir -p dir0</command>
  8920. <command>-fs NAMENODE -mkdir -p dir0/dir1</command>
  8921. <command>-fs NAMENODE -touchz dir0/file0</command>
  8922. <command>-fs NAMENODE -touchz dir0/dir1/file1</command>
  8923. <command>-fs NAMENODE -touchz dir0/dir1/file2</command>
  8924. <command>-fs NAMENODE -chmod -R 777 dir0/dir1</command>
  8925. <command>-fs NAMENODE -ls -R dir0</command>
  8926. </test-commands>
  8927. <cleanup-commands>
  8928. <command>-fs NAMENODE -rm -r dir0</command>
  8929. </cleanup-commands>
  8930. <comparators>
  8931. <comparator>
  8932. <type>RegexpComparator</type>
  8933. <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>
  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,}( )*dir0/dir1/file1</expected-output>
  8938. </comparator>
  8939. <comparator>
  8940. <type>RegexpComparator</type>
  8941. <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>
  8942. </comparator>
  8943. <comparator>
  8944. <type>RegexpComparator</type>
  8945. <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>
  8946. </comparator>
  8947. </comparators>
  8948. </test>
  8949. <test> <!-- TESTED -->
  8950. <description>chmod: change permission(normal mode) of directory in absolute path recursively</description>
  8951. <test-commands>
  8952. <command>-fs NAMENODE -mkdir /dir0</command>
  8953. <command>-fs NAMENODE -mkdir /dir0/dir1</command>
  8954. <command>-fs NAMENODE -touchz /dir0/file0</command>
  8955. <command>-fs NAMENODE -touchz /dir0/dir1/file1</command>
  8956. <command>-fs NAMENODE -touchz /dir0/dir1/file2</command>
  8957. <command>-fs NAMENODE -chmod -R a+rwx /dir0/dir1</command>
  8958. <command>-fs NAMENODE -ls -R /dir0</command>
  8959. </test-commands>
  8960. <cleanup-commands>
  8961. <command>-fs NAMENODE -rm -r /dir0</command>
  8962. </cleanup-commands>
  8963. <comparators>
  8964. <comparator>
  8965. <type>RegexpComparator</type>
  8966. <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>
  8967. </comparator>
  8968. <comparator>
  8969. <type>RegexpComparator</type>
  8970. <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>
  8971. </comparator>
  8972. <comparator>
  8973. <type>RegexpComparator</type>
  8974. <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>
  8975. </comparator>
  8976. <comparator>
  8977. <type>RegexpComparator</type>
  8978. <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>
  8979. </comparator>
  8980. </comparators>
  8981. </test>
  8982. <test> <!-- TESTED -->
  8983. <description>chmod: change permission(normal mode) of directory in relative path recursively</description>
  8984. <test-commands>
  8985. <command>-fs NAMENODE -mkdir -p dir0</command>
  8986. <command>-fs NAMENODE -mkdir -p dir0/dir1</command>
  8987. <command>-fs NAMENODE -touchz dir0/file0</command>
  8988. <command>-fs NAMENODE -touchz dir0/dir1/file1</command>
  8989. <command>-fs NAMENODE -touchz dir0/dir1/file2</command>
  8990. <command>-fs NAMENODE -chmod -R a+rwx dir0/dir1</command>
  8991. <command>-fs NAMENODE -ls -R dir0</command>
  8992. </test-commands>
  8993. <cleanup-commands>
  8994. <command>-fs NAMENODE -rm -r dir0</command>
  8995. </cleanup-commands>
  8996. <comparators>
  8997. <comparator>
  8998. <type>RegexpComparator</type>
  8999. <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>
  9000. </comparator>
  9001. <comparator>
  9002. <type>RegexpComparator</type>
  9003. <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>
  9004. </comparator>
  9005. <comparator>
  9006. <type>RegexpComparator</type>
  9007. <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>
  9008. </comparator>
  9009. <comparator>
  9010. <type>RegexpComparator</type>
  9011. <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>
  9012. </comparator>
  9013. </comparators>
  9014. </test>
  9015. <test> <!-- TESTED -->
  9016. <description>chmod: change permission(octal mode) of non existent file in absolute path</description>
  9017. <test-commands>
  9018. <command>-fs NAMENODE -chmod 777 /file1</command>
  9019. </test-commands>
  9020. <cleanup-commands>
  9021. <command>-fs NAMENODE -rm /file1</command>
  9022. </cleanup-commands>
  9023. <comparators>
  9024. <comparator>
  9025. <type>RegexpComparator</type>
  9026. <expected-output>^chmod: `/file1': No such file or directory</expected-output>
  9027. </comparator>
  9028. </comparators>
  9029. </test>
  9030. <test> <!-- TESTED -->
  9031. <description>chmod: change permission(octal mode) of non existent file in relative path</description>
  9032. <test-commands>
  9033. <command>-fs NAMENODE -chmod 666 file1</command>
  9034. </test-commands>
  9035. <cleanup-commands>
  9036. <command>-fs NAMENODE -rm file1</command>
  9037. </cleanup-commands>
  9038. <comparators>
  9039. <comparator>
  9040. <type>RegexpComparator</type>
  9041. <expected-output>^chmod: `file1': No such file or directory</expected-output>
  9042. </comparator>
  9043. </comparators>
  9044. </test>
  9045. <test> <!-- TESTED -->
  9046. <description>chmod: change permission(normal mode) of non existent file in absolute path</description>
  9047. <test-commands>
  9048. <command>-fs NAMENODE -chmod a+rw /file1</command>
  9049. </test-commands>
  9050. <cleanup-commands>
  9051. <command>-fs NAMENODE -rm /file1</command>
  9052. </cleanup-commands>
  9053. <comparators>
  9054. <comparator>
  9055. <type>RegexpComparator</type>
  9056. <expected-output>^chmod: `/file1': No such file or directory</expected-output>
  9057. </comparator>
  9058. </comparators>
  9059. </test>
  9060. <test> <!-- TESTED -->
  9061. <description>chmod: change permission(normal mode) of non existent file in relative path</description>
  9062. <test-commands>
  9063. <command>-fs NAMENODE -chmod a+rw file1</command>
  9064. </test-commands>
  9065. <cleanup-commands>
  9066. <command>-fs NAMENODE -rm file1</command>
  9067. </cleanup-commands>
  9068. <comparators>
  9069. <comparator>
  9070. <type>RegexpComparator</type>
  9071. <expected-output>^chmod: `file1': No such file or directory</expected-output>
  9072. </comparator>
  9073. </comparators>
  9074. </test>
  9075. <test> <!-- TESTED -->
  9076. <description>chmod: change permission(octal mode) of multiple files in absolute path using globbing</description>
  9077. <test-commands>
  9078. <command>-fs NAMENODE -touchz /file1</command>
  9079. <command>-fs NAMENODE -touchz /file2</command>
  9080. <command>-fs NAMENODE -touchz /file3</command>
  9081. <command>-fs NAMENODE -touchz /file4</command>
  9082. <command>-fs NAMENODE -chmod 777 /file* </command>
  9083. <command>-fs NAMENODE -ls -R /file*</command>
  9084. </test-commands>
  9085. <cleanup-commands>
  9086. <command>-fs NAMENODE -rm /file*</command>
  9087. </cleanup-commands>
  9088. <comparators>
  9089. <comparator>
  9090. <type>RegexpComparator</type>
  9091. <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>
  9092. </comparator>
  9093. <comparator>
  9094. <type>RegexpComparator</type>
  9095. <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>
  9096. </comparator>
  9097. <comparator>
  9098. <type>RegexpComparator</type>
  9099. <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>
  9100. </comparator>
  9101. <comparator>
  9102. <type>RegexpComparator</type>
  9103. <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>
  9104. </comparator>
  9105. </comparators>
  9106. </test>
  9107. <test> <!-- TESTED -->
  9108. <description>chmod: change permission(octal mode) of multiple files in relative path using globbing</description>
  9109. <test-commands>
  9110. <command>-fs NAMENODE -touchz file1</command>
  9111. <command>-fs NAMENODE -touchz file2</command>
  9112. <command>-fs NAMENODE -touchz file3</command>
  9113. <command>-fs NAMENODE -touchz file4</command>
  9114. <command>-fs NAMENODE -chmod 777 file* </command>
  9115. <command>-fs NAMENODE -ls -R file*</command>
  9116. </test-commands>
  9117. <cleanup-commands>
  9118. <command>-fs NAMENODE -rm file*</command>
  9119. </cleanup-commands>
  9120. <comparators>
  9121. <comparator>
  9122. <type>RegexpComparator</type>
  9123. <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>
  9124. </comparator>
  9125. <comparator>
  9126. <type>RegexpComparator</type>
  9127. <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>
  9128. </comparator>
  9129. <comparator>
  9130. <type>RegexpComparator</type>
  9131. <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>
  9132. </comparator>
  9133. <comparator>
  9134. <type>RegexpComparator</type>
  9135. <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>
  9136. </comparator>
  9137. </comparators>
  9138. </test>
  9139. <test> <!-- TESTED -->
  9140. <description>chmod: change permission(octal mode) of multiple directories in absolute path using globbing</description>
  9141. <test-commands>
  9142. <command>-fs NAMENODE -mkdir /dir0</command>
  9143. <command>-fs NAMENODE -mkdir /dir0/dir1</command>
  9144. <command>-fs NAMENODE -touchz /dir0/file0</command>
  9145. <command>-fs NAMENODE -touchz /dir0/dir1/file1</command>
  9146. <command>-fs NAMENODE -touchz /dir0/dir1/file2</command>
  9147. <command>-fs NAMENODE -mkdir /dir2</command>
  9148. <command>-fs NAMENODE -mkdir /dir2/dir1</command>
  9149. <command>-fs NAMENODE -touchz /dir2/file0</command>
  9150. <command>-fs NAMENODE -touchz /dir2/dir1/file1</command>
  9151. <command>-fs NAMENODE -touchz /dir2/dir1/file2</command>
  9152. <command>-fs NAMENODE -chmod 777 /dir*</command>
  9153. <command>-fs NAMENODE -ls -R /dir*</command>
  9154. </test-commands>
  9155. <cleanup-commands>
  9156. <command>-fs NAMENODE -rm -r /dir*</command>
  9157. </cleanup-commands>
  9158. <comparators>
  9159. <comparator>
  9160. <type>RegexpComparator</type>
  9161. <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>
  9162. </comparator>
  9163. <comparator>
  9164. <type>RegexpComparator</type>
  9165. <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>
  9166. </comparator>
  9167. <comparator>
  9168. <type>RegexpComparator</type>
  9169. <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>
  9170. </comparator>
  9171. <comparator>
  9172. <type>RegexpComparator</type>
  9173. <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>
  9174. </comparator>
  9175. <comparator>
  9176. <type>RegexpComparator</type>
  9177. <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>
  9178. </comparator>
  9179. <comparator>
  9180. <type>RegexpComparator</type>
  9181. <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>
  9182. </comparator>
  9183. <comparator>
  9184. <type>RegexpComparator</type>
  9185. <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>
  9186. </comparator>
  9187. <comparator>
  9188. <type>RegexpComparator</type>
  9189. <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>
  9190. </comparator>
  9191. </comparators>
  9192. </test>
  9193. <test> <!-- TESTED -->
  9194. <description>chmod: change permission(octal mode) of multiple directories in relative path using globbing</description>
  9195. <test-commands>
  9196. <command>-fs NAMENODE -mkdir -p dir0</command>
  9197. <command>-fs NAMENODE -mkdir -p dir0/dir1</command>
  9198. <command>-fs NAMENODE -touchz dir0/file0</command>
  9199. <command>-fs NAMENODE -touchz dir0/dir1/file1</command>
  9200. <command>-fs NAMENODE -touchz dir0/dir1/file2</command>
  9201. <command>-fs NAMENODE -mkdir -p dir2</command>
  9202. <command>-fs NAMENODE -mkdir -p dir2/dir1</command>
  9203. <command>-fs NAMENODE -touchz dir2/file0</command>
  9204. <command>-fs NAMENODE -touchz dir2/dir1/file1</command>
  9205. <command>-fs NAMENODE -touchz dir2/dir1/file2</command>
  9206. <command>-fs NAMENODE -chmod 777 dir*</command>
  9207. <command>-fs NAMENODE -ls -R dir*</command>
  9208. </test-commands>
  9209. <cleanup-commands>
  9210. <command>-fs NAMENODE -rm -r dir*</command>
  9211. </cleanup-commands>
  9212. <comparators>
  9213. <comparator>
  9214. <type>RegexpComparator</type>
  9215. <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>
  9216. </comparator>
  9217. <comparator>
  9218. <type>RegexpComparator</type>
  9219. <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>
  9220. </comparator>
  9221. <comparator>
  9222. <type>RegexpComparator</type>
  9223. <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>
  9224. </comparator>
  9225. <comparator>
  9226. <type>RegexpComparator</type>
  9227. <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>
  9228. </comparator>
  9229. <comparator>
  9230. <type>RegexpComparator</type>
  9231. <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>
  9232. </comparator>
  9233. <comparator>
  9234. <type>RegexpComparator</type>
  9235. <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>
  9236. </comparator>
  9237. <comparator>
  9238. <type>RegexpComparator</type>
  9239. <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>
  9240. </comparator>
  9241. <comparator>
  9242. <type>RegexpComparator</type>
  9243. <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>
  9244. </comparator>
  9245. </comparators>
  9246. </test>
  9247. <test> <!-- TESTED -->
  9248. <description>chmod: change permission(octal mode) of multiple files in absolute path without globbing</description>
  9249. <test-commands>
  9250. <command>-fs NAMENODE -touchz /file1</command>
  9251. <command>-fs NAMENODE -touchz /file2</command>
  9252. <command>-fs NAMENODE -touchz /file3</command>
  9253. <command>-fs NAMENODE -touchz /file4</command>
  9254. <command>-fs NAMENODE -chmod 777 /file1 /file2 /file3 /file4 </command>
  9255. <command>-fs NAMENODE -ls -R /file*</command>
  9256. </test-commands>
  9257. <cleanup-commands>
  9258. <command>-fs NAMENODE -rm /file*</command>
  9259. </cleanup-commands>
  9260. <comparators>
  9261. <comparator>
  9262. <type>RegexpComparator</type>
  9263. <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>
  9264. </comparator>
  9265. <comparator>
  9266. <type>RegexpComparator</type>
  9267. <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>
  9268. </comparator>
  9269. <comparator>
  9270. <type>RegexpComparator</type>
  9271. <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>
  9272. </comparator>
  9273. <comparator>
  9274. <type>RegexpComparator</type>
  9275. <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>
  9276. </comparator>
  9277. </comparators>
  9278. </test>
  9279. <test> <!-- TESTED -->
  9280. <description>chmod: change permission(octal mode) of multiple files in relative path without globbing</description>
  9281. <test-commands>
  9282. <command>-fs NAMENODE -touchz file1</command>
  9283. <command>-fs NAMENODE -touchz file2</command>
  9284. <command>-fs NAMENODE -touchz file3</command>
  9285. <command>-fs NAMENODE -touchz file4</command>
  9286. <command>-fs NAMENODE -chmod 777 file1 file2 file3 file4 </command>
  9287. <command>-fs NAMENODE -ls -R file*</command>
  9288. </test-commands>
  9289. <cleanup-commands>
  9290. <command>-fs NAMENODE -rm file*</command>
  9291. </cleanup-commands>
  9292. <comparators>
  9293. <comparator>
  9294. <type>RegexpComparator</type>
  9295. <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>
  9296. </comparator>
  9297. <comparator>
  9298. <type>RegexpComparator</type>
  9299. <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>
  9300. </comparator>
  9301. <comparator>
  9302. <type>RegexpComparator</type>
  9303. <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>
  9304. </comparator>
  9305. <comparator>
  9306. <type>RegexpComparator</type>
  9307. <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>
  9308. </comparator>
  9309. </comparators>
  9310. </test>
  9311. <test> <!-- TESTED -->
  9312. <description>chmod: change permission(octal mode) of multiple directories in absolute path without globbing</description>
  9313. <test-commands>
  9314. <command>-fs NAMENODE -mkdir /dir0</command>
  9315. <command>-fs NAMENODE -mkdir /dir0/dir1</command>
  9316. <command>-fs NAMENODE -touchz /dir0/file0</command>
  9317. <command>-fs NAMENODE -touchz /dir0/dir1/file1</command>
  9318. <command>-fs NAMENODE -touchz /dir0/dir1/file2</command>
  9319. <command>-fs NAMENODE -mkdir /dir2</command>
  9320. <command>-fs NAMENODE -mkdir /dir2/dir1</command>
  9321. <command>-fs NAMENODE -touchz /dir2/file0</command>
  9322. <command>-fs NAMENODE -touchz /dir2/dir1/file1</command>
  9323. <command>-fs NAMENODE -touchz /dir2/dir1/file2</command>
  9324. <command>-fs NAMENODE -chmod 777 /dir0 /dir2</command>
  9325. <command>-fs NAMENODE -ls -R /dir*</command>
  9326. </test-commands>
  9327. <cleanup-commands>
  9328. <command>-fs NAMENODE -rm -r /dir*</command>
  9329. </cleanup-commands>
  9330. <comparators>
  9331. <comparator>
  9332. <type>RegexpComparator</type>
  9333. <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>
  9334. </comparator>
  9335. <comparator>
  9336. <type>RegexpComparator</type>
  9337. <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>
  9338. </comparator>
  9339. <comparator>
  9340. <type>RegexpComparator</type>
  9341. <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>
  9342. </comparator>
  9343. <comparator>
  9344. <type>RegexpComparator</type>
  9345. <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>
  9346. </comparator>
  9347. <comparator>
  9348. <type>RegexpComparator</type>
  9349. <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>
  9350. </comparator>
  9351. <comparator>
  9352. <type>RegexpComparator</type>
  9353. <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>
  9354. </comparator>
  9355. <comparator>
  9356. <type>RegexpComparator</type>
  9357. <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>
  9358. </comparator>
  9359. <comparator>
  9360. <type>RegexpComparator</type>
  9361. <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>
  9362. </comparator>
  9363. </comparators>
  9364. </test>
  9365. <test> <!-- TESTED -->
  9366. <description>chmod: change permission(octal mode) of multiple directories in relative path without globbing</description>
  9367. <test-commands>
  9368. <command>-fs NAMENODE -mkdir -p dir0</command>
  9369. <command>-fs NAMENODE -mkdir -p dir0/dir1</command>
  9370. <command>-fs NAMENODE -touchz dir0/file0</command>
  9371. <command>-fs NAMENODE -touchz dir0/dir1/file1</command>
  9372. <command>-fs NAMENODE -touchz dir0/dir1/file2</command>
  9373. <command>-fs NAMENODE -mkdir -p dir2</command>
  9374. <command>-fs NAMENODE -mkdir -p dir2/dir1</command>
  9375. <command>-fs NAMENODE -touchz dir2/file0</command>
  9376. <command>-fs NAMENODE -touchz dir2/dir1/file1</command>
  9377. <command>-fs NAMENODE -touchz dir2/dir1/file2</command>
  9378. <command>-fs NAMENODE -chmod 777 dir0 dir2</command>
  9379. <command>-fs NAMENODE -ls -R dir*</command>
  9380. </test-commands>
  9381. <cleanup-commands>
  9382. <command>-fs NAMENODE -rm -r dir*</command>
  9383. </cleanup-commands>
  9384. <comparators>
  9385. <comparator>
  9386. <type>RegexpComparator</type>
  9387. <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>
  9388. </comparator>
  9389. <comparator>
  9390. <type>RegexpComparator</type>
  9391. <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>
  9392. </comparator>
  9393. <comparator>
  9394. <type>RegexpComparator</type>
  9395. <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>
  9396. </comparator>
  9397. <comparator>
  9398. <type>RegexpComparator</type>
  9399. <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>
  9400. </comparator>
  9401. <comparator>
  9402. <type>RegexpComparator</type>
  9403. <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>
  9404. </comparator>
  9405. <comparator>
  9406. <type>RegexpComparator</type>
  9407. <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>
  9408. </comparator>
  9409. <comparator>
  9410. <type>RegexpComparator</type>
  9411. <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>
  9412. </comparator>
  9413. <comparator>
  9414. <type>RegexpComparator</type>
  9415. <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>
  9416. </comparator>
  9417. </comparators>
  9418. </test>
  9419. <test> <!-- TESTED -->
  9420. <description>chmod: change permission(normal mode) of multiple files in absolute path using globbing</description>
  9421. <test-commands>
  9422. <command>-fs NAMENODE -touchz /file1</command>
  9423. <command>-fs NAMENODE -touchz /file2</command>
  9424. <command>-fs NAMENODE -touchz /file3</command>
  9425. <command>-fs NAMENODE -touchz /file4</command>
  9426. <command>-fs NAMENODE -chmod a+rw /file* </command>
  9427. <command>-fs NAMENODE -ls -R /file*</command>
  9428. </test-commands>
  9429. <cleanup-commands>
  9430. <command>-fs NAMENODE -rm /file*</command>
  9431. </cleanup-commands>
  9432. <comparators>
  9433. <comparator>
  9434. <type>RegexpComparator</type>
  9435. <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>
  9436. </comparator>
  9437. <comparator>
  9438. <type>RegexpComparator</type>
  9439. <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>
  9440. </comparator>
  9441. <comparator>
  9442. <type>RegexpComparator</type>
  9443. <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>
  9444. </comparator>
  9445. <comparator>
  9446. <type>RegexpComparator</type>
  9447. <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>
  9448. </comparator>
  9449. </comparators>
  9450. </test>
  9451. <test> <!-- TESTED -->
  9452. <description>chmod: change permission(normal mode) of multiple files in relative path using globbing</description>
  9453. <test-commands>
  9454. <command>-fs NAMENODE -touchz file1</command>
  9455. <command>-fs NAMENODE -touchz file2</command>
  9456. <command>-fs NAMENODE -touchz file3</command>
  9457. <command>-fs NAMENODE -touchz file4</command>
  9458. <command>-fs NAMENODE -chmod a+rw file* </command>
  9459. <command>-fs NAMENODE -ls -R file*</command>
  9460. </test-commands>
  9461. <cleanup-commands>
  9462. <command>-fs NAMENODE -rm file*</command>
  9463. </cleanup-commands>
  9464. <comparators>
  9465. <comparator>
  9466. <type>RegexpComparator</type>
  9467. <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>
  9468. </comparator>
  9469. <comparator>
  9470. <type>RegexpComparator</type>
  9471. <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>
  9472. </comparator>
  9473. <comparator>
  9474. <type>RegexpComparator</type>
  9475. <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>
  9476. </comparator>
  9477. <comparator>
  9478. <type>RegexpComparator</type>
  9479. <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>
  9480. </comparator>
  9481. </comparators>
  9482. </test>
  9483. <test> <!-- TESTED -->
  9484. <description>chmod: change permission(normal mode) of multiple directories in absolute path using globbing</description>
  9485. <test-commands>
  9486. <command>-fs NAMENODE -mkdir /dir0</command>
  9487. <command>-fs NAMENODE -mkdir /dir0/dir1</command>
  9488. <command>-fs NAMENODE -touchz /dir0/file0</command>
  9489. <command>-fs NAMENODE -touchz /dir0/dir1/file1</command>
  9490. <command>-fs NAMENODE -touchz /dir0/dir1/file2</command>
  9491. <command>-fs NAMENODE -mkdir /dir2</command>
  9492. <command>-fs NAMENODE -mkdir /dir2/dir1</command>
  9493. <command>-fs NAMENODE -touchz /dir2/file0</command>
  9494. <command>-fs NAMENODE -touchz /dir2/dir1/file1</command>
  9495. <command>-fs NAMENODE -touchz /dir2/dir1/file2</command>
  9496. <command>-fs NAMENODE -chmod a+rwx /dir*</command>
  9497. <command>-fs NAMENODE -ls -R /dir*</command>
  9498. </test-commands>
  9499. <cleanup-commands>
  9500. <command>-fs NAMENODE -rm -r /dir*</command>
  9501. </cleanup-commands>
  9502. <comparators>
  9503. <comparator>
  9504. <type>RegexpComparator</type>
  9505. <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>
  9506. </comparator>
  9507. <comparator>
  9508. <type>RegexpComparator</type>
  9509. <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>
  9510. </comparator>
  9511. <comparator>
  9512. <type>RegexpComparator</type>
  9513. <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>
  9514. </comparator>
  9515. <comparator>
  9516. <type>RegexpComparator</type>
  9517. <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>
  9518. </comparator>
  9519. <comparator>
  9520. <type>RegexpComparator</type>
  9521. <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>
  9522. </comparator>
  9523. <comparator>
  9524. <type>RegexpComparator</type>
  9525. <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>
  9526. </comparator>
  9527. <comparator>
  9528. <type>RegexpComparator</type>
  9529. <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>
  9530. </comparator>
  9531. <comparator>
  9532. <type>RegexpComparator</type>
  9533. <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>
  9534. </comparator>
  9535. </comparators>
  9536. </test>
  9537. <test> <!-- TESTED -->
  9538. <description>chmod: change permission(normal mode) of multiple directories in relative path using globbing</description>
  9539. <test-commands>
  9540. <command>-fs NAMENODE -mkdir -p dir0</command>
  9541. <command>-fs NAMENODE -mkdir -p dir0/dir1</command>
  9542. <command>-fs NAMENODE -touchz dir0/file0</command>
  9543. <command>-fs NAMENODE -touchz dir0/dir1/file1</command>
  9544. <command>-fs NAMENODE -touchz dir0/dir1/file2</command>
  9545. <command>-fs NAMENODE -mkdir -p dir2</command>
  9546. <command>-fs NAMENODE -mkdir -p dir2/dir1</command>
  9547. <command>-fs NAMENODE -touchz dir2/file0</command>
  9548. <command>-fs NAMENODE -touchz dir2/dir1/file1</command>
  9549. <command>-fs NAMENODE -touchz dir2/dir1/file2</command>
  9550. <command>-fs NAMENODE -chmod a+rwx dir*</command>
  9551. <command>-fs NAMENODE -ls -R dir*</command>
  9552. </test-commands>
  9553. <cleanup-commands>
  9554. <command>-fs NAMENODE -rm -r dir*</command>
  9555. </cleanup-commands>
  9556. <comparators>
  9557. <comparator>
  9558. <type>RegexpComparator</type>
  9559. <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>
  9560. </comparator>
  9561. <comparator>
  9562. <type>RegexpComparator</type>
  9563. <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>
  9564. </comparator>
  9565. <comparator>
  9566. <type>RegexpComparator</type>
  9567. <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>
  9568. </comparator>
  9569. <comparator>
  9570. <type>RegexpComparator</type>
  9571. <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>
  9572. </comparator>
  9573. <comparator>
  9574. <type>RegexpComparator</type>
  9575. <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>
  9576. </comparator>
  9577. <comparator>
  9578. <type>RegexpComparator</type>
  9579. <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>
  9580. </comparator>
  9581. <comparator>
  9582. <type>RegexpComparator</type>
  9583. <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>
  9584. </comparator>
  9585. <comparator>
  9586. <type>RegexpComparator</type>
  9587. <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>
  9588. </comparator>
  9589. </comparators>
  9590. </test>
  9591. <test> <!-- TESTED -->
  9592. <description>chmod: change permission(normal mode) of multiple files in absolute path without globbing</description>
  9593. <test-commands>
  9594. <command>-fs NAMENODE -touchz /file1</command>
  9595. <command>-fs NAMENODE -touchz /file2</command>
  9596. <command>-fs NAMENODE -touchz /file3</command>
  9597. <command>-fs NAMENODE -touchz /file4</command>
  9598. <command>-fs NAMENODE -chmod a+rw /file1 /file2 /file3 /file4 </command>
  9599. <command>-fs NAMENODE -ls -R /file*</command>
  9600. </test-commands>
  9601. <cleanup-commands>
  9602. <command>-fs NAMENODE -rm /file*</command>
  9603. </cleanup-commands>
  9604. <comparators>
  9605. <comparator>
  9606. <type>RegexpComparator</type>
  9607. <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>
  9608. </comparator>
  9609. <comparator>
  9610. <type>RegexpComparator</type>
  9611. <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>
  9612. </comparator>
  9613. <comparator>
  9614. <type>RegexpComparator</type>
  9615. <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>
  9616. </comparator>
  9617. <comparator>
  9618. <type>RegexpComparator</type>
  9619. <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>
  9620. </comparator>
  9621. </comparators>
  9622. </test>
  9623. <test> <!-- TESTED -->
  9624. <description>chmod: change permission(normal mode) of multiple files in relative path without globbing</description>
  9625. <test-commands>
  9626. <command>-fs NAMENODE -touchz file1</command>
  9627. <command>-fs NAMENODE -touchz file2</command>
  9628. <command>-fs NAMENODE -touchz file3</command>
  9629. <command>-fs NAMENODE -touchz file4</command>
  9630. <command>-fs NAMENODE -chmod a+rw file1 file2 file3 file4 </command>
  9631. <command>-fs NAMENODE -ls -R file*</command>
  9632. </test-commands>
  9633. <cleanup-commands>
  9634. <command>-fs NAMENODE -rm file*</command>
  9635. </cleanup-commands>
  9636. <comparators>
  9637. <comparator>
  9638. <type>RegexpComparator</type>
  9639. <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>
  9640. </comparator>
  9641. <comparator>
  9642. <type>RegexpComparator</type>
  9643. <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>
  9644. </comparator>
  9645. <comparator>
  9646. <type>RegexpComparator</type>
  9647. <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>
  9648. </comparator>
  9649. <comparator>
  9650. <type>RegexpComparator</type>
  9651. <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>
  9652. </comparator>
  9653. </comparators>
  9654. </test>
  9655. <test> <!-- TESTED -->
  9656. <description>chmod: change permission(normal mode) of multiple directories in absolute path without globbing</description>
  9657. <test-commands>
  9658. <command>-fs NAMENODE -mkdir /dir0</command>
  9659. <command>-fs NAMENODE -mkdir /dir0/dir1</command>
  9660. <command>-fs NAMENODE -touchz /dir0/file0</command>
  9661. <command>-fs NAMENODE -touchz /dir0/dir1/file1</command>
  9662. <command>-fs NAMENODE -touchz /dir0/dir1/file2</command>
  9663. <command>-fs NAMENODE -mkdir /dir2</command>
  9664. <command>-fs NAMENODE -mkdir /dir2/dir1</command>
  9665. <command>-fs NAMENODE -touchz /dir2/file0</command>
  9666. <command>-fs NAMENODE -touchz /dir2/dir1/file1</command>
  9667. <command>-fs NAMENODE -touchz /dir2/dir1/file2</command>
  9668. <command>-fs NAMENODE -chmod a+rwx /dir0 /dir2</command>
  9669. <command>-fs NAMENODE -ls -R /dir*</command>
  9670. </test-commands>
  9671. <cleanup-commands>
  9672. <command>-fs NAMENODE -rm -r /dir*</command>
  9673. </cleanup-commands>
  9674. <comparators>
  9675. <comparator>
  9676. <type>RegexpComparator</type>
  9677. <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>
  9678. </comparator>
  9679. <comparator>
  9680. <type>RegexpComparator</type>
  9681. <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>
  9682. </comparator>
  9683. <comparator>
  9684. <type>RegexpComparator</type>
  9685. <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>
  9686. </comparator>
  9687. <comparator>
  9688. <type>RegexpComparator</type>
  9689. <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>
  9690. </comparator>
  9691. <comparator>
  9692. <type>RegexpComparator</type>
  9693. <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>
  9694. </comparator>
  9695. <comparator>
  9696. <type>RegexpComparator</type>
  9697. <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>
  9698. </comparator>
  9699. <comparator>
  9700. <type>RegexpComparator</type>
  9701. <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>
  9702. </comparator>
  9703. <comparator>
  9704. <type>RegexpComparator</type>
  9705. <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>
  9706. </comparator>
  9707. </comparators>
  9708. </test>
  9709. <test> <!-- TESTED -->
  9710. <description>chmod: change permission(normal mode) of multiple directories in relative path without globbing</description>
  9711. <test-commands>
  9712. <command>-fs NAMENODE -mkdir -p dir0</command>
  9713. <command>-fs NAMENODE -mkdir -p dir0/dir1</command>
  9714. <command>-fs NAMENODE -touchz dir0/file0</command>
  9715. <command>-fs NAMENODE -touchz dir0/dir1/file1</command>
  9716. <command>-fs NAMENODE -touchz dir0/dir1/file2</command>
  9717. <command>-fs NAMENODE -mkdir -p dir2</command>
  9718. <command>-fs NAMENODE -mkdir -p dir2/dir1</command>
  9719. <command>-fs NAMENODE -touchz dir2/file0</command>
  9720. <command>-fs NAMENODE -touchz dir2/dir1/file1</command>
  9721. <command>-fs NAMENODE -touchz dir2/dir1/file2</command>
  9722. <command>-fs NAMENODE -chmod a+rwx dir0 dir2</command>
  9723. <command>-fs NAMENODE -ls -R dir*</command>
  9724. </test-commands>
  9725. <cleanup-commands>
  9726. <command>-fs NAMENODE -rm -r dir*</command>
  9727. </cleanup-commands>
  9728. <comparators>
  9729. <comparator>
  9730. <type>RegexpComparator</type>
  9731. <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>
  9732. </comparator>
  9733. <comparator>
  9734. <type>RegexpComparator</type>
  9735. <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>
  9736. </comparator>
  9737. <comparator>
  9738. <type>RegexpComparator</type>
  9739. <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>
  9740. </comparator>
  9741. <comparator>
  9742. <type>RegexpComparator</type>
  9743. <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>
  9744. </comparator>
  9745. <comparator>
  9746. <type>RegexpComparator</type>
  9747. <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>
  9748. </comparator>
  9749. <comparator>
  9750. <type>RegexpComparator</type>
  9751. <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>
  9752. </comparator>
  9753. <comparator>
  9754. <type>RegexpComparator</type>
  9755. <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>
  9756. </comparator>
  9757. <comparator>
  9758. <type>RegexpComparator</type>
  9759. <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>
  9760. </comparator>
  9761. </comparators>
  9762. </test>
  9763. <test> <!-- TESTED -->
  9764. <description>chmod: change permission(octal mode) of multiple directories in absolute path recursively using globbing</description>
  9765. <test-commands>
  9766. <command>-fs NAMENODE -mkdir /dir0</command>
  9767. <command>-fs NAMENODE -mkdir /dir0/dir1</command>
  9768. <command>-fs NAMENODE -touchz /dir0/file0</command>
  9769. <command>-fs NAMENODE -touchz /dir0/dir1/file1</command>
  9770. <command>-fs NAMENODE -touchz /dir0/dir1/file2</command>
  9771. <command>-fs NAMENODE -mkdir /dir2</command>
  9772. <command>-fs NAMENODE -mkdir /dir2/dir1</command>
  9773. <command>-fs NAMENODE -touchz /dir2/file0</command>
  9774. <command>-fs NAMENODE -touchz /dir2/dir1/file1</command>
  9775. <command>-fs NAMENODE -touchz /dir2/dir1/file2</command>
  9776. <command>-fs NAMENODE -chmod -R 777 /dir*</command>
  9777. <command>-fs NAMENODE -ls -R /dir*</command>
  9778. </test-commands>
  9779. <cleanup-commands>
  9780. <command>-fs NAMENODE -rm -r /dir*</command>
  9781. </cleanup-commands>
  9782. <comparators>
  9783. <comparator>
  9784. <type>RegexpComparator</type>
  9785. <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>
  9786. </comparator>
  9787. <comparator>
  9788. <type>RegexpComparator</type>
  9789. <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>
  9790. </comparator>
  9791. <comparator>
  9792. <type>RegexpComparator</type>
  9793. <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>
  9794. </comparator>
  9795. <comparator>
  9796. <type>RegexpComparator</type>
  9797. <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>
  9798. </comparator>
  9799. <comparator>
  9800. <type>RegexpComparator</type>
  9801. <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>
  9802. </comparator>
  9803. <comparator>
  9804. <type>RegexpComparator</type>
  9805. <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>
  9806. </comparator>
  9807. <comparator>
  9808. <type>RegexpComparator</type>
  9809. <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>
  9810. </comparator>
  9811. <comparator>
  9812. <type>RegexpComparator</type>
  9813. <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>
  9814. </comparator>
  9815. </comparators>
  9816. </test>
  9817. <test> <!-- TESTED -->
  9818. <description>chmod: change permission(octal mode) of multiple directories in relative path recursively using globbing</description>
  9819. <test-commands>
  9820. <command>-fs NAMENODE -mkdir -p dir0</command>
  9821. <command>-fs NAMENODE -mkdir -p dir0/dir1</command>
  9822. <command>-fs NAMENODE -touchz dir0/file0</command>
  9823. <command>-fs NAMENODE -touchz dir0/dir1/file1</command>
  9824. <command>-fs NAMENODE -touchz dir0/dir1/file2</command>
  9825. <command>-fs NAMENODE -mkdir -p dir2</command>
  9826. <command>-fs NAMENODE -mkdir -p dir2/dir1</command>
  9827. <command>-fs NAMENODE -touchz dir2/file0</command>
  9828. <command>-fs NAMENODE -touchz dir2/dir1/file1</command>
  9829. <command>-fs NAMENODE -touchz dir2/dir1/file2</command>
  9830. <command>-fs NAMENODE -chmod -R 777 dir*</command>
  9831. <command>-fs NAMENODE -ls -R dir*</command>
  9832. </test-commands>
  9833. <cleanup-commands>
  9834. <command>-fs NAMENODE -rm -r dir*</command>
  9835. </cleanup-commands>
  9836. <comparators>
  9837. <comparator>
  9838. <type>RegexpComparator</type>
  9839. <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>
  9840. </comparator>
  9841. <comparator>
  9842. <type>RegexpComparator</type>
  9843. <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>
  9844. </comparator>
  9845. <comparator>
  9846. <type>RegexpComparator</type>
  9847. <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>
  9848. </comparator>
  9849. <comparator>
  9850. <type>RegexpComparator</type>
  9851. <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>
  9852. </comparator>
  9853. <comparator>
  9854. <type>RegexpComparator</type>
  9855. <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>
  9856. </comparator>
  9857. <comparator>
  9858. <type>RegexpComparator</type>
  9859. <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>
  9860. </comparator>
  9861. <comparator>
  9862. <type>RegexpComparator</type>
  9863. <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>
  9864. </comparator>
  9865. <comparator>
  9866. <type>RegexpComparator</type>
  9867. <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>
  9868. </comparator>
  9869. </comparators>
  9870. </test>
  9871. <test> <!-- TESTED -->
  9872. <description>chmod: change permission(octal mode) of multiple directories in absolute path recursively without globbing</description>
  9873. <test-commands>
  9874. <command>-fs NAMENODE -mkdir /dir0</command>
  9875. <command>-fs NAMENODE -mkdir /dir0/dir1</command>
  9876. <command>-fs NAMENODE -touchz /dir0/file0</command>
  9877. <command>-fs NAMENODE -touchz /dir0/dir1/file1</command>
  9878. <command>-fs NAMENODE -touchz /dir0/dir1/file2</command>
  9879. <command>-fs NAMENODE -mkdir /dir2</command>
  9880. <command>-fs NAMENODE -mkdir /dir2/dir1</command>
  9881. <command>-fs NAMENODE -touchz /dir2/file0</command>
  9882. <command>-fs NAMENODE -touchz /dir2/dir1/file1</command>
  9883. <command>-fs NAMENODE -touchz /dir2/dir1/file2</command>
  9884. <command>-fs NAMENODE -chmod -R 777 /dir0 /dir2</command>
  9885. <command>-fs NAMENODE -ls -R /dir*</command>
  9886. </test-commands>
  9887. <cleanup-commands>
  9888. <command>-fs NAMENODE -rm -r /dir*</command>
  9889. </cleanup-commands>
  9890. <comparators>
  9891. <comparator>
  9892. <type>RegexpComparator</type>
  9893. <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>
  9894. </comparator>
  9895. <comparator>
  9896. <type>RegexpComparator</type>
  9897. <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>
  9898. </comparator>
  9899. <comparator>
  9900. <type>RegexpComparator</type>
  9901. <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>
  9902. </comparator>
  9903. <comparator>
  9904. <type>RegexpComparator</type>
  9905. <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>
  9906. </comparator>
  9907. <comparator>
  9908. <type>RegexpComparator</type>
  9909. <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>
  9910. </comparator>
  9911. <comparator>
  9912. <type>RegexpComparator</type>
  9913. <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>
  9914. </comparator>
  9915. <comparator>
  9916. <type>RegexpComparator</type>
  9917. <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>
  9918. </comparator>
  9919. <comparator>
  9920. <type>RegexpComparator</type>
  9921. <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>
  9922. </comparator>
  9923. </comparators>
  9924. </test>
  9925. <test> <!-- TESTED -->
  9926. <description>chmod: change permission(octal mode) of multiple directories in relative path recursively without globbing</description>
  9927. <test-commands>
  9928. <command>-fs NAMENODE -mkdir -p dir0</command>
  9929. <command>-fs NAMENODE -mkdir -p dir0/dir1</command>
  9930. <command>-fs NAMENODE -touchz dir0/file0</command>
  9931. <command>-fs NAMENODE -touchz dir0/dir1/file1</command>
  9932. <command>-fs NAMENODE -touchz dir0/dir1/file2</command>
  9933. <command>-fs NAMENODE -mkdir -p dir2</command>
  9934. <command>-fs NAMENODE -mkdir -p dir2/dir1</command>
  9935. <command>-fs NAMENODE -touchz dir2/file0</command>
  9936. <command>-fs NAMENODE -touchz dir2/dir1/file1</command>
  9937. <command>-fs NAMENODE -touchz dir2/dir1/file2</command>
  9938. <command>-fs NAMENODE -chmod -R 777 dir0 dir2</command>
  9939. <command>-fs NAMENODE -ls -R dir*</command>
  9940. </test-commands>
  9941. <cleanup-commands>
  9942. <command>-fs NAMENODE -rm -r dir*</command>
  9943. </cleanup-commands>
  9944. <comparators>
  9945. <comparator>
  9946. <type>RegexpComparator</type>
  9947. <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>
  9948. </comparator>
  9949. <comparator>
  9950. <type>RegexpComparator</type>
  9951. <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>
  9952. </comparator>
  9953. <comparator>
  9954. <type>RegexpComparator</type>
  9955. <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>
  9956. </comparator>
  9957. <comparator>
  9958. <type>RegexpComparator</type>
  9959. <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>
  9960. </comparator>
  9961. <comparator>
  9962. <type>RegexpComparator</type>
  9963. <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>
  9964. </comparator>
  9965. <comparator>
  9966. <type>RegexpComparator</type>
  9967. <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>
  9968. </comparator>
  9969. <comparator>
  9970. <type>RegexpComparator</type>
  9971. <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>
  9972. </comparator>
  9973. <comparator>
  9974. <type>RegexpComparator</type>
  9975. <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>
  9976. </comparator>
  9977. </comparators>
  9978. </test>
  9979. <test> <!-- TESTED -->
  9980. <description>chmod: change permission(normal mode) of multiple directories in absolute path recursively using globbing</description>
  9981. <test-commands>
  9982. <command>-fs NAMENODE -mkdir /dir0</command>
  9983. <command>-fs NAMENODE -mkdir /dir0/dir1</command>
  9984. <command>-fs NAMENODE -touchz /dir0/file0</command>
  9985. <command>-fs NAMENODE -touchz /dir0/dir1/file1</command>
  9986. <command>-fs NAMENODE -touchz /dir0/dir1/file2</command>
  9987. <command>-fs NAMENODE -mkdir /dir2</command>
  9988. <command>-fs NAMENODE -mkdir /dir2/dir1</command>
  9989. <command>-fs NAMENODE -touchz /dir2/file0</command>
  9990. <command>-fs NAMENODE -touchz /dir2/dir1/file1</command>
  9991. <command>-fs NAMENODE -touchz /dir2/dir1/file2</command>
  9992. <command>-fs NAMENODE -chmod -R a+rwx /dir*</command>
  9993. <command>-fs NAMENODE -ls -R /dir*</command>
  9994. </test-commands>
  9995. <cleanup-commands>
  9996. <command>-fs NAMENODE -rm -r /dir*</command>
  9997. </cleanup-commands>
  9998. <comparators>
  9999. <comparator>
  10000. <type>RegexpComparator</type>
  10001. <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>
  10002. </comparator>
  10003. <comparator>
  10004. <type>RegexpComparator</type>
  10005. <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>
  10006. </comparator>
  10007. <comparator>
  10008. <type>RegexpComparator</type>
  10009. <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>
  10010. </comparator>
  10011. <comparator>
  10012. <type>RegexpComparator</type>
  10013. <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>
  10014. </comparator>
  10015. <comparator>
  10016. <type>RegexpComparator</type>
  10017. <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>
  10018. </comparator>
  10019. <comparator>
  10020. <type>RegexpComparator</type>
  10021. <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>
  10022. </comparator>
  10023. <comparator>
  10024. <type>RegexpComparator</type>
  10025. <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>
  10026. </comparator>
  10027. <comparator>
  10028. <type>RegexpComparator</type>
  10029. <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>
  10030. </comparator>
  10031. </comparators>
  10032. </test>
  10033. <test> <!-- TESTED -->
  10034. <description>chmod: change permission(normal mode) of multiple directories in relative path recursively using globbing</description>
  10035. <test-commands>
  10036. <command>-fs NAMENODE -mkdir -p dir0</command>
  10037. <command>-fs NAMENODE -mkdir -p dir0/dir1</command>
  10038. <command>-fs NAMENODE -touchz dir0/file0</command>
  10039. <command>-fs NAMENODE -touchz dir0/dir1/file1</command>
  10040. <command>-fs NAMENODE -touchz dir0/dir1/file2</command>
  10041. <command>-fs NAMENODE -mkdir -p dir2</command>
  10042. <command>-fs NAMENODE -mkdir -p dir2/dir1</command>
  10043. <command>-fs NAMENODE -touchz dir2/file0</command>
  10044. <command>-fs NAMENODE -touchz dir2/dir1/file1</command>
  10045. <command>-fs NAMENODE -touchz dir2/dir1/file2</command>
  10046. <command>-fs NAMENODE -chmod -R a+rwx dir*</command>
  10047. <command>-fs NAMENODE -ls -R dir*</command>
  10048. </test-commands>
  10049. <cleanup-commands>
  10050. <command>-fs NAMENODE -rm -r dir*</command>
  10051. </cleanup-commands>
  10052. <comparators>
  10053. <comparator>
  10054. <type>RegexpComparator</type>
  10055. <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>
  10056. </comparator>
  10057. <comparator>
  10058. <type>RegexpComparator</type>
  10059. <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>
  10060. </comparator>
  10061. <comparator>
  10062. <type>RegexpComparator</type>
  10063. <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>
  10064. </comparator>
  10065. <comparator>
  10066. <type>RegexpComparator</type>
  10067. <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>
  10068. </comparator>
  10069. <comparator>
  10070. <type>RegexpComparator</type>
  10071. <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>
  10072. </comparator>
  10073. <comparator>
  10074. <type>RegexpComparator</type>
  10075. <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>
  10076. </comparator>
  10077. <comparator>
  10078. <type>RegexpComparator</type>
  10079. <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>
  10080. </comparator>
  10081. <comparator>
  10082. <type>RegexpComparator</type>
  10083. <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>
  10084. </comparator>
  10085. </comparators>
  10086. </test>
  10087. <test> <!-- TESTED -->
  10088. <description>chmod: change permission(normal mode) of multiple directories in absolute path recursively without globbing</description>
  10089. <test-commands>
  10090. <command>-fs NAMENODE -mkdir /dir0</command>
  10091. <command>-fs NAMENODE -mkdir /dir0/dir1</command>
  10092. <command>-fs NAMENODE -touchz /dir0/file0</command>
  10093. <command>-fs NAMENODE -touchz /dir0/dir1/file1</command>
  10094. <command>-fs NAMENODE -touchz /dir0/dir1/file2</command>
  10095. <command>-fs NAMENODE -mkdir /dir2</command>
  10096. <command>-fs NAMENODE -mkdir /dir2/dir1</command>
  10097. <command>-fs NAMENODE -touchz /dir2/file0</command>
  10098. <command>-fs NAMENODE -touchz /dir2/dir1/file1</command>
  10099. <command>-fs NAMENODE -touchz /dir2/dir1/file2</command>
  10100. <command>-fs NAMENODE -chmod -R a+rwx /dir0 /dir2</command>
  10101. <command>-fs NAMENODE -ls -R /dir*</command>
  10102. </test-commands>
  10103. <cleanup-commands>
  10104. <command>-fs NAMENODE -rm -r /dir*</command>
  10105. </cleanup-commands>
  10106. <comparators>
  10107. <comparator>
  10108. <type>RegexpComparator</type>
  10109. <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>
  10110. </comparator>
  10111. <comparator>
  10112. <type>RegexpComparator</type>
  10113. <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>
  10114. </comparator>
  10115. <comparator>
  10116. <type>RegexpComparator</type>
  10117. <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>
  10118. </comparator>
  10119. <comparator>
  10120. <type>RegexpComparator</type>
  10121. <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>
  10122. </comparator>
  10123. <comparator>
  10124. <type>RegexpComparator</type>
  10125. <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>
  10126. </comparator>
  10127. <comparator>
  10128. <type>RegexpComparator</type>
  10129. <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>
  10130. </comparator>
  10131. <comparator>
  10132. <type>RegexpComparator</type>
  10133. <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>
  10134. </comparator>
  10135. <comparator>
  10136. <type>RegexpComparator</type>
  10137. <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>
  10138. </comparator>
  10139. </comparators>
  10140. </test>
  10141. <test> <!-- TESTED -->
  10142. <description>chmod: change permission(normal mode) of multiple directories in relative path recursively without globbing</description>
  10143. <test-commands>
  10144. <command>-fs NAMENODE -mkdir -p dir0</command>
  10145. <command>-fs NAMENODE -mkdir -p dir0/dir1</command>
  10146. <command>-fs NAMENODE -touchz dir0/file0</command>
  10147. <command>-fs NAMENODE -touchz dir0/dir1/file1</command>
  10148. <command>-fs NAMENODE -touchz dir0/dir1/file2</command>
  10149. <command>-fs NAMENODE -mkdir -p dir2</command>
  10150. <command>-fs NAMENODE -mkdir -p dir2/dir1</command>
  10151. <command>-fs NAMENODE -touchz dir2/file0</command>
  10152. <command>-fs NAMENODE -touchz dir2/dir1/file1</command>
  10153. <command>-fs NAMENODE -touchz dir2/dir1/file2</command>
  10154. <command>-fs NAMENODE -chmod -R a+rwx dir0 dir2</command>
  10155. <command>-fs NAMENODE -ls -R dir*</command>
  10156. </test-commands>
  10157. <cleanup-commands>
  10158. <command>-fs NAMENODE -rm -r dir*</command>
  10159. </cleanup-commands>
  10160. <comparators>
  10161. <comparator>
  10162. <type>RegexpComparator</type>
  10163. <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>
  10164. </comparator>
  10165. <comparator>
  10166. <type>RegexpComparator</type>
  10167. <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>
  10168. </comparator>
  10169. <comparator>
  10170. <type>RegexpComparator</type>
  10171. <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>
  10172. </comparator>
  10173. <comparator>
  10174. <type>RegexpComparator</type>
  10175. <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>
  10176. </comparator>
  10177. <comparator>
  10178. <type>RegexpComparator</type>
  10179. <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>
  10180. </comparator>
  10181. <comparator>
  10182. <type>RegexpComparator</type>
  10183. <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>
  10184. </comparator>
  10185. <comparator>
  10186. <type>RegexpComparator</type>
  10187. <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>
  10188. </comparator>
  10189. <comparator>
  10190. <type>RegexpComparator</type>
  10191. <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>
  10192. </comparator>
  10193. </comparators>
  10194. </test>
  10195. <test> <!-- TESTED -->
  10196. <description>chmod: invalid value in octal mode of file in absolute path</description>
  10197. <test-commands>
  10198. <command>-fs NAMENODE -touchz /file1</command>
  10199. <command>-fs NAMENODE -chmod 999 /file1</command>
  10200. </test-commands>
  10201. <cleanup-commands>
  10202. <command>-fs NAMENODE -rm /file1</command>
  10203. </cleanup-commands>
  10204. <comparators>
  10205. <comparator>
  10206. <type>RegexpComparator</type>
  10207. <expected-output>^-chmod: chmod : mode '999' does not match the expected pattern.</expected-output>
  10208. </comparator>
  10209. </comparators>
  10210. </test>
  10211. <test> <!-- TESTED -->
  10212. <description>chmod: invalid value in octal mode of file in relative path</description>
  10213. <test-commands>
  10214. <command>-fs NAMENODE -touchz file1</command>
  10215. <command>-fs NAMENODE -chmod 999 file1</command>
  10216. </test-commands>
  10217. <cleanup-commands>
  10218. <command>-fs NAMENODE -rm file1</command>
  10219. </cleanup-commands>
  10220. <comparators>
  10221. <comparator>
  10222. <type>RegexpComparator</type>
  10223. <expected-output>^-chmod: chmod : mode '999' does not match the expected pattern.</expected-output>
  10224. </comparator>
  10225. </comparators>
  10226. </test>
  10227. <test> <!-- TESTED -->
  10228. <description>chmod: invalid value in normal mode of file in absolute path</description>
  10229. <test-commands>
  10230. <command>-fs NAMENODE -touchz /file1</command>
  10231. <command>-fs NAMENODE -chmod r+def /file1</command>
  10232. </test-commands>
  10233. <cleanup-commands>
  10234. <command>-fs NAMENODE -rm /file1</command>
  10235. </cleanup-commands>
  10236. <comparators>
  10237. <comparator>
  10238. <type>RegexpComparator</type>
  10239. <expected-output>^-chmod: chmod : mode \'r\+def\' does not match the expected pattern.</expected-output>
  10240. </comparator>
  10241. </comparators>
  10242. </test>
  10243. <test> <!-- TESTED -->
  10244. <description>chmod: invalid value in normal mode of file in relative path</description>
  10245. <test-commands>
  10246. <command>-fs NAMENODE -touchz file1</command>
  10247. <command>-fs NAMENODE -chmod r+def file1</command>
  10248. </test-commands>
  10249. <cleanup-commands>
  10250. <command>-fs NAMENODE -rm file1</command>
  10251. </cleanup-commands>
  10252. <comparators>
  10253. <comparator>
  10254. <type>RegexpComparator</type>
  10255. <expected-output>^-chmod: chmod : mode \'r\+def\' does not match the expected pattern.</expected-output>
  10256. </comparator>
  10257. </comparators>
  10258. </test>
  10259. <test> <!-- TESTED -->
  10260. <description>chmod: change permission(octal mode) of file in hdfs:// path</description>
  10261. <test-commands>
  10262. <command>-fs NAMENODE -touchz hdfs:///file1</command>
  10263. <command>-fs NAMENODE -chmod 777 hdfs:///file1</command>
  10264. <command>-fs NAMENODE -ls hdfs:///file1</command>
  10265. </test-commands>
  10266. <cleanup-commands>
  10267. <command>-fs NAMENODE -rm hdfs:///file1</command>
  10268. </cleanup-commands>
  10269. <comparators>
  10270. <comparator>
  10271. <type>RegexpComparator</type>
  10272. <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>
  10273. </comparator>
  10274. </comparators>
  10275. </test>
  10276. <test> <!-- TESTED -->
  10277. <description>chmod: change permission(octal mode) of directory in hdfs:// path</description>
  10278. <test-commands>
  10279. <command>-fs NAMENODE -mkdir hdfs:///dir0</command>
  10280. <command>-fs NAMENODE -mkdir hdfs:///dir0/dir1</command>
  10281. <command>-fs NAMENODE -touchz hdfs:///dir0/file0</command>
  10282. <command>-fs NAMENODE -touchz hdfs:///dir0/dir1/file1</command>
  10283. <command>-fs NAMENODE -touchz hdfs:///dir0/dir1/file2</command>
  10284. <command>-fs NAMENODE -chmod 777 hdfs:///dir0/dir1</command>
  10285. <command>-fs NAMENODE -ls -R hdfs:///dir0</command>
  10286. </test-commands>
  10287. <cleanup-commands>
  10288. <command>-fs NAMENODE -rm -r hdfs:///dir0</command>
  10289. </cleanup-commands>
  10290. <comparators>
  10291. <comparator>
  10292. <type>RegexpComparator</type>
  10293. <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>
  10294. </comparator>
  10295. <comparator>
  10296. <type>RegexpComparator</type>
  10297. <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>
  10298. </comparator>
  10299. <comparator>
  10300. <type>RegexpComparator</type>
  10301. <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>
  10302. </comparator>
  10303. <comparator>
  10304. <type>RegexpComparator</type>
  10305. <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>
  10306. </comparator>
  10307. </comparators>
  10308. </test>
  10309. <test> <!-- TESTED -->
  10310. <description>chmod: change permission(normal mode) of file in hdfs:// path</description>
  10311. <test-commands>
  10312. <command>-fs NAMENODE -touchz hdfs:///file1</command>
  10313. <command>-fs NAMENODE -chmod a+rw hdfs:///file1</command>
  10314. <command>-fs NAMENODE -ls hdfs:///file1</command>
  10315. </test-commands>
  10316. <cleanup-commands>
  10317. <command>-fs NAMENODE -rm hdfs:///file1</command>
  10318. </cleanup-commands>
  10319. <comparators>
  10320. <comparator>
  10321. <type>RegexpComparator</type>
  10322. <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>
  10323. </comparator>
  10324. </comparators>
  10325. </test>
  10326. <test> <!-- TESTED -->
  10327. <description>chmod: change permission(normal mode) of directory in hdfs:// path</description>
  10328. <test-commands>
  10329. <command>-fs NAMENODE -mkdir hdfs:///dir0</command>
  10330. <command>-fs NAMENODE -mkdir hdfs:///dir0/dir1</command>
  10331. <command>-fs NAMENODE -touchz hdfs:///dir0/file0</command>
  10332. <command>-fs NAMENODE -touchz hdfs:///dir0/dir1/file1</command>
  10333. <command>-fs NAMENODE -touchz hdfs:///dir0/dir1/file2</command>
  10334. <command>-fs NAMENODE -chmod a+rwx hdfs:///dir0/dir1</command>
  10335. <command>-fs NAMENODE -ls -R hdfs:///dir0</command>
  10336. </test-commands>
  10337. <cleanup-commands>
  10338. <command>-fs NAMENODE -rm -r hdfs:///dir0</command>
  10339. </cleanup-commands>
  10340. <comparators>
  10341. <comparator>
  10342. <type>RegexpComparator</type>
  10343. <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>
  10344. </comparator>
  10345. <comparator>
  10346. <type>RegexpComparator</type>
  10347. <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>
  10348. </comparator>
  10349. <comparator>
  10350. <type>RegexpComparator</type>
  10351. <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>
  10352. </comparator>
  10353. <comparator>
  10354. <type>RegexpComparator</type>
  10355. <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>
  10356. </comparator>
  10357. </comparators>
  10358. </test>
  10359. <test> <!-- TESTED -->
  10360. <description>chmod: change permission(octal mode) of directory in hdfs:// path recursively </description>
  10361. <test-commands>
  10362. <command>-fs NAMENODE -mkdir hdfs:///dir0</command>
  10363. <command>-fs NAMENODE -mkdir hdfs:///dir0/dir1</command>
  10364. <command>-fs NAMENODE -touchz hdfs:///dir0/file0</command>
  10365. <command>-fs NAMENODE -touchz hdfs:///dir0/dir1/file1</command>
  10366. <command>-fs NAMENODE -touchz hdfs:///dir0/dir1/file2</command>
  10367. <command>-fs NAMENODE -chmod -R 777 hdfs:///dir0/dir1</command>
  10368. <command>-fs NAMENODE -ls -R hdfs:///dir0</command>
  10369. </test-commands>
  10370. <cleanup-commands>
  10371. <command>-fs NAMENODE -rm -r hdfs:///dir0</command>
  10372. </cleanup-commands>
  10373. <comparators>
  10374. <comparator>
  10375. <type>RegexpComparator</type>
  10376. <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>
  10377. </comparator>
  10378. <comparator>
  10379. <type>RegexpComparator</type>
  10380. <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>
  10381. </comparator>
  10382. <comparator>
  10383. <type>RegexpComparator</type>
  10384. <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>
  10385. </comparator>
  10386. <comparator>
  10387. <type>RegexpComparator</type>
  10388. <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>
  10389. </comparator>
  10390. </comparators>
  10391. </test>
  10392. <test> <!-- TESTED -->
  10393. <description>chmod: change permission(normal mode) of directory in hdfs:// path recursively</description>
  10394. <test-commands>
  10395. <command>-fs NAMENODE -mkdir hdfs:///dir0</command>
  10396. <command>-fs NAMENODE -mkdir hdfs:///dir0/dir1</command>
  10397. <command>-fs NAMENODE -touchz hdfs:///dir0/file0</command>
  10398. <command>-fs NAMENODE -touchz hdfs:///dir0/dir1/file1</command>
  10399. <command>-fs NAMENODE -touchz hdfs:///dir0/dir1/file2</command>
  10400. <command>-fs NAMENODE -chmod -R a+rwx hdfs:///dir0/dir1</command>
  10401. <command>-fs NAMENODE -ls -R hdfs:///dir0</command>
  10402. </test-commands>
  10403. <cleanup-commands>
  10404. <command>-fs NAMENODE -rm -r hdfs:///dir0</command>
  10405. </cleanup-commands>
  10406. <comparators>
  10407. <comparator>
  10408. <type>RegexpComparator</type>
  10409. <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>
  10410. </comparator>
  10411. <comparator>
  10412. <type>RegexpComparator</type>
  10413. <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>
  10414. </comparator>
  10415. <comparator>
  10416. <type>RegexpComparator</type>
  10417. <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>
  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:///dir0/file0</expected-output>
  10422. </comparator>
  10423. </comparators>
  10424. </test>
  10425. <test> <!-- TESTED -->
  10426. <description>chmod: change permission(octal mode) of non existent file in hdfs:// path</description>
  10427. <test-commands>
  10428. <command>-fs NAMENODE -chmod 777 hdfs:///file1</command>
  10429. </test-commands>
  10430. <cleanup-commands>
  10431. <command>-fs NAMENODE -rm hdfs:///file1</command>
  10432. </cleanup-commands>
  10433. <comparators>
  10434. <comparator>
  10435. <type>RegexpComparator</type>
  10436. <expected-output>^chmod: `hdfs:///file1': No such file or directory</expected-output>
  10437. </comparator>
  10438. </comparators>
  10439. </test>
  10440. <test> <!-- TESTED -->
  10441. <description>chmod: change permission(normal mode) of non existent file in hdfs:// path</description>
  10442. <test-commands>
  10443. <command>-fs NAMENODE -chmod a+rw hdfs:///file1</command>
  10444. </test-commands>
  10445. <cleanup-commands>
  10446. <command>-fs NAMENODE -rm hdfs:///file1</command>
  10447. </cleanup-commands>
  10448. <comparators>
  10449. <comparator>
  10450. <type>RegexpComparator</type>
  10451. <expected-output>^chmod: `hdfs:///file1': No such file or directory</expected-output>
  10452. </comparator>
  10453. </comparators>
  10454. </test>
  10455. <test> <!-- TESTED -->
  10456. <description>chmod: change permission(octal mode) of multiple files in hdfs:// path using globbing</description>
  10457. <test-commands>
  10458. <command>-fs NAMENODE -touchz hdfs:///file1</command>
  10459. <command>-fs NAMENODE -touchz hdfs:///file2</command>
  10460. <command>-fs NAMENODE -touchz hdfs:///file3</command>
  10461. <command>-fs NAMENODE -touchz hdfs:///file4</command>
  10462. <command>-fs NAMENODE -chmod 777 hdfs:///file* </command>
  10463. <command>-fs NAMENODE -ls -R hdfs:///file*</command>
  10464. </test-commands>
  10465. <cleanup-commands>
  10466. <command>-fs NAMENODE -rm hdfs:///file*</command>
  10467. </cleanup-commands>
  10468. <comparators>
  10469. <comparator>
  10470. <type>RegexpComparator</type>
  10471. <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>
  10472. </comparator>
  10473. <comparator>
  10474. <type>RegexpComparator</type>
  10475. <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>
  10476. </comparator>
  10477. <comparator>
  10478. <type>RegexpComparator</type>
  10479. <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>
  10480. </comparator>
  10481. <comparator>
  10482. <type>RegexpComparator</type>
  10483. <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>
  10484. </comparator>
  10485. </comparators>
  10486. </test>
  10487. <test> <!-- TESTED -->
  10488. <description>chmod: change permission(octal mode) of multiple directories in hdfs:// path using globbing</description>
  10489. <test-commands>
  10490. <command>-fs NAMENODE -mkdir hdfs:///dir0</command>
  10491. <command>-fs NAMENODE -mkdir hdfs:///dir0/dir1</command>
  10492. <command>-fs NAMENODE -touchz hdfs:///dir0/file0</command>
  10493. <command>-fs NAMENODE -touchz hdfs:///dir0/dir1/file1</command>
  10494. <command>-fs NAMENODE -touchz hdfs:///dir0/dir1/file2</command>
  10495. <command>-fs NAMENODE -mkdir hdfs:///dir2</command>
  10496. <command>-fs NAMENODE -mkdir hdfs:///dir2/dir1</command>
  10497. <command>-fs NAMENODE -touchz hdfs:///dir2/file0</command>
  10498. <command>-fs NAMENODE -touchz hdfs:///dir2/dir1/file1</command>
  10499. <command>-fs NAMENODE -touchz hdfs:///dir2/dir1/file2</command>
  10500. <command>-fs NAMENODE -chmod 777 hdfs:///dir*</command>
  10501. <command>-fs NAMENODE -ls -R hdfs:///dir*</command>
  10502. </test-commands>
  10503. <cleanup-commands>
  10504. <command>-fs NAMENODE -rm -r hdfs:///dir*</command>
  10505. </cleanup-commands>
  10506. <comparators>
  10507. <comparator>
  10508. <type>RegexpComparator</type>
  10509. <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>
  10510. </comparator>
  10511. <comparator>
  10512. <type>RegexpComparator</type>
  10513. <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>
  10514. </comparator>
  10515. <comparator>
  10516. <type>RegexpComparator</type>
  10517. <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>
  10518. </comparator>
  10519. <comparator>
  10520. <type>RegexpComparator</type>
  10521. <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>
  10522. </comparator>
  10523. <comparator>
  10524. <type>RegexpComparator</type>
  10525. <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>
  10526. </comparator>
  10527. <comparator>
  10528. <type>RegexpComparator</type>
  10529. <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>
  10530. </comparator>
  10531. <comparator>
  10532. <type>RegexpComparator</type>
  10533. <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>
  10534. </comparator>
  10535. <comparator>
  10536. <type>RegexpComparator</type>
  10537. <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>
  10538. </comparator>
  10539. </comparators>
  10540. </test>
  10541. <test> <!-- TESTED -->
  10542. <description>chmod: change permission(octal mode) of multiple files in hdfs:// path without globbing</description>
  10543. <test-commands>
  10544. <command>-fs NAMENODE -touchz hdfs:///file1</command>
  10545. <command>-fs NAMENODE -touchz hdfs:///file2</command>
  10546. <command>-fs NAMENODE -touchz hdfs:///file3</command>
  10547. <command>-fs NAMENODE -touchz hdfs:///file4</command>
  10548. <command>-fs NAMENODE -chmod 777 hdfs:///file1 hdfs:///file2 hdfs:///file3 hdfs:///file4 </command>
  10549. <command>-fs NAMENODE -ls -R hdfs:///file*</command>
  10550. </test-commands>
  10551. <cleanup-commands>
  10552. <command>-fs NAMENODE -rm hdfs:///file*</command>
  10553. </cleanup-commands>
  10554. <comparators>
  10555. <comparator>
  10556. <type>RegexpComparator</type>
  10557. <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>
  10558. </comparator>
  10559. <comparator>
  10560. <type>RegexpComparator</type>
  10561. <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>
  10562. </comparator>
  10563. <comparator>
  10564. <type>RegexpComparator</type>
  10565. <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>
  10566. </comparator>
  10567. <comparator>
  10568. <type>RegexpComparator</type>
  10569. <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>
  10570. </comparator>
  10571. </comparators>
  10572. </test>
  10573. <test> <!-- TESTED -->
  10574. <description>chmod: change permission(octal mode) of multiple directories in hdfs:// path without globbing</description>
  10575. <test-commands>
  10576. <command>-fs NAMENODE -mkdir hdfs:///dir0</command>
  10577. <command>-fs NAMENODE -mkdir hdfs:///dir0/dir1</command>
  10578. <command>-fs NAMENODE -touchz hdfs:///dir0/file0</command>
  10579. <command>-fs NAMENODE -touchz hdfs:///dir0/dir1/file1</command>
  10580. <command>-fs NAMENODE -touchz hdfs:///dir0/dir1/file2</command>
  10581. <command>-fs NAMENODE -mkdir hdfs:///dir2</command>
  10582. <command>-fs NAMENODE -mkdir hdfs:///dir2/dir1</command>
  10583. <command>-fs NAMENODE -touchz hdfs:///dir2/file0</command>
  10584. <command>-fs NAMENODE -touchz hdfs:///dir2/dir1/file1</command>
  10585. <command>-fs NAMENODE -touchz hdfs:///dir2/dir1/file2</command>
  10586. <command>-fs NAMENODE -chmod 777 hdfs:///dir0 hdfs:///dir2</command>
  10587. <command>-fs NAMENODE -ls -R hdfs:///dir*</command>
  10588. </test-commands>
  10589. <cleanup-commands>
  10590. <command>-fs NAMENODE -rm -r hdfs:///dir*</command>
  10591. </cleanup-commands>
  10592. <comparators>
  10593. <comparator>
  10594. <type>RegexpComparator</type>
  10595. <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>
  10596. </comparator>
  10597. <comparator>
  10598. <type>RegexpComparator</type>
  10599. <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>
  10600. </comparator>
  10601. <comparator>
  10602. <type>RegexpComparator</type>
  10603. <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>
  10604. </comparator>
  10605. <comparator>
  10606. <type>RegexpComparator</type>
  10607. <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>
  10608. </comparator>
  10609. <comparator>
  10610. <type>RegexpComparator</type>
  10611. <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>
  10612. </comparator>
  10613. <comparator>
  10614. <type>RegexpComparator</type>
  10615. <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>
  10616. </comparator>
  10617. <comparator>
  10618. <type>RegexpComparator</type>
  10619. <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>
  10620. </comparator>
  10621. <comparator>
  10622. <type>RegexpComparator</type>
  10623. <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>
  10624. </comparator>
  10625. </comparators>
  10626. </test>
  10627. <test> <!-- TESTED -->
  10628. <description>chmod: change permission(normal mode) of multiple files in hdfs:// path using globbing</description>
  10629. <test-commands>
  10630. <command>-fs NAMENODE -touchz hdfs:///file1</command>
  10631. <command>-fs NAMENODE -touchz hdfs:///file2</command>
  10632. <command>-fs NAMENODE -touchz hdfs:///file3</command>
  10633. <command>-fs NAMENODE -touchz hdfs:///file4</command>
  10634. <command>-fs NAMENODE -chmod a+rw hdfs:///file* </command>
  10635. <command>-fs NAMENODE -ls -R hdfs:///file*</command>
  10636. </test-commands>
  10637. <cleanup-commands>
  10638. <command>-fs NAMENODE -rm hdfs:///file*</command>
  10639. </cleanup-commands>
  10640. <comparators>
  10641. <comparator>
  10642. <type>RegexpComparator</type>
  10643. <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>
  10644. </comparator>
  10645. <comparator>
  10646. <type>RegexpComparator</type>
  10647. <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>
  10648. </comparator>
  10649. <comparator>
  10650. <type>RegexpComparator</type>
  10651. <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>
  10652. </comparator>
  10653. <comparator>
  10654. <type>RegexpComparator</type>
  10655. <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>
  10656. </comparator>
  10657. </comparators>
  10658. </test>
  10659. <test> <!-- TESTED -->
  10660. <description>chmod: change permission(normal mode) of multiple directories in hdfs:// path using globbing</description>
  10661. <test-commands>
  10662. <command>-fs NAMENODE -mkdir hdfs:///dir0</command>
  10663. <command>-fs NAMENODE -mkdir hdfs:///dir0/dir1</command>
  10664. <command>-fs NAMENODE -touchz hdfs:///dir0/file0</command>
  10665. <command>-fs NAMENODE -touchz hdfs:///dir0/dir1/file1</command>
  10666. <command>-fs NAMENODE -touchz hdfs:///dir0/dir1/file2</command>
  10667. <command>-fs NAMENODE -mkdir hdfs:///dir2</command>
  10668. <command>-fs NAMENODE -mkdir hdfs:///dir2/dir1</command>
  10669. <command>-fs NAMENODE -touchz hdfs:///dir2/file0</command>
  10670. <command>-fs NAMENODE -touchz hdfs:///dir2/dir1/file1</command>
  10671. <command>-fs NAMENODE -touchz hdfs:///dir2/dir1/file2</command>
  10672. <command>-fs NAMENODE -chmod a+rwx hdfs:///dir*</command>
  10673. <command>-fs NAMENODE -ls -R hdfs:///dir*</command>
  10674. </test-commands>
  10675. <cleanup-commands>
  10676. <command>-fs NAMENODE -rm -r hdfs:///dir*</command>
  10677. </cleanup-commands>
  10678. <comparators>
  10679. <comparator>
  10680. <type>RegexpComparator</type>
  10681. <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>
  10682. </comparator>
  10683. <comparator>
  10684. <type>RegexpComparator</type>
  10685. <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>
  10686. </comparator>
  10687. <comparator>
  10688. <type>RegexpComparator</type>
  10689. <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>
  10690. </comparator>
  10691. <comparator>
  10692. <type>RegexpComparator</type>
  10693. <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>
  10694. </comparator>
  10695. <comparator>
  10696. <type>RegexpComparator</type>
  10697. <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>
  10698. </comparator>
  10699. <comparator>
  10700. <type>RegexpComparator</type>
  10701. <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>
  10702. </comparator>
  10703. <comparator>
  10704. <type>RegexpComparator</type>
  10705. <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>
  10706. </comparator>
  10707. <comparator>
  10708. <type>RegexpComparator</type>
  10709. <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>
  10710. </comparator>
  10711. </comparators>
  10712. </test>
  10713. <test> <!-- TESTED -->
  10714. <description>chmod: change permission(normal mode) of multiple files in hdfs:// path without globbing</description>
  10715. <test-commands>
  10716. <command>-fs NAMENODE -touchz hdfs:///file1</command>
  10717. <command>-fs NAMENODE -touchz hdfs:///file2</command>
  10718. <command>-fs NAMENODE -touchz hdfs:///file3</command>
  10719. <command>-fs NAMENODE -touchz hdfs:///file4</command>
  10720. <command>-fs NAMENODE -chmod a+rw hdfs:///file1 hdfs:///file2 hdfs:///file3 hdfs:///file4 </command>
  10721. <command>-fs NAMENODE -ls -R hdfs:///file*</command>
  10722. </test-commands>
  10723. <cleanup-commands>
  10724. <command>-fs NAMENODE -rm hdfs:///file*</command>
  10725. </cleanup-commands>
  10726. <comparators>
  10727. <comparator>
  10728. <type>RegexpComparator</type>
  10729. <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>
  10730. </comparator>
  10731. <comparator>
  10732. <type>RegexpComparator</type>
  10733. <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>
  10734. </comparator>
  10735. <comparator>
  10736. <type>RegexpComparator</type>
  10737. <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>
  10738. </comparator>
  10739. <comparator>
  10740. <type>RegexpComparator</type>
  10741. <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>
  10742. </comparator>
  10743. </comparators>
  10744. </test>
  10745. <test> <!-- TESTED -->
  10746. <description>chmod: change permission(normal mode) of multiple directories in hdfs:// path without globbing</description>
  10747. <test-commands>
  10748. <command>-fs NAMENODE -mkdir hdfs:///dir0</command>
  10749. <command>-fs NAMENODE -mkdir hdfs:///dir0/dir1</command>
  10750. <command>-fs NAMENODE -touchz hdfs:///dir0/file0</command>
  10751. <command>-fs NAMENODE -touchz hdfs:///dir0/dir1/file1</command>
  10752. <command>-fs NAMENODE -touchz hdfs:///dir0/dir1/file2</command>
  10753. <command>-fs NAMENODE -mkdir hdfs:///dir2</command>
  10754. <command>-fs NAMENODE -mkdir hdfs:///dir2/dir1</command>
  10755. <command>-fs NAMENODE -touchz hdfs:///dir2/file0</command>
  10756. <command>-fs NAMENODE -touchz hdfs:///dir2/dir1/file1</command>
  10757. <command>-fs NAMENODE -touchz hdfs:///dir2/dir1/file2</command>
  10758. <command>-fs NAMENODE -chmod a+rwx hdfs:///dir0 hdfs:///dir2</command>
  10759. <command>-fs NAMENODE -ls -R hdfs:///dir*</command>
  10760. </test-commands>
  10761. <cleanup-commands>
  10762. <command>-fs NAMENODE -rm -r hdfs:///dir*</command>
  10763. </cleanup-commands>
  10764. <comparators>
  10765. <comparator>
  10766. <type>RegexpComparator</type>
  10767. <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>
  10768. </comparator>
  10769. <comparator>
  10770. <type>RegexpComparator</type>
  10771. <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>
  10772. </comparator>
  10773. <comparator>
  10774. <type>RegexpComparator</type>
  10775. <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>
  10776. </comparator>
  10777. <comparator>
  10778. <type>RegexpComparator</type>
  10779. <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>
  10780. </comparator>
  10781. <comparator>
  10782. <type>RegexpComparator</type>
  10783. <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>
  10784. </comparator>
  10785. <comparator>
  10786. <type>RegexpComparator</type>
  10787. <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>
  10788. </comparator>
  10789. <comparator>
  10790. <type>RegexpComparator</type>
  10791. <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>
  10792. </comparator>
  10793. <comparator>
  10794. <type>RegexpComparator</type>
  10795. <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>
  10796. </comparator>
  10797. </comparators>
  10798. </test>
  10799. <test> <!-- TESTED -->
  10800. <description>chmod: change permission(octal mode) of multiple directories in hdfs:// path recursively using globbing</description>
  10801. <test-commands>
  10802. <command>-fs NAMENODE -mkdir hdfs:///dir0</command>
  10803. <command>-fs NAMENODE -mkdir hdfs:///dir0/dir1</command>
  10804. <command>-fs NAMENODE -touchz hdfs:///dir0/file0</command>
  10805. <command>-fs NAMENODE -touchz hdfs:///dir0/dir1/file1</command>
  10806. <command>-fs NAMENODE -touchz hdfs:///dir0/dir1/file2</command>
  10807. <command>-fs NAMENODE -mkdir hdfs:///dir2</command>
  10808. <command>-fs NAMENODE -mkdir hdfs:///dir2/dir1</command>
  10809. <command>-fs NAMENODE -touchz hdfs:///dir2/file0</command>
  10810. <command>-fs NAMENODE -touchz hdfs:///dir2/dir1/file1</command>
  10811. <command>-fs NAMENODE -touchz hdfs:///dir2/dir1/file2</command>
  10812. <command>-fs NAMENODE -chmod -R 777 hdfs:///dir*</command>
  10813. <command>-fs NAMENODE -ls -R hdfs:///dir*</command>
  10814. </test-commands>
  10815. <cleanup-commands>
  10816. <command>-fs NAMENODE -rm -r hdfs:///dir*</command>
  10817. </cleanup-commands>
  10818. <comparators>
  10819. <comparator>
  10820. <type>RegexpComparator</type>
  10821. <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>
  10822. </comparator>
  10823. <comparator>
  10824. <type>RegexpComparator</type>
  10825. <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>
  10826. </comparator>
  10827. <comparator>
  10828. <type>RegexpComparator</type>
  10829. <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>
  10830. </comparator>
  10831. <comparator>
  10832. <type>RegexpComparator</type>
  10833. <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>
  10834. </comparator>
  10835. <comparator>
  10836. <type>RegexpComparator</type>
  10837. <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>
  10838. </comparator>
  10839. <comparator>
  10840. <type>RegexpComparator</type>
  10841. <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>
  10842. </comparator>
  10843. <comparator>
  10844. <type>RegexpComparator</type>
  10845. <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>
  10846. </comparator>
  10847. <comparator>
  10848. <type>RegexpComparator</type>
  10849. <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>
  10850. </comparator>
  10851. </comparators>
  10852. </test>
  10853. <test> <!-- TESTED -->
  10854. <description>chmod: change permission(octal mode) of multiple directories in hdfs:// path recursively without globbing</description>
  10855. <test-commands>
  10856. <command>-fs NAMENODE -mkdir hdfs:///dir0</command>
  10857. <command>-fs NAMENODE -mkdir hdfs:///dir0/dir1</command>
  10858. <command>-fs NAMENODE -touchz hdfs:///dir0/file0</command>
  10859. <command>-fs NAMENODE -touchz hdfs:///dir0/dir1/file1</command>
  10860. <command>-fs NAMENODE -touchz hdfs:///dir0/dir1/file2</command>
  10861. <command>-fs NAMENODE -mkdir hdfs:///dir2</command>
  10862. <command>-fs NAMENODE -mkdir hdfs:///dir2/dir1</command>
  10863. <command>-fs NAMENODE -touchz hdfs:///dir2/file0</command>
  10864. <command>-fs NAMENODE -touchz hdfs:///dir2/dir1/file1</command>
  10865. <command>-fs NAMENODE -touchz hdfs:///dir2/dir1/file2</command>
  10866. <command>-fs NAMENODE -chmod -R 777 hdfs:///dir0 hdfs:///dir2</command>
  10867. <command>-fs NAMENODE -ls -R hdfs:///dir*</command>
  10868. </test-commands>
  10869. <cleanup-commands>
  10870. <command>-fs NAMENODE -rm -r hdfs:///dir*</command>
  10871. </cleanup-commands>
  10872. <comparators>
  10873. <comparator>
  10874. <type>RegexpComparator</type>
  10875. <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>
  10876. </comparator>
  10877. <comparator>
  10878. <type>RegexpComparator</type>
  10879. <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>
  10880. </comparator>
  10881. <comparator>
  10882. <type>RegexpComparator</type>
  10883. <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>
  10884. </comparator>
  10885. <comparator>
  10886. <type>RegexpComparator</type>
  10887. <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>
  10888. </comparator>
  10889. <comparator>
  10890. <type>RegexpComparator</type>
  10891. <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>
  10892. </comparator>
  10893. <comparator>
  10894. <type>RegexpComparator</type>
  10895. <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>
  10896. </comparator>
  10897. <comparator>
  10898. <type>RegexpComparator</type>
  10899. <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>
  10900. </comparator>
  10901. <comparator>
  10902. <type>RegexpComparator</type>
  10903. <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>
  10904. </comparator>
  10905. </comparators>
  10906. </test>
  10907. <test> <!-- TESTED -->
  10908. <description>chmod: change permission(normal mode) of multiple directories in hdfs:// path recursively using globbing</description>
  10909. <test-commands>
  10910. <command>-fs NAMENODE -mkdir hdfs:///dir0</command>
  10911. <command>-fs NAMENODE -mkdir hdfs:///dir0/dir1</command>
  10912. <command>-fs NAMENODE -touchz hdfs:///dir0/file0</command>
  10913. <command>-fs NAMENODE -touchz hdfs:///dir0/dir1/file1</command>
  10914. <command>-fs NAMENODE -touchz hdfs:///dir0/dir1/file2</command>
  10915. <command>-fs NAMENODE -mkdir hdfs:///dir2</command>
  10916. <command>-fs NAMENODE -mkdir hdfs:///dir2/dir1</command>
  10917. <command>-fs NAMENODE -touchz hdfs:///dir2/file0</command>
  10918. <command>-fs NAMENODE -touchz hdfs:///dir2/dir1/file1</command>
  10919. <command>-fs NAMENODE -touchz hdfs:///dir2/dir1/file2</command>
  10920. <command>-fs NAMENODE -chmod -R a+rwx hdfs:///dir*</command>
  10921. <command>-fs NAMENODE -ls -R hdfs:///dir*</command>
  10922. </test-commands>
  10923. <cleanup-commands>
  10924. <command>-fs NAMENODE -rm -r hdfs:///dir*</command>
  10925. </cleanup-commands>
  10926. <comparators>
  10927. <comparator>
  10928. <type>RegexpComparator</type>
  10929. <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>
  10930. </comparator>
  10931. <comparator>
  10932. <type>RegexpComparator</type>
  10933. <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>
  10934. </comparator>
  10935. <comparator>
  10936. <type>RegexpComparator</type>
  10937. <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>
  10938. </comparator>
  10939. <comparator>
  10940. <type>RegexpComparator</type>
  10941. <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>
  10942. </comparator>
  10943. <comparator>
  10944. <type>RegexpComparator</type>
  10945. <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>
  10946. </comparator>
  10947. <comparator>
  10948. <type>RegexpComparator</type>
  10949. <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>
  10950. </comparator>
  10951. <comparator>
  10952. <type>RegexpComparator</type>
  10953. <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>
  10954. </comparator>
  10955. <comparator>
  10956. <type>RegexpComparator</type>
  10957. <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>
  10958. </comparator>
  10959. </comparators>
  10960. </test>
  10961. <test> <!-- TESTED -->
  10962. <description>chmod: change permission(normal mode) of multiple directories in hdfs:// path recursively without globbing</description>
  10963. <test-commands>
  10964. <command>-fs NAMENODE -mkdir hdfs:///dir0</command>
  10965. <command>-fs NAMENODE -mkdir hdfs:///dir0/dir1</command>
  10966. <command>-fs NAMENODE -touchz hdfs:///dir0/file0</command>
  10967. <command>-fs NAMENODE -touchz hdfs:///dir0/dir1/file1</command>
  10968. <command>-fs NAMENODE -touchz hdfs:///dir0/dir1/file2</command>
  10969. <command>-fs NAMENODE -mkdir hdfs:///dir2</command>
  10970. <command>-fs NAMENODE -mkdir hdfs:///dir2/dir1</command>
  10971. <command>-fs NAMENODE -touchz hdfs:///dir2/file0</command>
  10972. <command>-fs NAMENODE -touchz hdfs:///dir2/dir1/file1</command>
  10973. <command>-fs NAMENODE -touchz hdfs:///dir2/dir1/file2</command>
  10974. <command>-fs NAMENODE -chmod -R a+rwx hdfs:///dir0 hdfs:///dir2</command>
  10975. <command>-fs NAMENODE -ls -R hdfs:///dir*</command>
  10976. </test-commands>
  10977. <cleanup-commands>
  10978. <command>-fs NAMENODE -rm -r hdfs:///dir*</command>
  10979. </cleanup-commands>
  10980. <comparators>
  10981. <comparator>
  10982. <type>RegexpComparator</type>
  10983. <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>
  10984. </comparator>
  10985. <comparator>
  10986. <type>RegexpComparator</type>
  10987. <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>
  10988. </comparator>
  10989. <comparator>
  10990. <type>RegexpComparator</type>
  10991. <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>
  10992. </comparator>
  10993. <comparator>
  10994. <type>RegexpComparator</type>
  10995. <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>
  10996. </comparator>
  10997. <comparator>
  10998. <type>RegexpComparator</type>
  10999. <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>
  11000. </comparator>
  11001. <comparator>
  11002. <type>RegexpComparator</type>
  11003. <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>
  11004. </comparator>
  11005. <comparator>
  11006. <type>RegexpComparator</type>
  11007. <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>
  11008. </comparator>
  11009. <comparator>
  11010. <type>RegexpComparator</type>
  11011. <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>
  11012. </comparator>
  11013. </comparators>
  11014. </test>
  11015. <test> <!-- TESTED -->
  11016. <description>chmod: invalid value in octal mode of file in hdfs:// path</description>
  11017. <test-commands>
  11018. <command>-fs NAMENODE -touchz hdfs:///file1</command>
  11019. <command>-fs NAMENODE -chmod 999 hdfs:///file1</command>
  11020. </test-commands>
  11021. <cleanup-commands>
  11022. <command>-fs NAMENODE -rm hdfs:///file1</command>
  11023. </cleanup-commands>
  11024. <comparators>
  11025. <comparator>
  11026. <type>RegexpComparator</type>
  11027. <expected-output>^-chmod: chmod : mode '999' does not match the expected pattern.</expected-output>
  11028. </comparator>
  11029. </comparators>
  11030. </test>
  11031. <test> <!-- TESTED -->
  11032. <description>chmod: invalid value in normal mode of file in hdfs:// path</description>
  11033. <test-commands>
  11034. <command>-fs NAMENODE -touchz hdfs:///file1</command>
  11035. <command>-fs NAMENODE -chmod rdef hdfs:///file1</command>
  11036. </test-commands>
  11037. <cleanup-commands>
  11038. <command>-fs NAMENODE -rm hdfs:///file1</command>
  11039. </cleanup-commands>
  11040. <comparators>
  11041. <comparator>
  11042. <type>RegexpComparator</type>
  11043. <expected-output>^-chmod: chmod : mode \'rdef\' does not match the expected pattern.</expected-output>
  11044. </comparator>
  11045. </comparators>
  11046. </test>
  11047. <!-- Tests for chmod -->
  11048. <test> <!-- TESTED -->
  11049. <description>chmod: change permission(octal mode) of file in Namenode's path</description>
  11050. <test-commands>
  11051. <command>-fs NAMENODE -touchz NAMENODE/file1</command>
  11052. <command>-fs NAMENODE -chmod 777 NAMENODE/file1</command>
  11053. <command>-fs NAMENODE -ls NAMENODE/file1</command>
  11054. </test-commands>
  11055. <cleanup-commands>
  11056. <command>-fs NAMENODE -rm NAMENODE/file1</command>
  11057. </cleanup-commands>
  11058. <comparators>
  11059. <comparator>
  11060. <type>RegexpComparator</type>
  11061. <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>
  11062. </comparator>
  11063. </comparators>
  11064. </test>
  11065. <test> <!-- TESTED -->
  11066. <description>chmod: change permission(octal mode) of directory in Namenode's path</description>
  11067. <test-commands>
  11068. <command>-fs NAMENODE -mkdir NAMENODE/dir0</command>
  11069. <command>-fs NAMENODE -mkdir NAMENODE/dir0/dir1</command>
  11070. <command>-fs NAMENODE -touchz NAMENODE/dir0/file0</command>
  11071. <command>-fs NAMENODE -touchz NAMENODE/dir0/dir1/file1</command>
  11072. <command>-fs NAMENODE -touchz NAMENODE/dir0/dir1/file2</command>
  11073. <command>-fs NAMENODE -chmod 777 NAMENODE/dir0/dir1</command>
  11074. <command>-fs NAMENODE -ls -R NAMENODE/dir0</command>
  11075. </test-commands>
  11076. <cleanup-commands>
  11077. <command>-fs NAMENODE -rm -r NAMENODE/dir0</command>
  11078. </cleanup-commands>
  11079. <comparators>
  11080. <comparator>
  11081. <type>RegexpComparator</type>
  11082. <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>
  11083. </comparator>
  11084. <comparator>
  11085. <type>RegexpComparator</type>
  11086. <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>
  11087. </comparator>
  11088. <comparator>
  11089. <type>RegexpComparator</type>
  11090. <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>
  11091. </comparator>
  11092. <comparator>
  11093. <type>RegexpComparator</type>
  11094. <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>
  11095. </comparator>
  11096. </comparators>
  11097. </test>
  11098. <test> <!-- TESTED -->
  11099. <description>chmod: change permission(normal mode) of file in Namenode's path</description>
  11100. <test-commands>
  11101. <command>-fs NAMENODE -touchz NAMENODE/file1</command>
  11102. <command>-fs NAMENODE -chmod a+rw NAMENODE/file1</command>
  11103. <command>-fs NAMENODE -ls NAMENODE/file1</command>
  11104. </test-commands>
  11105. <cleanup-commands>
  11106. <command>-fs NAMENODE -rm NAMENODE/file1</command>
  11107. </cleanup-commands>
  11108. <comparators>
  11109. <comparator>
  11110. <type>RegexpComparator</type>
  11111. <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>
  11112. </comparator>
  11113. </comparators>
  11114. </test>
  11115. <test> <!-- TESTED -->
  11116. <description>chmod: change permission(normal mode) of directory in Namenode's path</description>
  11117. <test-commands>
  11118. <command>-fs NAMENODE -mkdir NAMENODE/dir0</command>
  11119. <command>-fs NAMENODE -mkdir NAMENODE/dir0/dir1</command>
  11120. <command>-fs NAMENODE -touchz NAMENODE/dir0/file0</command>
  11121. <command>-fs NAMENODE -touchz NAMENODE/dir0/dir1/file1</command>
  11122. <command>-fs NAMENODE -touchz NAMENODE/dir0/dir1/file2</command>
  11123. <command>-fs NAMENODE -chmod a+rwx NAMENODE/dir0/dir1</command>
  11124. <command>-fs NAMENODE -ls -R NAMENODE/dir0</command>
  11125. </test-commands>
  11126. <cleanup-commands>
  11127. <command>-fs NAMENODE -rm -r NAMENODE/dir0</command>
  11128. </cleanup-commands>
  11129. <comparators>
  11130. <comparator>
  11131. <type>RegexpComparator</type>
  11132. <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>
  11133. </comparator>
  11134. <comparator>
  11135. <type>RegexpComparator</type>
  11136. <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>
  11137. </comparator>
  11138. <comparator>
  11139. <type>RegexpComparator</type>
  11140. <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>
  11141. </comparator>
  11142. <comparator>
  11143. <type>RegexpComparator</type>
  11144. <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>
  11145. </comparator>
  11146. </comparators>
  11147. </test>
  11148. <test> <!-- TESTED -->
  11149. <description>chmod: change permission(octal mode) of directory in Namenode's path recursively </description>
  11150. <test-commands>
  11151. <command>-fs NAMENODE -mkdir NAMENODE/dir0</command>
  11152. <command>-fs NAMENODE -mkdir NAMENODE/dir0/dir1</command>
  11153. <command>-fs NAMENODE -touchz NAMENODE/dir0/file0</command>
  11154. <command>-fs NAMENODE -touchz NAMENODE/dir0/dir1/file1</command>
  11155. <command>-fs NAMENODE -touchz NAMENODE/dir0/dir1/file2</command>
  11156. <command>-fs NAMENODE -chmod -R 777 NAMENODE/dir0/dir1</command>
  11157. <command>-fs NAMENODE -ls -R NAMENODE/dir0</command>
  11158. </test-commands>
  11159. <cleanup-commands>
  11160. <command>-fs NAMENODE -rm -r NAMENODE/dir0</command>
  11161. </cleanup-commands>
  11162. <comparators>
  11163. <comparator>
  11164. <type>RegexpComparator</type>
  11165. <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>
  11166. </comparator>
  11167. <comparator>
  11168. <type>RegexpComparator</type>
  11169. <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>
  11170. </comparator>
  11171. <comparator>
  11172. <type>RegexpComparator</type>
  11173. <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>
  11174. </comparator>
  11175. <comparator>
  11176. <type>RegexpComparator</type>
  11177. <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>
  11178. </comparator>
  11179. </comparators>
  11180. </test>
  11181. <test> <!-- TESTED -->
  11182. <description>chmod: change permission(normal mode) of directory in Namenode's path recursively</description>
  11183. <test-commands>
  11184. <command>-fs NAMENODE -mkdir NAMENODE/dir0</command>
  11185. <command>-fs NAMENODE -mkdir NAMENODE/dir0/dir1</command>
  11186. <command>-fs NAMENODE -touchz NAMENODE/dir0/file0</command>
  11187. <command>-fs NAMENODE -touchz NAMENODE/dir0/dir1/file1</command>
  11188. <command>-fs NAMENODE -touchz NAMENODE/dir0/dir1/file2</command>
  11189. <command>-fs NAMENODE -chmod -R a+rwx NAMENODE/dir0/dir1</command>
  11190. <command>-fs NAMENODE -ls -R NAMENODE/dir0</command>
  11191. </test-commands>
  11192. <cleanup-commands>
  11193. <command>-fs NAMENODE -rm -r NAMENODE/dir0</command>
  11194. </cleanup-commands>
  11195. <comparators>
  11196. <comparator>
  11197. <type>RegexpComparator</type>
  11198. <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>
  11199. </comparator>
  11200. <comparator>
  11201. <type>RegexpComparator</type>
  11202. <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>
  11203. </comparator>
  11204. <comparator>
  11205. <type>RegexpComparator</type>
  11206. <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>
  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/dir0/file0</expected-output>
  11211. </comparator>
  11212. </comparators>
  11213. </test>
  11214. <test> <!-- TESTED -->
  11215. <description>chmod: change permission(octal mode) of non existent file in Namenode's path</description>
  11216. <test-commands>
  11217. <command>-fs NAMENODE -chmod 777 NAMENODE/file1</command>
  11218. </test-commands>
  11219. <cleanup-commands>
  11220. <command>-fs NAMENODE -rm NAMENODE/file1</command>
  11221. </cleanup-commands>
  11222. <comparators>
  11223. <comparator>
  11224. <type>RegexpComparator</type>
  11225. <expected-output>^chmod: `NAMENODE/file1': No such file or directory</expected-output>
  11226. </comparator>
  11227. </comparators>
  11228. </test>
  11229. <test> <!-- TESTED -->
  11230. <description>chmod: change permission(normal mode) of non existent file in Namenode's path</description>
  11231. <test-commands>
  11232. <command>-fs NAMENODE -chmod a+rw NAMENODE/file1</command>
  11233. </test-commands>
  11234. <cleanup-commands>
  11235. <command>-fs NAMENODE -rm NAMENODE/file1</command>
  11236. </cleanup-commands>
  11237. <comparators>
  11238. <comparator>
  11239. <type>RegexpComparator</type>
  11240. <expected-output>^chmod: `NAMENODE/file1': No such file or directory</expected-output>
  11241. </comparator>
  11242. </comparators>
  11243. </test>
  11244. <test> <!-- TESTED -->
  11245. <description>chmod: change permission(octal mode) of multiple files in Namenode's path using globbing</description>
  11246. <test-commands>
  11247. <command>-fs NAMENODE -touchz NAMENODE/file1</command>
  11248. <command>-fs NAMENODE -touchz NAMENODE/file2</command>
  11249. <command>-fs NAMENODE -touchz NAMENODE/file3</command>
  11250. <command>-fs NAMENODE -touchz NAMENODE/file4</command>
  11251. <command>-fs NAMENODE -chmod 777 NAMENODE/file* </command>
  11252. <command>-fs NAMENODE -ls -R NAMENODE/file*</command>
  11253. </test-commands>
  11254. <cleanup-commands>
  11255. <command>-fs NAMENODE -rm NAMENODE/file*</command>
  11256. </cleanup-commands>
  11257. <comparators>
  11258. <comparator>
  11259. <type>RegexpComparator</type>
  11260. <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>
  11261. </comparator>
  11262. <comparator>
  11263. <type>RegexpComparator</type>
  11264. <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>
  11265. </comparator>
  11266. <comparator>
  11267. <type>RegexpComparator</type>
  11268. <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>
  11269. </comparator>
  11270. <comparator>
  11271. <type>RegexpComparator</type>
  11272. <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>
  11273. </comparator>
  11274. </comparators>
  11275. </test>
  11276. <test> <!-- TESTED -->
  11277. <description>chmod: change permission(octal mode) of multiple directories in Namenode's path using globbing</description>
  11278. <test-commands>
  11279. <command>-fs NAMENODE -mkdir NAMENODE/dir0</command>
  11280. <command>-fs NAMENODE -mkdir NAMENODE/dir0/dir1</command>
  11281. <command>-fs NAMENODE -touchz NAMENODE/dir0/file0</command>
  11282. <command>-fs NAMENODE -touchz NAMENODE/dir0/dir1/file1</command>
  11283. <command>-fs NAMENODE -touchz NAMENODE/dir0/dir1/file2</command>
  11284. <command>-fs NAMENODE -mkdir NAMENODE/dir2</command>
  11285. <command>-fs NAMENODE -mkdir NAMENODE/dir2/dir1</command>
  11286. <command>-fs NAMENODE -touchz NAMENODE/dir2/file0</command>
  11287. <command>-fs NAMENODE -touchz NAMENODE/dir2/dir1/file1</command>
  11288. <command>-fs NAMENODE -touchz NAMENODE/dir2/dir1/file2</command>
  11289. <command>-fs NAMENODE -chmod 777 NAMENODE/dir*</command>
  11290. <command>-fs NAMENODE -ls -R NAMENODE/dir*</command>
  11291. </test-commands>
  11292. <cleanup-commands>
  11293. <command>-fs NAMENODE -rm -r NAMENODE/dir*</command>
  11294. </cleanup-commands>
  11295. <comparators>
  11296. <comparator>
  11297. <type>RegexpComparator</type>
  11298. <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>
  11299. </comparator>
  11300. <comparator>
  11301. <type>RegexpComparator</type>
  11302. <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>
  11303. </comparator>
  11304. <comparator>
  11305. <type>RegexpComparator</type>
  11306. <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>
  11307. </comparator>
  11308. <comparator>
  11309. <type>RegexpComparator</type>
  11310. <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>
  11311. </comparator>
  11312. <comparator>
  11313. <type>RegexpComparator</type>
  11314. <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>
  11315. </comparator>
  11316. <comparator>
  11317. <type>RegexpComparator</type>
  11318. <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>
  11319. </comparator>
  11320. <comparator>
  11321. <type>RegexpComparator</type>
  11322. <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>
  11323. </comparator>
  11324. <comparator>
  11325. <type>RegexpComparator</type>
  11326. <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>
  11327. </comparator>
  11328. </comparators>
  11329. </test>
  11330. <test> <!-- TESTED -->
  11331. <description>chmod: change permission(octal mode) of multiple files in Namenode's path without globbing</description>
  11332. <test-commands>
  11333. <command>-fs NAMENODE -touchz NAMENODE/file1</command>
  11334. <command>-fs NAMENODE -touchz NAMENODE/file2</command>
  11335. <command>-fs NAMENODE -touchz NAMENODE/file3</command>
  11336. <command>-fs NAMENODE -touchz NAMENODE/file4</command>
  11337. <command>-fs NAMENODE -chmod 777 NAMENODE/file1 NAMENODE/file2 NAMENODE/file3 NAMENODE/file4 </command>
  11338. <command>-fs NAMENODE -ls -R NAMENODE/file*</command>
  11339. </test-commands>
  11340. <cleanup-commands>
  11341. <command>-fs NAMENODE -rm NAMENODE/file*</command>
  11342. </cleanup-commands>
  11343. <comparators>
  11344. <comparator>
  11345. <type>RegexpComparator</type>
  11346. <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>
  11347. </comparator>
  11348. <comparator>
  11349. <type>RegexpComparator</type>
  11350. <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>
  11351. </comparator>
  11352. <comparator>
  11353. <type>RegexpComparator</type>
  11354. <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>
  11355. </comparator>
  11356. <comparator>
  11357. <type>RegexpComparator</type>
  11358. <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>
  11359. </comparator>
  11360. </comparators>
  11361. </test>
  11362. <test> <!-- TESTED -->
  11363. <description>chmod: change permission(octal mode) of multiple directories in Namenode's path without globbing</description>
  11364. <test-commands>
  11365. <command>-fs NAMENODE -mkdir NAMENODE/dir0</command>
  11366. <command>-fs NAMENODE -mkdir NAMENODE/dir0/dir1</command>
  11367. <command>-fs NAMENODE -touchz NAMENODE/dir0/file0</command>
  11368. <command>-fs NAMENODE -touchz NAMENODE/dir0/dir1/file1</command>
  11369. <command>-fs NAMENODE -touchz NAMENODE/dir0/dir1/file2</command>
  11370. <command>-fs NAMENODE -mkdir NAMENODE/dir2</command>
  11371. <command>-fs NAMENODE -mkdir NAMENODE/dir2/dir1</command>
  11372. <command>-fs NAMENODE -touchz NAMENODE/dir2/file0</command>
  11373. <command>-fs NAMENODE -touchz NAMENODE/dir2/dir1/file1</command>
  11374. <command>-fs NAMENODE -touchz NAMENODE/dir2/dir1/file2</command>
  11375. <command>-fs NAMENODE -chmod 777 NAMENODE/dir0 NAMENODE/dir2</command>
  11376. <command>-fs NAMENODE -ls -R NAMENODE/dir*</command>
  11377. </test-commands>
  11378. <cleanup-commands>
  11379. <command>-fs NAMENODE -rm -r NAMENODE/dir*</command>
  11380. </cleanup-commands>
  11381. <comparators>
  11382. <comparator>
  11383. <type>RegexpComparator</type>
  11384. <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>
  11385. </comparator>
  11386. <comparator>
  11387. <type>RegexpComparator</type>
  11388. <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>
  11389. </comparator>
  11390. <comparator>
  11391. <type>RegexpComparator</type>
  11392. <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>
  11393. </comparator>
  11394. <comparator>
  11395. <type>RegexpComparator</type>
  11396. <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>
  11397. </comparator>
  11398. <comparator>
  11399. <type>RegexpComparator</type>
  11400. <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>
  11401. </comparator>
  11402. <comparator>
  11403. <type>RegexpComparator</type>
  11404. <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>
  11405. </comparator>
  11406. <comparator>
  11407. <type>RegexpComparator</type>
  11408. <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>
  11409. </comparator>
  11410. <comparator>
  11411. <type>RegexpComparator</type>
  11412. <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>
  11413. </comparator>
  11414. </comparators>
  11415. </test>
  11416. <test> <!-- TESTED -->
  11417. <description>chmod: change permission(normal mode) of multiple files in Namenode's path using globbing</description>
  11418. <test-commands>
  11419. <command>-fs NAMENODE -touchz NAMENODE/file1</command>
  11420. <command>-fs NAMENODE -touchz NAMENODE/file2</command>
  11421. <command>-fs NAMENODE -touchz NAMENODE/file3</command>
  11422. <command>-fs NAMENODE -touchz NAMENODE/file4</command>
  11423. <command>-fs NAMENODE -chmod a+rw NAMENODE/file* </command>
  11424. <command>-fs NAMENODE -ls -R NAMENODE/file*</command>
  11425. </test-commands>
  11426. <cleanup-commands>
  11427. <command>-fs NAMENODE -rm NAMENODE/file*</command>
  11428. </cleanup-commands>
  11429. <comparators>
  11430. <comparator>
  11431. <type>RegexpComparator</type>
  11432. <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>
  11433. </comparator>
  11434. <comparator>
  11435. <type>RegexpComparator</type>
  11436. <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>
  11437. </comparator>
  11438. <comparator>
  11439. <type>RegexpComparator</type>
  11440. <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>
  11441. </comparator>
  11442. <comparator>
  11443. <type>RegexpComparator</type>
  11444. <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>
  11445. </comparator>
  11446. </comparators>
  11447. </test>
  11448. <test> <!-- TESTED -->
  11449. <description>chmod: change permission(normal mode) of multiple directories in Namenode's path using globbing</description>
  11450. <test-commands>
  11451. <command>-fs NAMENODE -mkdir NAMENODE/dir0</command>
  11452. <command>-fs NAMENODE -mkdir NAMENODE/dir0/dir1</command>
  11453. <command>-fs NAMENODE -touchz NAMENODE/dir0/file0</command>
  11454. <command>-fs NAMENODE -touchz NAMENODE/dir0/dir1/file1</command>
  11455. <command>-fs NAMENODE -touchz NAMENODE/dir0/dir1/file2</command>
  11456. <command>-fs NAMENODE -mkdir NAMENODE/dir2</command>
  11457. <command>-fs NAMENODE -mkdir NAMENODE/dir2/dir1</command>
  11458. <command>-fs NAMENODE -touchz NAMENODE/dir2/file0</command>
  11459. <command>-fs NAMENODE -touchz NAMENODE/dir2/dir1/file1</command>
  11460. <command>-fs NAMENODE -touchz NAMENODE/dir2/dir1/file2</command>
  11461. <command>-fs NAMENODE -chmod a+rwx NAMENODE/dir*</command>
  11462. <command>-fs NAMENODE -ls -R NAMENODE/dir*</command>
  11463. </test-commands>
  11464. <cleanup-commands>
  11465. <command>-fs NAMENODE -rm -r NAMENODE/dir*</command>
  11466. </cleanup-commands>
  11467. <comparators>
  11468. <comparator>
  11469. <type>RegexpComparator</type>
  11470. <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>
  11471. </comparator>
  11472. <comparator>
  11473. <type>RegexpComparator</type>
  11474. <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>
  11475. </comparator>
  11476. <comparator>
  11477. <type>RegexpComparator</type>
  11478. <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>
  11479. </comparator>
  11480. <comparator>
  11481. <type>RegexpComparator</type>
  11482. <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>
  11483. </comparator>
  11484. <comparator>
  11485. <type>RegexpComparator</type>
  11486. <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>
  11487. </comparator>
  11488. <comparator>
  11489. <type>RegexpComparator</type>
  11490. <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>
  11491. </comparator>
  11492. <comparator>
  11493. <type>RegexpComparator</type>
  11494. <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>
  11495. </comparator>
  11496. <comparator>
  11497. <type>RegexpComparator</type>
  11498. <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>
  11499. </comparator>
  11500. </comparators>
  11501. </test>
  11502. <test> <!-- TESTED -->
  11503. <description>chmod: change permission(normal mode) of multiple files in Namenode's path without globbing</description>
  11504. <test-commands>
  11505. <command>-fs NAMENODE -touchz NAMENODE/file1</command>
  11506. <command>-fs NAMENODE -touchz NAMENODE/file2</command>
  11507. <command>-fs NAMENODE -touchz NAMENODE/file3</command>
  11508. <command>-fs NAMENODE -touchz NAMENODE/file4</command>
  11509. <command>-fs NAMENODE -chmod a+rw NAMENODE/file1 NAMENODE/file2 NAMENODE/file3 NAMENODE/file4 </command>
  11510. <command>-fs NAMENODE -ls -R NAMENODE/file*</command>
  11511. </test-commands>
  11512. <cleanup-commands>
  11513. <command>-fs NAMENODE -rm NAMENODE/file*</command>
  11514. </cleanup-commands>
  11515. <comparators>
  11516. <comparator>
  11517. <type>RegexpComparator</type>
  11518. <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>
  11519. </comparator>
  11520. <comparator>
  11521. <type>RegexpComparator</type>
  11522. <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>
  11523. </comparator>
  11524. <comparator>
  11525. <type>RegexpComparator</type>
  11526. <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>
  11527. </comparator>
  11528. <comparator>
  11529. <type>RegexpComparator</type>
  11530. <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>
  11531. </comparator>
  11532. </comparators>
  11533. </test>
  11534. <test> <!-- TESTED -->
  11535. <description>chmod: change permission(normal mode) of multiple directories in Namenode's path without globbing</description>
  11536. <test-commands>
  11537. <command>-fs NAMENODE -mkdir NAMENODE/dir0</command>
  11538. <command>-fs NAMENODE -mkdir NAMENODE/dir0/dir1</command>
  11539. <command>-fs NAMENODE -touchz NAMENODE/dir0/file0</command>
  11540. <command>-fs NAMENODE -touchz NAMENODE/dir0/dir1/file1</command>
  11541. <command>-fs NAMENODE -touchz NAMENODE/dir0/dir1/file2</command>
  11542. <command>-fs NAMENODE -mkdir NAMENODE/dir2</command>
  11543. <command>-fs NAMENODE -mkdir NAMENODE/dir2/dir1</command>
  11544. <command>-fs NAMENODE -touchz NAMENODE/dir2/file0</command>
  11545. <command>-fs NAMENODE -touchz NAMENODE/dir2/dir1/file1</command>
  11546. <command>-fs NAMENODE -touchz NAMENODE/dir2/dir1/file2</command>
  11547. <command>-fs NAMENODE -chmod a+rwx NAMENODE/dir0 NAMENODE/dir2</command>
  11548. <command>-fs NAMENODE -ls -R NAMENODE/dir*</command>
  11549. </test-commands>
  11550. <cleanup-commands>
  11551. <command>-fs NAMENODE -rm -r NAMENODE/dir*</command>
  11552. </cleanup-commands>
  11553. <comparators>
  11554. <comparator>
  11555. <type>RegexpComparator</type>
  11556. <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>
  11557. </comparator>
  11558. <comparator>
  11559. <type>RegexpComparator</type>
  11560. <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>
  11561. </comparator>
  11562. <comparator>
  11563. <type>RegexpComparator</type>
  11564. <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>
  11565. </comparator>
  11566. <comparator>
  11567. <type>RegexpComparator</type>
  11568. <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>
  11569. </comparator>
  11570. <comparator>
  11571. <type>RegexpComparator</type>
  11572. <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>
  11573. </comparator>
  11574. <comparator>
  11575. <type>RegexpComparator</type>
  11576. <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>
  11577. </comparator>
  11578. <comparator>
  11579. <type>RegexpComparator</type>
  11580. <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>
  11581. </comparator>
  11582. <comparator>
  11583. <type>RegexpComparator</type>
  11584. <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>
  11585. </comparator>
  11586. </comparators>
  11587. </test>
  11588. <test> <!-- TESTED -->
  11589. <description>chmod: change permission(octal mode) of multiple directories in Namenode's path recursively using globbing</description>
  11590. <test-commands>
  11591. <command>-fs NAMENODE -mkdir NAMENODE/dir0</command>
  11592. <command>-fs NAMENODE -mkdir NAMENODE/dir0/dir1</command>
  11593. <command>-fs NAMENODE -touchz NAMENODE/dir0/file0</command>
  11594. <command>-fs NAMENODE -touchz NAMENODE/dir0/dir1/file1</command>
  11595. <command>-fs NAMENODE -touchz NAMENODE/dir0/dir1/file2</command>
  11596. <command>-fs NAMENODE -mkdir NAMENODE/dir2</command>
  11597. <command>-fs NAMENODE -mkdir NAMENODE/dir2/dir1</command>
  11598. <command>-fs NAMENODE -touchz NAMENODE/dir2/file0</command>
  11599. <command>-fs NAMENODE -touchz NAMENODE/dir2/dir1/file1</command>
  11600. <command>-fs NAMENODE -touchz NAMENODE/dir2/dir1/file2</command>
  11601. <command>-fs NAMENODE -chmod -R 777 NAMENODE/dir*</command>
  11602. <command>-fs NAMENODE -ls -R NAMENODE/dir*</command>
  11603. </test-commands>
  11604. <cleanup-commands>
  11605. <command>-fs NAMENODE -rm -r NAMENODE/dir*</command>
  11606. </cleanup-commands>
  11607. <comparators>
  11608. <comparator>
  11609. <type>RegexpComparator</type>
  11610. <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>
  11611. </comparator>
  11612. <comparator>
  11613. <type>RegexpComparator</type>
  11614. <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>
  11615. </comparator>
  11616. <comparator>
  11617. <type>RegexpComparator</type>
  11618. <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>
  11619. </comparator>
  11620. <comparator>
  11621. <type>RegexpComparator</type>
  11622. <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>
  11623. </comparator>
  11624. <comparator>
  11625. <type>RegexpComparator</type>
  11626. <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>
  11627. </comparator>
  11628. <comparator>
  11629. <type>RegexpComparator</type>
  11630. <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>
  11631. </comparator>
  11632. <comparator>
  11633. <type>RegexpComparator</type>
  11634. <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>
  11635. </comparator>
  11636. <comparator>
  11637. <type>RegexpComparator</type>
  11638. <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>
  11639. </comparator>
  11640. </comparators>
  11641. </test>
  11642. <test> <!-- TESTED -->
  11643. <description>chmod: change permission(octal mode) of multiple directories in Namenode's path recursively without globbing</description>
  11644. <test-commands>
  11645. <command>-fs NAMENODE -mkdir NAMENODE/dir0</command>
  11646. <command>-fs NAMENODE -mkdir NAMENODE/dir0/dir1</command>
  11647. <command>-fs NAMENODE -touchz NAMENODE/dir0/file0</command>
  11648. <command>-fs NAMENODE -touchz NAMENODE/dir0/dir1/file1</command>
  11649. <command>-fs NAMENODE -touchz NAMENODE/dir0/dir1/file2</command>
  11650. <command>-fs NAMENODE -mkdir NAMENODE/dir2</command>
  11651. <command>-fs NAMENODE -mkdir NAMENODE/dir2/dir1</command>
  11652. <command>-fs NAMENODE -touchz NAMENODE/dir2/file0</command>
  11653. <command>-fs NAMENODE -touchz NAMENODE/dir2/dir1/file1</command>
  11654. <command>-fs NAMENODE -touchz NAMENODE/dir2/dir1/file2</command>
  11655. <command>-fs NAMENODE -chmod -R 777 NAMENODE/dir0 NAMENODE/dir2</command>
  11656. <command>-fs NAMENODE -ls -R NAMENODE/dir*</command>
  11657. </test-commands>
  11658. <cleanup-commands>
  11659. <command>-fs NAMENODE -rm -r NAMENODE/dir*</command>
  11660. </cleanup-commands>
  11661. <comparators>
  11662. <comparator>
  11663. <type>RegexpComparator</type>
  11664. <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>
  11665. </comparator>
  11666. <comparator>
  11667. <type>RegexpComparator</type>
  11668. <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>
  11669. </comparator>
  11670. <comparator>
  11671. <type>RegexpComparator</type>
  11672. <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>
  11673. </comparator>
  11674. <comparator>
  11675. <type>RegexpComparator</type>
  11676. <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>
  11677. </comparator>
  11678. <comparator>
  11679. <type>RegexpComparator</type>
  11680. <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>
  11681. </comparator>
  11682. <comparator>
  11683. <type>RegexpComparator</type>
  11684. <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>
  11685. </comparator>
  11686. <comparator>
  11687. <type>RegexpComparator</type>
  11688. <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>
  11689. </comparator>
  11690. <comparator>
  11691. <type>RegexpComparator</type>
  11692. <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>
  11693. </comparator>
  11694. </comparators>
  11695. </test>
  11696. <test> <!-- TESTED -->
  11697. <description>chmod: change permission(normal mode) of multiple directories in Namenode's path recursively using globbing</description>
  11698. <test-commands>
  11699. <command>-fs NAMENODE -mkdir NAMENODE/dir0</command>
  11700. <command>-fs NAMENODE -mkdir NAMENODE/dir0/dir1</command>
  11701. <command>-fs NAMENODE -touchz NAMENODE/dir0/file0</command>
  11702. <command>-fs NAMENODE -touchz NAMENODE/dir0/dir1/file1</command>
  11703. <command>-fs NAMENODE -touchz NAMENODE/dir0/dir1/file2</command>
  11704. <command>-fs NAMENODE -mkdir NAMENODE/dir2</command>
  11705. <command>-fs NAMENODE -mkdir NAMENODE/dir2/dir1</command>
  11706. <command>-fs NAMENODE -touchz NAMENODE/dir2/file0</command>
  11707. <command>-fs NAMENODE -touchz NAMENODE/dir2/dir1/file1</command>
  11708. <command>-fs NAMENODE -touchz NAMENODE/dir2/dir1/file2</command>
  11709. <command>-fs NAMENODE -chmod -R a+rwx NAMENODE/dir*</command>
  11710. <command>-fs NAMENODE -ls -R NAMENODE/dir*</command>
  11711. </test-commands>
  11712. <cleanup-commands>
  11713. <command>-fs NAMENODE -rm -r NAMENODE/dir*</command>
  11714. </cleanup-commands>
  11715. <comparators>
  11716. <comparator>
  11717. <type>RegexpComparator</type>
  11718. <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>
  11719. </comparator>
  11720. <comparator>
  11721. <type>RegexpComparator</type>
  11722. <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>
  11723. </comparator>
  11724. <comparator>
  11725. <type>RegexpComparator</type>
  11726. <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>
  11727. </comparator>
  11728. <comparator>
  11729. <type>RegexpComparator</type>
  11730. <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>
  11731. </comparator>
  11732. <comparator>
  11733. <type>RegexpComparator</type>
  11734. <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>
  11735. </comparator>
  11736. <comparator>
  11737. <type>RegexpComparator</type>
  11738. <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>
  11739. </comparator>
  11740. <comparator>
  11741. <type>RegexpComparator</type>
  11742. <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>
  11743. </comparator>
  11744. <comparator>
  11745. <type>RegexpComparator</type>
  11746. <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>
  11747. </comparator>
  11748. </comparators>
  11749. </test>
  11750. <test> <!-- TESTED -->
  11751. <description>chmod: change permission(normal mode) of multiple directories in Namenode's path recursively without globbing</description>
  11752. <test-commands>
  11753. <command>-fs NAMENODE -mkdir NAMENODE/dir0</command>
  11754. <command>-fs NAMENODE -mkdir NAMENODE/dir0/dir1</command>
  11755. <command>-fs NAMENODE -touchz NAMENODE/dir0/file0</command>
  11756. <command>-fs NAMENODE -touchz NAMENODE/dir0/dir1/file1</command>
  11757. <command>-fs NAMENODE -touchz NAMENODE/dir0/dir1/file2</command>
  11758. <command>-fs NAMENODE -mkdir NAMENODE/dir2</command>
  11759. <command>-fs NAMENODE -mkdir NAMENODE/dir2/dir1</command>
  11760. <command>-fs NAMENODE -touchz NAMENODE/dir2/file0</command>
  11761. <command>-fs NAMENODE -touchz NAMENODE/dir2/dir1/file1</command>
  11762. <command>-fs NAMENODE -touchz NAMENODE/dir2/dir1/file2</command>
  11763. <command>-fs NAMENODE -chmod -R a+rwx NAMENODE/dir0 NAMENODE/dir2</command>
  11764. <command>-fs NAMENODE -ls -R NAMENODE/dir*</command>
  11765. </test-commands>
  11766. <cleanup-commands>
  11767. <command>-fs NAMENODE -rm -r NAMENODE/dir*</command>
  11768. </cleanup-commands>
  11769. <comparators>
  11770. <comparator>
  11771. <type>RegexpComparator</type>
  11772. <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>
  11773. </comparator>
  11774. <comparator>
  11775. <type>RegexpComparator</type>
  11776. <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>
  11777. </comparator>
  11778. <comparator>
  11779. <type>RegexpComparator</type>
  11780. <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>
  11781. </comparator>
  11782. <comparator>
  11783. <type>RegexpComparator</type>
  11784. <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>
  11785. </comparator>
  11786. <comparator>
  11787. <type>RegexpComparator</type>
  11788. <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>
  11789. </comparator>
  11790. <comparator>
  11791. <type>RegexpComparator</type>
  11792. <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>
  11793. </comparator>
  11794. <comparator>
  11795. <type>RegexpComparator</type>
  11796. <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>
  11797. </comparator>
  11798. <comparator>
  11799. <type>RegexpComparator</type>
  11800. <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>
  11801. </comparator>
  11802. </comparators>
  11803. </test>
  11804. <test> <!-- TESTED -->
  11805. <description>chmod: invalid value in octal mode of file in Namenode's path</description>
  11806. <test-commands>
  11807. <command>-fs NAMENODE -touchz NAMENODE/file1</command>
  11808. <command>-fs NAMENODE -chmod 999 NAMENODE/file1</command>
  11809. </test-commands>
  11810. <cleanup-commands>
  11811. <command>-fs NAMENODE -rm NAMENODE/file1</command>
  11812. </cleanup-commands>
  11813. <comparators>
  11814. <comparator>
  11815. <type>RegexpComparator</type>
  11816. <expected-output>^-chmod: chmod : mode '999' does not match the expected pattern.</expected-output>
  11817. </comparator>
  11818. </comparators>
  11819. </test>
  11820. <test> <!-- TESTED -->
  11821. <description>chmod: invalid value in normal mode of file in Namenode's path</description>
  11822. <test-commands>
  11823. <command>-fs NAMENODE -touchz NAMENODE/file1</command>
  11824. <command>-fs NAMENODE -chmod rdef NAMENODE/file1</command>
  11825. </test-commands>
  11826. <cleanup-commands>
  11827. <command>-fs NAMENODE -rm NAMENODE/file1</command>
  11828. </cleanup-commands>
  11829. <comparators>
  11830. <comparator>
  11831. <type>RegexpComparator</type>
  11832. <expected-output>^-chmod: chmod : mode \'rdef\' does not match the expected pattern.</expected-output>
  11833. </comparator>
  11834. </comparators>
  11835. </test>
  11836. <!-- Tests for chown -->
  11837. <test> <!-- TESTED -->
  11838. <description>chown: change ownership of file in hdfs:// path</description>
  11839. <test-commands>
  11840. <command>-fs NAMENODE -touchz hdfs:///file1</command>
  11841. <command>-fs NAMENODE -chown newowner:newgroup hdfs:///file1</command>
  11842. <command>-fs NAMENODE -ls hdfs:///file1</command>
  11843. </test-commands>
  11844. <cleanup-commands>
  11845. <command>-fs NAMENODE -rm hdfs:///file1</command>
  11846. </cleanup-commands>
  11847. <comparators>
  11848. <comparator>
  11849. <type>RegexpComparator</type>
  11850. <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>
  11851. </comparator>
  11852. </comparators>
  11853. </test>
  11854. <test> <!-- TESTED -->
  11855. <description>chown: change ownership of directory in hdfs:// path</description>
  11856. <test-commands>
  11857. <command>-fs NAMENODE -mkdir hdfs:///dir0</command>
  11858. <command>-fs NAMENODE -mkdir hdfs:///dir0/dir1</command>
  11859. <command>-fs NAMENODE -touchz hdfs:///dir0/file0</command>
  11860. <command>-fs NAMENODE -touchz hdfs:///dir0/dir1/file1</command>
  11861. <command>-fs NAMENODE -touchz hdfs:///dir0/dir1/file2</command>
  11862. <command>-fs NAMENODE -chown newowner:newgroup hdfs:///dir0/dir1</command>
  11863. <command>-fs NAMENODE -ls -R hdfs:///dir0</command>
  11864. </test-commands>
  11865. <cleanup-commands>
  11866. <command>-fs NAMENODE -rm -r hdfs:///dir0</command>
  11867. </cleanup-commands>
  11868. <comparators>
  11869. <comparator>
  11870. <type>RegexpComparator</type>
  11871. <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>
  11872. </comparator>
  11873. <comparator>
  11874. <type>RegexpComparator</type>
  11875. <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>
  11876. </comparator>
  11877. <comparator>
  11878. <type>RegexpComparator</type>
  11879. <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>
  11880. </comparator>
  11881. <comparator>
  11882. <type>RegexpComparator</type>
  11883. <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>
  11884. </comparator>
  11885. </comparators>
  11886. </test>
  11887. <test> <!-- TESTED -->
  11888. <description>chown: change ownership of directory in hdfs:// path recursively </description>
  11889. <test-commands>
  11890. <command>-fs NAMENODE -mkdir hdfs:///dir0</command>
  11891. <command>-fs NAMENODE -mkdir hdfs:///dir0/dir1</command>
  11892. <command>-fs NAMENODE -touchz hdfs:///dir0/file0</command>
  11893. <command>-fs NAMENODE -touchz hdfs:///dir0/dir1/file1</command>
  11894. <command>-fs NAMENODE -touchz hdfs:///dir0/dir1/file2</command>
  11895. <command>-fs NAMENODE -chown -R newowner:newgroup hdfs:///dir0/dir1</command>
  11896. <command>-fs NAMENODE -ls -R hdfs:///dir0</command>
  11897. </test-commands>
  11898. <cleanup-commands>
  11899. <command>-fs NAMENODE -rm -r hdfs:///dir0</command>
  11900. </cleanup-commands>
  11901. <comparators>
  11902. <comparator>
  11903. <type>RegexpComparator</type>
  11904. <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>
  11905. </comparator>
  11906. <comparator>
  11907. <type>RegexpComparator</type>
  11908. <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>
  11909. </comparator>
  11910. <comparator>
  11911. <type>RegexpComparator</type>
  11912. <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>
  11913. </comparator>
  11914. <comparator>
  11915. <type>RegexpComparator</type>
  11916. <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>
  11917. </comparator>
  11918. </comparators>
  11919. </test>
  11920. <test> <!-- TESTED -->
  11921. <description>chown: change ownership of non existent file in hdfs:// path</description>
  11922. <test-commands>
  11923. <command>-fs NAMENODE -chown newowner:newgroup hdfs:///file1</command>
  11924. </test-commands>
  11925. <cleanup-commands>
  11926. <command>-fs NAMENODE -rm hdfs:///file1</command>
  11927. </cleanup-commands>
  11928. <comparators>
  11929. <comparator>
  11930. <type>RegexpComparator</type>
  11931. <expected-output>^chown: `hdfs:///file1': No such file or directory</expected-output>
  11932. </comparator>
  11933. </comparators>
  11934. </test>
  11935. <test> <!-- TESTED -->
  11936. <description>chown: change ownership of multiple files in hdfs:// path using globbing</description>
  11937. <test-commands>
  11938. <command>-fs NAMENODE -touchz hdfs:///file1</command>
  11939. <command>-fs NAMENODE -touchz hdfs:///file2</command>
  11940. <command>-fs NAMENODE -touchz hdfs:///file3</command>
  11941. <command>-fs NAMENODE -touchz hdfs:///file4</command>
  11942. <command>-fs NAMENODE -chown newowner:newgroup hdfs:///file* </command>
  11943. <command>-fs NAMENODE -ls -R hdfs:///file*</command>
  11944. </test-commands>
  11945. <cleanup-commands>
  11946. <command>-fs NAMENODE -rm hdfs:///file*</command>
  11947. </cleanup-commands>
  11948. <comparators>
  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:///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:///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:///file3</expected-output>
  11960. </comparator>
  11961. <comparator>
  11962. <type>RegexpComparator</type>
  11963. <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>
  11964. </comparator>
  11965. </comparators>
  11966. </test>
  11967. <test> <!-- TESTED -->
  11968. <description>chown: change ownership of multiple directories in hdfs:// path using globbing</description>
  11969. <test-commands>
  11970. <command>-fs NAMENODE -mkdir hdfs:///dir0</command>
  11971. <command>-fs NAMENODE -mkdir hdfs:///dir0/dir1</command>
  11972. <command>-fs NAMENODE -touchz hdfs:///dir0/file0</command>
  11973. <command>-fs NAMENODE -touchz hdfs:///dir0/dir1/file1</command>
  11974. <command>-fs NAMENODE -touchz hdfs:///dir0/dir1/file2</command>
  11975. <command>-fs NAMENODE -mkdir hdfs:///dir2</command>
  11976. <command>-fs NAMENODE -mkdir hdfs:///dir2/dir1</command>
  11977. <command>-fs NAMENODE -touchz hdfs:///dir2/file0</command>
  11978. <command>-fs NAMENODE -touchz hdfs:///dir2/dir1/file1</command>
  11979. <command>-fs NAMENODE -touchz hdfs:///dir2/dir1/file2</command>
  11980. <command>-fs NAMENODE -chown newowner:newgroup hdfs:///dir*</command>
  11981. <command>-fs NAMENODE -ls -R hdfs:///dir*</command>
  11982. </test-commands>
  11983. <cleanup-commands>
  11984. <command>-fs NAMENODE -rm -r hdfs:///dir*</command>
  11985. </cleanup-commands>
  11986. <comparators>
  11987. <comparator>
  11988. <type>RegexpComparator</type>
  11989. <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>
  11990. </comparator>
  11991. <comparator>
  11992. <type>RegexpComparator</type>
  11993. <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>
  11994. </comparator>
  11995. <comparator>
  11996. <type>RegexpComparator</type>
  11997. <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>
  11998. </comparator>
  11999. <comparator>
  12000. <type>RegexpComparator</type>
  12001. <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>
  12002. </comparator>
  12003. <comparator>
  12004. <type>RegexpComparator</type>
  12005. <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>
  12006. </comparator>
  12007. <comparator>
  12008. <type>RegexpComparator</type>
  12009. <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>
  12010. </comparator>
  12011. <comparator>
  12012. <type>RegexpComparator</type>
  12013. <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>
  12014. </comparator>
  12015. <comparator>
  12016. <type>RegexpComparator</type>
  12017. <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>
  12018. </comparator>
  12019. </comparators>
  12020. </test>
  12021. <test> <!-- TESTED -->
  12022. <description>chown: change ownership of multiple files in hdfs:// path without globbing</description>
  12023. <test-commands>
  12024. <command>-fs NAMENODE -touchz hdfs:///file1</command>
  12025. <command>-fs NAMENODE -touchz hdfs:///file2</command>
  12026. <command>-fs NAMENODE -touchz hdfs:///file3</command>
  12027. <command>-fs NAMENODE -touchz hdfs:///file4</command>
  12028. <command>-fs NAMENODE -chown newowner:newgroup hdfs:///file1 hdfs:///file2 hdfs:///file3 hdfs:///file4 </command>
  12029. <command>-fs NAMENODE -ls -R hdfs:///file*</command>
  12030. </test-commands>
  12031. <cleanup-commands>
  12032. <command>-fs NAMENODE -rm hdfs:///file*</command>
  12033. </cleanup-commands>
  12034. <comparators>
  12035. <comparator>
  12036. <type>RegexpComparator</type>
  12037. <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>
  12038. </comparator>
  12039. <comparator>
  12040. <type>RegexpComparator</type>
  12041. <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>
  12042. </comparator>
  12043. <comparator>
  12044. <type>RegexpComparator</type>
  12045. <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>
  12046. </comparator>
  12047. <comparator>
  12048. <type>RegexpComparator</type>
  12049. <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>
  12050. </comparator>
  12051. </comparators>
  12052. </test>
  12053. <test> <!-- TESTED -->
  12054. <description>chown: change ownership of multiple directories in hdfs:// path without globbing</description>
  12055. <test-commands>
  12056. <command>-fs NAMENODE -mkdir hdfs:///dir0</command>
  12057. <command>-fs NAMENODE -mkdir hdfs:///dir0/dir1</command>
  12058. <command>-fs NAMENODE -touchz hdfs:///dir0/file0</command>
  12059. <command>-fs NAMENODE -touchz hdfs:///dir0/dir1/file1</command>
  12060. <command>-fs NAMENODE -touchz hdfs:///dir0/dir1/file2</command>
  12061. <command>-fs NAMENODE -mkdir hdfs:///dir2</command>
  12062. <command>-fs NAMENODE -mkdir hdfs:///dir2/dir1</command>
  12063. <command>-fs NAMENODE -touchz hdfs:///dir2/file0</command>
  12064. <command>-fs NAMENODE -touchz hdfs:///dir2/dir1/file1</command>
  12065. <command>-fs NAMENODE -touchz hdfs:///dir2/dir1/file2</command>
  12066. <command>-fs NAMENODE -chown newowner:newgroup hdfs:///dir0 hdfs:///dir2</command>
  12067. <command>-fs NAMENODE -ls -R hdfs:///dir*</command>
  12068. </test-commands>
  12069. <cleanup-commands>
  12070. <command>-fs NAMENODE -rm -r hdfs:///dir*</command>
  12071. </cleanup-commands>
  12072. <comparators>
  12073. <comparator>
  12074. <type>RegexpComparator</type>
  12075. <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>
  12076. </comparator>
  12077. <comparator>
  12078. <type>RegexpComparator</type>
  12079. <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>
  12080. </comparator>
  12081. <comparator>
  12082. <type>RegexpComparator</type>
  12083. <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>
  12084. </comparator>
  12085. <comparator>
  12086. <type>RegexpComparator</type>
  12087. <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>
  12088. </comparator>
  12089. <comparator>
  12090. <type>RegexpComparator</type>
  12091. <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>
  12092. </comparator>
  12093. <comparator>
  12094. <type>RegexpComparator</type>
  12095. <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>
  12096. </comparator>
  12097. <comparator>
  12098. <type>RegexpComparator</type>
  12099. <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>
  12100. </comparator>
  12101. <comparator>
  12102. <type>RegexpComparator</type>
  12103. <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>
  12104. </comparator>
  12105. </comparators>
  12106. </test>
  12107. <test> <!-- TESTED -->
  12108. <description>chown: change ownership of multiple directories recursively in hdfs:// path using globbing</description>
  12109. <test-commands>
  12110. <command>-fs NAMENODE -mkdir hdfs:///dir0</command>
  12111. <command>-fs NAMENODE -mkdir hdfs:///dir0/dir1</command>
  12112. <command>-fs NAMENODE -touchz hdfs:///dir0/file0</command>
  12113. <command>-fs NAMENODE -touchz hdfs:///dir0/dir1/file1</command>
  12114. <command>-fs NAMENODE -touchz hdfs:///dir0/dir1/file2</command>
  12115. <command>-fs NAMENODE -mkdir hdfs:///dir2</command>
  12116. <command>-fs NAMENODE -mkdir hdfs:///dir2/dir1</command>
  12117. <command>-fs NAMENODE -touchz hdfs:///dir2/file0</command>
  12118. <command>-fs NAMENODE -touchz hdfs:///dir2/dir1/file1</command>
  12119. <command>-fs NAMENODE -touchz hdfs:///dir2/dir1/file2</command>
  12120. <command>-fs NAMENODE -chown -R newowner:newgroup hdfs:///dir*</command>
  12121. <command>-fs NAMENODE -ls -R hdfs:///dir*</command>
  12122. </test-commands>
  12123. <cleanup-commands>
  12124. <command>-fs NAMENODE -rm -r hdfs:///dir*</command>
  12125. </cleanup-commands>
  12126. <comparators>
  12127. <comparator>
  12128. <type>RegexpComparator</type>
  12129. <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>
  12130. </comparator>
  12131. <comparator>
  12132. <type>RegexpComparator</type>
  12133. <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>
  12134. </comparator>
  12135. <comparator>
  12136. <type>RegexpComparator</type>
  12137. <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>
  12138. </comparator>
  12139. <comparator>
  12140. <type>RegexpComparator</type>
  12141. <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>
  12142. </comparator>
  12143. <comparator>
  12144. <type>RegexpComparator</type>
  12145. <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>
  12146. </comparator>
  12147. <comparator>
  12148. <type>RegexpComparator</type>
  12149. <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>
  12150. </comparator>
  12151. <comparator>
  12152. <type>RegexpComparator</type>
  12153. <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>
  12154. </comparator>
  12155. <comparator>
  12156. <type>RegexpComparator</type>
  12157. <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>
  12158. </comparator>
  12159. </comparators>
  12160. </test>
  12161. <test> <!-- TESTED -->
  12162. <description>chown: change ownership of multiple directories recursively in hdfs:// path without globbing</description>
  12163. <test-commands>
  12164. <command>-fs NAMENODE -mkdir hdfs:///dir0</command>
  12165. <command>-fs NAMENODE -mkdir hdfs:///dir0/dir1</command>
  12166. <command>-fs NAMENODE -touchz hdfs:///dir0/file0</command>
  12167. <command>-fs NAMENODE -touchz hdfs:///dir0/dir1/file1</command>
  12168. <command>-fs NAMENODE -touchz hdfs:///dir0/dir1/file2</command>
  12169. <command>-fs NAMENODE -mkdir hdfs:///dir2</command>
  12170. <command>-fs NAMENODE -mkdir hdfs:///dir2/dir1</command>
  12171. <command>-fs NAMENODE -touchz hdfs:///dir2/file0</command>
  12172. <command>-fs NAMENODE -touchz hdfs:///dir2/dir1/file1</command>
  12173. <command>-fs NAMENODE -touchz hdfs:///dir2/dir1/file2</command>
  12174. <command>-fs NAMENODE -chown -R newowner:newgroup hdfs:///dir0 hdfs:///dir2</command>
  12175. <command>-fs NAMENODE -ls -R hdfs:///dir*</command>
  12176. </test-commands>
  12177. <cleanup-commands>
  12178. <command>-fs NAMENODE -rm -r hdfs:///dir*</command>
  12179. </cleanup-commands>
  12180. <comparators>
  12181. <comparator>
  12182. <type>RegexpComparator</type>
  12183. <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>
  12184. </comparator>
  12185. <comparator>
  12186. <type>RegexpComparator</type>
  12187. <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>
  12188. </comparator>
  12189. <comparator>
  12190. <type>RegexpComparator</type>
  12191. <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>
  12192. </comparator>
  12193. <comparator>
  12194. <type>RegexpComparator</type>
  12195. <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>
  12196. </comparator>
  12197. <comparator>
  12198. <type>RegexpComparator</type>
  12199. <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>
  12200. </comparator>
  12201. <comparator>
  12202. <type>RegexpComparator</type>
  12203. <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>
  12204. </comparator>
  12205. <comparator>
  12206. <type>RegexpComparator</type>
  12207. <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>
  12208. </comparator>
  12209. <comparator>
  12210. <type>RegexpComparator</type>
  12211. <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>
  12212. </comparator>
  12213. </comparators>
  12214. </test>
  12215. <test> <!-- TESTED -->
  12216. <description>chown: invalid option for owner of file in hdfs:// path</description>
  12217. <test-commands>
  12218. <command>-fs NAMENODE -touchz hdfs:///file1</command>
  12219. <command>-fs NAMENODE -chown %:newgroup hdfs:///file1</command>
  12220. </test-commands>
  12221. <cleanup-commands>
  12222. <command>-fs NAMENODE -rm hdfs:///file1</command>
  12223. </cleanup-commands>
  12224. <comparators>
  12225. <comparator>
  12226. <type>RegexpComparator</type>
  12227. <expected-output>^-chown: '%:newgroup' does not match expected pattern for \[owner\]\[:group\].</expected-output>
  12228. </comparator>
  12229. </comparators>
  12230. </test>
  12231. <test> <!-- TESTED -->
  12232. <description>chown: invalid option for group of file in hdfs:// path</description>
  12233. <test-commands>
  12234. <command>-fs NAMENODE -touchz hdfs:///file1</command>
  12235. <command>-fs NAMENODE -chown newowner:% hdfs:///file1</command>
  12236. </test-commands>
  12237. <cleanup-commands>
  12238. <command>-fs NAMENODE -rm hdfs:///file1</command>
  12239. </cleanup-commands>
  12240. <comparators>
  12241. <comparator>
  12242. <type>RegexpComparator</type>
  12243. <expected-output>^-chown: 'newowner:%' does not match expected pattern for \[owner\]\[:group\].</expected-output>
  12244. </comparator>
  12245. </comparators>
  12246. </test>
  12247. <!-- Tests for chown -->
  12248. <test> <!-- TESTED -->
  12249. <description>chown: change ownership of file in absolute path</description>
  12250. <test-commands>
  12251. <command>-fs NAMENODE -touchz /file1</command>
  12252. <command>-fs NAMENODE -chown newowner:newgroup /file1</command>
  12253. <command>-fs NAMENODE -ls /file1</command>
  12254. </test-commands>
  12255. <cleanup-commands>
  12256. <command>-fs NAMENODE -rm /file1</command>
  12257. </cleanup-commands>
  12258. <comparators>
  12259. <comparator>
  12260. <type>RegexpComparator</type>
  12261. <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>
  12262. </comparator>
  12263. </comparators>
  12264. </test>
  12265. <test> <!-- TESTED -->
  12266. <description>chown: change ownership of file in relative path</description>
  12267. <test-commands>
  12268. <command>-fs NAMENODE -touchz file1</command>
  12269. <command>-fs NAMENODE -chown newowner:newgroup file1</command>
  12270. <command>-fs NAMENODE -ls file1</command>
  12271. </test-commands>
  12272. <cleanup-commands>
  12273. <command>-fs NAMENODE -rm file1</command>
  12274. </cleanup-commands>
  12275. <comparators>
  12276. <comparator>
  12277. <type>RegexpComparator</type>
  12278. <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>
  12279. </comparator>
  12280. </comparators>
  12281. </test>
  12282. <test> <!-- TESTED -->
  12283. <description>chown: change ownership of directory in absolute path</description>
  12284. <test-commands>
  12285. <command>-fs NAMENODE -mkdir /dir0</command>
  12286. <command>-fs NAMENODE -mkdir /dir0/dir1</command>
  12287. <command>-fs NAMENODE -touchz /dir0/file0</command>
  12288. <command>-fs NAMENODE -touchz /dir0/dir1/file1</command>
  12289. <command>-fs NAMENODE -touchz /dir0/dir1/file2</command>
  12290. <command>-fs NAMENODE -chown newowner:newgroup /dir0/dir1</command>
  12291. <command>-fs NAMENODE -ls -R /dir0</command>
  12292. </test-commands>
  12293. <cleanup-commands>
  12294. <command>-fs NAMENODE -rm -r /dir0</command>
  12295. </cleanup-commands>
  12296. <comparators>
  12297. <comparator>
  12298. <type>RegexpComparator</type>
  12299. <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>
  12300. </comparator>
  12301. <comparator>
  12302. <type>RegexpComparator</type>
  12303. <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>
  12304. </comparator>
  12305. <comparator>
  12306. <type>RegexpComparator</type>
  12307. <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>
  12308. </comparator>
  12309. <comparator>
  12310. <type>RegexpComparator</type>
  12311. <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>
  12312. </comparator>
  12313. </comparators>
  12314. </test>
  12315. <test> <!-- TESTED -->
  12316. <description>chown: change ownership of directory in relative path</description>
  12317. <test-commands>
  12318. <command>-fs NAMENODE -mkdir -p dir0</command>
  12319. <command>-fs NAMENODE -mkdir -p dir0/dir1</command>
  12320. <command>-fs NAMENODE -touchz dir0/file0</command>
  12321. <command>-fs NAMENODE -touchz dir0/dir1/file1</command>
  12322. <command>-fs NAMENODE -touchz dir0/dir1/file2</command>
  12323. <command>-fs NAMENODE -chown newowner:newgroup dir0/dir1</command>
  12324. <command>-fs NAMENODE -ls -R dir0</command>
  12325. </test-commands>
  12326. <cleanup-commands>
  12327. <command>-fs NAMENODE -rm -r dir0</command>
  12328. </cleanup-commands>
  12329. <comparators>
  12330. <comparator>
  12331. <type>RegexpComparator</type>
  12332. <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>
  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. </comparators>
  12347. </test>
  12348. <test> <!-- TESTED -->
  12349. <description>chown: change ownership of directory in absolute path recursively </description>
  12350. <test-commands>
  12351. <command>-fs NAMENODE -mkdir /dir0</command>
  12352. <command>-fs NAMENODE -mkdir /dir0/dir1</command>
  12353. <command>-fs NAMENODE -touchz /dir0/file0</command>
  12354. <command>-fs NAMENODE -touchz /dir0/dir1/file1</command>
  12355. <command>-fs NAMENODE -touchz /dir0/dir1/file2</command>
  12356. <command>-fs NAMENODE -chown -R newowner:newgroup /dir0/dir1</command>
  12357. <command>-fs NAMENODE -ls -R /dir0</command>
  12358. </test-commands>
  12359. <cleanup-commands>
  12360. <command>-fs NAMENODE -rm -r /dir0</command>
  12361. </cleanup-commands>
  12362. <comparators>
  12363. <comparator>
  12364. <type>RegexpComparator</type>
  12365. <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>
  12366. </comparator>
  12367. <comparator>
  12368. <type>RegexpComparator</type>
  12369. <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>
  12370. </comparator>
  12371. <comparator>
  12372. <type>RegexpComparator</type>
  12373. <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>
  12374. </comparator>
  12375. <comparator>
  12376. <type>RegexpComparator</type>
  12377. <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>
  12378. </comparator>
  12379. </comparators>
  12380. </test>
  12381. <test> <!-- TESTED -->
  12382. <description>chown: change ownership of directory in relative path recursively </description>
  12383. <test-commands>
  12384. <command>-fs NAMENODE -mkdir -p dir0</command>
  12385. <command>-fs NAMENODE -mkdir -p dir0/dir1</command>
  12386. <command>-fs NAMENODE -touchz dir0/file0</command>
  12387. <command>-fs NAMENODE -touchz dir0/dir1/file1</command>
  12388. <command>-fs NAMENODE -touchz dir0/dir1/file2</command>
  12389. <command>-fs NAMENODE -chown -R newowner:newgroup dir0/dir1</command>
  12390. <command>-fs NAMENODE -ls -R dir0</command>
  12391. </test-commands>
  12392. <cleanup-commands>
  12393. <command>-fs NAMENODE -rm -r dir0</command>
  12394. </cleanup-commands>
  12395. <comparators>
  12396. <comparator>
  12397. <type>RegexpComparator</type>
  12398. <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>
  12399. </comparator>
  12400. <comparator>
  12401. <type>RegexpComparator</type>
  12402. <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>
  12403. </comparator>
  12404. <comparator>
  12405. <type>RegexpComparator</type>
  12406. <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>
  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,}( )*dir0/file0</expected-output>
  12411. </comparator>
  12412. </comparators>
  12413. </test>
  12414. <test> <!-- TESTED -->
  12415. <description>chown: change ownership of non existent file in absolute path</description>
  12416. <test-commands>
  12417. <command>-fs NAMENODE -chown newowner:newgroup /file1</command>
  12418. </test-commands>
  12419. <cleanup-commands>
  12420. <command>-fs NAMENODE -rm /file1</command>
  12421. </cleanup-commands>
  12422. <comparators>
  12423. <comparator>
  12424. <type>RegexpComparator</type>
  12425. <expected-output>^chown: `/file1': No such file or directory</expected-output>
  12426. </comparator>
  12427. </comparators>
  12428. </test>
  12429. <test> <!-- TESTED -->
  12430. <description>chown: change ownership of non existent file in relative path</description>
  12431. <test-commands>
  12432. <command>-fs NAMENODE -chown newowner:newgroup file1</command>
  12433. </test-commands>
  12434. <cleanup-commands>
  12435. <command>-fs NAMENODE -rm file1</command>
  12436. </cleanup-commands>
  12437. <comparators>
  12438. <comparator>
  12439. <type>RegexpComparator</type>
  12440. <expected-output>^chown: `file1': No such file or directory</expected-output>
  12441. </comparator>
  12442. </comparators>
  12443. </test>
  12444. <test> <!-- TESTED -->
  12445. <description>chown: change ownership of multiple files in absolute path using globbing</description>
  12446. <test-commands>
  12447. <command>-fs NAMENODE -touchz /file1</command>
  12448. <command>-fs NAMENODE -touchz /file2</command>
  12449. <command>-fs NAMENODE -touchz /file3</command>
  12450. <command>-fs NAMENODE -touchz /file4</command>
  12451. <command>-fs NAMENODE -chown newowner:newgroup /file* </command>
  12452. <command>-fs NAMENODE -ls -R /file*</command>
  12453. </test-commands>
  12454. <cleanup-commands>
  12455. <command>-fs NAMENODE -rm /file*</command>
  12456. </cleanup-commands>
  12457. <comparators>
  12458. <comparator>
  12459. <type>RegexpComparator</type>
  12460. <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>
  12461. </comparator>
  12462. <comparator>
  12463. <type>RegexpComparator</type>
  12464. <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>
  12465. </comparator>
  12466. <comparator>
  12467. <type>RegexpComparator</type>
  12468. <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>
  12469. </comparator>
  12470. <comparator>
  12471. <type>RegexpComparator</type>
  12472. <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>
  12473. </comparator>
  12474. </comparators>
  12475. </test>
  12476. <test> <!-- TESTED -->
  12477. <description>chown: change ownership of multiple files in relative path using globbing</description>
  12478. <test-commands>
  12479. <command>-fs NAMENODE -touchz file1</command>
  12480. <command>-fs NAMENODE -touchz file2</command>
  12481. <command>-fs NAMENODE -touchz file3</command>
  12482. <command>-fs NAMENODE -touchz file4</command>
  12483. <command>-fs NAMENODE -chown newowner:newgroup file* </command>
  12484. <command>-fs NAMENODE -ls -R file*</command>
  12485. </test-commands>
  12486. <cleanup-commands>
  12487. <command>-fs NAMENODE -rm file*</command>
  12488. </cleanup-commands>
  12489. <comparators>
  12490. <comparator>
  12491. <type>RegexpComparator</type>
  12492. <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>
  12493. </comparator>
  12494. <comparator>
  12495. <type>RegexpComparator</type>
  12496. <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>
  12497. </comparator>
  12498. <comparator>
  12499. <type>RegexpComparator</type>
  12500. <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>
  12501. </comparator>
  12502. <comparator>
  12503. <type>RegexpComparator</type>
  12504. <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>
  12505. </comparator>
  12506. </comparators>
  12507. </test>
  12508. <test> <!-- TESTED -->
  12509. <description>chown: change ownership of multiple directories in absolute path using globbing</description>
  12510. <test-commands>
  12511. <command>-fs NAMENODE -mkdir /dir0</command>
  12512. <command>-fs NAMENODE -mkdir /dir0/dir1</command>
  12513. <command>-fs NAMENODE -touchz /dir0/file0</command>
  12514. <command>-fs NAMENODE -touchz /dir0/dir1/file1</command>
  12515. <command>-fs NAMENODE -touchz /dir0/dir1/file2</command>
  12516. <command>-fs NAMENODE -mkdir /dir2</command>
  12517. <command>-fs NAMENODE -mkdir /dir2/dir1</command>
  12518. <command>-fs NAMENODE -touchz /dir2/file0</command>
  12519. <command>-fs NAMENODE -touchz /dir2/dir1/file1</command>
  12520. <command>-fs NAMENODE -touchz /dir2/dir1/file2</command>
  12521. <command>-fs NAMENODE -chown newowner:newgroup /dir*</command>
  12522. <command>-fs NAMENODE -ls -R /dir*</command>
  12523. </test-commands>
  12524. <cleanup-commands>
  12525. <command>-fs NAMENODE -rm -r /dir*</command>
  12526. </cleanup-commands>
  12527. <comparators>
  12528. <comparator>
  12529. <type>RegexpComparator</type>
  12530. <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>
  12531. </comparator>
  12532. <comparator>
  12533. <type>RegexpComparator</type>
  12534. <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>
  12535. </comparator>
  12536. <comparator>
  12537. <type>RegexpComparator</type>
  12538. <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>
  12539. </comparator>
  12540. <comparator>
  12541. <type>RegexpComparator</type>
  12542. <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>
  12543. </comparator>
  12544. <comparator>
  12545. <type>RegexpComparator</type>
  12546. <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>
  12547. </comparator>
  12548. <comparator>
  12549. <type>RegexpComparator</type>
  12550. <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>
  12551. </comparator>
  12552. <comparator>
  12553. <type>RegexpComparator</type>
  12554. <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>
  12555. </comparator>
  12556. <comparator>
  12557. <type>RegexpComparator</type>
  12558. <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>
  12559. </comparator>
  12560. </comparators>
  12561. </test>
  12562. <test> <!-- TESTED -->
  12563. <description>chown: change ownership of multiple directories in relative path using globbing</description>
  12564. <test-commands>
  12565. <command>-fs NAMENODE -mkdir -p dir0</command>
  12566. <command>-fs NAMENODE -mkdir -p dir0/dir1</command>
  12567. <command>-fs NAMENODE -touchz dir0/file0</command>
  12568. <command>-fs NAMENODE -touchz dir0/dir1/file1</command>
  12569. <command>-fs NAMENODE -touchz dir0/dir1/file2</command>
  12570. <command>-fs NAMENODE -mkdir -p dir2</command>
  12571. <command>-fs NAMENODE -mkdir -p dir2/dir1</command>
  12572. <command>-fs NAMENODE -touchz dir2/file0</command>
  12573. <command>-fs NAMENODE -touchz dir2/dir1/file1</command>
  12574. <command>-fs NAMENODE -touchz dir2/dir1/file2</command>
  12575. <command>-fs NAMENODE -chown newowner:newgroup dir*</command>
  12576. <command>-fs NAMENODE -ls -R dir*</command>
  12577. </test-commands>
  12578. <cleanup-commands>
  12579. <command>-fs NAMENODE -rm -r dir*</command>
  12580. </cleanup-commands>
  12581. <comparators>
  12582. <comparator>
  12583. <type>RegexpComparator</type>
  12584. <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>
  12585. </comparator>
  12586. <comparator>
  12587. <type>RegexpComparator</type>
  12588. <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>
  12589. </comparator>
  12590. <comparator>
  12591. <type>RegexpComparator</type>
  12592. <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>
  12593. </comparator>
  12594. <comparator>
  12595. <type>RegexpComparator</type>
  12596. <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>
  12597. </comparator>
  12598. <comparator>
  12599. <type>RegexpComparator</type>
  12600. <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>
  12601. </comparator>
  12602. <comparator>
  12603. <type>RegexpComparator</type>
  12604. <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>
  12605. </comparator>
  12606. <comparator>
  12607. <type>RegexpComparator</type>
  12608. <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>
  12609. </comparator>
  12610. <comparator>
  12611. <type>RegexpComparator</type>
  12612. <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>
  12613. </comparator>
  12614. </comparators>
  12615. </test>
  12616. <test> <!-- TESTED -->
  12617. <description>chown: change ownership of multiple files in absolute path without globbing</description>
  12618. <test-commands>
  12619. <command>-fs NAMENODE -touchz /file1</command>
  12620. <command>-fs NAMENODE -touchz /file2</command>
  12621. <command>-fs NAMENODE -touchz /file3</command>
  12622. <command>-fs NAMENODE -touchz /file4</command>
  12623. <command>-fs NAMENODE -chown newowner:newgroup /file1 /file2 /file3 /file4 </command>
  12624. <command>-fs NAMENODE -ls -R /file*</command>
  12625. </test-commands>
  12626. <cleanup-commands>
  12627. <command>-fs NAMENODE -rm /file*</command>
  12628. </cleanup-commands>
  12629. <comparators>
  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,}( )*/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,}( )*/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,}( )*/file3</expected-output>
  12641. </comparator>
  12642. <comparator>
  12643. <type>RegexpComparator</type>
  12644. <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>
  12645. </comparator>
  12646. </comparators>
  12647. </test>
  12648. <test> <!-- TESTED -->
  12649. <description>chown: change ownership of multiple files in relative path without globbing</description>
  12650. <test-commands>
  12651. <command>-fs NAMENODE -touchz file1</command>
  12652. <command>-fs NAMENODE -touchz file2</command>
  12653. <command>-fs NAMENODE -touchz file3</command>
  12654. <command>-fs NAMENODE -touchz file4</command>
  12655. <command>-fs NAMENODE -chown newowner:newgroup file1 file2 file3 file4 </command>
  12656. <command>-fs NAMENODE -ls -R file*</command>
  12657. </test-commands>
  12658. <cleanup-commands>
  12659. <command>-fs NAMENODE -rm file*</command>
  12660. </cleanup-commands>
  12661. <comparators>
  12662. <comparator>
  12663. <type>RegexpComparator</type>
  12664. <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>
  12665. </comparator>
  12666. <comparator>
  12667. <type>RegexpComparator</type>
  12668. <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>
  12669. </comparator>
  12670. <comparator>
  12671. <type>RegexpComparator</type>
  12672. <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>
  12673. </comparator>
  12674. <comparator>
  12675. <type>RegexpComparator</type>
  12676. <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>
  12677. </comparator>
  12678. </comparators>
  12679. </test>
  12680. <test> <!-- TESTED -->
  12681. <description>chown: change ownership of multiple directories in absolute path without globbing</description>
  12682. <test-commands>
  12683. <command>-fs NAMENODE -mkdir /dir0</command>
  12684. <command>-fs NAMENODE -mkdir /dir0/dir1</command>
  12685. <command>-fs NAMENODE -touchz /dir0/file0</command>
  12686. <command>-fs NAMENODE -touchz /dir0/dir1/file1</command>
  12687. <command>-fs NAMENODE -touchz /dir0/dir1/file2</command>
  12688. <command>-fs NAMENODE -mkdir /dir2</command>
  12689. <command>-fs NAMENODE -mkdir /dir2/dir1</command>
  12690. <command>-fs NAMENODE -touchz /dir2/file0</command>
  12691. <command>-fs NAMENODE -touchz /dir2/dir1/file1</command>
  12692. <command>-fs NAMENODE -touchz /dir2/dir1/file2</command>
  12693. <command>-fs NAMENODE -chown newowner:newgroup /dir0 /dir2</command>
  12694. <command>-fs NAMENODE -ls -R /dir*</command>
  12695. </test-commands>
  12696. <cleanup-commands>
  12697. <command>-fs NAMENODE -rm -r /dir*</command>
  12698. </cleanup-commands>
  12699. <comparators>
  12700. <comparator>
  12701. <type>RegexpComparator</type>
  12702. <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>
  12703. </comparator>
  12704. <comparator>
  12705. <type>RegexpComparator</type>
  12706. <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>
  12707. </comparator>
  12708. <comparator>
  12709. <type>RegexpComparator</type>
  12710. <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>
  12711. </comparator>
  12712. <comparator>
  12713. <type>RegexpComparator</type>
  12714. <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>
  12715. </comparator>
  12716. <comparator>
  12717. <type>RegexpComparator</type>
  12718. <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>
  12719. </comparator>
  12720. <comparator>
  12721. <type>RegexpComparator</type>
  12722. <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>
  12723. </comparator>
  12724. <comparator>
  12725. <type>RegexpComparator</type>
  12726. <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>
  12727. </comparator>
  12728. <comparator>
  12729. <type>RegexpComparator</type>
  12730. <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>
  12731. </comparator>
  12732. </comparators>
  12733. </test>
  12734. <test> <!-- TESTED -->
  12735. <description>chown: change ownership of multiple directories in relative path without globbing</description>
  12736. <test-commands>
  12737. <command>-fs NAMENODE -mkdir -p dir0</command>
  12738. <command>-fs NAMENODE -mkdir -p dir0/dir1</command>
  12739. <command>-fs NAMENODE -touchz dir0/file0</command>
  12740. <command>-fs NAMENODE -touchz dir0/dir1/file1</command>
  12741. <command>-fs NAMENODE -touchz dir0/dir1/file2</command>
  12742. <command>-fs NAMENODE -mkdir -p dir2</command>
  12743. <command>-fs NAMENODE -mkdir -p dir2/dir1</command>
  12744. <command>-fs NAMENODE -touchz dir2/file0</command>
  12745. <command>-fs NAMENODE -touchz dir2/dir1/file1</command>
  12746. <command>-fs NAMENODE -touchz dir2/dir1/file2</command>
  12747. <command>-fs NAMENODE -chown newowner:newgroup dir0 dir2</command>
  12748. <command>-fs NAMENODE -ls -R dir*</command>
  12749. </test-commands>
  12750. <cleanup-commands>
  12751. <command>-fs NAMENODE -rm -r dir*</command>
  12752. </cleanup-commands>
  12753. <comparators>
  12754. <comparator>
  12755. <type>RegexpComparator</type>
  12756. <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>
  12757. </comparator>
  12758. <comparator>
  12759. <type>RegexpComparator</type>
  12760. <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>
  12761. </comparator>
  12762. <comparator>
  12763. <type>RegexpComparator</type>
  12764. <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>
  12765. </comparator>
  12766. <comparator>
  12767. <type>RegexpComparator</type>
  12768. <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>
  12769. </comparator>
  12770. <comparator>
  12771. <type>RegexpComparator</type>
  12772. <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>
  12773. </comparator>
  12774. <comparator>
  12775. <type>RegexpComparator</type>
  12776. <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>
  12777. </comparator>
  12778. <comparator>
  12779. <type>RegexpComparator</type>
  12780. <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>
  12781. </comparator>
  12782. <comparator>
  12783. <type>RegexpComparator</type>
  12784. <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>
  12785. </comparator>
  12786. </comparators>
  12787. </test>
  12788. <test> <!-- TESTED -->
  12789. <description>chown: change ownership of multiple directories recursively in absolute path using globbing</description>
  12790. <test-commands>
  12791. <command>-fs NAMENODE -mkdir /dir0</command>
  12792. <command>-fs NAMENODE -mkdir /dir0/dir1</command>
  12793. <command>-fs NAMENODE -touchz /dir0/file0</command>
  12794. <command>-fs NAMENODE -touchz /dir0/dir1/file1</command>
  12795. <command>-fs NAMENODE -touchz /dir0/dir1/file2</command>
  12796. <command>-fs NAMENODE -mkdir /dir2</command>
  12797. <command>-fs NAMENODE -mkdir /dir2/dir1</command>
  12798. <command>-fs NAMENODE -touchz /dir2/file0</command>
  12799. <command>-fs NAMENODE -touchz /dir2/dir1/file1</command>
  12800. <command>-fs NAMENODE -touchz /dir2/dir1/file2</command>
  12801. <command>-fs NAMENODE -chown -R newowner:newgroup /dir*</command>
  12802. <command>-fs NAMENODE -ls -R /dir*</command>
  12803. </test-commands>
  12804. <cleanup-commands>
  12805. <command>-fs NAMENODE -rm -r /dir*</command>
  12806. </cleanup-commands>
  12807. <comparators>
  12808. <comparator>
  12809. <type>RegexpComparator</type>
  12810. <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>
  12811. </comparator>
  12812. <comparator>
  12813. <type>RegexpComparator</type>
  12814. <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>
  12815. </comparator>
  12816. <comparator>
  12817. <type>RegexpComparator</type>
  12818. <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>
  12819. </comparator>
  12820. <comparator>
  12821. <type>RegexpComparator</type>
  12822. <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>
  12823. </comparator>
  12824. <comparator>
  12825. <type>RegexpComparator</type>
  12826. <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>
  12827. </comparator>
  12828. <comparator>
  12829. <type>RegexpComparator</type>
  12830. <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>
  12831. </comparator>
  12832. <comparator>
  12833. <type>RegexpComparator</type>
  12834. <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>
  12835. </comparator>
  12836. <comparator>
  12837. <type>RegexpComparator</type>
  12838. <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>
  12839. </comparator>
  12840. </comparators>
  12841. </test>
  12842. <test> <!-- TESTED -->
  12843. <description>chown: change ownership of multiple directories recursively in relative path using globbing</description>
  12844. <test-commands>
  12845. <command>-fs NAMENODE -mkdir -p dir0</command>
  12846. <command>-fs NAMENODE -mkdir -p dir0/dir1</command>
  12847. <command>-fs NAMENODE -touchz dir0/file0</command>
  12848. <command>-fs NAMENODE -touchz dir0/dir1/file1</command>
  12849. <command>-fs NAMENODE -touchz dir0/dir1/file2</command>
  12850. <command>-fs NAMENODE -mkdir -p dir2</command>
  12851. <command>-fs NAMENODE -mkdir -p dir2/dir1</command>
  12852. <command>-fs NAMENODE -touchz dir2/file0</command>
  12853. <command>-fs NAMENODE -touchz dir2/dir1/file1</command>
  12854. <command>-fs NAMENODE -touchz dir2/dir1/file2</command>
  12855. <command>-fs NAMENODE -chown -R newowner:newgroup dir*</command>
  12856. <command>-fs NAMENODE -ls -R dir*</command>
  12857. </test-commands>
  12858. <cleanup-commands>
  12859. <command>-fs NAMENODE -rm -r dir*</command>
  12860. </cleanup-commands>
  12861. <comparators>
  12862. <comparator>
  12863. <type>RegexpComparator</type>
  12864. <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>
  12865. </comparator>
  12866. <comparator>
  12867. <type>RegexpComparator</type>
  12868. <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>
  12869. </comparator>
  12870. <comparator>
  12871. <type>RegexpComparator</type>
  12872. <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>
  12873. </comparator>
  12874. <comparator>
  12875. <type>RegexpComparator</type>
  12876. <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>
  12877. </comparator>
  12878. <comparator>
  12879. <type>RegexpComparator</type>
  12880. <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>
  12881. </comparator>
  12882. <comparator>
  12883. <type>RegexpComparator</type>
  12884. <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>
  12885. </comparator>
  12886. <comparator>
  12887. <type>RegexpComparator</type>
  12888. <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>
  12889. </comparator>
  12890. <comparator>
  12891. <type>RegexpComparator</type>
  12892. <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>
  12893. </comparator>
  12894. </comparators>
  12895. </test>
  12896. <test> <!-- TESTED -->
  12897. <description>chown: change ownership of multiple directories recursively in absolute path without globbing</description>
  12898. <test-commands>
  12899. <command>-fs NAMENODE -mkdir /dir0</command>
  12900. <command>-fs NAMENODE -mkdir /dir0/dir1</command>
  12901. <command>-fs NAMENODE -touchz /dir0/file0</command>
  12902. <command>-fs NAMENODE -touchz /dir0/dir1/file1</command>
  12903. <command>-fs NAMENODE -touchz /dir0/dir1/file2</command>
  12904. <command>-fs NAMENODE -mkdir /dir2</command>
  12905. <command>-fs NAMENODE -mkdir /dir2/dir1</command>
  12906. <command>-fs NAMENODE -touchz /dir2/file0</command>
  12907. <command>-fs NAMENODE -touchz /dir2/dir1/file1</command>
  12908. <command>-fs NAMENODE -touchz /dir2/dir1/file2</command>
  12909. <command>-fs NAMENODE -chown -R newowner:newgroup /dir0 /dir2</command>
  12910. <command>-fs NAMENODE -ls -R /dir*</command>
  12911. </test-commands>
  12912. <cleanup-commands>
  12913. <command>-fs NAMENODE -rm -r /dir*</command>
  12914. </cleanup-commands>
  12915. <comparators>
  12916. <comparator>
  12917. <type>RegexpComparator</type>
  12918. <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>
  12919. </comparator>
  12920. <comparator>
  12921. <type>RegexpComparator</type>
  12922. <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>
  12923. </comparator>
  12924. <comparator>
  12925. <type>RegexpComparator</type>
  12926. <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>
  12927. </comparator>
  12928. <comparator>
  12929. <type>RegexpComparator</type>
  12930. <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>
  12931. </comparator>
  12932. <comparator>
  12933. <type>RegexpComparator</type>
  12934. <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>
  12935. </comparator>
  12936. <comparator>
  12937. <type>RegexpComparator</type>
  12938. <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>
  12939. </comparator>
  12940. <comparator>
  12941. <type>RegexpComparator</type>
  12942. <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>
  12943. </comparator>
  12944. <comparator>
  12945. <type>RegexpComparator</type>
  12946. <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>
  12947. </comparator>
  12948. </comparators>
  12949. </test>
  12950. <test> <!-- TESTED -->
  12951. <description>chown: change ownership of multiple directories recursively in relative path without globbing</description>
  12952. <test-commands>
  12953. <command>-fs NAMENODE -mkdir -p dir0</command>
  12954. <command>-fs NAMENODE -mkdir -p dir0/dir1</command>
  12955. <command>-fs NAMENODE -touchz dir0/file0</command>
  12956. <command>-fs NAMENODE -touchz dir0/dir1/file1</command>
  12957. <command>-fs NAMENODE -touchz dir0/dir1/file2</command>
  12958. <command>-fs NAMENODE -mkdir -p dir2</command>
  12959. <command>-fs NAMENODE -mkdir -p dir2/dir1</command>
  12960. <command>-fs NAMENODE -touchz dir2/file0</command>
  12961. <command>-fs NAMENODE -touchz dir2/dir1/file1</command>
  12962. <command>-fs NAMENODE -touchz dir2/dir1/file2</command>
  12963. <command>-fs NAMENODE -chown -R newowner:newgroup dir0 dir2</command>
  12964. <command>-fs NAMENODE -ls -R dir*</command>
  12965. </test-commands>
  12966. <cleanup-commands>
  12967. <command>-fs NAMENODE -rm -r dir*</command>
  12968. </cleanup-commands>
  12969. <comparators>
  12970. <comparator>
  12971. <type>RegexpComparator</type>
  12972. <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>
  12973. </comparator>
  12974. <comparator>
  12975. <type>RegexpComparator</type>
  12976. <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>
  12977. </comparator>
  12978. <comparator>
  12979. <type>RegexpComparator</type>
  12980. <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>
  12981. </comparator>
  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,}( )*dir0/file0</expected-output>
  12985. </comparator>
  12986. <comparator>
  12987. <type>RegexpComparator</type>
  12988. <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>
  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,}( )*dir2/dir1/file1</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,}( )*dir2/dir1/file2</expected-output>
  12997. </comparator>
  12998. <comparator>
  12999. <type>RegexpComparator</type>
  13000. <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>
  13001. </comparator>
  13002. </comparators>
  13003. </test>
  13004. <test> <!-- TESTED -->
  13005. <description>chown: invalid option for owner of file in absolute path</description>
  13006. <test-commands>
  13007. <command>-fs NAMENODE -touchz /file1</command>
  13008. <command>-fs NAMENODE -chown %:newgroup /file1</command>
  13009. </test-commands>
  13010. <cleanup-commands>
  13011. <command>-fs NAMENODE -rm /file1</command>
  13012. </cleanup-commands>
  13013. <comparators>
  13014. <comparator>
  13015. <type>RegexpComparator</type>
  13016. <expected-output>^-chown: '%:newgroup' does not match expected pattern for \[owner\]\[:group\].</expected-output>
  13017. </comparator>
  13018. </comparators>
  13019. </test>
  13020. <test> <!-- TESTED -->
  13021. <description>chown: invalid option for owner of file in relative path</description>
  13022. <test-commands>
  13023. <command>-fs NAMENODE -touchz file1</command>
  13024. <command>-fs NAMENODE -chown %:newgroup file1</command>
  13025. </test-commands>
  13026. <cleanup-commands>
  13027. <command>-fs NAMENODE -rm file1</command>
  13028. </cleanup-commands>
  13029. <comparators>
  13030. <comparator>
  13031. <type>RegexpComparator</type>
  13032. <expected-output>^-chown: '%:newgroup' does not match expected pattern for \[owner\]\[:group\].</expected-output>
  13033. </comparator>
  13034. </comparators>
  13035. </test>
  13036. <test> <!-- TESTED -->
  13037. <description>chown: invalid option for group of file in absolute path</description>
  13038. <test-commands>
  13039. <command>-fs NAMENODE -touchz /file1</command>
  13040. <command>-fs NAMENODE -chown newowner:% /file1</command>
  13041. </test-commands>
  13042. <cleanup-commands>
  13043. <command>-fs NAMENODE -rm /file1</command>
  13044. </cleanup-commands>
  13045. <comparators>
  13046. <comparator>
  13047. <type>RegexpComparator</type>
  13048. <expected-output>^-chown: 'newowner:%' does not match expected pattern for \[owner\]\[:group\].</expected-output>
  13049. </comparator>
  13050. </comparators>
  13051. </test>
  13052. <test> <!-- TESTED -->
  13053. <description>chown: invalid option for group of file in relative path</description>
  13054. <test-commands>
  13055. <command>-fs NAMENODE -touchz file1</command>
  13056. <command>-fs NAMENODE -chown newowner:% file1</command>
  13057. </test-commands>
  13058. <cleanup-commands>
  13059. <command>-fs NAMENODE -rm file1</command>
  13060. </cleanup-commands>
  13061. <comparators>
  13062. <comparator>
  13063. <type>RegexpComparator</type>
  13064. <expected-output>^-chown: 'newowner:%' does not match expected pattern for \[owner\]\[:group\].</expected-output>
  13065. </comparator>
  13066. </comparators>
  13067. </test>
  13068. <test> <!-- TESTED -->
  13069. <description>chown: change ownership of file in Namenode's path</description>
  13070. <test-commands>
  13071. <command>-fs NAMENODE -touchz NAMENODE/file1</command>
  13072. <command>-fs NAMENODE -chown newowner:newgroup NAMENODE/file1</command>
  13073. <command>-fs NAMENODE -ls NAMENODE/file1</command>
  13074. </test-commands>
  13075. <cleanup-commands>
  13076. <command>-fs NAMENODE -rm NAMENODE/file1</command>
  13077. </cleanup-commands>
  13078. <comparators>
  13079. <comparator>
  13080. <type>RegexpComparator</type>
  13081. <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>
  13082. </comparator>
  13083. </comparators>
  13084. </test>
  13085. <test> <!-- TESTED -->
  13086. <description>chown: change ownership of directory in Namenode's path</description>
  13087. <test-commands>
  13088. <command>-fs NAMENODE -mkdir NAMENODE/dir0</command>
  13089. <command>-fs NAMENODE -mkdir NAMENODE/dir0/dir1</command>
  13090. <command>-fs NAMENODE -touchz NAMENODE/dir0/file0</command>
  13091. <command>-fs NAMENODE -touchz NAMENODE/dir0/dir1/file1</command>
  13092. <command>-fs NAMENODE -touchz NAMENODE/dir0/dir1/file2</command>
  13093. <command>-fs NAMENODE -chown newowner:newgroup NAMENODE/dir0/dir1</command>
  13094. <command>-fs NAMENODE -ls -R NAMENODE/dir0</command>
  13095. </test-commands>
  13096. <cleanup-commands>
  13097. <command>-fs NAMENODE -rm -r NAMENODE/dir0</command>
  13098. </cleanup-commands>
  13099. <comparators>
  13100. <comparator>
  13101. <type>RegexpComparator</type>
  13102. <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>
  13103. </comparator>
  13104. <comparator>
  13105. <type>RegexpComparator</type>
  13106. <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>
  13107. </comparator>
  13108. <comparator>
  13109. <type>RegexpComparator</type>
  13110. <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>
  13111. </comparator>
  13112. <comparator>
  13113. <type>RegexpComparator</type>
  13114. <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>
  13115. </comparator>
  13116. </comparators>
  13117. </test>
  13118. <test> <!-- TESTED -->
  13119. <description>chown: change ownership of directory in Namenode's path recursively </description>
  13120. <test-commands>
  13121. <command>-fs NAMENODE -mkdir NAMENODE/dir0</command>
  13122. <command>-fs NAMENODE -mkdir NAMENODE/dir0/dir1</command>
  13123. <command>-fs NAMENODE -touchz NAMENODE/dir0/file0</command>
  13124. <command>-fs NAMENODE -touchz NAMENODE/dir0/dir1/file1</command>
  13125. <command>-fs NAMENODE -touchz NAMENODE/dir0/dir1/file2</command>
  13126. <command>-fs NAMENODE -chown -R newowner:newgroup NAMENODE/dir0/dir1</command>
  13127. <command>-fs NAMENODE -ls -R NAMENODE/dir0</command>
  13128. </test-commands>
  13129. <cleanup-commands>
  13130. <command>-fs NAMENODE -rm -r NAMENODE/dir0</command>
  13131. </cleanup-commands>
  13132. <comparators>
  13133. <comparator>
  13134. <type>RegexpComparator</type>
  13135. <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>
  13136. </comparator>
  13137. <comparator>
  13138. <type>RegexpComparator</type>
  13139. <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>
  13140. </comparator>
  13141. <comparator>
  13142. <type>RegexpComparator</type>
  13143. <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>
  13144. </comparator>
  13145. <comparator>
  13146. <type>RegexpComparator</type>
  13147. <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>
  13148. </comparator>
  13149. </comparators>
  13150. </test>
  13151. <test> <!-- TESTED -->
  13152. <description>chown: change ownership of non existent file in Namenode's path</description>
  13153. <test-commands>
  13154. <command>-fs NAMENODE -chown newowner:newgroup NAMENODE/file1</command>
  13155. </test-commands>
  13156. <cleanup-commands>
  13157. <command>-fs NAMENODE -rm NAMENODE/file1</command>
  13158. </cleanup-commands>
  13159. <comparators>
  13160. <comparator>
  13161. <type>RegexpComparator</type>
  13162. <expected-output>^chown: `NAMENODE/file1': No such file or directory</expected-output>
  13163. </comparator>
  13164. </comparators>
  13165. </test>
  13166. <test> <!-- TESTED -->
  13167. <description>chown: change ownership of multiple files in Namenode's path using globbing</description>
  13168. <test-commands>
  13169. <command>-fs NAMENODE -touchz NAMENODE/file1</command>
  13170. <command>-fs NAMENODE -touchz NAMENODE/file2</command>
  13171. <command>-fs NAMENODE -touchz NAMENODE/file3</command>
  13172. <command>-fs NAMENODE -touchz NAMENODE/file4</command>
  13173. <command>-fs NAMENODE -chown newowner:newgroup NAMENODE/file* </command>
  13174. <command>-fs NAMENODE -ls -R NAMENODE/file*</command>
  13175. </test-commands>
  13176. <cleanup-commands>
  13177. <command>-fs NAMENODE -rm NAMENODE/file*</command>
  13178. </cleanup-commands>
  13179. <comparators>
  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/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/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/file3</expected-output>
  13191. </comparator>
  13192. <comparator>
  13193. <type>RegexpComparator</type>
  13194. <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>
  13195. </comparator>
  13196. </comparators>
  13197. </test>
  13198. <test> <!-- TESTED -->
  13199. <description>chown: change ownership of multiple directories in Namenode's path using globbing</description>
  13200. <test-commands>
  13201. <command>-fs NAMENODE -mkdir NAMENODE/dir0</command>
  13202. <command>-fs NAMENODE -mkdir NAMENODE/dir0/dir1</command>
  13203. <command>-fs NAMENODE -touchz NAMENODE/dir0/file0</command>
  13204. <command>-fs NAMENODE -touchz NAMENODE/dir0/dir1/file1</command>
  13205. <command>-fs NAMENODE -touchz NAMENODE/dir0/dir1/file2</command>
  13206. <command>-fs NAMENODE -mkdir NAMENODE/dir2</command>
  13207. <command>-fs NAMENODE -mkdir NAMENODE/dir2/dir1</command>
  13208. <command>-fs NAMENODE -touchz NAMENODE/dir2/file0</command>
  13209. <command>-fs NAMENODE -touchz NAMENODE/dir2/dir1/file1</command>
  13210. <command>-fs NAMENODE -touchz NAMENODE/dir2/dir1/file2</command>
  13211. <command>-fs NAMENODE -chown newowner:newgroup NAMENODE/dir*</command>
  13212. <command>-fs NAMENODE -ls -R NAMENODE/dir*</command>
  13213. </test-commands>
  13214. <cleanup-commands>
  13215. <command>-fs NAMENODE -rm -r NAMENODE/dir*</command>
  13216. </cleanup-commands>
  13217. <comparators>
  13218. <comparator>
  13219. <type>RegexpComparator</type>
  13220. <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>
  13221. </comparator>
  13222. <comparator>
  13223. <type>RegexpComparator</type>
  13224. <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>
  13225. </comparator>
  13226. <comparator>
  13227. <type>RegexpComparator</type>
  13228. <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>
  13229. </comparator>
  13230. <comparator>
  13231. <type>RegexpComparator</type>
  13232. <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>
  13233. </comparator>
  13234. <comparator>
  13235. <type>RegexpComparator</type>
  13236. <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>
  13237. </comparator>
  13238. <comparator>
  13239. <type>RegexpComparator</type>
  13240. <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>
  13241. </comparator>
  13242. <comparator>
  13243. <type>RegexpComparator</type>
  13244. <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>
  13245. </comparator>
  13246. <comparator>
  13247. <type>RegexpComparator</type>
  13248. <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>
  13249. </comparator>
  13250. </comparators>
  13251. </test>
  13252. <test> <!-- TESTED -->
  13253. <description>chown: change ownership of multiple files in Namenode's path without globbing</description>
  13254. <test-commands>
  13255. <command>-fs NAMENODE -touchz NAMENODE/file1</command>
  13256. <command>-fs NAMENODE -touchz NAMENODE/file2</command>
  13257. <command>-fs NAMENODE -touchz NAMENODE/file3</command>
  13258. <command>-fs NAMENODE -touchz NAMENODE/file4</command>
  13259. <command>-fs NAMENODE -chown newowner:newgroup NAMENODE/file1 NAMENODE/file2 NAMENODE/file3 NAMENODE/file4 </command>
  13260. <command>-fs NAMENODE -ls -R NAMENODE/file*</command>
  13261. </test-commands>
  13262. <cleanup-commands>
  13263. <command>-fs NAMENODE -rm NAMENODE/file*</command>
  13264. </cleanup-commands>
  13265. <comparators>
  13266. <comparator>
  13267. <type>RegexpComparator</type>
  13268. <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>
  13269. </comparator>
  13270. <comparator>
  13271. <type>RegexpComparator</type>
  13272. <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>
  13273. </comparator>
  13274. <comparator>
  13275. <type>RegexpComparator</type>
  13276. <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>
  13277. </comparator>
  13278. <comparator>
  13279. <type>RegexpComparator</type>
  13280. <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>
  13281. </comparator>
  13282. </comparators>
  13283. </test>
  13284. <test> <!-- TESTED -->
  13285. <description>chown: change ownership of multiple directories in Namenode's path without globbing</description>
  13286. <test-commands>
  13287. <command>-fs NAMENODE -mkdir NAMENODE/dir0</command>
  13288. <command>-fs NAMENODE -mkdir NAMENODE/dir0/dir1</command>
  13289. <command>-fs NAMENODE -touchz NAMENODE/dir0/file0</command>
  13290. <command>-fs NAMENODE -touchz NAMENODE/dir0/dir1/file1</command>
  13291. <command>-fs NAMENODE -touchz NAMENODE/dir0/dir1/file2</command>
  13292. <command>-fs NAMENODE -mkdir NAMENODE/dir2</command>
  13293. <command>-fs NAMENODE -mkdir NAMENODE/dir2/dir1</command>
  13294. <command>-fs NAMENODE -touchz NAMENODE/dir2/file0</command>
  13295. <command>-fs NAMENODE -touchz NAMENODE/dir2/dir1/file1</command>
  13296. <command>-fs NAMENODE -touchz NAMENODE/dir2/dir1/file2</command>
  13297. <command>-fs NAMENODE -chown newowner:newgroup NAMENODE/dir0 NAMENODE/dir2</command>
  13298. <command>-fs NAMENODE -ls -R NAMENODE/dir*</command>
  13299. </test-commands>
  13300. <cleanup-commands>
  13301. <command>-fs NAMENODE -rm -r NAMENODE/dir*</command>
  13302. </cleanup-commands>
  13303. <comparators>
  13304. <comparator>
  13305. <type>RegexpComparator</type>
  13306. <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>
  13307. </comparator>
  13308. <comparator>
  13309. <type>RegexpComparator</type>
  13310. <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>
  13311. </comparator>
  13312. <comparator>
  13313. <type>RegexpComparator</type>
  13314. <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>
  13315. </comparator>
  13316. <comparator>
  13317. <type>RegexpComparator</type>
  13318. <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>
  13319. </comparator>
  13320. <comparator>
  13321. <type>RegexpComparator</type>
  13322. <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>
  13323. </comparator>
  13324. <comparator>
  13325. <type>RegexpComparator</type>
  13326. <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>
  13327. </comparator>
  13328. <comparator>
  13329. <type>RegexpComparator</type>
  13330. <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>
  13331. </comparator>
  13332. <comparator>
  13333. <type>RegexpComparator</type>
  13334. <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>
  13335. </comparator>
  13336. </comparators>
  13337. </test>
  13338. <test> <!-- TESTED -->
  13339. <description>chown: change ownership of multiple directories recursively in Namenode's path using globbing</description>
  13340. <test-commands>
  13341. <command>-fs NAMENODE -mkdir NAMENODE/dir0</command>
  13342. <command>-fs NAMENODE -mkdir NAMENODE/dir0/dir1</command>
  13343. <command>-fs NAMENODE -touchz NAMENODE/dir0/file0</command>
  13344. <command>-fs NAMENODE -touchz NAMENODE/dir0/dir1/file1</command>
  13345. <command>-fs NAMENODE -touchz NAMENODE/dir0/dir1/file2</command>
  13346. <command>-fs NAMENODE -mkdir NAMENODE/dir2</command>
  13347. <command>-fs NAMENODE -mkdir NAMENODE/dir2/dir1</command>
  13348. <command>-fs NAMENODE -touchz NAMENODE/dir2/file0</command>
  13349. <command>-fs NAMENODE -touchz NAMENODE/dir2/dir1/file1</command>
  13350. <command>-fs NAMENODE -touchz NAMENODE/dir2/dir1/file2</command>
  13351. <command>-fs NAMENODE -chown -R newowner:newgroup NAMENODE/dir*</command>
  13352. <command>-fs NAMENODE -ls -R NAMENODE/dir*</command>
  13353. </test-commands>
  13354. <cleanup-commands>
  13355. <command>-fs NAMENODE -rm -r NAMENODE/dir*</command>
  13356. </cleanup-commands>
  13357. <comparators>
  13358. <comparator>
  13359. <type>RegexpComparator</type>
  13360. <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>
  13361. </comparator>
  13362. <comparator>
  13363. <type>RegexpComparator</type>
  13364. <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>
  13365. </comparator>
  13366. <comparator>
  13367. <type>RegexpComparator</type>
  13368. <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>
  13369. </comparator>
  13370. <comparator>
  13371. <type>RegexpComparator</type>
  13372. <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>
  13373. </comparator>
  13374. <comparator>
  13375. <type>RegexpComparator</type>
  13376. <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>
  13377. </comparator>
  13378. <comparator>
  13379. <type>RegexpComparator</type>
  13380. <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>
  13381. </comparator>
  13382. <comparator>
  13383. <type>RegexpComparator</type>
  13384. <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>
  13385. </comparator>
  13386. <comparator>
  13387. <type>RegexpComparator</type>
  13388. <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>
  13389. </comparator>
  13390. </comparators>
  13391. </test>
  13392. <test> <!-- TESTED -->
  13393. <description>chown: change ownership of multiple directories recursively in Namenode's path without globbing</description>
  13394. <test-commands>
  13395. <command>-fs NAMENODE -mkdir NAMENODE/dir0</command>
  13396. <command>-fs NAMENODE -mkdir NAMENODE/dir0/dir1</command>
  13397. <command>-fs NAMENODE -touchz NAMENODE/dir0/file0</command>
  13398. <command>-fs NAMENODE -touchz NAMENODE/dir0/dir1/file1</command>
  13399. <command>-fs NAMENODE -touchz NAMENODE/dir0/dir1/file2</command>
  13400. <command>-fs NAMENODE -mkdir NAMENODE/dir2</command>
  13401. <command>-fs NAMENODE -mkdir NAMENODE/dir2/dir1</command>
  13402. <command>-fs NAMENODE -touchz NAMENODE/dir2/file0</command>
  13403. <command>-fs NAMENODE -touchz NAMENODE/dir2/dir1/file1</command>
  13404. <command>-fs NAMENODE -touchz NAMENODE/dir2/dir1/file2</command>
  13405. <command>-fs NAMENODE -chown -R newowner:newgroup NAMENODE/dir0 NAMENODE/dir2</command>
  13406. <command>-fs NAMENODE -ls -R NAMENODE/dir*</command>
  13407. </test-commands>
  13408. <cleanup-commands>
  13409. <command>-fs NAMENODE -rm -r NAMENODE/dir*</command>
  13410. </cleanup-commands>
  13411. <comparators>
  13412. <comparator>
  13413. <type>RegexpComparator</type>
  13414. <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>
  13415. </comparator>
  13416. <comparator>
  13417. <type>RegexpComparator</type>
  13418. <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>
  13419. </comparator>
  13420. <comparator>
  13421. <type>RegexpComparator</type>
  13422. <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>
  13423. </comparator>
  13424. <comparator>
  13425. <type>RegexpComparator</type>
  13426. <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>
  13427. </comparator>
  13428. <comparator>
  13429. <type>RegexpComparator</type>
  13430. <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>
  13431. </comparator>
  13432. <comparator>
  13433. <type>RegexpComparator</type>
  13434. <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>
  13435. </comparator>
  13436. <comparator>
  13437. <type>RegexpComparator</type>
  13438. <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>
  13439. </comparator>
  13440. <comparator>
  13441. <type>RegexpComparator</type>
  13442. <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>
  13443. </comparator>
  13444. </comparators>
  13445. </test>
  13446. <test> <!-- TESTED -->
  13447. <description>chown: invalid option for owner of file in Namenode's path</description>
  13448. <test-commands>
  13449. <command>-fs NAMENODE -touchz NAMENODE/file1</command>
  13450. <command>-fs NAMENODE -chown %:newgroup NAMENODE/file1</command>
  13451. </test-commands>
  13452. <cleanup-commands>
  13453. <command>-fs NAMENODE -rm NAMENODE/file1</command>
  13454. </cleanup-commands>
  13455. <comparators>
  13456. <comparator>
  13457. <type>RegexpComparator</type>
  13458. <expected-output>^-chown: '%:newgroup' does not match expected pattern for \[owner\]\[:group\].</expected-output>
  13459. </comparator>
  13460. </comparators>
  13461. </test>
  13462. <test> <!-- TESTED -->
  13463. <description>chown: invalid option for group of file in Namenode's path</description>
  13464. <test-commands>
  13465. <command>-fs NAMENODE -touchz NAMENODE/file1</command>
  13466. <command>-fs NAMENODE -chown newowner:% NAMENODE/file1</command>
  13467. </test-commands>
  13468. <cleanup-commands>
  13469. <command>-fs NAMENODE -rm NAMENODE/file1</command>
  13470. </cleanup-commands>
  13471. <comparators>
  13472. <comparator>
  13473. <type>RegexpComparator</type>
  13474. <expected-output>^-chown: 'newowner:%' does not match expected pattern for \[owner\]\[:group\].</expected-output>
  13475. </comparator>
  13476. </comparators>
  13477. </test>
  13478. <!-- Tests for chgrp -->
  13479. <test> <!-- TESTED -->
  13480. <description>chgrp: change group of file in absolute path</description>
  13481. <test-commands>
  13482. <command>-fs NAMENODE -touchz /file1</command>
  13483. <command>-fs NAMENODE -chgrp newgroup /file1</command>
  13484. <command>-fs NAMENODE -ls /file1</command>
  13485. </test-commands>
  13486. <cleanup-commands>
  13487. <command>-fs NAMENODE -rm /file1</command>
  13488. </cleanup-commands>
  13489. <comparators>
  13490. <comparator>
  13491. <type>RegexpComparator</type>
  13492. <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>
  13493. </comparator>
  13494. </comparators>
  13495. </test>
  13496. <test> <!-- TESTED -->
  13497. <description>chgrp: change group of file in relative path</description>
  13498. <test-commands>
  13499. <command>-fs NAMENODE -touchz file1</command>
  13500. <command>-fs NAMENODE -chgrp newgroup file1</command>
  13501. <command>-fs NAMENODE -ls file1</command>
  13502. </test-commands>
  13503. <cleanup-commands>
  13504. <command>-fs NAMENODE -rm file1</command>
  13505. </cleanup-commands>
  13506. <comparators>
  13507. <comparator>
  13508. <type>RegexpComparator</type>
  13509. <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>
  13510. </comparator>
  13511. </comparators>
  13512. </test>
  13513. <test> <!-- TESTED -->
  13514. <description>chgrp: change group of directory in absolute path</description>
  13515. <test-commands>
  13516. <command>-fs NAMENODE -mkdir /dir0</command>
  13517. <command>-fs NAMENODE -mkdir /dir0/dir1</command>
  13518. <command>-fs NAMENODE -touchz /dir0/file0</command>
  13519. <command>-fs NAMENODE -touchz /dir0/dir1/file1</command>
  13520. <command>-fs NAMENODE -touchz /dir0/dir1/file2</command>
  13521. <command>-fs NAMENODE -chgrp newgroup /dir0/dir1</command>
  13522. <command>-fs NAMENODE -ls -R /dir0</command>
  13523. </test-commands>
  13524. <cleanup-commands>
  13525. <command>-fs NAMENODE -rm -r /dir0</command>
  13526. </cleanup-commands>
  13527. <comparators>
  13528. <comparator>
  13529. <type>RegexpComparator</type>
  13530. <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>
  13531. </comparator>
  13532. <comparator>
  13533. <type>RegexpComparator</type>
  13534. <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>
  13535. </comparator>
  13536. <comparator>
  13537. <type>RegexpComparator</type>
  13538. <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>
  13539. </comparator>
  13540. <comparator>
  13541. <type>RegexpComparator</type>
  13542. <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>
  13543. </comparator>
  13544. </comparators>
  13545. </test>
  13546. <test> <!-- TESTED -->
  13547. <description>chgrp: change group of directory in relative path</description>
  13548. <test-commands>
  13549. <command>-fs NAMENODE -mkdir -p dir0</command>
  13550. <command>-fs NAMENODE -mkdir -p dir0/dir1</command>
  13551. <command>-fs NAMENODE -touchz dir0/file0</command>
  13552. <command>-fs NAMENODE -touchz dir0/dir1/file1</command>
  13553. <command>-fs NAMENODE -touchz dir0/dir1/file2</command>
  13554. <command>-fs NAMENODE -chgrp newgroup dir0/dir1</command>
  13555. <command>-fs NAMENODE -ls -R dir0</command>
  13556. </test-commands>
  13557. <cleanup-commands>
  13558. <command>-fs NAMENODE -rm -r dir0</command>
  13559. </cleanup-commands>
  13560. <comparators>
  13561. <comparator>
  13562. <type>RegexpComparator</type>
  13563. <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>
  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. </comparators>
  13578. </test>
  13579. <test> <!-- TESTED -->
  13580. <description>chgrp: change group of directory in absolute path recursively </description>
  13581. <test-commands>
  13582. <command>-fs NAMENODE -mkdir /dir0</command>
  13583. <command>-fs NAMENODE -mkdir /dir0/dir1</command>
  13584. <command>-fs NAMENODE -touchz /dir0/file0</command>
  13585. <command>-fs NAMENODE -touchz /dir0/dir1/file1</command>
  13586. <command>-fs NAMENODE -touchz /dir0/dir1/file2</command>
  13587. <command>-fs NAMENODE -chgrp -R newgroup /dir0/dir1</command>
  13588. <command>-fs NAMENODE -ls -R /dir0</command>
  13589. </test-commands>
  13590. <cleanup-commands>
  13591. <command>-fs NAMENODE -rm -r /dir0</command>
  13592. </cleanup-commands>
  13593. <comparators>
  13594. <comparator>
  13595. <type>RegexpComparator</type>
  13596. <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>
  13597. </comparator>
  13598. <comparator>
  13599. <type>RegexpComparator</type>
  13600. <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>
  13601. </comparator>
  13602. <comparator>
  13603. <type>RegexpComparator</type>
  13604. <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>
  13605. </comparator>
  13606. <comparator>
  13607. <type>RegexpComparator</type>
  13608. <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>
  13609. </comparator>
  13610. </comparators>
  13611. </test>
  13612. <test> <!-- TESTED -->
  13613. <description>chgrp: change group of directory in relative path recursively </description>
  13614. <test-commands>
  13615. <command>-fs NAMENODE -mkdir -p dir0</command>
  13616. <command>-fs NAMENODE -mkdir -p dir0/dir1</command>
  13617. <command>-fs NAMENODE -touchz dir0/file0</command>
  13618. <command>-fs NAMENODE -touchz dir0/dir1/file1</command>
  13619. <command>-fs NAMENODE -touchz dir0/dir1/file2</command>
  13620. <command>-fs NAMENODE -chgrp -R newgroup dir0/dir1</command>
  13621. <command>-fs NAMENODE -ls -R dir0</command>
  13622. </test-commands>
  13623. <cleanup-commands>
  13624. <command>-fs NAMENODE -rm -r dir0</command>
  13625. </cleanup-commands>
  13626. <comparators>
  13627. <comparator>
  13628. <type>RegexpComparator</type>
  13629. <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>
  13630. </comparator>
  13631. <comparator>
  13632. <type>RegexpComparator</type>
  13633. <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>
  13634. </comparator>
  13635. <comparator>
  13636. <type>RegexpComparator</type>
  13637. <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>
  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,}( )*dir0/file0</expected-output>
  13642. </comparator>
  13643. </comparators>
  13644. </test>
  13645. <test> <!-- TESTED -->
  13646. <description>chgrp: change group of non existent file in absolute path</description>
  13647. <test-commands>
  13648. <command>-fs NAMENODE -chgrp newgroup /file1</command>
  13649. </test-commands>
  13650. <cleanup-commands>
  13651. <command>-fs NAMENODE -rm /file1</command>
  13652. </cleanup-commands>
  13653. <comparators>
  13654. <comparator>
  13655. <type>RegexpComparator</type>
  13656. <expected-output>^chgrp: `/file1': No such file or directory</expected-output>
  13657. </comparator>
  13658. </comparators>
  13659. </test>
  13660. <test> <!-- TESTED -->
  13661. <description>chgrp: change group of non existent file in relative path</description>
  13662. <test-commands>
  13663. <command>-fs NAMENODE -chgrp newgroup file1</command>
  13664. </test-commands>
  13665. <cleanup-commands>
  13666. <command>-fs NAMENODE -rm file1</command>
  13667. </cleanup-commands>
  13668. <comparators>
  13669. <comparator>
  13670. <type>RegexpComparator</type>
  13671. <expected-output>^chgrp: `file1': No such file or directory</expected-output>
  13672. </comparator>
  13673. </comparators>
  13674. </test>
  13675. <test> <!-- TESTED -->
  13676. <description>chgrp: change group of multiple files in absolute path using globbing</description>
  13677. <test-commands>
  13678. <command>-fs NAMENODE -touchz /file1</command>
  13679. <command>-fs NAMENODE -touchz /file2</command>
  13680. <command>-fs NAMENODE -touchz /file3</command>
  13681. <command>-fs NAMENODE -touchz /file4</command>
  13682. <command>-fs NAMENODE -chgrp newgroup /file* </command>
  13683. <command>-fs NAMENODE -ls -R /file*</command>
  13684. </test-commands>
  13685. <cleanup-commands>
  13686. <command>-fs NAMENODE -rm /file*</command>
  13687. </cleanup-commands>
  13688. <comparators>
  13689. <comparator>
  13690. <type>RegexpComparator</type>
  13691. <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>
  13692. </comparator>
  13693. <comparator>
  13694. <type>RegexpComparator</type>
  13695. <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>
  13696. </comparator>
  13697. <comparator>
  13698. <type>RegexpComparator</type>
  13699. <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>
  13700. </comparator>
  13701. <comparator>
  13702. <type>RegexpComparator</type>
  13703. <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>
  13704. </comparator>
  13705. </comparators>
  13706. </test>
  13707. <test> <!-- TESTED -->
  13708. <description>chgrp: change group of multiple files in relative path using globbing</description>
  13709. <test-commands>
  13710. <command>-fs NAMENODE -touchz file1</command>
  13711. <command>-fs NAMENODE -touchz file2</command>
  13712. <command>-fs NAMENODE -touchz file3</command>
  13713. <command>-fs NAMENODE -touchz file4</command>
  13714. <command>-fs NAMENODE -chgrp newgroup file* </command>
  13715. <command>-fs NAMENODE -ls -R file*</command>
  13716. </test-commands>
  13717. <cleanup-commands>
  13718. <command>-fs NAMENODE -rm file*</command>
  13719. </cleanup-commands>
  13720. <comparators>
  13721. <comparator>
  13722. <type>RegexpComparator</type>
  13723. <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>
  13724. </comparator>
  13725. <comparator>
  13726. <type>RegexpComparator</type>
  13727. <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>
  13728. </comparator>
  13729. <comparator>
  13730. <type>RegexpComparator</type>
  13731. <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>
  13732. </comparator>
  13733. <comparator>
  13734. <type>RegexpComparator</type>
  13735. <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>
  13736. </comparator>
  13737. </comparators>
  13738. </test>
  13739. <test> <!-- TESTED -->
  13740. <description>chgrp: change group of multiple directories in absolute path using globbing</description>
  13741. <test-commands>
  13742. <command>-fs NAMENODE -mkdir /dir0</command>
  13743. <command>-fs NAMENODE -mkdir /dir0/dir1</command>
  13744. <command>-fs NAMENODE -touchz /dir0/file0</command>
  13745. <command>-fs NAMENODE -touchz /dir0/dir1/file1</command>
  13746. <command>-fs NAMENODE -touchz /dir0/dir1/file2</command>
  13747. <command>-fs NAMENODE -mkdir /dir2</command>
  13748. <command>-fs NAMENODE -mkdir /dir2/dir1</command>
  13749. <command>-fs NAMENODE -touchz /dir2/file0</command>
  13750. <command>-fs NAMENODE -touchz /dir2/dir1/file1</command>
  13751. <command>-fs NAMENODE -touchz /dir2/dir1/file2</command>
  13752. <command>-fs NAMENODE -chgrp newgroup /dir*</command>
  13753. <command>-fs NAMENODE -ls -R /dir*</command>
  13754. </test-commands>
  13755. <cleanup-commands>
  13756. <command>-fs NAMENODE -rm -r /dir*</command>
  13757. </cleanup-commands>
  13758. <comparators>
  13759. <comparator>
  13760. <type>RegexpComparator</type>
  13761. <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>
  13762. </comparator>
  13763. <comparator>
  13764. <type>RegexpComparator</type>
  13765. <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>
  13766. </comparator>
  13767. <comparator>
  13768. <type>RegexpComparator</type>
  13769. <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>
  13770. </comparator>
  13771. <comparator>
  13772. <type>RegexpComparator</type>
  13773. <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>
  13774. </comparator>
  13775. <comparator>
  13776. <type>RegexpComparator</type>
  13777. <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>
  13778. </comparator>
  13779. <comparator>
  13780. <type>RegexpComparator</type>
  13781. <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>
  13782. </comparator>
  13783. <comparator>
  13784. <type>RegexpComparator</type>
  13785. <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>
  13786. </comparator>
  13787. <comparator>
  13788. <type>RegexpComparator</type>
  13789. <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>
  13790. </comparator>
  13791. </comparators>
  13792. </test>
  13793. <test> <!-- TESTED -->
  13794. <description>chgrp: change group of multiple directories in relative path using globbing</description>
  13795. <test-commands>
  13796. <command>-fs NAMENODE -mkdir -p dir0</command>
  13797. <command>-fs NAMENODE -mkdir -p dir0/dir1</command>
  13798. <command>-fs NAMENODE -touchz dir0/file0</command>
  13799. <command>-fs NAMENODE -touchz dir0/dir1/file1</command>
  13800. <command>-fs NAMENODE -touchz dir0/dir1/file2</command>
  13801. <command>-fs NAMENODE -mkdir -p dir2</command>
  13802. <command>-fs NAMENODE -mkdir -p dir2/dir1</command>
  13803. <command>-fs NAMENODE -touchz dir2/file0</command>
  13804. <command>-fs NAMENODE -touchz dir2/dir1/file1</command>
  13805. <command>-fs NAMENODE -touchz dir2/dir1/file2</command>
  13806. <command>-fs NAMENODE -chgrp newgroup dir*</command>
  13807. <command>-fs NAMENODE -ls -R dir*</command>
  13808. </test-commands>
  13809. <cleanup-commands>
  13810. <command>-fs NAMENODE -rm -r dir*</command>
  13811. </cleanup-commands>
  13812. <comparators>
  13813. <comparator>
  13814. <type>RegexpComparator</type>
  13815. <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>
  13816. </comparator>
  13817. <comparator>
  13818. <type>RegexpComparator</type>
  13819. <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>
  13820. </comparator>
  13821. <comparator>
  13822. <type>RegexpComparator</type>
  13823. <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>
  13824. </comparator>
  13825. <comparator>
  13826. <type>RegexpComparator</type>
  13827. <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>
  13828. </comparator>
  13829. <comparator>
  13830. <type>RegexpComparator</type>
  13831. <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>
  13832. </comparator>
  13833. <comparator>
  13834. <type>RegexpComparator</type>
  13835. <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>
  13836. </comparator>
  13837. <comparator>
  13838. <type>RegexpComparator</type>
  13839. <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>
  13840. </comparator>
  13841. <comparator>
  13842. <type>RegexpComparator</type>
  13843. <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>
  13844. </comparator>
  13845. </comparators>
  13846. </test>
  13847. <test> <!-- TESTED -->
  13848. <description>chgrp: change of multiple files in absolute path without globbing</description>
  13849. <test-commands>
  13850. <command>-fs NAMENODE -touchz /file1</command>
  13851. <command>-fs NAMENODE -touchz /file2</command>
  13852. <command>-fs NAMENODE -touchz /file3</command>
  13853. <command>-fs NAMENODE -touchz /file4</command>
  13854. <command>-fs NAMENODE -chgrp newgroup /file1 /file2 /file3 /file4 </command>
  13855. <command>-fs NAMENODE -ls -R /file*</command>
  13856. </test-commands>
  13857. <cleanup-commands>
  13858. <command>-fs NAMENODE -rm /file*</command>
  13859. </cleanup-commands>
  13860. <comparators>
  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,}( )*/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,}( )*/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,}( )*/file3</expected-output>
  13872. </comparator>
  13873. <comparator>
  13874. <type>RegexpComparator</type>
  13875. <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>
  13876. </comparator>
  13877. </comparators>
  13878. </test>
  13879. <test> <!-- TESTED -->
  13880. <description>chgrp: change group of multiple files in relative path without globbing</description>
  13881. <test-commands>
  13882. <command>-fs NAMENODE -touchz file1</command>
  13883. <command>-fs NAMENODE -touchz file2</command>
  13884. <command>-fs NAMENODE -touchz file3</command>
  13885. <command>-fs NAMENODE -touchz file4</command>
  13886. <command>-fs NAMENODE -chgrp newgroup file1 file2 file3 file4 </command>
  13887. <command>-fs NAMENODE -ls -R file*</command>
  13888. </test-commands>
  13889. <cleanup-commands>
  13890. <command>-fs NAMENODE -rm file*</command>
  13891. </cleanup-commands>
  13892. <comparators>
  13893. <comparator>
  13894. <type>RegexpComparator</type>
  13895. <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>
  13896. </comparator>
  13897. <comparator>
  13898. <type>RegexpComparator</type>
  13899. <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>
  13900. </comparator>
  13901. <comparator>
  13902. <type>RegexpComparator</type>
  13903. <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>
  13904. </comparator>
  13905. <comparator>
  13906. <type>RegexpComparator</type>
  13907. <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>
  13908. </comparator>
  13909. </comparators>
  13910. </test>
  13911. <test> <!-- TESTED -->
  13912. <description>chgrp: change group of multiple directories in absolute path without globbing</description>
  13913. <test-commands>
  13914. <command>-fs NAMENODE -mkdir /dir0</command>
  13915. <command>-fs NAMENODE -mkdir /dir0/dir1</command>
  13916. <command>-fs NAMENODE -touchz /dir0/file0</command>
  13917. <command>-fs NAMENODE -touchz /dir0/dir1/file1</command>
  13918. <command>-fs NAMENODE -touchz /dir0/dir1/file2</command>
  13919. <command>-fs NAMENODE -mkdir /dir2</command>
  13920. <command>-fs NAMENODE -mkdir /dir2/dir1</command>
  13921. <command>-fs NAMENODE -touchz /dir2/file0</command>
  13922. <command>-fs NAMENODE -touchz /dir2/dir1/file1</command>
  13923. <command>-fs NAMENODE -touchz /dir2/dir1/file2</command>
  13924. <command>-fs NAMENODE -chgrp newgroup /dir0 /dir2</command>
  13925. <command>-fs NAMENODE -ls -R /dir*</command>
  13926. </test-commands>
  13927. <cleanup-commands>
  13928. <command>-fs NAMENODE -rm -r /dir*</command>
  13929. </cleanup-commands>
  13930. <comparators>
  13931. <comparator>
  13932. <type>RegexpComparator</type>
  13933. <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>
  13934. </comparator>
  13935. <comparator>
  13936. <type>RegexpComparator</type>
  13937. <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>
  13938. </comparator>
  13939. <comparator>
  13940. <type>RegexpComparator</type>
  13941. <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>
  13942. </comparator>
  13943. <comparator>
  13944. <type>RegexpComparator</type>
  13945. <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>
  13946. </comparator>
  13947. <comparator>
  13948. <type>RegexpComparator</type>
  13949. <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>
  13950. </comparator>
  13951. <comparator>
  13952. <type>RegexpComparator</type>
  13953. <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>
  13954. </comparator>
  13955. <comparator>
  13956. <type>RegexpComparator</type>
  13957. <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>
  13958. </comparator>
  13959. <comparator>
  13960. <type>RegexpComparator</type>
  13961. <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>
  13962. </comparator>
  13963. </comparators>
  13964. </test>
  13965. <test> <!-- TESTED -->
  13966. <description>chgrp: change group of multiple directories in relative path without globbing</description>
  13967. <test-commands>
  13968. <command>-fs NAMENODE -mkdir -p dir0</command>
  13969. <command>-fs NAMENODE -mkdir -p dir0/dir1</command>
  13970. <command>-fs NAMENODE -touchz dir0/file0</command>
  13971. <command>-fs NAMENODE -touchz dir0/dir1/file1</command>
  13972. <command>-fs NAMENODE -touchz dir0/dir1/file2</command>
  13973. <command>-fs NAMENODE -mkdir -p dir2</command>
  13974. <command>-fs NAMENODE -mkdir -p dir2/dir1</command>
  13975. <command>-fs NAMENODE -touchz dir2/file0</command>
  13976. <command>-fs NAMENODE -touchz dir2/dir1/file1</command>
  13977. <command>-fs NAMENODE -touchz dir2/dir1/file2</command>
  13978. <command>-fs NAMENODE -chgrp newgroup dir0 dir2</command>
  13979. <command>-fs NAMENODE -ls -R dir*</command>
  13980. </test-commands>
  13981. <cleanup-commands>
  13982. <command>-fs NAMENODE -rm -r dir*</command>
  13983. </cleanup-commands>
  13984. <comparators>
  13985. <comparator>
  13986. <type>RegexpComparator</type>
  13987. <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>
  13988. </comparator>
  13989. <comparator>
  13990. <type>RegexpComparator</type>
  13991. <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>
  13992. </comparator>
  13993. <comparator>
  13994. <type>RegexpComparator</type>
  13995. <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>
  13996. </comparator>
  13997. <comparator>
  13998. <type>RegexpComparator</type>
  13999. <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>
  14000. </comparator>
  14001. <comparator>
  14002. <type>RegexpComparator</type>
  14003. <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>
  14004. </comparator>
  14005. <comparator>
  14006. <type>RegexpComparator</type>
  14007. <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>
  14008. </comparator>
  14009. <comparator>
  14010. <type>RegexpComparator</type>
  14011. <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>
  14012. </comparator>
  14013. <comparator>
  14014. <type>RegexpComparator</type>
  14015. <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>
  14016. </comparator>
  14017. </comparators>
  14018. </test>
  14019. <test> <!-- TESTED -->
  14020. <description>chgrp: change group of multiple directories recursively in absolute path using globbing</description>
  14021. <test-commands>
  14022. <command>-fs NAMENODE -mkdir /dir0</command>
  14023. <command>-fs NAMENODE -mkdir /dir0/dir1</command>
  14024. <command>-fs NAMENODE -touchz /dir0/file0</command>
  14025. <command>-fs NAMENODE -touchz /dir0/dir1/file1</command>
  14026. <command>-fs NAMENODE -touchz /dir0/dir1/file2</command>
  14027. <command>-fs NAMENODE -mkdir /dir2</command>
  14028. <command>-fs NAMENODE -mkdir /dir2/dir1</command>
  14029. <command>-fs NAMENODE -touchz /dir2/file0</command>
  14030. <command>-fs NAMENODE -touchz /dir2/dir1/file1</command>
  14031. <command>-fs NAMENODE -touchz /dir2/dir1/file2</command>
  14032. <command>-fs NAMENODE -chgrp -R newgroup /dir*</command>
  14033. <command>-fs NAMENODE -ls -R /dir*</command>
  14034. </test-commands>
  14035. <cleanup-commands>
  14036. <command>-fs NAMENODE -rm -r /dir*</command>
  14037. </cleanup-commands>
  14038. <comparators>
  14039. <comparator>
  14040. <type>RegexpComparator</type>
  14041. <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>
  14042. </comparator>
  14043. <comparator>
  14044. <type>RegexpComparator</type>
  14045. <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>
  14046. </comparator>
  14047. <comparator>
  14048. <type>RegexpComparator</type>
  14049. <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>
  14050. </comparator>
  14051. <comparator>
  14052. <type>RegexpComparator</type>
  14053. <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>
  14054. </comparator>
  14055. <comparator>
  14056. <type>RegexpComparator</type>
  14057. <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>
  14058. </comparator>
  14059. <comparator>
  14060. <type>RegexpComparator</type>
  14061. <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>
  14062. </comparator>
  14063. <comparator>
  14064. <type>RegexpComparator</type>
  14065. <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>
  14066. </comparator>
  14067. <comparator>
  14068. <type>RegexpComparator</type>
  14069. <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>
  14070. </comparator>
  14071. </comparators>
  14072. </test>
  14073. <test> <!-- TESTED -->
  14074. <description>chgrp: change group of multiple directories recursively in relative path using globbing</description>
  14075. <test-commands>
  14076. <command>-fs NAMENODE -mkdir -p dir0</command>
  14077. <command>-fs NAMENODE -mkdir -p dir0/dir1</command>
  14078. <command>-fs NAMENODE -touchz dir0/file0</command>
  14079. <command>-fs NAMENODE -touchz dir0/dir1/file1</command>
  14080. <command>-fs NAMENODE -touchz dir0/dir1/file2</command>
  14081. <command>-fs NAMENODE -mkdir -p dir2</command>
  14082. <command>-fs NAMENODE -mkdir -p dir2/dir1</command>
  14083. <command>-fs NAMENODE -touchz dir2/file0</command>
  14084. <command>-fs NAMENODE -touchz dir2/dir1/file1</command>
  14085. <command>-fs NAMENODE -touchz dir2/dir1/file2</command>
  14086. <command>-fs NAMENODE -chgrp -R newgroup dir*</command>
  14087. <command>-fs NAMENODE -ls -R dir*</command>
  14088. </test-commands>
  14089. <cleanup-commands>
  14090. <command>-fs NAMENODE -rm -r dir*</command>
  14091. </cleanup-commands>
  14092. <comparators>
  14093. <comparator>
  14094. <type>RegexpComparator</type>
  14095. <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>
  14096. </comparator>
  14097. <comparator>
  14098. <type>RegexpComparator</type>
  14099. <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>
  14100. </comparator>
  14101. <comparator>
  14102. <type>RegexpComparator</type>
  14103. <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>
  14104. </comparator>
  14105. <comparator>
  14106. <type>RegexpComparator</type>
  14107. <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>
  14108. </comparator>
  14109. <comparator>
  14110. <type>RegexpComparator</type>
  14111. <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>
  14112. </comparator>
  14113. <comparator>
  14114. <type>RegexpComparator</type>
  14115. <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>
  14116. </comparator>
  14117. <comparator>
  14118. <type>RegexpComparator</type>
  14119. <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>
  14120. </comparator>
  14121. <comparator>
  14122. <type>RegexpComparator</type>
  14123. <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>
  14124. </comparator>
  14125. </comparators>
  14126. </test>
  14127. <test> <!-- TESTED -->
  14128. <description>chgrp: change group of multiple directories recursively in absolute path without globbing</description>
  14129. <test-commands>
  14130. <command>-fs NAMENODE -mkdir /dir0</command>
  14131. <command>-fs NAMENODE -mkdir /dir0/dir1</command>
  14132. <command>-fs NAMENODE -touchz /dir0/file0</command>
  14133. <command>-fs NAMENODE -touchz /dir0/dir1/file1</command>
  14134. <command>-fs NAMENODE -touchz /dir0/dir1/file2</command>
  14135. <command>-fs NAMENODE -mkdir /dir2</command>
  14136. <command>-fs NAMENODE -mkdir /dir2/dir1</command>
  14137. <command>-fs NAMENODE -touchz /dir2/file0</command>
  14138. <command>-fs NAMENODE -touchz /dir2/dir1/file1</command>
  14139. <command>-fs NAMENODE -touchz /dir2/dir1/file2</command>
  14140. <command>-fs NAMENODE -chgrp -R newgroup /dir0 /dir2</command>
  14141. <command>-fs NAMENODE -ls -R /dir*</command>
  14142. </test-commands>
  14143. <cleanup-commands>
  14144. <command>-fs NAMENODE -rm -r /dir*</command>
  14145. </cleanup-commands>
  14146. <comparators>
  14147. <comparator>
  14148. <type>RegexpComparator</type>
  14149. <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>
  14150. </comparator>
  14151. <comparator>
  14152. <type>RegexpComparator</type>
  14153. <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>
  14154. </comparator>
  14155. <comparator>
  14156. <type>RegexpComparator</type>
  14157. <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>
  14158. </comparator>
  14159. <comparator>
  14160. <type>RegexpComparator</type>
  14161. <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>
  14162. </comparator>
  14163. <comparator>
  14164. <type>RegexpComparator</type>
  14165. <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>
  14166. </comparator>
  14167. <comparator>
  14168. <type>RegexpComparator</type>
  14169. <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>
  14170. </comparator>
  14171. <comparator>
  14172. <type>RegexpComparator</type>
  14173. <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>
  14174. </comparator>
  14175. <comparator>
  14176. <type>RegexpComparator</type>
  14177. <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>
  14178. </comparator>
  14179. </comparators>
  14180. </test>
  14181. <test> <!-- TESTED -->
  14182. <description>chgrp: change group of multiple directories recursively in relative path without globbing</description>
  14183. <test-commands>
  14184. <command>-fs NAMENODE -mkdir -p dir0</command>
  14185. <command>-fs NAMENODE -mkdir -p dir0/dir1</command>
  14186. <command>-fs NAMENODE -touchz dir0/file0</command>
  14187. <command>-fs NAMENODE -touchz dir0/dir1/file1</command>
  14188. <command>-fs NAMENODE -touchz dir0/dir1/file2</command>
  14189. <command>-fs NAMENODE -mkdir -p dir2</command>
  14190. <command>-fs NAMENODE -mkdir -p dir2/dir1</command>
  14191. <command>-fs NAMENODE -touchz dir2/file0</command>
  14192. <command>-fs NAMENODE -touchz dir2/dir1/file1</command>
  14193. <command>-fs NAMENODE -touchz dir2/dir1/file2</command>
  14194. <command>-fs NAMENODE -chgrp -R newgroup dir0 dir2</command>
  14195. <command>-fs NAMENODE -ls -R dir*</command>
  14196. </test-commands>
  14197. <cleanup-commands>
  14198. <command>-fs NAMENODE -rm -r dir*</command>
  14199. </cleanup-commands>
  14200. <comparators>
  14201. <comparator>
  14202. <type>RegexpComparator</type>
  14203. <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>
  14204. </comparator>
  14205. <comparator>
  14206. <type>RegexpComparator</type>
  14207. <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>
  14208. </comparator>
  14209. <comparator>
  14210. <type>RegexpComparator</type>
  14211. <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>
  14212. </comparator>
  14213. <comparator>
  14214. <type>RegexpComparator</type>
  14215. <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>
  14216. </comparator>
  14217. <comparator>
  14218. <type>RegexpComparator</type>
  14219. <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>
  14220. </comparator>
  14221. <comparator>
  14222. <type>RegexpComparator</type>
  14223. <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>
  14224. </comparator>
  14225. <comparator>
  14226. <type>RegexpComparator</type>
  14227. <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>
  14228. </comparator>
  14229. <comparator>
  14230. <type>RegexpComparator</type>
  14231. <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>
  14232. </comparator>
  14233. </comparators>
  14234. </test>
  14235. <test> <!-- TESTED -->
  14236. <description>chgrp: invalid option for group of file in absolute path</description>
  14237. <test-commands>
  14238. <command>-fs NAMENODE -touchz /file1</command>
  14239. <command>-fs NAMENODE -chgrp % /file1</command>
  14240. </test-commands>
  14241. <cleanup-commands>
  14242. <command>-fs NAMENODE -rm /file1</command>
  14243. </cleanup-commands>
  14244. <comparators>
  14245. <comparator>
  14246. <type>RegexpComparator</type>
  14247. <expected-output>^-chgrp: '%' does not match expected pattern for group</expected-output>
  14248. </comparator>
  14249. </comparators>
  14250. </test>
  14251. <test> <!-- TESTED -->
  14252. <description>chgrp: invalid option for group of file in relative path</description>
  14253. <test-commands>
  14254. <command>-fs NAMENODE -touchz file1</command>
  14255. <command>-fs NAMENODE -chgrp % file1</command>
  14256. </test-commands>
  14257. <cleanup-commands>
  14258. <command>-fs NAMENODE -rm file1</command>
  14259. </cleanup-commands>
  14260. <comparators>
  14261. <comparator>
  14262. <type>RegexpComparator</type>
  14263. <expected-output>^-chgrp: '%' does not match expected pattern for group</expected-output>
  14264. </comparator>
  14265. </comparators>
  14266. </test>
  14267. <test> <!-- TESTED -->
  14268. <description>chgrp: change group of file in hdfs:// path</description>
  14269. <test-commands>
  14270. <command>-fs NAMENODE -touchz hdfs:///file1</command>
  14271. <command>-fs NAMENODE -chgrp newgroup hdfs:///file1</command>
  14272. <command>-fs NAMENODE -ls hdfs:///file1</command>
  14273. </test-commands>
  14274. <cleanup-commands>
  14275. <command>-fs NAMENODE -rm hdfs:///file1</command>
  14276. </cleanup-commands>
  14277. <comparators>
  14278. <comparator>
  14279. <type>RegexpComparator</type>
  14280. <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>
  14281. </comparator>
  14282. </comparators>
  14283. </test>
  14284. <test> <!-- TESTED -->
  14285. <description>chgrp: change group of directory in hdfs:// path</description>
  14286. <test-commands>
  14287. <command>-fs NAMENODE -mkdir hdfs:///dir0</command>
  14288. <command>-fs NAMENODE -mkdir hdfs:///dir0/dir1</command>
  14289. <command>-fs NAMENODE -touchz hdfs:///dir0/file0</command>
  14290. <command>-fs NAMENODE -touchz hdfs:///dir0/dir1/file1</command>
  14291. <command>-fs NAMENODE -touchz hdfs:///dir0/dir1/file2</command>
  14292. <command>-fs NAMENODE -chgrp newgroup hdfs:///dir0/dir1</command>
  14293. <command>-fs NAMENODE -ls -R hdfs:///dir0</command>
  14294. </test-commands>
  14295. <cleanup-commands>
  14296. <command>-fs NAMENODE -rm -r hdfs:///dir0</command>
  14297. </cleanup-commands>
  14298. <comparators>
  14299. <comparator>
  14300. <type>RegexpComparator</type>
  14301. <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>
  14302. </comparator>
  14303. <comparator>
  14304. <type>RegexpComparator</type>
  14305. <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>
  14306. </comparator>
  14307. <comparator>
  14308. <type>RegexpComparator</type>
  14309. <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>
  14310. </comparator>
  14311. <comparator>
  14312. <type>RegexpComparator</type>
  14313. <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>
  14314. </comparator>
  14315. </comparators>
  14316. </test>
  14317. <test> <!-- TESTED -->
  14318. <description>chgrp: change group of directory in hdfs:// path recursively </description>
  14319. <test-commands>
  14320. <command>-fs NAMENODE -mkdir hdfs:///dir0</command>
  14321. <command>-fs NAMENODE -mkdir hdfs:///dir0/dir1</command>
  14322. <command>-fs NAMENODE -touchz hdfs:///dir0/file0</command>
  14323. <command>-fs NAMENODE -touchz hdfs:///dir0/dir1/file1</command>
  14324. <command>-fs NAMENODE -touchz hdfs:///dir0/dir1/file2</command>
  14325. <command>-fs NAMENODE -chgrp -R newgroup hdfs:///dir0/dir1</command>
  14326. <command>-fs NAMENODE -ls -R hdfs:///dir0</command>
  14327. </test-commands>
  14328. <cleanup-commands>
  14329. <command>-fs NAMENODE -rm -r hdfs:///dir0</command>
  14330. </cleanup-commands>
  14331. <comparators>
  14332. <comparator>
  14333. <type>RegexpComparator</type>
  14334. <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>
  14335. </comparator>
  14336. <comparator>
  14337. <type>RegexpComparator</type>
  14338. <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>
  14339. </comparator>
  14340. <comparator>
  14341. <type>RegexpComparator</type>
  14342. <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>
  14343. </comparator>
  14344. <comparator>
  14345. <type>RegexpComparator</type>
  14346. <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>
  14347. </comparator>
  14348. </comparators>
  14349. </test>
  14350. <test> <!-- TESTED -->
  14351. <description>chgrp: change group of non existent file in hdfs:// path</description>
  14352. <test-commands>
  14353. <command>-fs NAMENODE -chgrp newgroup hdfs:///file1</command>
  14354. </test-commands>
  14355. <cleanup-commands>
  14356. <command>-fs NAMENODE -rm hdfs:///file1</command>
  14357. </cleanup-commands>
  14358. <comparators>
  14359. <comparator>
  14360. <type>RegexpComparator</type>
  14361. <expected-output>^chgrp: `hdfs:///file1': No such file or directory</expected-output>
  14362. </comparator>
  14363. </comparators>
  14364. </test>
  14365. <test> <!-- TESTED -->
  14366. <description>chgrp: change group of multiple files in hdfs:// path using globbing</description>
  14367. <test-commands>
  14368. <command>-fs NAMENODE -touchz hdfs:///file1</command>
  14369. <command>-fs NAMENODE -touchz hdfs:///file2</command>
  14370. <command>-fs NAMENODE -touchz hdfs:///file3</command>
  14371. <command>-fs NAMENODE -touchz hdfs:///file4</command>
  14372. <command>-fs NAMENODE -chgrp newgroup hdfs:///file* </command>
  14373. <command>-fs NAMENODE -ls -R hdfs:///file*</command>
  14374. </test-commands>
  14375. <cleanup-commands>
  14376. <command>-fs NAMENODE -rm hdfs:///file*</command>
  14377. </cleanup-commands>
  14378. <comparators>
  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:///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:///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:///file3</expected-output>
  14390. </comparator>
  14391. <comparator>
  14392. <type>RegexpComparator</type>
  14393. <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>
  14394. </comparator>
  14395. </comparators>
  14396. </test>
  14397. <test> <!-- TESTED -->
  14398. <description>chgrp: change group of multiple directories in hdfs:// path using globbing</description>
  14399. <test-commands>
  14400. <command>-fs NAMENODE -mkdir hdfs:///dir0</command>
  14401. <command>-fs NAMENODE -mkdir hdfs:///dir0/dir1</command>
  14402. <command>-fs NAMENODE -touchz hdfs:///dir0/file0</command>
  14403. <command>-fs NAMENODE -touchz hdfs:///dir0/dir1/file1</command>
  14404. <command>-fs NAMENODE -touchz hdfs:///dir0/dir1/file2</command>
  14405. <command>-fs NAMENODE -mkdir hdfs:///dir2</command>
  14406. <command>-fs NAMENODE -mkdir hdfs:///dir2/dir1</command>
  14407. <command>-fs NAMENODE -touchz hdfs:///dir2/file0</command>
  14408. <command>-fs NAMENODE -touchz hdfs:///dir2/dir1/file1</command>
  14409. <command>-fs NAMENODE -touchz hdfs:///dir2/dir1/file2</command>
  14410. <command>-fs NAMENODE -chgrp newgroup hdfs:///dir*</command>
  14411. <command>-fs NAMENODE -ls -R hdfs:///dir*</command>
  14412. </test-commands>
  14413. <cleanup-commands>
  14414. <command>-fs NAMENODE -rm -r hdfs:///dir*</command>
  14415. </cleanup-commands>
  14416. <comparators>
  14417. <comparator>
  14418. <type>RegexpComparator</type>
  14419. <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>
  14420. </comparator>
  14421. <comparator>
  14422. <type>RegexpComparator</type>
  14423. <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>
  14424. </comparator>
  14425. <comparator>
  14426. <type>RegexpComparator</type>
  14427. <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>
  14428. </comparator>
  14429. <comparator>
  14430. <type>RegexpComparator</type>
  14431. <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>
  14432. </comparator>
  14433. <comparator>
  14434. <type>RegexpComparator</type>
  14435. <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>
  14436. </comparator>
  14437. <comparator>
  14438. <type>RegexpComparator</type>
  14439. <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>
  14440. </comparator>
  14441. <comparator>
  14442. <type>RegexpComparator</type>
  14443. <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>
  14444. </comparator>
  14445. <comparator>
  14446. <type>RegexpComparator</type>
  14447. <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>
  14448. </comparator>
  14449. </comparators>
  14450. </test>
  14451. <test> <!-- TESTED -->
  14452. <description>chgrp: change of multiple files in hdfs:// path without globbing</description>
  14453. <test-commands>
  14454. <command>-fs NAMENODE -touchz hdfs:///file1</command>
  14455. <command>-fs NAMENODE -touchz hdfs:///file2</command>
  14456. <command>-fs NAMENODE -touchz hdfs:///file3</command>
  14457. <command>-fs NAMENODE -touchz hdfs:///file4</command>
  14458. <command>-fs NAMENODE -chgrp newgroup hdfs:///file1 hdfs:///file2 hdfs:///file3 hdfs:///file4 </command>
  14459. <command>-fs NAMENODE -ls -R hdfs:///file*</command>
  14460. </test-commands>
  14461. <cleanup-commands>
  14462. <command>-fs NAMENODE -rm hdfs:///file*</command>
  14463. </cleanup-commands>
  14464. <comparators>
  14465. <comparator>
  14466. <type>RegexpComparator</type>
  14467. <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>
  14468. </comparator>
  14469. <comparator>
  14470. <type>RegexpComparator</type>
  14471. <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>
  14472. </comparator>
  14473. <comparator>
  14474. <type>RegexpComparator</type>
  14475. <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>
  14476. </comparator>
  14477. <comparator>
  14478. <type>RegexpComparator</type>
  14479. <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>
  14480. </comparator>
  14481. </comparators>
  14482. </test>
  14483. <test> <!-- TESTED -->
  14484. <description>chgrp: change group of multiple directories in hdfs:// path without globbing</description>
  14485. <test-commands>
  14486. <command>-fs NAMENODE -mkdir hdfs:///dir0</command>
  14487. <command>-fs NAMENODE -mkdir hdfs:///dir0/dir1</command>
  14488. <command>-fs NAMENODE -touchz hdfs:///dir0/file0</command>
  14489. <command>-fs NAMENODE -touchz hdfs:///dir0/dir1/file1</command>
  14490. <command>-fs NAMENODE -touchz hdfs:///dir0/dir1/file2</command>
  14491. <command>-fs NAMENODE -mkdir hdfs:///dir2</command>
  14492. <command>-fs NAMENODE -mkdir hdfs:///dir2/dir1</command>
  14493. <command>-fs NAMENODE -touchz hdfs:///dir2/file0</command>
  14494. <command>-fs NAMENODE -touchz hdfs:///dir2/dir1/file1</command>
  14495. <command>-fs NAMENODE -touchz hdfs:///dir2/dir1/file2</command>
  14496. <command>-fs NAMENODE -chgrp newgroup hdfs:///dir0 hdfs:///dir2</command>
  14497. <command>-fs NAMENODE -ls -R hdfs:///dir*</command>
  14498. </test-commands>
  14499. <cleanup-commands>
  14500. <command>-fs NAMENODE -rm -r hdfs:///dir*</command>
  14501. </cleanup-commands>
  14502. <comparators>
  14503. <comparator>
  14504. <type>RegexpComparator</type>
  14505. <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>
  14506. </comparator>
  14507. <comparator>
  14508. <type>RegexpComparator</type>
  14509. <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>
  14510. </comparator>
  14511. <comparator>
  14512. <type>RegexpComparator</type>
  14513. <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>
  14514. </comparator>
  14515. <comparator>
  14516. <type>RegexpComparator</type>
  14517. <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>
  14518. </comparator>
  14519. <comparator>
  14520. <type>RegexpComparator</type>
  14521. <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>
  14522. </comparator>
  14523. <comparator>
  14524. <type>RegexpComparator</type>
  14525. <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>
  14526. </comparator>
  14527. <comparator>
  14528. <type>RegexpComparator</type>
  14529. <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>
  14530. </comparator>
  14531. <comparator>
  14532. <type>RegexpComparator</type>
  14533. <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>
  14534. </comparator>
  14535. </comparators>
  14536. </test>
  14537. <test> <!-- TESTED -->
  14538. <description>chgrp: change group of multiple directories recursively in hdfs:// path using globbing</description>
  14539. <test-commands>
  14540. <command>-fs NAMENODE -mkdir hdfs:///dir0</command>
  14541. <command>-fs NAMENODE -mkdir hdfs:///dir0/dir1</command>
  14542. <command>-fs NAMENODE -touchz hdfs:///dir0/file0</command>
  14543. <command>-fs NAMENODE -touchz hdfs:///dir0/dir1/file1</command>
  14544. <command>-fs NAMENODE -touchz hdfs:///dir0/dir1/file2</command>
  14545. <command>-fs NAMENODE -mkdir hdfs:///dir2</command>
  14546. <command>-fs NAMENODE -mkdir hdfs:///dir2/dir1</command>
  14547. <command>-fs NAMENODE -touchz hdfs:///dir2/file0</command>
  14548. <command>-fs NAMENODE -touchz hdfs:///dir2/dir1/file1</command>
  14549. <command>-fs NAMENODE -touchz hdfs:///dir2/dir1/file2</command>
  14550. <command>-fs NAMENODE -chgrp -R newgroup hdfs:///dir*</command>
  14551. <command>-fs NAMENODE -ls -R hdfs:///dir*</command>
  14552. </test-commands>
  14553. <cleanup-commands>
  14554. <command>-fs NAMENODE -rm -r hdfs:///dir*</command>
  14555. </cleanup-commands>
  14556. <comparators>
  14557. <comparator>
  14558. <type>RegexpComparator</type>
  14559. <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>
  14560. </comparator>
  14561. <comparator>
  14562. <type>RegexpComparator</type>
  14563. <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>
  14564. </comparator>
  14565. <comparator>
  14566. <type>RegexpComparator</type>
  14567. <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>
  14568. </comparator>
  14569. <comparator>
  14570. <type>RegexpComparator</type>
  14571. <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>
  14572. </comparator>
  14573. <comparator>
  14574. <type>RegexpComparator</type>
  14575. <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>
  14576. </comparator>
  14577. <comparator>
  14578. <type>RegexpComparator</type>
  14579. <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>
  14580. </comparator>
  14581. <comparator>
  14582. <type>RegexpComparator</type>
  14583. <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>
  14584. </comparator>
  14585. <comparator>
  14586. <type>RegexpComparator</type>
  14587. <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>
  14588. </comparator>
  14589. </comparators>
  14590. </test>
  14591. <test> <!-- TESTED -->
  14592. <description>chgrp: change group of multiple directories recursively in hdfs:// path without globbing</description>
  14593. <test-commands>
  14594. <command>-fs NAMENODE -mkdir hdfs:///dir0</command>
  14595. <command>-fs NAMENODE -mkdir hdfs:///dir0/dir1</command>
  14596. <command>-fs NAMENODE -touchz hdfs:///dir0/file0</command>
  14597. <command>-fs NAMENODE -touchz hdfs:///dir0/dir1/file1</command>
  14598. <command>-fs NAMENODE -touchz hdfs:///dir0/dir1/file2</command>
  14599. <command>-fs NAMENODE -mkdir hdfs:///dir2</command>
  14600. <command>-fs NAMENODE -mkdir hdfs:///dir2/dir1</command>
  14601. <command>-fs NAMENODE -touchz hdfs:///dir2/file0</command>
  14602. <command>-fs NAMENODE -touchz hdfs:///dir2/dir1/file1</command>
  14603. <command>-fs NAMENODE -touchz hdfs:///dir2/dir1/file2</command>
  14604. <command>-fs NAMENODE -chgrp -R newgroup hdfs:///dir0 hdfs:///dir2</command>
  14605. <command>-fs NAMENODE -ls -R hdfs:///dir*</command>
  14606. </test-commands>
  14607. <cleanup-commands>
  14608. <command>-fs NAMENODE -rm -r hdfs:///dir*</command>
  14609. </cleanup-commands>
  14610. <comparators>
  14611. <comparator>
  14612. <type>RegexpComparator</type>
  14613. <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>
  14614. </comparator>
  14615. <comparator>
  14616. <type>RegexpComparator</type>
  14617. <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>
  14618. </comparator>
  14619. <comparator>
  14620. <type>RegexpComparator</type>
  14621. <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>
  14622. </comparator>
  14623. <comparator>
  14624. <type>RegexpComparator</type>
  14625. <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>
  14626. </comparator>
  14627. <comparator>
  14628. <type>RegexpComparator</type>
  14629. <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>
  14630. </comparator>
  14631. <comparator>
  14632. <type>RegexpComparator</type>
  14633. <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>
  14634. </comparator>
  14635. <comparator>
  14636. <type>RegexpComparator</type>
  14637. <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>
  14638. </comparator>
  14639. <comparator>
  14640. <type>RegexpComparator</type>
  14641. <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>
  14642. </comparator>
  14643. </comparators>
  14644. </test>
  14645. <test> <!-- TESTED -->
  14646. <description>chgrp: invalid option for group of file in hdfs:// path</description>
  14647. <test-commands>
  14648. <command>-fs NAMENODE -touchz hdfs:///file1</command>
  14649. <command>-fs NAMENODE -chgrp % hdfs:///file1</command>
  14650. </test-commands>
  14651. <cleanup-commands>
  14652. <command>-fs NAMENODE -rm hdfs:///file1</command>
  14653. </cleanup-commands>
  14654. <comparators>
  14655. <comparator>
  14656. <type>RegexpComparator</type>
  14657. <expected-output>^-chgrp: '%' does not match expected pattern for group</expected-output>
  14658. </comparator>
  14659. </comparators>
  14660. </test>
  14661. <!-- Tests for chgrp -->
  14662. <test> <!-- TESTED -->
  14663. <description>chgrp: change group of file in Namenode's path</description>
  14664. <test-commands>
  14665. <command>-fs NAMENODE -touchz NAMENODE/file1</command>
  14666. <command>-fs NAMENODE -chgrp newgroup NAMENODE/file1</command>
  14667. <command>-fs NAMENODE -ls NAMENODE/file1</command>
  14668. </test-commands>
  14669. <cleanup-commands>
  14670. <command>-fs NAMENODE -rm NAMENODE/file1</command>
  14671. </cleanup-commands>
  14672. <comparators>
  14673. <comparator>
  14674. <type>RegexpComparator</type>
  14675. <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>
  14676. </comparator>
  14677. </comparators>
  14678. </test>
  14679. <test> <!-- TESTED -->
  14680. <description>chgrp: change group of directory in Namenode's path</description>
  14681. <test-commands>
  14682. <command>-fs NAMENODE -mkdir NAMENODE/dir0</command>
  14683. <command>-fs NAMENODE -mkdir NAMENODE/dir0/dir1</command>
  14684. <command>-fs NAMENODE -touchz NAMENODE/dir0/file0</command>
  14685. <command>-fs NAMENODE -touchz NAMENODE/dir0/dir1/file1</command>
  14686. <command>-fs NAMENODE -touchz NAMENODE/dir0/dir1/file2</command>
  14687. <command>-fs NAMENODE -chgrp newgroup NAMENODE/dir0/dir1</command>
  14688. <command>-fs NAMENODE -ls -R NAMENODE/dir0</command>
  14689. </test-commands>
  14690. <cleanup-commands>
  14691. <command>-fs NAMENODE -rm -r NAMENODE/dir0</command>
  14692. </cleanup-commands>
  14693. <comparators>
  14694. <comparator>
  14695. <type>RegexpComparator</type>
  14696. <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>
  14697. </comparator>
  14698. <comparator>
  14699. <type>RegexpComparator</type>
  14700. <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>
  14701. </comparator>
  14702. <comparator>
  14703. <type>RegexpComparator</type>
  14704. <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>
  14705. </comparator>
  14706. <comparator>
  14707. <type>RegexpComparator</type>
  14708. <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>
  14709. </comparator>
  14710. </comparators>
  14711. </test>
  14712. <test> <!-- TESTED -->
  14713. <description>chgrp: change group of directory in Namenode's path recursively </description>
  14714. <test-commands>
  14715. <command>-fs NAMENODE -mkdir NAMENODE/dir0</command>
  14716. <command>-fs NAMENODE -mkdir NAMENODE/dir0/dir1</command>
  14717. <command>-fs NAMENODE -touchz NAMENODE/dir0/file0</command>
  14718. <command>-fs NAMENODE -touchz NAMENODE/dir0/dir1/file1</command>
  14719. <command>-fs NAMENODE -touchz NAMENODE/dir0/dir1/file2</command>
  14720. <command>-fs NAMENODE -chgrp -R newgroup NAMENODE/dir0/dir1</command>
  14721. <command>-fs NAMENODE -ls -R NAMENODE/dir0</command>
  14722. </test-commands>
  14723. <cleanup-commands>
  14724. <command>-fs NAMENODE -rm -r NAMENODE/dir0</command>
  14725. </cleanup-commands>
  14726. <comparators>
  14727. <comparator>
  14728. <type>RegexpComparator</type>
  14729. <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>
  14730. </comparator>
  14731. <comparator>
  14732. <type>RegexpComparator</type>
  14733. <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>
  14734. </comparator>
  14735. <comparator>
  14736. <type>RegexpComparator</type>
  14737. <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>
  14738. </comparator>
  14739. <comparator>
  14740. <type>RegexpComparator</type>
  14741. <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>
  14742. </comparator>
  14743. </comparators>
  14744. </test>
  14745. <test> <!-- TESTED -->
  14746. <description>chgrp: change group of non existent file in Namenode's path</description>
  14747. <test-commands>
  14748. <command>-fs NAMENODE -chgrp newgroup NAMENODE/file1</command>
  14749. </test-commands>
  14750. <cleanup-commands>
  14751. <command>-fs NAMENODE -rm NAMENODE/file1</command>
  14752. </cleanup-commands>
  14753. <comparators>
  14754. <comparator>
  14755. <type>RegexpComparator</type>
  14756. <expected-output>^chgrp: `NAMENODE/file1': No such file or directory</expected-output>
  14757. </comparator>
  14758. </comparators>
  14759. </test>
  14760. <test> <!-- TESTED -->
  14761. <description>chgrp: change group of multiple files in Namenode's path using globbing</description>
  14762. <test-commands>
  14763. <command>-fs NAMENODE -touchz NAMENODE/file1</command>
  14764. <command>-fs NAMENODE -touchz NAMENODE/file2</command>
  14765. <command>-fs NAMENODE -touchz NAMENODE/file3</command>
  14766. <command>-fs NAMENODE -touchz NAMENODE/file4</command>
  14767. <command>-fs NAMENODE -chgrp newgroup NAMENODE/file* </command>
  14768. <command>-fs NAMENODE -ls -R NAMENODE/file*</command>
  14769. </test-commands>
  14770. <cleanup-commands>
  14771. <command>-fs NAMENODE -rm NAMENODE/file*</command>
  14772. </cleanup-commands>
  14773. <comparators>
  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/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/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/file3</expected-output>
  14785. </comparator>
  14786. <comparator>
  14787. <type>RegexpComparator</type>
  14788. <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>
  14789. </comparator>
  14790. </comparators>
  14791. </test>
  14792. <test> <!-- TESTED -->
  14793. <description>chgrp: change group of multiple directories in Namenode's path using globbing</description>
  14794. <test-commands>
  14795. <command>-fs NAMENODE -mkdir NAMENODE/dir0</command>
  14796. <command>-fs NAMENODE -mkdir NAMENODE/dir0/dir1</command>
  14797. <command>-fs NAMENODE -touchz NAMENODE/dir0/file0</command>
  14798. <command>-fs NAMENODE -touchz NAMENODE/dir0/dir1/file1</command>
  14799. <command>-fs NAMENODE -touchz NAMENODE/dir0/dir1/file2</command>
  14800. <command>-fs NAMENODE -mkdir NAMENODE/dir2</command>
  14801. <command>-fs NAMENODE -mkdir NAMENODE/dir2/dir1</command>
  14802. <command>-fs NAMENODE -touchz NAMENODE/dir2/file0</command>
  14803. <command>-fs NAMENODE -touchz NAMENODE/dir2/dir1/file1</command>
  14804. <command>-fs NAMENODE -touchz NAMENODE/dir2/dir1/file2</command>
  14805. <command>-fs NAMENODE -chgrp newgroup NAMENODE/dir*</command>
  14806. <command>-fs NAMENODE -ls -R NAMENODE/dir*</command>
  14807. </test-commands>
  14808. <cleanup-commands>
  14809. <command>-fs NAMENODE -rm -r NAMENODE/dir*</command>
  14810. </cleanup-commands>
  14811. <comparators>
  14812. <comparator>
  14813. <type>RegexpComparator</type>
  14814. <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>
  14815. </comparator>
  14816. <comparator>
  14817. <type>RegexpComparator</type>
  14818. <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>
  14819. </comparator>
  14820. <comparator>
  14821. <type>RegexpComparator</type>
  14822. <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>
  14823. </comparator>
  14824. <comparator>
  14825. <type>RegexpComparator</type>
  14826. <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>
  14827. </comparator>
  14828. <comparator>
  14829. <type>RegexpComparator</type>
  14830. <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>
  14831. </comparator>
  14832. <comparator>
  14833. <type>RegexpComparator</type>
  14834. <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>
  14835. </comparator>
  14836. <comparator>
  14837. <type>RegexpComparator</type>
  14838. <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>
  14839. </comparator>
  14840. <comparator>
  14841. <type>RegexpComparator</type>
  14842. <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>
  14843. </comparator>
  14844. </comparators>
  14845. </test>
  14846. <test> <!-- TESTED -->
  14847. <description>chgrp: change of multiple files in Namenode's path without globbing</description>
  14848. <test-commands>
  14849. <command>-fs NAMENODE -touchz NAMENODE/file1</command>
  14850. <command>-fs NAMENODE -touchz NAMENODE/file2</command>
  14851. <command>-fs NAMENODE -touchz NAMENODE/file3</command>
  14852. <command>-fs NAMENODE -touchz NAMENODE/file4</command>
  14853. <command>-fs NAMENODE -chgrp newgroup NAMENODE/file1 NAMENODE/file2 NAMENODE/file3 NAMENODE/file4 </command>
  14854. <command>-fs NAMENODE -ls -R NAMENODE/file*</command>
  14855. </test-commands>
  14856. <cleanup-commands>
  14857. <command>-fs NAMENODE -rm NAMENODE/file*</command>
  14858. </cleanup-commands>
  14859. <comparators>
  14860. <comparator>
  14861. <type>RegexpComparator</type>
  14862. <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>
  14863. </comparator>
  14864. <comparator>
  14865. <type>RegexpComparator</type>
  14866. <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>
  14867. </comparator>
  14868. <comparator>
  14869. <type>RegexpComparator</type>
  14870. <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>
  14871. </comparator>
  14872. <comparator>
  14873. <type>RegexpComparator</type>
  14874. <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>
  14875. </comparator>
  14876. </comparators>
  14877. </test>
  14878. <test> <!-- TESTED -->
  14879. <description>chgrp: change group of multiple directories in Namenode's path without globbing</description>
  14880. <test-commands>
  14881. <command>-fs NAMENODE -mkdir NAMENODE/dir0</command>
  14882. <command>-fs NAMENODE -mkdir NAMENODE/dir0/dir1</command>
  14883. <command>-fs NAMENODE -touchz NAMENODE/dir0/file0</command>
  14884. <command>-fs NAMENODE -touchz NAMENODE/dir0/dir1/file1</command>
  14885. <command>-fs NAMENODE -touchz NAMENODE/dir0/dir1/file2</command>
  14886. <command>-fs NAMENODE -mkdir NAMENODE/dir2</command>
  14887. <command>-fs NAMENODE -mkdir NAMENODE/dir2/dir1</command>
  14888. <command>-fs NAMENODE -touchz NAMENODE/dir2/file0</command>
  14889. <command>-fs NAMENODE -touchz NAMENODE/dir2/dir1/file1</command>
  14890. <command>-fs NAMENODE -touchz NAMENODE/dir2/dir1/file2</command>
  14891. <command>-fs NAMENODE -chgrp newgroup NAMENODE/dir0 NAMENODE/dir2</command>
  14892. <command>-fs NAMENODE -ls -R NAMENODE/dir*</command>
  14893. </test-commands>
  14894. <cleanup-commands>
  14895. <command>-fs NAMENODE -rm -r NAMENODE/dir*</command>
  14896. </cleanup-commands>
  14897. <comparators>
  14898. <comparator>
  14899. <type>RegexpComparator</type>
  14900. <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>
  14901. </comparator>
  14902. <comparator>
  14903. <type>RegexpComparator</type>
  14904. <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>
  14905. </comparator>
  14906. <comparator>
  14907. <type>RegexpComparator</type>
  14908. <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>
  14909. </comparator>
  14910. <comparator>
  14911. <type>RegexpComparator</type>
  14912. <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>
  14913. </comparator>
  14914. <comparator>
  14915. <type>RegexpComparator</type>
  14916. <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>
  14917. </comparator>
  14918. <comparator>
  14919. <type>RegexpComparator</type>
  14920. <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>
  14921. </comparator>
  14922. <comparator>
  14923. <type>RegexpComparator</type>
  14924. <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>
  14925. </comparator>
  14926. <comparator>
  14927. <type>RegexpComparator</type>
  14928. <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>
  14929. </comparator>
  14930. </comparators>
  14931. </test>
  14932. <test> <!-- TESTED -->
  14933. <description>chgrp: change group of multiple directories recursively in Namenode's path using globbing</description>
  14934. <test-commands>
  14935. <command>-fs NAMENODE -mkdir NAMENODE/dir0</command>
  14936. <command>-fs NAMENODE -mkdir NAMENODE/dir0/dir1</command>
  14937. <command>-fs NAMENODE -touchz NAMENODE/dir0/file0</command>
  14938. <command>-fs NAMENODE -touchz NAMENODE/dir0/dir1/file1</command>
  14939. <command>-fs NAMENODE -touchz NAMENODE/dir0/dir1/file2</command>
  14940. <command>-fs NAMENODE -mkdir NAMENODE/dir2</command>
  14941. <command>-fs NAMENODE -mkdir NAMENODE/dir2/dir1</command>
  14942. <command>-fs NAMENODE -touchz NAMENODE/dir2/file0</command>
  14943. <command>-fs NAMENODE -touchz NAMENODE/dir2/dir1/file1</command>
  14944. <command>-fs NAMENODE -touchz NAMENODE/dir2/dir1/file2</command>
  14945. <command>-fs NAMENODE -chgrp -R newgroup NAMENODE/dir*</command>
  14946. <command>-fs NAMENODE -ls -R NAMENODE/dir*</command>
  14947. </test-commands>
  14948. <cleanup-commands>
  14949. <command>-fs NAMENODE -rm -r NAMENODE/dir*</command>
  14950. </cleanup-commands>
  14951. <comparators>
  14952. <comparator>
  14953. <type>RegexpComparator</type>
  14954. <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>
  14955. </comparator>
  14956. <comparator>
  14957. <type>RegexpComparator</type>
  14958. <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>
  14959. </comparator>
  14960. <comparator>
  14961. <type>RegexpComparator</type>
  14962. <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>
  14963. </comparator>
  14964. <comparator>
  14965. <type>RegexpComparator</type>
  14966. <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>
  14967. </comparator>
  14968. <comparator>
  14969. <type>RegexpComparator</type>
  14970. <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>
  14971. </comparator>
  14972. <comparator>
  14973. <type>RegexpComparator</type>
  14974. <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>
  14975. </comparator>
  14976. <comparator>
  14977. <type>RegexpComparator</type>
  14978. <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>
  14979. </comparator>
  14980. <comparator>
  14981. <type>RegexpComparator</type>
  14982. <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>
  14983. </comparator>
  14984. </comparators>
  14985. </test>
  14986. <test> <!-- TESTED -->
  14987. <description>chgrp: change group of multiple directories recursively in Namenode's path without globbing</description>
  14988. <test-commands>
  14989. <command>-fs NAMENODE -mkdir NAMENODE/dir0</command>
  14990. <command>-fs NAMENODE -mkdir NAMENODE/dir0/dir1</command>
  14991. <command>-fs NAMENODE -touchz NAMENODE/dir0/file0</command>
  14992. <command>-fs NAMENODE -touchz NAMENODE/dir0/dir1/file1</command>
  14993. <command>-fs NAMENODE -touchz NAMENODE/dir0/dir1/file2</command>
  14994. <command>-fs NAMENODE -mkdir NAMENODE/dir2</command>
  14995. <command>-fs NAMENODE -mkdir NAMENODE/dir2/dir1</command>
  14996. <command>-fs NAMENODE -touchz NAMENODE/dir2/file0</command>
  14997. <command>-fs NAMENODE -touchz NAMENODE/dir2/dir1/file1</command>
  14998. <command>-fs NAMENODE -touchz NAMENODE/dir2/dir1/file2</command>
  14999. <command>-fs NAMENODE -chgrp -R newgroup NAMENODE/dir0 NAMENODE/dir2</command>
  15000. <command>-fs NAMENODE -ls -R NAMENODE/dir*</command>
  15001. </test-commands>
  15002. <cleanup-commands>
  15003. <command>-fs NAMENODE -rm -r NAMENODE/dir*</command>
  15004. </cleanup-commands>
  15005. <comparators>
  15006. <comparator>
  15007. <type>RegexpComparator</type>
  15008. <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>
  15009. </comparator>
  15010. <comparator>
  15011. <type>RegexpComparator</type>
  15012. <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>
  15013. </comparator>
  15014. <comparator>
  15015. <type>RegexpComparator</type>
  15016. <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>
  15017. </comparator>
  15018. <comparator>
  15019. <type>RegexpComparator</type>
  15020. <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>
  15021. </comparator>
  15022. <comparator>
  15023. <type>RegexpComparator</type>
  15024. <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>
  15025. </comparator>
  15026. <comparator>
  15027. <type>RegexpComparator</type>
  15028. <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>
  15029. </comparator>
  15030. <comparator>
  15031. <type>RegexpComparator</type>
  15032. <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>
  15033. </comparator>
  15034. <comparator>
  15035. <type>RegexpComparator</type>
  15036. <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>
  15037. </comparator>
  15038. </comparators>
  15039. </test>
  15040. <test> <!-- TESTED -->
  15041. <description>chgrp: invalid option for group of file in Namenode's path</description>
  15042. <test-commands>
  15043. <command>-fs NAMENODE -touchz NAMENODE/file1</command>
  15044. <command>-fs NAMENODE -chgrp % NAMENODE/file1</command>
  15045. </test-commands>
  15046. <cleanup-commands>
  15047. <command>-fs NAMENODE -rm NAMENODE/file1</command>
  15048. </cleanup-commands>
  15049. <comparators>
  15050. <comparator>
  15051. <type>RegexpComparator</type>
  15052. <expected-output>^-chgrp: '%' does not match expected pattern for group</expected-output>
  15053. </comparator>
  15054. </comparators>
  15055. </test>
  15056. <test> <!--Tested -->
  15057. <description>help: help for dfsadmin report</description>
  15058. <test-commands>
  15059. <dfs-admin-command>-fs NAMENODE -help report</dfs-admin-command>
  15060. </test-commands>
  15061. <cleanup-commands>
  15062. </cleanup-commands>
  15063. <comparators>
  15064. <comparator>
  15065. <type>RegexpComparator</type>
  15066. <expected-output>^-report \[-live\] \[-dead\] \[-decommissioning\]:(.)*</expected-output>
  15067. </comparator>
  15068. <comparator>
  15069. <type>RegexpComparator</type>
  15070. <expected-output>^[ \t]*Reports basic filesystem information and statistics.( )*</expected-output>
  15071. </comparator>
  15072. </comparators>
  15073. </test>
  15074. <test> <!--Tested -->
  15075. <description>help: help for dfsadmin safemode</description>
  15076. <test-commands>
  15077. <dfs-admin-command>-fs NAMENODE -help safemode</dfs-admin-command>
  15078. </test-commands>
  15079. <cleanup-commands>
  15080. </cleanup-commands>
  15081. <comparators>
  15082. <comparator>
  15083. <type>RegexpComparator</type>
  15084. <expected-output>^-safemode &lt;enter\|leave\|get\|wait&gt;:( |\t)*Safe mode maintenance command.( )*</expected-output>
  15085. </comparator>
  15086. <comparator>
  15087. <type>RegexpComparator</type>
  15088. <expected-output>^( |\t)*Safe mode is a Namenode state in which it( )*</expected-output>
  15089. </comparator>
  15090. <comparator>
  15091. <type>RegexpComparator</type>
  15092. <expected-output>^( |\t)*1.( )*does not accept changes to the name space \(read-only\)( )*</expected-output>
  15093. </comparator>
  15094. <comparator>
  15095. <type>RegexpComparator</type>
  15096. <expected-output>^( |\t)*2.( )*does not replicate or delete blocks.( )*</expected-output>
  15097. </comparator>
  15098. <comparator>
  15099. <type>RegexpComparator</type>
  15100. <expected-output>^( |\t)*Safe mode is entered automatically at Namenode startup, and( )*</expected-output>
  15101. </comparator>
  15102. <comparator>
  15103. <type>RegexpComparator</type>
  15104. <expected-output>^( |\t)*leaves safe mode automatically when the configured minimum( )*</expected-output>
  15105. </comparator>
  15106. <comparator>
  15107. <type>RegexpComparator</type>
  15108. <expected-output>^( |\t)*percentage of blocks satisfies the minimum replication( )*</expected-output>
  15109. </comparator>
  15110. <comparator>
  15111. <type>RegexpComparator</type>
  15112. <expected-output>^( |\t)*condition. Safe mode can also be entered manually, but then( )*</expected-output>
  15113. </comparator>
  15114. <comparator>
  15115. <type>RegexpComparator</type>
  15116. <expected-output>^( |\t)*it can only be turned off manually as well.( )*</expected-output>
  15117. </comparator>
  15118. </comparators>
  15119. </test>
  15120. <test> <!--Tested -->
  15121. <description>help: help for dfsadmin refreshNodes</description>
  15122. <test-commands>
  15123. <dfs-admin-command>-fs NAMENODE -help refreshNodes</dfs-admin-command>
  15124. </test-commands>
  15125. <cleanup-commands>
  15126. </cleanup-commands>
  15127. <comparators>
  15128. <comparator>
  15129. <type>RegexpComparator</type>
  15130. <expected-output>^-refreshNodes:( |\t)*Updates the namenode with the set of datanodes allowed to connect to the namenode.( )*</expected-output>
  15131. </comparator>
  15132. <comparator>
  15133. <type>RegexpComparator</type>
  15134. <expected-output>^( |\t)*Namenode re-reads datanode hostnames from the file defined by( )*</expected-output>
  15135. </comparator>
  15136. <comparator>
  15137. <type>RegexpComparator</type>
  15138. <expected-output>^( |\t)*dfs.hosts, dfs.hosts.exclude configuration parameters.( )*</expected-output>
  15139. </comparator>
  15140. <comparator>
  15141. <type>RegexpComparator</type>
  15142. <expected-output>^( |\t)*Hosts defined in dfs.hosts are the datanodes that are part of( )*</expected-output>
  15143. </comparator>
  15144. <comparator>
  15145. <type>RegexpComparator</type>
  15146. <expected-output>^( |\t)*the cluster. If there are entries in dfs.hosts, only the hosts( )*</expected-output>
  15147. </comparator>
  15148. <comparator>
  15149. <type>RegexpComparator</type>
  15150. <expected-output>^( |\t)*in it are allowed to register with the namenode.( )*</expected-output>
  15151. </comparator>
  15152. <comparator>
  15153. <type>RegexpComparator</type>
  15154. <expected-output>^( |\t)*Entries in dfs.hosts.exclude are datanodes that need to be( )*</expected-output>
  15155. </comparator>
  15156. <comparator>
  15157. <type>RegexpComparator</type>
  15158. <expected-output>^( |\t)*decommissioned. Datanodes complete decommissioning when ( )*</expected-output>
  15159. </comparator>
  15160. <comparator>
  15161. <type>RegexpComparator</type>
  15162. <expected-output>^( |\t)*all the replicas from them are replicated to other datanodes.( )*</expected-output>
  15163. </comparator>
  15164. <comparator>
  15165. <type>RegexpComparator</type>
  15166. <expected-output>^( |\t)*Decommissioned nodes are not automatically shutdown and( )*</expected-output>
  15167. </comparator>
  15168. <comparator>
  15169. <type>RegexpComparator</type>
  15170. <expected-output>^( |\t)*are not chosen for writing new replicas.( )*</expected-output>
  15171. </comparator>
  15172. </comparators>
  15173. </test>
  15174. <test> <!--Tested -->
  15175. <description>help: help for dfsadmin finalizeUpgrade</description>
  15176. <test-commands>
  15177. <dfs-admin-command>-fs NAMENODE -help finalizeUpgrade</dfs-admin-command>
  15178. </test-commands>
  15179. <cleanup-commands>
  15180. </cleanup-commands>
  15181. <comparators>
  15182. <comparator>
  15183. <type>RegexpComparator</type>
  15184. <expected-output>^-finalizeUpgrade:( )*Finalize upgrade of HDFS.( )*</expected-output>
  15185. </comparator>
  15186. <comparator>
  15187. <type>RegexpComparator</type>
  15188. <expected-output>^( |\t)*Datanodes delete their previous version working directories,( )*</expected-output>
  15189. </comparator>
  15190. <comparator>
  15191. <type>RegexpComparator</type>
  15192. <expected-output>^( |\t)*followed by Namenode doing the same.( )*</expected-output>
  15193. </comparator>
  15194. <comparator>
  15195. <type>RegexpComparator</type>
  15196. <expected-output>^( |\t)*This completes the upgrade process.( )*</expected-output>
  15197. </comparator>
  15198. </comparators>
  15199. </test>
  15200. <test> <!--Tested -->
  15201. <description>help: help for dfsadmin metasave</description>
  15202. <test-commands>
  15203. <dfs-admin-command>-fs NAMENODE -help metasave</dfs-admin-command>
  15204. </test-commands>
  15205. <cleanup-commands>
  15206. </cleanup-commands>
  15207. <comparators>
  15208. <comparator>
  15209. <type>RegexpComparator</type>
  15210. <expected-output>^-metasave &lt;filename&gt;:( |\t)*Save Namenode's primary data structures( )*</expected-output>
  15211. </comparator>
  15212. <comparator>
  15213. <type>RegexpComparator</type>
  15214. <expected-output>^( |\t)*to &lt;filename&gt; in the directory specified by hadoop.log.dir property.( )*</expected-output>
  15215. </comparator>
  15216. <comparator>
  15217. <type>RegexpComparator</type>
  15218. <expected-output>^( |\t)*&lt;filename&gt; will contain one line for each of the following( )*</expected-output>
  15219. </comparator>
  15220. <comparator>
  15221. <type>RegexpComparator</type>
  15222. <expected-output>^( |\t)*1. Datanodes heart beating with Namenode( )*</expected-output>
  15223. </comparator>
  15224. <comparator>
  15225. <type>RegexpComparator</type>
  15226. <expected-output>^( |\t)*2. Blocks waiting to be replicated( )*</expected-output>
  15227. </comparator>
  15228. <comparator>
  15229. <type>RegexpComparator</type>
  15230. <expected-output>^( |\t)*3. Blocks currrently being replicated( )*</expected-output>
  15231. </comparator>
  15232. <comparator>
  15233. <type>RegexpComparator</type>
  15234. <expected-output>^( |\t)*4. Blocks waiting to be deleted( )*</expected-output>
  15235. </comparator>
  15236. </comparators>
  15237. </test>
  15238. <test> <!--Tested -->
  15239. <description>help: help for dfsadmin setQuota</description>
  15240. <test-commands>
  15241. <dfs-admin-command>-fs NAMENODE -help setQuota</dfs-admin-command>
  15242. </test-commands>
  15243. <cleanup-commands>
  15244. </cleanup-commands>
  15245. <comparators>
  15246. <comparator>
  15247. <type>RegexpComparator</type>
  15248. <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>
  15249. </comparator>
  15250. <comparator>
  15251. <type>RegexpComparator</type>
  15252. <expected-output>^( |\t)*The directory quota is a long integer that puts a hard limit( )*</expected-output>
  15253. </comparator>
  15254. <comparator>
  15255. <type>RegexpComparator</type>
  15256. <expected-output>^( |\t)*on the number of names in the directory tree( )*</expected-output>
  15257. </comparator>
  15258. <comparator>
  15259. <type>RegexpComparator</type>
  15260. <expected-output>^( |\t)*For each directory, attempt to set the quota. An error will be reported if( )*</expected-output>
  15261. </comparator>
  15262. <comparator>
  15263. <type>RegexpComparator</type>
  15264. <expected-output>^( |\t)*1. N is not a positive integer, or( )*</expected-output>
  15265. </comparator>
  15266. <comparator>
  15267. <type>RegexpComparator</type>
  15268. <expected-output>^( |\t)*2. User is not an administrator, or( )*</expected-output>
  15269. </comparator>
  15270. <comparator>
  15271. <type>RegexpComparator</type>
  15272. <expected-output>^( |\t)*3. The directory does not exist or is a file.( )*</expected-output>
  15273. </comparator>
  15274. </comparators>
  15275. </test>
  15276. <test> <!--Tested -->
  15277. <description>help: help for dfsadmin clrQuota</description>
  15278. <test-commands>
  15279. <dfs-admin-command>-fs NAMENODE -help clrQuota</dfs-admin-command>
  15280. </test-commands>
  15281. <cleanup-commands>
  15282. </cleanup-commands>
  15283. <comparators>
  15284. <comparator>
  15285. <type>RegexpComparator</type>
  15286. <expected-output>^-clrQuota &lt;dirname&gt;...&lt;dirname&gt;: Clear the quota for each directory &lt;dirName&gt;.( )*</expected-output>
  15287. </comparator>
  15288. <comparator>
  15289. <type>RegexpComparator</type>
  15290. <expected-output>^( |\t)*For each directory, attempt to clear the quota. An error will be reported if( )*</expected-output>
  15291. </comparator>
  15292. <comparator>
  15293. <type>RegexpComparator</type>
  15294. <expected-output>^( |\t)*1. the directory does not exist or is a file, or( )*</expected-output>
  15295. </comparator>
  15296. <comparator>
  15297. <type>RegexpComparator</type>
  15298. <expected-output>^( |\t)*2. user is not an administrator.( )*</expected-output>
  15299. </comparator>
  15300. <comparator>
  15301. <type>RegexpComparator</type>
  15302. <expected-output>^( |\t)*It does not fault if the directory has no quota.( )*</expected-output>
  15303. </comparator>
  15304. </comparators>
  15305. </test>
  15306. <test> <!--Tested -->
  15307. <description>help: help for dfsadmin setSpaceQuota</description>
  15308. <test-commands>
  15309. <dfs-admin-command>-fs NAMENODE -help setSpaceQuota</dfs-admin-command>
  15310. </test-commands>
  15311. <cleanup-commands>
  15312. </cleanup-commands>
  15313. <comparators>
  15314. <comparator>
  15315. <type>RegexpComparator</type>
  15316. <expected-output>^-setSpaceQuota &lt;quota&gt; \[-storageType &lt;storagetype&gt;\] &lt;dirname&gt;...&lt;dirname&gt;: Set the space quota &lt;quota&gt; for each directory &lt;dirName&gt;.( )*</expected-output>
  15317. </comparator>
  15318. <comparator>
  15319. <type>RegexpComparator</type>
  15320. <expected-output>^( |\t)*The space quota is a long integer that puts a hard limit( )*</expected-output>
  15321. </comparator>
  15322. <comparator>
  15323. <type>RegexpComparator</type>
  15324. <expected-output>^( |\t)*on the total size of all the files under the directory tree.( )*</expected-output>
  15325. </comparator>
  15326. <comparator>
  15327. <type>RegexpComparator</type>
  15328. <expected-output>^( |\t)*2. user is not an administrator, or( )*</expected-output>
  15329. </comparator>
  15330. <comparator>
  15331. <type>RegexpComparator</type>
  15332. <expected-output>^( |\t)*3. the directory does not exist or is a file.( )*</expected-output>
  15333. </comparator>
  15334. <comparator>
  15335. <type>RegexpComparator</type>
  15336. <expected-output>^( |\t)*The storage type specific quota is set when -storageType option is specified.( )*</expected-output>
  15337. </comparator>
  15338. </comparators>
  15339. </test>
  15340. <test> <!--Tested -->
  15341. <description>help: help for dfsadmin clrSpaceQuota</description>
  15342. <test-commands>
  15343. <dfs-admin-command>-fs NAMENODE -help clrSpaceQuota</dfs-admin-command>
  15344. </test-commands>
  15345. <cleanup-commands>
  15346. </cleanup-commands>
  15347. <comparators>
  15348. <comparator>
  15349. <type>RegexpComparator</type>
  15350. <expected-output>^-clrSpaceQuota \[-storageType &lt;storagetype&gt;\] &lt;dirname&gt;...&lt;dirname&gt;: Clear the space quota for each directory &lt;dirName&gt;.( )*</expected-output>
  15351. </comparator>
  15352. <comparator>
  15353. <type>RegexpComparator</type>
  15354. <expected-output>^( |\t)*For each directory, attempt to clear the quota. An error will be reported if( )*</expected-output>
  15355. </comparator>
  15356. <comparator>
  15357. <type>RegexpComparator</type>
  15358. <expected-output>^( |\t)*1. the directory does not exist or is a file, or( )*</expected-output>
  15359. </comparator>
  15360. <comparator>
  15361. <type>RegexpComparator</type>
  15362. <expected-output>^( |\t)*2. user is not an administrator.( )*</expected-output>
  15363. </comparator>
  15364. <comparator>
  15365. <type>RegexpComparator</type>
  15366. <expected-output>^( |\t)*It does not fault if the directory has no quota.( )*</expected-output>
  15367. </comparator>
  15368. <comparator>
  15369. <type>RegexpComparator</type>
  15370. <expected-output>^( |\t)*The storage type specific quota is cleared when -storageType option is specified.( )*</expected-output>
  15371. </comparator>
  15372. </comparators>
  15373. </test>
  15374. <test> <!--Tested -->
  15375. <description>help: help for dfsadmin refreshServiceAcl</description>
  15376. <test-commands>
  15377. <dfs-admin-command>-fs NAMENODE -help refreshServiceAcl</dfs-admin-command>
  15378. </test-commands>
  15379. <cleanup-commands>
  15380. </cleanup-commands>
  15381. <comparators>
  15382. <comparator>
  15383. <type>RegexpComparator</type>
  15384. <expected-output>^-refreshServiceAcl: Reload the service-level authorization policy file( )*</expected-output>
  15385. </comparator>
  15386. <comparator>
  15387. <type>RegexpComparator</type>
  15388. <expected-output>^( |\t)*Namenode will reload the authorization policy file.( )*</expected-output>
  15389. </comparator>
  15390. </comparators>
  15391. </test>
  15392. <test> <!--Tested -->
  15393. <description>help: help for dfsadmin help</description>
  15394. <test-commands>
  15395. <dfs-admin-command>-fs NAMENODE -help help</dfs-admin-command>
  15396. </test-commands>
  15397. <cleanup-commands>
  15398. </cleanup-commands>
  15399. <comparators>
  15400. <comparator>
  15401. <type>RegexpComparator</type>
  15402. <expected-output>^-help \[cmd\]:( |\t)*Displays help for the given command or all commands if none( )*</expected-output>
  15403. </comparator>
  15404. <comparator>
  15405. <type>RegexpComparator</type>
  15406. <expected-output>^( |\t)*is specified.( )*</expected-output>
  15407. </comparator>
  15408. </comparators>
  15409. </test>
  15410. <test> <!--Tested -->
  15411. <description>verifying error messages for quota commands - setting quota on a file</description>
  15412. <test-commands>
  15413. <command>-fs NAMENODE -mkdir /test </command>
  15414. <command>-fs NAMENODE -touchz /test/file1 </command>
  15415. <dfs-admin-command>-fs NAMENODE -setQuota 1 /test/file1 </dfs-admin-command>
  15416. </test-commands>
  15417. <cleanup-commands>
  15418. <dfs-admin-command>-fs NAMENODE -setQuota 5 /test </dfs-admin-command>
  15419. <!-- Same directory will be used in the next test -->
  15420. </cleanup-commands>
  15421. <comparators>
  15422. <comparator>
  15423. <type>SubstringComparator</type>
  15424. <expected-output>setQuota: `/test/file1': Is not a directory</expected-output>
  15425. </comparator>
  15426. </comparators>
  15427. </test>
  15428. <test> <!--Tested -->
  15429. <description>verifying error messages for quota commands - setting quota on non-existing file</description>
  15430. <test-commands>
  15431. <dfs-admin-command>-fs NAMENODE -setSpaceQuota 1g /test1 </dfs-admin-command>
  15432. </test-commands>
  15433. <cleanup-commands>
  15434. <!-- Same directory will be used in the next test -->
  15435. </cleanup-commands>
  15436. <comparators>
  15437. <comparator>
  15438. <type>SubstringComparator</type>
  15439. <expected-output>setSpaceQuota: Directory does not exist: /test1</expected-output>
  15440. </comparator>
  15441. </comparators>
  15442. </test>
  15443. <test> <!--Tested -->
  15444. <description>verifying error messages for quota commands - exceeding quota</description>
  15445. <test-commands>
  15446. <dfs-admin-command>-fs NAMENODE -setQuota 3 /test </dfs-admin-command>
  15447. <command>-fs NAMENODE -touchz /test/file0 </command>
  15448. <command>-fs NAMENODE -mkdir /test/test1 </command>
  15449. </test-commands>
  15450. <cleanup-commands>
  15451. <!-- Same directory(/test) will be used in the next test -->
  15452. </cleanup-commands>
  15453. <comparators>
  15454. <comparator>
  15455. <type>SubstringComparator</type>
  15456. <expected-output>The NameSpace quota (directories and files) of directory /test is exceeded</expected-output>
  15457. </comparator>
  15458. </comparators>
  15459. </test>
  15460. <test> <!--Tested -->
  15461. <description>verifying error messages for quota commands - setting not valid quota</description>
  15462. <test-commands>
  15463. <dfs-admin-command>-fs NAMENODE -setQuota 0 /test </dfs-admin-command>
  15464. </test-commands>
  15465. <cleanup-commands>
  15466. <!-- Same directory will be used in the next test -->
  15467. </cleanup-commands>
  15468. <comparators>
  15469. <comparator>
  15470. <type>SubstringComparator</type>
  15471. <expected-output>Invalid values for quota : 0</expected-output>
  15472. </comparator>
  15473. </comparators>
  15474. </test>
  15475. <test> <!--Tested -->
  15476. <description>verifying error messages for quota commands - setting not valid space quota</description>
  15477. <test-commands>
  15478. <dfs-admin-command>-fs NAMENODE -setSpaceQuota a5 /test </dfs-admin-command>
  15479. </test-commands>
  15480. <cleanup-commands>
  15481. <!-- Same directory will be used in the next test -->
  15482. </cleanup-commands>
  15483. <comparators>
  15484. <comparator>
  15485. <type>SubstringComparator</type>
  15486. <expected-output>setSpaceQuota: "a5" is not a valid value for a quota.</expected-output>
  15487. </comparator>
  15488. </comparators>
  15489. </test>
  15490. <test> <!--Tested -->
  15491. <description>verifying error messages for quota commands - clearQuota on non existing file</description>
  15492. <test-commands>
  15493. <dfs-admin-command>-fs NAMENODE -clrQuota /test1 </dfs-admin-command>
  15494. </test-commands>
  15495. <cleanup-commands>
  15496. <command>-fs NAMENODE -rm -r /test </command>
  15497. </cleanup-commands>
  15498. <comparators>
  15499. <comparator>
  15500. <type>SubstringComparator</type>
  15501. <expected-output>clrQuota: Directory does not exist: /test1</expected-output>
  15502. </comparator>
  15503. </comparators>
  15504. </test>
  15505. <test> <!--Tested -->
  15506. <description>verifying error messages for quota commands - using globing</description>
  15507. <test-commands>
  15508. <command>-fs NAMENODE -mkdir /dir1</command>
  15509. <command>-fs NAMENODE -mkdir /dir2</command>
  15510. <command>-fs NAMENODE -mkdir /dir3</command>
  15511. <dfs-admin-command>-fs NAMENODE -setSpaceQuota 1k /dir* </dfs-admin-command>
  15512. <command>-fs NAMENODE -put CLITEST_DATA/data15bytes /dir1/</command>
  15513. </test-commands>
  15514. <cleanup-commands>
  15515. <command>-fs NAMENODE -rm -r /dir* </command>
  15516. </cleanup-commands>
  15517. <comparators>
  15518. <comparator>
  15519. <type>RegexpComparator</type>
  15520. <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>
  15521. </comparator>
  15522. </comparators>
  15523. </test>
  15524. <test> <!--Tested -->
  15525. <description>verifying error messages for quota commands - setting quota using globing</description>
  15526. <test-commands>
  15527. <command>-fs NAMENODE -mkdir /dir1</command>
  15528. <command>-fs NAMENODE -mkdir /dir2</command>
  15529. <command>-fs NAMENODE -mkdir /dir3</command>
  15530. <dfs-admin-command>-fs NAMENODE -setQuota 1 /dir* </dfs-admin-command>
  15531. <command>-fs NAMENODE -mkdir /dir1/dir4</command>
  15532. </test-commands>
  15533. <cleanup-commands>
  15534. <command>-fs NAMENODE -rm -r /dir* </command>
  15535. </cleanup-commands>
  15536. <comparators>
  15537. <comparator>
  15538. <type>SubstringComparator</type>
  15539. <expected-output>mkdir: The NameSpace quota (directories and files) of directory /dir1 is exceeded: quota=1 file count=2</expected-output>
  15540. </comparator>
  15541. </comparators>
  15542. </test>
  15543. <test> <!--Tested -->
  15544. <description>refreshServiceAcl: refreshing security authorization policy for namenode</description>
  15545. <test-commands>
  15546. <dfs-admin-command>-fs NAMENODE -refreshServiceAcl </dfs-admin-command>
  15547. </test-commands>
  15548. <cleanup-commands>
  15549. <!-- No cleanup -->
  15550. </cleanup-commands>
  15551. <comparators>
  15552. <comparator>
  15553. <type>RegexpComparator</type>
  15554. <expected-output>Refresh service acl successful(\n)*</expected-output>
  15555. </comparator>
  15556. </comparators>
  15557. </test><!--
  15558. <test> Tested
  15559. <description>refreshServiceAcl: verifying error message while refreshing security authorization policy for namenode</description>
  15560. <test-commands>
  15561. hadoop-policy.xml for tests has
  15562. security.refresh.policy.protocol.acl = ${user.name}
  15563. <dfs-admin-command>-fs NAMENODE -Dhadoop.job.ugi=blah,blah -refreshServiceAcl </dfs-admin-command>
  15564. </test-commands>
  15565. <cleanup-commands>
  15566. No cleanup
  15567. </cleanup-commands>
  15568. <comparators>
  15569. <comparator>
  15570. <type>SubstringComparator</type>
  15571. <expected-output>access denied</expected-output>
  15572. </comparator>
  15573. </comparators>
  15574. </test>
  15575. --><!-- Test for safemode -->
  15576. <test> <!-- TESTED -->
  15577. <description>safemode: Test for enter - Namenode is not in safemode</description>
  15578. <test-commands>
  15579. <dfs-admin-command>-fs NAMENODE -safemode enter</dfs-admin-command>
  15580. </test-commands>
  15581. <cleanup-commands>
  15582. <dfs-admin-command>-fs NAMENODE -safemode leave</dfs-admin-command>
  15583. </cleanup-commands>
  15584. <comparators>
  15585. <comparator>
  15586. <type>TokenComparator</type>
  15587. <expected-output>Safe mode is ON</expected-output>
  15588. </comparator>
  15589. </comparators>
  15590. </test>
  15591. <test> <!-- TESTED -->
  15592. <description>safemode: Test for enter - Namenode is already in safemode</description>
  15593. <test-commands>
  15594. <dfs-admin-command>-fs NAMENODE -safemode enter</dfs-admin-command>
  15595. <dfs-admin-command>-fs NAMENODE -safemode enter</dfs-admin-command>
  15596. </test-commands>
  15597. <cleanup-commands>
  15598. <dfs-admin-command>-fs NAMENODE -safemode leave</dfs-admin-command>
  15599. </cleanup-commands>
  15600. <comparators>
  15601. <comparator>
  15602. <type>TokenComparator</type>
  15603. <expected-output>Safe mode is ON</expected-output>
  15604. </comparator>
  15605. </comparators>
  15606. </test>
  15607. <test> <!-- TESTED -->
  15608. <description>safemode: Test for leave - Namenode is already in safemode</description>
  15609. <test-commands>
  15610. <dfs-admin-command>-fs NAMENODE -safemode enter</dfs-admin-command>
  15611. <dfs-admin-command>-fs NAMENODE -safemode leave</dfs-admin-command>
  15612. </test-commands>
  15613. <cleanup-commands>
  15614. <!-- No cleanup -->
  15615. </cleanup-commands>
  15616. <comparators>
  15617. <comparator>
  15618. <type>TokenComparator</type>
  15619. <expected-output>Safe mode is OFF</expected-output>
  15620. </comparator>
  15621. </comparators>
  15622. </test>
  15623. <test> <!-- TESTED -->
  15624. <description>safemode: Test for leave - Namenode is not in safemode</description>
  15625. <test-commands>
  15626. <dfs-admin-command>-fs NAMENODE -safemode leave</dfs-admin-command>
  15627. </test-commands>
  15628. <cleanup-commands>
  15629. <!-- No cleanup -->
  15630. </cleanup-commands>
  15631. <comparators>
  15632. <comparator>
  15633. <type>TokenComparator</type>
  15634. <expected-output>Safe mode is OFF</expected-output>
  15635. </comparator>
  15636. </comparators>
  15637. </test>
  15638. <test> <!-- TESTED -->
  15639. <description>safemode: Test for get - Namenode is not in safemode</description>
  15640. <test-commands>
  15641. <dfs-admin-command>-fs NAMENODE -safemode leave</dfs-admin-command>
  15642. <dfs-admin-command>-fs NAMENODE -safemode get</dfs-admin-command>
  15643. </test-commands>
  15644. <cleanup-commands>
  15645. <!-- No cleanup -->
  15646. </cleanup-commands>
  15647. <comparators>
  15648. <comparator>
  15649. <type>TokenComparator</type>
  15650. <expected-output>Safe mode is OFF</expected-output>
  15651. </comparator>
  15652. </comparators>
  15653. </test>
  15654. <test> <!-- TESTED -->
  15655. <description>safemode:Test for get - Namenode is already in safemode</description>
  15656. <test-commands>
  15657. <dfs-admin-command>-fs NAMENODE -safemode enter</dfs-admin-command>
  15658. <dfs-admin-command>-fs NAMENODE -safemode get</dfs-admin-command>
  15659. </test-commands>
  15660. <cleanup-commands>
  15661. <dfs-admin-command>-fs NAMENODE -safemode leave</dfs-admin-command>
  15662. </cleanup-commands>
  15663. <comparators>
  15664. <comparator>
  15665. <type>TokenComparator</type>
  15666. <expected-output>Safe mode is ON</expected-output>
  15667. </comparator>
  15668. </comparators>
  15669. </test>
  15670. <test> <!-- TESTED -->
  15671. <description>safemode: Test for wait - Namenode is not in safemode</description>
  15672. <test-commands>
  15673. <dfs-admin-command>-fs NAMENODE -safemode leave</dfs-admin-command>
  15674. <dfs-admin-command>-fs NAMENODE -safemode wait</dfs-admin-command>
  15675. </test-commands>
  15676. <cleanup-commands>
  15677. <!-- No cleanup -->
  15678. </cleanup-commands>
  15679. <comparators>
  15680. <comparator>
  15681. <type>TokenComparator</type>
  15682. <expected-output>Safe mode is OFF</expected-output>
  15683. </comparator>
  15684. </comparators>
  15685. </test>
  15686. <test> <!-- TESTED -->
  15687. <description>safemode: Test for wait - Namenode is already in safemode</description>
  15688. <test-commands>
  15689. <dfs-admin-command>-fs NAMENODE -safemode enter</dfs-admin-command>
  15690. <dfs-admin-command>-fs NAMENODE -safemode wait &amp;</dfs-admin-command>
  15691. <dfs-admin-command>-fs NAMENODE -safemode leave</dfs-admin-command>
  15692. </test-commands>
  15693. <cleanup-commands>
  15694. <!-- No cleanup -->
  15695. </cleanup-commands>
  15696. <comparators>
  15697. <comparator>
  15698. <type>TokenComparator</type>
  15699. <expected-output>Safe mode is OFF</expected-output>
  15700. </comparator>
  15701. </comparators>
  15702. </test>
  15703. <!-- Test for report -->
  15704. <test> <!-- TESTED -->
  15705. <description>report: Displays the report about the Datanodes</description>
  15706. <test-commands>
  15707. <dfs-admin-command>-fs NAMENODE -report</dfs-admin-command>
  15708. </test-commands>
  15709. <cleanup-commands>
  15710. <!-- no cleanup cmd -->
  15711. </cleanup-commands>
  15712. <comparators>
  15713. <comparator>
  15714. <type>RegexpComparator</type>
  15715. <expected-output>Configured Capacity: [0-9]+ \([0-9]+\.[0-9]+ [BKMGT]+\)</expected-output>
  15716. </comparator>
  15717. <comparator>
  15718. <type>RegexpComparator</type>
  15719. <expected-output>Present Capacity: [0-9]+ \([0-9\.]+ [BKMGT]+\)</expected-output>
  15720. </comparator>
  15721. <comparator>
  15722. <type>RegexpComparator</type>
  15723. <expected-output>DFS Remaining: [0-9]+ \([0-9\.]+ [BKMGT]+\)</expected-output>
  15724. </comparator>
  15725. <comparator>
  15726. <type>RegexpComparator</type>
  15727. <expected-output>DFS Used: [0-9]+ \([0-9\.]+ [BKMGT]+\)</expected-output>
  15728. </comparator>
  15729. <comparator>
  15730. <type>RegexpComparator</type>
  15731. <expected-output>DFS Used\%: [0-9\.]+%</expected-output>
  15732. </comparator>
  15733. <comparator>
  15734. <type>RegexpComparator</type>
  15735. <expected-output>Live datanodes \([0-9]+\):</expected-output>
  15736. </comparator>
  15737. <comparator>
  15738. <type>RegexpComparator</type>
  15739. <expected-output>Name: [0-9\.:]+ \([-.a-zA-z0-9\.]+\)</expected-output>
  15740. </comparator>
  15741. <comparator>
  15742. <type>RegexpComparator</type>
  15743. <expected-output>Hostname: [-.a-zA-z0-9\.]+</expected-output>
  15744. </comparator>
  15745. <comparator>
  15746. <type>RegexpComparator</type>
  15747. <expected-output>Decommission Status : [a-zA-Z]+</expected-output>
  15748. </comparator>
  15749. <comparator>
  15750. <type>RegexpComparator</type>
  15751. <expected-output>Non DFS Used: [0-9]+ \([0-9\.]+ [BKMGT]+\)</expected-output>
  15752. </comparator>
  15753. <comparator>
  15754. <type>RegexpComparator</type>
  15755. <expected-output>DFS Remaining%: [0-9\.]+%</expected-output>
  15756. </comparator>
  15757. <comparator>
  15758. <type>RegexpComparator</type>
  15759. <expected-output>Last contact: [a-zA-Z]+ [a-zA-Z]+ [0-9]+ [0-9:]+ [A-Z\-\+\:0-9]+ [0-9]+</expected-output>
  15760. </comparator>
  15761. <comparator>
  15762. <type>TokenComparator</type>
  15763. <expected-output>Live datanodes</expected-output>
  15764. </comparator>
  15765. </comparators>
  15766. </test>
  15767. <!-- Test for saveNamespace -->
  15768. <test> <!-- TESTED -->
  15769. <description>saveNamespace: to save the namespace when safemode is ON</description>
  15770. <test-commands>
  15771. <dfs-admin-command>-fs NAMENODE -safemode enter</dfs-admin-command>
  15772. <dfs-admin-command>-fs NAMENODE -saveNamespace</dfs-admin-command>
  15773. </test-commands>
  15774. <cleanup-commands>
  15775. <dfs-admin-command>-fs NAMENODE -safemode leave</dfs-admin-command>
  15776. </cleanup-commands>
  15777. <comparators>
  15778. <comparator>
  15779. <type>RegexpComparator</type>
  15780. <expected-output>Save namespace successful(\n)*</expected-output>
  15781. </comparator>
  15782. </comparators>
  15783. </test>
  15784. <test> <!-- TESTED -->
  15785. <description>saveNamespace: to save the namespace when safemode is OFF</description>
  15786. <test-commands>
  15787. <dfs-admin-command>-fs NAMENODE -safemode leave</dfs-admin-command>
  15788. <dfs-admin-command>-fs NAMENODE -saveNamespace</dfs-admin-command>
  15789. </test-commands>
  15790. <cleanup-commands>
  15791. <dfs-admin-command>-fs NAMENODE -safemode leave</dfs-admin-command>
  15792. </cleanup-commands>
  15793. <comparators>
  15794. <comparator>
  15795. <type>TokenComparator</type>
  15796. <expected-output>saveNamespace: Safe mode should be turned ON in order to create namespace image.</expected-output>
  15797. </comparator>
  15798. </comparators>
  15799. </test>
  15800. <!-- Test for rollEdits -->
  15801. <test> <!-- TESTED -->
  15802. <description>rollEdits: test rollEdits admin command</description>
  15803. <test-commands>
  15804. <dfs-admin-command>-fs NAMENODE -rollEdits</dfs-admin-command>
  15805. </test-commands>
  15806. <cleanup-commands>
  15807. <!-- no cleanup -->
  15808. </cleanup-commands>
  15809. <comparators>
  15810. <comparator>
  15811. <type>RegexpComparator</type>
  15812. <expected-output>New segment starts at txid \d+</expected-output>
  15813. </comparator>
  15814. </comparators>
  15815. </test>
  15816. <!-- Test for refreshNodes -->
  15817. <test> <!-- TESTED -->
  15818. <description>refreshNodes: to refresh the nodes</description>
  15819. <test-commands>
  15820. <dfs-admin-command>-fs NAMENODE -refreshNodes</dfs-admin-command>
  15821. <dfs-admin-command>-fs NAMENODE -report</dfs-admin-command>
  15822. </test-commands>
  15823. <cleanup-commands>
  15824. <!-- no cleanup -->
  15825. </cleanup-commands>
  15826. <comparators>
  15827. <comparator>
  15828. <type>RegexpComparator</type>
  15829. <expected-output>Configured Capacity: [0-9]+ \([0-9]+\.[0-9]+ [BKMGT]+\)</expected-output>
  15830. </comparator>
  15831. <comparator>
  15832. <type>RegexpComparator</type>
  15833. <expected-output>Present Capacity: [0-9]+ \([0-9\.]+ [BKMGT]+\)</expected-output>
  15834. </comparator>
  15835. <comparator>
  15836. <type>RegexpComparator</type>
  15837. <expected-output>DFS Remaining: [0-9]+ \([0-9\.]+ [BKMGT]+\)</expected-output>
  15838. </comparator>
  15839. <comparator>
  15840. <type>RegexpComparator</type>
  15841. <expected-output>DFS Used: [0-9]+ \([0-9\.]+ [BKMGT]+\)</expected-output>
  15842. </comparator>
  15843. <comparator>
  15844. <type>RegexpComparator</type>
  15845. <expected-output>DFS Used\%: [0-9\.]+%</expected-output>
  15846. </comparator>
  15847. <comparator>
  15848. <type>RegexpComparator</type>
  15849. <expected-output>Name: [0-9\.:]+ \([-.a-zA-z0-9\.]+\)</expected-output>
  15850. </comparator>
  15851. <comparator>
  15852. <type>RegexpComparator</type>
  15853. <expected-output>Hostname: [-.a-zA-z0-9\.]+</expected-output>
  15854. </comparator>
  15855. <comparator>
  15856. <type>RegexpComparator</type>
  15857. <expected-output>Decommission Status : [a-zA-Z]+</expected-output>
  15858. </comparator>
  15859. <comparator>
  15860. <type>RegexpComparator</type>
  15861. <expected-output>Non DFS Used: [0-9]+ \([0-9\.]+ [BKMGT]+\)</expected-output>
  15862. </comparator>
  15863. <comparator>
  15864. <type>RegexpComparator</type>
  15865. <expected-output>DFS Remaining%: [0-9\.]+%</expected-output>
  15866. </comparator>
  15867. <comparator>
  15868. <type>RegexpComparator</type>
  15869. <expected-output>Last contact: [a-zA-Z]+ [a-zA-Z]+ [0-9]+ [0-9:]+ [A-Z\-\+\:0-9]+ [0-9]+</expected-output>
  15870. </comparator>
  15871. <comparator>
  15872. <type>TokenComparator</type>
  15873. <expected-output>Live datanodes</expected-output>
  15874. </comparator>
  15875. </comparators>
  15876. </test>
  15877. <!-- Test for metasave -->
  15878. <test> <!-- TESTED -->
  15879. <description>metasave: to save metadata</description>
  15880. <test-commands>
  15881. <dfs-admin-command>-fs NAMENODE -metasave metafile</dfs-admin-command>
  15882. </test-commands>
  15883. <cleanup-commands>
  15884. <!-- No cleanup -->
  15885. </cleanup-commands>
  15886. <comparators>
  15887. <comparator>
  15888. <type>RegexpComparator</type>
  15889. <expected-output>Created metasave file metafile in the log directory of namenode hdfs:\/\/[-.a-zA-Z0-9\.:]+</expected-output>
  15890. </comparator>
  15891. </comparators>
  15892. </test>
  15893. <!-- Test for clrSpacequota -->
  15894. <test> <!-- TESTED -->
  15895. <description>clrSpaceQuota: Namenode is already in safemode</description>
  15896. <test-commands>
  15897. <command>-fs NAMENODE -mkdir test</command>
  15898. <dfs-admin-command>-fs NAMENODE -setSpaceQuota 15 test</dfs-admin-command>
  15899. <dfs-admin-command>-fs NAMENODE -clrSpaceQuota test</dfs-admin-command>
  15900. </test-commands>
  15901. <cleanup-commands>
  15902. <command>-fs NAMENODE -rm -r test</command>
  15903. </cleanup-commands>
  15904. <comparators>
  15905. <comparator>
  15906. <type>ExactComparator</type>
  15907. <expected-output></expected-output>
  15908. </comparator>
  15909. </comparators>
  15910. </test>
  15911. <test> <!-- Tested -->
  15912. <description>printTopology: verifying that the topology map is what we expect</description>
  15913. <test-commands>
  15914. <dfs-admin-command>-fs NAMENODE -printTopology</dfs-admin-command>
  15915. </test-commands>
  15916. <cleanup-commands>
  15917. <!-- No cleanup -->
  15918. </cleanup-commands>
  15919. <comparators>
  15920. <!-- miniDFS cluster started in CLITestHelper is set to match this output -->
  15921. <comparator>
  15922. <type>RegexpAcrossOutputComparator</type>
  15923. <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>
  15924. </comparator>
  15925. <comparator>
  15926. <type>RegexpAcrossOutputComparator</type>
  15927. <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>
  15928. </comparator>
  15929. <comparator>
  15930. <type>RegexpAcrossOutputComparator</type>
  15931. <expected-output>Rack: \/rack3\s*127\.0\.0\.1:\d+\s\([-.a-zA-Z0-9]+\)</expected-output>
  15932. </comparator>
  15933. <comparator>
  15934. <type>RegexpAcrossOutputComparator</type>
  15935. <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>
  15936. </comparator>
  15937. </comparators>
  15938. </test>
  15939. <!-- DFS tests -->
  15940. <test>
  15941. <description>appendToFile</description>
  15942. <test-commands>
  15943. <command>-fs NAMENODE -mkdir -p /user/USERNAME/dir1</command>
  15944. <command>-fs NAMENODE -touchz /user/USERNAME/dir1/file0</command>
  15945. <command>-fs NAMENODE -appendToFile CLITEST_DATA/data15bytes /user/USERNAME/dir1/file0</command>
  15946. <command>-fs NAMENODE -cat /user/USERNAME/dir1/file0</command>
  15947. </test-commands>
  15948. <cleanup-commands>
  15949. <command>-fs NAMENODE -rm -r /user/USERNAME</command>
  15950. </cleanup-commands>
  15951. <comparators>
  15952. <comparator>
  15953. <type>RegexpComparator</type>
  15954. <expected-output>12345678901234</expected-output>
  15955. </comparator>
  15956. </comparators>
  15957. </test>
  15958. <test>
  15959. <description>text</description>
  15960. <test-commands>
  15961. <command>-fs NAMENODE -mkdir -p /user/USERNAME/dir1</command>
  15962. <command>-fs NAMENODE -put CLITEST_DATA/data15bytes /user/USERNAME/dir1/file0</command>
  15963. <command>-fs NAMENODE -text /user/USERNAME/dir1/file0</command>
  15964. </test-commands>
  15965. <cleanup-commands>
  15966. <command>-fs NAMENODE -rm -r /user/USERNAME/dir1</command>
  15967. </cleanup-commands>
  15968. <comparators>
  15969. <comparator>
  15970. <type>RegexpComparator</type>
  15971. <expected-output>12345678901234</expected-output>
  15972. </comparator>
  15973. </comparators>
  15974. </test>
  15975. <test>
  15976. <description>rmdir</description>
  15977. <test-commands>
  15978. <command>-fs NAMENODE -mkdir -p /user/USERNAME/dir1</command>
  15979. <command>-fs NAMENODE -rmdir /user/USERNAME/dir1</command>
  15980. <command>-fs NAMENODE -ls /user/USERNAME/</command>
  15981. </test-commands>
  15982. <cleanup-commands>
  15983. <command>-fs NAMENODE -rm -r /user/USERNAME</command>
  15984. </cleanup-commands>
  15985. <comparators>
  15986. <comparator>
  15987. <type>ExactComparator</type>
  15988. <expected-output></expected-output>
  15989. </comparator>
  15990. </comparators>
  15991. </test>
  15992. <test>
  15993. <description>rmdir with ignore-fail-on-non-empty</description>
  15994. <test-commands>
  15995. <command>-fs NAMENODE -mkdir -p /user/USERNAME/dir1</command>
  15996. <command>-fs NAMENODE -put CLITEST_DATA/data15bytes /user/USERNAME/dir1/file0</command>
  15997. <command>-fs NAMENODE -rmdir --ignore-fail-on-non-empty /user/USERNAME/dir1</command>
  15998. <command>-fs NAMENODE -ls /user/USERNAME/</command>
  15999. </test-commands>
  16000. <cleanup-commands>
  16001. <command>-fs NAMENODE -rm -r /user/USERNAME</command>
  16002. </cleanup-commands>
  16003. <comparators>
  16004. <comparator>
  16005. <type>RegexpComparator</type>
  16006. <expected-output>Found 1 items</expected-output>
  16007. </comparator>
  16008. <comparator>
  16009. <type>RegexpComparator</type>
  16010. <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>
  16011. </comparator>
  16012. </comparators>
  16013. </test>
  16014. <test>
  16015. <description>df</description>
  16016. <test-commands>
  16017. <command>-fs NAMENODE -mkdir -p /user/USERNAME/dir1</command>
  16018. <command>-fs NAMENODE -put CLITEST_DATA/data15bytes /user/USERNAME/dir1/file0</command>
  16019. <command>-fs NAMENODE -df /user/USERNAME</command>
  16020. </test-commands>
  16021. <cleanup-commands>
  16022. <command>-fs NAMENODE -rm -r /user/USERNAME</command>
  16023. </cleanup-commands>
  16024. <comparators>
  16025. <comparator>
  16026. <type>RegexpComparator</type>
  16027. <expected-output>Filesystem( )*Size( )*Used( )*Available( )*Use%.*</expected-output>
  16028. </comparator>
  16029. </comparators>
  16030. </test>
  16031. <test>
  16032. <description>expunge</description>
  16033. <test-commands>
  16034. <command>-fs NAMENODE -expunge</command>
  16035. </test-commands>
  16036. <cleanup-commands>
  16037. <command></command>
  16038. </cleanup-commands>
  16039. <comparators>
  16040. <comparator>
  16041. <type>ExactComparator</type>
  16042. <expected-output></expected-output>
  16043. </comparator>
  16044. </comparators>
  16045. </test>
  16046. <!-- Tests for snapshots -->
  16047. <test>
  16048. <description>allowSnapshot</description>
  16049. <test-commands>
  16050. <command>-fs NAMENODE -mkdir -p /user/USERNAME/dir1</command>
  16051. <dfs-admin-command>-fs NAMENODE -allowSnapshot /user/USERNAME/dir1</dfs-admin-command>
  16052. </test-commands>
  16053. <cleanup-commands>
  16054. <dfs-admin-command>-fs NAMENODE -disallowSnapshot /user/USERNAME/dir1</dfs-admin-command>
  16055. <command>-fs NAMENODE -rm -r /user/USERNAME</command>
  16056. </cleanup-commands>
  16057. <comparators>
  16058. <comparator>
  16059. <type>RegexpComparator</type>
  16060. <expected-output>Allowing snaphot on /user/USERNAME/dir1 succeeded</expected-output>
  16061. </comparator>
  16062. </comparators>
  16063. </test>
  16064. <test>
  16065. <description>disallowSnapshot</description>
  16066. <test-commands>
  16067. <command>-fs NAMENODE -mkdir -p /user/USERNAME/dir1</command>
  16068. <dfs-admin-command>-fs NAMENODE -allowSnapshot /user/USERNAME/dir1</dfs-admin-command>
  16069. <dfs-admin-command>-fs NAMENODE -disallowSnapshot /user/USERNAME/dir1</dfs-admin-command>
  16070. </test-commands>
  16071. <cleanup-commands>
  16072. <command>-fs NAMENODE -rm -r /user/USERNAME</command>
  16073. </cleanup-commands>
  16074. <comparators>
  16075. <comparator>
  16076. <type>RegexpComparator</type>
  16077. <expected-output>Disallowing snaphot on /user/USERNAME/dir1 succeeded</expected-output>
  16078. </comparator>
  16079. </comparators>
  16080. </test>
  16081. <test>
  16082. <description>createSnapshot</description>
  16083. <test-commands>
  16084. <command>-fs NAMENODE -mkdir -p /user/USERNAME/dir1</command>
  16085. <dfs-admin-command>-fs NAMENODE -allowSnapshot /user/USERNAME/dir1</dfs-admin-command>
  16086. <command>-fs NAMENODE -createSnapshot /user/USERNAME/dir1 snapshot1</command>
  16087. </test-commands>
  16088. <cleanup-commands>
  16089. <command>-fs NAMENODE -deleteSnapshot /user/USERNAME/dir1 snapshot1</command>
  16090. <dfs-admin-command>-fs NAMENODE -disallowSnapshot /user/USERNAME/dir1</dfs-admin-command>
  16091. <command>-fs NAMENODE -rm -r /user/USERNAME</command>
  16092. </cleanup-commands>
  16093. <comparators>
  16094. <comparator>
  16095. <type>RegexpComparator</type>
  16096. <expected-output>Created snapshot /user/USERNAME/dir1/.snapshot/snapshot1</expected-output>
  16097. </comparator>
  16098. </comparators>
  16099. </test>
  16100. <test>
  16101. <description>renameSnapshot</description>
  16102. <test-commands>
  16103. <command>-fs NAMENODE -mkdir -p /user/USERNAME/dir1</command>
  16104. <dfs-admin-command>-fs NAMENODE -allowSnapshot /user/USERNAME/dir1</dfs-admin-command>
  16105. <command>-fs NAMENODE -createSnapshot /user/USERNAME/dir1 snapshot1</command>
  16106. <command>-fs NAMENODE -renameSnapshot /user/USERNAME/dir1 snapshot1 snapshot2</command>
  16107. <command>-fs NAMENODE -ls /user/USERNAME/dir1/.snapshot</command>
  16108. </test-commands>
  16109. <cleanup-commands>
  16110. <command>-fs NAMENODE -deleteSnapshot /user/USERNAME/dir1 snapshot2</command>
  16111. <dfs-admin-command>-fs NAMENODE -disallowSnapshot /user/USERNAME/dir1</dfs-admin-command>
  16112. <command>-fs NAMENODE -rm -r /user/USERNAME</command>
  16113. </cleanup-commands>
  16114. <comparators>
  16115. <comparator>
  16116. <type>RegexpComparator</type>
  16117. <expected-output>Found 1 items</expected-output>
  16118. </comparator>
  16119. <comparator>
  16120. <type>RegexpComparator</type>
  16121. <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>
  16122. </comparator>
  16123. </comparators>
  16124. </test>
  16125. <test>
  16126. <description>deleteSnapshot</description>
  16127. <test-commands>
  16128. <command>-fs NAMENODE -mkdir -p /user/USERNAME/dir1</command>
  16129. <dfs-admin-command>-fs NAMENODE -allowSnapshot /user/USERNAME/dir1</dfs-admin-command>
  16130. <command>-fs NAMENODE -createSnapshot /user/USERNAME/dir1 snapshot1</command>
  16131. <command>-fs NAMENODE -deleteSnapshot /user/USERNAME/dir1 snapshot1</command>
  16132. <command>-fs NAMENODE -ls /user/USERNAME/dir1/.snapshot</command>
  16133. </test-commands>
  16134. <cleanup-commands>
  16135. <dfs-admin-command>-fs NAMENODE -disallowSnapshot /user/USERNAME/dir1</dfs-admin-command>
  16136. <command>-fs NAMENODE -rm -r /user/USERNAME</command>
  16137. </cleanup-commands>
  16138. <comparators>
  16139. <comparator>
  16140. <type>ExactComparator</type>
  16141. <expected-output></expected-output>
  16142. </comparator>
  16143. </comparators>
  16144. </test>
  16145. <!-- DFSadmin tests -->
  16146. <test>
  16147. <description>refreshUserToGroupsMappings</description>
  16148. <test-commands>
  16149. <dfs-admin-command>-fs NAMENODE -refreshUserToGroupsMappings</dfs-admin-command>
  16150. </test-commands>
  16151. <cleanup-commands>
  16152. <command></command>
  16153. </cleanup-commands>
  16154. <comparators>
  16155. <comparator>
  16156. <type>RegexpComparator</type>
  16157. <expected-output>Refresh user to groups mapping successful(\n)*</expected-output>
  16158. </comparator>
  16159. </comparators>
  16160. </test>
  16161. <test>
  16162. <description>refreshSuperUserGroupsConfiguration</description>
  16163. <test-commands>
  16164. <dfs-admin-command>-fs NAMENODE -refreshSuperUserGroupsConfiguration</dfs-admin-command>
  16165. </test-commands>
  16166. <cleanup-commands>
  16167. <command></command>
  16168. </cleanup-commands>
  16169. <comparators>
  16170. <comparator>
  16171. <type>RegexpComparator</type>
  16172. <expected-output>Refresh super user groups configuration successful(\n)*</expected-output>
  16173. </comparator>
  16174. </comparators>
  16175. </test>
  16176. <test>
  16177. <description>setQuota</description>
  16178. <test-commands>
  16179. <command>-fs NAMENODE -mkdir -p /user/USERNAME/dir1</command>
  16180. <dfs-admin-command>-fs NAMENODE -setQuota 3 /user/USERNAME/dir1</dfs-admin-command>
  16181. <command>-fs NAMENODE -count -q /user/USERNAME/dir1</command>
  16182. </test-commands>
  16183. <cleanup-commands>
  16184. <command>-fs NAMENODE -rm -r /user/USERNAME</command>
  16185. </cleanup-commands>
  16186. <comparators>
  16187. <comparator>
  16188. <type>RegexpComparator</type>
  16189. <expected-output>( )*3.*/user/USERNAME/dir1</expected-output>
  16190. </comparator>
  16191. </comparators>
  16192. </test>
  16193. <test>
  16194. <description>clrQuota</description>
  16195. <test-commands>
  16196. <command>-fs NAMENODE -mkdir -p /user/USERNAME/dir1</command>
  16197. <dfs-admin-command>-fs NAMENODE -setQuota 3 /user/USERNAME/dir1</dfs-admin-command>
  16198. <dfs-admin-command>-fs NAMENODE -clrQuota /user/USERNAME/dir1</dfs-admin-command>
  16199. <command>-fs NAMENODE -count -q /user/USERNAME/dir1</command>
  16200. </test-commands>
  16201. <cleanup-commands>
  16202. <command>-fs NAMENODE -rm -r /user/USERNAME</command>
  16203. </cleanup-commands>
  16204. <comparators>
  16205. <comparator>
  16206. <type>RegexpComparator</type>
  16207. <expected-output>( )*none.*/user/USERNAME/dir1</expected-output>
  16208. </comparator>
  16209. </comparators>
  16210. </test>
  16211. <test>
  16212. <description>setSpaceQuota</description>
  16213. <test-commands>
  16214. <command>-fs NAMENODE -mkdir -p /user/USERNAME/dir1</command>
  16215. <dfs-admin-command>-fs NAMENODE -setSpaceQuota 1G /user/USERNAME/dir1</dfs-admin-command>
  16216. </test-commands>
  16217. <cleanup-commands>
  16218. <command>-fs NAMENODE -rm -r /user/USERNAME/dir1</command>
  16219. </cleanup-commands>
  16220. <comparators>
  16221. <comparator>
  16222. <type>ExactComparator</type>
  16223. <expected-output></expected-output>
  16224. </comparator>
  16225. </comparators>
  16226. </test>
  16227. <test>
  16228. <description>setBalancerBandwidth</description>
  16229. <test-commands>
  16230. <dfs-admin-command>-fs NAMENODE -setBalancerBandwidth 104857600</dfs-admin-command>
  16231. </test-commands>
  16232. <cleanup-commands>
  16233. <command></command>
  16234. </cleanup-commands>
  16235. <comparators>
  16236. <comparator>
  16237. <type>RegexpComparator</type>
  16238. <expected-output>Balancer bandwidth is set to 104857600(\n)*</expected-output>
  16239. </comparator>
  16240. </comparators>
  16241. </test>
  16242. <test>
  16243. <description>finalizeUpgrade</description>
  16244. <test-commands>
  16245. <dfs-admin-command>-fs NAMENODE -finalizeUpgrade</dfs-admin-command>
  16246. </test-commands>
  16247. <cleanup-commands>
  16248. <command></command>
  16249. </cleanup-commands>
  16250. <comparators>
  16251. <comparator>
  16252. <type>SubstringComparator</type>
  16253. <expected-output>Finalize upgrade successful</expected-output>
  16254. </comparator>
  16255. </comparators>
  16256. </test>
  16257. <!-- Tests for moveFromLocal -->
  16258. <test> <!-- TESTED -->
  16259. <description>moveFromLocal: moving non existent file(absolute path)</description>
  16260. <test-commands>
  16261. <command>-fs NAMENODE -mkdir -p /user/USERNAME/dir</command>
  16262. <command>-fs NAMENODE -moveFromLocal /user/wrongdata /user/USERNAME/dir</command>
  16263. </test-commands>
  16264. <cleanup-commands>
  16265. <command>-fs NAMENODE -rm -r /user/USERNAME</command>
  16266. </cleanup-commands>
  16267. <comparators>
  16268. <comparator>
  16269. <type>TokenComparator</type>
  16270. <expected-output>moveFromLocal: `/user/wrongdata': No such file or directory</expected-output>
  16271. </comparator>
  16272. </comparators>
  16273. </test>
  16274. <test> <!-- TESTED -->
  16275. <description>moveFromLocal: moving non existent file(relative path)</description>
  16276. <test-commands>
  16277. <command>-fs NAMENODE -mkdir -p /user/USERNAME/dir</command> <!-- make sure user home dir exists -->
  16278. <command>-fs NAMENODE -moveFromLocal wrongdata /user/USERNAME/dir</command>
  16279. </test-commands>
  16280. <cleanup-commands>
  16281. <command>-fs NAMENODE -rm -r /user/USERNAME</command>
  16282. </cleanup-commands>
  16283. <comparators>
  16284. <comparator>
  16285. <type>TokenComparator</type>
  16286. <expected-output>moveFromLocal: `wrongdata': No such file or directory</expected-output>
  16287. </comparator>
  16288. </comparators>
  16289. </test>
  16290. <test> <!-- TESTED -->
  16291. <description>moveFromLocal: moving many files into an existing file</description>
  16292. <test-commands>
  16293. <command>-fs NAMENODE -cp CLITEST_DATA/data15bytes data15bytes</command>
  16294. <command>-fs NAMENODE -cp CLITEST_DATA/data30bytes data30bytes</command>
  16295. <command>-fs NAMENODE -mkdir -p /user/USERNAME/dir</command>
  16296. <command>-fs NAMENODE -touchz /user/USERNAME/dir/file0</command>
  16297. <command>-fs NAMENODE -moveFromLocal data15bytes data30bytes /user/USERNAME/dir/file0</command>
  16298. </test-commands>
  16299. <cleanup-commands>
  16300. <command>-fs NAMENODE -rm -r /user/USERNAME</command>
  16301. </cleanup-commands>
  16302. <comparators>
  16303. <comparator>
  16304. <type>RegexpComparator</type>
  16305. <expected-output>moveFromLocal: `/user/USERNAME/dir/file0': Is not a directory</expected-output>
  16306. </comparator>
  16307. </comparators>
  16308. </test>
  16309. <test> <!-- TESTED -->
  16310. <description>moveFromLocal: moving many files into a non existent directory</description>
  16311. <test-commands>
  16312. <command>-fs NAMENODE -cp CLITEST_DATA/data15bytes data15bytes</command>
  16313. <command>-fs NAMENODE -cp CLITEST_DATA/data30bytes data30bytes</command>
  16314. <command>-fs NAMENODE -moveFromLocal data15bytes data30bytes /user/USERNAME/dir/wrongdir</command>
  16315. </test-commands>
  16316. <cleanup-commands>
  16317. <command>-fs NAMENODE -rm -r /user/USERNAME</command>
  16318. </cleanup-commands>
  16319. <comparators>
  16320. <comparator>
  16321. <type>RegexpComparator</type>
  16322. <expected-output>^moveFromLocal: `/user/USERNAME/dir/wrongdir': No such file or directory</expected-output>
  16323. </comparator>
  16324. </comparators>
  16325. </test>
  16326. <test> <!-- TESTED -->
  16327. <description>moveFromLocal: Test for hdfs:// path - moving non existent file</description>
  16328. <test-commands>
  16329. <command>-fs NAMENODE -mkdir -p /user/USERNAME/dir</command>
  16330. <command>-fs NAMENODE -moveFromLocal /user/wrongdata hdfs:///user/USERNAME/dir/file</command>
  16331. </test-commands>
  16332. <cleanup-commands>
  16333. <command>-fs NAMENODE -rm -r hdfs:///*</command>
  16334. </cleanup-commands>
  16335. <comparators>
  16336. <comparator>
  16337. <type>TokenComparator</type>
  16338. <expected-output>moveFromLocal: `/user/wrongdata': No such file or directory</expected-output>
  16339. </comparator>
  16340. </comparators>
  16341. </test>
  16342. <test> <!-- TESTED -->
  16343. <description>moveFromLocal: Test for hdfs:// path - moving many files into an existing file</description>
  16344. <test-commands>
  16345. <command>-fs NAMENODE -cp CLITEST_DATA/data15bytes data15bytes</command>
  16346. <command>-fs NAMENODE -cp CLITEST_DATA/data30bytes data30bytes</command>
  16347. <command>-fs NAMENODE -mkdir -p /user/USERNAME/dir</command>
  16348. <command>-fs NAMENODE -touchz hdfs:///user/USERNAME/dir/file</command>
  16349. <command>-fs NAMENODE -moveFromLocal data15bytes data30bytes hdfs:///user/USERNAME/dir/file</command>
  16350. </test-commands>
  16351. <cleanup-commands>
  16352. <command>-fs NAMENODE -rm -r hdfs:///*</command>
  16353. </cleanup-commands>
  16354. <comparators>
  16355. <comparator>
  16356. <type>RegexpComparator</type>
  16357. <expected-output>moveFromLocal: `hdfs:///user/USERNAME/dir/file': Is not a directory</expected-output>
  16358. </comparator>
  16359. </comparators>
  16360. </test>
  16361. <test> <!-- TESTED -->
  16362. <description>moveFromLocal: Test for hdfs:// path - moving many files into a non existent directory</description>
  16363. <test-commands>
  16364. <command>-fs NAMENODE -cp CLITEST_DATA/data15bytes data15bytes</command>
  16365. <command>-fs NAMENODE -cp CLITEST_DATA/data30bytes data30bytes</command>
  16366. <command>-fs NAMENODE -moveFromLocal data15bytes data30bytes hdfs:///user/USERNAME/dir/wrongdir</command>
  16367. </test-commands>
  16368. <cleanup-commands>
  16369. <command>-fs NAMENODE -rm -r hdfs:///*</command>
  16370. </cleanup-commands>
  16371. <comparators>
  16372. <comparator>
  16373. <type>RegexpComparator</type>
  16374. <expected-output>moveFromLocal: `hdfs:///user/USERNAME/dir/wrongdir': No such file or directory</expected-output>
  16375. </comparator>
  16376. </comparators>
  16377. </test>
  16378. <test> <!-- TESTED -->
  16379. <description>moveFromLocal: Test for Namenode's path - moving non existent file</description>
  16380. <test-commands>
  16381. <command>-fs NAMENODE -mkdir -p NAMENODE/user/USERNAME/dir</command>
  16382. <command>-fs NAMENODE -moveFromLocal /user/wrongdata NAMENODE/user/USERNAME/dir</command>
  16383. </test-commands>
  16384. <cleanup-commands>
  16385. <command>-fs NAMENODE -rm -r NAMENODE/*</command>
  16386. </cleanup-commands>
  16387. <comparators>
  16388. <comparator>
  16389. <type>TokenComparator</type>
  16390. <expected-output>moveFromLocal: `/user/wrongdata': No such file or directory</expected-output>
  16391. </comparator>
  16392. </comparators>
  16393. </test>
  16394. <test> <!-- TESTED -->
  16395. <description>moveFromLocal: Test for Namenode's path - moving many files into an existing file</description>
  16396. <test-commands>
  16397. <command>-fs NAMENODE -mkdir -p NAMENODE/user/USERNAME/dir</command>
  16398. <command>-fs NAMENODE -touchz NAMENODE/user/USERNAME/dir/file0</command>
  16399. <command>-fs NAMENODE -cp CLITEST_DATA/data15bytes data15bytes</command>
  16400. <command>-fs NAMENODE -cp CLITEST_DATA/data30bytes data30bytes</command>
  16401. <command>-fs NAMENODE -moveFromLocal data15bytes data30bytes NAMENODE/user/USERNAME/dir/file0</command>
  16402. </test-commands>
  16403. <cleanup-commands>
  16404. <command>-fs NAMENODE -rm -r NAMENODE/*</command>
  16405. </cleanup-commands>
  16406. <comparators>
  16407. <comparator>
  16408. <type>RegexpComparator</type>
  16409. <expected-output>moveFromLocal: `hdfs://\w+[-.a-z0-9]*:[0-9]+/user/USERNAME/dir/file0': Is not a directory</expected-output>
  16410. </comparator>
  16411. </comparators>
  16412. </test>
  16413. <test> <!-- TESTED -->
  16414. <description>moveFromLocal: Test for Namenode's path - moving many files into a non existent directory</description>
  16415. <test-commands>
  16416. <command>-fs NAMENODE -mkdir -p NAMENODE/user/USERNAME</command>
  16417. <command>-fs NAMENODE -touchz NAMENODE/user/USERNAME/dir/file0</command>
  16418. <command>-fs NAMENODE -cp CLITEST_DATA/data15bytes data15bytes</command>
  16419. <command>-fs NAMENODE -cp CLITEST_DATA/data30bytes data30bytes</command>
  16420. <command>-fs NAMENODE -moveFromLocal data15bytes data30bytes NAMENODE/user/USERNAME/wrongdir</command>
  16421. </test-commands>
  16422. <cleanup-commands>
  16423. <command>-fs NAMENODE -rm -r NAMENODE/*</command>
  16424. </cleanup-commands>
  16425. <comparators>
  16426. <comparator>
  16427. <type>RegexpComparator</type>
  16428. <expected-output>moveFromLocal: `hdfs://\w+[-.a-z0-9]*:[0-9]+/user/USERNAME/wrongdir': No such file or directory</expected-output>
  16429. </comparator>
  16430. </comparators>
  16431. </test>
  16432. <test> <!--Tested -->
  16433. <description>Verifying chmod operation is not permitted in safemode</description>
  16434. <test-commands>
  16435. <command>-fs NAMENODE -mkdir /test </command>
  16436. <command>-fs NAMENODE -touchz /test/file1 </command>
  16437. <dfs-admin-command>-fs NAMENODE -safemode enter </dfs-admin-command>
  16438. <command>-fs NAMENODE -chmod 777 /test/file1 </command>
  16439. </test-commands>
  16440. <cleanup-commands>
  16441. <dfs-admin-command>-fs NAMENODE -safemode leave </dfs-admin-command>
  16442. <dfs-admin-command>-fs NAMENODE -rm -r /test </dfs-admin-command>
  16443. </cleanup-commands>
  16444. <comparators>
  16445. <comparator>
  16446. <type>SubstringComparator</type>
  16447. <expected-output>Cannot set permission for /test/file1. Name node is in safe mode.</expected-output>
  16448. </comparator>
  16449. </comparators>
  16450. </test>
  16451. <test> <!--Tested -->
  16452. <description>Verifying chown operation is not permitted in safemode</description>
  16453. <test-commands>
  16454. <command>-fs NAMENODE -mkdir /test </command>
  16455. <command>-fs NAMENODE -touchz /test/file1 </command>
  16456. <dfs-admin-command>-fs NAMENODE -safemode enter </dfs-admin-command>
  16457. <command>-fs NAMENODE -chown newgroup /test/file1 </command>
  16458. </test-commands>
  16459. <cleanup-commands>
  16460. <dfs-admin-command>-fs NAMENODE -safemode leave </dfs-admin-command>
  16461. <dfs-admin-command>-fs NAMENODE -rm -r /test </dfs-admin-command>
  16462. </cleanup-commands>
  16463. <comparators>
  16464. <comparator>
  16465. <type>SubstringComparator</type>
  16466. <expected-output>Cannot set owner for /test/file1. Name node is in safe mode.</expected-output>
  16467. </comparator>
  16468. </comparators>
  16469. </test>
  16470. <test> <!--Tested -->
  16471. <description>Verifying chgrp operation is not permitted in safemode</description>
  16472. <test-commands>
  16473. <command>-fs NAMENODE -mkdir /test </command>
  16474. <command>-fs NAMENODE -touchz /test/file1 </command>
  16475. <dfs-admin-command>-fs NAMENODE -safemode enter </dfs-admin-command>
  16476. <command>-fs NAMENODE -chgrp newgroup /test/file1 </command>
  16477. </test-commands>
  16478. <cleanup-commands>
  16479. <dfs-admin-command>-fs NAMENODE -safemode leave </dfs-admin-command>
  16480. <dfs-admin-command>-fs NAMENODE -rm -r /test </dfs-admin-command>
  16481. </cleanup-commands>
  16482. <comparators>
  16483. <comparator>
  16484. <type>SubstringComparator</type>
  16485. <expected-output>Cannot set owner for /test/file1. Name node is in safe mode.</expected-output>
  16486. </comparator>
  16487. </comparators>
  16488. </test>
  16489. <test> <!--Tested -->
  16490. <description>Verifying setQuota operation is not permitted in safemode</description>
  16491. <test-commands>
  16492. <command>-fs NAMENODE -mkdir /test </command>
  16493. <dfs-admin-command>-fs NAMENODE -safemode enter </dfs-admin-command>
  16494. <dfs-admin-command>-fs NAMENODE -setQuota 100 /test </dfs-admin-command>
  16495. </test-commands>
  16496. <cleanup-commands>
  16497. <dfs-admin-command>-fs NAMENODE -safemode leave </dfs-admin-command>
  16498. <dfs-admin-command>-fs NAMENODE -rm -r /test </dfs-admin-command>
  16499. </cleanup-commands>
  16500. <comparators>
  16501. <comparator>
  16502. <type>SubstringComparator</type>
  16503. <expected-output>setQuota: Cannot set quota on /test. Name node is in safe mode.</expected-output>
  16504. </comparator>
  16505. </comparators>
  16506. </test>
  16507. <test> <!--Tested -->
  16508. <description>Verifying clrQuota operation is not permitted in safemode</description>
  16509. <test-commands>
  16510. <command>-fs NAMENODE -mkdir /test </command>
  16511. <dfs-admin-command>-fs NAMENODE -safemode enter </dfs-admin-command>
  16512. <dfs-admin-command>-fs NAMENODE -clrQuota /test </dfs-admin-command>
  16513. </test-commands>
  16514. <cleanup-commands>
  16515. <dfs-admin-command>-fs NAMENODE -safemode leave </dfs-admin-command>
  16516. <dfs-admin-command>-fs NAMENODE -rm -r /test </dfs-admin-command>
  16517. </cleanup-commands>
  16518. <comparators>
  16519. <comparator>
  16520. <type>SubstringComparator</type>
  16521. <expected-output>clrQuota: Cannot set quota on /test. Name node is in safe mode.</expected-output>
  16522. </comparator>
  16523. </comparators>
  16524. </test>
  16525. <test> <!--Tested -->
  16526. <description>Verifying setSpaceQuota operation is not permitted in safemode</description>
  16527. <test-commands>
  16528. <command>-fs NAMENODE -mkdir /test </command>
  16529. <dfs-admin-command>-fs NAMENODE -safemode enter </dfs-admin-command>
  16530. <dfs-admin-command>-fs NAMENODE -setSpaceQuota 100 /test </dfs-admin-command>
  16531. </test-commands>
  16532. <cleanup-commands>
  16533. <dfs-admin-command>-fs NAMENODE -safemode leave </dfs-admin-command>
  16534. <dfs-admin-command>-fs NAMENODE -rm -r /test </dfs-admin-command>
  16535. </cleanup-commands>
  16536. <comparators>
  16537. <comparator>
  16538. <type>SubstringComparator</type>
  16539. <expected-output>setSpaceQuota: Cannot set quota on /test. Name node is in safe mode.</expected-output>
  16540. </comparator>
  16541. </comparators>
  16542. </test>
  16543. <test> <!--Tested -->
  16544. <description>Verifying clrSpaceQuota operation is not permitted in safemode</description>
  16545. <test-commands>
  16546. <command>-fs NAMENODE -mkdir /test </command>
  16547. <dfs-admin-command>-fs NAMENODE -safemode enter </dfs-admin-command>
  16548. <dfs-admin-command>-fs NAMENODE -clrSpaceQuota /test </dfs-admin-command>
  16549. </test-commands>
  16550. <cleanup-commands>
  16551. <dfs-admin-command>-fs NAMENODE -safemode leave </dfs-admin-command>
  16552. <dfs-admin-command>-fs NAMENODE -rm -r /test </dfs-admin-command>
  16553. </cleanup-commands>
  16554. <comparators>
  16555. <comparator>
  16556. <type>SubstringComparator</type>
  16557. <expected-output>clrSpaceQuota: Cannot set quota on /test. Name node is in safe mode.</expected-output>
  16558. </comparator>
  16559. </comparators>
  16560. </test>
  16561. <!-- Tests for find -->
  16562. <test> <!-- TESTED -->
  16563. <description>find: default expression</description>
  16564. <test-commands>
  16565. <command>-fs NAMENODE -mkdir /donotfind</command>
  16566. <command>-fs NAMENODE -mkdir donotfind</command>
  16567. <command>-fs NAMENODE -mkdir /findtest</command>
  16568. <command>-fs NAMENODE -mkdir /findtest/item1</command>
  16569. <command>-fs NAMENODE -mkdir /findtest/item1/item1a</command>
  16570. <command>-fs NAMENODE -touchz /findtest/item1/item1a/item1aa</command>
  16571. <command>-fs NAMENODE -put CLITEST_DATA/data60bytes /findtest/item1/item1b</command>
  16572. <command>-fs NAMENODE -put CLITEST_DATA/data60bytes /findtest/item2</command>
  16573. <command>-fs NAMENODE -mkdir /findtest/item3</command>
  16574. <command>-fs NAMENODE -mkdir /findtest/item4</command>
  16575. <command>-fs NAMENODE -mkdir /findtest/item4/item4a</command>
  16576. <command>-fs NAMENODE -put CLITEST_DATA/data120bytes /findtest/item4/item4b</command>
  16577. <command>-fs NAMENODE -put CLITEST_DATA/data1k /findtest/item5</command>
  16578. <command>-fs NAMENODE -find /findtest</command>
  16579. </test-commands>
  16580. <cleanup-commands>
  16581. <command>-fs NAMENODE -rm -r /donotfind</command>
  16582. <command>-fs NAMENODE -rm -r donotfind</command>
  16583. <command>-fs NAMENODE -rm -r /findtest</command>
  16584. </cleanup-commands>
  16585. <comparators>
  16586. <comparator>
  16587. <type>RegexpAcrossOutputComparator</type>
  16588. <expected-output>^/findtest
  16589. /findtest/item1
  16590. /findtest/item1/item1a
  16591. /findtest/item1/item1a/item1aa
  16592. /findtest/item1/item1b
  16593. /findtest/item2
  16594. /findtest/item3
  16595. /findtest/item4
  16596. /findtest/item4/item4a
  16597. /findtest/item4/item4b
  16598. /findtest/item5
  16599. $</expected-output>
  16600. </comparator>
  16601. </comparators>
  16602. </test>
  16603. <test> <!-- TESTED -->
  16604. <description>find: -print </description>
  16605. <test-commands>
  16606. <command>-fs NAMENODE -mkdir /donotfind</command>
  16607. <command>-fs NAMENODE -mkdir donotfind</command>
  16608. <command>-fs NAMENODE -mkdir /findtest</command>
  16609. <command>-fs NAMENODE -mkdir /findtest/item1</command>
  16610. <command>-fs NAMENODE -mkdir /findtest/item1/item1a</command>
  16611. <command>-fs NAMENODE -touchz /findtest/item1/item1a/item1aa</command>
  16612. <command>-fs NAMENODE -put CLITEST_DATA/data60bytes /findtest/item1/item1b</command>
  16613. <command>-fs NAMENODE -put CLITEST_DATA/data60bytes /findtest/item2</command>
  16614. <command>-fs NAMENODE -mkdir /findtest/item3</command>
  16615. <command>-fs NAMENODE -mkdir /findtest/item4</command>
  16616. <command>-fs NAMENODE -mkdir /findtest/item4/item4a</command>
  16617. <command>-fs NAMENODE -put CLITEST_DATA/data120bytes /findtest/item4/item4b</command>
  16618. <command>-fs NAMENODE -put CLITEST_DATA/data1k /findtest/item5</command>
  16619. <command>-fs NAMENODE -find /findtest -print</command>
  16620. </test-commands>
  16621. <cleanup-commands>
  16622. <command>-fs NAMENODE -rm -r /donotfind</command>
  16623. <command>-fs NAMENODE -rm -r donotfind</command>
  16624. <command>-fs NAMENODE -rm -r /findtest</command>
  16625. </cleanup-commands>
  16626. <comparators>
  16627. <comparator>
  16628. <type>RegexpAcrossOutputComparator</type>
  16629. <expected-output>^/findtest
  16630. /findtest/item1
  16631. /findtest/item1/item1a
  16632. /findtest/item1/item1a/item1aa
  16633. /findtest/item1/item1b
  16634. /findtest/item2
  16635. /findtest/item3
  16636. /findtest/item4
  16637. /findtest/item4/item4a
  16638. /findtest/item4/item4b
  16639. /findtest/item5
  16640. $</expected-output>
  16641. </comparator>
  16642. </comparators>
  16643. </test>
  16644. <test> <!-- TESTED -->
  16645. <description>find: -print (relative path) </description>
  16646. <test-commands>
  16647. <command>-fs NAMENODE -mkdir /donotfind</command>
  16648. <command>-fs NAMENODE -mkdir -p donotfind</command>
  16649. <command>-fs NAMENODE -mkdir -p findtest</command>
  16650. <command>-fs NAMENODE -mkdir -p findtest/item1</command>
  16651. <command>-fs NAMENODE -mkdir -p findtest/item1/item1a</command>
  16652. <command>-fs NAMENODE -touchz findtest/item1/item1a/item1aa</command>
  16653. <command>-fs NAMENODE -put CLITEST_DATA/data60bytes findtest/item1/item1b</command>
  16654. <command>-fs NAMENODE -put CLITEST_DATA/data60bytes findtest/item2</command>
  16655. <command>-fs NAMENODE -mkdir -p findtest/item3</command>
  16656. <command>-fs NAMENODE -mkdir -p findtest/item4</command>
  16657. <command>-fs NAMENODE -mkdir -p findtest/item4/item4a</command>
  16658. <command>-fs NAMENODE -put CLITEST_DATA/data120bytes findtest/item4/item4b</command>
  16659. <command>-fs NAMENODE -put CLITEST_DATA/data1k findtest/item5</command>
  16660. <command>-fs NAMENODE -find findtest -print</command>
  16661. </test-commands>
  16662. <cleanup-commands>
  16663. <command>-fs NAMENODE -rm -r /donotfind</command>
  16664. <command>-fs NAMENODE -rm -r donotfind</command>
  16665. <command>-fs NAMENODE -rm -r findtest</command>
  16666. </cleanup-commands>
  16667. <comparators>
  16668. <comparator>
  16669. <type>RegexpAcrossOutputComparator</type>
  16670. <expected-output>^findtest
  16671. findtest/item1
  16672. findtest/item1/item1a
  16673. findtest/item1/item1a/item1aa
  16674. findtest/item1/item1b
  16675. findtest/item2
  16676. findtest/item3
  16677. findtest/item4
  16678. findtest/item4/item4a
  16679. findtest/item4/item4b
  16680. findtest/item5
  16681. $</expected-output>
  16682. </comparator>
  16683. </comparators>
  16684. </test>
  16685. <test> <!-- TESTED -->
  16686. <description>find: -print (cwd) </description>
  16687. <test-commands>
  16688. <command>-fs NAMENODE -mkdir /donotfind</command>
  16689. <command>-fs NAMENODE -mkdir findtest</command>
  16690. <command>-fs NAMENODE -mkdir findtest/item1</command>
  16691. <command>-fs NAMENODE -mkdir findtest/item1/item1a</command>
  16692. <command>-fs NAMENODE -touchz findtest/item1/item1a/item1aa</command>
  16693. <command>-fs NAMENODE -put CLITEST_DATA/data60bytes findtest/item1/item1b</command>
  16694. <command>-fs NAMENODE -put CLITEST_DATA/data60bytes findtest/item2</command>
  16695. <command>-fs NAMENODE -mkdir findtest/item3</command>
  16696. <command>-fs NAMENODE -mkdir findtest/item4</command>
  16697. <command>-fs NAMENODE -mkdir findtest/item4/item4a</command>
  16698. <command>-fs NAMENODE -put CLITEST_DATA/data120bytes findtest/item4/item4b</command>
  16699. <command>-fs NAMENODE -put CLITEST_DATA/data1k findtest/item5</command>
  16700. <command>-fs NAMENODE -find -print</command>
  16701. </test-commands>
  16702. <cleanup-commands>
  16703. <command>-fs NAMENODE -rm -r findtest</command>
  16704. <command>-fs NAMENODE -rm -r /donotfind</command>
  16705. </cleanup-commands>
  16706. <comparators>
  16707. <comparator>
  16708. <type>RegexpAcrossOutputComparator</type>
  16709. <expected-output>^.
  16710. findtest
  16711. findtest/item1
  16712. findtest/item1/item1a
  16713. findtest/item1/item1a/item1aa
  16714. findtest/item1/item1b
  16715. findtest/item2
  16716. findtest/item3
  16717. findtest/item4
  16718. findtest/item4/item4a
  16719. findtest/item4/item4b
  16720. findtest/item5
  16721. $</expected-output>
  16722. </comparator>
  16723. </comparators>
  16724. </test>
  16725. <test> <!-- TESTED -->
  16726. <description>find: -name </description>
  16727. <test-commands>
  16728. <command>-fs NAMENODE -mkdir /findtest</command>
  16729. <command>-fs NAMENODE -mkdir /findtest/item1</command>
  16730. <command>-fs NAMENODE -mkdir /findtest/item1/item1a</command>
  16731. <command>-fs NAMENODE -touchz /findtest/item1/item1a/item1aa</command>
  16732. <command>-fs NAMENODE -put CLITEST_DATA/data60bytes /findtest/item1/item1b</command>
  16733. <command>-fs NAMENODE -put CLITEST_DATA/data60bytes /findtest/item2</command>
  16734. <command>-fs NAMENODE -mkdir /findtest/item3</command>
  16735. <command>-fs NAMENODE -mkdir /findtest/item4</command>
  16736. <command>-fs NAMENODE -mkdir /findtest/item4/item4a</command>
  16737. <command>-fs NAMENODE -put CLITEST_DATA/data120bytes /findtest/item4/item4b</command>
  16738. <command>-fs NAMENODE -put CLITEST_DATA/data1k /findtest/item5</command>
  16739. <command>-fs NAMENODE -find /findtest -name item*a</command>
  16740. </test-commands>
  16741. <cleanup-commands>
  16742. <command>-fs NAMENODE -rm -r /findtest</command>
  16743. </cleanup-commands>
  16744. <comparators>
  16745. <comparator>
  16746. <type>RegexpAcrossOutputComparator</type>
  16747. <expected-output>^/findtest/item1/item1a
  16748. /findtest/item1/item1a/item1aa
  16749. /findtest/item4/item4a
  16750. $</expected-output>
  16751. </comparator>
  16752. </comparators>
  16753. </test>
  16754. <test> <!-- TESTED -->
  16755. <description>find: -iname </description>
  16756. <test-commands>
  16757. <command>-fs NAMENODE -mkdir /findtest</command>
  16758. <command>-fs NAMENODE -mkdir /findtest/item1</command>
  16759. <command>-fs NAMENODE -mkdir /findtest/item1/item1a</command>
  16760. <command>-fs NAMENODE -touchz /findtest/item1/item1a/item1aa</command>
  16761. <command>-fs NAMENODE -put CLITEST_DATA/data60bytes /findtest/item1/item1b</command>
  16762. <command>-fs NAMENODE -put CLITEST_DATA/data60bytes /findtest/item2</command>
  16763. <command>-fs NAMENODE -mkdir /findtest/item3</command>
  16764. <command>-fs NAMENODE -mkdir /findtest/item4</command>
  16765. <command>-fs NAMENODE -mkdir /findtest/item4/item4a</command>
  16766. <command>-fs NAMENODE -put CLITEST_DATA/data120bytes /findtest/item4/item4b</command>
  16767. <command>-fs NAMENODE -put CLITEST_DATA/data1k /findtest/item5</command>
  16768. <command>-fs NAMENODE -find /findtest -iname ITEM*a</command>
  16769. </test-commands>
  16770. <cleanup-commands>
  16771. <command>-fs NAMENODE -rm -r /findtest</command>
  16772. </cleanup-commands>
  16773. <comparators>
  16774. <comparator>
  16775. <type>RegexpAcrossOutputComparator</type>
  16776. <expected-output>^/findtest/item1/item1a
  16777. /findtest/item1/item1a/item1aa
  16778. /findtest/item4/item4a
  16779. $</expected-output>
  16780. </comparator>
  16781. </comparators>
  16782. </test>
  16783. <test> <!-- TESTED -->
  16784. <description>truncate to 5 bytes after waiting for block recovery to complete</description>
  16785. <test-commands>
  16786. <command>-fs NAMENODE -mkdir -p /user/USERNAME/dir0</command>
  16787. <command>-fs NAMENODE -put CLITEST_DATA/data120bytes /user/USERNAME/dir0</command>
  16788. <command>-fs NAMENODE -truncate -w 5 /user/USERNAME/dir0/data120bytes</command>
  16789. <command>-fs NAMENODE -cat /user/USERNAME/dir0/data120bytes</command>
  16790. </test-commands>
  16791. <cleanup-commands>
  16792. <command>-fs NAMENODE -rm -r /user/USERNAME/dir0</command>
  16793. </cleanup-commands>
  16794. <comparators>
  16795. <comparator>
  16796. <type>RegexpComparator</type>
  16797. <expected-output>12345</expected-output>
  16798. </comparator>
  16799. </comparators>
  16800. </test>
  16801. <test> <!-- TESTED -->
  16802. <description>truncate to greater length than length of file</description>
  16803. <test-commands>
  16804. <command>-fs NAMENODE -mkdir /user/USERNAME/dir0</command>
  16805. <command>-fs NAMENODE -put CLITEST_DATA/data15bytes /user/USERNAME/dir0</command>
  16806. <command>-fs NAMENODE -truncate -w 50 /user/USERNAME/dir0/data15bytes</command>
  16807. <command>-fs NAMENODE -cat /user/USERNAME/dir0/data15bytes</command>
  16808. </test-commands>
  16809. <cleanup-commands>
  16810. <command>-fs NAMENODE -rm -r /user/USERNAME/dir0</command>
  16811. </cleanup-commands>
  16812. <comparators>
  16813. <comparator>
  16814. <type>RegexpComparator</type>
  16815. <expected-output>12345678901234</expected-output>
  16816. </comparator>
  16817. </comparators>
  16818. </test>
  16819. </tests>
  16820. </configuration>