testHDFSConf.xml 725 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488348934903491349234933494349534963497349834993500350135023503350435053506350735083509351035113512351335143515351635173518351935203521352235233524352535263527352835293530353135323533353435353536353735383539354035413542354335443545354635473548354935503551355235533554355535563557355835593560356135623563356435653566356735683569357035713572357335743575357635773578357935803581358235833584358535863587358835893590359135923593359435953596359735983599360036013602360336043605360636073608360936103611361236133614361536163617361836193620362136223623362436253626362736283629363036313632363336343635363636373638363936403641364236433644364536463647364836493650365136523653365436553656365736583659366036613662366336643665366636673668366936703671367236733674367536763677367836793680368136823683368436853686368736883689369036913692369336943695369636973698369937003701370237033704370537063707370837093710371137123713371437153716371737183719372037213722372337243725372637273728372937303731373237333734373537363737373837393740374137423743374437453746374737483749375037513752375337543755375637573758375937603761376237633764376537663767376837693770377137723773377437753776377737783779378037813782378337843785378637873788378937903791379237933794379537963797379837993800380138023803380438053806380738083809381038113812381338143815381638173818381938203821382238233824382538263827382838293830383138323833383438353836383738383839384038413842384338443845384638473848384938503851385238533854385538563857385838593860386138623863386438653866386738683869387038713872387338743875387638773878387938803881388238833884388538863887388838893890389138923893389438953896389738983899390039013902390339043905390639073908390939103911391239133914391539163917391839193920392139223923392439253926392739283929393039313932393339343935393639373938393939403941394239433944394539463947394839493950395139523953395439553956395739583959396039613962396339643965396639673968396939703971397239733974397539763977397839793980398139823983398439853986398739883989399039913992399339943995399639973998399940004001400240034004400540064007400840094010401140124013401440154016401740184019402040214022402340244025402640274028402940304031403240334034403540364037403840394040404140424043404440454046404740484049405040514052405340544055405640574058405940604061406240634064406540664067406840694070407140724073407440754076407740784079408040814082408340844085408640874088408940904091409240934094409540964097409840994100410141024103410441054106410741084109411041114112411341144115411641174118411941204121412241234124412541264127412841294130413141324133413441354136413741384139414041414142414341444145414641474148414941504151415241534154415541564157415841594160416141624163416441654166416741684169417041714172417341744175417641774178417941804181418241834184418541864187418841894190419141924193419441954196419741984199420042014202420342044205420642074208420942104211421242134214421542164217421842194220422142224223422442254226422742284229423042314232423342344235423642374238423942404241424242434244424542464247424842494250425142524253425442554256425742584259426042614262426342644265426642674268426942704271427242734274427542764277427842794280428142824283428442854286428742884289429042914292429342944295429642974298429943004301430243034304430543064307430843094310431143124313431443154316431743184319432043214322432343244325432643274328432943304331433243334334433543364337433843394340434143424343434443454346434743484349435043514352435343544355435643574358435943604361436243634364436543664367436843694370437143724373437443754376437743784379438043814382438343844385438643874388438943904391439243934394439543964397439843994400440144024403440444054406440744084409441044114412441344144415441644174418441944204421442244234424442544264427442844294430443144324433443444354436443744384439444044414442444344444445444644474448444944504451445244534454445544564457445844594460446144624463446444654466446744684469447044714472447344744475447644774478447944804481448244834484448544864487448844894490449144924493449444954496449744984499450045014502450345044505450645074508450945104511451245134514451545164517451845194520452145224523452445254526452745284529453045314532453345344535453645374538453945404541454245434544454545464547454845494550455145524553455445554556455745584559456045614562456345644565456645674568456945704571457245734574457545764577457845794580458145824583458445854586458745884589459045914592459345944595459645974598459946004601460246034604460546064607460846094610461146124613461446154616461746184619462046214622462346244625462646274628462946304631463246334634463546364637463846394640464146424643464446454646464746484649465046514652465346544655465646574658465946604661466246634664466546664667466846694670467146724673467446754676467746784679468046814682468346844685468646874688468946904691469246934694469546964697469846994700470147024703470447054706470747084709471047114712471347144715471647174718471947204721472247234724472547264727472847294730473147324733473447354736473747384739474047414742474347444745474647474748474947504751475247534754475547564757475847594760476147624763476447654766476747684769477047714772477347744775477647774778477947804781478247834784478547864787478847894790479147924793479447954796479747984799480048014802480348044805480648074808480948104811481248134814481548164817481848194820482148224823482448254826482748284829483048314832483348344835483648374838483948404841484248434844484548464847484848494850485148524853485448554856485748584859486048614862486348644865486648674868486948704871487248734874487548764877487848794880488148824883488448854886488748884889489048914892489348944895489648974898489949004901490249034904490549064907490849094910491149124913491449154916491749184919492049214922492349244925492649274928492949304931493249334934493549364937493849394940494149424943494449454946494749484949495049514952495349544955495649574958495949604961496249634964496549664967496849694970497149724973497449754976497749784979498049814982498349844985498649874988498949904991499249934994499549964997499849995000500150025003500450055006500750085009501050115012501350145015501650175018501950205021502250235024502550265027502850295030503150325033503450355036503750385039504050415042504350445045504650475048504950505051505250535054505550565057505850595060506150625063506450655066506750685069507050715072507350745075507650775078507950805081508250835084508550865087508850895090509150925093509450955096509750985099510051015102510351045105510651075108510951105111511251135114511551165117511851195120512151225123512451255126512751285129513051315132513351345135513651375138513951405141514251435144514551465147514851495150515151525153515451555156515751585159516051615162516351645165516651675168516951705171517251735174517551765177517851795180518151825183518451855186518751885189519051915192519351945195519651975198519952005201520252035204520552065207520852095210521152125213521452155216521752185219522052215222522352245225522652275228522952305231523252335234523552365237523852395240524152425243524452455246524752485249525052515252525352545255525652575258525952605261526252635264526552665267526852695270527152725273527452755276527752785279528052815282528352845285528652875288528952905291529252935294529552965297529852995300530153025303530453055306530753085309531053115312531353145315531653175318531953205321532253235324532553265327532853295330533153325333533453355336533753385339534053415342534353445345534653475348534953505351535253535354535553565357535853595360536153625363536453655366536753685369537053715372537353745375537653775378537953805381538253835384538553865387538853895390539153925393539453955396539753985399540054015402540354045405540654075408540954105411541254135414541554165417541854195420542154225423542454255426542754285429543054315432543354345435543654375438543954405441544254435444544554465447544854495450545154525453545454555456545754585459546054615462546354645465546654675468546954705471547254735474547554765477547854795480548154825483548454855486548754885489549054915492549354945495549654975498549955005501550255035504550555065507550855095510551155125513551455155516551755185519552055215522552355245525552655275528552955305531553255335534553555365537553855395540554155425543554455455546554755485549555055515552555355545555555655575558555955605561556255635564556555665567556855695570557155725573557455755576557755785579558055815582558355845585558655875588558955905591559255935594559555965597559855995600560156025603560456055606560756085609561056115612561356145615561656175618561956205621562256235624562556265627562856295630563156325633563456355636563756385639564056415642564356445645564656475648564956505651565256535654565556565657565856595660566156625663566456655666566756685669567056715672567356745675567656775678567956805681568256835684568556865687568856895690569156925693569456955696569756985699570057015702570357045705570657075708570957105711571257135714571557165717571857195720572157225723572457255726572757285729573057315732573357345735573657375738573957405741574257435744574557465747574857495750575157525753575457555756575757585759576057615762576357645765576657675768576957705771577257735774577557765777577857795780578157825783578457855786578757885789579057915792579357945795579657975798579958005801580258035804580558065807580858095810581158125813581458155816581758185819582058215822582358245825582658275828582958305831583258335834583558365837583858395840584158425843584458455846584758485849585058515852585358545855585658575858585958605861586258635864586558665867586858695870587158725873587458755876587758785879588058815882588358845885588658875888588958905891589258935894589558965897589858995900590159025903590459055906590759085909591059115912591359145915591659175918591959205921592259235924592559265927592859295930593159325933593459355936593759385939594059415942594359445945594659475948594959505951595259535954595559565957595859595960596159625963596459655966596759685969597059715972597359745975597659775978597959805981598259835984598559865987598859895990599159925993599459955996599759985999600060016002600360046005600660076008600960106011601260136014601560166017601860196020602160226023602460256026602760286029603060316032603360346035603660376038603960406041604260436044604560466047604860496050605160526053605460556056605760586059606060616062606360646065606660676068606960706071607260736074607560766077607860796080608160826083608460856086608760886089609060916092609360946095609660976098609961006101610261036104610561066107610861096110611161126113611461156116611761186119612061216122612361246125612661276128612961306131613261336134613561366137613861396140614161426143614461456146614761486149615061516152615361546155615661576158615961606161616261636164616561666167616861696170617161726173617461756176617761786179618061816182618361846185618661876188618961906191619261936194619561966197619861996200620162026203620462056206620762086209621062116212621362146215621662176218621962206221622262236224622562266227622862296230623162326233623462356236623762386239624062416242624362446245624662476248624962506251625262536254625562566257625862596260626162626263626462656266626762686269627062716272627362746275627662776278627962806281628262836284628562866287628862896290629162926293629462956296629762986299630063016302630363046305630663076308630963106311631263136314631563166317631863196320632163226323632463256326632763286329633063316332633363346335633663376338633963406341634263436344634563466347634863496350635163526353635463556356635763586359636063616362636363646365636663676368636963706371637263736374637563766377637863796380638163826383638463856386638763886389639063916392639363946395639663976398639964006401640264036404640564066407640864096410641164126413641464156416641764186419642064216422642364246425642664276428642964306431643264336434643564366437643864396440644164426443644464456446644764486449645064516452645364546455645664576458645964606461646264636464646564666467646864696470647164726473647464756476647764786479648064816482648364846485648664876488648964906491649264936494649564966497649864996500650165026503650465056506650765086509651065116512651365146515651665176518651965206521652265236524652565266527652865296530653165326533653465356536653765386539654065416542654365446545654665476548654965506551655265536554655565566557655865596560656165626563656465656566656765686569657065716572657365746575657665776578657965806581658265836584658565866587658865896590659165926593659465956596659765986599660066016602660366046605660666076608660966106611661266136614661566166617661866196620662166226623662466256626662766286629663066316632663366346635663666376638663966406641664266436644664566466647664866496650665166526653665466556656665766586659666066616662666366646665666666676668666966706671667266736674667566766677667866796680668166826683668466856686668766886689669066916692669366946695669666976698669967006701670267036704670567066707670867096710671167126713671467156716671767186719672067216722672367246725672667276728672967306731673267336734673567366737673867396740674167426743674467456746674767486749675067516752675367546755675667576758675967606761676267636764676567666767676867696770677167726773677467756776677767786779678067816782678367846785678667876788678967906791679267936794679567966797679867996800680168026803680468056806680768086809681068116812681368146815681668176818681968206821682268236824682568266827682868296830683168326833683468356836683768386839684068416842684368446845684668476848684968506851685268536854685568566857685868596860686168626863686468656866686768686869687068716872687368746875687668776878687968806881688268836884688568866887688868896890689168926893689468956896689768986899690069016902690369046905690669076908690969106911691269136914691569166917691869196920692169226923692469256926692769286929693069316932693369346935693669376938693969406941694269436944694569466947694869496950695169526953695469556956695769586959696069616962696369646965696669676968696969706971697269736974697569766977697869796980698169826983698469856986698769886989699069916992699369946995699669976998699970007001700270037004700570067007700870097010701170127013701470157016701770187019702070217022702370247025702670277028702970307031703270337034703570367037703870397040704170427043704470457046704770487049705070517052705370547055705670577058705970607061706270637064706570667067706870697070707170727073707470757076707770787079708070817082708370847085708670877088708970907091709270937094709570967097709870997100710171027103710471057106710771087109711071117112711371147115711671177118711971207121712271237124712571267127712871297130713171327133713471357136713771387139714071417142714371447145714671477148714971507151715271537154715571567157715871597160716171627163716471657166716771687169717071717172717371747175717671777178717971807181718271837184718571867187718871897190719171927193719471957196719771987199720072017202720372047205720672077208720972107211721272137214721572167217721872197220722172227223722472257226722772287229723072317232723372347235723672377238723972407241724272437244724572467247724872497250725172527253725472557256725772587259726072617262726372647265726672677268726972707271727272737274727572767277727872797280728172827283728472857286728772887289729072917292729372947295729672977298729973007301730273037304730573067307730873097310731173127313731473157316731773187319732073217322732373247325732673277328732973307331733273337334733573367337733873397340734173427343734473457346734773487349735073517352735373547355735673577358735973607361736273637364736573667367736873697370737173727373737473757376737773787379738073817382738373847385738673877388738973907391739273937394739573967397739873997400740174027403740474057406740774087409741074117412741374147415741674177418741974207421742274237424742574267427742874297430743174327433743474357436743774387439744074417442744374447445744674477448744974507451745274537454745574567457745874597460746174627463746474657466746774687469747074717472747374747475747674777478747974807481748274837484748574867487748874897490749174927493749474957496749774987499750075017502750375047505750675077508750975107511751275137514751575167517751875197520752175227523752475257526752775287529753075317532753375347535753675377538753975407541754275437544754575467547754875497550755175527553755475557556755775587559756075617562756375647565756675677568756975707571757275737574757575767577757875797580758175827583758475857586758775887589759075917592759375947595759675977598759976007601760276037604760576067607760876097610761176127613761476157616761776187619762076217622762376247625762676277628762976307631763276337634763576367637763876397640764176427643764476457646764776487649765076517652765376547655765676577658765976607661766276637664766576667667766876697670767176727673767476757676767776787679768076817682768376847685768676877688768976907691769276937694769576967697769876997700770177027703770477057706770777087709771077117712771377147715771677177718771977207721772277237724772577267727772877297730773177327733773477357736773777387739774077417742774377447745774677477748774977507751775277537754775577567757775877597760776177627763776477657766776777687769777077717772777377747775777677777778777977807781778277837784778577867787778877897790779177927793779477957796779777987799780078017802780378047805780678077808780978107811781278137814781578167817781878197820782178227823782478257826782778287829783078317832783378347835783678377838783978407841784278437844784578467847784878497850785178527853785478557856785778587859786078617862786378647865786678677868786978707871787278737874787578767877787878797880788178827883788478857886788778887889789078917892789378947895789678977898789979007901790279037904790579067907790879097910791179127913791479157916791779187919792079217922792379247925792679277928792979307931793279337934793579367937793879397940794179427943794479457946794779487949795079517952795379547955795679577958795979607961796279637964796579667967796879697970797179727973797479757976797779787979798079817982798379847985798679877988798979907991799279937994799579967997799879998000800180028003800480058006800780088009801080118012801380148015801680178018801980208021802280238024802580268027802880298030803180328033803480358036803780388039804080418042804380448045804680478048804980508051805280538054805580568057805880598060806180628063806480658066806780688069807080718072807380748075807680778078807980808081808280838084808580868087808880898090809180928093809480958096809780988099810081018102810381048105810681078108810981108111811281138114811581168117811881198120812181228123812481258126812781288129813081318132813381348135813681378138813981408141814281438144814581468147814881498150815181528153815481558156815781588159816081618162816381648165816681678168816981708171817281738174817581768177817881798180818181828183818481858186818781888189819081918192819381948195819681978198819982008201820282038204820582068207820882098210821182128213821482158216821782188219822082218222822382248225822682278228822982308231823282338234823582368237823882398240824182428243824482458246824782488249825082518252825382548255825682578258825982608261826282638264826582668267826882698270827182728273827482758276827782788279828082818282828382848285828682878288828982908291829282938294829582968297829882998300830183028303830483058306830783088309831083118312831383148315831683178318831983208321832283238324832583268327832883298330833183328333833483358336833783388339834083418342834383448345834683478348834983508351835283538354835583568357835883598360836183628363836483658366836783688369837083718372837383748375837683778378837983808381838283838384838583868387838883898390839183928393839483958396839783988399840084018402840384048405840684078408840984108411841284138414841584168417841884198420842184228423842484258426842784288429843084318432843384348435843684378438843984408441844284438444844584468447844884498450845184528453845484558456845784588459846084618462846384648465846684678468846984708471847284738474847584768477847884798480848184828483848484858486848784888489849084918492849384948495849684978498849985008501850285038504850585068507850885098510851185128513851485158516851785188519852085218522852385248525852685278528852985308531853285338534853585368537853885398540854185428543854485458546854785488549855085518552855385548555855685578558855985608561856285638564856585668567856885698570857185728573857485758576857785788579858085818582858385848585858685878588858985908591859285938594859585968597859885998600860186028603860486058606860786088609861086118612861386148615861686178618861986208621862286238624862586268627862886298630863186328633863486358636863786388639864086418642864386448645864686478648864986508651865286538654865586568657865886598660866186628663866486658666866786688669867086718672867386748675867686778678867986808681868286838684868586868687868886898690869186928693869486958696869786988699870087018702870387048705870687078708870987108711871287138714871587168717871887198720872187228723872487258726872787288729873087318732873387348735873687378738873987408741874287438744874587468747874887498750875187528753875487558756875787588759876087618762876387648765876687678768876987708771877287738774877587768777877887798780878187828783878487858786878787888789879087918792879387948795879687978798879988008801880288038804880588068807880888098810881188128813881488158816881788188819882088218822882388248825882688278828882988308831883288338834883588368837883888398840884188428843884488458846884788488849885088518852885388548855885688578858885988608861886288638864886588668867886888698870887188728873887488758876887788788879888088818882888388848885888688878888888988908891889288938894889588968897889888998900890189028903890489058906890789088909891089118912891389148915891689178918891989208921892289238924892589268927892889298930893189328933893489358936893789388939894089418942894389448945894689478948894989508951895289538954895589568957895889598960896189628963896489658966896789688969897089718972897389748975897689778978897989808981898289838984898589868987898889898990899189928993899489958996899789988999900090019002900390049005900690079008900990109011901290139014901590169017901890199020902190229023902490259026902790289029903090319032903390349035903690379038903990409041904290439044904590469047904890499050905190529053905490559056905790589059906090619062906390649065906690679068906990709071907290739074907590769077907890799080908190829083908490859086908790889089909090919092909390949095909690979098909991009101910291039104910591069107910891099110911191129113911491159116911791189119912091219122912391249125912691279128912991309131913291339134913591369137913891399140914191429143914491459146914791489149915091519152915391549155915691579158915991609161916291639164916591669167916891699170917191729173917491759176917791789179918091819182918391849185918691879188918991909191919291939194919591969197919891999200920192029203920492059206920792089209921092119212921392149215921692179218921992209221922292239224922592269227922892299230923192329233923492359236923792389239924092419242924392449245924692479248924992509251925292539254925592569257925892599260926192629263926492659266926792689269927092719272927392749275927692779278927992809281928292839284928592869287928892899290929192929293929492959296929792989299930093019302930393049305930693079308930993109311931293139314931593169317931893199320932193229323932493259326932793289329933093319332933393349335933693379338933993409341934293439344934593469347934893499350935193529353935493559356935793589359936093619362936393649365936693679368936993709371937293739374937593769377937893799380938193829383938493859386938793889389939093919392939393949395939693979398939994009401940294039404940594069407940894099410941194129413941494159416941794189419942094219422942394249425942694279428942994309431943294339434943594369437943894399440944194429443944494459446944794489449945094519452945394549455945694579458945994609461946294639464946594669467946894699470947194729473947494759476947794789479948094819482948394849485948694879488948994909491949294939494949594969497949894999500950195029503950495059506950795089509951095119512951395149515951695179518951995209521952295239524952595269527952895299530953195329533953495359536953795389539954095419542954395449545954695479548954995509551955295539554955595569557955895599560956195629563956495659566956795689569957095719572957395749575957695779578957995809581958295839584958595869587958895899590959195929593959495959596959795989599960096019602960396049605960696079608960996109611961296139614961596169617961896199620962196229623962496259626962796289629963096319632963396349635963696379638963996409641964296439644964596469647964896499650965196529653965496559656965796589659966096619662966396649665966696679668966996709671967296739674967596769677967896799680968196829683968496859686968796889689969096919692969396949695969696979698969997009701970297039704970597069707970897099710971197129713971497159716971797189719972097219722972397249725972697279728972997309731973297339734973597369737973897399740974197429743974497459746974797489749975097519752975397549755975697579758975997609761976297639764976597669767976897699770977197729773977497759776977797789779978097819782978397849785978697879788978997909791979297939794979597969797979897999800980198029803980498059806980798089809981098119812981398149815981698179818981998209821982298239824982598269827982898299830983198329833983498359836983798389839984098419842984398449845984698479848984998509851985298539854985598569857985898599860986198629863986498659866986798689869987098719872987398749875987698779878987998809881988298839884988598869887988898899890989198929893989498959896989798989899990099019902990399049905990699079908990999109911991299139914991599169917991899199920992199229923992499259926992799289929993099319932993399349935993699379938993999409941994299439944994599469947994899499950995199529953995499559956995799589959996099619962996399649965996699679968996999709971997299739974997599769977997899799980998199829983998499859986998799889989999099919992999399949995999699979998999910000100011000210003100041000510006100071000810009100101001110012100131001410015100161001710018100191002010021100221002310024100251002610027100281002910030100311003210033100341003510036100371003810039100401004110042100431004410045100461004710048100491005010051100521005310054100551005610057100581005910060100611006210063100641006510066100671006810069100701007110072100731007410075100761007710078100791008010081100821008310084100851008610087100881008910090100911009210093100941009510096100971009810099101001010110102101031010410105101061010710108101091011010111101121011310114101151011610117101181011910120101211012210123101241012510126101271012810129101301013110132101331013410135101361013710138101391014010141101421014310144101451014610147101481014910150101511015210153101541015510156101571015810159101601016110162101631016410165101661016710168101691017010171101721017310174101751017610177101781017910180101811018210183101841018510186101871018810189101901019110192101931019410195101961019710198101991020010201102021020310204102051020610207102081020910210102111021210213102141021510216102171021810219102201022110222102231022410225102261022710228102291023010231102321023310234102351023610237102381023910240102411024210243102441024510246102471024810249102501025110252102531025410255102561025710258102591026010261102621026310264102651026610267102681026910270102711027210273102741027510276102771027810279102801028110282102831028410285102861028710288102891029010291102921029310294102951029610297102981029910300103011030210303103041030510306103071030810309103101031110312103131031410315103161031710318103191032010321103221032310324103251032610327103281032910330103311033210333103341033510336103371033810339103401034110342103431034410345103461034710348103491035010351103521035310354103551035610357103581035910360103611036210363103641036510366103671036810369103701037110372103731037410375103761037710378103791038010381103821038310384103851038610387103881038910390103911039210393103941039510396103971039810399104001040110402104031040410405104061040710408104091041010411104121041310414104151041610417104181041910420104211042210423104241042510426104271042810429104301043110432104331043410435104361043710438104391044010441104421044310444104451044610447104481044910450104511045210453104541045510456104571045810459104601046110462104631046410465104661046710468104691047010471104721047310474104751047610477104781047910480104811048210483104841048510486104871048810489104901049110492104931049410495104961049710498104991050010501105021050310504105051050610507105081050910510105111051210513105141051510516105171051810519105201052110522105231052410525105261052710528105291053010531105321053310534105351053610537105381053910540105411054210543105441054510546105471054810549105501055110552105531055410555105561055710558105591056010561105621056310564105651056610567105681056910570105711057210573105741057510576105771057810579105801058110582105831058410585105861058710588105891059010591105921059310594105951059610597105981059910600106011060210603106041060510606106071060810609106101061110612106131061410615106161061710618106191062010621106221062310624106251062610627106281062910630106311063210633106341063510636106371063810639106401064110642106431064410645106461064710648106491065010651106521065310654106551065610657106581065910660106611066210663106641066510666106671066810669106701067110672106731067410675106761067710678106791068010681106821068310684106851068610687106881068910690106911069210693106941069510696106971069810699107001070110702107031070410705107061070710708107091071010711107121071310714107151071610717107181071910720107211072210723107241072510726107271072810729107301073110732107331073410735107361073710738107391074010741107421074310744107451074610747107481074910750107511075210753107541075510756107571075810759107601076110762107631076410765107661076710768107691077010771107721077310774107751077610777107781077910780107811078210783107841078510786107871078810789107901079110792107931079410795107961079710798107991080010801108021080310804108051080610807108081080910810108111081210813108141081510816108171081810819108201082110822108231082410825108261082710828108291083010831108321083310834108351083610837108381083910840108411084210843108441084510846108471084810849108501085110852108531085410855108561085710858108591086010861108621086310864108651086610867108681086910870108711087210873108741087510876108771087810879108801088110882108831088410885108861088710888108891089010891108921089310894108951089610897108981089910900109011090210903109041090510906109071090810909109101091110912109131091410915109161091710918109191092010921109221092310924109251092610927109281092910930109311093210933109341093510936109371093810939109401094110942109431094410945109461094710948109491095010951109521095310954109551095610957109581095910960109611096210963109641096510966109671096810969109701097110972109731097410975109761097710978109791098010981109821098310984109851098610987109881098910990109911099210993109941099510996109971099810999110001100111002110031100411005110061100711008110091101011011110121101311014110151101611017110181101911020110211102211023110241102511026110271102811029110301103111032110331103411035110361103711038110391104011041110421104311044110451104611047110481104911050110511105211053110541105511056110571105811059110601106111062110631106411065110661106711068110691107011071110721107311074110751107611077110781107911080110811108211083110841108511086110871108811089110901109111092110931109411095110961109711098110991110011101111021110311104111051110611107111081110911110111111111211113111141111511116111171111811119111201112111122111231112411125111261112711128111291113011131111321113311134111351113611137111381113911140111411114211143111441114511146111471114811149111501115111152111531115411155111561115711158111591116011161111621116311164111651116611167111681116911170111711117211173111741117511176111771117811179111801118111182111831118411185111861118711188111891119011191111921119311194111951119611197111981119911200112011120211203112041120511206112071120811209112101121111212112131121411215112161121711218112191122011221112221122311224112251122611227112281122911230112311123211233112341123511236112371123811239112401124111242112431124411245112461124711248112491125011251112521125311254112551125611257112581125911260112611126211263112641126511266112671126811269112701127111272112731127411275112761127711278112791128011281112821128311284112851128611287112881128911290112911129211293112941129511296112971129811299113001130111302113031130411305113061130711308113091131011311113121131311314113151131611317113181131911320113211132211323113241132511326113271132811329113301133111332113331133411335113361133711338113391134011341113421134311344113451134611347113481134911350113511135211353113541135511356113571135811359113601136111362113631136411365113661136711368113691137011371113721137311374113751137611377113781137911380113811138211383113841138511386113871138811389113901139111392113931139411395113961139711398113991140011401114021140311404114051140611407114081140911410114111141211413114141141511416114171141811419114201142111422114231142411425114261142711428114291143011431114321143311434114351143611437114381143911440114411144211443114441144511446114471144811449114501145111452114531145411455114561145711458114591146011461114621146311464114651146611467114681146911470114711147211473114741147511476114771147811479114801148111482114831148411485114861148711488114891149011491114921149311494114951149611497114981149911500115011150211503115041150511506115071150811509115101151111512115131151411515115161151711518115191152011521115221152311524115251152611527115281152911530115311153211533115341153511536115371153811539115401154111542115431154411545115461154711548115491155011551115521155311554115551155611557115581155911560115611156211563115641156511566115671156811569115701157111572115731157411575115761157711578115791158011581115821158311584115851158611587115881158911590115911159211593115941159511596115971159811599116001160111602116031160411605116061160711608116091161011611116121161311614116151161611617116181161911620116211162211623116241162511626116271162811629116301163111632116331163411635116361163711638116391164011641116421164311644116451164611647116481164911650116511165211653116541165511656116571165811659116601166111662116631166411665116661166711668116691167011671116721167311674116751167611677116781167911680116811168211683116841168511686116871168811689116901169111692116931169411695116961169711698116991170011701117021170311704117051170611707117081170911710117111171211713117141171511716117171171811719117201172111722117231172411725117261172711728117291173011731117321173311734117351173611737117381173911740117411174211743117441174511746117471174811749117501175111752117531175411755117561175711758117591176011761117621176311764117651176611767117681176911770117711177211773117741177511776117771177811779117801178111782117831178411785117861178711788117891179011791117921179311794117951179611797117981179911800118011180211803118041180511806118071180811809118101181111812118131181411815118161181711818118191182011821118221182311824118251182611827118281182911830118311183211833118341183511836118371183811839118401184111842118431184411845118461184711848118491185011851118521185311854118551185611857118581185911860118611186211863118641186511866118671186811869118701187111872118731187411875118761187711878118791188011881118821188311884118851188611887118881188911890118911189211893118941189511896118971189811899119001190111902119031190411905119061190711908119091191011911119121191311914119151191611917119181191911920119211192211923119241192511926119271192811929119301193111932119331193411935119361193711938119391194011941119421194311944119451194611947119481194911950119511195211953119541195511956119571195811959119601196111962119631196411965119661196711968119691197011971119721197311974119751197611977119781197911980119811198211983119841198511986119871198811989119901199111992119931199411995119961199711998119991200012001120021200312004120051200612007120081200912010120111201212013120141201512016120171201812019120201202112022120231202412025120261202712028120291203012031120321203312034120351203612037120381203912040120411204212043120441204512046120471204812049120501205112052120531205412055120561205712058120591206012061120621206312064120651206612067120681206912070120711207212073120741207512076120771207812079120801208112082120831208412085120861208712088120891209012091120921209312094120951209612097120981209912100121011210212103121041210512106121071210812109121101211112112121131211412115121161211712118121191212012121121221212312124121251212612127121281212912130121311213212133121341213512136121371213812139121401214112142121431214412145121461214712148121491215012151121521215312154121551215612157121581215912160121611216212163121641216512166121671216812169121701217112172121731217412175121761217712178121791218012181121821218312184121851218612187121881218912190121911219212193121941219512196121971219812199122001220112202122031220412205122061220712208122091221012211122121221312214122151221612217122181221912220122211222212223122241222512226122271222812229122301223112232122331223412235122361223712238122391224012241122421224312244122451224612247122481224912250122511225212253122541225512256122571225812259122601226112262122631226412265122661226712268122691227012271122721227312274122751227612277122781227912280122811228212283122841228512286122871228812289122901229112292122931229412295122961229712298122991230012301123021230312304123051230612307123081230912310123111231212313123141231512316123171231812319123201232112322123231232412325123261232712328123291233012331123321233312334123351233612337123381233912340123411234212343123441234512346123471234812349123501235112352123531235412355123561235712358123591236012361123621236312364123651236612367123681236912370123711237212373123741237512376123771237812379123801238112382123831238412385123861238712388123891239012391123921239312394123951239612397123981239912400124011240212403124041240512406124071240812409124101241112412124131241412415124161241712418124191242012421124221242312424124251242612427124281242912430124311243212433124341243512436124371243812439124401244112442124431244412445124461244712448124491245012451124521245312454124551245612457124581245912460124611246212463124641246512466124671246812469124701247112472124731247412475124761247712478124791248012481124821248312484124851248612487124881248912490124911249212493124941249512496124971249812499125001250112502125031250412505125061250712508125091251012511125121251312514125151251612517125181251912520125211252212523125241252512526125271252812529125301253112532125331253412535125361253712538125391254012541125421254312544125451254612547125481254912550125511255212553125541255512556125571255812559125601256112562125631256412565125661256712568125691257012571125721257312574125751257612577125781257912580125811258212583125841258512586125871258812589125901259112592125931259412595125961259712598125991260012601126021260312604126051260612607126081260912610126111261212613126141261512616126171261812619126201262112622126231262412625126261262712628126291263012631126321263312634126351263612637126381263912640126411264212643126441264512646126471264812649126501265112652126531265412655126561265712658126591266012661126621266312664126651266612667126681266912670126711267212673126741267512676126771267812679126801268112682126831268412685126861268712688126891269012691126921269312694126951269612697126981269912700127011270212703127041270512706127071270812709127101271112712127131271412715127161271712718127191272012721127221272312724127251272612727127281272912730127311273212733127341273512736127371273812739127401274112742127431274412745127461274712748127491275012751127521275312754127551275612757127581275912760127611276212763127641276512766127671276812769127701277112772127731277412775127761277712778127791278012781127821278312784127851278612787127881278912790127911279212793127941279512796127971279812799128001280112802128031280412805128061280712808128091281012811128121281312814128151281612817128181281912820128211282212823128241282512826128271282812829128301283112832128331283412835128361283712838128391284012841128421284312844128451284612847128481284912850128511285212853128541285512856128571285812859128601286112862128631286412865128661286712868128691287012871128721287312874128751287612877128781287912880128811288212883128841288512886128871288812889128901289112892128931289412895128961289712898128991290012901129021290312904129051290612907129081290912910129111291212913129141291512916129171291812919129201292112922129231292412925129261292712928129291293012931129321293312934129351293612937129381293912940129411294212943129441294512946129471294812949129501295112952129531295412955129561295712958129591296012961129621296312964129651296612967129681296912970129711297212973129741297512976129771297812979129801298112982129831298412985129861298712988129891299012991129921299312994129951299612997129981299913000130011300213003130041300513006130071300813009130101301113012130131301413015130161301713018130191302013021130221302313024130251302613027130281302913030130311303213033130341303513036130371303813039130401304113042130431304413045130461304713048130491305013051130521305313054130551305613057130581305913060130611306213063130641306513066130671306813069130701307113072130731307413075130761307713078130791308013081130821308313084130851308613087130881308913090130911309213093130941309513096130971309813099131001310113102131031310413105131061310713108131091311013111131121311313114131151311613117131181311913120131211312213123131241312513126131271312813129131301313113132131331313413135131361313713138131391314013141131421314313144131451314613147131481314913150131511315213153131541315513156131571315813159131601316113162131631316413165131661316713168131691317013171131721317313174131751317613177131781317913180131811318213183131841318513186131871318813189131901319113192131931319413195131961319713198131991320013201132021320313204132051320613207132081320913210132111321213213132141321513216132171321813219132201322113222132231322413225132261322713228132291323013231132321323313234132351323613237132381323913240132411324213243132441324513246132471324813249132501325113252132531325413255132561325713258132591326013261132621326313264132651326613267132681326913270132711327213273132741327513276132771327813279132801328113282132831328413285132861328713288132891329013291132921329313294132951329613297132981329913300133011330213303133041330513306133071330813309133101331113312133131331413315133161331713318133191332013321133221332313324133251332613327133281332913330133311333213333133341333513336133371333813339133401334113342133431334413345133461334713348133491335013351133521335313354133551335613357133581335913360133611336213363133641336513366133671336813369133701337113372133731337413375133761337713378133791338013381133821338313384133851338613387133881338913390133911339213393133941339513396133971339813399134001340113402134031340413405134061340713408134091341013411134121341313414134151341613417134181341913420134211342213423134241342513426134271342813429134301343113432134331343413435134361343713438134391344013441134421344313444134451344613447134481344913450134511345213453134541345513456134571345813459134601346113462134631346413465134661346713468134691347013471134721347313474134751347613477134781347913480134811348213483134841348513486134871348813489134901349113492134931349413495134961349713498134991350013501135021350313504135051350613507135081350913510135111351213513135141351513516135171351813519135201352113522135231352413525135261352713528135291353013531135321353313534135351353613537135381353913540135411354213543135441354513546135471354813549135501355113552135531355413555135561355713558135591356013561135621356313564135651356613567135681356913570135711357213573135741357513576135771357813579135801358113582135831358413585135861358713588135891359013591135921359313594135951359613597135981359913600136011360213603136041360513606136071360813609136101361113612136131361413615136161361713618136191362013621136221362313624136251362613627136281362913630136311363213633136341363513636136371363813639136401364113642136431364413645136461364713648136491365013651136521365313654136551365613657136581365913660136611366213663136641366513666136671366813669136701367113672136731367413675136761367713678136791368013681136821368313684136851368613687136881368913690136911369213693136941369513696136971369813699137001370113702137031370413705137061370713708137091371013711137121371313714137151371613717137181371913720137211372213723137241372513726137271372813729137301373113732137331373413735137361373713738137391374013741137421374313744137451374613747137481374913750137511375213753137541375513756137571375813759137601376113762137631376413765137661376713768137691377013771137721377313774137751377613777137781377913780137811378213783137841378513786137871378813789137901379113792137931379413795137961379713798137991380013801138021380313804138051380613807138081380913810138111381213813138141381513816138171381813819138201382113822138231382413825138261382713828138291383013831138321383313834138351383613837138381383913840138411384213843138441384513846138471384813849138501385113852138531385413855138561385713858138591386013861138621386313864138651386613867138681386913870138711387213873138741387513876138771387813879138801388113882138831388413885138861388713888138891389013891138921389313894138951389613897138981389913900139011390213903139041390513906139071390813909139101391113912139131391413915139161391713918139191392013921139221392313924139251392613927139281392913930139311393213933139341393513936139371393813939139401394113942139431394413945139461394713948139491395013951139521395313954139551395613957139581395913960139611396213963139641396513966139671396813969139701397113972139731397413975139761397713978139791398013981139821398313984139851398613987139881398913990139911399213993139941399513996139971399813999140001400114002140031400414005140061400714008140091401014011140121401314014140151401614017140181401914020140211402214023140241402514026140271402814029140301403114032140331403414035140361403714038140391404014041140421404314044140451404614047140481404914050140511405214053140541405514056140571405814059140601406114062140631406414065140661406714068140691407014071140721407314074140751407614077140781407914080140811408214083140841408514086140871408814089140901409114092140931409414095140961409714098140991410014101141021410314104141051410614107141081410914110141111411214113141141411514116141171411814119141201412114122141231412414125141261412714128141291413014131141321413314134141351413614137141381413914140141411414214143141441414514146141471414814149141501415114152141531415414155141561415714158141591416014161141621416314164141651416614167141681416914170141711417214173141741417514176141771417814179141801418114182141831418414185141861418714188141891419014191141921419314194141951419614197141981419914200142011420214203142041420514206142071420814209142101421114212142131421414215142161421714218142191422014221142221422314224142251422614227142281422914230142311423214233142341423514236142371423814239142401424114242142431424414245142461424714248142491425014251142521425314254142551425614257142581425914260142611426214263142641426514266142671426814269142701427114272142731427414275142761427714278142791428014281142821428314284142851428614287142881428914290142911429214293142941429514296142971429814299143001430114302143031430414305143061430714308143091431014311143121431314314143151431614317143181431914320143211432214323143241432514326143271432814329143301433114332143331433414335143361433714338143391434014341143421434314344143451434614347143481434914350143511435214353143541435514356143571435814359143601436114362143631436414365143661436714368143691437014371143721437314374143751437614377143781437914380143811438214383143841438514386143871438814389143901439114392143931439414395143961439714398143991440014401144021440314404144051440614407144081440914410144111441214413144141441514416144171441814419144201442114422144231442414425144261442714428144291443014431144321443314434144351443614437144381443914440144411444214443144441444514446144471444814449144501445114452144531445414455144561445714458144591446014461144621446314464144651446614467144681446914470144711447214473144741447514476144771447814479144801448114482144831448414485144861448714488144891449014491144921449314494144951449614497144981449914500145011450214503145041450514506145071450814509145101451114512145131451414515145161451714518145191452014521145221452314524145251452614527145281452914530145311453214533145341453514536145371453814539145401454114542145431454414545145461454714548145491455014551145521455314554145551455614557145581455914560145611456214563145641456514566145671456814569145701457114572145731457414575145761457714578145791458014581145821458314584145851458614587145881458914590145911459214593145941459514596145971459814599146001460114602146031460414605146061460714608146091461014611146121461314614146151461614617146181461914620146211462214623146241462514626146271462814629146301463114632146331463414635146361463714638146391464014641146421464314644146451464614647146481464914650146511465214653146541465514656146571465814659146601466114662146631466414665146661466714668146691467014671146721467314674146751467614677146781467914680146811468214683146841468514686146871468814689146901469114692146931469414695146961469714698146991470014701147021470314704147051470614707147081470914710147111471214713147141471514716147171471814719147201472114722147231472414725147261472714728147291473014731147321473314734147351473614737147381473914740147411474214743147441474514746147471474814749147501475114752147531475414755147561475714758147591476014761147621476314764147651476614767147681476914770147711477214773147741477514776147771477814779147801478114782147831478414785147861478714788147891479014791147921479314794147951479614797147981479914800148011480214803148041480514806148071480814809148101481114812148131481414815148161481714818148191482014821148221482314824148251482614827148281482914830148311483214833148341483514836148371483814839148401484114842148431484414845148461484714848148491485014851148521485314854148551485614857148581485914860148611486214863148641486514866148671486814869148701487114872148731487414875148761487714878148791488014881148821488314884148851488614887148881488914890148911489214893148941489514896148971489814899149001490114902149031490414905149061490714908149091491014911149121491314914149151491614917149181491914920149211492214923149241492514926149271492814929149301493114932149331493414935149361493714938149391494014941149421494314944149451494614947149481494914950149511495214953149541495514956149571495814959149601496114962149631496414965149661496714968149691497014971149721497314974149751497614977149781497914980149811498214983149841498514986149871498814989149901499114992149931499414995149961499714998149991500015001150021500315004150051500615007150081500915010150111501215013150141501515016150171501815019150201502115022150231502415025150261502715028150291503015031150321503315034150351503615037150381503915040150411504215043150441504515046150471504815049150501505115052150531505415055150561505715058150591506015061150621506315064150651506615067150681506915070150711507215073150741507515076150771507815079150801508115082150831508415085150861508715088150891509015091150921509315094150951509615097150981509915100151011510215103151041510515106151071510815109151101511115112151131511415115151161511715118151191512015121151221512315124151251512615127151281512915130151311513215133151341513515136151371513815139151401514115142151431514415145151461514715148151491515015151151521515315154151551515615157151581515915160151611516215163151641516515166151671516815169151701517115172151731517415175151761517715178151791518015181151821518315184151851518615187151881518915190151911519215193151941519515196151971519815199152001520115202152031520415205152061520715208152091521015211152121521315214152151521615217152181521915220152211522215223152241522515226152271522815229152301523115232152331523415235152361523715238152391524015241152421524315244152451524615247152481524915250152511525215253152541525515256152571525815259152601526115262152631526415265152661526715268152691527015271152721527315274152751527615277152781527915280152811528215283152841528515286152871528815289152901529115292152931529415295152961529715298152991530015301153021530315304153051530615307153081530915310153111531215313153141531515316153171531815319153201532115322153231532415325153261532715328153291533015331153321533315334153351533615337153381533915340153411534215343153441534515346153471534815349153501535115352153531535415355153561535715358153591536015361153621536315364153651536615367153681536915370153711537215373153741537515376153771537815379153801538115382153831538415385153861538715388153891539015391153921539315394153951539615397153981539915400154011540215403154041540515406154071540815409154101541115412154131541415415154161541715418154191542015421154221542315424154251542615427154281542915430154311543215433154341543515436154371543815439154401544115442154431544415445154461544715448154491545015451154521545315454154551545615457154581545915460154611546215463154641546515466154671546815469154701547115472154731547415475154761547715478154791548015481154821548315484154851548615487154881548915490154911549215493154941549515496154971549815499155001550115502155031550415505155061550715508155091551015511155121551315514155151551615517155181551915520155211552215523155241552515526155271552815529155301553115532155331553415535155361553715538155391554015541155421554315544155451554615547155481554915550155511555215553155541555515556155571555815559155601556115562155631556415565155661556715568155691557015571155721557315574155751557615577155781557915580155811558215583155841558515586155871558815589155901559115592155931559415595155961559715598155991560015601156021560315604156051560615607156081560915610156111561215613156141561515616156171561815619156201562115622156231562415625156261562715628156291563015631156321563315634156351563615637156381563915640156411564215643156441564515646156471564815649156501565115652156531565415655156561565715658156591566015661156621566315664156651566615667156681566915670156711567215673156741567515676156771567815679156801568115682156831568415685156861568715688156891569015691156921569315694156951569615697156981569915700157011570215703157041570515706157071570815709157101571115712157131571415715157161571715718157191572015721157221572315724157251572615727157281572915730157311573215733157341573515736157371573815739157401574115742157431574415745157461574715748157491575015751157521575315754157551575615757157581575915760157611576215763157641576515766157671576815769157701577115772157731577415775157761577715778157791578015781157821578315784157851578615787157881578915790157911579215793157941579515796157971579815799158001580115802158031580415805158061580715808158091581015811158121581315814158151581615817158181581915820158211582215823158241582515826158271582815829158301583115832158331583415835158361583715838158391584015841158421584315844158451584615847158481584915850158511585215853158541585515856158571585815859158601586115862158631586415865158661586715868158691587015871158721587315874158751587615877158781587915880158811588215883158841588515886158871588815889158901589115892158931589415895158961589715898158991590015901159021590315904159051590615907159081590915910159111591215913159141591515916159171591815919159201592115922159231592415925159261592715928159291593015931159321593315934159351593615937159381593915940159411594215943159441594515946159471594815949159501595115952159531595415955159561595715958159591596015961159621596315964159651596615967159681596915970159711597215973159741597515976159771597815979159801598115982159831598415985159861598715988159891599015991159921599315994159951599615997159981599916000160011600216003160041600516006160071600816009160101601116012160131601416015160161601716018160191602016021160221602316024160251602616027160281602916030160311603216033160341603516036160371603816039160401604116042160431604416045160461604716048160491605016051160521605316054160551605616057160581605916060160611606216063160641606516066160671606816069160701607116072160731607416075160761607716078160791608016081160821608316084160851608616087160881608916090160911609216093160941609516096160971609816099161001610116102161031610416105161061610716108161091611016111161121611316114161151611616117161181611916120161211612216123161241612516126161271612816129161301613116132161331613416135161361613716138161391614016141161421614316144161451614616147161481614916150161511615216153
  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>TokenComparator</type>
  41. <expected-output>Found 1 items</expected-output>
  42. </comparator>
  43. <comparator>
  44. <type>RegexpComparator</type>
  45. <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/file1</expected-output>
  46. </comparator>
  47. </comparators>
  48. </test>
  49. <test> <!-- TESTED -->
  50. <description>ls: file using relative path</description>
  51. <test-commands>
  52. <command>-fs NAMENODE -touchz file1</command>
  53. <command>-fs NAMENODE -ls file1</command>
  54. </test-commands>
  55. <cleanup-commands>
  56. <command>-fs NAMENODE -rm file1</command>
  57. </cleanup-commands>
  58. <comparators>
  59. <comparator>
  60. <type>TokenComparator</type>
  61. <expected-output>Found 1 items</expected-output>
  62. </comparator>
  63. <comparator>
  64. <type>RegexpComparator</type>
  65. <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*file1</expected-output>
  66. </comparator>
  67. </comparators>
  68. </test>
  69. <test> <!-- TESTED -->
  70. <description>ls: files using globbing</description>
  71. <test-commands>
  72. <command>-fs NAMENODE -touchz file1</command>
  73. <command>-fs NAMENODE -touchz file2</command>
  74. <command>-fs NAMENODE -touchz file3</command>
  75. <command>-fs NAMENODE -touchz file4</command>
  76. <command>-fs NAMENODE -ls file*</command>
  77. </test-commands>
  78. <cleanup-commands>
  79. <command>-fs NAMENODE -rm -r /user</command>
  80. </cleanup-commands>
  81. <comparators>
  82. <comparator>
  83. <type>RegexpComparator</type>
  84. <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*file1</expected-output>
  85. </comparator>
  86. <comparator>
  87. <type>RegexpComparator</type>
  88. <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*file2</expected-output>
  89. </comparator>
  90. <comparator>
  91. <type>RegexpComparator</type>
  92. <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*file3</expected-output>
  93. </comparator>
  94. <comparator>
  95. <type>RegexpComparator</type>
  96. <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*file4</expected-output>
  97. </comparator>
  98. </comparators>
  99. </test>
  100. <test> <!-- TESTED -->
  101. <description>ls: directory using absolute path</description>
  102. <test-commands>
  103. <command>-fs NAMENODE -mkdir /dir1</command>
  104. <command>-fs NAMENODE -ls /</command>
  105. </test-commands>
  106. <cleanup-commands>
  107. <command>-fs NAMENODE -rm -r /dir1</command>
  108. </cleanup-commands>
  109. <comparators>
  110. <comparator>
  111. <type>TokenComparator</type>
  112. <expected-output>Found 1 items</expected-output>
  113. </comparator>
  114. <comparator>
  115. <type>RegexpComparator</type>
  116. <expected-output>^drwxr-xr-x( )*-( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir1</expected-output>
  117. </comparator>
  118. </comparators>
  119. </test>
  120. <test> <!-- TESTED -->
  121. <description>ls: directory using relative path</description>
  122. <test-commands>
  123. <command>-fs NAMENODE -mkdir dir1</command>
  124. <command>-fs NAMENODE -ls </command>
  125. </test-commands>
  126. <cleanup-commands>
  127. <command>-fs NAMENODE -rm -r dir1</command>
  128. </cleanup-commands>
  129. <comparators>
  130. <comparator>
  131. <type>TokenComparator</type>
  132. <expected-output>Found 1 items</expected-output>
  133. </comparator>
  134. <comparator>
  135. <type>RegexpComparator</type>
  136. <expected-output>^drwxr-xr-x( )*-( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir1</expected-output>
  137. </comparator>
  138. </comparators>
  139. </test>
  140. <test> <!-- TESTED -->
  141. <description>ls: directory using globbing</description>
  142. <test-commands>
  143. <command>-fs NAMENODE -mkdir dir1</command>
  144. <command>-fs NAMENODE -mkdir dir2</command>
  145. <command>-fs NAMENODE -mkdir dir3</command>
  146. <command>-fs NAMENODE -mkdir dir4</command>
  147. <command>-fs NAMENODE -ls </command>
  148. </test-commands>
  149. <cleanup-commands>
  150. <command>-fs NAMENODE -rm -r /user</command>
  151. </cleanup-commands>
  152. <comparators>
  153. <comparator>
  154. <type>RegexpComparator</type>
  155. <expected-output>^drwxr-xr-x( )*-( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir1</expected-output>
  156. </comparator>
  157. <comparator>
  158. <type>RegexpComparator</type>
  159. <expected-output>^drwxr-xr-x( )*-( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir2</expected-output>
  160. </comparator>
  161. <comparator>
  162. <type>RegexpComparator</type>
  163. <expected-output>^drwxr-xr-x( )*-( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir3</expected-output>
  164. </comparator>
  165. <comparator>
  166. <type>RegexpComparator</type>
  167. <expected-output>^drwxr-xr-x( )*-( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir4</expected-output>
  168. </comparator>
  169. </comparators>
  170. </test>
  171. <test> <!-- TESTED -->
  172. <description>ls: file/directory that does not exist in /</description>
  173. <test-commands>
  174. <command>-fs NAMENODE -ls /file1</command>
  175. </test-commands>
  176. <cleanup-commands>
  177. </cleanup-commands>
  178. <comparators>
  179. <comparator>
  180. <type>RegexpComparator</type>
  181. <expected-output>^ls: `/file1': No such file or directory</expected-output>
  182. </comparator>
  183. </comparators>
  184. </test>
  185. <test> <!-- TESTED -->
  186. <description>ls: file/directory that does not exist in home directory (/user/username)</description>
  187. <test-commands>
  188. <command>-fs NAMENODE -ls /user</command>
  189. </test-commands>
  190. <cleanup-commands>
  191. </cleanup-commands>
  192. <comparators>
  193. <comparator>
  194. <type>RegexpComparator</type>
  195. <expected-output>^ls: `/user': No such file or directory</expected-output>
  196. </comparator>
  197. </comparators>
  198. </test>
  199. <test> <!-- TESTED -->
  200. <description>ls: Non-URI input file at Namenode's path</description>
  201. <test-commands>
  202. <command>-fs NAMENODE -touchz NAMENODE/file1</command>
  203. <command>-fs NAMENODE -ls NAMENODE/file1</command>
  204. </test-commands>
  205. <cleanup-commands>
  206. <command>-fs NAMENODE -rm NAMENODE/file1</command>
  207. </cleanup-commands>
  208. <comparators>
  209. <comparator>
  210. <type>TokenComparator</type>
  211. <expected-output>Found 1 items</expected-output>
  212. </comparator>
  213. <comparator>
  214. <type>RegexpComparator</type>
  215. <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/file1</expected-output>
  216. </comparator>
  217. </comparators>
  218. </test>
  219. <test> <!-- TESTED -->
  220. <description>ls: file at hdfs:// path</description>
  221. <test-commands>
  222. <command>-fs NAMENODE -touchz hdfs:///file1</command>
  223. <command>-fs NAMENODE -ls hdfs:///file1</command>
  224. </test-commands>
  225. <cleanup-commands>
  226. <command>-fs NAMENODE -rm hdfs:///file1</command>
  227. </cleanup-commands>
  228. <comparators>
  229. <comparator>
  230. <type>TokenComparator</type>
  231. <expected-output>Found 1 items</expected-output>
  232. </comparator>
  233. <comparator>
  234. <type>RegexpComparator</type>
  235. <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///file1</expected-output>
  236. </comparator>
  237. </comparators>
  238. </test>
  239. <test> <!-- TESTED -->
  240. <description>ls: Non-URI input file at Namenode's path using globing</description>
  241. <test-commands>
  242. <command>-fs NAMENODE -touchz NAMENODE/file1</command>
  243. <command>-fs NAMENODE -touchz NAMENODE/file2</command>
  244. <command>-fs NAMENODE -touchz NAMENODE/file3</command>
  245. <command>-fs NAMENODE -ls NAMENODE/file*</command>
  246. </test-commands>
  247. <cleanup-commands>
  248. <command>-fs NAMENODE -rm NAMENODE/file*</command>
  249. </cleanup-commands>
  250. <comparators>
  251. <comparator>
  252. <type>RegexpComparator</type>
  253. <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/file1</expected-output>
  254. </comparator>
  255. <comparator>
  256. <type>RegexpComparator</type>
  257. <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/file2</expected-output>
  258. </comparator>
  259. <comparator>
  260. <type>RegexpComparator</type>
  261. <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/file3</expected-output>
  262. </comparator>
  263. </comparators>
  264. </test>
  265. <test> <!-- TESTED -->
  266. <description>ls: file at hdfs:// path using globing</description>
  267. <test-commands>
  268. <command>-fs NAMENODE -touchz hdfs:///file1</command>
  269. <command>-fs NAMENODE -touchz hdfs:///file2</command>
  270. <command>-fs NAMENODE -touchz hdfs:///file3</command>
  271. <command>-fs NAMENODE -ls hdfs:///file*</command>
  272. </test-commands>
  273. <cleanup-commands>
  274. <command>-fs NAMENODE -rm hdfs:///file*</command>
  275. </cleanup-commands>
  276. <comparators>
  277. <comparator>
  278. <type>RegexpComparator</type>
  279. <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///file1</expected-output>
  280. </comparator>
  281. <comparator>
  282. <type>RegexpComparator</type>
  283. <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///file2</expected-output>
  284. </comparator>
  285. <comparator>
  286. <type>RegexpComparator</type>
  287. <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///file3</expected-output>
  288. </comparator>
  289. </comparators>
  290. </test>
  291. <test> <!-- TESTED -->
  292. <description>ls: Non-URI input dir at Namenode's path</description>
  293. <test-commands>
  294. <command>-fs NAMENODE -mkdir NAMENODE/user/dir1</command>
  295. <command>-fs NAMENODE -ls hdfs:///user/</command>
  296. </test-commands>
  297. <cleanup-commands>
  298. <command>-fs NAMENODE -rm hdfs:///user/dir1</command>
  299. </cleanup-commands>
  300. <comparators>
  301. <comparator>
  302. <type>RegexpComparator</type>
  303. <expected-output>Found [0-9] items</expected-output>
  304. </comparator>
  305. <comparator>
  306. <type>RegexpComparator</type>
  307. <expected-output>^drwxr-xr-x( )*-( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///user/dir1</expected-output>
  308. </comparator>
  309. </comparators>
  310. </test>
  311. <test> <!-- TESTED -->
  312. <description>ls: dir at hdfs:// path</description>
  313. <test-commands>
  314. <command>-fs NAMENODE -mkdir hdfs:///user/dir1</command>
  315. <command>-fs NAMENODE -ls hdfs:///user/</command>
  316. </test-commands>
  317. <cleanup-commands>
  318. <command>-fs NAMENODE -rm hdfs:///user/dir1</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( )*-( )*[a-z]*( )*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. </comparators>
  330. </test>
  331. <test> <!-- TESTED -->
  332. <description>ls: Non-URI input dir at Namenode's path using globing</description>
  333. <test-commands>
  334. <command>-fs NAMENODE -mkdir NAMENODE/user/dir1</command>
  335. <command>-fs NAMENODE -mkdir NAMENODE/user/dir2</command>
  336. <command>-fs NAMENODE -mkdir NAMENODE/user/dir3</command>
  337. <command>-fs NAMENODE -ls hdfs:///user/</command>
  338. </test-commands>
  339. <cleanup-commands>
  340. <command>-fs NAMENODE -rm hdfs:///user/dir*</command>
  341. </cleanup-commands>
  342. <comparators>
  343. <comparator>
  344. <type>RegexpComparator</type>
  345. <expected-output>Found [0-9] items</expected-output>
  346. </comparator>
  347. <comparator>
  348. <type>RegexpComparator</type>
  349. <expected-output>^drwxr-xr-x( )*-( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///user/dir1</expected-output>
  350. </comparator>
  351. <comparator>
  352. <type>RegexpComparator</type>
  353. <expected-output>^drwxr-xr-x( )*-( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///user/dir2</expected-output>
  354. </comparator>
  355. <comparator>
  356. <type>RegexpComparator</type>
  357. <expected-output>^drwxr-xr-x( )*-( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///user/dir3</expected-output>
  358. </comparator>
  359. </comparators>
  360. </test>
  361. <test> <!-- TESTED -->
  362. <description>ls: dir at hdfs:// path using globing</description>
  363. <test-commands>
  364. <command>-fs NAMENODE -mkdir hdfs:///user/dir1</command>
  365. <command>-fs NAMENODE -mkdir hdfs:///user/dir2</command>
  366. <command>-fs NAMENODE -mkdir hdfs:///user/dir3</command>
  367. <command>-fs NAMENODE -ls hdfs:///user/</command>
  368. </test-commands>
  369. <cleanup-commands>
  370. <command>-fs NAMENODE -rm hdfs:///user/dir*</command>
  371. </cleanup-commands>
  372. <comparators>
  373. <comparator>
  374. <type>RegexpComparator</type>
  375. <expected-output>Found [0-9] items</expected-output>
  376. </comparator>
  377. <comparator>
  378. <type>RegexpComparator</type>
  379. <expected-output>^drwxr-xr-x( )*-( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///user/dir1</expected-output>
  380. </comparator>
  381. <comparator>
  382. <type>RegexpComparator</type>
  383. <expected-output>^drwxr-xr-x( )*-( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///user/dir2</expected-output>
  384. </comparator>
  385. <comparator>
  386. <type>RegexpComparator</type>
  387. <expected-output>^drwxr-xr-x( )*-( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///user/dir3</expected-output>
  388. </comparator>
  389. </comparators>
  390. </test>
  391. <test> <!-- TESTED -->
  392. <description>ls: non-existent file/directory at hdfs:// path </description>
  393. <test-commands>
  394. <command>-fs NAMENODE -ls hdfs:///file1</command>
  395. </test-commands>
  396. <cleanup-commands>
  397. <!-- no cleanup -->
  398. </cleanup-commands>
  399. <comparators>
  400. <comparator>
  401. <type>RegexpComparator</type>
  402. <expected-output>^ls: `hdfs:///file1': No such file or directory</expected-output>
  403. </comparator>
  404. </comparators>
  405. </test>
  406. <test> <!-- TESTED -->
  407. <description>ls: non-existent file/directory in Namenode's path </description>
  408. <test-commands>
  409. <command>-fs NAMENODE -ls NAMENODE/file1</command>
  410. </test-commands>
  411. <cleanup-commands>
  412. <!-- no cleanup -->
  413. </cleanup-commands>
  414. <comparators>
  415. <comparator>
  416. <type>RegexpComparator</type>
  417. <expected-output>^ls: `hdfs://\w+[-.a-z0-9]*:[0-9]+/file1': No such file or directory</expected-output>
  418. </comparator>
  419. </comparators>
  420. </test>
  421. <!-- Tests for ls -R -->
  422. <test> <!-- TESTED -->
  423. <description>ls: files/directories using absolute path</description>
  424. <test-commands>
  425. <command>-fs NAMENODE -mkdir /dir0</command>
  426. <command>-fs NAMENODE -mkdir /dir0/dir1</command>
  427. <command>-fs NAMENODE -mkdir /dir0/dir1/dir1</command>
  428. <command>-fs NAMENODE -mkdir /dir0/dir1/dir2</command>
  429. <command>-fs NAMENODE -mkdir /dir0/dir2</command>
  430. <command>-fs NAMENODE -mkdir /dir0/dir2/dir1</command>
  431. <command>-fs NAMENODE -mkdir /dir0/dir2/dir2</command>
  432. <command>-fs NAMENODE -touchz /dir0/file0</command>
  433. <command>-fs NAMENODE -touchz /dir0/dir1/file1</command>
  434. <command>-fs NAMENODE -touchz /dir0/dir1/file2</command>
  435. <command>-fs NAMENODE -touchz /dir0/dir2/file1</command>
  436. <command>-fs NAMENODE -touchz /dir0/dir2/file2</command>
  437. <command>-fs NAMENODE -touchz /dir0/dir1/dir1/file1</command>
  438. <command>-fs NAMENODE -touchz /dir0/dir1/dir1/file2</command>
  439. <command>-fs NAMENODE -touchz /dir0/dir2/dir2/file1</command>
  440. <command>-fs NAMENODE -touchz /dir0/dir2/dir2/file2</command>
  441. <command>-fs NAMENODE -ls -R /dir0</command>
  442. </test-commands>
  443. <cleanup-commands>
  444. <command>-fs NAMENODE -rm -r /dir0</command>
  445. </cleanup-commands>
  446. <comparators>
  447. <comparator>
  448. <type>RegexpComparator</type>
  449. <expected-output>^drwxr-xr-x( )*-( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1</expected-output>
  450. </comparator>
  451. <comparator>
  452. <type>RegexpComparator</type>
  453. <expected-output>^drwxr-xr-x( )*-( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir2</expected-output>
  454. </comparator>
  455. <comparator>
  456. <type>RegexpComparator</type>
  457. <expected-output>^drwxr-xr-x( )*-( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1/dir1</expected-output>
  458. </comparator>
  459. <comparator>
  460. <type>RegexpComparator</type>
  461. <expected-output>^drwxr-xr-x( )*-( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1/dir2</expected-output>
  462. </comparator>
  463. <comparator>
  464. <type>RegexpComparator</type>
  465. <expected-output>^drwxr-xr-x( )*-( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir2/dir1</expected-output>
  466. </comparator>
  467. <comparator>
  468. <type>RegexpComparator</type>
  469. <expected-output>^drwxr-xr-x( )*-( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir2/dir2</expected-output>
  470. </comparator>
  471. <comparator>
  472. <type>RegexpComparator</type>
  473. <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/file0</expected-output>
  474. </comparator>
  475. <comparator>
  476. <type>RegexpComparator</type>
  477. <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1/file1</expected-output>
  478. </comparator>
  479. <comparator>
  480. <type>RegexpComparator</type>
  481. <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1/file2</expected-output>
  482. </comparator>
  483. <comparator>
  484. <type>RegexpComparator</type>
  485. <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir2/file1</expected-output>
  486. </comparator>
  487. <comparator>
  488. <type>RegexpComparator</type>
  489. <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir2/file2</expected-output>
  490. </comparator>
  491. <comparator>
  492. <type>RegexpComparator</type>
  493. <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1/dir1/file1</expected-output>
  494. </comparator>
  495. <comparator>
  496. <type>RegexpComparator</type>
  497. <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1/dir1/file2</expected-output>
  498. </comparator>
  499. <comparator>
  500. <type>RegexpComparator</type>
  501. <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir2/dir2/file1</expected-output>
  502. </comparator>
  503. <comparator>
  504. <type>RegexpComparator</type>
  505. <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir2/dir2/file2</expected-output>
  506. </comparator>
  507. </comparators>
  508. </test>
  509. <test> <!-- TESTED -->
  510. <description>ls: files/directories using relative path</description>
  511. <test-commands>
  512. <command>-fs NAMENODE -mkdir dir0</command>
  513. <command>-fs NAMENODE -mkdir dir0/dir1</command>
  514. <command>-fs NAMENODE -mkdir dir0/dir1/dir1</command>
  515. <command>-fs NAMENODE -mkdir dir0/dir1/dir2</command>
  516. <command>-fs NAMENODE -mkdir dir0/dir2</command>
  517. <command>-fs NAMENODE -mkdir dir0/dir2/dir1</command>
  518. <command>-fs NAMENODE -mkdir dir0/dir2/dir2</command>
  519. <command>-fs NAMENODE -touchz dir0/file0</command>
  520. <command>-fs NAMENODE -touchz dir0/dir1/file1</command>
  521. <command>-fs NAMENODE -touchz dir0/dir1/file2</command>
  522. <command>-fs NAMENODE -touchz dir0/dir2/file1</command>
  523. <command>-fs NAMENODE -touchz dir0/dir2/file2</command>
  524. <command>-fs NAMENODE -touchz dir0/dir1/dir1/file1</command>
  525. <command>-fs NAMENODE -touchz dir0/dir1/dir1/file2</command>
  526. <command>-fs NAMENODE -touchz dir0/dir2/dir2/file1</command>
  527. <command>-fs NAMENODE -touchz dir0/dir2/dir2/file2</command>
  528. <command>-fs NAMENODE -ls -R dir0</command>
  529. </test-commands>
  530. <cleanup-commands>
  531. <command>-fs NAMENODE -rm -r /user</command>
  532. </cleanup-commands>
  533. <comparators>
  534. <comparator>
  535. <type>RegexpComparator</type>
  536. <expected-output>^drwxr-xr-x( )*-( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/dir1</expected-output>
  537. </comparator>
  538. <comparator>
  539. <type>RegexpComparator</type>
  540. <expected-output>^drwxr-xr-x( )*-( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/dir2</expected-output>
  541. </comparator>
  542. <comparator>
  543. <type>RegexpComparator</type>
  544. <expected-output>^drwxr-xr-x( )*-( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/dir1/dir1</expected-output>
  545. </comparator>
  546. <comparator>
  547. <type>RegexpComparator</type>
  548. <expected-output>^drwxr-xr-x( )*-( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/dir1/dir2</expected-output>
  549. </comparator>
  550. <comparator>
  551. <type>RegexpComparator</type>
  552. <expected-output>^drwxr-xr-x( )*-( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/dir2/dir1</expected-output>
  553. </comparator>
  554. <comparator>
  555. <type>RegexpComparator</type>
  556. <expected-output>^drwxr-xr-x( )*-( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/dir2/dir2</expected-output>
  557. </comparator>
  558. <comparator>
  559. <type>RegexpComparator</type>
  560. <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/file0</expected-output>
  561. </comparator>
  562. <comparator>
  563. <type>RegexpComparator</type>
  564. <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/dir1/file1</expected-output>
  565. </comparator>
  566. <comparator>
  567. <type>RegexpComparator</type>
  568. <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/dir1/file2</expected-output>
  569. </comparator>
  570. <comparator>
  571. <type>RegexpComparator</type>
  572. <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/dir2/file1</expected-output>
  573. </comparator>
  574. <comparator>
  575. <type>RegexpComparator</type>
  576. <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/dir2/file2</expected-output>
  577. </comparator>
  578. <comparator>
  579. <type>RegexpComparator</type>
  580. <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/dir1/dir1/file1</expected-output>
  581. </comparator>
  582. <comparator>
  583. <type>RegexpComparator</type>
  584. <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/dir1/dir1/file2</expected-output>
  585. </comparator>
  586. <comparator>
  587. <type>RegexpComparator</type>
  588. <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/dir2/dir2/file1</expected-output>
  589. </comparator>
  590. <comparator>
  591. <type>RegexpComparator</type>
  592. <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/dir2/dir2/file2</expected-output>
  593. </comparator>
  594. </comparators>
  595. </test>
  596. <test> <!-- TESTED -->
  597. <description>ls: files/directories using globbing</description>
  598. <test-commands>
  599. <command>-fs NAMENODE -mkdir dir0</command>
  600. <command>-fs NAMENODE -mkdir dir0/dir1</command>
  601. <command>-fs NAMENODE -mkdir dir0/dir1/dir1</command>
  602. <command>-fs NAMENODE -mkdir dir0/dir1/dir2</command>
  603. <command>-fs NAMENODE -mkdir dir0/dir2</command>
  604. <command>-fs NAMENODE -mkdir dir0/dir2/dir1</command>
  605. <command>-fs NAMENODE -mkdir dir0/dir2/dir2</command>
  606. <command>-fs NAMENODE -touchz dir0/file0</command>
  607. <command>-fs NAMENODE -touchz dir0/dir1/file1</command>
  608. <command>-fs NAMENODE -touchz dir0/dir1/file2</command>
  609. <command>-fs NAMENODE -touchz dir0/dir2/file1</command>
  610. <command>-fs NAMENODE -touchz dir0/dir2/file2</command>
  611. <command>-fs NAMENODE -touchz dir0/dir1/dir1/file1</command>
  612. <command>-fs NAMENODE -touchz dir0/dir1/dir1/file2</command>
  613. <command>-fs NAMENODE -touchz dir0/dir2/dir2/file1</command>
  614. <command>-fs NAMENODE -touchz dir0/dir2/dir2/file2</command>
  615. <command>-fs NAMENODE -ls -R dir0/*</command>
  616. </test-commands>
  617. <cleanup-commands>
  618. <command>-fs NAMENODE -rm -r /user</command>
  619. </cleanup-commands>
  620. <comparators>
  621. <!-- JIRA?
  622. <comparator>
  623. <type>RegexpComparator</type>
  624. <expected-output>^/user/[a-z]*/dir0/dir1</expected-output>
  625. </comparator>
  626. <comparator>
  627. <type>RegexpComparator</type>
  628. <expected-output>^/user/[a-z]*/dir0/dir2</expected-output>
  629. </comparator>
  630. -->
  631. <comparator>
  632. <type>RegexpComparator</type>
  633. <expected-output>^drwxr-xr-x( )*-( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/dir1/dir1</expected-output>
  634. </comparator>
  635. <comparator>
  636. <type>RegexpComparator</type>
  637. <expected-output>^drwxr-xr-x( )*-( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/dir1/dir2</expected-output>
  638. </comparator>
  639. <comparator>
  640. <type>RegexpComparator</type>
  641. <expected-output>^drwxr-xr-x( )*-( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/dir2/dir1</expected-output>
  642. </comparator>
  643. <comparator>
  644. <type>RegexpComparator</type>
  645. <expected-output>^drwxr-xr-x( )*-( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/dir2/dir2</expected-output>
  646. </comparator>
  647. <comparator>
  648. <type>RegexpComparator</type>
  649. <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/file0</expected-output>
  650. </comparator>
  651. <comparator>
  652. <type>RegexpComparator</type>
  653. <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/dir1/file1</expected-output>
  654. </comparator>
  655. <comparator>
  656. <type>RegexpComparator</type>
  657. <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/dir1/file2</expected-output>
  658. </comparator>
  659. <comparator>
  660. <type>RegexpComparator</type>
  661. <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/dir2/file1</expected-output>
  662. </comparator>
  663. <comparator>
  664. <type>RegexpComparator</type>
  665. <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/dir2/file2</expected-output>
  666. </comparator>
  667. <comparator>
  668. <type>RegexpComparator</type>
  669. <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/dir1/dir1/file1</expected-output>
  670. </comparator>
  671. <comparator>
  672. <type>RegexpComparator</type>
  673. <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/dir1/dir1/file2</expected-output>
  674. </comparator>
  675. <comparator>
  676. <type>RegexpComparator</type>
  677. <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/dir2/dir2/file1</expected-output>
  678. </comparator>
  679. <comparator>
  680. <type>RegexpComparator</type>
  681. <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/dir2/dir2/file2</expected-output>
  682. </comparator>
  683. </comparators>
  684. </test>
  685. <test> <!-- TESTED -->
  686. <description>ls: file/directory that does not exist in /</description>
  687. <test-commands>
  688. <command>-fs NAMENODE -ls -R /file1</command>
  689. </test-commands>
  690. <cleanup-commands>
  691. </cleanup-commands>
  692. <comparators>
  693. <comparator>
  694. <type>RegexpComparator</type>
  695. <expected-output>^ls: `/file1': No such file or directory</expected-output>
  696. </comparator>
  697. </comparators>
  698. </test>
  699. <test> <!-- TESTED -->
  700. <description>ls: file/directory that does not exist in home directory (/user/username)</description>
  701. <test-commands>
  702. <command>-fs NAMENODE -ls -R /user</command>
  703. </test-commands>
  704. <cleanup-commands>
  705. </cleanup-commands>
  706. <comparators>
  707. <comparator>
  708. <type>RegexpComparator</type>
  709. <expected-output>^ls: `/user': No such file or directory</expected-output>
  710. </comparator>
  711. </comparators>
  712. </test>
  713. <test> <!-- TESTED -->
  714. <description>ls: dir at hdfs:// path</description>
  715. <test-commands>
  716. <command>-fs NAMENODE -mkdir hdfs:///dir0</command>
  717. <command>-fs NAMENODE -mkdir hdfs:///dir0/dir1</command>
  718. <command>-fs NAMENODE -touchz hdfs:///file1</command>
  719. <command>-fs NAMENODE -touchz hdfs:///dir0/file1</command>
  720. <command>-fs NAMENODE -touchz hdfs:///dir0/dir1/file1</command>
  721. <command>-fs NAMENODE -ls -R hdfs:///</command>
  722. </test-commands>
  723. <cleanup-commands>
  724. <command>-fs NAMENODE -rm hdfs:///dir0</command>
  725. <command>-fs NAMENODE -rm hdfs:///file1</command>
  726. </cleanup-commands>
  727. <comparators>
  728. <comparator>
  729. <type>RegexpComparator</type>
  730. <expected-output>^drwxr-xr-x( )*-( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir0</expected-output>
  731. </comparator>
  732. <comparator>
  733. <type>RegexpComparator</type>
  734. <expected-output>^drwxr-xr-x( )*-( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir0/dir1</expected-output>
  735. </comparator>
  736. <comparator>
  737. <type>RegexpComparator</type>
  738. <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///file1</expected-output>
  739. </comparator>
  740. <comparator>
  741. <type>RegexpComparator</type>
  742. <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir0/file1</expected-output>
  743. </comparator>
  744. <comparator>
  745. <type>RegexpComparator</type>
  746. <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir0/dir1/file1</expected-output>
  747. </comparator>
  748. </comparators>
  749. </test>
  750. <test> <!-- TESTED -->
  751. <description>ls: files/directories in hdfs:// path using globbing</description>
  752. <test-commands>
  753. <command>-fs NAMENODE -mkdir hdfs:///dir0</command>
  754. <command>-fs NAMENODE -mkdir hdfs:///dir0/dir1</command>
  755. <command>-fs NAMENODE -touchz hdfs:///dir0/file1</command>
  756. <command>-fs NAMENODE -touchz hdfs:///dir0/dir1/file1</command>
  757. <command>-fs NAMENODE -ls -R hdfs:///dir0/*</command>
  758. </test-commands>
  759. <cleanup-commands>
  760. <command>-fs NAMENODE -rm -r hdfs:///dir0</command>
  761. </cleanup-commands>
  762. <comparators>
  763. <comparator>
  764. <type>RegexpComparator</type>
  765. <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir0/file1</expected-output>
  766. </comparator>
  767. <comparator>
  768. <type>RegexpComparator</type>
  769. <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir0/dir1/file1</expected-output>
  770. </comparator>
  771. </comparators>
  772. </test>
  773. <test> <!-- TESTED -->
  774. <description>ls: Non-existent file/directory in hdfs:// path</description>
  775. <test-commands>
  776. <command>-fs NAMENODE -ls -R hdfs:///file1</command>
  777. </test-commands>
  778. <cleanup-commands>
  779. </cleanup-commands>
  780. <comparators>
  781. <comparator>
  782. <type>RegexpComparator</type>
  783. <expected-output>^ls: `hdfs:///file1': No such file or directory</expected-output>
  784. </comparator>
  785. </comparators>
  786. </test>
  787. <test> <!-- TESTED -->
  788. <description>ls: dir at Namenode's path</description>
  789. <test-commands>
  790. <command>-fs NAMENODE -mkdir NAMENODE/dir0</command>
  791. <command>-fs NAMENODE -mkdir NAMENODE/dir0/dir1</command>
  792. <command>-fs NAMENODE -touchz NAMENODE/file1</command>
  793. <command>-fs NAMENODE -touchz NAMENODE/dir0/file1</command>
  794. <command>-fs NAMENODE -touchz NAMENODE/dir0/dir1/file1</command>
  795. <command>-fs NAMENODE -ls -R NAMENODE/</command>
  796. </test-commands>
  797. <cleanup-commands>
  798. <command>-fs NAMENODE -rm hdfs:///dir0</command>
  799. <command>-fs NAMENODE -rm hdfs:///file1</command>
  800. </cleanup-commands>
  801. <comparators>
  802. <comparator>
  803. <type>RegexpComparator</type>
  804. <expected-output>^drwxr-xr-x( )*-( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir0</expected-output>
  805. </comparator>
  806. <comparator>
  807. <type>RegexpComparator</type>
  808. <expected-output>^drwxr-xr-x( )*-( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir0/dir1</expected-output>
  809. </comparator>
  810. <comparator>
  811. <type>RegexpComparator</type>
  812. <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/file1</expected-output>
  813. </comparator>
  814. <comparator>
  815. <type>RegexpComparator</type>
  816. <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir0/file1</expected-output>
  817. </comparator>
  818. <comparator>
  819. <type>RegexpComparator</type>
  820. <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir0/dir1/file1</expected-output>
  821. </comparator>
  822. </comparators>
  823. </test>
  824. <test> <!-- TESTED -->
  825. <description>ls: Non-URI input files/directories in Namenode's path </description>
  826. <test-commands>
  827. <command>-fs NAMENODE -mkdir NAMENODE/dir0</command>
  828. <command>-fs NAMENODE -mkdir NAMENODE/dir0/dir1</command>
  829. <command>-fs NAMENODE -touchz NAMENODE/dir0/file1</command>
  830. <command>-fs NAMENODE -touchz NAMENODE/dir0/dir1/file1</command>
  831. <command>-fs NAMENODE -ls -R NAMENODE/dir0/*</command>
  832. </test-commands>
  833. <cleanup-commands>
  834. <command>-fs NAMENODE -rm -r NAMENODE/dir0</command>
  835. </cleanup-commands>
  836. <comparators>
  837. <comparator>
  838. <type>RegexpComparator</type>
  839. <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir0/file1</expected-output>
  840. </comparator>
  841. <comparator>
  842. <type>RegexpComparator</type>
  843. <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir0/dir1/file1</expected-output>
  844. </comparator>
  845. </comparators>
  846. </test>
  847. <test> <!-- TESTED -->
  848. <description>ls: Non-URI input for non-existent file/directory in Namenode's path </description>
  849. <test-commands>
  850. <command>-fs NAMENODE -ls -R NAMENODE/file1</command>
  851. </test-commands>
  852. <cleanup-commands>
  853. </cleanup-commands>
  854. <comparators>
  855. <comparator>
  856. <type>RegexpComparator</type>
  857. <expected-output>^ls: `hdfs://\w+[-.a-z0-9]*:[0-9]+/file1': No such file or directory</expected-output>
  858. </comparator>
  859. </comparators>
  860. </test>
  861. <test> <!-- TESTED -->
  862. <description>ls: Test for /*/* globbing </description>
  863. <test-commands>
  864. <command>-fs NAMENODE -mkdir /dir0</command>
  865. <command>-fs NAMENODE -mkdir /dir0/dir1</command>
  866. <command>-fs NAMENODE -touchz /dir0/dir1/file1</command>
  867. <command>-fs NAMENODE -ls -R /\*/\*</command>
  868. </test-commands>
  869. <cleanup-commands>
  870. <command>-fs NAMENODE -rm -r /dir0</command>
  871. </cleanup-commands>
  872. <comparators>
  873. <comparator>
  874. <type>RegexpComparator</type>
  875. <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1/file1</expected-output>
  876. </comparator>
  877. </comparators>
  878. </test>
  879. <!-- Tests for du -->
  880. <test> <!-- TESTED -->
  881. <description>du: file using absolute path</description>
  882. <test-commands>
  883. <command>-fs NAMENODE -put CLITEST_DATA/data15bytes /data15bytes</command>
  884. <command>-fs NAMENODE -du /data15bytes</command>
  885. </test-commands>
  886. <cleanup-commands>
  887. <command>-fs NAMENODE -rm /data15bytes</command>
  888. </cleanup-commands>
  889. <comparators>
  890. <comparator>
  891. <type>RegexpComparator</type>
  892. <expected-output>^15\s+/data15bytes</expected-output>
  893. </comparator>
  894. </comparators>
  895. </test>
  896. <test> <!-- TESTED -->
  897. <description>du: file using relative path</description>
  898. <test-commands>
  899. <command>-fs NAMENODE -touchz test</command> <!-- make sure user home dir exists -->
  900. <command>-fs NAMENODE -put CLITEST_DATA/data15bytes data15bytesZZ</command>
  901. <command>-fs NAMENODE -du data15bytesZZ</command>
  902. </test-commands>
  903. <cleanup-commands>
  904. <command>-fs NAMENODE -rm data15bytesZZ</command>
  905. </cleanup-commands>
  906. <comparators>
  907. <comparator>
  908. <type>RegexpComparator</type>
  909. <expected-output>^15\s+data15bytesZZ</expected-output>
  910. </comparator>
  911. </comparators>
  912. </test>
  913. <test> <!-- TESTED -->
  914. <description>du: files using globbing</description>
  915. <test-commands>
  916. <command>-fs NAMENODE -put CLITEST_DATA/data15bytes data15bytes</command>
  917. <command>-fs NAMENODE -put CLITEST_DATA/data30bytes data30bytes</command>
  918. <command>-fs NAMENODE -put CLITEST_DATA/data60bytes data60bytes</command>
  919. <command>-fs NAMENODE -put CLITEST_DATA/data120bytes data120bytes</command>
  920. <command>-fs NAMENODE -du data*</command>
  921. </test-commands>
  922. <cleanup-commands>
  923. <command>-fs NAMENODE -rm data*bytes</command>
  924. </cleanup-commands>
  925. <comparators>
  926. <comparator>
  927. <type>RegexpComparator</type>
  928. <expected-output>^120\s+data120bytes</expected-output>
  929. </comparator>
  930. <comparator>
  931. <type>RegexpComparator</type>
  932. <expected-output>^15\s+data15bytes</expected-output>
  933. </comparator>
  934. <comparator>
  935. <type>RegexpComparator</type>
  936. <expected-output>^30\s+data30bytes</expected-output>
  937. </comparator>
  938. <comparator>
  939. <type>RegexpComparator</type>
  940. <expected-output>^60\s+data60bytes</expected-output>
  941. </comparator>
  942. </comparators>
  943. </test>
  944. <test> <!-- TESTED -->
  945. <description>du: directory using absolute path</description>
  946. <test-commands>
  947. <command>-fs NAMENODE -mkdir /dir0</command>
  948. <command>-fs NAMENODE -put CLITEST_DATA/data15bytes /dir0/data15bytes</command>
  949. <command>-fs NAMENODE -du /dir0</command>
  950. </test-commands>
  951. <cleanup-commands>
  952. <command>-fs NAMENODE -rm -r /dir0</command>
  953. </cleanup-commands>
  954. <comparators>
  955. <comparator>
  956. <type>RegexpComparator</type>
  957. <expected-output>^15\s+/dir0/data15bytes</expected-output>
  958. </comparator>
  959. </comparators>
  960. </test>
  961. <test> <!-- TESTED -->
  962. <description>du: directory using relative path</description>
  963. <test-commands>
  964. <command>-fs NAMENODE -mkdir dir0</command>
  965. <command>-fs NAMENODE -put CLITEST_DATA/data15bytes dir0/data15bytes</command>
  966. <command>-fs NAMENODE -du dir0</command>
  967. </test-commands>
  968. <cleanup-commands>
  969. <command>-fs NAMENODE -rm -r /user</command>
  970. </cleanup-commands>
  971. <comparators>
  972. <comparator>
  973. <type>RegexpComparator</type>
  974. <expected-output>^15\s+dir0/data15bytes</expected-output>
  975. </comparator>
  976. </comparators>
  977. </test>
  978. <test> <!-- TESTED -->
  979. <description>du: directory using globbing</description>
  980. <test-commands>
  981. <command>-fs NAMENODE -mkdir /dir0</command>
  982. <command>-fs NAMENODE -put CLITEST_DATA/data15bytes /dir0/data15bytes</command>
  983. <command>-fs NAMENODE -put CLITEST_DATA/data30bytes /dir0/data30bytes</command>
  984. <command>-fs NAMENODE -put CLITEST_DATA/data60bytes /dir0/data60bytes</command>
  985. <command>-fs NAMENODE -put CLITEST_DATA/data120bytes /dir0/data120bytes</command>
  986. <command>-fs NAMENODE -du /dir0/*</command>
  987. </test-commands>
  988. <cleanup-commands>
  989. <command>-fs NAMENODE -rm -r /dir0</command>
  990. </cleanup-commands>
  991. <comparators>
  992. <comparator>
  993. <type>RegexpComparator</type>
  994. <expected-output>^15( |\t)*/dir0/data15bytes</expected-output>
  995. </comparator>
  996. <comparator>
  997. <type>RegexpComparator</type>
  998. <expected-output>^30( |\t)*/dir0/data30bytes</expected-output>
  999. </comparator>
  1000. <comparator>
  1001. <type>RegexpComparator</type>
  1002. <expected-output>^60( |\t)*/dir0/data60bytes</expected-output>
  1003. </comparator>
  1004. <comparator>
  1005. <type>RegexpComparator</type>
  1006. <expected-output>^120( |\t)*/dir0/data120bytes</expected-output>
  1007. </comparator>
  1008. </comparators>
  1009. </test>
  1010. <test> <!-- TESTED -->
  1011. <description>du: Test for hdfs:// path - file</description>
  1012. <test-commands>
  1013. <command>-fs NAMENODE -put CLITEST_DATA/data15bytes hdfs:///data15bytes</command>
  1014. <command>-fs NAMENODE -du hdfs:///data15bytes</command>
  1015. </test-commands>
  1016. <cleanup-commands>
  1017. <command>-fs NAMENODE -rm hdfs:///data15bytes</command>
  1018. </cleanup-commands>
  1019. <comparators>
  1020. <comparator>
  1021. <type>RegexpComparator</type>
  1022. <expected-output>^15\s+hdfs:///data15bytes</expected-output>
  1023. </comparator>
  1024. </comparators>
  1025. </test>
  1026. <test> <!-- TESTED -->
  1027. <description>du: Test for hdfs:// path - files using globbing</description>
  1028. <test-commands>
  1029. <command>-fs NAMENODE -put CLITEST_DATA/data15bytes hdfs:///data15bytes</command>
  1030. <command>-fs NAMENODE -put CLITEST_DATA/data30bytes hdfs:///data30bytes</command>
  1031. <command>-fs NAMENODE -put CLITEST_DATA/data60bytes hdfs:///data60bytes</command>
  1032. <command>-fs NAMENODE -put CLITEST_DATA/data120bytes hdfs:///data120bytes</command>
  1033. <command>-fs NAMENODE -du hdfs:///data*</command>
  1034. </test-commands>
  1035. <cleanup-commands>
  1036. <command>-fs NAMENODE -rm -r hdfs:///*</command>
  1037. </cleanup-commands>
  1038. <comparators>
  1039. <comparator>
  1040. <type>RegexpComparator</type>
  1041. <expected-output>^120\s+hdfs:///data120bytes</expected-output>
  1042. </comparator>
  1043. <comparator>
  1044. <type>RegexpComparator</type>
  1045. <expected-output>^15\s+hdfs:///data15bytes</expected-output>
  1046. </comparator>
  1047. <comparator>
  1048. <type>RegexpComparator</type>
  1049. <expected-output>^30\s+hdfs:///data30bytes</expected-output>
  1050. </comparator>
  1051. <comparator>
  1052. <type>RegexpComparator</type>
  1053. <expected-output>^60\s+hdfs:///data60bytes</expected-output>
  1054. </comparator>
  1055. </comparators>
  1056. </test>
  1057. <test> <!-- TESTED -->
  1058. <description>du: Test for hdfs:// path - directory</description>
  1059. <test-commands>
  1060. <command>-fs NAMENODE -mkdir hdfs:///dir0</command>
  1061. <command>-fs NAMENODE -put CLITEST_DATA/data15bytes hdfs:///dir0/data15bytes</command>
  1062. <command>-fs NAMENODE -du hdfs:///dir0</command>
  1063. </test-commands>
  1064. <cleanup-commands>
  1065. <command>-fs NAMENODE -rm -r hdfs:///dir0</command>
  1066. </cleanup-commands>
  1067. <comparators>
  1068. <comparator>
  1069. <type>RegexpComparator</type>
  1070. <expected-output>^15\s+hdfs:///dir0/data15bytes</expected-output>
  1071. </comparator>
  1072. </comparators>
  1073. </test>
  1074. <test> <!-- TESTED -->
  1075. <description>duh: Test for hdfs:// path - directory</description>
  1076. <test-commands>
  1077. <command>-fs NAMENODE -mkdir hdfs:///dir0</command>
  1078. <command>-fs NAMENODE -put CLITEST_DATA/data15bytes hdfs:///dir0/data15bytes</command>
  1079. <command>-fs NAMENODE -put CLITEST_DATA/data1k hdfs:///dir0/data1k</command>
  1080. <command>-fs NAMENODE -du -h hdfs:///dir0</command>
  1081. </test-commands>
  1082. <cleanup-commands>
  1083. <command>-fs NAMENODE -rm -r hdfs:///dir0</command>
  1084. </cleanup-commands>
  1085. <comparators>
  1086. <comparator>
  1087. <type>RegexpComparator</type>
  1088. <expected-output>^15\s+hdfs:///dir0/data15bytes</expected-output>
  1089. </comparator>
  1090. <comparator>
  1091. <type>RegexpComparator</type>
  1092. <expected-output>^1\.0k\s+hdfs:///dir0/data1k</expected-output>
  1093. </comparator>
  1094. </comparators>
  1095. </test>
  1096. <test> <!-- TESTED -->
  1097. <description>du: Test for hdfs:// path - directory using globbing</description>
  1098. <test-commands>
  1099. <command>-fs NAMENODE -mkdir hdfs:///dir0</command>
  1100. <command>-fs NAMENODE -put CLITEST_DATA/data15bytes hdfs:///dir0/data15bytes</command>
  1101. <command>-fs NAMENODE -put CLITEST_DATA/data30bytes hdfs:///dir0/data30bytes</command>
  1102. <command>-fs NAMENODE -put CLITEST_DATA/data60bytes hdfs:///dir0/data60bytes</command>
  1103. <command>-fs NAMENODE -put CLITEST_DATA/data120bytes hdfs:///dir0/data120bytes</command>
  1104. <command>-fs NAMENODE -du hdfs:///dir0/*</command>
  1105. </test-commands>
  1106. <cleanup-commands>
  1107. <command>-fs NAMENODE -rm -r hdfs:///dir0</command>
  1108. </cleanup-commands>
  1109. <comparators>
  1110. <comparator>
  1111. <type>RegexpComparator</type>
  1112. <expected-output>^15( |\t)*hdfs:///dir0/data15bytes</expected-output>
  1113. </comparator>
  1114. <comparator>
  1115. <type>RegexpComparator</type>
  1116. <expected-output>^30( |\t)*hdfs:///dir0/data30bytes</expected-output>
  1117. </comparator>
  1118. <comparator>
  1119. <type>RegexpComparator</type>
  1120. <expected-output>^60( |\t)*hdfs:///dir0/data60bytes</expected-output>
  1121. </comparator>
  1122. <comparator>
  1123. <type>RegexpComparator</type>
  1124. <expected-output>^120( |\t)*hdfs:///dir0/data120bytes</expected-output>
  1125. </comparator>
  1126. </comparators>
  1127. </test>
  1128. <test> <!-- TESTED -->
  1129. <description>du: Test for Namenode's path - file</description>
  1130. <test-commands>
  1131. <command>-fs NAMENODE -put CLITEST_DATA/data15bytes NAMENODE/data15bytes</command>
  1132. <command>-fs NAMENODE -du NAMENODE/data15bytes</command>
  1133. </test-commands>
  1134. <cleanup-commands>
  1135. <command>-fs NAMENODE -rm NAMENODE/data15bytes</command>
  1136. </cleanup-commands>
  1137. <comparators>
  1138. <comparator>
  1139. <type>RegexpComparator</type>
  1140. <expected-output>^15( |\t)*NAMENODE/data15bytes</expected-output>
  1141. </comparator>
  1142. </comparators>
  1143. </test>
  1144. <test> <!-- TESTED -->
  1145. <description>du: Test for Namenode's path - files using globbing</description>
  1146. <test-commands>
  1147. <command>-fs NAMENODE -put CLITEST_DATA/data15bytes NAMENODE/data15bytes</command>
  1148. <command>-fs NAMENODE -put CLITEST_DATA/data30bytes NAMENODE/data30bytes</command>
  1149. <command>-fs NAMENODE -put CLITEST_DATA/data60bytes NAMENODE/data60bytes</command>
  1150. <command>-fs NAMENODE -put CLITEST_DATA/data120bytes NAMENODE/data120bytes</command>
  1151. <command>-fs NAMENODE -du NAMENODE/data*</command>
  1152. </test-commands>
  1153. <cleanup-commands>
  1154. <command>-fs NAMENODE -rm -r NAMENODE/*</command>
  1155. </cleanup-commands>
  1156. <comparators>
  1157. <comparator>
  1158. <type>RegexpComparator</type>
  1159. <expected-output>^15( |\t)*NAMENODE/data15bytes</expected-output>
  1160. </comparator>
  1161. <comparator>
  1162. <type>RegexpComparator</type>
  1163. <expected-output>^30( |\t)*NAMENODE/data30bytes</expected-output>
  1164. </comparator>
  1165. <comparator>
  1166. <type>RegexpComparator</type>
  1167. <expected-output>^60( |\t)*NAMENODE/data60bytes</expected-output>
  1168. </comparator>
  1169. <comparator>
  1170. <type>RegexpComparator</type>
  1171. <expected-output>^120( |\t)*NAMENODE/data120bytes</expected-output>
  1172. </comparator>
  1173. </comparators>
  1174. </test>
  1175. <test> <!-- TESTED -->
  1176. <description>du: Test for Namenode's path - directory</description>
  1177. <test-commands>
  1178. <command>-fs NAMENODE -mkdir NAMENODE/dir0</command>
  1179. <command>-fs NAMENODE -put CLITEST_DATA/data15bytes NAMENODE/dir0/data15bytes</command>
  1180. <command>-fs NAMENODE -du NAMENODE/dir0</command>
  1181. </test-commands>
  1182. <cleanup-commands>
  1183. <command>-fs NAMENODE -rm -r NAMENODE/dir0</command>
  1184. </cleanup-commands>
  1185. <comparators>
  1186. <comparator>
  1187. <type>RegexpComparator</type>
  1188. <expected-output>^15( |\t)*NAMENODE/dir0/data15bytes</expected-output>
  1189. </comparator>
  1190. </comparators>
  1191. </test>
  1192. <test> <!-- TESTED -->
  1193. <description>du: Test for Namenode's path - directory using globbing</description>
  1194. <test-commands>
  1195. <command>-fs NAMENODE -mkdir NAMENODE/dir0</command>
  1196. <command>-fs NAMENODE -put CLITEST_DATA/data15bytes NAMENODE/dir0/data15bytes</command>
  1197. <command>-fs NAMENODE -put CLITEST_DATA/data30bytes NAMENODE/dir0/data30bytes</command>
  1198. <command>-fs NAMENODE -put CLITEST_DATA/data60bytes NAMENODE/dir0/data60bytes</command>
  1199. <command>-fs NAMENODE -put CLITEST_DATA/data120bytes NAMENODE/dir0/data120bytes</command>
  1200. <command>-fs NAMENODE -du NAMENODE/dir0/*</command>
  1201. </test-commands>
  1202. <cleanup-commands>
  1203. <command>-fs NAMENODE -rm -r NAMENODE/dir0</command>
  1204. </cleanup-commands>
  1205. <comparators>
  1206. <comparator>
  1207. <type>RegexpComparator</type>
  1208. <expected-output>^15( |\t)*NAMENODE/dir0/data15bytes</expected-output>
  1209. </comparator>
  1210. <comparator>
  1211. <type>RegexpComparator</type>
  1212. <expected-output>^30( |\t)*NAMENODE/dir0/data30bytes</expected-output>
  1213. </comparator>
  1214. <comparator>
  1215. <type>RegexpComparator</type>
  1216. <expected-output>^60( |\t)*NAMENODE/dir0/data60bytes</expected-output>
  1217. </comparator>
  1218. <comparator>
  1219. <type>RegexpComparator</type>
  1220. <expected-output>^120( |\t)*NAMENODE/dir0/data120bytes</expected-output>
  1221. </comparator>
  1222. </comparators>
  1223. </test>
  1224. <!-- Tests for dus -->
  1225. <test> <!-- TESTED -->
  1226. <description>dus: directories/files using absolute path</description>
  1227. <test-commands>
  1228. <command>-fs NAMENODE -mkdir /dir0</command>
  1229. <command>-fs NAMENODE -mkdir /dir0/dir1</command>
  1230. <command>-fs NAMENODE -mkdir /dir0/dir1/dir1</command>
  1231. <command>-fs NAMENODE -mkdir /dir0/dir1/dir2</command>
  1232. <command>-fs NAMENODE -mkdir /dir0/dir2</command>
  1233. <command>-fs NAMENODE -mkdir /dir0/dir2/dir1</command>
  1234. <command>-fs NAMENODE -mkdir /dir0/dir2/dir2</command>
  1235. <command>-fs NAMENODE -touchz /dir0/file0</command>
  1236. <command>-fs NAMENODE -put CLITEST_DATA/data15bytes /dir0/dir1/data15bytes</command>
  1237. <command>-fs NAMENODE -put CLITEST_DATA/data30bytes /dir0/dir1/data30bytes</command>
  1238. <command>-fs NAMENODE -put CLITEST_DATA/data15bytes /dir0/dir2/data15bytes</command>
  1239. <command>-fs NAMENODE -put CLITEST_DATA/data30bytes /dir0/dir2/data30bytes</command>
  1240. <command>-fs NAMENODE -put CLITEST_DATA/data60bytes /dir0/dir1/dir1/data60bytes</command>
  1241. <command>-fs NAMENODE -put CLITEST_DATA/data120bytes /dir0/dir1/dir2/data120bytes</command>
  1242. <command>-fs NAMENODE -put CLITEST_DATA/data60bytes /dir0/dir2/dir1/data60bytes</command>
  1243. <command>-fs NAMENODE -put CLITEST_DATA/data120bytes /dir0/dir2/dir2/data120bytes</command>
  1244. <command>-fs NAMENODE -du -s /dir0</command>
  1245. </test-commands>
  1246. <cleanup-commands>
  1247. <command>-fs NAMENODE -rm -r /dir0</command>
  1248. </cleanup-commands>
  1249. <comparators>
  1250. <comparator>
  1251. <type>RegexpComparator</type>
  1252. <expected-output>^450\s+/dir0</expected-output>
  1253. </comparator>
  1254. </comparators>
  1255. </test>
  1256. <test> <!-- TESTED -->
  1257. <description>dus: directories/files using relative path</description>
  1258. <test-commands>
  1259. <command>-fs NAMENODE -mkdir dir0</command>
  1260. <command>-fs NAMENODE -mkdir dir0/dir1</command>
  1261. <command>-fs NAMENODE -mkdir dir0/dir1/dir1</command>
  1262. <command>-fs NAMENODE -mkdir dir0/dir1/dir2</command>
  1263. <command>-fs NAMENODE -mkdir dir0/dir2</command>
  1264. <command>-fs NAMENODE -mkdir dir0/dir2/dir1</command>
  1265. <command>-fs NAMENODE -mkdir dir0/dir2/dir2</command>
  1266. <command>-fs NAMENODE -touchz dir0/file0</command>
  1267. <command>-fs NAMENODE -put CLITEST_DATA/data15bytes dir0/dir1/data15bytes</command>
  1268. <command>-fs NAMENODE -put CLITEST_DATA/data30bytes dir0/dir1/data30bytes</command>
  1269. <command>-fs NAMENODE -put CLITEST_DATA/data15bytes dir0/dir2/data15bytes</command>
  1270. <command>-fs NAMENODE -put CLITEST_DATA/data30bytes dir0/dir2/data30bytes</command>
  1271. <command>-fs NAMENODE -put CLITEST_DATA/data60bytes dir0/dir1/dir1/data60bytes</command>
  1272. <command>-fs NAMENODE -put CLITEST_DATA/data120bytes dir0/dir1/dir2/data120bytes</command>
  1273. <command>-fs NAMENODE -put CLITEST_DATA/data60bytes dir0/dir2/dir1/data60bytes</command>
  1274. <command>-fs NAMENODE -put CLITEST_DATA/data120bytes dir0/dir2/dir2/data120bytes</command>
  1275. <command>-fs NAMENODE -du -s dir0</command>
  1276. </test-commands>
  1277. <cleanup-commands>
  1278. <command>-fs NAMENODE -rm -r /user</command>
  1279. </cleanup-commands>
  1280. <comparators>
  1281. <comparator>
  1282. <type>RegexpComparator</type>
  1283. <expected-output>^450\s+dir0</expected-output>
  1284. </comparator>
  1285. </comparators>
  1286. </test>
  1287. <test> <!-- TESTED -->
  1288. <description>dus: directories/files using globbing</description>
  1289. <test-commands>
  1290. <command>-fs NAMENODE -mkdir /dir0</command>
  1291. <command>-fs NAMENODE -mkdir /dir0/dir1</command>
  1292. <command>-fs NAMENODE -mkdir /dir0/dir1/dir1</command>
  1293. <command>-fs NAMENODE -mkdir /dir0/dir1/dir2</command>
  1294. <command>-fs NAMENODE -mkdir /dir0/dir2</command>
  1295. <command>-fs NAMENODE -mkdir /dir0/dir2/dir1</command>
  1296. <command>-fs NAMENODE -mkdir /dir0/dir2/dir2</command>
  1297. <command>-fs NAMENODE -touchz /dir0/file0</command>
  1298. <command>-fs NAMENODE -put CLITEST_DATA/data15bytes /dir0/dir1/data15bytes</command>
  1299. <command>-fs NAMENODE -put CLITEST_DATA/data30bytes /dir0/dir1/data30bytes</command>
  1300. <command>-fs NAMENODE -put CLITEST_DATA/data15bytes /dir0/dir2/data15bytes</command>
  1301. <command>-fs NAMENODE -put CLITEST_DATA/data30bytes /dir0/dir2/data30bytes</command>
  1302. <command>-fs NAMENODE -put CLITEST_DATA/data60bytes /dir0/dir1/dir1/data60bytes</command>
  1303. <command>-fs NAMENODE -put CLITEST_DATA/data120bytes /dir0/dir1/dir2/data120bytes</command>
  1304. <command>-fs NAMENODE -put CLITEST_DATA/data60bytes /dir0/dir2/dir1/data60bytes</command>
  1305. <command>-fs NAMENODE -put CLITEST_DATA/data120bytes /dir0/dir2/dir2/data120bytes</command>
  1306. <command>-fs NAMENODE -mkdir /donotcountdir0</command>
  1307. <command>-fs NAMENODE -put CLITEST_DATA/data15bytes /donotcountdir0/data15bytes</command>
  1308. <command>-fs NAMENODE -put CLITEST_DATA/data15bytes /donotcountdir0/data15bytes</command>
  1309. <command>-fs NAMENODE -put CLITEST_DATA/data15bytes /donotcountdir0/data15bytes</command>
  1310. <command>-fs NAMENODE -put CLITEST_DATA/data15bytes /donotcountdir0/data15bytes</command>
  1311. <command>-fs NAMENODE -du -s /dir*</command>
  1312. </test-commands>
  1313. <cleanup-commands>
  1314. <command>-fs NAMENODE -rm -r /dir0</command>
  1315. <command>-fs NAMENODE -rm -r /donotcountdir0</command>
  1316. </cleanup-commands>
  1317. <comparators>
  1318. <comparator>
  1319. <type>RegexpComparator</type>
  1320. <expected-output>^450\s+/dir0</expected-output>
  1321. </comparator>
  1322. </comparators>
  1323. </test>
  1324. <!-- Tests for dus -->
  1325. <test> <!-- TESTED -->
  1326. <description>dus: Test for hdfs:// path - directories/files</description>
  1327. <test-commands>
  1328. <command>-fs NAMENODE -mkdir hdfs:///dir0</command>
  1329. <command>-fs NAMENODE -mkdir hdfs:///dir0/dir1</command>
  1330. <command>-fs NAMENODE -mkdir hdfs:///dir0/dir1/dir1</command>
  1331. <command>-fs NAMENODE -mkdir hdfs:///dir0/dir1/dir2</command>
  1332. <command>-fs NAMENODE -mkdir hdfs:///dir0/dir2</command>
  1333. <command>-fs NAMENODE -mkdir hdfs:///dir0/dir2/dir1</command>
  1334. <command>-fs NAMENODE -mkdir hdfs:///dir0/dir2/dir2</command>
  1335. <command>-fs NAMENODE -touchz hdfs:///dir0/file0</command>
  1336. <command>-fs NAMENODE -put CLITEST_DATA/data15bytes hdfs:///dir0/dir1/data15bytes</command>
  1337. <command>-fs NAMENODE -put CLITEST_DATA/data30bytes hdfs:///dir0/dir1/data30bytes</command>
  1338. <command>-fs NAMENODE -put CLITEST_DATA/data15bytes hdfs:///dir0/dir2/data15bytes</command>
  1339. <command>-fs NAMENODE -put CLITEST_DATA/data30bytes hdfs:///dir0/dir2/data30bytes</command>
  1340. <command>-fs NAMENODE -put CLITEST_DATA/data60bytes hdfs:///dir0/dir1/dir1/data60bytes</command>
  1341. <command>-fs NAMENODE -put CLITEST_DATA/data120bytes hdfs:///dir0/dir1/dir2/data120bytes</command>
  1342. <command>-fs NAMENODE -put CLITEST_DATA/data60bytes hdfs:///dir0/dir2/dir1/data60bytes</command>
  1343. <command>-fs NAMENODE -put CLITEST_DATA/data120bytes hdfs:///dir0/dir2/dir2/data120bytes</command>
  1344. <command>-fs NAMENODE -du -s hdfs:///dir0</command>
  1345. </test-commands>
  1346. <cleanup-commands>
  1347. <command>-fs NAMENODE -rm -r hdfs:///dir0</command>
  1348. </cleanup-commands>
  1349. <comparators>
  1350. <comparator>
  1351. <type>RegexpComparator</type>
  1352. <expected-output>^450\s+hdfs:///dir0</expected-output>
  1353. </comparator>
  1354. </comparators>
  1355. </test>
  1356. <test> <!-- TESTED -->
  1357. <description>dus: Test for hdfs:// path - directories/files using globbing</description>
  1358. <test-commands>
  1359. <command>-fs NAMENODE -mkdir hdfs:///dir0</command>
  1360. <command>-fs NAMENODE -mkdir hdfs:///dir0/dir1</command>
  1361. <command>-fs NAMENODE -mkdir hdfs:///dir0/dir1/dir1</command>
  1362. <command>-fs NAMENODE -mkdir hdfs:///dir0/dir1/dir2</command>
  1363. <command>-fs NAMENODE -mkdir hdfs:///dir0/dir2</command>
  1364. <command>-fs NAMENODE -mkdir hdfs:///dir0/dir2/dir1</command>
  1365. <command>-fs NAMENODE -mkdir hdfs:///dir0/dir2/dir2</command>
  1366. <command>-fs NAMENODE -touchz hdfs:///dir0/file0</command>
  1367. <command>-fs NAMENODE -put CLITEST_DATA/data15bytes hdfs:///dir0/dir1/data15bytes</command>
  1368. <command>-fs NAMENODE -put CLITEST_DATA/data30bytes hdfs:///dir0/dir1/data30bytes</command>
  1369. <command>-fs NAMENODE -put CLITEST_DATA/data15bytes hdfs:///dir0/dir2/data15bytes</command>
  1370. <command>-fs NAMENODE -put CLITEST_DATA/data30bytes hdfs:///dir0/dir2/data30bytes</command>
  1371. <command>-fs NAMENODE -put CLITEST_DATA/data60bytes hdfs:///dir0/dir1/dir1/data60bytes</command>
  1372. <command>-fs NAMENODE -put CLITEST_DATA/data120bytes hdfs:///dir0/dir1/dir2/data120bytes</command>
  1373. <command>-fs NAMENODE -put CLITEST_DATA/data60bytes hdfs:///dir0/dir2/dir1/data60bytes</command>
  1374. <command>-fs NAMENODE -put CLITEST_DATA/data120bytes hdfs:///dir0/dir2/dir2/data120bytes</command>
  1375. <command>-fs NAMENODE -mkdir /donotcountdir0</command>
  1376. <command>-fs NAMENODE -put CLITEST_DATA/data15bytes hdfs:///donotcountdir0/data15bytes</command>
  1377. <command>-fs NAMENODE -put CLITEST_DATA/data15bytes hdfs:///donotcountdir0/data15bytes</command>
  1378. <command>-fs NAMENODE -put CLITEST_DATA/data15bytes hdfs:///donotcountdir0/data15bytes</command>
  1379. <command>-fs NAMENODE -put CLITEST_DATA/data15bytes hdfs:///donotcountdir0/data15bytes</command>
  1380. <command>-fs NAMENODE -du -s hdfs:///dir*</command>
  1381. </test-commands>
  1382. <cleanup-commands>
  1383. <command>-fs NAMENODE -rm -r hdfs:///dir0</command>
  1384. <command>-fs NAMENODE -rm -r hdfs:///donotcountdir0</command>
  1385. </cleanup-commands>
  1386. <comparators>
  1387. <comparator>
  1388. <type>RegexpComparator</type>
  1389. <expected-output>^450\s+hdfs:///dir0</expected-output>
  1390. </comparator>
  1391. </comparators>
  1392. </test>
  1393. <test> <!-- TESTED -->
  1394. <description>dus: Test for Namenode's path - directories/files</description>
  1395. <test-commands>
  1396. <command>-fs NAMENODE -mkdir NAMENODE/dir0</command>
  1397. <command>-fs NAMENODE -mkdir NAMENODE/dir0/dir1</command>
  1398. <command>-fs NAMENODE -mkdir NAMENODE/dir0/dir1/dir1</command>
  1399. <command>-fs NAMENODE -mkdir NAMENODE/dir0/dir1/dir2</command>
  1400. <command>-fs NAMENODE -mkdir NAMENODE/dir0/dir2</command>
  1401. <command>-fs NAMENODE -mkdir NAMENODE/dir0/dir2/dir1</command>
  1402. <command>-fs NAMENODE -mkdir NAMENODE/dir0/dir2/dir2</command>
  1403. <command>-fs NAMENODE -touchz NAMENODE/dir0/file0</command>
  1404. <command>-fs NAMENODE -put CLITEST_DATA/data15bytes NAMENODE/dir0/dir1/data15bytes</command>
  1405. <command>-fs NAMENODE -put CLITEST_DATA/data30bytes NAMENODE/dir0/dir1/data30bytes</command>
  1406. <command>-fs NAMENODE -put CLITEST_DATA/data15bytes NAMENODE/dir0/dir2/data15bytes</command>
  1407. <command>-fs NAMENODE -put CLITEST_DATA/data30bytes NAMENODE/dir0/dir2/data30bytes</command>
  1408. <command>-fs NAMENODE -put CLITEST_DATA/data60bytes NAMENODE/dir0/dir1/dir1/data60bytes</command>
  1409. <command>-fs NAMENODE -put CLITEST_DATA/data120bytes NAMENODE/dir0/dir1/dir2/data120bytes</command>
  1410. <command>-fs NAMENODE -put CLITEST_DATA/data60bytes NAMENODE/dir0/dir2/dir1/data60bytes</command>
  1411. <command>-fs NAMENODE -put CLITEST_DATA/data120bytes NAMENODE/dir0/dir2/dir2/data120bytes</command>
  1412. <command>-fs NAMENODE -du -s NAMENODE/dir0</command>
  1413. </test-commands>
  1414. <cleanup-commands>
  1415. <command>-fs NAMENODE -rm -r NAMENODE/dir0</command>
  1416. </cleanup-commands>
  1417. <comparators>
  1418. <comparator>
  1419. <type>RegexpComparator</type>
  1420. <expected-output>^450\s+NAMENODE/dir0</expected-output>
  1421. </comparator>
  1422. </comparators>
  1423. </test>
  1424. <test> <!-- TESTED -->
  1425. <description>dus: Test for Namenode's path - directories/files using globbing</description>
  1426. <test-commands>
  1427. <command>-fs NAMENODE -mkdir NAMENODE/dir0</command>
  1428. <command>-fs NAMENODE -mkdir NAMENODE/dir0/dir1</command>
  1429. <command>-fs NAMENODE -mkdir NAMENODE/dir0/dir1/dir1</command>
  1430. <command>-fs NAMENODE -mkdir NAMENODE/dir0/dir1/dir2</command>
  1431. <command>-fs NAMENODE -mkdir NAMENODE/dir0/dir2</command>
  1432. <command>-fs NAMENODE -mkdir NAMENODE/dir0/dir2/dir1</command>
  1433. <command>-fs NAMENODE -mkdir NAMENODE/dir0/dir2/dir2</command>
  1434. <command>-fs NAMENODE -touchz NAMENODE/dir0/file0</command>
  1435. <command>-fs NAMENODE -put CLITEST_DATA/data15bytes NAMENODE/dir0/dir1/data15bytes</command>
  1436. <command>-fs NAMENODE -put CLITEST_DATA/data30bytes NAMENODE/dir0/dir1/data30bytes</command>
  1437. <command>-fs NAMENODE -put CLITEST_DATA/data15bytes NAMENODE/dir0/dir2/data15bytes</command>
  1438. <command>-fs NAMENODE -put CLITEST_DATA/data30bytes NAMENODE/dir0/dir2/data30bytes</command>
  1439. <command>-fs NAMENODE -put CLITEST_DATA/data60bytes NAMENODE/dir0/dir1/dir1/data60bytes</command>
  1440. <command>-fs NAMENODE -put CLITEST_DATA/data120bytes NAMENODE/dir0/dir1/dir2/data120bytes</command>
  1441. <command>-fs NAMENODE -put CLITEST_DATA/data60bytes NAMENODE/dir0/dir2/dir1/data60bytes</command>
  1442. <command>-fs NAMENODE -put CLITEST_DATA/data120bytes NAMENODE/dir0/dir2/dir2/data120bytes</command>
  1443. <command>-fs NAMENODE -mkdir NAMENODE/donotcountdir0</command>
  1444. <command>-fs NAMENODE -put CLITEST_DATA/data15bytes NAMENODE/donotcountdir0/data15bytes</command>
  1445. <command>-fs NAMENODE -put CLITEST_DATA/data15bytes NAMENODE/donotcountdir0/data15bytes</command>
  1446. <command>-fs NAMENODE -put CLITEST_DATA/data15bytes NAMENODE/donotcountdir0/data15bytes</command>
  1447. <command>-fs NAMENODE -put CLITEST_DATA/data15bytes NAMENODE/donotcountdir0/data15bytes</command>
  1448. <command>-fs NAMENODE -du -s NAMENODE/dir*</command>
  1449. </test-commands>
  1450. <cleanup-commands>
  1451. <command>-fs NAMENODE -rm -r NAMENODE/dir0</command>
  1452. <command>-fs NAMENODE -rm -r NAMENODE/donotcountdir0</command>
  1453. </cleanup-commands>
  1454. <comparators>
  1455. <comparator>
  1456. <type>RegexpComparator</type>
  1457. <expected-output>^450\s+NAMENODE/dir0</expected-output>
  1458. </comparator>
  1459. </comparators>
  1460. </test>
  1461. <!-- Tests for mv -->
  1462. <test> <!-- TESTED -->
  1463. <description>mv: file (absolute path) to file (absolute path)</description>
  1464. <test-commands>
  1465. <command>-fs NAMENODE -touchz /file1</command>
  1466. <command>-fs NAMENODE -mv /file1 /file2</command>
  1467. <command>-fs NAMENODE -ls /file*</command>
  1468. </test-commands>
  1469. <cleanup-commands>
  1470. <command>-fs NAMENODE -rm /file2</command>
  1471. </cleanup-commands>:
  1472. <comparators>
  1473. <comparator>
  1474. <type>TokenComparator</type>
  1475. <expected-output>Found 1 items</expected-output>
  1476. </comparator>
  1477. <comparator>
  1478. <type>RegexpComparator</type>
  1479. <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/file2</expected-output>
  1480. </comparator>
  1481. <comparator>
  1482. <type>RegexpComparator</type>
  1483. <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/file[^1]</expected-output>
  1484. </comparator>
  1485. </comparators>
  1486. </test>
  1487. <test> <!-- TESTED -->
  1488. <description>mv: file (absolute path) to file (relative path)</description>
  1489. <test-commands>
  1490. <command>-fs NAMENODE -touchz /file1</command>
  1491. <command>-fs NAMENODE -mv /file1 file2</command>
  1492. </test-commands>
  1493. <cleanup-commands>
  1494. <command>-fs NAMENODE -rm -r /file1</command>
  1495. </cleanup-commands>
  1496. <comparators>
  1497. <comparator>
  1498. <type>RegexpComparator</type>
  1499. <expected-output>^mv: `file2': No such file or directory</expected-output>
  1500. </comparator>
  1501. </comparators>
  1502. </test>
  1503. <test> <!-- TESTED -->
  1504. <description>mv: file (absolute path) to directory (absolute path); keep the same name at the destination</description>
  1505. <test-commands>
  1506. <command>-fs NAMENODE -touchz /file1</command>
  1507. <command>-fs NAMENODE -mkdir /dir0</command>
  1508. <command>-fs NAMENODE -mv /file1 /dir0</command>
  1509. <command>-fs NAMENODE -ls -R /dir0</command>
  1510. </test-commands>
  1511. <cleanup-commands>
  1512. <command>-fs NAMENODE -rm -r /dir0</command>
  1513. </cleanup-commands>
  1514. <comparators>
  1515. <comparator>
  1516. <type>RegexpComparator</type>
  1517. <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/file1</expected-output>
  1518. </comparator>
  1519. </comparators>
  1520. </test>
  1521. <test> <!-- TESTED -->
  1522. <description>mv: file (absolute path) to directory (absolute path); keep the same name at the destination [ TIED to previous test ]</description>
  1523. <test-commands>
  1524. <command>-fs NAMENODE -ls /file1</command>
  1525. </test-commands>
  1526. <cleanup-commands>
  1527. </cleanup-commands>
  1528. <comparators>
  1529. <comparator>
  1530. <type>TokenComparator</type>
  1531. <expected-output>ls: `/file1': No such file or directory</expected-output>
  1532. </comparator>
  1533. </comparators>
  1534. </test>
  1535. <test> <!-- TESTED -->
  1536. <description>mv: file (absolute path) to directory (absolute path); change the name at the destination</description>
  1537. <test-commands>
  1538. <command>-fs NAMENODE -touchz /file1</command>
  1539. <command>-fs NAMENODE -mkdir /dir0</command>
  1540. <command>-fs NAMENODE -mv /file1 /dir0/file2</command>
  1541. <command>-fs NAMENODE -ls /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>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/file2</expected-output>
  1550. </comparator>
  1551. </comparators>
  1552. </test>
  1553. <test> <!-- TESTED -->
  1554. <description>mv: file (absolute path) to directory (absolute path); change the name at the destination [ TIED to previous test ]</description>
  1555. <test-commands>
  1556. <command>-fs NAMENODE -ls /file1</command>
  1557. </test-commands>
  1558. <cleanup-commands>
  1559. </cleanup-commands>
  1560. <comparators>
  1561. <comparator>
  1562. <type>TokenComparator</type>
  1563. <expected-output>ls: `/file1': No such file or directory</expected-output>
  1564. </comparator>
  1565. </comparators>
  1566. </test>
  1567. <test> <!-- TESTED -->
  1568. <description>mv: files (absolute path) to directory (absolute path) using globbing</description>
  1569. <test-commands>
  1570. <command>-fs NAMENODE -touchz /file1</command>
  1571. <command>-fs NAMENODE -touchz /file2</command>
  1572. <command>-fs NAMENODE -touchz /file3</command>
  1573. <command>-fs NAMENODE -touchz /file4</command>
  1574. <command>-fs NAMENODE -mkdir /dir0</command>
  1575. <command>-fs NAMENODE -mv /file* /dir0</command>
  1576. <command>-fs NAMENODE -ls -R /*</command>
  1577. </test-commands>
  1578. <cleanup-commands>
  1579. <command>-fs NAMENODE -rm -r /dir0</command>
  1580. </cleanup-commands>
  1581. <comparators>
  1582. <comparator>
  1583. <type>RegexpComparator</type>
  1584. <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/file1</expected-output>
  1585. </comparator>
  1586. <comparator>
  1587. <type>RegexpComparator</type>
  1588. <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/file2</expected-output>
  1589. </comparator>
  1590. <comparator>
  1591. <type>RegexpComparator</type>
  1592. <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/file3</expected-output>
  1593. </comparator>
  1594. <comparator>
  1595. <type>RegexpComparator</type>
  1596. <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/file4</expected-output>
  1597. </comparator>
  1598. </comparators>
  1599. </test>
  1600. <test> <!-- TESTED -->
  1601. <description>mv: files (absolute path) to directory (absolute path) using globbing [ TIED to previous test ]</description>
  1602. <test-commands>
  1603. <command>-fs NAMENODE -ls /file*</command>
  1604. </test-commands>
  1605. <cleanup-commands>
  1606. </cleanup-commands>
  1607. <comparators>
  1608. <comparator>
  1609. <type>TokenComparator</type>
  1610. <expected-output>ls: `/file*': No such file or directory</expected-output>
  1611. </comparator>
  1612. </comparators>
  1613. </test>
  1614. <test> <!-- TESTED -->
  1615. <description>mv: file (relative) to file (relative)</description>
  1616. <test-commands>
  1617. <command>-fs NAMENODE -touchz file1</command>
  1618. <command>-fs NAMENODE -mv file1 file2</command>
  1619. <command>-fs NAMENODE -ls file*</command>
  1620. </test-commands>
  1621. <cleanup-commands>
  1622. <command>-fs NAMENODE -rm /user</command>
  1623. </cleanup-commands>
  1624. <comparators>
  1625. <comparator>
  1626. <type>TokenComparator</type>
  1627. <expected-output>Found 1 items</expected-output>
  1628. </comparator>
  1629. <comparator>
  1630. <type>RegexpComparator</type>
  1631. <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*file2</expected-output>
  1632. </comparator>
  1633. <comparator>
  1634. <type>RegexpComparator</type>
  1635. <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*file[^1]</expected-output>
  1636. </comparator>
  1637. </comparators>
  1638. </test>
  1639. <test> <!-- TESTED -->
  1640. <description>mv: moving file to file(rename in for hdfs:// path) </description>
  1641. <test-commands>
  1642. <command>-fs NAMENODE -touchz hdfs:///file1</command>
  1643. <command>-fs NAMENODE -mv hdfs:///file1 hdfs:///file2</command>
  1644. <command>-fs NAMENODE -ls hdfs:///file*</command>
  1645. </test-commands>
  1646. <cleanup-commands>
  1647. <command>-fs NAMENODE -rm hdfs:///file2</command>
  1648. </cleanup-commands>:
  1649. <comparators>
  1650. <comparator>
  1651. <type>TokenComparator</type>
  1652. <expected-output>Found 1 items</expected-output>
  1653. </comparator>
  1654. <comparator>
  1655. <type>RegexpComparator</type>
  1656. <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///file2</expected-output>
  1657. </comparator>
  1658. <comparator>
  1659. <type>RegexpComparator</type>
  1660. <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///file[^1]</expected-output>
  1661. </comparator>
  1662. </comparators>
  1663. </test>
  1664. <test> <!-- TESTED -->
  1665. <description>mv: moving file to directory (keep the same name at the destination) in hdfs:// path - </description>
  1666. <test-commands>
  1667. <command>-fs NAMENODE -touchz hdfs:///file1</command>
  1668. <command>-fs NAMENODE -mkdir hdfs:///dir0</command>
  1669. <command>-fs NAMENODE -mv hdfs:///file1 hdfs:///dir0</command>
  1670. <command>-fs NAMENODE -ls -R hdfs:///dir0</command>
  1671. </test-commands>
  1672. <cleanup-commands>
  1673. <command>-fs NAMENODE -rm -r hdfs:///dir0</command>
  1674. </cleanup-commands>
  1675. <comparators>
  1676. <comparator>
  1677. <type>RegexpComparator</type>
  1678. <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir0/file1</expected-output>
  1679. </comparator>
  1680. </comparators>
  1681. </test>
  1682. <test> <!-- TESTED -->
  1683. <description>mv: moving files to directory in hdfs:// path - [ TIED to previous test ]</description>
  1684. <test-commands>
  1685. <command>-fs NAMENODE -ls hdfs:///file*</command>
  1686. </test-commands>
  1687. <cleanup-commands>
  1688. </cleanup-commands>
  1689. <comparators>
  1690. <comparator>
  1691. <type>TokenComparator</type>
  1692. <expected-output>ls: `hdfs:///file*': No such file or directory</expected-output>
  1693. </comparator>
  1694. </comparators>
  1695. </test>
  1696. <test> <!-- TESTED -->
  1697. <description>mv: moving file that does not exist in hdfs:// path </description>
  1698. <test-commands>
  1699. <command>-fs NAMENODE -mv hdfs:///file1 hdfs:///file2</command>
  1700. </test-commands>
  1701. <cleanup-commands>
  1702. </cleanup-commands>
  1703. <comparators>
  1704. <comparator>
  1705. <type>TokenComparator</type>
  1706. <expected-output>mv: `hdfs:///file1': No such file or directory</expected-output>
  1707. </comparator>
  1708. </comparators>
  1709. </test>
  1710. <test> <!-- TESTED -->
  1711. <description>mv: moving file to directory (different name at the destination) in hdfs:// path </description>
  1712. <test-commands>
  1713. <command>-fs NAMENODE -touchz hdfs:///file1</command>
  1714. <command>-fs NAMENODE -mkdir hdfs:///dir0</command>
  1715. <command>-fs NAMENODE -mv hdfs:///file1 hdfs:///dir0/file2</command>
  1716. <command>-fs NAMENODE -ls hdfs:///dir0</command>
  1717. </test-commands>
  1718. <cleanup-commands>
  1719. <command>-fs NAMENODE -rm -r hdfs:///dir0</command>
  1720. </cleanup-commands>
  1721. <comparators>
  1722. <comparator>
  1723. <type>RegexpComparator</type>
  1724. <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir0/file2</expected-output>
  1725. </comparator>
  1726. </comparators>
  1727. </test>
  1728. <test> <!-- TESTED -->
  1729. <description>mv: moving file to directory (different name at the destination) in hdfs:// path [ TIED to previous test ]</description>
  1730. <test-commands>
  1731. <command>-fs NAMENODE -ls hdfs:///file1</command>
  1732. </test-commands>
  1733. <cleanup-commands>
  1734. </cleanup-commands>
  1735. <comparators>
  1736. <comparator>
  1737. <type>TokenComparator</type>
  1738. <expected-output>ls: `hdfs:///file1': No such file or directory</expected-output>
  1739. </comparator>
  1740. </comparators>
  1741. </test>
  1742. <test> <!-- TESTED -->
  1743. <description>mv: moving group of files to directory using globbing in hdfs:// path - </description>
  1744. <test-commands>
  1745. <command>-fs NAMENODE -touchz hdfs:///file1</command>
  1746. <command>-fs NAMENODE -touchz hdfs:///file2</command>
  1747. <command>-fs NAMENODE -touchz hdfs:///file3</command>
  1748. <command>-fs NAMENODE -mkdir hdfs:///dir0</command>
  1749. <command>-fs NAMENODE -mv hdfs:///file* hdfs:///dir0</command>
  1750. <command>-fs NAMENODE -ls -R hdfs:///*</command>
  1751. </test-commands>
  1752. <cleanup-commands>
  1753. <command>-fs NAMENODE -rm -r hdfs:///dir0</command>
  1754. </cleanup-commands>
  1755. <comparators>
  1756. <comparator>
  1757. <type>RegexpComparator</type>
  1758. <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir0/file1</expected-output>
  1759. </comparator>
  1760. <comparator>
  1761. <type>RegexpComparator</type>
  1762. <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir0/file2</expected-output>
  1763. </comparator>
  1764. <comparator>
  1765. <type>RegexpComparator</type>
  1766. <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir0/file3</expected-output>
  1767. </comparator>
  1768. </comparators>
  1769. </test>
  1770. <test> <!-- TESTED -->
  1771. <description>mv: moving files to directory using globbing in hdfs:// [ TIED to previous test ]</description>
  1772. <test-commands>
  1773. <command>-fs NAMENODE -ls hdfs:///file*</command>
  1774. </test-commands>
  1775. <cleanup-commands>
  1776. </cleanup-commands>
  1777. <comparators>
  1778. <comparator>
  1779. <type>TokenComparator</type>
  1780. <expected-output>ls: `hdfs:///file*': No such file or directory</expected-output>
  1781. </comparator>
  1782. </comparators>
  1783. </test>
  1784. <test> <!-- TESTED -->
  1785. <description>mv: moving file to file(rename) in Namenode's path - </description>
  1786. <test-commands>
  1787. <command>-fs NAMENODE -touchz NAMENODE/file1</command>
  1788. <command>-fs NAMENODE -mv NAMENODE/file1 NAMENODE/file2</command>
  1789. <command>-fs NAMENODE -ls NAMENODE/file*</command>
  1790. </test-commands>
  1791. <cleanup-commands>
  1792. <command>-fs NAMENODE -rm NAMENODE/file2</command>
  1793. </cleanup-commands>:
  1794. <comparators>
  1795. <comparator>
  1796. <type>TokenComparator</type>
  1797. <expected-output>Found 1 items</expected-output>
  1798. </comparator>
  1799. <comparator>
  1800. <type>RegexpComparator</type>
  1801. <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/file2</expected-output>
  1802. </comparator>
  1803. <comparator>
  1804. <type>RegexpComparator</type>
  1805. <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/file[^1]</expected-output>
  1806. </comparator>
  1807. </comparators>
  1808. </test>
  1809. <test> <!-- TESTED -->
  1810. <description>mv: moving file to directory (keep the same name at the destination) in Namenode's path </description>
  1811. <test-commands>
  1812. <command>-fs NAMENODE -touchz NAMENODE/file1</command>
  1813. <command>-fs NAMENODE -mkdir NAMENODE/dir0</command>
  1814. <command>-fs NAMENODE -mv NAMENODE/file1 NAMENODE/dir0</command>
  1815. <command>-fs NAMENODE -ls -R NAMENODE/dir0</command>
  1816. </test-commands>
  1817. <cleanup-commands>
  1818. <command>-fs NAMENODE -rm -r NAMENODE/dir0</command>
  1819. </cleanup-commands>
  1820. <comparators>
  1821. <comparator>
  1822. <type>RegexpComparator</type>
  1823. <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir0/file1</expected-output>
  1824. </comparator>
  1825. </comparators>
  1826. </test>
  1827. <test> <!-- TESTED -->
  1828. <description>mv: moving files to directory in Namenode's path - [ TIED to previous test ]</description>
  1829. <test-commands>
  1830. <command>-fs NAMENODE -ls NAMENODE/file1</command>
  1831. </test-commands>
  1832. <cleanup-commands>
  1833. </cleanup-commands>
  1834. <comparators>
  1835. <comparator>
  1836. <type>RegexpComparator</type>
  1837. <expected-output>^ls: `hdfs://\w+[-.a-z0-9]*:[0-9]+/file1': No such file or directory</expected-output>
  1838. </comparator>
  1839. </comparators>
  1840. </test>
  1841. <test> <!-- TESTED -->
  1842. <description>mv: moving file that does not exist in Namenode's path </description>
  1843. <test-commands>
  1844. <command>-fs NAMENODE -mv NAMENODE/file1 NAMENODE/file2</command>
  1845. </test-commands>
  1846. <cleanup-commands>
  1847. </cleanup-commands>
  1848. <comparators>
  1849. <comparator>
  1850. <type>RegexpComparator</type>
  1851. <expected-output>^mv: `hdfs://\w+[-.a-z0-9]*:[0-9]+/file1': No such file or directory</expected-output>
  1852. </comparator>
  1853. </comparators>
  1854. </test>
  1855. <test> <!-- TESTED -->
  1856. <description>mv: moving file to directory (different name at the destination) in Namenode's path </description>
  1857. <test-commands>
  1858. <command>-fs NAMENODE -touchz NAMENODE/file1</command>
  1859. <command>-fs NAMENODE -mkdir NAMENODE/dir0</command>
  1860. <command>-fs NAMENODE -mv NAMENODE/file1 NAMENODE/dir0/file2</command>
  1861. <command>-fs NAMENODE -ls NAMENODE/dir0</command>
  1862. </test-commands>
  1863. <cleanup-commands>
  1864. <command>-fs NAMENODE -rm -r NAMENODE/dir0</command>
  1865. </cleanup-commands>
  1866. <comparators>
  1867. <comparator>
  1868. <type>RegexpComparator</type>
  1869. <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir0/file2</expected-output>
  1870. </comparator>
  1871. </comparators>
  1872. </test>
  1873. <test> <!-- TESTED -->
  1874. <description>mv: moving file to directory (different name at the destination) in Namenode's path [ TIED to previous test ]</description>
  1875. <test-commands>
  1876. <command>-fs NAMENODE -ls NAMENODE/file1</command>
  1877. </test-commands>
  1878. <cleanup-commands>
  1879. </cleanup-commands>
  1880. <comparators>
  1881. <comparator>
  1882. <type>RegexpComparator</type>
  1883. <expected-output>^ls: `NAMENODE/file1': No such file or directory</expected-output>
  1884. </comparator>
  1885. </comparators>
  1886. </test>
  1887. <test> <!-- TESTED -->
  1888. <description>mv: moving group of files to directory using globbing in Namenode's path </description>
  1889. <test-commands>
  1890. <command>-fs NAMENODE -touchz NAMENODE/file1</command>
  1891. <command>-fs NAMENODE -touchz NAMENODE/file2</command>
  1892. <command>-fs NAMENODE -touchz NAMENODE/file3</command>
  1893. <command>-fs NAMENODE -mkdir NAMENODE/dir0</command>
  1894. <command>-fs NAMENODE -mv NAMENODE/file* NAMENODE/dir0</command>
  1895. <command>-fs NAMENODE -ls -R NAMENODE/*</command>
  1896. </test-commands>
  1897. <cleanup-commands>
  1898. <command>-fs NAMENODE -rm -r NAMENODE/dir0</command>
  1899. </cleanup-commands>
  1900. <comparators>
  1901. <comparator>
  1902. <type>RegexpComparator</type>
  1903. <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir0/file1</expected-output>
  1904. </comparator>
  1905. <comparator>
  1906. <type>RegexpComparator</type>
  1907. <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir0/file2</expected-output>
  1908. </comparator>
  1909. <comparator>
  1910. <type>RegexpComparator</type>
  1911. <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir0/file3</expected-output>
  1912. </comparator>
  1913. </comparators>
  1914. </test>
  1915. <test> <!-- TESTED -->
  1916. <description>mv: moving files to directory using globbing in Namenode's path [ TIED to previous test ]</description>
  1917. <test-commands>
  1918. <command>-fs NAMENODE -ls NAMENODE/file*</command>
  1919. </test-commands>
  1920. <cleanup-commands>
  1921. </cleanup-commands>
  1922. <comparators>
  1923. <comparator>
  1924. <type>RegexpComparator</type>
  1925. <expected-output>^ls: `hdfs://\w+[-.a-z0-9]*:[0-9]+/file\*': No such file or directory</expected-output>
  1926. </comparator>
  1927. </comparators>
  1928. </test>
  1929. <test> <!-- TESTED -->
  1930. <description>mv: moving directory to directory in hdfs:// path </description>
  1931. <test-commands>
  1932. <command>-fs NAMENODE -mkdir hdfs:///dir0</command>
  1933. <command>-fs NAMENODE -mkdir hdfs:///dir1</command>
  1934. <command>-fs NAMENODE -touchz hdfs:///dir0/file1</command>
  1935. <command>-fs NAMENODE -mv hdfs:///dir0 hdfs:///dir1</command>
  1936. <command>-fs NAMENODE -ls -R hdfs:///dir1</command>
  1937. </test-commands>
  1938. <cleanup-commands>
  1939. <command>-fs NAMENODE -rm hdfs:///dir1</command>
  1940. </cleanup-commands>
  1941. <comparators>
  1942. <comparator>
  1943. <type>RegexpComparator</type>
  1944. <expected-output>^drwxr-xr-x( )*-( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir1/dir0</expected-output>
  1945. </comparator>
  1946. <comparator>
  1947. <type>RegexpComparator</type>
  1948. <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir1/dir0/file1</expected-output>
  1949. </comparator>
  1950. </comparators>
  1951. </test>
  1952. <test> <!-- TESTED -->
  1953. <description>mv: moving directory to directory in Namenode's path </description>
  1954. <test-commands>
  1955. <command>-fs NAMENODE -mkdir NAMENODE/dir0</command>
  1956. <command>-fs NAMENODE -mkdir NAMENODE/dir1</command>
  1957. <command>-fs NAMENODE -touchz NAMENODE/dir0/file1</command>
  1958. <command>-fs NAMENODE -mv NAMENODE/dir0 NAMENODE/dir1</command>
  1959. <command>-fs NAMENODE -ls -R NAMENODE/dir1</command>
  1960. </test-commands>
  1961. <cleanup-commands>
  1962. <command>-fs NAMENODE -rm NAMENODE/dir1</command>
  1963. </cleanup-commands>
  1964. <comparators>
  1965. <comparator>
  1966. <type>RegexpComparator</type>
  1967. <expected-output>^drwxr-xr-x( )*-( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir1/dir0</expected-output>
  1968. </comparator>
  1969. <comparator>
  1970. <type>RegexpComparator</type>
  1971. <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir1/dir0/file1</expected-output>
  1972. </comparator>
  1973. </comparators>
  1974. </test>
  1975. <!-- Tests for cp-->
  1976. <test> <!-- TESTED -->
  1977. <description>cp: file (absolute path) to file (absolute path)</description>
  1978. <test-commands>
  1979. <command>-fs NAMENODE -touchz /file1</command>
  1980. <command>-fs NAMENODE -cp /file1 /file2</command>
  1981. <command>-fs NAMENODE -ls /file*</command>
  1982. </test-commands>
  1983. <cleanup-commands>
  1984. <command>-fs NAMENODE -rm /file*</command>
  1985. </cleanup-commands>:
  1986. <comparators>
  1987. <comparator>
  1988. <type>RegexpComparator</type>
  1989. <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/file1</expected-output>
  1990. </comparator>
  1991. <comparator>
  1992. <type>RegexpComparator</type>
  1993. <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/file2</expected-output>
  1994. </comparator>
  1995. </comparators>
  1996. </test>
  1997. <test> <!-- TESTED -->
  1998. <description>cp: file (absolute path) to file (relative path)</description>
  1999. <test-commands>
  2000. <command>-fs NAMENODE -touchz /file1</command>
  2001. <command>-fs NAMENODE -cp /file1 file2</command>
  2002. <command>-fs NAMENODE -ls /file1 file2</command>
  2003. </test-commands>
  2004. <cleanup-commands>
  2005. <command>-fs NAMENODE -rm -r /file1 file2</command>
  2006. </cleanup-commands>
  2007. <comparators>
  2008. <comparator>
  2009. <type>RegexpComparator</type>
  2010. <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/file1</expected-output>
  2011. </comparator>
  2012. <comparator>
  2013. <type>RegexpComparator</type>
  2014. <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*file2</expected-output>
  2015. </comparator>
  2016. </comparators>
  2017. </test>
  2018. <test> <!-- TESTED -->
  2019. <description>cp: file (relative path) to file (absolute path)</description>
  2020. <test-commands>
  2021. <command>-fs NAMENODE -touchz file1</command>
  2022. <command>-fs NAMENODE -cp file1 /file2</command>
  2023. <command>-fs NAMENODE -ls file1 /file2</command>
  2024. </test-commands>
  2025. <cleanup-commands>
  2026. <command>-fs NAMENODE -rm -r file1 /file2</command>
  2027. </cleanup-commands>
  2028. <comparators>
  2029. <comparator>
  2030. <type>RegexpComparator</type>
  2031. <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*file1</expected-output>
  2032. </comparator>
  2033. <comparator>
  2034. <type>RegexpComparator</type>
  2035. <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/file2</expected-output>
  2036. </comparator>
  2037. </comparators>
  2038. </test>
  2039. <test> <!-- TESTED -->
  2040. <description>cp: file (relative path) to file (relative path)</description>
  2041. <test-commands>
  2042. <command>-fs NAMENODE -touchz file1</command>
  2043. <command>-fs NAMENODE -cp file1 file2</command>
  2044. <command>-fs NAMENODE -ls file1 file2</command>
  2045. </test-commands>
  2046. <cleanup-commands>
  2047. <command>-fs NAMENODE -rm -r file1 file2</command>
  2048. </cleanup-commands>
  2049. <comparators>
  2050. <comparator>
  2051. <type>RegexpComparator</type>
  2052. <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*file1</expected-output>
  2053. </comparator>
  2054. <comparator>
  2055. <type>RegexpComparator</type>
  2056. <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*file2</expected-output>
  2057. </comparator>
  2058. </comparators>
  2059. </test>
  2060. <test> <!-- TESTED -->
  2061. <description>cp: file (absolute path) to directory (absolute path); keep the same name at the destination</description>
  2062. <test-commands>
  2063. <command>-fs NAMENODE -touchz /file1</command>
  2064. <command>-fs NAMENODE -mkdir /dir0</command>
  2065. <command>-fs NAMENODE -cp /file1 /dir0</command>
  2066. <command>-fs NAMENODE -ls /file1 /dir0</command>
  2067. </test-commands>
  2068. <cleanup-commands>
  2069. <command>-fs NAMENODE -rm -r /dir0</command>
  2070. </cleanup-commands>
  2071. <comparators>
  2072. <comparator>
  2073. <type>RegexpComparator</type>
  2074. <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/file1</expected-output>
  2075. </comparator>
  2076. <comparator>
  2077. <type>RegexpComparator</type>
  2078. <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/file1</expected-output>
  2079. </comparator>
  2080. </comparators>
  2081. </test>
  2082. <test> <!-- TESTED -->
  2083. <description>cp: file (absolute path) to directory (absolute path); change the name at the destination</description>
  2084. <test-commands>
  2085. <command>-fs NAMENODE -touchz /file1</command>
  2086. <command>-fs NAMENODE -mkdir /dir0</command>
  2087. <command>-fs NAMENODE -cp /file1 /dir0/file2</command>
  2088. <command>-fs NAMENODE -ls /file1 /dir0</command>
  2089. </test-commands>
  2090. <cleanup-commands>
  2091. <command>-fs NAMENODE -rm -r /dir0</command>
  2092. </cleanup-commands>
  2093. <comparators>
  2094. <comparator>
  2095. <type>RegexpComparator</type>
  2096. <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/file1</expected-output>
  2097. </comparator>
  2098. <comparator>
  2099. <type>RegexpComparator</type>
  2100. <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/file2</expected-output>
  2101. </comparator>
  2102. </comparators>
  2103. </test>
  2104. <test> <!-- TESTED -->
  2105. <description>cp: files to directory (absolute path) using globbing</description>
  2106. <test-commands>
  2107. <command>-fs NAMENODE -touchz /file1</command>
  2108. <command>-fs NAMENODE -touchz /file2</command>
  2109. <command>-fs NAMENODE -touchz /file3</command>
  2110. <command>-fs NAMENODE -touchz /file4</command>
  2111. <command>-fs NAMENODE -mkdir /dir0</command>
  2112. <command>-fs NAMENODE -cp /file* /dir0</command>
  2113. <command>-fs NAMENODE -ls -R /*</command>
  2114. </test-commands>
  2115. <cleanup-commands>
  2116. <command>-fs NAMENODE -rm -r /dir0</command>
  2117. </cleanup-commands>
  2118. <comparators>
  2119. <comparator>
  2120. <type>RegexpComparator</type>
  2121. <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/file1</expected-output>
  2122. </comparator>
  2123. <comparator>
  2124. <type>RegexpComparator</type>
  2125. <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/file2</expected-output>
  2126. </comparator>
  2127. <comparator>
  2128. <type>RegexpComparator</type>
  2129. <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/file3</expected-output>
  2130. </comparator>
  2131. <comparator>
  2132. <type>RegexpComparator</type>
  2133. <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/file4</expected-output>
  2134. </comparator>
  2135. <comparator>
  2136. <type>RegexpComparator</type>
  2137. <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/file1</expected-output>
  2138. </comparator>
  2139. <comparator>
  2140. <type>RegexpComparator</type>
  2141. <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/file2</expected-output>
  2142. </comparator>
  2143. <comparator>
  2144. <type>RegexpComparator</type>
  2145. <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/file3</expected-output>
  2146. </comparator>
  2147. <comparator>
  2148. <type>RegexpComparator</type>
  2149. <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/file4</expected-output>
  2150. </comparator>
  2151. </comparators>
  2152. </test>
  2153. <test> <!-- TESTED -->
  2154. <description>cp: files to directory (absolute path) without globbing</description>
  2155. <test-commands>
  2156. <command>-fs NAMENODE -touchz /file1</command>
  2157. <command>-fs NAMENODE -touchz /file2</command>
  2158. <command>-fs NAMENODE -touchz /file3</command>
  2159. <command>-fs NAMENODE -touchz /file4</command>
  2160. <command>-fs NAMENODE -mkdir /dir0</command>
  2161. <command>-fs NAMENODE -cp /file1 /file2 /file3 /file4 /dir0</command>
  2162. <command>-fs NAMENODE -ls -R /*</command>
  2163. </test-commands>
  2164. <cleanup-commands>
  2165. <command>-fs NAMENODE -rm -r /dir0 /file*</command>
  2166. </cleanup-commands>
  2167. <comparators>
  2168. <comparator>
  2169. <type>RegexpComparator</type>
  2170. <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/file1</expected-output>
  2171. </comparator>
  2172. <comparator>
  2173. <type>RegexpComparator</type>
  2174. <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/file2</expected-output>
  2175. </comparator>
  2176. <comparator>
  2177. <type>RegexpComparator</type>
  2178. <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/file3</expected-output>
  2179. </comparator>
  2180. <comparator>
  2181. <type>RegexpComparator</type>
  2182. <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/file4</expected-output>
  2183. </comparator>
  2184. <comparator>
  2185. <type>RegexpComparator</type>
  2186. <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/file1</expected-output>
  2187. </comparator>
  2188. <comparator>
  2189. <type>RegexpComparator</type>
  2190. <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/file2</expected-output>
  2191. </comparator>
  2192. <comparator>
  2193. <type>RegexpComparator</type>
  2194. <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/file3</expected-output>
  2195. </comparator>
  2196. <comparator>
  2197. <type>RegexpComparator</type>
  2198. <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/file4</expected-output>
  2199. </comparator>
  2200. </comparators>
  2201. </test>
  2202. <test> <!-- TESTED -->
  2203. <description>cp: copying non existent file (absolute path)</description>
  2204. <test-commands>
  2205. <command>-fs NAMENODE -cp /file /file1</command>
  2206. </test-commands>
  2207. <cleanup-commands>
  2208. <command>-fs NAMENODE -rm -r /user</command>
  2209. </cleanup-commands>:
  2210. <comparators>
  2211. <comparator>
  2212. <type>RegexpComparator</type>
  2213. <expected-output>^cp: `/file': No such file or directory</expected-output>
  2214. </comparator>
  2215. </comparators>
  2216. </test>
  2217. <test> <!-- TESTED -->
  2218. <description>cp: copying non existent file (relative path)</description>
  2219. <test-commands>
  2220. <command>-fs NAMENODE -cp touchz test</command>
  2221. <command>-fs NAMENODE -cp file1 file2</command>
  2222. </test-commands>
  2223. <cleanup-commands>
  2224. <command>-fs NAMENODE -rm -r /user</command>
  2225. </cleanup-commands>:
  2226. <comparators>
  2227. <comparator>
  2228. <type>RegexpComparator</type>
  2229. <expected-output>^cp: `file2': No such file or directory</expected-output>
  2230. </comparator>
  2231. </comparators>
  2232. </test>
  2233. <test> <!-- TESTED -->
  2234. <description>cp: files to an existent file using globbing</description>
  2235. <test-commands>
  2236. <command>-fs NAMENODE -touchz /file1</command>
  2237. <command>-fs NAMENODE -touchz /file2</command>
  2238. <command>-fs NAMENODE -touchz /file3</command>
  2239. <command>-fs NAMENODE -touchz /file4</command>
  2240. <command>-fs NAMENODE -touchz /file5</command>
  2241. <command>-fs NAMENODE -cp /file* /file5</command>
  2242. </test-commands>
  2243. <cleanup-commands>
  2244. <command>-fs NAMENODE -rm -r /user</command>
  2245. </cleanup-commands>
  2246. <comparators>
  2247. <comparator>
  2248. <type>RegexpComparator</type>
  2249. <expected-output>^cp: `/file5': Is not a directory</expected-output>
  2250. </comparator>
  2251. </comparators>
  2252. </test>
  2253. <test> <!-- TESTED -->
  2254. <description>cp: files to an existent file without globbing</description>
  2255. <test-commands>
  2256. <command>-fs NAMENODE -touchz /file1</command>
  2257. <command>-fs NAMENODE -touchz /file2</command>
  2258. <command>-fs NAMENODE -touchz /file3</command>
  2259. <command>-fs NAMENODE -touchz /file4</command>
  2260. <command>-fs NAMENODE -touchz /file5</command>
  2261. <command>-fs NAMENODE -cp /file1 /file2 /file3 /file4 /file5</command>
  2262. </test-commands>
  2263. <cleanup-commands>
  2264. <command>-fs NAMENODE -rm -r /user</command>
  2265. </cleanup-commands>
  2266. <comparators>
  2267. <comparator>
  2268. <type>RegexpComparator</type>
  2269. <expected-output>^cp: `/file5': Is not a directory</expected-output>
  2270. </comparator>
  2271. </comparators>
  2272. </test>
  2273. <test> <!-- TESTED -->
  2274. <description>cp: files to a non existent directory using globbing</description>
  2275. <test-commands>
  2276. <command>-fs NAMENODE -touchz /file1</command>
  2277. <command>-fs NAMENODE -touchz /file2</command>
  2278. <command>-fs NAMENODE -touchz /file3</command>
  2279. <command>-fs NAMENODE -touchz /file4</command>
  2280. <command>-fs NAMENODE -cp /file* dir</command>
  2281. </test-commands>
  2282. <cleanup-commands>
  2283. <command>-fs NAMENODE -rm -r /user</command>
  2284. </cleanup-commands>
  2285. <comparators>
  2286. <comparator>
  2287. <type>RegexpComparator</type>
  2288. <expected-output>^cp: `dir': No such file or directory</expected-output>
  2289. </comparator>
  2290. </comparators>
  2291. </test>
  2292. <test> <!-- TESTED -->
  2293. <description>cp: files to a non existent directory without globbing</description>
  2294. <test-commands>
  2295. <command>-fs NAMENODE -touchz /file1</command>
  2296. <command>-fs NAMENODE -touchz /file2</command>
  2297. <command>-fs NAMENODE -touchz /file3</command>
  2298. <command>-fs NAMENODE -touchz /file4</command>
  2299. <command>-fs NAMENODE -cp /file1 /file2 /file3 /file4 dir</command>
  2300. </test-commands>
  2301. <cleanup-commands>
  2302. <command>-fs NAMENODE -rm -r /user</command>
  2303. </cleanup-commands>
  2304. <comparators>
  2305. <comparator>
  2306. <type>RegexpComparator</type>
  2307. <expected-output>^cp: `dir': No such file or directory</expected-output>
  2308. </comparator>
  2309. </comparators>
  2310. </test>
  2311. <test> <!-- TESTED -->
  2312. <description>cp: file to file copy in hdfs:// path </description>
  2313. <test-commands>
  2314. <command>-fs NAMENODE -touchz hdfs:///file1</command>
  2315. <command>-fs NAMENODE -cp hdfs:///file1 hdfs:///file2</command>
  2316. <command>-fs NAMENODE -ls hdfs:///file*</command>
  2317. </test-commands>
  2318. <cleanup-commands>
  2319. <command>-fs NAMENODE -rm hdfs:///file*</command>
  2320. </cleanup-commands>:
  2321. <comparators>
  2322. <comparator>
  2323. <type>RegexpComparator</type>
  2324. <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///file1</expected-output>
  2325. </comparator>
  2326. <comparator>
  2327. <type>RegexpComparator</type>
  2328. <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///file2</expected-output>
  2329. </comparator>
  2330. </comparators>
  2331. </test>
  2332. <test> <!-- TESTED -->
  2333. <description>cp: file to directory copy (same name at the destination) in hdfs:// path</description>
  2334. <test-commands>
  2335. <command>-fs NAMENODE -touchz hdfs:///file1</command>
  2336. <command>-fs NAMENODE -mkdir hdfs:///dir0</command>
  2337. <command>-fs NAMENODE -cp hdfs:///file1 hdfs:///dir0</command>
  2338. <command>-fs NAMENODE -ls hdfs:///file1 hdfs:///dir0</command>
  2339. </test-commands>
  2340. <cleanup-commands>
  2341. <command>-fs NAMENODE -rm -r hdfs:///dir0/ hdfs://file1</command>
  2342. </cleanup-commands>
  2343. <comparators>
  2344. <comparator>
  2345. <type>RegexpComparator</type>
  2346. <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///file1</expected-output>
  2347. </comparator>
  2348. <comparator>
  2349. <type>RegexpComparator</type>
  2350. <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir0/file1</expected-output>
  2351. </comparator>
  2352. </comparators>
  2353. </test>
  2354. <test> <!-- TESTED -->
  2355. <description>cp: file to directory (different name at the destination) in hdfs:// path </description>
  2356. <test-commands>
  2357. <command>-fs NAMENODE -touchz hdfs:///file1</command>
  2358. <command>-fs NAMENODE -mkdir hdfs:///dir0</command>
  2359. <command>-fs NAMENODE -cp hdfs:///file1 hdfs:///dir0/file2</command>
  2360. <command>-fs NAMENODE -ls hdfs:///file1 hdfs:///dir0</command>
  2361. </test-commands>
  2362. <cleanup-commands>
  2363. <command>-fs NAMENODE -rm -r hdfs:///dir0/</command>
  2364. </cleanup-commands>
  2365. <comparators>
  2366. <comparator>
  2367. <type>RegexpComparator</type>
  2368. <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///file1</expected-output>
  2369. </comparator>
  2370. <comparator>
  2371. <type>RegexpComparator</type>
  2372. <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir0/file2</expected-output>
  2373. </comparator>
  2374. </comparators>
  2375. </test>
  2376. <test> <!-- TESTED -->
  2377. <description>cp: files to directory using globbing in hdfs:// path</description>
  2378. <test-commands>
  2379. <command>-fs NAMENODE -touchz hdfs:///file1</command>
  2380. <command>-fs NAMENODE -touchz hdfs:///file2</command>
  2381. <command>-fs NAMENODE -touchz hdfs:///file3</command>
  2382. <command>-fs NAMENODE -mkdir hdfs:///dir0</command>
  2383. <command>-fs NAMENODE -cp hdfs:///file* hdfs:///dir0</command>
  2384. <command>-fs NAMENODE -ls -R hdfs:///*</command>
  2385. </test-commands>
  2386. <cleanup-commands>
  2387. <command>-fs NAMENODE -rm -r hdfs:///file*</command>
  2388. <command>-fs NAMENODE -rm -r hdfs:///dir0/</command>
  2389. </cleanup-commands>
  2390. <comparators>
  2391. <comparator>
  2392. <type>RegexpComparator</type>
  2393. <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///file1</expected-output>
  2394. </comparator>
  2395. <comparator>
  2396. <type>RegexpComparator</type>
  2397. <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///file2</expected-output>
  2398. </comparator>
  2399. <comparator>
  2400. <type>RegexpComparator</type>
  2401. <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///file3</expected-output>
  2402. </comparator>
  2403. <comparator>
  2404. <type>RegexpComparator</type>
  2405. <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir0/file1</expected-output>
  2406. </comparator>
  2407. <comparator>
  2408. <type>RegexpComparator</type>
  2409. <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir0/file2</expected-output>
  2410. </comparator>
  2411. <comparator>
  2412. <type>RegexpComparator</type>
  2413. <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir0/file3</expected-output>
  2414. </comparator>
  2415. </comparators>
  2416. </test>
  2417. <test> <!-- TESTED -->
  2418. <description>cp: files to directory in hdfs:// path without globbing</description>
  2419. <test-commands>
  2420. <command>-fs NAMENODE -touchz hdfs:///file1</command>
  2421. <command>-fs NAMENODE -touchz hdfs:///file2</command>
  2422. <command>-fs NAMENODE -touchz hdfs:///file3</command>
  2423. <command>-fs NAMENODE -mkdir hdfs:///dir0</command>
  2424. <command>-fs NAMENODE -cp hdfs:///file1 hdfs:///file2 hdfs:///file3 hdfs:///dir0</command>
  2425. <command>-fs NAMENODE -ls -R hdfs:///*</command>
  2426. </test-commands>
  2427. <cleanup-commands>
  2428. <command>-fs NAMENODE -rm -r hdfs:///file*</command>
  2429. <command>-fs NAMENODE -rm -r hdfs:///dir0/</command>
  2430. </cleanup-commands>
  2431. <comparators>
  2432. <comparator>
  2433. <type>RegexpComparator</type>
  2434. <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///file1</expected-output>
  2435. </comparator>
  2436. <comparator>
  2437. <type>RegexpComparator</type>
  2438. <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///file2</expected-output>
  2439. </comparator>
  2440. <comparator>
  2441. <type>RegexpComparator</type>
  2442. <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///file3</expected-output>
  2443. </comparator>
  2444. <comparator>
  2445. <type>RegexpComparator</type>
  2446. <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir0/file1</expected-output>
  2447. </comparator>
  2448. <comparator>
  2449. <type>RegexpComparator</type>
  2450. <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir0/file2</expected-output>
  2451. </comparator>
  2452. <comparator>
  2453. <type>RegexpComparator</type>
  2454. <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir0/file3</expected-output>
  2455. </comparator>
  2456. </comparators>
  2457. </test>
  2458. <test> <!-- TESTED -->
  2459. <description>cp: copying non existent file in hdfs:// path </description>
  2460. <test-commands>
  2461. <command>-fs NAMENODE -cp hdfs:///file hdfs:///file1</command>
  2462. </test-commands>
  2463. <cleanup-commands>
  2464. </cleanup-commands>:
  2465. <comparators>
  2466. <comparator>
  2467. <type>RegexpComparator</type>
  2468. <expected-output>^cp: `hdfs:///file': No such file or directory</expected-output>
  2469. </comparator>
  2470. </comparators>
  2471. </test>
  2472. <test> <!-- TESTED -->
  2473. <description>cp: copying files to an existent file in hdfs:// path using globbing</description>
  2474. <test-commands>
  2475. <command>-fs NAMENODE -touchz hdfs:///file1</command>
  2476. <command>-fs NAMENODE -touchz hdfs:///file2</command>
  2477. <command>-fs NAMENODE -touchz hdfs:///file3</command>
  2478. <command>-fs NAMENODE -touchz hdfs:///file4</command>
  2479. <command>-fs NAMENODE -touchz hdfs:///file5</command>
  2480. <command>-fs NAMENODE -cp hdfs:///file* hdfs:///file5</command>
  2481. </test-commands>
  2482. <cleanup-commands>
  2483. <command>-fs NAMENODE -rm -r hdfs:///file*</command>
  2484. </cleanup-commands>
  2485. <comparators>
  2486. <comparator>
  2487. <type>RegexpComparator</type>
  2488. <expected-output>^cp: `hdfs:///file5': Is not a directory</expected-output>
  2489. </comparator>
  2490. </comparators>
  2491. </test>
  2492. <test> <!-- TESTED -->
  2493. <description>cp: copying files to an existent file in hdfs:// path without globbing</description>
  2494. <test-commands>
  2495. <command>-fs NAMENODE -touchz hdfs:///file1</command>
  2496. <command>-fs NAMENODE -touchz hdfs:///file2</command>
  2497. <command>-fs NAMENODE -touchz hdfs:///file3</command>
  2498. <command>-fs NAMENODE -touchz hdfs:///file4</command>
  2499. <command>-fs NAMENODE -touchz hdfs:///file5</command>
  2500. <command>-fs NAMENODE -cp hdfs:///file1 hdfs:///file2 hdfs:///file3 hdfs:///file4 hdfs:///file5</command>
  2501. </test-commands>
  2502. <cleanup-commands>
  2503. <command>-fs NAMENODE -rm -r hdfs:///file*</command>
  2504. </cleanup-commands>
  2505. <comparators>
  2506. <comparator>
  2507. <type>RegexpComparator</type>
  2508. <expected-output>^cp: `hdfs:///file5': Is not a directory</expected-output>
  2509. </comparator>
  2510. </comparators>
  2511. </test>
  2512. <test> <!-- TESTED -->
  2513. <description>cp: copying files to a non existent directory in hdfs:// path using globbing</description>
  2514. <test-commands>
  2515. <command>-fs NAMENODE -touchz hdfs:///file1</command>
  2516. <command>-fs NAMENODE -touchz hdfs:///file2</command>
  2517. <command>-fs NAMENODE -touchz hdfs:///file3</command>
  2518. <command>-fs NAMENODE -touchz hdfs:///file4</command>
  2519. <command>-fs NAMENODE -cp hdfs:///file* hdfs:///dir</command>
  2520. </test-commands>
  2521. <cleanup-commands>
  2522. <command>-fs NAMENODE -rm -r hdfs:///file*</command>
  2523. </cleanup-commands>
  2524. <comparators>
  2525. <comparator>
  2526. <type>RegexpComparator</type>
  2527. <expected-output>^cp: `hdfs:///dir': No such file or directory</expected-output>
  2528. </comparator>
  2529. </comparators>
  2530. </test>
  2531. <test> <!-- TESTED -->
  2532. <description>cp: copying files to a non existent directory in hdfs:// path without globbing</description>
  2533. <test-commands>
  2534. <command>-fs NAMENODE -touchz hdfs:///file1</command>
  2535. <command>-fs NAMENODE -touchz hdfs:///file2</command>
  2536. <command>-fs NAMENODE -touchz hdfs:///file3</command>
  2537. <command>-fs NAMENODE -touchz hdfs:///file4</command>
  2538. <command>-fs NAMENODE -cp hdfs:///file1 hdfs:///file2 hdfs:///file3 hdfs:///file4 hdfs:///dir</command>
  2539. </test-commands>
  2540. <cleanup-commands>
  2541. <command>-fs NAMENODE -rm -r hdfs:///file*</command>
  2542. </cleanup-commands>
  2543. <comparators>
  2544. <comparator>
  2545. <type>RegexpComparator</type>
  2546. <expected-output>^cp: `hdfs:///dir': No such file or directory</expected-output>
  2547. </comparator>
  2548. </comparators>
  2549. </test>
  2550. <test> <!-- TESTED -->
  2551. <description>cp: copying non existent directory in hdfs:// path</description>
  2552. <test-commands>
  2553. <command>-fs NAMENODE -mkdir hdfs:///dir1</command>
  2554. <command>-fs NAMENODE -cp hdfs:///dir0 hdfs:///dir1</command>
  2555. </test-commands>
  2556. <cleanup-commands>
  2557. <command>-fs NAMNEODE -rm -r hdfs:///dir1</command>
  2558. </cleanup-commands>
  2559. <comparators>
  2560. <comparator>
  2561. <type>RegexpComparator</type>
  2562. <expected-output>^cp: `hdfs:///dir0': No such file or directory</expected-output>
  2563. </comparator>
  2564. </comparators>
  2565. </test>
  2566. <test> <!-- TESTED -->
  2567. <description>cp: putting file into an already existing destination with -f option(absolute path)</description>
  2568. <test-commands>
  2569. <command>-fs NAMENODE -touchz /user/file0</command>
  2570. <command>-fs NAMENODE -cp -f CLITEST_DATA/data120bytes /user/file0</command>
  2571. <command>-fs NAMENODE -cat /user/file0</command>
  2572. </test-commands>
  2573. <cleanup-commands>
  2574. <command>-fs NAMENODE -rm -r /user</command>
  2575. </cleanup-commands>
  2576. <comparators>
  2577. <comparator>
  2578. <type>RegexpComparator</type>
  2579. <expected-output>12345678901234</expected-output>
  2580. </comparator>
  2581. </comparators>
  2582. </test>
  2583. <test> <!-- TESTED -->
  2584. <description>cp: copying directory to directory in hdfs:// path</description>
  2585. <test-commands>
  2586. <command>-fs NAMENODE -mkdir hdfs:///dir0</command>
  2587. <command>-fs NAMENODE -mkdir hdfs:///dir1</command>
  2588. <command>-fs NAMENODE -touchz hdfs:///dir0/file1</command>
  2589. <command>-fs NAMENODE -cp hdfs:///dir0 hdfs:///dir1</command>
  2590. <command>-fs NAMENODE -ls -R hdfs:///dir*</command>
  2591. </test-commands>
  2592. <cleanup-commands>
  2593. <command>-fs NAMENODE -rm -r hdfs:///*</command>
  2594. </cleanup-commands>
  2595. <comparators>
  2596. <comparator>
  2597. <type>RegexpComparator</type>
  2598. <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir0/file1</expected-output>
  2599. </comparator>
  2600. <comparator>
  2601. <type>RegexpComparator</type>
  2602. <expected-output>^drwxr-xr-x( )*-( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir1/dir0</expected-output>
  2603. </comparator>
  2604. <comparator>
  2605. <type>RegexpComparator</type>
  2606. <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir1/dir0/file1</expected-output>
  2607. </comparator>
  2608. </comparators>
  2609. </test>
  2610. <test> <!-- TESTED -->
  2611. <description>cp: copying multiple directories to directory using globbing in hdfs:// path </description>
  2612. <test-commands>
  2613. <command>-fs NAMENODE -mkdir hdfs:///dir0</command>
  2614. <command>-fs NAMENODE -mkdir hdfs:///dir1</command>
  2615. <command>-fs NAMENODE -mkdir hdfs:///dir2</command>
  2616. <command>-fs NAMENODE -mkdir hdfs:///dest</command>
  2617. <command>-fs NAMENODE -cp hdfs:///dir* hdfs:///dest</command>
  2618. <command>-fs NAMENODE -ls -R hdfs:///d*</command>
  2619. </test-commands>
  2620. <cleanup-commands>
  2621. <command>-fs NAMNEODE -rm -r hdfs:///d*</command>
  2622. </cleanup-commands>
  2623. <comparators>
  2624. <comparator>
  2625. <type>RegexpComparator</type>
  2626. <expected-output>^drwxr-xr-x( )*-( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dest/dir0</expected-output>
  2627. </comparator>
  2628. <comparator>
  2629. <type>RegexpComparator</type>
  2630. <expected-output>^drwxr-xr-x( )*-( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dest/dir1</expected-output>
  2631. </comparator>
  2632. <comparator>
  2633. <type>RegexpComparator</type>
  2634. <expected-output>^drwxr-xr-x( )*-( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dest/dir2</expected-output>
  2635. </comparator>
  2636. </comparators>
  2637. </test>
  2638. <test> <!-- TESTED -->
  2639. <description>cp: copying multiple directories to directory in hdfs:// path without using globbing</description>
  2640. <test-commands>
  2641. <command>-fs NAMENODE -mkdir hdfs:///dir0</command>
  2642. <command>-fs NAMENODE -mkdir hdfs:///dir1</command>
  2643. <command>-fs NAMENODE -mkdir hdfs:///dir2</command>
  2644. <command>-fs NAMENODE -mkdir hdfs:///dest</command>
  2645. <command>-fs NAMENODE -cp hdfs:///dir0 hdfs:///dir1 hdfs:///dir2 hdfs:///dest</command>
  2646. <command>-fs NAMENODE -ls -R hdfs:///d*</command>
  2647. </test-commands>
  2648. <cleanup-commands>
  2649. <command>-fs NAMNEODE -rm -r hdfs:///*</command>
  2650. </cleanup-commands>
  2651. <comparators>
  2652. <comparator>
  2653. <type>RegexpComparator</type>
  2654. <expected-output>^drwxr-xr-x( )*-( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dest/dir0</expected-output>
  2655. </comparator>
  2656. <comparator>
  2657. <type>RegexpComparator</type>
  2658. <expected-output>^drwxr-xr-x( )*-( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dest/dir1</expected-output>
  2659. </comparator>
  2660. <comparator>
  2661. <type>RegexpComparator</type>
  2662. <expected-output>^drwxr-xr-x( )*-( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dest/dir2</expected-output>
  2663. </comparator>
  2664. </comparators>
  2665. </test>
  2666. <test> <!-- TESTED -->
  2667. <description>cp: file to file copy in Namenode's path </description>
  2668. <test-commands>
  2669. <command>-fs NAMENODE -touchz NAMENODE/file1</command>
  2670. <command>-fs NAMENODE -cp NAMENODE/file1 NAMENODE/file2</command>
  2671. <command>-fs NAMENODE -ls NAMENODE/file*</command>
  2672. </test-commands>
  2673. <cleanup-commands>
  2674. <command>-fs NAMENODE -rm NAMENODE/file*</command>
  2675. </cleanup-commands>:
  2676. <comparators>
  2677. <comparator>
  2678. <type>RegexpComparator</type>
  2679. <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/file1</expected-output>
  2680. </comparator>
  2681. <comparator>
  2682. <type>RegexpComparator</type>
  2683. <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/file2</expected-output>
  2684. </comparator>
  2685. </comparators>
  2686. </test>
  2687. <test> <!-- TESTED -->
  2688. <description>cp: file to directory copy (same name at the destination) in Namenode's path </description>
  2689. <test-commands>
  2690. <command>-fs NAMENODE -touchz NAMENODE/file1</command>
  2691. <command>-fs NAMENODE -mkdir NAMENODE/dir0</command>
  2692. <command>-fs NAMENODE -cp NAMENODE/file1 NAMENODE/dir0</command>
  2693. <command>-fs NAMENODE -ls NAMENODE/file1 NAMENODE/dir0</command>
  2694. </test-commands>
  2695. <cleanup-commands>
  2696. <command>-fs NAMENODE -rm -r NAMENODE/dir0/ NAMENODE/file1</command>
  2697. </cleanup-commands>
  2698. <comparators>
  2699. <comparator>
  2700. <type>RegexpComparator</type>
  2701. <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/file1</expected-output>
  2702. </comparator>
  2703. <comparator>
  2704. <type>RegexpComparator</type>
  2705. <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir0/file1</expected-output>
  2706. </comparator>
  2707. </comparators>
  2708. </test>
  2709. <test> <!-- TESTED -->
  2710. <description>cp: file to directory (different name at the destination) in Namenode's path </description>
  2711. <test-commands>
  2712. <command>-fs NAMENODE -touchz NAMENODE/file1</command>
  2713. <command>-fs NAMENODE -mkdir NAMENODE/dir0</command>
  2714. <command>-fs NAMENODE -cp NAMENODE/file1 NAMENODE/dir0/file2</command>
  2715. <command>-fs NAMENODE -ls NAMENODE/file1 NAMENODE/dir0</command>
  2716. </test-commands>
  2717. <cleanup-commands>
  2718. <command>-fs NAMENODE -rm -r NAMENODE/dir0/</command>
  2719. </cleanup-commands>
  2720. <comparators>
  2721. <comparator>
  2722. <type>RegexpComparator</type>
  2723. <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/file1</expected-output>
  2724. </comparator>
  2725. <comparator>
  2726. <type>RegexpComparator</type>
  2727. <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir0/file2</expected-output>
  2728. </comparator>
  2729. </comparators>
  2730. </test>
  2731. <test> <!-- TESTED -->
  2732. <description>cp: files to directory in Namenode's path using globbing</description>
  2733. <test-commands>
  2734. <command>-fs NAMENODE -touchz NAMENODE/file1</command>
  2735. <command>-fs NAMENODE -touchz NAMENODE/file2</command>
  2736. <command>-fs NAMENODE -touchz NAMENODE/file3</command>
  2737. <command>-fs NAMENODE -mkdir NAMENODE/dir0</command>
  2738. <command>-fs NAMENODE -cp NAMENODE/file* NAMENODE/dir0</command>
  2739. <command>-fs NAMENODE -ls -R NAMENODE/*</command>
  2740. </test-commands>
  2741. <cleanup-commands>
  2742. <command>-fs NAMENODE -rm -r NAMENODE/file*</command>
  2743. <command>-fs NAMENODE -rm -r NAMENODE/dir0/</command>
  2744. </cleanup-commands>
  2745. <comparators>
  2746. <comparator>
  2747. <type>RegexpComparator</type>
  2748. <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/file1</expected-output>
  2749. </comparator>
  2750. <comparator>
  2751. <type>RegexpComparator</type>
  2752. <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/file2</expected-output>
  2753. </comparator>
  2754. <comparator>
  2755. <type>RegexpComparator</type>
  2756. <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/file3</expected-output>
  2757. </comparator>
  2758. <comparator>
  2759. <type>RegexpComparator</type>
  2760. <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir0/file1</expected-output>
  2761. </comparator>
  2762. <comparator>
  2763. <type>RegexpComparator</type>
  2764. <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir0/file2</expected-output>
  2765. </comparator>
  2766. <comparator>
  2767. <type>RegexpComparator</type>
  2768. <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir0/file3</expected-output>
  2769. </comparator>
  2770. </comparators>
  2771. </test>
  2772. <test> <!-- TESTED -->
  2773. <description>cp: files to directory in Namenode's path without globbing</description>
  2774. <test-commands>
  2775. <command>-fs NAMENODE -touchz NAMENODE/file1</command>
  2776. <command>-fs NAMENODE -touchz NAMENODE/file2</command>
  2777. <command>-fs NAMENODE -touchz NAMENODE/file3</command>
  2778. <command>-fs NAMENODE -mkdir NAMENODE/dir0</command>
  2779. <command>-fs NAMENODE -cp NAMENODE/file1 NAMENODE/file2 NAMENODE/file3 NAMENODE/dir0</command>
  2780. <command>-fs NAMENODE -ls -R NAMENODE/*</command>
  2781. </test-commands>
  2782. <cleanup-commands>
  2783. <command>-fs NAMENODE -rm -r NAMENODE/file*</command>
  2784. <command>-fs NAMENODE -rm -r NAMENODE/dir0/</command>
  2785. </cleanup-commands>
  2786. <comparators>
  2787. <comparator>
  2788. <type>RegexpComparator</type>
  2789. <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/file1</expected-output>
  2790. </comparator>
  2791. <comparator>
  2792. <type>RegexpComparator</type>
  2793. <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/file2</expected-output>
  2794. </comparator>
  2795. <comparator>
  2796. <type>RegexpComparator</type>
  2797. <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/file3</expected-output>
  2798. </comparator>
  2799. <comparator>
  2800. <type>RegexpComparator</type>
  2801. <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir0/file1</expected-output>
  2802. </comparator>
  2803. <comparator>
  2804. <type>RegexpComparator</type>
  2805. <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir0/file2</expected-output>
  2806. </comparator>
  2807. <comparator>
  2808. <type>RegexpComparator</type>
  2809. <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir0/file3</expected-output>
  2810. </comparator>
  2811. </comparators>
  2812. </test>
  2813. <test> <!-- TESTED -->
  2814. <description>cp: copying non existent file in Namenode's path </description>
  2815. <test-commands>
  2816. <command>-fs NAMENODE -cp NAMENODE/file NAMENODE/file1</command>
  2817. </test-commands>
  2818. <cleanup-commands>
  2819. </cleanup-commands>:
  2820. <comparators>
  2821. <comparator>
  2822. <type>RegexpComparator</type>
  2823. <expected-output>^cp: `hdfs://\w+[-.a-z0-9]*:[0-9]+/file': No such file or directory</expected-output>
  2824. </comparator>
  2825. </comparators>
  2826. </test>
  2827. <test> <!-- TESTED -->
  2828. <description>cp: copying files to an existent file in Namenode's path using globbing</description>
  2829. <test-commands>
  2830. <command>-fs NAMENODE -touchz NAMENODE/file1</command>
  2831. <command>-fs NAMENODE -touchz NAMENODE/file2</command>
  2832. <command>-fs NAMENODE -touchz NAMENODE/file3</command>
  2833. <command>-fs NAMENODE -touchz NAMENODE/file4</command>
  2834. <command>-fs NAMENODE -touchz NAMENODE/file5</command>
  2835. <command>-fs NAMENODE -cp NAMENODE/file* NAMENODE/file5</command>
  2836. </test-commands>
  2837. <cleanup-commands>
  2838. <command>-fs NAMENODE -rm -r NAMENODE/file*</command>
  2839. </cleanup-commands>
  2840. <comparators>
  2841. <comparator>
  2842. <type>RegexpComparator</type>
  2843. <expected-output>^cp: `hdfs://\w+[-.a-z0-9]*:[0-9]+/file5': Is not a directory</expected-output>
  2844. </comparator>
  2845. </comparators>
  2846. </test>
  2847. <test> <!-- TESTED -->
  2848. <description>cp: copying files to an existent file in Namenode's path without globbing</description>
  2849. <test-commands>
  2850. <command>-fs NAMENODE -touchz NAMENODE/file1</command>
  2851. <command>-fs NAMENODE -touchz NAMENODE/file2</command>
  2852. <command>-fs NAMENODE -touchz NAMENODE/file3</command>
  2853. <command>-fs NAMENODE -touchz NAMENODE/file4</command>
  2854. <command>-fs NAMENODE -touchz NAMENODE/file5</command>
  2855. <command>-fs NAMENODE -cp NAMENODE/file1 NAMENODE/file2 NAMENODE/file3 NAMENODE/file4 NAMENODE/file5</command>
  2856. </test-commands>
  2857. <cleanup-commands>
  2858. <command>-fs NAMENODE -rm -r NAMENODE/file*</command>
  2859. </cleanup-commands>
  2860. <comparators>
  2861. <comparator>
  2862. <type>RegexpComparator</type>
  2863. <expected-output>^cp: `hdfs://\w+[-.a-z0-9]*:[0-9]+/file5': Is not a directory</expected-output>
  2864. </comparator>
  2865. </comparators>
  2866. </test>
  2867. <test> <!-- TESTED -->
  2868. <description>cp: copying files to a non existent directory in Namenode's path using globbing</description>
  2869. <test-commands>
  2870. <command>-fs NAMENODE -touchz NAMENODE/file1</command>
  2871. <command>-fs NAMENODE -touchz NAMENODE/file2</command>
  2872. <command>-fs NAMENODE -touchz NAMENODE/file3</command>
  2873. <command>-fs NAMENODE -touchz NAMENODE/file4</command>
  2874. <command>-fs NAMENODE -cp NAMENODE/file* NAMENODE/dir</command>
  2875. </test-commands>
  2876. <cleanup-commands>
  2877. <command>-fs NAMENODE -rm -r NAMENODE/file*</command>
  2878. </cleanup-commands>
  2879. <comparators>
  2880. <comparator>
  2881. <type>RegexpComparator</type>
  2882. <expected-output>^cp: `hdfs://\w+[-.a-z0-9]*:[0-9]+/dir': No such file or directory</expected-output>
  2883. </comparator>
  2884. </comparators>
  2885. </test>
  2886. <test> <!-- TESTED -->
  2887. <description>cp: copying files to a non existent directory in Namenode's path without globbing</description>
  2888. <test-commands>
  2889. <command>-fs NAMENODE -touchz NAMENODE/file1</command>
  2890. <command>-fs NAMENODE -touchz NAMENODE/file2</command>
  2891. <command>-fs NAMENODE -touchz NAMENODE/file3</command>
  2892. <command>-fs NAMENODE -touchz NAMENODE/file4</command>
  2893. <command>-fs NAMENODE -cp NAMENODE/file1 NAMENODE/file2 NAMENODE/file3 NAMENODE/file4 NAMENODE/dir</command>
  2894. </test-commands>
  2895. <cleanup-commands>
  2896. <command>-fs NAMENODE -rm -r NAMENODE/file*</command>
  2897. </cleanup-commands>
  2898. <comparators>
  2899. <comparator>
  2900. <type>RegexpComparator</type>
  2901. <expected-output>^cp: `hdfs://\w+[-.a-z0-9]*:[0-9]+/dir': No such file or directory</expected-output>
  2902. </comparator>
  2903. </comparators>
  2904. </test>
  2905. <test> <!-- TESTED -->
  2906. <description>cp: copying directory to directory in Namenode's path </description>
  2907. <test-commands>
  2908. <command>-fs NAMENODE -mkdir NAMENODE/dir0</command>
  2909. <command>-fs NAMENODE -mkdir NAMENODE/dir1</command>
  2910. <command>-fs NAMENODE -touchz NAMENODE/dir0/file1</command>
  2911. <command>-fs NAMENODE -cp NAMENODE/dir0 NAMENODE/dir1</command>
  2912. <command>-fs NAMENODE -ls -R NAMENODE/dir*</command>
  2913. </test-commands>
  2914. <cleanup-commands>
  2915. <command>-fs NAMENODE -rm -r NAMENODE/*</command>
  2916. </cleanup-commands>
  2917. <comparators>
  2918. <comparator>
  2919. <type>RegexpComparator</type>
  2920. <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir0/file1</expected-output>
  2921. </comparator>
  2922. <comparator>
  2923. <type>RegexpComparator</type>
  2924. <expected-output>^drwxr-xr-x( )*-( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir1/dir0</expected-output>
  2925. </comparator>
  2926. <comparator>
  2927. <type>RegexpComparator</type>
  2928. <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir1/dir0/file1</expected-output>
  2929. </comparator>
  2930. </comparators>
  2931. </test>
  2932. <test> <!-- TESTED -->
  2933. <description>cp: copying multiple directories to directory in Namenode's path using globbing</description>
  2934. <test-commands>
  2935. <command>-fs NAMENODE -mkdir NAMENODE/dir0</command>
  2936. <command>-fs NAMENODE -mkdir NAMENODE/dir1</command>
  2937. <command>-fs NAMENODE -mkdir NAMENODE/dir2</command>
  2938. <command>-fs NAMENODE -mkdir NAMENODE/dest</command>
  2939. <command>-fs NAMENODE -cp NAMENODE/dir* NAMENODE/dest</command>
  2940. <command>-fs NAMENODE -ls -R NAMENODE/d*</command>
  2941. </test-commands>
  2942. <cleanup-commands>
  2943. <command>-fs NAMNEODE -rm -r NAMENODE/d*</command>
  2944. </cleanup-commands>
  2945. <comparators>
  2946. <comparator>
  2947. <type>RegexpComparator</type>
  2948. <expected-output>^drwxr-xr-x( )*-( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dest/dir0</expected-output>
  2949. </comparator>
  2950. <comparator>
  2951. <type>RegexpComparator</type>
  2952. <expected-output>^drwxr-xr-x( )*-( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dest/dir1</expected-output>
  2953. </comparator>
  2954. <comparator>
  2955. <type>RegexpComparator</type>
  2956. <expected-output>^drwxr-xr-x( )*-( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dest/dir2</expected-output>
  2957. </comparator>
  2958. </comparators>
  2959. </test>
  2960. <test> <!-- TESTED -->
  2961. <description>cp: copying multiple directories to directory in Namenode's path without using globbing</description>
  2962. <test-commands>
  2963. <command>-fs NAMENODE -mkdir NAMENODE/dir0</command>
  2964. <command>-fs NAMENODE -mkdir NAMENODE/dir1</command>
  2965. <command>-fs NAMENODE -mkdir NAMENODE/dir2</command>
  2966. <command>-fs NAMENODE -mkdir NAMENODE/dest</command>
  2967. <command>-fs NAMENODE -cp NAMENODE/dir0 NAMENODE/dir1 NAMENODE/dir2 NAMENODE/dest</command>
  2968. <command>-fs NAMENODE -ls -R NAMENODE/d*</command>
  2969. </test-commands>
  2970. <cleanup-commands>
  2971. <command>-fs NAMNEODE -rm -r NAMENODE/*</command>
  2972. </cleanup-commands>
  2973. <comparators>
  2974. <comparator>
  2975. <type>RegexpComparator</type>
  2976. <expected-output>^drwxr-xr-x( )*-( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dest/dir0</expected-output>
  2977. </comparator>
  2978. <comparator>
  2979. <type>RegexpComparator</type>
  2980. <expected-output>^drwxr-xr-x( )*-( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dest/dir1</expected-output>
  2981. </comparator>
  2982. <comparator>
  2983. <type>RegexpComparator</type>
  2984. <expected-output>^drwxr-xr-x( )*-( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dest/dir2</expected-output>
  2985. </comparator>
  2986. </comparators>
  2987. </test>
  2988. <!-- Tests for rm -->
  2989. <test> <!-- TESTED -->
  2990. <description>rm: removing a file (absolute path) </description>
  2991. <test-commands>
  2992. <command>-fs NAMENODE -touchz /dir0/file0</command>
  2993. <command>-fs NAMENODE -rm /dir0/file0</command>
  2994. </test-commands>
  2995. <cleanup-commands>
  2996. <command>-fs NAMENODE -rm /user</command>
  2997. </cleanup-commands>
  2998. <comparators>
  2999. <comparator>
  3000. <type>RegexpComparator</type>
  3001. <expected-output>^Deleted /dir0/file0</expected-output>
  3002. </comparator>
  3003. </comparators>
  3004. </test>
  3005. <test> <!-- TESTED -->
  3006. <description>rm: removing a file (relative path) </description>
  3007. <test-commands>
  3008. <command>-fs NAMENODE -touchz file0</command>
  3009. <command>-fs NAMENODE -rm file0</command>
  3010. </test-commands>
  3011. <cleanup-commands>
  3012. <command>-fs NAMENODE -rm /user</command>
  3013. </cleanup-commands>
  3014. <comparators>
  3015. <comparator>
  3016. <type>RegexpComparator</type>
  3017. <expected-output>^Deleted file0</expected-output>
  3018. </comparator>
  3019. </comparators>
  3020. </test>
  3021. <test> <!-- TESTED -->
  3022. <description>rm: removing files by globbing (absolute path) </description>
  3023. <test-commands>
  3024. <command>-fs NAMENODE -touchz /dir0/file0</command>
  3025. <command>-fs NAMENODE -touchz /dir0/file1</command>
  3026. <command>-fs NAMENODE -touchz /dir0/file2</command>
  3027. <command>-fs NAMENODE -touchz /dir0/file3</command>
  3028. <command>-fs NAMENODE -rm /dir0/file*</command>
  3029. </test-commands>
  3030. <cleanup-commands>
  3031. <command>-fs NAMENODE -rm /user</command>
  3032. </cleanup-commands>
  3033. <comparators>
  3034. <comparator>
  3035. <type>RegexpComparator</type>
  3036. <expected-output>^Deleted /dir0/file0</expected-output>
  3037. </comparator>
  3038. <comparator>
  3039. <type>RegexpComparator</type>
  3040. <expected-output>^Deleted /dir0/file1</expected-output>
  3041. </comparator>
  3042. <comparator>
  3043. <type>RegexpComparator</type>
  3044. <expected-output>^Deleted /dir0/file2</expected-output>
  3045. </comparator>
  3046. <comparator>
  3047. <type>RegexpComparator</type>
  3048. <expected-output>^Deleted /dir0/file3</expected-output>
  3049. </comparator>
  3050. </comparators>
  3051. </test>
  3052. <test> <!-- TESTED -->
  3053. <description>rm: removing files by globbing (relative path) </description>
  3054. <test-commands>
  3055. <command>-fs NAMENODE -touchz file0</command>
  3056. <command>-fs NAMENODE -touchz file1</command>
  3057. <command>-fs NAMENODE -touchz file2</command>
  3058. <command>-fs NAMENODE -touchz file3</command>
  3059. <command>-fs NAMENODE -rm file*</command>
  3060. </test-commands>
  3061. <cleanup-commands>
  3062. <command>-fs NAMENODE -rm /user</command>
  3063. </cleanup-commands>
  3064. <comparators>
  3065. <comparator>
  3066. <type>RegexpComparator</type>
  3067. <expected-output>^Deleted file0</expected-output>
  3068. </comparator>
  3069. <comparator>
  3070. <type>RegexpComparator</type>
  3071. <expected-output>^Deleted file1</expected-output>
  3072. </comparator>
  3073. <comparator>
  3074. <type>RegexpComparator</type>
  3075. <expected-output>^Deleted file2</expected-output>
  3076. </comparator>
  3077. <comparator>
  3078. <type>RegexpComparator</type>
  3079. <expected-output>^Deleted file3</expected-output>
  3080. </comparator>
  3081. </comparators>
  3082. </test>
  3083. <test> <!-- TESTED -->
  3084. <description>rm: removing a directory (absolute path) </description>
  3085. <test-commands>
  3086. <command>-fs NAMENODE mkdir /dir0</command>
  3087. <command>-fs NAMENODE -rm /dir0</command>
  3088. </test-commands>
  3089. <cleanup-commands>
  3090. <command>-fs NAMENODE -rm /user</command>
  3091. </cleanup-commands>
  3092. <comparators>
  3093. <comparator>
  3094. <type>RegexpComparator</type>
  3095. <expected-output>^rm: `/dir0': Is a directory</expected-output>
  3096. </comparator>
  3097. </comparators>
  3098. </test>
  3099. <test> <!-- TESTED -->
  3100. <description>rm: removing a directory (relative path) </description>
  3101. <test-commands>
  3102. <command>-fs NAMENODE mkdir dir0</command>
  3103. <command>-fs NAMENODE -rm dir0</command>
  3104. </test-commands>
  3105. <cleanup-commands>
  3106. <command>-fs NAMENODE -rm /user</command>
  3107. </cleanup-commands>
  3108. <comparators>
  3109. <comparator>
  3110. <type>RegexpComparator</type>
  3111. <expected-output>^rm: `dir0': No such file or directory</expected-output>
  3112. </comparator>
  3113. </comparators>
  3114. </test>
  3115. <test> <!-- TESTED -->
  3116. <description>rm: removing a nonexistent file (absolute path) </description>
  3117. <test-commands>
  3118. <command>-fs NAMENODE -rm /dir0/file0</command>
  3119. </test-commands>
  3120. <cleanup-commands>
  3121. <command>-fs NAMENODE -rm /user</command>
  3122. </cleanup-commands>
  3123. <comparators>
  3124. <comparator>
  3125. <type>RegexpComparator</type>
  3126. <expected-output>^rm: `/dir0/file0': No such file or directory</expected-output>
  3127. </comparator>
  3128. </comparators>
  3129. </test>
  3130. <test> <!-- TESTED -->
  3131. <description>rm: removing a nonexistent file (relative path) </description>
  3132. <test-commands>
  3133. <command>-fs NAMENODE -rm file0</command>
  3134. </test-commands>
  3135. <cleanup-commands>
  3136. <command>-fs NAMENODE -rm /user</command>
  3137. </cleanup-commands>
  3138. <comparators>
  3139. <comparator>
  3140. <type>RegexpComparator</type>
  3141. <expected-output>^rm: `file0': No such file or directory</expected-output>
  3142. </comparator>
  3143. </comparators>
  3144. </test>
  3145. <test> <!-- TESTED -->
  3146. <description>rm: removing a file in hdfs:// path </description>
  3147. <test-commands>
  3148. <command>-fs NAMENODE -touchz hdfs:///file0</command>
  3149. <command>-fs NAMENODE -rm hdfs:///file0</command>
  3150. </test-commands>
  3151. <cleanup-commands>
  3152. <command>-fs NAMENODE -rm hdfs:///*</command>
  3153. </cleanup-commands>
  3154. <comparators>
  3155. <comparator>
  3156. <type>RegexpComparator</type>
  3157. <expected-output>^Deleted hdfs:///file0</expected-output>
  3158. </comparator>
  3159. </comparators>
  3160. </test>
  3161. <test> <!-- TESTED -->
  3162. <description>rm: removing files by globbing in hdfs:// path </description>
  3163. <test-commands>
  3164. <command>-fs NAMENODE -touchz hdfs:///file0</command>
  3165. <command>-fs NAMENODE -touchz hdfs:///file1</command>
  3166. <command>-fs NAMENODE -touchz hdfs:///file2</command>
  3167. <command>-fs NAMENODE -touchz hdfs:///file3</command>
  3168. <command>-fs NAMENODE -rm hdfs:///file*</command>
  3169. </test-commands>
  3170. <cleanup-commands>
  3171. <command>-fs NAMENODE -rm hdfs:///*</command>
  3172. </cleanup-commands>
  3173. <comparators>
  3174. <comparator>
  3175. <type>RegexpComparator</type>
  3176. <expected-output>^Deleted hdfs:///file0</expected-output>
  3177. </comparator>
  3178. <comparator>
  3179. <type>RegexpComparator</type>
  3180. <expected-output>^Deleted hdfs:///file1</expected-output>
  3181. </comparator>
  3182. <comparator>
  3183. <type>RegexpComparator</type>
  3184. <expected-output>^Deleted hdfs:///file2</expected-output>
  3185. </comparator>
  3186. <comparator>
  3187. <type>RegexpComparator</type>
  3188. <expected-output>^Deleted hdfs:///file3</expected-output>
  3189. </comparator>
  3190. </comparators>
  3191. </test>
  3192. <test> <!-- TESTED -->
  3193. <description>rm: removing a directory in hdfs:// path </description>
  3194. <test-commands>
  3195. <command>-fs NAMENODE mkdir hdfs:///dir0</command>
  3196. <command>-fs NAMENODE -rm hdfs:///dir0</command>
  3197. </test-commands>
  3198. <cleanup-commands>
  3199. <command>-fs NAMENODE -rm -r hdfs:///*</command>
  3200. </cleanup-commands>
  3201. <comparators>
  3202. <comparator>
  3203. <type>RegexpComparator</type>
  3204. <expected-output>^rm: `hdfs:///dir0': Is a directory</expected-output>
  3205. </comparator>
  3206. </comparators>
  3207. </test>
  3208. <test> <!-- TESTED -->
  3209. <description>rm: removing a nonexistent file or dirctory in hdfs:// path </description>
  3210. <test-commands>
  3211. <command>-fs NAMENODE -rm hdfs:///file0</command>
  3212. </test-commands>
  3213. <cleanup-commands>
  3214. <command>-fs NAMENODE -rm hdfs:///*</command>
  3215. </cleanup-commands>
  3216. <comparators>
  3217. <comparator>
  3218. <type>RegexpComparator</type>
  3219. <expected-output>^rm: `hdfs:///file0': No such file or directory</expected-output>
  3220. </comparator>
  3221. </comparators>
  3222. </test>
  3223. <test> <!-- TESTED -->
  3224. <description>rm: removing files without globbing in hdfs:// path </description>
  3225. <test-commands>
  3226. <command>-fs NAMENODE -touchz hdfs:///file0</command>
  3227. <command>-fs NAMENODE -touchz hdfs:///file1</command>
  3228. <command>-fs NAMENODE -touchz hdfs:///file2</command>
  3229. <command>-fs NAMENODE -touchz hdfs:///file3</command>
  3230. <command>-fs NAMENODE -rm hdfs:///file0 hdfs:///file1 hdfs:///file2 hdfs:///file3</command>
  3231. </test-commands>
  3232. <cleanup-commands>
  3233. <command>-fs NAMENODE -rm hdfs:///*</command>
  3234. </cleanup-commands>
  3235. <comparators>
  3236. <comparator>
  3237. <type>RegexpComparator</type>
  3238. <expected-output>^Deleted hdfs:///file0</expected-output>
  3239. </comparator>
  3240. <comparator>
  3241. <type>RegexpComparator</type>
  3242. <expected-output>^Deleted hdfs:///file1</expected-output>
  3243. </comparator>
  3244. <comparator>
  3245. <type>RegexpComparator</type>
  3246. <expected-output>^Deleted hdfs:///file2</expected-output>
  3247. </comparator>
  3248. <comparator>
  3249. <type>RegexpComparator</type>
  3250. <expected-output>^Deleted hdfs:///file3</expected-output>
  3251. </comparator>
  3252. </comparators>
  3253. </test>
  3254. <test> <!-- TESTED -->
  3255. <description>rm: removing a file in Namenode's path </description>
  3256. <test-commands>
  3257. <command>-fs NAMENODE -touchz NAMENODE/file0</command>
  3258. <command>-fs NAMENODE -rm NAMENODE/file0</command>
  3259. </test-commands>
  3260. <cleanup-commands>
  3261. <command>-fs NAMENODE -rm NAMENODE/*</command>
  3262. </cleanup-commands>
  3263. <comparators>
  3264. <comparator>
  3265. <type>RegexpComparator</type>
  3266. <expected-output>^Deleted NAMENODE/file0</expected-output>
  3267. </comparator>
  3268. </comparators>
  3269. </test>
  3270. <test> <!-- TESTED -->
  3271. <description>rm: removing files by globbing in Namenode's path </description>
  3272. <test-commands>
  3273. <command>-fs NAMENODE -touchz NAMENODE/file0</command>
  3274. <command>-fs NAMENODE -touchz NAMENODE/file1</command>
  3275. <command>-fs NAMENODE -touchz NAMENODE/file2</command>
  3276. <command>-fs NAMENODE -touchz NAMENODE/file3</command>
  3277. <command>-fs NAMENODE -rm NAMENODE/file*</command>
  3278. </test-commands>
  3279. <cleanup-commands>
  3280. <command>-fs NAMENODE -rm NAMENODE/*</command>
  3281. </cleanup-commands>
  3282. <comparators>
  3283. <comparator>
  3284. <type>RegexpComparator</type>
  3285. <expected-output>^Deleted NAMENODE/file0</expected-output>
  3286. </comparator>
  3287. <comparator>
  3288. <type>RegexpComparator</type>
  3289. <expected-output>^Deleted NAMENODE/file1</expected-output>
  3290. </comparator>
  3291. <comparator>
  3292. <type>RegexpComparator</type>
  3293. <expected-output>^Deleted NAMENODE/file2</expected-output>
  3294. </comparator>
  3295. <comparator>
  3296. <type>RegexpComparator</type>
  3297. <expected-output>^Deleted NAMENODE/file3</expected-output>
  3298. </comparator>
  3299. </comparators>
  3300. </test>
  3301. <test> <!-- TESTED -->
  3302. <description>rm: removing a directory in Namenode's path </description>
  3303. <test-commands>
  3304. <command>-fs NAMENODE mkdir NAMENODE/dir0</command>
  3305. <command>-fs NAMENODE -rm NAMENODE/dir0</command>
  3306. </test-commands>
  3307. <cleanup-commands>
  3308. <command>-fs NAMENODE -rm -r NAMENODE/*</command>
  3309. </cleanup-commands>
  3310. <comparators>
  3311. <comparator>
  3312. <type>RegexpComparator</type>
  3313. <expected-output>rm: `NAMENODE/dir0': No such file or directory</expected-output>
  3314. </comparator>
  3315. </comparators>
  3316. </test>
  3317. <test> <!-- TESTED -->
  3318. <description>rm: removing a nonexistent file or directory in Namenode's path </description>
  3319. <test-commands>
  3320. <command>-fs NAMENODE -rm NAMENODE/file0</command>
  3321. </test-commands>
  3322. <cleanup-commands>
  3323. <command>-fs NAMENODE -rm NAMENODE/*</command>
  3324. </cleanup-commands>
  3325. <comparators>
  3326. <comparator>
  3327. <type>RegexpComparator</type>
  3328. <expected-output>^rm: `NAMENODE/file0': No such file or directory</expected-output>
  3329. </comparator>
  3330. </comparators>
  3331. </test>
  3332. <test> <!-- TESTED -->
  3333. <description>rm: Tremoving files without globbing in Namenode path </description>
  3334. <test-commands>
  3335. <command>-fs NAMENODE -touchz NAMENODE/file0</command>
  3336. <command>-fs NAMENODE -touchz NAMENODE/file1</command>
  3337. <command>-fs NAMENODE -touchz NAMENODE/file2</command>
  3338. <command>-fs NAMENODE -touchz NAMENODE/file3</command>
  3339. <command>-fs NAMENODE -rm NAMENODE/file0 NAMENODE/file1 NAMENODE/file2 NAMENODE/file3</command>
  3340. </test-commands>
  3341. <cleanup-commands>
  3342. <command>-fs NAMENODE -rm NAMENODE/*</command>
  3343. </cleanup-commands>
  3344. <comparators>
  3345. <comparator>
  3346. <type>RegexpComparator</type>
  3347. <expected-output>^Deleted NAMENODE/file0</expected-output>
  3348. </comparator>
  3349. <comparator>
  3350. <type>RegexpComparator</type>
  3351. <expected-output>^Deleted NAMENODE/file1</expected-output>
  3352. </comparator>
  3353. <comparator>
  3354. <type>RegexpComparator</type>
  3355. <expected-output>^Deleted NAMENODE/file2</expected-output>
  3356. </comparator>
  3357. <comparator>
  3358. <type>RegexpComparator</type>
  3359. <expected-output>^Deleted NAMENODE/file3</expected-output>
  3360. </comparator>
  3361. </comparators>
  3362. </test>
  3363. <!--Tests for rmr-->
  3364. <test> <!-- TESTED -->
  3365. <description>rm: removing a file (absolute path) </description>
  3366. <test-commands>
  3367. <command>-fs NAMENODE -touchz /dir0/file0</command>
  3368. <command>-fs NAMENODE -rm -r /dir0/file0</command>
  3369. </test-commands>
  3370. <cleanup-commands>
  3371. <command>-fs NAMENODE -rm -r /user</command>
  3372. </cleanup-commands>
  3373. <comparators>
  3374. <comparator>
  3375. <type>RegexpComparator</type>
  3376. <expected-output>^Deleted /dir0/file0</expected-output>
  3377. </comparator>
  3378. </comparators>
  3379. </test>
  3380. <test> <!-- TESTED -->
  3381. <description>rm: removing a file (relative path) </description>
  3382. <test-commands>
  3383. <command>-fs NAMENODE -touchz file0</command>
  3384. <command>-fs NAMENODE -rm -r file0</command>
  3385. </test-commands>
  3386. <cleanup-commands>
  3387. <command>-fs NAMENODE -rm -r /user</command>
  3388. </cleanup-commands>
  3389. <comparators>
  3390. <comparator>
  3391. <type>RegexpComparator</type>
  3392. <expected-output>^Deleted file0</expected-output>
  3393. </comparator>
  3394. </comparators>
  3395. </test>
  3396. <test> <!-- TESTED -->
  3397. <description>rm: removing a directory (absolute path) </description>
  3398. <test-commands>
  3399. <command>-fs NAMENODE -touchz /dir0</command>
  3400. <command>-fs NAMENODE -rm -r /dir0</command>
  3401. </test-commands>
  3402. <cleanup-commands>
  3403. <command>-fs NAMENODE -rm -r /user</command>
  3404. </cleanup-commands>
  3405. <comparators>
  3406. <comparator>
  3407. <type>RegexpComparator</type>
  3408. <expected-output>^Deleted /dir0</expected-output>
  3409. </comparator>
  3410. </comparators>
  3411. </test>
  3412. <test> <!-- TESTED -->
  3413. <description>rm: removing a directory (relative path) </description>
  3414. <test-commands>
  3415. <command>-fs NAMENODE -mkdir dir0</command>
  3416. <command>-fs NAMENODE -rm -r dir0</command>
  3417. </test-commands>
  3418. <cleanup-commands>
  3419. <command>-fs NAMENODE -rm -r /user</command>
  3420. </cleanup-commands>
  3421. <comparators>
  3422. <comparator>
  3423. <type>RegexpComparator</type>
  3424. <expected-output>^Deleted dir0</expected-output>
  3425. </comparator>
  3426. </comparators>
  3427. </test>
  3428. <test> <!-- TESTED -->
  3429. <description>rm: removing directories by globbing (absolute path) </description>
  3430. <test-commands>
  3431. <command>-fs NAMENODE -mkdir /dir0</command>
  3432. <command>-fs NAMENODE -mkdir /dir1</command>
  3433. <command>-fs NAMENODE -mkdir /dir2</command>
  3434. <command>-fs NAMENODE -mkdir /dir3</command>
  3435. <command>-fs NAMENODE -rm -r /dir*</command>
  3436. </test-commands>
  3437. <cleanup-commands>
  3438. <command>-fs NAMENODE -rm /user</command>
  3439. </cleanup-commands>
  3440. <comparators>
  3441. <comparator>
  3442. <type>RegexpComparator</type>
  3443. <expected-output>^Deleted /dir0</expected-output>
  3444. </comparator>
  3445. <comparator>
  3446. <type>RegexpComparator</type>
  3447. <expected-output>^Deleted /dir1</expected-output>
  3448. </comparator>
  3449. <comparator>
  3450. <type>RegexpComparator</type>
  3451. <expected-output>^Deleted /dir2</expected-output>
  3452. </comparator>
  3453. <comparator>
  3454. <type>RegexpComparator</type>
  3455. <expected-output>^Deleted /dir3</expected-output>
  3456. </comparator>
  3457. </comparators>
  3458. </test>
  3459. <test> <!-- TESTED -->
  3460. <description>rm: removing directories by globbing (relative path) </description>
  3461. <test-commands>
  3462. <command>-fs NAMENODE -mkdir dir0</command>
  3463. <command>-fs NAMENODE -mkdir dir1</command>
  3464. <command>-fs NAMENODE -mkdir dir2</command>
  3465. <command>-fs NAMENODE -mkdir dir3</command>
  3466. <command>-fs NAMENODE -rm -r dir*</command>
  3467. </test-commands>
  3468. <cleanup-commands>
  3469. <command>-fs NAMENODE -rm /user</command>
  3470. </cleanup-commands>
  3471. <comparators>
  3472. <comparator>
  3473. <type>RegexpComparator</type>
  3474. <expected-output>^Deleted dir0</expected-output>
  3475. </comparator>
  3476. <comparator>
  3477. <type>RegexpComparator</type>
  3478. <expected-output>^Deleted dir1</expected-output>
  3479. </comparator>
  3480. <comparator>
  3481. <type>RegexpComparator</type>
  3482. <expected-output>^Deleted dir2</expected-output>
  3483. </comparator>
  3484. <comparator>
  3485. <type>RegexpComparator</type>
  3486. <expected-output>^Deleted dir3</expected-output>
  3487. </comparator>
  3488. </comparators>
  3489. </test>
  3490. <test> <!--TESTED-->
  3491. <description>rm: removing a nonexistent file (absolute path) </description>
  3492. <test-commands>
  3493. <command>-fs NAMENODE -rm -r /dir0/file0</command>
  3494. </test-commands>
  3495. <cleanup-commands>
  3496. <command>-fs NAMENODE -rm -r /user</command>
  3497. </cleanup-commands>
  3498. <comparators>
  3499. <comparator>
  3500. <type>RegexpComparator</type>
  3501. <expected-output>^rm: `/dir0/file0': No such file or directory</expected-output>
  3502. </comparator>
  3503. </comparators>
  3504. </test>
  3505. <test> <!-- TESTED -->
  3506. <description>rm: removing a nonexistent file (relative path) </description>
  3507. <test-commands>
  3508. <command>-fs NAMENODE -rm -r file0</command>
  3509. </test-commands>
  3510. <cleanup-commands>
  3511. <command>-fs NAMENODE -rm -r /user</command>
  3512. </cleanup-commands>
  3513. <comparators>
  3514. <comparator>
  3515. <type>RegexpComparator</type>
  3516. <expected-output>^rm: `file0': No such file or directory</expected-output>
  3517. </comparator>
  3518. </comparators>
  3519. </test>
  3520. <test> <!-- TESTED -->
  3521. <description>rm: removing a file in hdfs:// path </description>
  3522. <test-commands>
  3523. <command>-fs NAMENODE -touchz hdfs:///file0</command>
  3524. <command>-fs NAMENODE -rm -r hdfs:///file0</command>
  3525. </test-commands>
  3526. <cleanup-commands>
  3527. <command>-fs NAMENODE -rm -r hdfs:///*</command>
  3528. </cleanup-commands>
  3529. <comparators>
  3530. <comparator>
  3531. <type>RegexpComparator</type>
  3532. <expected-output>^Deleted hdfs:///file0</expected-output>
  3533. </comparator>
  3534. </comparators>
  3535. </test>
  3536. <test> <!-- TESTED -->
  3537. <description>rm: removing a directory in hdfs:// path </description>
  3538. <test-commands>
  3539. <command>-fs NAMENODE -touchz hdfs:///dir0</command>
  3540. <command>-fs NAMENODE -rm -r hdfs:///dir0</command>
  3541. </test-commands>
  3542. <cleanup-commands>
  3543. <command>-fs NAMENODE -rm -r hdfs:///*</command>
  3544. </cleanup-commands>
  3545. <comparators>
  3546. <comparator>
  3547. <type>RegexpComparator</type>
  3548. <expected-output>^Deleted hdfs:///dir0</expected-output>
  3549. </comparator>
  3550. </comparators>
  3551. </test>
  3552. <test> <!-- TESTED -->
  3553. <description>rm: removing directories by globbing in hdfs:// path </description>
  3554. <test-commands>
  3555. <command>-fs NAMENODE -mkdir hdfs:///dir0</command>
  3556. <command>-fs NAMENODE -mkdir hdfs:///dir1</command>
  3557. <command>-fs NAMENODE -mkdir hdfs:///dir2</command>
  3558. <command>-fs NAMENODE -mkdir hdfs:///dir3</command>
  3559. <command>-fs NAMENODE -rm -r hdfs:///dir*</command>
  3560. </test-commands>
  3561. <cleanup-commands>
  3562. <command>-fs NAMENODE -rm -r hdfs:///*</command>
  3563. </cleanup-commands>
  3564. <comparators>
  3565. <comparator>
  3566. <type>RegexpComparator</type>
  3567. <expected-output>^Deleted hdfs:///dir0</expected-output>
  3568. </comparator>
  3569. <comparator>
  3570. <type>RegexpComparator</type>
  3571. <expected-output>^Deleted hdfs:///dir1</expected-output>
  3572. </comparator>
  3573. <comparator>
  3574. <type>RegexpComparator</type>
  3575. <expected-output>^Deleted hdfs:///dir2</expected-output>
  3576. </comparator>
  3577. <comparator>
  3578. <type>RegexpComparator</type>
  3579. <expected-output>^Deleted hdfs:///dir3</expected-output>
  3580. </comparator>
  3581. </comparators>
  3582. </test>
  3583. <test> <!--TESTED-->
  3584. <description>rm: removing a nonexistent file or directory in hdfs:// path </description>
  3585. <test-commands>
  3586. <command>-fs NAMENODE -rm -r hdfs:///file0</command>
  3587. </test-commands>
  3588. <cleanup-commands>
  3589. <command>-fs NAMENODE -rm -r hdfs:///*</command>
  3590. </cleanup-commands>
  3591. <comparators>
  3592. <comparator>
  3593. <type>RegexpComparator</type>
  3594. <expected-output>^rm: `hdfs:///file0': No such file or directory</expected-output>
  3595. </comparator>
  3596. </comparators>
  3597. </test>
  3598. <test> <!-- TESTED -->
  3599. <description>rm: removing directories without globbing in hdfs:// path </description>
  3600. <test-commands>
  3601. <command>-fs NAMENODE -mkdir hdfs:///dir0</command>
  3602. <command>-fs NAMENODE -mkdir hdfs:///dir1</command>
  3603. <command>-fs NAMENODE -mkdir hdfs:///dir2</command>
  3604. <command>-fs NAMENODE -mkdir hdfs:///dir3</command>
  3605. <command>-fs NAMENODE -rm -r hdfs:///dir0 hdfs:///dir1 hdfs:///dir2 hdfs:///dir3</command>
  3606. </test-commands>
  3607. <cleanup-commands>
  3608. <command>-fs NAMENODE -rm -r hdfs:///*</command>
  3609. </cleanup-commands>
  3610. <comparators>
  3611. <comparator>
  3612. <type>RegexpComparator</type>
  3613. <expected-output>^Deleted hdfs:///dir0</expected-output>
  3614. </comparator>
  3615. <comparator>
  3616. <type>RegexpComparator</type>
  3617. <expected-output>^Deleted hdfs:///dir1</expected-output>
  3618. </comparator>
  3619. <comparator>
  3620. <type>RegexpComparator</type>
  3621. <expected-output>^Deleted hdfs:///dir2</expected-output>
  3622. </comparator>
  3623. <comparator>
  3624. <type>RegexpComparator</type>
  3625. <expected-output>^Deleted hdfs:///dir3</expected-output>
  3626. </comparator>
  3627. </comparators>
  3628. </test>
  3629. <test> <!-- TESTED -->
  3630. <description>rm: Test for Namenode's path - removing a file</description>
  3631. <test-commands>
  3632. <command>-fs NAMENODE -touchz NAMENODE/file0</command>
  3633. <command>-fs NAMENODE -rm -r NAMENODE/file0</command>
  3634. </test-commands>
  3635. <cleanup-commands>
  3636. <command>-fs NAMENODE -rm -r NAMENODE/*</command>
  3637. </cleanup-commands>
  3638. <comparators>
  3639. <comparator>
  3640. <type>RegexpComparator</type>
  3641. <expected-output>^Deleted NAMENODE/file0</expected-output>
  3642. </comparator>
  3643. </comparators>
  3644. </test>
  3645. <test> <!-- TESTED -->
  3646. <description>rm: Test for Namenode's path - removing a directory</description>
  3647. <test-commands>
  3648. <command>-fs NAMENODE -touchz NAMENODE/dir0</command>
  3649. <command>-fs NAMENODE -rm -r NAMENODE/dir0</command>
  3650. </test-commands>
  3651. <cleanup-commands>
  3652. <command>-fs NAMENODE -rm -r NAMENODE/*</command>
  3653. </cleanup-commands>
  3654. <comparators>
  3655. <comparator>
  3656. <type>RegexpComparator</type>
  3657. <expected-output>^Deleted NAMENODE/dir0</expected-output>
  3658. </comparator>
  3659. </comparators>
  3660. </test>
  3661. <test> <!-- TESTED -->
  3662. <description>rm: removing directories by globbing in Namenode's path </description>
  3663. <test-commands>
  3664. <command>-fs NAMENODE -mkdir NAMENODE/dir0</command>
  3665. <command>-fs NAMENODE -mkdir NAMENODE/dir1</command>
  3666. <command>-fs NAMENODE -mkdir NAMENODE/dir2</command>
  3667. <command>-fs NAMENODE -mkdir NAMENODE/dir3</command>
  3668. <command>-fs NAMENODE -rm -r NAMENODE/dir*</command>
  3669. </test-commands>
  3670. <cleanup-commands>
  3671. <command>-fs NAMENODE -rm -r NAMENODE/*</command>
  3672. </cleanup-commands>
  3673. <comparators>
  3674. <comparator>
  3675. <type>RegexpComparator</type>
  3676. <expected-output>^Deleted NAMENODE/dir0</expected-output>
  3677. </comparator>
  3678. <comparator>
  3679. <type>RegexpComparator</type>
  3680. <expected-output>^Deleted NAMENODE/dir1</expected-output>
  3681. </comparator>
  3682. <comparator>
  3683. <type>RegexpComparator</type>
  3684. <expected-output>^Deleted NAMENODE/dir2</expected-output>
  3685. </comparator>
  3686. <comparator>
  3687. <type>RegexpComparator</type>
  3688. <expected-output>^Deleted NAMENODE/dir3</expected-output>
  3689. </comparator>
  3690. </comparators>
  3691. </test>
  3692. <test> <!--TESTED-->
  3693. <description>rm: removing a nonexistent file or directory in Namenode's path </description>
  3694. <test-commands>
  3695. <command>-fs NAMENODE -rm -r NAMENODE/file0</command>
  3696. </test-commands>
  3697. <cleanup-commands>
  3698. <command>-fs NAMENODE -rm -r NAMENODE/*</command>
  3699. </cleanup-commands>
  3700. <comparators>
  3701. <comparator>
  3702. <type>RegexpComparator</type>
  3703. <expected-output>^rm: `NAMENODE/file0': No such file or directory</expected-output>
  3704. </comparator>
  3705. </comparators>
  3706. </test>
  3707. <test> <!-- TESTED -->
  3708. <description>rm: removing directories without globbing in Namenode's path </description>
  3709. <test-commands>
  3710. <command>-fs NAMENODE -mkdir NAMENODE/dir0</command>
  3711. <command>-fs NAMENODE -mkdir NAMENODE/dir1</command>
  3712. <command>-fs NAMENODE -mkdir NAMENODE/dir2</command>
  3713. <command>-fs NAMENODE -mkdir NAMENODE/dir3</command>
  3714. <command>-fs NAMENODE -rm -r NAMENODE/dir0 NAMENODE/dir1 NAMENODE/dir2 NAMENODE/dir3</command>
  3715. </test-commands>
  3716. <cleanup-commands>
  3717. <command>-fs NAMENODE -rm -r NAMENODE/*</command>
  3718. </cleanup-commands>
  3719. <comparators>
  3720. <comparator>
  3721. <type>RegexpComparator</type>
  3722. <expected-output>^Deleted NAMENODE/dir0</expected-output>
  3723. </comparator>
  3724. <comparator>
  3725. <type>RegexpComparator</type>
  3726. <expected-output>^Deleted NAMENODE/dir1</expected-output>
  3727. </comparator>
  3728. <comparator>
  3729. <type>RegexpComparator</type>
  3730. <expected-output>^Deleted NAMENODE/dir2</expected-output>
  3731. </comparator>
  3732. <comparator>
  3733. <type>RegexpComparator</type>
  3734. <expected-output>^Deleted NAMENODE/dir3</expected-output>
  3735. </comparator>
  3736. </comparators>
  3737. </test>
  3738. <!-- Tests for expunge -->
  3739. <!-- Not yet implemented -->
  3740. <!-- Tests for put -->
  3741. <test> <!-- TESTED -->
  3742. <description>put: putting file into a file (absolute path)</description>
  3743. <test-commands>
  3744. <command>-fs NAMENODE -put CLITEST_DATA/data15bytes /data15bytes</command>
  3745. <command>-fs NAMENODE -du /data15bytes</command>
  3746. </test-commands>
  3747. <cleanup-commands>
  3748. <command>-fs NAMENODE -rm /data15bytes</command>
  3749. </cleanup-commands>
  3750. <comparators>
  3751. <comparator>
  3752. <type>RegexpComparator</type>
  3753. <expected-output>^15\s+/data15bytes</expected-output>
  3754. </comparator>
  3755. </comparators>
  3756. </test>
  3757. <test> <!-- TESTED -->
  3758. <description>put: putting file into a file (relative path)</description>
  3759. <test-commands>
  3760. <command>-fs NAMENODE -touchz test</command>
  3761. <command>-fs NAMENODE -put CLITEST_DATA/data15bytes data15bytes</command>
  3762. <command>-fs NAMENODE -du data15bytes</command>
  3763. </test-commands>
  3764. <cleanup-commands>
  3765. <command>-fs NAMENODE -rm -r /user</command>
  3766. </cleanup-commands>
  3767. <comparators>
  3768. <comparator>
  3769. <type>RegexpComparator</type>
  3770. <expected-output>^15\s+data15bytes</expected-output>
  3771. </comparator>
  3772. </comparators>
  3773. </test>
  3774. <test> <!-- TESTED -->
  3775. <description>put: putting file into a directory(absolute path)</description>
  3776. <test-commands>
  3777. <command>-fs NAMENODE -mkdir /dir0/dir1/data</command>
  3778. <command>-fs NAMENODE -put CLITEST_DATA/data15bytes /dir0/dir1/data</command> -->
  3779. <command>-fs NAMENODE -du /dir0/dir1/data</command>
  3780. </test-commands>
  3781. <cleanup-commands>
  3782. <command>-fs NAMENODE -rm -r /dir0</command>
  3783. </cleanup-commands>
  3784. <comparators>
  3785. <comparator>
  3786. <type>RegexpComparator</type>
  3787. <expected-output>^15\s+/dir0/dir1/data/data15bytes</expected-output>
  3788. </comparator>
  3789. </comparators>
  3790. </test>
  3791. <test> <!-- TESTED -->
  3792. <description>put: putting file into a directory(relative path)</description>
  3793. <test-commands>
  3794. <command>-fs NAMENODE -mkdir dir0/dir1/data</command>
  3795. <command>-fs NAMENODE -put CLITEST_DATA/data15bytes dir0/dir1/data</command>
  3796. <command>-fs NAMENODE -du dir0/dir1/data</command>
  3797. </test-commands>
  3798. <cleanup-commands>
  3799. <command>-fs NAMENODE -rm -r /user</command>
  3800. </cleanup-commands>
  3801. <comparators>
  3802. <comparator>
  3803. <type>RegexpComparator</type>
  3804. <expected-output>^15\s+dir0/dir1/data/data15bytes</expected-output>
  3805. </comparator>
  3806. </comparators>
  3807. </test>
  3808. <test> <!-- TESTED -->
  3809. <description>put: putting many files into an existing directory(absolute path)</description>
  3810. <test-commands>
  3811. <command>-fs NAMENODE -mkdir /dir0</command>
  3812. <command>-fs NAMENODE -put CLITEST_DATA/data15bytes CLITEST_DATA/data30bytes /dir0</command>
  3813. <command>-fs NAMENODE -du /dir0</command>
  3814. </test-commands>
  3815. <cleanup-commands>
  3816. <command>-fs NAMENODE -rm -r /user</command>
  3817. </cleanup-commands>
  3818. <comparators>
  3819. <comparator>
  3820. <type>RegexpComparator</type>
  3821. <expected-output>^15\s+/dir0/data15bytes</expected-output>
  3822. </comparator>
  3823. <comparator>
  3824. <type>RegexpComparator</type>
  3825. <expected-output>^30\s+/dir0/data30bytes</expected-output>
  3826. </comparator>
  3827. </comparators>
  3828. </test>
  3829. <test> <!-- TESTED -->
  3830. <description>put: putting many files into an existing directory(relative path)</description>
  3831. <test-commands>
  3832. <command>-fs NAMENODE -mkdir dir0</command>
  3833. <command>-fs NAMENODE -put CLITEST_DATA/data15bytes CLITEST_DATA/data30bytes dir0</command>
  3834. <command>-fs NAMENODE -du dir0</command>
  3835. </test-commands>
  3836. <cleanup-commands>
  3837. <command>-fs NAMENODE -rm -r /user</command>
  3838. </cleanup-commands>
  3839. <comparators>
  3840. <comparator>
  3841. <type>RegexpComparator</type>
  3842. <expected-output>^15\s+dir0/data15bytes</expected-output>
  3843. </comparator>
  3844. <comparator>
  3845. <type>RegexpComparator</type>
  3846. <expected-output>^30\s+dir0/data30bytes</expected-output>
  3847. </comparator>
  3848. </comparators>
  3849. </test>
  3850. <test> <!-- TESTED -->
  3851. <description>put: putting non existent file(absolute path)</description>
  3852. <test-commands>
  3853. <command>-fs NAMENODE -touchz test</command>
  3854. <command>-fs NAMENODE -put /user/wrongdata file</command>
  3855. </test-commands>
  3856. <cleanup-commands>
  3857. <command>-fs NAMENODE -rm -r /user</command>
  3858. </cleanup-commands>
  3859. <comparators>
  3860. <comparator>
  3861. <type>TokenComparator</type>
  3862. <expected-output>put: `/user/wrongdata': No such file or directory</expected-output>
  3863. </comparator>
  3864. </comparators>
  3865. </test>
  3866. <test> <!-- TESTED -->
  3867. <description>put: putting non existent file(relative path)</description>
  3868. <test-commands>
  3869. <command>-fs NAMENODE -touchz test</command>
  3870. <command>-fs NAMENODE -put wrongdata file</command>
  3871. </test-commands>
  3872. <cleanup-commands>
  3873. <command>-fs NAMENODE -rm -r /user</command>
  3874. </cleanup-commands>
  3875. <comparators>
  3876. <comparator>
  3877. <type>TokenComparator</type>
  3878. <expected-output>put: `wrongdata': No such file or directory</expected-output>
  3879. </comparator>
  3880. </comparators>
  3881. </test>
  3882. <test> <!-- TESTED -->
  3883. <description>put: putting file into an already existing destination(absolute path)</description>
  3884. <test-commands>
  3885. <command>-fs NAMENODE -touchz /user/file0</command>
  3886. <command>-fs NAMENODE -put CLITEST_DATA/data15bytes /user/file0</command>
  3887. </test-commands>
  3888. <cleanup-commands>
  3889. <command>-fs NAMENODE -rm -r /user</command>
  3890. </cleanup-commands>
  3891. <comparators>
  3892. <comparator>
  3893. <type>TokenComparator</type>
  3894. <expected-output>put: `/user/file0': File exists</expected-output>
  3895. </comparator>
  3896. </comparators>
  3897. </test>
  3898. <test> <!-- TESTED -->
  3899. <description>put: putting file into an already existing destination with -f option(absolute path)</description>
  3900. <test-commands>
  3901. <command>-fs NAMENODE -touchz /user/file0</command>
  3902. <command>-fs NAMENODE -put -f CLITEST_DATA/data120bytes /user/file0</command>
  3903. <command>-fs NAMENODE -cat /user/file0</command>
  3904. </test-commands>
  3905. <cleanup-commands>
  3906. <command>-fs NAMENODE -rm -r /user</command>
  3907. </cleanup-commands>
  3908. <comparators>
  3909. <comparator>
  3910. <type>RegexpComparator</type>
  3911. <expected-output>12345678901234</expected-output>
  3912. </comparator>
  3913. </comparators>
  3914. </test>
  3915. <test> <!-- TESTED -->
  3916. <description>put: putting file into an already existing destination(relative path)</description>
  3917. <test-commands>
  3918. <command>-fs NAMENODE -touchz file0</command>
  3919. <command>-fs NAMENODE -put CLITEST_DATA/data15bytes file0</command>
  3920. </test-commands>
  3921. <cleanup-commands>
  3922. <command>-fs NAMENODE -rm -r /user</command>
  3923. </cleanup-commands>
  3924. <comparators>
  3925. <comparator>
  3926. <type>TokenComparator</type>
  3927. <expected-output>put: `file0': File exists</expected-output>
  3928. </comparator>
  3929. </comparators>
  3930. </test>
  3931. <test> <!-- TESTED -->
  3932. <description>put: putting many files into an existing file</description>
  3933. <test-commands>
  3934. <command>-fs NAMENODE -put CLITEST_DATA/data15bytes /data15bytes</command>
  3935. <command>-fs NAMENODE -put CLITEST_DATA/data30bytes /data30bytes</command>
  3936. <command>-fs NAMENODE -touchz file0</command>
  3937. <command>-fs NAMENODE -put /data15bytes /data30bytes file0</command>
  3938. </test-commands>
  3939. <cleanup-commands>
  3940. <command>-fs NAMENODE -rm -r /user</command>
  3941. </cleanup-commands>
  3942. <comparators>
  3943. <comparator>
  3944. <type>RegexpComparator</type>
  3945. <expected-output>^put: `file0': Is not a directory</expected-output>
  3946. </comparator>
  3947. </comparators>
  3948. </test>
  3949. <test> <!-- TESTED -->
  3950. <description>put: putting many files into a non existent directory</description>
  3951. <test-commands>
  3952. <command>-fs NAMENODE -put CLITEST_DATA/data15bytes /data15bytes</command>
  3953. <command>-fs NAMENODE -put CLITEST_DATA/data30bytes /data30bytes</command>
  3954. <command>-fs NAMENODE -put /data15bytes /data30bytes wrongdir</command>
  3955. </test-commands>
  3956. <cleanup-commands>
  3957. <command>-fs NAMENODE -rm -r /user</command>
  3958. </cleanup-commands>
  3959. <comparators>
  3960. <comparator>
  3961. <type>RegexpComparator</type>
  3962. <expected-output>^put: `wrongdir': No such file or directory</expected-output>
  3963. </comparator>
  3964. </comparators>
  3965. </test>
  3966. <test> <!-- TESTED -->
  3967. <description>put: putting a local file into hdfs:// path </description>
  3968. <test-commands>
  3969. <command>-fs NAMENODE -put CLITEST_DATA/data15bytes hdfs:///data15bytes</command>
  3970. <command>-fs NAMENODE -du hdfs:///data15bytes</command>
  3971. </test-commands>
  3972. <cleanup-commands>
  3973. <command>-fs NAMENODE -rm hdfs:///data15bytes</command>
  3974. </cleanup-commands>
  3975. <comparators>
  3976. <comparator>
  3977. <type>RegexpComparator</type>
  3978. <expected-output>^15\s+hdfs:///data15bytes</expected-output>
  3979. </comparator>
  3980. </comparators>
  3981. </test>
  3982. <test> <!-- TESTED -->
  3983. <description>put: putting file into a directory in hdfs:// path </description>
  3984. <test-commands>
  3985. <command>-fs NAMENODE -mkdir /dir1/data</command>
  3986. <command>-fs NAMENODE -put CLITEST_DATA/data15bytes hdfs:///dir1/data</command>
  3987. <command>-fs NAMENODE -du hdfs:///dir1/data/</command>
  3988. </test-commands>
  3989. <cleanup-commands>
  3990. <command>-fs NAMENODE -rm -r hdfs:///dir1/data</command>
  3991. </cleanup-commands>
  3992. <comparators>
  3993. <comparator>
  3994. <type>RegexpComparator</type>
  3995. <expected-output>^15\s+hdfs:///dir1/data/data15bytes</expected-output>
  3996. </comparator>
  3997. </comparators>
  3998. </test>
  3999. <test> <!-- TESTED -->
  4000. <description>put: putting many local files into an existing directory in hdfs:// path </description>
  4001. <test-commands>
  4002. <command>-fs NAMENODE -mkdir hdfs:///dir0</command>
  4003. <command>-fs NAMENODE -put CLITEST_DATA/data15bytes CLITEST_DATA/data30bytes hdfs:///dir0</command>
  4004. <command>-fs NAMENODE -du hdfs:///dir0</command>
  4005. </test-commands>
  4006. <cleanup-commands>
  4007. <command>-fs NAMENODE -rm -r hdfs:///dir0</command>
  4008. </cleanup-commands>
  4009. <comparators>
  4010. <comparator>
  4011. <type>RegexpComparator</type>
  4012. <expected-output>^15\s+hdfs:///dir0/data15bytes</expected-output>
  4013. </comparator>
  4014. <comparator>
  4015. <type>RegexpComparator</type>
  4016. <expected-output>^30\s+hdfs:///dir0/data30bytes</expected-output>
  4017. </comparator>
  4018. </comparators>
  4019. </test>
  4020. <test> <!-- TESTED -->
  4021. <description>put: putting non existent file in hdfs:// path </description>
  4022. <test-commands>
  4023. <command>-fs NAMENODE -put /user/wrongdata hdfs:///file</command>
  4024. </test-commands>
  4025. <cleanup-commands>
  4026. <command>-fs NAMENODE -rm -r hdfs:///*</command>
  4027. </cleanup-commands>
  4028. <comparators>
  4029. <comparator>
  4030. <type>TokenComparator</type>
  4031. <expected-output>put: `/user/wrongdata': No such file or directory</expected-output>
  4032. </comparator>
  4033. </comparators>
  4034. </test>
  4035. <test> <!-- TESTED -->
  4036. <description>put: putting local file into an already existing destination in hdfs:// path </description>
  4037. <test-commands>
  4038. <command>-fs NAMENODE -touchz hdfs:///user/file0</command>
  4039. <command>-fs NAMENODE -put CLITEST_DATA/data15bytes hdfs:///user/file0</command>
  4040. </test-commands>
  4041. <cleanup-commands>
  4042. <command>-fs NAMENODE -rm -r hdfs:///user</command>
  4043. </cleanup-commands>
  4044. <comparators>
  4045. <comparator>
  4046. <type>TokenComparator</type>
  4047. <expected-output>put: `hdfs:///user/file0': File exists</expected-output>
  4048. </comparator>
  4049. </comparators>
  4050. </test>
  4051. <test> <!-- TESTED -->
  4052. <description>put: putting many local files into an existing file in hdfs:// path</description>
  4053. <test-commands>
  4054. <command>-fs NAMENODE -touchz hdfs:///file0</command>
  4055. <command>-fs NAMENODE -put CLITEST_DATA/data15bytes CLITEST_DATA/data30bytes hdfs:///file0</command>
  4056. </test-commands>
  4057. <cleanup-commands>
  4058. <command>-fs NAMENODE -rm -r hdfs:///*</command>
  4059. </cleanup-commands>
  4060. <comparators>
  4061. <comparator>
  4062. <type>RegexpComparator</type>
  4063. <expected-output>^put: `hdfs:///file0': Is not a directory</expected-output>
  4064. </comparator>
  4065. </comparators>
  4066. </test>
  4067. <test> <!-- TESTED -->
  4068. <description>put: putting file into a non existent directory in hdfs:// path </description>
  4069. <test-commands>
  4070. <command>-fs NAMENODE -put CLITEST_DATA/data15bytes CLITEST_DATA/data30bytes hdfs:///wrongdir</command>
  4071. </test-commands>
  4072. <cleanup-commands>
  4073. <command>-fs NAMENODE -rm -r hdfs:///*</command>
  4074. </cleanup-commands>
  4075. <comparators>
  4076. <comparator>
  4077. <type>RegexpComparator</type>
  4078. <expected-output>^put: `hdfs:///wrongdir': No such file or directory</expected-output>
  4079. </comparator>
  4080. </comparators>
  4081. </test>
  4082. <test> <!-- TESTED -->
  4083. <description>put: putting a local file into in Namenode's path </description>
  4084. <test-commands>
  4085. <command>-fs NAMENODE -put CLITEST_DATA/data15bytes NAMENODE/data15bytes</command>
  4086. <command>-fs NAMENODE -du NAMENODE/data15bytes</command>
  4087. </test-commands>
  4088. <cleanup-commands>
  4089. <command>-fs NAMENODE -rm NAMENODE/data15bytes</command>
  4090. </cleanup-commands>
  4091. <comparators>
  4092. <comparator>
  4093. <type>RegexpComparator</type>
  4094. <expected-output>^15\s+NAMENODE/data15bytes</expected-output>
  4095. </comparator>
  4096. </comparators>
  4097. </test>
  4098. <test> <!-- TESTED -->
  4099. <description>put: putting file into a directory in Namenode's path </description>
  4100. <test-commands>
  4101. <command>-fs NAMENODE -mkdir /dir1/data</command>
  4102. <command>-fs NAMENODE -put CLITEST_DATA/data15bytes NAMENODE/dir1/data</command>
  4103. <command>-fs NAMENODE -du NAMENODE/dir1/data</command>
  4104. </test-commands>
  4105. <cleanup-commands>
  4106. <command>-fs NAMENODE -rm -r NAMENODE/dir1/data</command>
  4107. </cleanup-commands>
  4108. <comparators>
  4109. <comparator>
  4110. <type>RegexpComparator</type>
  4111. <expected-output>^15\s+NAMENODE/dir1/data/data15bytes</expected-output>
  4112. </comparator>
  4113. </comparators>
  4114. </test>
  4115. <test> <!-- TESTED -->
  4116. <description>put: putting many local files into an existing directory in Namenode's path</description>
  4117. <test-commands>
  4118. <command>-fs NAMENODE -mkdir NAMENODE/dir0</command>
  4119. <command>-fs NAMENODE -put CLITEST_DATA/data15bytes CLITEST_DATA/data30bytes NAMENODE/dir0</command>
  4120. <command>-fs NAMENODE -du NAMENODE/dir0</command>
  4121. </test-commands>
  4122. <cleanup-commands>
  4123. <command>-fs NAMENODE -rm -r NAMENODE/dir0</command>
  4124. </cleanup-commands>
  4125. <comparators>
  4126. <comparator>
  4127. <type>RegexpComparator</type>
  4128. <expected-output>^15\s+NAMENODE/dir0/data15bytes</expected-output>
  4129. </comparator>
  4130. <comparator>
  4131. <type>RegexpComparator</type>
  4132. <expected-output>^30\s+NAMENODE/dir0/data30bytes</expected-output>
  4133. </comparator>
  4134. </comparators>
  4135. </test>
  4136. <test> <!-- TESTED -->
  4137. <description>put: putting non existent file in Namenode's path </description>
  4138. <test-commands>
  4139. <command>-fs NAMENODE -put /user/wrongdata NAMENODE/file</command>
  4140. </test-commands>
  4141. <cleanup-commands>
  4142. <command>-fs NAMENODE -rm -r NAMENODE/*</command>
  4143. </cleanup-commands>
  4144. <comparators>
  4145. <comparator>
  4146. <type>RegexpComparator</type>
  4147. <expected-output>^put: `/user/wrongdata': No such file or directory</expected-output>
  4148. </comparator>
  4149. </comparators>
  4150. </test>
  4151. <test> <!-- TESTED -->
  4152. <description>put: putting local file into an already existing destination in Namenode's path</description>
  4153. <test-commands>
  4154. <command>-fs NAMENODE -touchz NAMENODE/user/file0</command>
  4155. <command>-fs NAMENODE -put CLITEST_DATA/data15bytes NAMENODE/user/file0</command>
  4156. </test-commands>
  4157. <cleanup-commands>
  4158. <command>-fs NAMENODE -rm -r NAMENODE/user</command>
  4159. </cleanup-commands>
  4160. <comparators>
  4161. <comparator>
  4162. <type>RegexpComparator</type>
  4163. <expected-output>^put: `hdfs://\w+[-.a-z0-9]*:[0-9]+/user/file0': File exists</expected-output>
  4164. </comparator>
  4165. </comparators>
  4166. </test>
  4167. <test> <!-- TESTED -->
  4168. <description>put: putting many local files into an existing file in Namenode's path </description>
  4169. <test-commands>
  4170. <command>-fs NAMENODE -touchz NAMENODE/file0</command>
  4171. <command>-fs NAMENODE -put CLITEST_DATA/data15bytes CLITEST_DATA/data30bytes NAMENODE/file0</command>
  4172. </test-commands>
  4173. <cleanup-commands>
  4174. <command>-fs NAMENODE -rm -r NAMENODE/*</command>
  4175. </cleanup-commands>
  4176. <comparators>
  4177. <comparator>
  4178. <type>RegexpComparator</type>
  4179. <expected-output>^put: `hdfs://\w+[-.a-z0-9]*:[0-9]+/file0': Is not a directory</expected-output>
  4180. </comparator>
  4181. </comparators>
  4182. </test>
  4183. <test> <!-- TESTED -->
  4184. <description>put: putting many files into a non existent directory in Namenode's path </description>
  4185. <test-commands>
  4186. <command>-fs NAMENODE -put CLITEST_DATA/data15bytes CLITEST_DATA/data30bytes NAMENODE/wrongdir</command>
  4187. </test-commands>
  4188. <cleanup-commands>
  4189. <command>-fs NAMENODE -rm -r NAMENODE/*</command>
  4190. </cleanup-commands>
  4191. <comparators>
  4192. <comparator>
  4193. <type>RegexpComparator</type>
  4194. <expected-output>^put: `hdfs://\w+[-.a-z0-9]*:[0-9]+/wrongdir': No such file or directory</expected-output>
  4195. </comparator>
  4196. </comparators>
  4197. </test>
  4198. <!-- Tests for copyFromLocal -->
  4199. <test> <!-- TESTED -->
  4200. <description>copyFromLocal: copying file into a file (absolute path)</description>
  4201. <test-commands>
  4202. <command>-fs NAMENODE -copyFromLocal CLITEST_DATA/data15bytes /data15bytes</command>
  4203. <command>-fs NAMENODE -du /data15bytes</command>
  4204. </test-commands>
  4205. <cleanup-commands>
  4206. <command>-fs NAMENODE -rm /data15bytes</command>
  4207. </cleanup-commands>
  4208. <comparators>
  4209. <comparator>
  4210. <type>RegexpComparator</type>
  4211. <expected-output>^15\s+/data15bytes</expected-output>
  4212. </comparator>
  4213. </comparators>
  4214. </test>
  4215. <test> <!-- TESTED -->
  4216. <description>copyFromLocal: copying file into a file (relative path)</description>
  4217. <test-commands>
  4218. <command>-fs NAMENODE -touchz test</command>
  4219. <command>-fs NAMENODE -copyFromLocal CLITEST_DATA/data15bytes data15bytes</command>
  4220. <command>-fs NAMENODE -du data15bytes</command>
  4221. </test-commands>
  4222. <cleanup-commands>
  4223. <command>-fs NAMENODE -rm -r /user</command>
  4224. </cleanup-commands>
  4225. <comparators>
  4226. <comparator>
  4227. <type>RegexpComparator</type>
  4228. <expected-output>^15\s+data15bytes</expected-output>
  4229. </comparator>
  4230. </comparators>
  4231. </test>
  4232. <test> <!-- TESTED -->
  4233. <description>copyFromLocal: copying file into a directory(absolute path)</description>
  4234. <test-commands>
  4235. <command>-fs NAMENODE -mkdir /dir0/dir1/data</command>
  4236. <command>-fs NAMENODE -copyFromLocal CLITEST_DATA/data15bytes /dir0/dir1/data</command>
  4237. <command>-fs NAMENODE -du /dir0/dir1/data/*</command>
  4238. </test-commands>
  4239. <cleanup-commands>
  4240. <command>-fs NAMENODE -rm -r /dir0</command>
  4241. </cleanup-commands>
  4242. <comparators>
  4243. <comparator>
  4244. <type>RegexpComparator</type>
  4245. <expected-output>^15\s+/dir0/dir1/data/data15bytes</expected-output>
  4246. </comparator>
  4247. </comparators>
  4248. </test>
  4249. <test> <!-- TESTED -->
  4250. <description>copyFromLocal: copying file into a directory(relative path)</description>
  4251. <test-commands>
  4252. <command>-fs NAMENODE -mkdir dir0/dir1/data</command>
  4253. <command>-fs NAMENODE -copyFromLocal CLITEST_DATA/data15bytes dir0/dir1/data</command>
  4254. <command>-fs NAMENODE -du dir0/dir1/data/*</command>
  4255. </test-commands>
  4256. <cleanup-commands>
  4257. <command>-fs NAMENODE -rm -r /user</command>
  4258. </cleanup-commands>
  4259. <comparators>
  4260. <comparator>
  4261. <type>RegexpComparator</type>
  4262. <expected-output>^15\s+dir0/dir1/data/data15bytes</expected-output>
  4263. </comparator>
  4264. </comparators>
  4265. </test>
  4266. <test> <!-- TESTED -->
  4267. <description>copyFromLocal: copying many files into an existing directory(absolute path)</description>
  4268. <test-commands>
  4269. <command>-fs NAMENODE -mkdir /dir0</command>
  4270. <command>-fs NAMENODE -copyFromLocal CLITEST_DATA/data15bytes CLITEST_DATA/data30bytes /dir0</command>
  4271. <command>-fs NAMENODE -du /dir0</command>
  4272. </test-commands>
  4273. <cleanup-commands>
  4274. <command>-fs NAMENODE -rm -r /user</command>
  4275. </cleanup-commands>
  4276. <comparators>
  4277. <comparator>
  4278. <type>RegexpComparator</type>
  4279. <expected-output>^15\s+/dir0/data15bytes</expected-output>
  4280. </comparator>
  4281. <comparator>
  4282. <type>RegexpComparator</type>
  4283. <expected-output>^30\s+/dir0/data30bytes</expected-output>
  4284. </comparator>
  4285. </comparators>
  4286. </test>
  4287. <test> <!-- TESTED -->
  4288. <description>copyFromLocal: copying many files into an existing directory(relative path)</description>
  4289. <test-commands>
  4290. <command>-fs NAMENODE -mkdir dir0</command>
  4291. <command>-fs NAMENODE -copyFromLocal CLITEST_DATA/data15bytes CLITEST_DATA/data30bytes dir0</command>
  4292. <command>-fs NAMENODE -du dir0</command>
  4293. </test-commands>
  4294. <cleanup-commands>
  4295. <command>-fs NAMENODE -rm -r /user</command>
  4296. </cleanup-commands>
  4297. <comparators>
  4298. <comparator>
  4299. <type>RegexpComparator</type>
  4300. <expected-output>^15\s+dir0/data15bytes</expected-output>
  4301. </comparator>
  4302. <comparator>
  4303. <type>RegexpComparator</type>
  4304. <expected-output>^30\s+dir0/data30bytes</expected-output>
  4305. </comparator>
  4306. </comparators>
  4307. </test>
  4308. <test> <!-- TESTED -->
  4309. <description>copyFromLocal: copying non existent file(absolute path)</description>
  4310. <test-commands>
  4311. <command>-fs NAMENODE -touchz test</command>
  4312. <command>-fs NAMENODE -copyFromLocal /user/wrongdata file</command>
  4313. </test-commands>
  4314. <cleanup-commands>
  4315. <command>-fs NAMENODE -rm -r /user</command>
  4316. </cleanup-commands>
  4317. <comparators>
  4318. <comparator>
  4319. <type>TokenComparator</type>
  4320. <expected-output>copyFromLocal: `/user/wrongdata': No such file or directory</expected-output>
  4321. </comparator>
  4322. </comparators>
  4323. </test>
  4324. <test> <!-- TESTED -->
  4325. <description>copyFromLocal: copying non existent file(relative path)</description>
  4326. <test-commands>
  4327. <command>-fs NAMENODE -touchz test</command>
  4328. <command>-fs NAMENODE -copyFromLocal wrongdata file</command>
  4329. </test-commands>
  4330. <cleanup-commands>
  4331. <command>-fs NAMENODE -rm -r /user</command>
  4332. </cleanup-commands>
  4333. <comparators>
  4334. <comparator>
  4335. <type>TokenComparator</type>
  4336. <expected-output>copyFromLocal: `wrongdata': No such file or directory</expected-output>
  4337. </comparator>
  4338. </comparators>
  4339. </test>
  4340. <test> <!-- TESTED -->
  4341. <description>copyFromLocal: copying file into an already existing destination(absolute path)</description>
  4342. <test-commands>
  4343. <command>-fs NAMENODE -touchz /user/file0</command>
  4344. <command>-fs NAMENODE -copyFromLocal CLITEST_DATA/data15bytes /user/file0</command>
  4345. </test-commands>
  4346. <cleanup-commands>
  4347. <command>-fs NAMENODE -rm -r /user</command>
  4348. </cleanup-commands>
  4349. <comparators>
  4350. <comparator>
  4351. <type>TokenComparator</type>
  4352. <expected-output>copyFromLocal: `/user/file0': File exists</expected-output>
  4353. </comparator>
  4354. </comparators>
  4355. </test>
  4356. <test> <!-- TESTED -->
  4357. <description>copyFromLocal: copying file into an already existing destination with -f option(absolute path)</description>
  4358. <test-commands>
  4359. <command>-fs NAMENODE -touchz /user/file0</command>
  4360. <command>-fs NAMENODE -copyFromLocal -f CLITEST_DATA/data120bytes /user/file0</command>
  4361. <command>-fs NAMENODE -cat /user/file0</command>
  4362. </test-commands>
  4363. <cleanup-commands>
  4364. <command>-fs NAMENODE -rm -r /user</command>
  4365. </cleanup-commands>
  4366. <comparators>
  4367. <comparator>
  4368. <type>RegexpComparator</type>
  4369. <expected-output>12345678901234</expected-output>
  4370. </comparator>
  4371. </comparators>
  4372. </test>
  4373. <test> <!-- TESTED -->
  4374. <description>copyFromLocal: copying file into an already existing destination(relative path)</description>
  4375. <test-commands>
  4376. <command>-fs NAMENODE -touchz file0</command>
  4377. <command>-fs NAMENODE -copyFromLocal CLITEST_DATA/data15bytes file0</command>
  4378. </test-commands>
  4379. <cleanup-commands>
  4380. <command>-fs NAMENODE -rm -r /user</command>
  4381. </cleanup-commands>
  4382. <comparators>
  4383. <comparator>
  4384. <type>TokenComparator</type>
  4385. <expected-output>copyFromLocal: `file0': File exists</expected-output>
  4386. </comparator>
  4387. </comparators>
  4388. </test>
  4389. <test> <!-- TESTED -->
  4390. <description>copyFromLocal: copying many files into an existing file</description>
  4391. <test-commands>
  4392. <command>-fs NAMENODE -copyFromLocal CLITEST_DATA/data15bytes /data15bytes</command>
  4393. <command>-fs NAMENODE -copyFromLocal CLITEST_DATA/data30bytes /data30bytes</command>
  4394. <command>-fs NAMENODE -touchz file0</command>
  4395. <command>-fs NAMENODE -copyFromLocal /data15bytes /data30bytes file0</command>
  4396. </test-commands>
  4397. <cleanup-commands>
  4398. <command>-fs NAMENODE -rm -r /user</command>
  4399. </cleanup-commands>
  4400. <comparators>
  4401. <comparator>
  4402. <type>RegexpComparator</type>
  4403. <expected-output>^copyFromLocal: `file0': Is not a directory</expected-output>
  4404. </comparator>
  4405. </comparators>
  4406. </test>
  4407. <test> <!-- TESTED -->
  4408. <description>copyFromLocal: copying many files into a non existent directory</description>
  4409. <test-commands>
  4410. <command>-fs NAMENODE -copyFromLocal CLITEST_DATA/data15bytes /data15bytes</command>
  4411. <command>-fs NAMENODE -copyFromLocal CLITEST_DATA/data30bytes /data30bytes</command>
  4412. <command>-fs NAMENODE -copyFromLocal /data15bytes /data30bytes wrongdir</command>
  4413. </test-commands>
  4414. <cleanup-commands>
  4415. <command>-fs NAMENODE -rm -r /user</command>
  4416. </cleanup-commands>
  4417. <comparators>
  4418. <comparator>
  4419. <type>RegexpComparator</type>
  4420. <expected-output>^copyFromLocal: `wrongdir': No such file or directory</expected-output>
  4421. </comparator>
  4422. </comparators>
  4423. </test>
  4424. <test> <!-- TESTED -->
  4425. <description>copyFromLocal: Test for hdfs:// path - copying local file into a hdfs://file</description>
  4426. <test-commands>
  4427. <command>-fs NAMENODE -copyFromLocal CLITEST_DATA/data15bytes hdfs:///data15bytes</command>
  4428. <command>-fs NAMENODE -du hdfs:///data15bytes</command>
  4429. </test-commands>
  4430. <cleanup-commands>
  4431. <command>-fs NAMENODE -rm hdfs:///data15bytes</command>
  4432. </cleanup-commands>
  4433. <comparators>
  4434. <comparator>
  4435. <type>RegexpComparator</type>
  4436. <expected-output>^15\s+hdfs:///data15bytes</expected-output>
  4437. </comparator>
  4438. </comparators>
  4439. </test>
  4440. <test> <!-- TESTED -->
  4441. <description>copyFromLocal: Test for hdfs:// path - copying local file into a hdfs directory</description>
  4442. <test-commands>
  4443. <command>-fs NAMENODE -mkdir hdfs:///dir0</command>
  4444. <command>-fs NAMENODE -mkdir hdfs:///dir0/dir1</command>
  4445. <command>-fs NAMENODE -mkdir hdfs:///dir0/dir1/data</command>
  4446. <command>-fs NAMENODE -copyFromLocal CLITEST_DATA/data15bytes hdfs:///dir0/dir1/data/</command>
  4447. <command>-fs NAMENODE -du hdfs:///dir0/dir1/data/data15bytes</command>
  4448. </test-commands>
  4449. <cleanup-commands>
  4450. <command>-fs NAMENODE -rm -r hdfs:///dir0</command>
  4451. </cleanup-commands>
  4452. <comparators>
  4453. <comparator>
  4454. <type>RegexpComparator</type>
  4455. <expected-output>^15\s+hdfs:///dir0/dir1/data/data15bytes</expected-output>
  4456. </comparator>
  4457. </comparators>
  4458. </test>
  4459. <test> <!-- TESTED -->
  4460. <description>copyFromLocal: Test for hdfs:// path copying many local files into an existing hdfs directory</description>
  4461. <test-commands>
  4462. <command>-fs NAMENODE -mkdir hdfs:///dir0</command>
  4463. <command>-fs NAMENODE -copyFromLocal CLITEST_DATA/data15bytes CLITEST_DATA/data30bytes hdfs:///dir0</command>
  4464. <command>-fs NAMENODE -du hdfs:///dir0</command>
  4465. </test-commands>
  4466. <cleanup-commands>
  4467. <command>-fs NAMENODE -rm -r hdfs:///dir0</command>
  4468. </cleanup-commands>
  4469. <comparators>
  4470. <comparator>
  4471. <type>RegexpComparator</type>
  4472. <expected-output>^15\s+hdfs:///dir0/data15bytes</expected-output>
  4473. </comparator>
  4474. <comparator>
  4475. <type>RegexpComparator</type>
  4476. <expected-output>^30\s+hdfs:///dir0/data30bytes</expected-output>
  4477. </comparator>
  4478. </comparators>
  4479. </test>
  4480. <test> <!-- TESTED -->
  4481. <description>copyFromLocal: Test for hdfs:// path - copying non existent file</description>
  4482. <test-commands>
  4483. <command>-fs NAMENODE -copyFromLocal /user/wrongdata hdfs:///file</command>
  4484. </test-commands>
  4485. <cleanup-commands>
  4486. <command>-fs NAMENODE -rm -r hdfs:///*</command>
  4487. </cleanup-commands>
  4488. <comparators>
  4489. <comparator>
  4490. <type>TokenComparator</type>
  4491. <expected-output>copyFromLocal: `/user/wrongdata': No such file or directory</expected-output>
  4492. </comparator>
  4493. </comparators>
  4494. </test>
  4495. <test> <!-- TESTED -->
  4496. <description>copyFromLocal: Test for hdfs:// path - copying local file into an already existing destination</description>
  4497. <test-commands>
  4498. <command>-fs NAMENODE -touchz hdfs:///user/file0</command>
  4499. <command>-fs NAMENODE -copyFromLocal CLITEST_DATA/data15bytes hdfs:///user/file0</command>
  4500. </test-commands>
  4501. <cleanup-commands>
  4502. <command>-fs NAMENODE -rm -r hdfs:///user</command>
  4503. </cleanup-commands>
  4504. <comparators>
  4505. <comparator>
  4506. <type>TokenComparator</type>
  4507. <expected-output>copyFromLocal: `hdfs:///user/file0': File exists</expected-output>
  4508. </comparator>
  4509. </comparators>
  4510. </test>
  4511. <test> <!-- TESTED -->
  4512. <description>copyFromLocal: Test for hdfs:// path - copying many local files into an existing file</description>
  4513. <test-commands>
  4514. <command>-fs NAMENODE -touchz hdfs:///file0</command>
  4515. <command>-fs NAMENODE -copyFromLocal CLITEST_DATA/data15bytes CLITEST_DATA/data30bytes hdfs:///file0</command>
  4516. </test-commands>
  4517. <cleanup-commands>
  4518. <command>-fs NAMENODE -rm -r hdfs:///*</command>
  4519. </cleanup-commands>
  4520. <comparators>
  4521. <comparator>
  4522. <type>RegexpComparator</type>
  4523. <expected-output>^copyFromLocal: `hdfs:///file0': Is not a directory</expected-output>
  4524. </comparator>
  4525. </comparators>
  4526. </test>
  4527. <test> <!-- TESTED -->
  4528. <description>copyFromLocal: Test for hdfs:// path - copying many local files into a non existent directory</description>
  4529. <test-commands>
  4530. <command>-fs NAMENODE -copyFromLocal CLITEST_DATA/data15bytes CLITEST_DATA/data30bytes hdfs:///wrongdir</command>
  4531. </test-commands>
  4532. <cleanup-commands>
  4533. <command>-fs NAMENODE -rm -r hdfs:///*</command>
  4534. </cleanup-commands>
  4535. <comparators>
  4536. <comparator>
  4537. <type>RegexpComparator</type>
  4538. <expected-output>^copyFromLocal: `hdfs:///wrongdir': No such file or directory</expected-output>
  4539. </comparator>
  4540. </comparators>
  4541. </test>
  4542. <!-- Tests for copyFromLocal using Namenode's path-->
  4543. <test> <!-- TESTED -->
  4544. <description>copyFromLocal: Test for Namenode's path - copying local file into a hdfs://file</description>
  4545. <test-commands>
  4546. <command>-fs NAMENODE -copyFromLocal CLITEST_DATA/data15bytes NAMENODE/data15bytes</command>
  4547. <command>-fs NAMENODE -du NAMENODE/data15bytes</command>
  4548. </test-commands>
  4549. <cleanup-commands>
  4550. <command>-fs NAMENODE -rm NAMENODE/data15bytes</command>
  4551. </cleanup-commands>
  4552. <comparators>
  4553. <comparator>
  4554. <type>RegexpComparator</type>
  4555. <expected-output>^15\s+NAMENODE/data15bytes</expected-output>
  4556. </comparator>
  4557. </comparators>
  4558. </test>
  4559. <test> <!-- TESTED -->
  4560. <description>copyFromLocal: Test for Namenode's path - copying local file into a hdfs directory</description>
  4561. <test-commands>
  4562. <command>-fs NAMENODE -mkdir NAMENODE/dir0</command>
  4563. <command>-fs NAMENODE -mkdir NAMENODE/dir0/dir1</command>
  4564. <command>-fs NAMENODE -mkdir NAMENODE/dir0/dir1/data</command>
  4565. <command>-fs NAMENODE -copyFromLocal CLITEST_DATA/data15bytes NAMENODE/dir0/dir1/data/</command>
  4566. <command>-fs NAMENODE -du NAMENODE/dir0/dir1/data/data15bytes</command>
  4567. </test-commands>
  4568. <cleanup-commands>
  4569. <command>-fs NAMENODE -rm -r NAMENODE/dir0</command>
  4570. </cleanup-commands>
  4571. <comparators>
  4572. <comparator>
  4573. <type>RegexpComparator</type>
  4574. <expected-output>^15\s+NAMENODE/dir0/dir1/data/data15bytes</expected-output>
  4575. </comparator>
  4576. </comparators>
  4577. </test>
  4578. <test> <!-- TESTED -->
  4579. <description>copyFromLocal: Test for Namenode's path copying many local files into an existing hdfs directory</description>
  4580. <test-commands>
  4581. <command>-fs NAMENODE -mkdir NAMENODE/dir0</command>
  4582. <command>-fs NAMENODE -copyFromLocal CLITEST_DATA/data15bytes CLITEST_DATA/data30bytes NAMENODE/dir0</command>
  4583. <command>-fs NAMENODE -du NAMENODE/dir0</command>
  4584. </test-commands>
  4585. <cleanup-commands>
  4586. <command>-fs NAMENODE -rm -r NAMENODE/dir0</command>
  4587. </cleanup-commands>
  4588. <comparators>
  4589. <comparator>
  4590. <type>RegexpComparator</type>
  4591. <expected-output>^15\s+NAMENODE/dir0/data15bytes</expected-output>
  4592. </comparator>
  4593. <comparator>
  4594. <type>RegexpComparator</type>
  4595. <expected-output>^30\s+NAMENODE/dir0/data30bytes</expected-output>
  4596. </comparator>
  4597. </comparators>
  4598. </test>
  4599. <test> <!-- TESTED -->
  4600. <description>copyFromLocal: Test for Namenode's path - copying non existent file</description>
  4601. <test-commands>
  4602. <command>-fs NAMENODE -copyFromLocal /user/wrongdata NAMENODE/file</command>
  4603. </test-commands>
  4604. <cleanup-commands>
  4605. <command>-fs NAMENODE -rm -r NAMENODE/*</command>
  4606. </cleanup-commands>
  4607. <comparators>
  4608. <comparator>
  4609. <type>TokenComparator</type>
  4610. <expected-output>copyFromLocal: `/user/wrongdata': No such file or directory</expected-output>
  4611. </comparator>
  4612. </comparators>
  4613. </test>
  4614. <test> <!-- TESTED -->
  4615. <description>copyFromLocal: Test for Namenode's path - copying local file into an already existing destination</description>
  4616. <test-commands>
  4617. <command>-fs NAMENODE -touchz NAMENODE/user/file0</command>
  4618. <command>-fs NAMENODE -copyFromLocal CLITEST_DATA/data15bytes NAMENODE/user/file0</command>
  4619. </test-commands>
  4620. <cleanup-commands>
  4621. <command>-fs NAMENODE -rm -r NAMENODE/user</command>
  4622. </cleanup-commands>
  4623. <comparators>
  4624. <comparator>
  4625. <type>RegexpComparator</type>
  4626. <expected-output>copyFromLocal: `hdfs://\w+[-.a-z0-9]*:[0-9]+/user/file0': File exists</expected-output>
  4627. </comparator>
  4628. </comparators>
  4629. </test>
  4630. <test> <!-- TESTED -->
  4631. <description>copyFromLocal: Test for Namenode's path - copying many local files into an existing file</description>
  4632. <test-commands>
  4633. <command>-fs NAMENODE -touchz NAMENODE/file0</command>
  4634. <command>-fs NAMENODE -copyFromLocal CLITEST_DATA/data15bytes CLITEST_DATA/data30bytes NAMENODE/file0</command>
  4635. </test-commands>
  4636. <cleanup-commands>
  4637. <command>-fs NAMENODE -rm -r NAMENODE/*</command>
  4638. </cleanup-commands>
  4639. <comparators>
  4640. <comparator>
  4641. <type>RegexpComparator</type>
  4642. <expected-output>^copyFromLocal: `hdfs://\w+[-.a-z0-9]*:[0-9]+/file0': Is not a directory</expected-output>
  4643. </comparator>
  4644. </comparators>
  4645. </test>
  4646. <test> <!-- TESTED -->
  4647. <description>copyFromLocal: Test for Namenode's path - copying many local files into a non existent directory</description>
  4648. <test-commands>
  4649. <command>-fs NAMENODE -copyFromLocal CLITEST_DATA/data15bytes CLITEST_DATA/data30bytes NAMENODE/wrongdir</command>
  4650. </test-commands>
  4651. <cleanup-commands>
  4652. <command>-fs NAMENODE -rm -r NAMENODE/*</command>
  4653. </cleanup-commands>
  4654. <comparators>
  4655. <comparator>
  4656. <type>RegexpComparator</type>
  4657. <expected-output>^copyFromLocal: `hdfs://\w+[-.a-z0-9]*:[0-9]+/wrongdir': No such file or directory</expected-output>
  4658. </comparator>
  4659. </comparators>
  4660. </test>
  4661. <!-- Tests for get -->
  4662. <test> <!-- TESTED -->
  4663. <description>get: getting non existent(absolute path)</description>
  4664. <test-commands>
  4665. <command>-fs NAMENODE -get /user/file CLITEST_DATA/file</command>
  4666. </test-commands>
  4667. <cleanup-commands>
  4668. <command>-fs NAMENODE -rm -r /user</command>
  4669. </cleanup-commands>
  4670. <comparators>
  4671. <comparator>
  4672. <type>RegexpComparator</type>
  4673. <expected-output>get: `.*': No such file or directory</expected-output>
  4674. </comparator>
  4675. </comparators>
  4676. </test>
  4677. <test> <!-- TESTED -->
  4678. <description>get: getting non existent file(relative path)</description>
  4679. <test-commands>
  4680. <command>-fs NAMENODE -get file CLITEST_DATA/file</command>
  4681. </test-commands>
  4682. <cleanup-commands>
  4683. <command>-fs NAMENODE -rm -r /user</command>
  4684. </cleanup-commands>
  4685. <comparators>
  4686. <comparator>
  4687. <type>RegexpComparator</type>
  4688. <expected-output>get: `.*': No such file or directory</expected-output>
  4689. </comparator>
  4690. </comparators>
  4691. </test>
  4692. <test> <!-- TESTED -->
  4693. <description>get: Test for hdfs:// path - getting non existent</description>
  4694. <test-commands>
  4695. <command>-fs NAMENODE -get hdfs:///user/file CLITEST_DATA/file</command>
  4696. </test-commands>
  4697. <cleanup-commands>
  4698. <command>-fs NAMENODE -rm -r hdfs:///user</command>
  4699. </cleanup-commands>
  4700. <comparators>
  4701. <comparator>
  4702. <type>RegexpComparator</type>
  4703. <expected-output>get: `.*': No such file or directory</expected-output>
  4704. </comparator>
  4705. </comparators>
  4706. </test>
  4707. <test> <!-- TESTED -->
  4708. <description>get: Test for Namenode's path - getting non existent</description>
  4709. <test-commands>
  4710. <command>-fs NAMENODE -get NAMENODE/user/file CLITEST_DATA/file</command>
  4711. </test-commands>
  4712. <cleanup-commands>
  4713. <command>-fs NAMENODE -rm -r NAMENODE/user</command>
  4714. </cleanup-commands>
  4715. <comparators>
  4716. <comparator>
  4717. <type>RegexpComparator</type>
  4718. <expected-output>get: `.*': No such file or directory</expected-output>
  4719. </comparator>
  4720. </comparators>
  4721. </test>
  4722. <!-- Tests for getmerge -->
  4723. <!-- Manual Testing -->
  4724. <!-- Tests for cat -->
  4725. <test> <!-- TESTED -->
  4726. <description>cat: contents of file(absolute path)</description>
  4727. <test-commands>
  4728. <command>-fs NAMENODE -put CLITEST_DATA/data15bytes /data15bytes</command>
  4729. <command>-fs NAMENODE -cat /data15bytes</command>
  4730. </test-commands>
  4731. <cleanup-commands>
  4732. <command>-fs NAMENODE -rm /data15bytes</command>
  4733. </cleanup-commands>
  4734. <comparators>
  4735. <comparator>
  4736. <type>TokenComparator</type>
  4737. <expected-output>12345678901234</expected-output>
  4738. </comparator>
  4739. </comparators>
  4740. </test>
  4741. <test>
  4742. <description>cat: contents of file(relative path)</description>
  4743. <test-commands>
  4744. <command>-fs NAMENODE -touchz test</command>
  4745. <command>-fs NAMENODE -put CLITEST_DATA/data15bytes data15bytes</command>
  4746. <command>-fs NAMENODE -cat data15bytes</command>
  4747. </test-commands>
  4748. <cleanup-commands>
  4749. <command>-fs NAMENODE -rm -r /user</command>
  4750. </cleanup-commands>
  4751. <comparators>
  4752. <comparator>
  4753. <type>TokenComparator</type>
  4754. <expected-output>12345678901234</expected-output>
  4755. </comparator>
  4756. </comparators>
  4757. </test>
  4758. <test> <!-- TESTED -->
  4759. <description>cat: contents of files(absolute path) using globbing</description>
  4760. <test-commands>
  4761. <command>-fs NAMENODE -mkdir /dir0</command>
  4762. <command>-fs NAMENODE -put CLITEST_DATA/data15bytes /dir0/data15bytes</command>
  4763. <command>-fs NAMENODE -put CLITEST_DATA/data30bytes /dir0/data30bytes</command>
  4764. <command>-fs NAMENODE -put CLITEST_DATA/data60bytes /dir0/data60bytes</command>
  4765. <command>-fs NAMENODE -put CLITEST_DATA/data120bytes /dir0/data120bytes</command>
  4766. <command>-fs NAMENODE -cat /dir0/data*</command>
  4767. </test-commands>
  4768. <cleanup-commands>
  4769. <command>-fs NAMENODE -rm -r /dir0</command>
  4770. </cleanup-commands>
  4771. <comparators>
  4772. <comparator>
  4773. <type>RegexpComparator</type>
  4774. <expected-output>12345678901234.*</expected-output>
  4775. </comparator>
  4776. </comparators>
  4777. </test>
  4778. <test> <!-- TESTED-->
  4779. <description>cat: contents of files(relative path) using globbing</description>
  4780. <test-commands>
  4781. <command>-fs NAMENODE -mkdir dir0</command>
  4782. <command>-fs NAMENODE -put CLITEST_DATA/data15bytes dir0/data15bytes</command>
  4783. <command>-fs NAMENODE -put CLITEST_DATA/data30bytes dir0/data30bytes</command>
  4784. <command>-fs NAMENODE -put CLITEST_DATA/data60bytes dir0/data60bytes</command>
  4785. <command>-fs NAMENODE -put CLITEST_DATA/data120bytes dir0/data120bytes</command>
  4786. <command>-fs NAMENODE -cat dir0/data*</command>
  4787. </test-commands>
  4788. <cleanup-commands>
  4789. <command>-fs NAMENODE -rm -r /user</command>
  4790. </cleanup-commands>
  4791. <comparators>
  4792. <comparator>
  4793. <type>RegexpComparator</type>
  4794. <expected-output>12345678901234.*</expected-output>
  4795. </comparator>
  4796. </comparators>
  4797. </test>
  4798. <test> <!-- TESTED -->
  4799. <description>cat: contents of files(absolute path) without globbing</description>
  4800. <test-commands>
  4801. <command>-fs NAMENODE -mkdir /dir0</command>
  4802. <command>-fs NAMENODE -put CLITEST_DATA/data15bytes /dir0/data15bytes</command>
  4803. <command>-fs NAMENODE -put CLITEST_DATA/data30bytes /dir0/data30bytes</command>
  4804. <command>-fs NAMENODE -put CLITEST_DATA/data60bytes /dir0/data60bytes</command>
  4805. <command>-fs NAMENODE -put CLITEST_DATA/data120bytes /dir0/data120bytes</command>
  4806. <command>-fs NAMENODE -cat /dir0/data15bytes /dir0/data30bytes /dir0/data60bytes /dir0/data120bytes</command>
  4807. </test-commands>
  4808. <cleanup-commands>
  4809. <command>-fs NAMENODE -rm -r /dir0</command>
  4810. </cleanup-commands>
  4811. <comparators>
  4812. <comparator>
  4813. <type>RegexpComparator</type>
  4814. <expected-output>12345678901234.*</expected-output>
  4815. </comparator>
  4816. </comparators>
  4817. </test>
  4818. <test> <!-- TESTED-->
  4819. <description>cat: contents of files(relative path) without globbing</description>
  4820. <test-commands>
  4821. <command>-fs NAMENODE -mkdir dir0</command>
  4822. <command>-fs NAMENODE -put CLITEST_DATA/data15bytes dir0/data15bytes</command>
  4823. <command>-fs NAMENODE -put CLITEST_DATA/data30bytes dir0/data30bytes</command>
  4824. <command>-fs NAMENODE -put CLITEST_DATA/data60bytes dir0/data60bytes</command>
  4825. <command>-fs NAMENODE -put CLITEST_DATA/data120bytes dir0/data120bytes</command>
  4826. <command>-fs NAMENODE -cat dir0/data15bytes dir0/data30bytes dir0/data60bytes dir0/data120bytes</command>
  4827. </test-commands>
  4828. <cleanup-commands>
  4829. <command>-fs NAMENODE -rm -r /user</command>
  4830. </cleanup-commands>
  4831. <comparators>
  4832. <comparator>
  4833. <type>RegexpComparator</type>
  4834. <expected-output>12345678901234.*</expected-output>
  4835. </comparator>
  4836. </comparators>
  4837. </test>
  4838. <test> <!-- TESTED -->
  4839. <description>cat: contents of file(absolute path) that does not exist</description>
  4840. <test-commands>
  4841. <command>-fs NAMENODE -cat /file</command>
  4842. </test-commands>
  4843. <cleanup-commands>
  4844. </cleanup-commands>
  4845. <comparators>
  4846. <comparator>
  4847. <type>RegexpComparator</type>
  4848. <expected-output>^cat: `/file': No such file or directory</expected-output>
  4849. </comparator>
  4850. </comparators>
  4851. </test>
  4852. <test> <!-- TESTED -->
  4853. <description>cat: contents of file(relative path) that does not exist</description>
  4854. <test-commands>
  4855. <command>-fs NAMENODE -cat file</command>
  4856. </test-commands>
  4857. <cleanup-commands>
  4858. </cleanup-commands>
  4859. <comparators>
  4860. <comparator>
  4861. <type>RegexpComparator</type>
  4862. <expected-output>^cat: `file': No such file or directory</expected-output>
  4863. </comparator>
  4864. </comparators>
  4865. </test>
  4866. <test> <!-- TESTED -->
  4867. <description>cat: contents of directory(absolute path)</description>
  4868. <test-commands>
  4869. <command>-fs NAMENODE -mkdir /dir1</command>
  4870. <command>-fs NAMENODE -cat /dir1</command>
  4871. </test-commands>
  4872. <cleanup-commands>
  4873. <command>-fs NAMENODE -rm -r /dir1</command>
  4874. </cleanup-commands>
  4875. <comparators>
  4876. <comparator>
  4877. <type>RegexpComparator</type>
  4878. <expected-output>^cat: `/dir1': Is a directory</expected-output>
  4879. </comparator>
  4880. </comparators>
  4881. </test>
  4882. <test> <!-- TESTED -->
  4883. <description>cat: contents of directory(relative path)</description>
  4884. <test-commands>
  4885. <command>-fs NAMENODE -mkdir dir1</command>
  4886. <command>-fs NAMENODE -cat dir1</command>
  4887. </test-commands>
  4888. <cleanup-commands>
  4889. <command>-fs NAMENODE -rm -r dir1</command>
  4890. </cleanup-commands>
  4891. <comparators>
  4892. <comparator>
  4893. <type>RegexpComparator</type>
  4894. <expected-output>^cat: `dir1': Is a directory</expected-output>
  4895. </comparator>
  4896. </comparators>
  4897. </test>
  4898. <test> <!-- TESTED -->
  4899. <description>cat: Test for hdfs:// path - content of file</description>
  4900. <test-commands>
  4901. <command>-fs NAMENODE -put CLITEST_DATA/data15bytes hdfs:///data15bytes</command>
  4902. <command>-fs NAMENODE -cat hdfs:///data15bytes</command>
  4903. </test-commands>
  4904. <cleanup-commands>
  4905. <command>-fs NAMENODE -rm hdfs:///data15bytes</command>
  4906. </cleanup-commands>
  4907. <comparators>
  4908. <comparator>
  4909. <type>TokenComparator</type>
  4910. <expected-output>12345678901234</expected-output>
  4911. </comparator>
  4912. </comparators>
  4913. </test>
  4914. <test> <!-- TESTED -->
  4915. <description>cat: Test for hdfs:// path - contents of files using globbing</description>
  4916. <test-commands>
  4917. <command>-fs NAMENODE -mkdir hdfs:///dir0</command>
  4918. <command>-fs NAMENODE -put CLITEST_DATA/data15bytes hdfs:///dir0/data15bytes</command>
  4919. <command>-fs NAMENODE -put CLITEST_DATA/data30bytes hdfs:///dir0/data30bytes</command>
  4920. <command>-fs NAMENODE -put CLITEST_DATA/data60bytes hdfs:///dir0/data60bytes</command>
  4921. <command>-fs NAMENODE -put CLITEST_DATA/data120bytes hdfs:///dir0/data120bytes</command>
  4922. <command>-fs NAMENODE -cat hdfs:///dir0/data*</command>
  4923. </test-commands>
  4924. <cleanup-commands>
  4925. <command>-fs NAMENODE -rm -r hdfs:///dir0</command>
  4926. </cleanup-commands>
  4927. <comparators>
  4928. <comparator>
  4929. <type>RegexpComparator</type>
  4930. <expected-output>12345678901234.*</expected-output>
  4931. </comparator>
  4932. </comparators>
  4933. </test>
  4934. <test> <!-- TESTED -->
  4935. <description>cat: Test for hdfs:// path - contents of files without globbing</description>
  4936. <test-commands>
  4937. <command>-fs NAMENODE -mkdir hdfs:///dir0</command>
  4938. <command>-fs NAMENODE -put CLITEST_DATA/data15bytes hdfs:///dir0/data15bytes</command>
  4939. <command>-fs NAMENODE -put CLITEST_DATA/data30bytes hdfs:///dir0/data30bytes</command>
  4940. <command>-fs NAMENODE -put CLITEST_DATA/data60bytes hdfs:///dir0/data60bytes</command>
  4941. <command>-fs NAMENODE -put CLITEST_DATA/data120bytes hdfs:///dir0/data120bytes</command>
  4942. <command>-fs NAMENODE -cat hdfs:///dir0/data15bytes hdfs:///dir0/data30bytes hdfs:///dir0/data60bytes hdfs:///dir0/data120bytes</command>
  4943. </test-commands>
  4944. <cleanup-commands>
  4945. <command>-fs NAMENODE -rm -r hdfs:///dir0</command>
  4946. </cleanup-commands>
  4947. <comparators>
  4948. <comparator>
  4949. <type>RegexpComparator</type>
  4950. <expected-output>12345678901234.*</expected-output>
  4951. </comparator>
  4952. </comparators>
  4953. </test>
  4954. <test> <!-- TESTED -->
  4955. <description>cat: Test for hdfs:// path - contents of file that does not exist</description>
  4956. <test-commands>
  4957. <command>-fs NAMENODE -cat hdfs:///file</command>
  4958. </test-commands>
  4959. <cleanup-commands>
  4960. </cleanup-commands>
  4961. <comparators>
  4962. <comparator>
  4963. <type>RegexpComparator</type>
  4964. <expected-output>^cat: `hdfs:///file': No such file or directory</expected-output>
  4965. </comparator>
  4966. </comparators>
  4967. </test>
  4968. <test> <!-- TESTED -->
  4969. <description>cat: Test for hdfs:// path - contents of directory</description>
  4970. <test-commands>
  4971. <command>-fs NAMENODE -mkdir hdfs:///dir1</command>
  4972. <command>-fs NAMENODE -cat hdfs:///dir1</command>
  4973. </test-commands>
  4974. <cleanup-commands>
  4975. <command>-fs NAMENODE -rm -r hdfs:///dir1</command>
  4976. </cleanup-commands>
  4977. <comparators>
  4978. <comparator>
  4979. <type>RegexpComparator</type>
  4980. <expected-output>^cat: `hdfs:///dir1': Is a directory</expected-output>
  4981. </comparator>
  4982. </comparators>
  4983. </test>
  4984. <!-- Tests for cat using Namenode's path -->
  4985. <test> <!-- TESTED -->
  4986. <description>cat: Test for Namenode's path - content of file</description>
  4987. <test-commands>
  4988. <command>-fs NAMENODE -put CLITEST_DATA/data15bytes NAMENODE/data15bytes</command>
  4989. <command>-fs NAMENODE -cat NAMENODE/data15bytes</command>
  4990. </test-commands>
  4991. <cleanup-commands>
  4992. <command>-fs NAMENODE -rm NAMENODE/data15bytes</command>
  4993. </cleanup-commands>
  4994. <comparators>
  4995. <comparator>
  4996. <type>TokenComparator</type>
  4997. <expected-output>12345678901234</expected-output>
  4998. </comparator>
  4999. </comparators>
  5000. </test>
  5001. <test> <!-- TESTED -->
  5002. <description>cat: Test for Namenode's path - contents of files using globbing</description>
  5003. <test-commands>
  5004. <command>-fs NAMENODE -mkdir NAMENODE/dir0</command>
  5005. <command>-fs NAMENODE -put CLITEST_DATA/data15bytes NAMENODE/dir0/data15bytes</command>
  5006. <command>-fs NAMENODE -put CLITEST_DATA/data30bytes NAMENODE/dir0/data30bytes</command>
  5007. <command>-fs NAMENODE -put CLITEST_DATA/data60bytes NAMENODE/dir0/data60bytes</command>
  5008. <command>-fs NAMENODE -put CLITEST_DATA/data120bytes NAMENODE/dir0/data120bytes</command>
  5009. <command>-fs NAMENODE -cat NAMENODE/dir0/data*</command>
  5010. </test-commands>
  5011. <cleanup-commands>
  5012. <command>-fs NAMENODE -rm -r NAMENODE/dir0</command>
  5013. </cleanup-commands>
  5014. <comparators>
  5015. <comparator>
  5016. <type>RegexpComparator</type>
  5017. <expected-output>12345678901234.*</expected-output>
  5018. </comparator>
  5019. </comparators>
  5020. </test>
  5021. <test> <!-- TESTED -->
  5022. <description>cat: Test for Namenode's path - contents of files without globbing</description>
  5023. <test-commands>
  5024. <command>-fs NAMENODE -mkdir NAMENODE/dir0</command>
  5025. <command>-fs NAMENODE -put CLITEST_DATA/data15bytes NAMENODE/dir0/data15bytes</command>
  5026. <command>-fs NAMENODE -put CLITEST_DATA/data30bytes NAMENODE/dir0/data30bytes</command>
  5027. <command>-fs NAMENODE -put CLITEST_DATA/data60bytes NAMENODE/dir0/data60bytes</command>
  5028. <command>-fs NAMENODE -put CLITEST_DATA/data120bytes NAMENODE/dir0/data120bytes</command>
  5029. <command>-fs NAMENODE -cat NAMENODE/dir0/data15bytes NAMENODE/dir0/data30bytes NAMENODE/dir0/data60bytes NAMENODE/dir0/data120bytes</command>
  5030. </test-commands>
  5031. <cleanup-commands>
  5032. <command>-fs NAMENODE -rm -r NAMENODE/dir0</command>
  5033. </cleanup-commands>
  5034. <comparators>
  5035. <comparator>
  5036. <type>RegexpComparator</type>
  5037. <expected-output>12345678901234.*</expected-output>
  5038. </comparator>
  5039. </comparators>
  5040. </test>
  5041. <test> <!-- TESTED -->
  5042. <description>cat: Test for Namenode's path - contents of file that does not exist</description>
  5043. <test-commands>
  5044. <command>-fs NAMENODE -cat NAMENODE/file</command>
  5045. </test-commands>
  5046. <cleanup-commands>
  5047. </cleanup-commands>
  5048. <comparators>
  5049. <comparator>
  5050. <type>RegexpComparator</type>
  5051. <expected-output>^cat: `NAMENODE/file': No such file or directory</expected-output>
  5052. </comparator>
  5053. </comparators>
  5054. </test>
  5055. <test> <!-- TESTED -->
  5056. <description>cat: Test for Namenode's path - contents of directory</description>
  5057. <test-commands>
  5058. <command>-fs NAMENODE -mkdir NAMENODE/dir1</command>
  5059. <command>-fs NAMENODE -cat NAMENODE/dir1</command>
  5060. </test-commands>
  5061. <cleanup-commands>
  5062. <command>-fs NAMENODE -rm -r NAMENODE/dir1</command>
  5063. </cleanup-commands>
  5064. <comparators>
  5065. <comparator>
  5066. <type>RegexpComparator</type>
  5067. <expected-output>^cat: `NAMENODE/dir1': Is a directory</expected-output>
  5068. </comparator>
  5069. </comparators>
  5070. </test>
  5071. <!-- Tests for copyToLocal -->
  5072. <test> <!-- TESTED -->
  5073. <description>copyToLocal: non existent relative path</description>
  5074. <test-commands>
  5075. <command>-fs NAMENODE -copyToLocal file CLITEST_DATA/file</command>
  5076. </test-commands>
  5077. <cleanup-commands>
  5078. <command>-fs NAMENODE -rm -r /user</command>
  5079. </cleanup-commands>
  5080. <comparators>
  5081. <comparator>
  5082. <type>RegexpComparator</type>
  5083. <expected-output>copyToLocal: `.*': No such file or directory</expected-output>
  5084. </comparator>
  5085. </comparators>
  5086. </test>
  5087. <test> <!-- TESTED -->
  5088. <description>copyToLocal: non existent absolute path</description>
  5089. <test-commands>
  5090. <command>-fs NAMENODE -copyToLocal /user/file CLITEST_DATA/file</command>
  5091. </test-commands>
  5092. <cleanup-commands>
  5093. <command>-fs NAMENODE -rm -r /user</command>
  5094. </cleanup-commands>
  5095. <comparators>
  5096. <comparator>
  5097. <type>RegexpComparator</type>
  5098. <expected-output>copyToLocal: `.*': No such file or directory</expected-output>
  5099. </comparator>
  5100. </comparators>
  5101. </test>
  5102. <test> <!-- TESTED -->
  5103. <description>copyToLocal: Test for hdfs:// path - non existent file/directory</description>
  5104. <test-commands>
  5105. <command>-fs NAMENODE -copyToLocal hdfs:///file CLITEST_DATA/file</command>
  5106. </test-commands>
  5107. <cleanup-commands>
  5108. <command>-fs NAMENODE -rm -r hdfs:///*</command>
  5109. </cleanup-commands>
  5110. <comparators>
  5111. <comparator>
  5112. <type>RegexpComparator</type>
  5113. <expected-output>copyToLocal: `.*': No such file or directory</expected-output>
  5114. </comparator>
  5115. </comparators>
  5116. </test>
  5117. <test> <!-- TESTED -->
  5118. <description>copyToLocal: Test for Namenode's path - non existent file/directory</description>
  5119. <test-commands>
  5120. <command>-fs NAMENODE -copyToLocal NAMENODE/file CLITEST_DATA/file</command>
  5121. </test-commands>
  5122. <cleanup-commands>
  5123. <command>-fs NAMENODE -rm -r NAMENODE/*</command>
  5124. </cleanup-commands>
  5125. <comparators>
  5126. <comparator>
  5127. <type>RegexpComparator</type>
  5128. <expected-output>copyToLocal: `.*': No such file or directory</expected-output>
  5129. </comparator>
  5130. </comparators>
  5131. </test>
  5132. <!-- Tests for moveToLocal -->
  5133. <!-- Not yet implemented -->
  5134. <!-- Tests for mkdir -->
  5135. <test> <!-- TESTED -->
  5136. <description>mkdir: creating directory (absolute path) </description>
  5137. <test-commands>
  5138. <command>-fs NAMENODE -mkdir /dir0</command>
  5139. <command>-fs NAMENODE -du -s /dir0</command>
  5140. </test-commands>
  5141. <cleanup-commands>
  5142. <command>-fs NAMENODE -rm /user</command>
  5143. </cleanup-commands>
  5144. <comparators>
  5145. <comparator>
  5146. <type>RegexpComparator</type>
  5147. <expected-output>^0\s+/dir0</expected-output>
  5148. </comparator>
  5149. </comparators>
  5150. </test>
  5151. <test> <!-- TESTED -->
  5152. <description>mkdir: creating directory (relative path) </description>
  5153. <test-commands>
  5154. <command>-fs NAMENODE -mkdir dir0 </command>
  5155. <command>-fs NAMENODE -du -s dir0</command>
  5156. </test-commands>
  5157. <cleanup-commands>
  5158. <command>-fs NAMENODE -rm /user</command>
  5159. </cleanup-commands>
  5160. <comparators>
  5161. <comparator>
  5162. <type>RegexpComparator</type>
  5163. <expected-output>^0\s+dir0</expected-output>
  5164. </comparator>
  5165. </comparators>
  5166. </test>
  5167. <test> <!-- TESTED -->
  5168. <description>mkdir: creating many directories (absolute path) </description>
  5169. <test-commands>
  5170. <command>-fs NAMENODE -mkdir /dir0 </command>
  5171. <command>-fs NAMENODE -mkdir /dir1 </command>
  5172. <command>-fs NAMENODE -mkdir /dir2 </command>
  5173. <command>-fs NAMENODE -mkdir /dir3 </command>
  5174. <command>-fs NAMENODE -du -s /dir*</command>
  5175. </test-commands>
  5176. <cleanup-commands>
  5177. <command>-fs NAMENODE -rm /dir*</command>
  5178. </cleanup-commands>
  5179. <comparators>
  5180. <comparator>
  5181. <type>RegexpComparator</type>
  5182. <expected-output>^0\s+/dir0</expected-output>
  5183. </comparator>
  5184. <comparator>
  5185. <type>RegexpComparator</type>
  5186. <expected-output>^0\s+/dir1</expected-output>
  5187. </comparator>
  5188. <comparator>
  5189. <type>RegexpComparator</type>
  5190. <expected-output>^0\s+/dir2</expected-output>
  5191. </comparator>
  5192. <comparator>
  5193. <type>RegexpComparator</type>
  5194. <expected-output>^0\s+/dir3</expected-output>
  5195. </comparator>
  5196. </comparators>
  5197. </test>
  5198. <test> <!-- TESTED -->
  5199. <description>mkdir: creating many directories (relative path) </description>
  5200. <test-commands>
  5201. <command>-fs NAMENODE -mkdir dir0 </command>
  5202. <command>-fs NAMENODE -mkdir dir1 </command>
  5203. <command>-fs NAMENODE -mkdir dir2 </command>
  5204. <command>-fs NAMENODE -mkdir dir3 </command>
  5205. <command>-fs NAMENODE -du -s dir*</command>
  5206. </test-commands>
  5207. <cleanup-commands>
  5208. <command>-fs NAMENODE -rm /user</command>
  5209. </cleanup-commands>
  5210. <comparators>
  5211. <comparator>
  5212. <type>RegexpComparator</type>
  5213. <expected-output>^0\s+dir0</expected-output>
  5214. </comparator>
  5215. <comparator>
  5216. <type>RegexpComparator</type>
  5217. <expected-output>^0\s+dir1</expected-output>
  5218. </comparator>
  5219. <comparator>
  5220. <type>RegexpComparator</type>
  5221. <expected-output>^0\s+dir2</expected-output>
  5222. </comparator>
  5223. <comparator>
  5224. <type>RegexpComparator</type>
  5225. <expected-output>^0\s+dir3</expected-output>
  5226. </comparator>
  5227. </comparators>
  5228. </test>
  5229. <test> <!-- TESTED -->
  5230. <description>mkdir: creating a directory with the name of an already existing directory</description>
  5231. <test-commands>
  5232. <command>-fs NAMENODE -mkdir /dir0</command>
  5233. <command>-fs NAMENODE -mkdir /dir0</command>
  5234. </test-commands>
  5235. <cleanup-commands>
  5236. <command>-fs NAMENODE -rm -r /dir0</command>
  5237. </cleanup-commands>
  5238. <comparators>
  5239. <comparator>
  5240. <type>TokenComparator</type>
  5241. <expected-output>mkdir: `/dir0': File exists</expected-output>
  5242. </comparator>
  5243. </comparators>
  5244. </test>
  5245. <test> <!-- TESTED -->
  5246. <description>mkdir: creating a directory with the name of an already existing file</description>
  5247. <test-commands>
  5248. <command>-fs NAMENODE -put CLITEST_DATA/data15bytes data15bytes</command>
  5249. <command>-fs NAMENODE -mkdir data15bytes</command>
  5250. </test-commands>
  5251. <cleanup-commands>
  5252. <command>-fs NAMENODE -rm -r data15bytes</command>
  5253. </cleanup-commands>
  5254. <comparators>
  5255. <comparator>
  5256. <type>TokenComparator</type>
  5257. <expected-output>mkdir: `data15bytes': Is not a directory</expected-output>
  5258. </comparator>
  5259. </comparators>
  5260. </test>
  5261. <test> <!-- TESTED -->
  5262. <description>mkdir: Test for hdfs:// path - creating directory</description>
  5263. <test-commands>
  5264. <command>-fs NAMENODE -mkdir hdfs:///dir0</command>
  5265. <command>-fs NAMENODE -du -s hdfs:///dir0</command>
  5266. </test-commands>
  5267. <cleanup-commands>
  5268. <command>-fs NAMENODE -rm hdfs:///*</command>
  5269. </cleanup-commands>
  5270. <comparators>
  5271. <comparator>
  5272. <type>RegexpComparator</type>
  5273. <expected-output>^0\s+hdfs:///dir0</expected-output>
  5274. </comparator>
  5275. </comparators>
  5276. </test>
  5277. <test> <!-- TESTED -->
  5278. <description>mkdir: Test for hdfs:// path - creating many directories</description>
  5279. <test-commands>
  5280. <command>-fs NAMENODE -mkdir hdfs:///dir0 hdfs:///dir1 hdfs:///dir2 hdfs:///dir3 </command>
  5281. <command>-fs NAMENODE -du -s hdfs:///dir*</command>
  5282. </test-commands>
  5283. <cleanup-commands>
  5284. <command>-fs NAMENODE -rm hdfs:///dir*</command>
  5285. </cleanup-commands>
  5286. <comparators>
  5287. <comparator>
  5288. <type>RegexpComparator</type>
  5289. <expected-output>^0\s+hdfs:///dir0</expected-output>
  5290. </comparator>
  5291. <comparator>
  5292. <type>RegexpComparator</type>
  5293. <expected-output>^0\s+hdfs:///dir1</expected-output>
  5294. </comparator>
  5295. <comparator>
  5296. <type>RegexpComparator</type>
  5297. <expected-output>^0\s+hdfs:///dir2</expected-output>
  5298. </comparator>
  5299. <comparator>
  5300. <type>RegexpComparator</type>
  5301. <expected-output>^0\s+hdfs:///dir3</expected-output>
  5302. </comparator>
  5303. </comparators>
  5304. </test>
  5305. <test> <!-- TESTED -->
  5306. <description>mkdir: Test for hdfs:// path - creating a directory with the name of an already existing directory</description>
  5307. <test-commands>
  5308. <command>-fs NAMENODE -mkdir hdfs:///dir0</command>
  5309. <command>-fs NAMENODE -mkdir hdfs:///dir0</command>
  5310. </test-commands>
  5311. <cleanup-commands>
  5312. <command>-fs NAMENODE -rm -r hdfs:///dir0</command>
  5313. </cleanup-commands>
  5314. <comparators>
  5315. <comparator>
  5316. <type>TokenComparator</type>
  5317. <expected-output>mkdir: `hdfs:///dir0': File exists</expected-output>
  5318. </comparator>
  5319. </comparators>
  5320. </test>
  5321. <test> <!-- TESTED -->
  5322. <description>mkdir: Test for hdfs:// path - creating a directory with the name of an already existing file</description>
  5323. <test-commands>
  5324. <command>-fs NAMENODE -put CLITEST_DATA/data15bytes hdfs:///data15bytes</command>
  5325. <command>-fs NAMENODE -mkdir hdfs:///data15bytes</command>
  5326. </test-commands>
  5327. <cleanup-commands>
  5328. <command>-fs NAMENODE -rm -r hdfs:///data15bytes</command>
  5329. </cleanup-commands>
  5330. <comparators>
  5331. <comparator>
  5332. <type>TokenComparator</type>
  5333. <expected-output>mkdir: `hdfs:///data15bytes': Is not a directory</expected-output>
  5334. </comparator>
  5335. </comparators>
  5336. </test>
  5337. <test> <!-- TESTED -->
  5338. <description>mkdir: Test for Namenode's path - creating directory</description>
  5339. <test-commands>
  5340. <command>-fs NAMENODE -mkdir NAMENODE/dir0</command>
  5341. <command>-fs NAMENODE -du -s NAMENODE/dir0</command>
  5342. </test-commands>
  5343. <cleanup-commands>
  5344. <command>-fs NAMENODE -rm NAMENODE/*</command>
  5345. </cleanup-commands>
  5346. <comparators>
  5347. <comparator>
  5348. <type>RegexpComparator</type>
  5349. <expected-output>^0\s+NAMENODE/dir0</expected-output>
  5350. </comparator>
  5351. </comparators>
  5352. </test>
  5353. <test> <!-- TESTED -->
  5354. <description>mkdir: Test for Namenode's path - creating many directories</description>
  5355. <test-commands>
  5356. <command>-fs NAMENODE -mkdir NAMENODE/dir0 NAMENODE/dir1 NAMENODE/dir2 NAMENODE/dir3</command>
  5357. <command>-fs NAMENODE -du -s NAMENODE/dir*</command>
  5358. </test-commands>
  5359. <cleanup-commands>
  5360. <command>-fs NAMENODE -rm NAMENODE/dir*</command>
  5361. </cleanup-commands>
  5362. <comparators>
  5363. <comparator>
  5364. <type>RegexpComparator</type>
  5365. <expected-output>^0\s+NAMENODE/dir0</expected-output>
  5366. </comparator>
  5367. <comparator>
  5368. <type>RegexpComparator</type>
  5369. <expected-output>^0\s+NAMENODE/dir1</expected-output>
  5370. </comparator>
  5371. <comparator>
  5372. <type>RegexpComparator</type>
  5373. <expected-output>^0\s+NAMENODE/dir2</expected-output>
  5374. </comparator>
  5375. <comparator>
  5376. <type>RegexpComparator</type>
  5377. <expected-output>^0\s+NAMENODE/dir3</expected-output>
  5378. </comparator>
  5379. </comparators>
  5380. </test>
  5381. <test> <!-- TESTED -->
  5382. <description>mkdir: Test for NAMENODE path - creating a directory with the name of an already existing directory</description>
  5383. <test-commands>
  5384. <command>-fs NAMENODE -mkdir NAMENODE/dir0</command>
  5385. <command>-fs NAMENODE -mkdir NAMENODE/dir0</command>
  5386. </test-commands>
  5387. <cleanup-commands>
  5388. <command>-fs NAMENODE -rm -r NAMENODE/dir0</command>
  5389. </cleanup-commands>
  5390. <comparators>
  5391. <comparator>
  5392. <type>RegexpComparator</type>
  5393. <expected-output>mkdir: `hdfs://\w+[-.a-z0-9]*:[0-9]+/dir0': File exists</expected-output>
  5394. </comparator>
  5395. </comparators>
  5396. </test>
  5397. <test> <!-- TESTED -->
  5398. <description>mkdir: Test for Namenode's path - creating a directory with the name of an already existing file</description>
  5399. <test-commands>
  5400. <command>-fs NAMENODE -put CLITEST_DATA/data15bytes NAMENODE/data15bytes</command>
  5401. <command>-fs NAMENODE -mkdir NAMENODE/data15bytes</command>
  5402. </test-commands>
  5403. <cleanup-commands>
  5404. <command>-fs NAMENODE -rm -r NAMENODE/data15bytes</command>
  5405. </cleanup-commands>
  5406. <comparators>
  5407. <comparator>
  5408. <type>RegexpComparator</type>
  5409. <expected-output>mkdir: `hdfs://\w+[-.a-z0-9]*:[0-9]+/data15bytes': Is not a directory</expected-output>
  5410. </comparator>
  5411. </comparators>
  5412. </test>
  5413. <!--Tests for setrep-->
  5414. <test> <!-- TESTED -->
  5415. <description>setrep: existent file (absolute path)</description>
  5416. <test-commands>
  5417. <command>-fs NAMENODE -touchz /dir0/file0</command>
  5418. <command>-fs NAMENODE -setrep 2 /dir0/file0</command>
  5419. </test-commands>
  5420. <cleanup-commands>
  5421. <command>-fs NAMENODE -rm -r /user</command>
  5422. </cleanup-commands>
  5423. <comparators>
  5424. <comparator>
  5425. <type>RegexpComparator</type>
  5426. <expected-output>^Replication 2 set: /dir0/file0</expected-output>
  5427. </comparator>
  5428. </comparators>
  5429. </test>
  5430. <test> <!-- TESTED -->
  5431. <description>setrep: existent file (relative path)</description>
  5432. <test-commands>
  5433. <command>-fs NAMENODE -touchz file0</command>
  5434. <command>-fs NAMENODE -setrep 2 file0</command>
  5435. </test-commands>
  5436. <cleanup-commands>
  5437. <command>-fs NAMENODE -rm -r /user</command>
  5438. </cleanup-commands>
  5439. <comparators>
  5440. <comparator>
  5441. <type>RegexpComparator</type>
  5442. <expected-output>^Replication 2 set: file0</expected-output>
  5443. </comparator>
  5444. </comparators>
  5445. </test>
  5446. <test> <!-- TESTED -->
  5447. <description>setrep: existent directory (absolute path)</description>
  5448. <test-commands>
  5449. <command>-fs NAMENODE -touchz /dir0/file0</command>
  5450. <command>-fs NAMENODE -touchz /dir0/file1</command>
  5451. <command>-fs NAMENODE -setrep -R 2 /dir0</command>
  5452. </test-commands>
  5453. <cleanup-commands>
  5454. <command>-fs NAMENODE -rm -r /user</command>
  5455. </cleanup-commands>
  5456. <comparators>
  5457. <comparator>
  5458. <type>RegexpComparator</type>
  5459. <expected-output>^Replication 2 set: /dir0/file0</expected-output>
  5460. </comparator>
  5461. <comparator>
  5462. <type>RegexpComparator</type>
  5463. <expected-output>^Replication 2 set: /dir0/file1</expected-output>
  5464. </comparator>
  5465. </comparators>
  5466. </test>
  5467. <test> <!-- TESTED -->
  5468. <description>setrep: existent directory (relative path)</description>
  5469. <test-commands>
  5470. <command>-fs NAMENODE -touchz dir0/file0</command>
  5471. <command>-fs NAMENODE -touchz dir0/file1</command>
  5472. <command>-fs NAMENODE -setrep -R 2 dir0</command>
  5473. </test-commands>
  5474. <cleanup-commands>
  5475. <command>-fs NAMENODE -rm -r /user</command>
  5476. </cleanup-commands>
  5477. <comparators>
  5478. <comparator>
  5479. <type>RegexpComparator</type>
  5480. <expected-output>^Replication 2 set: dir0/file0</expected-output>
  5481. </comparator>
  5482. <comparator>
  5483. <type>RegexpComparator</type>
  5484. <expected-output>^Replication 2 set: dir0/file1</expected-output>
  5485. </comparator>
  5486. </comparators>
  5487. </test>
  5488. <test> <!-- TESTED -->
  5489. <description>setrep: non existent file (absolute path)</description>
  5490. <test-commands>
  5491. <command>-fs NAMENODE -setrep 2 /dir0/file</command>
  5492. </test-commands>
  5493. <cleanup-commands>
  5494. <command>-fs NAMENODE -rm -r /user</command>
  5495. </cleanup-commands>
  5496. <comparators>
  5497. <comparator>
  5498. <type>RegexpComparator</type>
  5499. <expected-output>^setrep: `/dir0/file': No such file or directory</expected-output>
  5500. </comparator>
  5501. </comparators>
  5502. </test>
  5503. <test> <!-- TESTED -->
  5504. <description>setrep: non existent file (relative path)</description>
  5505. <test-commands>
  5506. <command>-fs NAMENODE -setrep 2 file0</command>
  5507. </test-commands>
  5508. <cleanup-commands>
  5509. <command>-fs NAMENODE -rm -r /user</command>
  5510. </cleanup-commands>
  5511. <comparators>
  5512. <comparator>
  5513. <type>RegexpComparator</type>
  5514. <expected-output>^setrep: `file0': No such file or directory</expected-output>
  5515. </comparator>
  5516. </comparators>
  5517. </test>
  5518. <test> <!-- TESTED -->
  5519. <description>setrep: Test for hdfs:// path - existent file</description>
  5520. <test-commands>
  5521. <command>-fs NAMENODE -touchz hdfs:///dir0/file0</command>
  5522. <command>-fs NAMENODE -setrep 2 hdfs:///dir0/file0</command>
  5523. </test-commands>
  5524. <cleanup-commands>
  5525. <command>-fs NAMENODE -rm -r hdfs:///*</command>
  5526. </cleanup-commands>
  5527. <comparators>
  5528. <comparator>
  5529. <type>RegexpComparator</type>
  5530. <expected-output>^Replication 2 set: hdfs:///dir0/file0</expected-output>
  5531. </comparator>
  5532. </comparators>
  5533. </test>
  5534. <test> <!-- TESTED -->
  5535. <description>setrep: Test for hdfs:// path - existent directory</description>
  5536. <test-commands>
  5537. <command>-fs NAMENODE -touchz hdfs:///dir0/file0</command>
  5538. <command>-fs NAMENODE -touchz hdfs:///dir0/file1</command>
  5539. <command>-fs NAMENODE -setrep -R 2 hdfs:///dir0</command>
  5540. </test-commands>
  5541. <cleanup-commands>
  5542. <command>-fs NAMENODE -rm -r hdfs:///*</command>
  5543. </cleanup-commands>
  5544. <comparators>
  5545. <comparator>
  5546. <type>RegexpComparator</type>
  5547. <expected-output>^Replication 2 set: hdfs:///dir0/file0</expected-output>
  5548. </comparator>
  5549. <comparator>
  5550. <type>RegexpComparator</type>
  5551. <expected-output>^Replication 2 set: hdfs:///dir0/file1</expected-output>
  5552. </comparator>
  5553. </comparators>
  5554. </test>
  5555. <test> <!-- TESTED -->
  5556. <description>setrep: Test for hdfs:// path - non existent file</description>
  5557. <test-commands>
  5558. <command>-fs NAMENODE -setrep 2 hdfs:///dir0/file</command>
  5559. </test-commands>
  5560. <cleanup-commands>
  5561. <command>-fs NAMENODE -rm -r hdfs:///*</command>
  5562. </cleanup-commands>
  5563. <comparators>
  5564. <comparator>
  5565. <type>RegexpComparator</type>
  5566. <expected-output>^setrep: `hdfs:///dir0/file': No such file or directory</expected-output>
  5567. </comparator>
  5568. </comparators>
  5569. </test>
  5570. <test> <!-- TESTED -->
  5571. <description>setrep: Test for Namenode's path - existent file</description>
  5572. <test-commands>
  5573. <command>-fs NAMENODE -touchz NAMENODE/dir0/file0</command>
  5574. <command>-fs NAMENODE -setrep 2 NAMENODE/dir0/file0</command>
  5575. </test-commands>
  5576. <cleanup-commands>
  5577. <command>-fs NAMENODE -rm -r NAMENODE/*</command>
  5578. </cleanup-commands>
  5579. <comparators>
  5580. <comparator>
  5581. <type>RegexpComparator</type>
  5582. <expected-output>^Replication 2 set: NAMENODE/dir0/file0</expected-output>
  5583. </comparator>
  5584. </comparators>
  5585. </test>
  5586. <test> <!-- TESTED -->
  5587. <description>setrep: Test for Namenode's path - existent directory</description>
  5588. <test-commands>
  5589. <command>-fs NAMENODE -touchz NAMENODE/dir0/file0</command>
  5590. <command>-fs NAMENODE -touchz NAMENODE/dir0/file1</command>
  5591. <command>-fs NAMENODE -setrep -R 2 NAMENODE/dir0</command>
  5592. </test-commands>
  5593. <cleanup-commands>
  5594. <command>-fs NAMENODE -rm -r NAMENODE/*</command>
  5595. </cleanup-commands>
  5596. <comparators>
  5597. <comparator>
  5598. <type>RegexpComparator</type>
  5599. <expected-output>^Replication 2 set: NAMENODE/dir0/file0</expected-output>
  5600. </comparator>
  5601. <comparator>
  5602. <type>RegexpComparator</type>
  5603. <expected-output>^Replication 2 set: NAMENODE/dir0/file1</expected-output>
  5604. </comparator>
  5605. </comparators>
  5606. </test>
  5607. <test> <!-- TESTED -->
  5608. <description>setrep: Test for Namenode's path - non existent file</description>
  5609. <test-commands>
  5610. <command>-fs NAMENODE -setrep 2 NAMENODE/dir0/file</command>
  5611. </test-commands>
  5612. <cleanup-commands>
  5613. <command>-fs NAMENODE -rm -r NAMENODE/*</command>
  5614. </cleanup-commands>
  5615. <comparators>
  5616. <comparator>
  5617. <type>RegexpComparator</type>
  5618. <expected-output>^setrep: `hdfs://\w+[-.a-z0-9]*:[0-9]+/dir0/file': No such file or directory</expected-output>
  5619. </comparator>
  5620. </comparators>
  5621. </test>
  5622. <!-- Tests for touchz-->
  5623. <test> <!-- TESTED -->
  5624. <description>touchz: touching file (absolute path) </description>
  5625. <test-commands>
  5626. <command>-fs NAMENODE -touchz /user/file0</command>
  5627. <command>-fs NAMENODE -du /user/file0</command>
  5628. </test-commands>
  5629. <cleanup-commands>
  5630. <command>-fs NAMENODE -rm /user</command>
  5631. </cleanup-commands>
  5632. <comparators>
  5633. <comparator>
  5634. <type>RegexpComparator</type>
  5635. <expected-output>^0\s+/user/file0</expected-output>
  5636. </comparator>
  5637. </comparators>
  5638. </test>
  5639. <test> <!-- TESTED -->
  5640. <description>touchz: touching file(relative path) </description>
  5641. <test-commands>
  5642. <command>-fs NAMENODE -touchz file0 </command>
  5643. <command>-fs NAMENODE -du file0</command>
  5644. </test-commands>
  5645. <cleanup-commands>
  5646. <command>-fs NAMENODE -rm /user</command>
  5647. </cleanup-commands>
  5648. <comparators>
  5649. <comparator>
  5650. <type>RegexpComparator</type>
  5651. <expected-output>^0\s+file0</expected-output>
  5652. </comparator>
  5653. </comparators>
  5654. </test>
  5655. <test> <!-- TESTED -->
  5656. <description>touchz: touching many files </description>
  5657. <test-commands>
  5658. <command>-fs NAMENODE -touchz file0 file1 file2</command>
  5659. <command>-fs NAMENODE -du file*</command>
  5660. </test-commands>
  5661. <cleanup-commands>
  5662. <command>-fs NAMENODE -rm /user</command>
  5663. </cleanup-commands>
  5664. <comparators>
  5665. <comparator>
  5666. <type>RegexpComparator</type>
  5667. <expected-output>^0( |\t)*file0</expected-output>
  5668. <expected-output>^0( |\t)*file1</expected-output>
  5669. <expected-output>^0( |\t)*file2</expected-output>
  5670. </comparator>
  5671. </comparators>
  5672. </test>
  5673. <test> <!-- TESTED -->
  5674. <description>touchz: touching already existing file </description>
  5675. <test-commands>
  5676. <command>-fs NAMENODE -put CLITEST_DATA/data15bytes data15bytes</command>
  5677. <command>-fs NAMENODE -touchz data15bytes</command>
  5678. </test-commands>
  5679. <cleanup-commands>
  5680. <command>-fs NAMENODE -rm data15bytes</command>
  5681. </cleanup-commands>
  5682. <comparators>
  5683. <comparator>
  5684. <type>TokenComparator</type>
  5685. <expected-output>touchz: `data15bytes': Not a zero-length file</expected-output>
  5686. </comparator>
  5687. </comparators>
  5688. </test>
  5689. <test> <!-- TESTED -->
  5690. <description>touchz: Test for hdfs:// path - touching file</description>
  5691. <test-commands>
  5692. <command>-fs NAMENODE -touchz hdfs:///user/file0</command>
  5693. <command>-fs NAMENODE -du hdfs:///user/file0</command>
  5694. </test-commands>
  5695. <cleanup-commands>
  5696. <command>-fs NAMENODE -rm hdfs:///user</command>
  5697. </cleanup-commands>
  5698. <comparators>
  5699. <comparator>
  5700. <type>RegexpComparator</type>
  5701. <expected-output>^0\s+hdfs:///user/file0</expected-output>
  5702. </comparator>
  5703. </comparators>
  5704. </test>
  5705. <test> <!-- TESTED -->
  5706. <description>touchz: Test for hdfs:// path - touching many files </description>
  5707. <test-commands>
  5708. <command>-fs NAMENODE -touchz hdfs:///file0 hdfs:///file1 hdfs:///file2</command>
  5709. <command>-fs NAMENODE -du hdfs:///file*</command>
  5710. </test-commands>
  5711. <cleanup-commands>
  5712. <command>-fs NAMENODE -rm hdfs:///user</command>
  5713. </cleanup-commands>
  5714. <comparators>
  5715. <comparator>
  5716. <type>RegexpComparator</type>
  5717. <expected-output>^0( |\t)*hdfs:///file0</expected-output>
  5718. <expected-output>^0( |\t)*hdfs:///file1</expected-output>
  5719. <expected-output>^0( |\t)*hdfs:///file2</expected-output>
  5720. </comparator>
  5721. </comparators>
  5722. </test>
  5723. <test> <!-- TESTED -->
  5724. <description>touchz: Test for hdfs:// path - touching already existing file </description>
  5725. <test-commands>
  5726. <command>-fs NAMENODE -put CLITEST_DATA/data15bytes hdfs:///data15bytes</command>
  5727. <command>-fs NAMENODE -touchz hdfs:///data15bytes</command>
  5728. </test-commands>
  5729. <cleanup-commands>
  5730. <command>-fs NAMENODE -rm hdfs:///data15bytes</command>
  5731. </cleanup-commands>
  5732. <comparators>
  5733. <comparator>
  5734. <type>TokenComparator</type>
  5735. <expected-output>touchz: `hdfs:///data15bytes': Not a zero-length file</expected-output>
  5736. </comparator>
  5737. </comparators>
  5738. </test>
  5739. <test> <!-- TESTED -->
  5740. <description>touchz: Test for Namenode's path - touching file</description>
  5741. <test-commands>
  5742. <command>-fs NAMENODE -touchz NAMENODE/user/file0</command>
  5743. <command>-fs NAMENODE -du NAMENODE/user/file0</command>
  5744. </test-commands>
  5745. <cleanup-commands>
  5746. <command>-fs NAMENODE -rm NAMENODE/user</command>
  5747. </cleanup-commands>
  5748. <comparators>
  5749. <comparator>
  5750. <type>RegexpComparator</type>
  5751. <expected-output>^0\s+NAMENODE/user/file0</expected-output>
  5752. </comparator>
  5753. </comparators>
  5754. </test>
  5755. <test> <!-- TESTED -->
  5756. <description>touchz: Test for Namenode path - touching many files </description>
  5757. <test-commands>
  5758. <command>-fs NAMENODE -touchz NAMENODE/file0 NAMENODE/file1 NAMENODE/file2</command>
  5759. <command>-fs NAMENODE -du NAMENODE/file*</command>
  5760. </test-commands>
  5761. <cleanup-commands>
  5762. <command>-fs NAMENODE -rm NAMENODE/user</command>
  5763. </cleanup-commands>
  5764. <comparators>
  5765. <comparator>
  5766. <type>RegexpComparator</type>
  5767. <expected-output>^0\s+hdfs://\w+[-.a-z0-9]*:[0-9]+/file0</expected-output>
  5768. <expected-output>^0\s+hdfs://\w+[-.a-z0-9]*:[0-9]+/file1</expected-output>
  5769. <expected-output>^0\s+hdfs://\w+[-.a-z0-9]*:[0-9]+/file2</expected-output>
  5770. </comparator>
  5771. </comparators>
  5772. </test>
  5773. <test> <!-- TESTED -->
  5774. <description>touchz: Test for Namenode's path - touching already existing file </description>
  5775. <test-commands>
  5776. <command>-fs NAMENODE -put CLITEST_DATA/data15bytes NAMENODE/data15bytes</command>
  5777. <command>-fs NAMENODE -touchz NAMENODE/data15bytes</command>
  5778. </test-commands>
  5779. <cleanup-commands>
  5780. <command>-fs NAMENODE -rm NAMENODE/data15bytes</command>
  5781. </cleanup-commands>
  5782. <comparators>
  5783. <comparator>
  5784. <type>RegexpComparator</type>
  5785. <expected-output>touchz: `hdfs://\w+[-.a-z0-9]*:[0-9]+/data15bytes': Not a zero-length file</expected-output>
  5786. </comparator>
  5787. </comparators>
  5788. </test>
  5789. <!--Tests for test-->
  5790. <test> <!-- TESTED -->
  5791. <description>test: non existent file (absolute path)</description>
  5792. <test-commands>
  5793. <command>-fs NAMENODE -test -z /dir0/file</command>
  5794. </test-commands>
  5795. <cleanup-commands>
  5796. <command>-fs NAMENODE -rm -r /user</command>
  5797. </cleanup-commands>
  5798. <comparators>
  5799. <comparator>
  5800. <type>RegexpComparator</type>
  5801. <expected-output>^test: `/dir0/file': No such file or directory</expected-output>
  5802. </comparator>
  5803. </comparators>
  5804. </test>
  5805. <test> <!-- TESTED -->
  5806. <description>test: non existent file (relative path)</description>
  5807. <test-commands>
  5808. <command>-fs NAMENODE -test -z file</command>
  5809. </test-commands>
  5810. <cleanup-commands>
  5811. <command>-fs NAMENODE -rm -r /user</command>
  5812. </cleanup-commands>
  5813. <comparators>
  5814. <comparator>
  5815. <type>RegexpComparator</type>
  5816. <expected-output>^test: `file': No such file or directory</expected-output>
  5817. </comparator>
  5818. </comparators>
  5819. </test>
  5820. <test> <!-- TESTED -->
  5821. <description>test: non existent directory (absolute path)</description>
  5822. <test-commands>
  5823. <command>-fs NAMENODE -test -d /dir</command>
  5824. </test-commands>
  5825. <cleanup-commands>
  5826. <command>-fs NAMENODE -rm -r /user</command>
  5827. </cleanup-commands>
  5828. <comparators>
  5829. <comparator>
  5830. <type>RegexpComparator</type>
  5831. <expected-output>^test: `/dir': No such file or directory</expected-output>
  5832. </comparator>
  5833. </comparators>
  5834. </test>
  5835. <test> <!-- TESTED -->
  5836. <description>test: non existent directory (relative path)</description>
  5837. <test-commands>
  5838. <command>-fs NAMENODE -test -d dir0</command>
  5839. </test-commands>
  5840. <cleanup-commands>
  5841. <command>-fs NAMENODE -rm -r /user</command>
  5842. </cleanup-commands>
  5843. <comparators>
  5844. <comparator>
  5845. <type>RegexpComparator</type>
  5846. <expected-output>^test: `dir0': No such file or directory</expected-output>
  5847. </comparator>
  5848. </comparators>
  5849. </test>
  5850. <test> <!-- TESTED -->
  5851. <description>test: Test for hdfs:// path - non existent file</description>
  5852. <test-commands>
  5853. <command>-fs NAMENODE -test -z hdfs:///dir0/file</command>
  5854. </test-commands>
  5855. <cleanup-commands>
  5856. <command>-fs NAMENODE -rm -r hdfs:///dir0</command>
  5857. </cleanup-commands>
  5858. <comparators>
  5859. <comparator>
  5860. <type>RegexpComparator</type>
  5861. <expected-output>^test: `hdfs:///dir0/file': No such file or directory</expected-output>
  5862. </comparator>
  5863. </comparators>
  5864. </test>
  5865. <test> <!-- TESTED -->
  5866. <description>test: Test for hdfs:// path - non existent directory</description>
  5867. <test-commands>
  5868. <command>-fs NAMENODE -test -d hdfs:///dir</command>
  5869. </test-commands>
  5870. <cleanup-commands>
  5871. <command>-fs NAMENODE -rm -r hdfs:///dir</command>
  5872. </cleanup-commands>
  5873. <comparators>
  5874. <comparator>
  5875. <type>RegexpComparator</type>
  5876. <expected-output>^test: `hdfs:///dir': No such file or directory</expected-output>
  5877. </comparator>
  5878. </comparators>
  5879. </test>
  5880. <test> <!-- TESTED -->
  5881. <description>test: Test for Namenode's path - non existent file</description>
  5882. <test-commands>
  5883. <command>-fs NAMENODE -test -z NAMENODE/dir0/file</command>
  5884. </test-commands>
  5885. <cleanup-commands>
  5886. <command>-fs NAMENODE -rm -r NAMENODE/dir0</command>
  5887. </cleanup-commands>
  5888. <comparators>
  5889. <comparator>
  5890. <type>RegexpComparator</type>
  5891. <expected-output>^test: `hdfs://\w+[-.a-z0-9]*:[0-9]+/dir0/file': No such file or directory</expected-output>
  5892. </comparator>
  5893. </comparators>
  5894. </test>
  5895. <test> <!-- TESTED -->
  5896. <description>test: Test for Namenode's path - non existent directory</description>
  5897. <test-commands>
  5898. <command>-fs NAMENODE -test -d NAMENODE/dir</command>
  5899. </test-commands>
  5900. <cleanup-commands>
  5901. <command>-fs NAMENODE -rm -r NAMENODE/dir</command>
  5902. </cleanup-commands>
  5903. <comparators>
  5904. <comparator>
  5905. <type>RegexpComparator</type>
  5906. <expected-output>^test: `hdfs://\w+[-.a-z0-9]*:[0-9]+/dir': No such file or directory</expected-output>
  5907. </comparator>
  5908. </comparators>
  5909. </test>
  5910. <!--Tests for stat -->
  5911. <test> <!-- TESTED -->
  5912. <description>stat: statistics about file(absolute path)</description>
  5913. <test-commands>
  5914. <command>-fs NAMENODE -put CLITEST_DATA/data60bytes /data60bytes</command>
  5915. <command>-fs NAMENODE -stat "%n-%b" /data60bytes</command>
  5916. </test-commands>
  5917. <cleanup-commands>
  5918. <command>-fs NAMENODE -rm -r /data60bytes</command>
  5919. </cleanup-commands>
  5920. <comparators>
  5921. <comparator>
  5922. <type>TokenComparator</type>
  5923. <expected-output>data60bytes-60</expected-output>
  5924. </comparator>
  5925. </comparators>
  5926. </test>
  5927. <test> <!-- TESTED -->
  5928. <description>stat: statistics about file(relative path)</description>
  5929. <test-commands>
  5930. <command>-fs NAMENODE -touchz test</command>
  5931. <command>-fs NAMENODE -put CLITEST_DATA/data60bytes data60bytes</command>
  5932. <command>-fs NAMENODE -stat "%n-%b" data60bytes</command>
  5933. </test-commands>
  5934. <cleanup-commands>
  5935. <command>-fs NAMENODE -rm -r /user</command>
  5936. </cleanup-commands>
  5937. <comparators>
  5938. <comparator>
  5939. <type>TokenComparator</type>
  5940. <expected-output>data60bytes-60</expected-output>
  5941. </comparator>
  5942. </comparators>
  5943. </test>
  5944. <test> <!-- TESTED -->
  5945. <description>stat: statistics about directory(absolute path)</description>
  5946. <test-commands>
  5947. <command>-fs NAMENODE -mkdir /dirtest</command>
  5948. <command>-fs NAMENODE -stat "%n-%b-%o" /dirtest</command>
  5949. </test-commands>
  5950. <cleanup-commands>
  5951. <command>-fs NAMENODE -rm -r /dirtest</command>
  5952. </cleanup-commands>
  5953. <comparators>
  5954. <comparator>
  5955. <type>TokenComparator</type>
  5956. <expected-output>dirtest-0-0</expected-output>
  5957. </comparator>
  5958. </comparators>
  5959. </test>
  5960. <test> <!-- TESTED -->
  5961. <description>stat: statistics about directory(relative path)</description>
  5962. <test-commands>
  5963. <command>-fs NAMENODE -mkdir dirtest</command>
  5964. <command>-fs NAMENODE -stat "%n-%b-%o" dirtest</command>
  5965. </test-commands>
  5966. <cleanup-commands>
  5967. <command>-fs NAMENODE -rm -r /user</command>
  5968. </cleanup-commands>
  5969. <comparators>
  5970. <comparator>
  5971. <type>TokenComparator</type>
  5972. <expected-output>dirtest-0-0</expected-output>
  5973. </comparator>
  5974. </comparators>
  5975. </test>
  5976. <test> <!-- TESTED -->
  5977. <description>stat: statistics about files (absolute path) using globbing</description>
  5978. <test-commands>
  5979. <command>-fs NAMENODE -mkdir /dir0</command>
  5980. <command>-fs NAMENODE -put CLITEST_DATA/data15bytes /dir0/data15bytes</command>
  5981. <command>-fs NAMENODE -put CLITEST_DATA/data30bytes /dir0/data30bytes</command>
  5982. <command>-fs NAMENODE -put CLITEST_DATA/data60bytes /dir0/data60bytes</command>
  5983. <command>-fs NAMENODE -put CLITEST_DATA/data120bytes /dir0/data120bytes</command>
  5984. <command>-fs NAMENODE -mkdir /dir0/datadir</command>
  5985. <command>-fs NAMENODE -stat "%n-%b" /dir0/data*</command>
  5986. </test-commands>
  5987. <cleanup-commands>
  5988. <command>-fs NAMENODE -rm -r /dir0</command>
  5989. </cleanup-commands>
  5990. <comparators>
  5991. <comparator>
  5992. <type>TokenComparator</type>
  5993. <expected-output>"data15bytes-15"</expected-output>
  5994. </comparator>
  5995. <comparator>
  5996. <type>TokenComparator</type>
  5997. <expected-output>"data30bytes-30"</expected-output>
  5998. </comparator>
  5999. <comparator>
  6000. <type>TokenComparator</type>
  6001. <expected-output>"data60bytes-60"</expected-output>
  6002. </comparator>
  6003. <comparator>
  6004. <type>TokenComparator</type>
  6005. <expected-output>"data120bytes-120"</expected-output>
  6006. </comparator>
  6007. <comparator>
  6008. <type>TokenComparator</type>
  6009. <expected-output>"datadir-0"</expected-output>
  6010. </comparator>
  6011. </comparators>
  6012. </test>
  6013. <test> <!-- TESTED -->
  6014. <description>stat: statistics about files (relative path) using globbing</description>
  6015. <test-commands>
  6016. <command>-fs NAMENODE -touchz test</command>
  6017. <command>-fs NAMENODE -put CLITEST_DATA/data15bytes data15bytes</command>
  6018. <command>-fs NAMENODE -put CLITEST_DATA/data30bytes data30bytes</command>
  6019. <command>-fs NAMENODE -put CLITEST_DATA/data60bytes data60bytes</command>
  6020. <command>-fs NAMENODE -put CLITEST_DATA/data120bytes data120bytes</command>
  6021. <command>-fs NAMENODE -mkdir datadir</command>
  6022. <command>-fs NAMENODE -stat "%n-%b" data*</command>
  6023. </test-commands>
  6024. <cleanup-commands>
  6025. <command>-fs NAMENODE -rm -r /user</command>
  6026. </cleanup-commands>
  6027. <comparators>
  6028. <comparator>
  6029. <type>TokenComparator</type>
  6030. <expected-output>"data15bytes-15"</expected-output>
  6031. </comparator>
  6032. <comparator>
  6033. <type>TokenComparator</type>
  6034. <expected-output>"data30bytes-30"</expected-output>
  6035. </comparator>
  6036. <comparator>
  6037. <type>TokenComparator</type>
  6038. <expected-output>"data60bytes-60"</expected-output>
  6039. </comparator>
  6040. <comparator>
  6041. <type>TokenComparator</type>
  6042. <expected-output>"data120bytes-120"</expected-output>
  6043. </comparator>
  6044. <comparator>
  6045. <type>TokenComparator</type>
  6046. <expected-output>"datadir-0"</expected-output>
  6047. </comparator>
  6048. </comparators>
  6049. </test>
  6050. <test> <!-- TESTED -->
  6051. <description>stat: statistics about file or directory(absolute path) that does not exist</description>
  6052. <test-commands>
  6053. <command>-fs NAMENODE -stat /file</command>
  6054. </test-commands>
  6055. <cleanup-commands>
  6056. </cleanup-commands>
  6057. <comparators>
  6058. <comparator>
  6059. <type>RegexpComparator</type>
  6060. <expected-output>^stat: `/file': No such file or directory</expected-output>
  6061. </comparator>
  6062. </comparators>
  6063. </test>
  6064. <test> <!-- TESTED -->
  6065. <description>stat: statistics about file or directory(relative path) that does not exist </description>
  6066. <test-commands>
  6067. <command>-fs NAMENODE -stat file1</command>
  6068. </test-commands>
  6069. <cleanup-commands>
  6070. </cleanup-commands>
  6071. <comparators>
  6072. <comparator>
  6073. <type>RegexpComparator</type>
  6074. <expected-output>^stat: `file1': No such file or directory</expected-output>
  6075. </comparator>
  6076. </comparators>
  6077. </test>
  6078. <test> <!-- TESTED -->
  6079. <description>stat: Test for hdfs:// path - statistics about file</description>
  6080. <test-commands>
  6081. <command>-fs NAMENODE -put CLITEST_DATA/data60bytes hdfs:///data60bytes</command>
  6082. <command>-fs NAMENODE -stat "%n-%b" hdfs:///data60bytes</command>
  6083. </test-commands>
  6084. <cleanup-commands>
  6085. <command>-fs NAMENODE -rm -r hdfs:///data60bytes</command>
  6086. </cleanup-commands>
  6087. <comparators>
  6088. <comparator>
  6089. <type>TokenComparator</type>
  6090. <expected-output>data60bytes-60</expected-output>
  6091. </comparator>
  6092. </comparators>
  6093. </test>
  6094. <test> <!-- TESTED -->
  6095. <description>stat: Test for hdfs:// path - statistics about directory</description>
  6096. <test-commands>
  6097. <command>-fs NAMENODE -mkdir hdfs:///dirtest</command>
  6098. <command>-fs NAMENODE -stat "%n-%b-%o" hdfs:///dirtest</command>
  6099. </test-commands>
  6100. <cleanup-commands>
  6101. <command>-fs NAMENODE -rm -r hdfs:///dirtest</command>
  6102. </cleanup-commands>
  6103. <comparators>
  6104. <comparator>
  6105. <type>TokenComparator</type>
  6106. <expected-output>dirtest-0-0</expected-output>
  6107. </comparator>
  6108. </comparators>
  6109. </test>
  6110. <test> <!-- TESTED -->
  6111. <description>stat: Test for hdfs:// path - statistics about files using globbing</description>
  6112. <test-commands>
  6113. <command>-fs NAMENODE -mkdir /dir0</command>
  6114. <command>-fs NAMENODE -put CLITEST_DATA/data15bytes hdfs:///dir0/data15bytes</command>
  6115. <command>-fs NAMENODE -put CLITEST_DATA/data30bytes hdfs:///dir0/data30bytes</command>
  6116. <command>-fs NAMENODE -put CLITEST_DATA/data60bytes hdfs:///dir0/data60bytes</command>
  6117. <command>-fs NAMENODE -put CLITEST_DATA/data120bytes hdfs:///dir0/data120bytes</command>
  6118. <command>-fs NAMENODE -mkdir hdfs:///dir0/datadir</command>
  6119. <command>-fs NAMENODE -stat "%n-%b" hdfs:///dir0/data*</command>
  6120. </test-commands>
  6121. <cleanup-commands>
  6122. <command>-fs NAMENODE -rm -r hdfs:///dir0</command>
  6123. </cleanup-commands>
  6124. <comparators>
  6125. <comparator>
  6126. <type>TokenComparator</type>
  6127. <expected-output>"data15bytes-15"</expected-output>
  6128. </comparator>
  6129. <comparator>
  6130. <type>TokenComparator</type>
  6131. <expected-output>"data30bytes-30"</expected-output>
  6132. </comparator>
  6133. <comparator>
  6134. <type>TokenComparator</type>
  6135. <expected-output>"data60bytes-60"</expected-output>
  6136. </comparator>
  6137. <comparator>
  6138. <type>TokenComparator</type>
  6139. <expected-output>"data120bytes-120"</expected-output>
  6140. </comparator>
  6141. <comparator>
  6142. <type>TokenComparator</type>
  6143. <expected-output>"datadir-0"</expected-output>
  6144. </comparator>
  6145. </comparators>
  6146. </test>
  6147. <test> <!-- TESTED -->
  6148. <description>stat: Test for hdfs:// path - statistics about file or directory that does not exist</description>
  6149. <test-commands>
  6150. <command>-fs NAMENODE -stat hdfs:///file</command>
  6151. </test-commands>
  6152. <cleanup-commands>
  6153. </cleanup-commands>
  6154. <comparators>
  6155. <comparator>
  6156. <type>RegexpComparator</type>
  6157. <expected-output>^stat: `hdfs:///file': No such file or directory</expected-output>
  6158. </comparator>
  6159. </comparators>
  6160. </test>
  6161. <test> <!-- TESTED -->
  6162. <description>stat: Test for Namenode's path - statistics about file</description>
  6163. <test-commands>
  6164. <command>-fs NAMENODE -put CLITEST_DATA/data60bytes NAMENODE/data60bytes</command>
  6165. <command>-fs NAMENODE -stat "%n-%b" NAMENODE/data60bytes</command>
  6166. </test-commands>
  6167. <cleanup-commands>
  6168. <command>-fs NAMENODE -rm -r NAMENODE/data60bytes</command>
  6169. </cleanup-commands>
  6170. <comparators>
  6171. <comparator>
  6172. <type>TokenComparator</type>
  6173. <expected-output>data60bytes-60</expected-output>
  6174. </comparator>
  6175. </comparators>
  6176. </test>
  6177. <test> <!-- TESTED -->
  6178. <description>stat: Test for Namenode's path - statistics about directory</description>
  6179. <test-commands>
  6180. <command>-fs NAMENODE -mkdir NAMENODE/dirtest</command>
  6181. <command>-fs NAMENODE -stat "%n-%b-%o" NAMENODE/dirtest</command>
  6182. </test-commands>
  6183. <cleanup-commands>
  6184. <command>-fs NAMENODE -rm -r NAMENODE/dirtest</command>
  6185. </cleanup-commands>
  6186. <comparators>
  6187. <comparator>
  6188. <type>TokenComparator</type>
  6189. <expected-output>dirtest-0-0</expected-output>
  6190. </comparator>
  6191. </comparators>
  6192. </test>
  6193. <test> <!-- TESTED -->
  6194. <description>stat: Test for Namenode's path - statistics about files using globbing</description>
  6195. <test-commands>
  6196. <command>-fs NAMENODE -mkdir /dir0</command>
  6197. <command>-fs NAMENODE -put CLITEST_DATA/data15bytes NAMENODE/dir0/data15bytes</command>
  6198. <command>-fs NAMENODE -put CLITEST_DATA/data30bytes NAMENODE/dir0/data30bytes</command>
  6199. <command>-fs NAMENODE -put CLITEST_DATA/data60bytes NAMENODE/dir0/data60bytes</command>
  6200. <command>-fs NAMENODE -put CLITEST_DATA/data120bytes NAMENODE/dir0/data120bytes</command>
  6201. <command>-fs NAMENODE -mkdir NAMENODE/dir0/datadir</command>
  6202. <command>-fs NAMENODE -stat "%n-%b" NAMENODE/dir0/data*</command>
  6203. </test-commands>
  6204. <cleanup-commands>
  6205. <command>-fs NAMENODE -rm -r NAMENODE/dir0</command>
  6206. </cleanup-commands>
  6207. <comparators>
  6208. <comparator>
  6209. <type>TokenComparator</type>
  6210. <expected-output>"data15bytes-15"</expected-output>
  6211. </comparator>
  6212. <comparator>
  6213. <type>TokenComparator</type>
  6214. <expected-output>"data30bytes-30"</expected-output>
  6215. </comparator>
  6216. <comparator>
  6217. <type>TokenComparator</type>
  6218. <expected-output>"data60bytes-60"</expected-output>
  6219. </comparator>
  6220. <comparator>
  6221. <type>TokenComparator</type>
  6222. <expected-output>"data120bytes-120"</expected-output>
  6223. </comparator>
  6224. <comparator>
  6225. <type>TokenComparator</type>
  6226. <expected-output>"datadir-0"</expected-output>
  6227. </comparator>
  6228. </comparators>
  6229. </test>
  6230. <test> <!-- TESTED -->
  6231. <description>stat: Test for Namenode's path - statistics about file or directory that does not exist</description>
  6232. <test-commands>
  6233. <command>-fs NAMENODE -stat NAMENODE/file</command>
  6234. </test-commands>
  6235. <cleanup-commands>
  6236. </cleanup-commands>
  6237. <comparators>
  6238. <comparator>
  6239. <type>RegexpComparator</type>
  6240. <expected-output>^stat: `hdfs://\w+[-.a-z0-9]*:[0-9]+/file': No such file or directory</expected-output>
  6241. </comparator>
  6242. </comparators>
  6243. </test>
  6244. <!-- Tests for tail -->
  6245. <test> <!-- TESTED -->
  6246. <description>tail: contents of file(absolute path)</description>
  6247. <test-commands>
  6248. <command>-fs NAMENODE -put CLITEST_DATA/data15bytes /data15bytes</command>
  6249. <command>-fs NAMENODE -tail /data15bytes</command>
  6250. </test-commands>
  6251. <cleanup-commands>
  6252. <command>-fs NAMENODE -rm /user</command>
  6253. </cleanup-commands>
  6254. <comparators>
  6255. <comparator>
  6256. <type>TokenComparator</type>
  6257. <expected-output>12345678901234</expected-output>
  6258. </comparator>
  6259. </comparators>
  6260. </test>
  6261. <test> <!--TESTED-->
  6262. <description>tail: contents of file(relative path)</description>
  6263. <test-commands>
  6264. <command>-fs NAMENODE -touchz test</command>
  6265. <command>-fs NAMENODE -put CLITEST_DATA/data15bytes data15bytes</command>
  6266. <command>-fs NAMENODE -tail data15bytes</command>
  6267. </test-commands>
  6268. <cleanup-commands>
  6269. <command>-fs NAMENODE -rm -r /user</command>
  6270. </cleanup-commands>
  6271. <comparators>
  6272. <comparator>
  6273. <type>TokenComparator</type>
  6274. <expected-output>12345678901234</expected-output>
  6275. </comparator>
  6276. </comparators>
  6277. </test>
  6278. <test> <!-- TESTED -->
  6279. <description>tail: contents of files(absolute path) using globbing</description>
  6280. <test-commands>
  6281. <command>-fs NAMENODE -touchz /file1</command>
  6282. <command>-fs NAMENODE -touchz /file2</command>
  6283. <command>-fs NAMENODE -touchz /file3</command>
  6284. <command>-fs NAMENODE -touchz /file4</command>
  6285. <command>-fs NAMENODE -tail /file*</command>
  6286. </test-commands>
  6287. <cleanup-commands>
  6288. <command>-fs NAMENODE -rm -r /user</command>
  6289. </cleanup-commands>
  6290. <comparators>
  6291. <comparator>
  6292. <type>RegexpComparator</type>
  6293. <expected-output>^tail: `/file\*': No such file or directory</expected-output>
  6294. </comparator>
  6295. </comparators>
  6296. </test>
  6297. <test> <!-- TESTED -->
  6298. <description>tail: contents of files(relative path) using globbing</description>
  6299. <test-commands>
  6300. <command>-fs NAMENODE -touchz file1</command>
  6301. <command>-fs NAMENODE -touchz file2</command>
  6302. <command>-fs NAMENODE -touchz file3</command>
  6303. <command>-fs NAMENODE -touchz file4</command>
  6304. <command>-fs NAMENODE -tail file*</command>
  6305. </test-commands>
  6306. <cleanup-commands>
  6307. <command>-fs NAMENODE -rm -r /user</command>
  6308. </cleanup-commands>
  6309. <comparators>
  6310. <comparator>
  6311. <type>RegexpComparator</type>
  6312. <expected-output>^tail: `file\*': No such file or directory</expected-output>
  6313. </comparator>
  6314. </comparators>
  6315. </test>
  6316. <test> <!-- TESTED -->
  6317. <description>tail: contents of file(absolute path) that does not exist</description>
  6318. <test-commands>
  6319. <command>-fs NAMENODE -tail /file</command>
  6320. </test-commands>
  6321. <cleanup-commands>
  6322. </cleanup-commands>
  6323. <comparators>
  6324. <comparator>
  6325. <type>RegexpComparator</type>
  6326. <expected-output>^tail: `/file': No such file or directory</expected-output>
  6327. </comparator>
  6328. </comparators>
  6329. </test>
  6330. <test> <!-- TESTED -->
  6331. <description>tail: contents of file(relative path) that does not exist</description>
  6332. <test-commands>
  6333. <command>-fs NAMENODE -tail file1</command>
  6334. </test-commands>
  6335. <cleanup-commands>
  6336. </cleanup-commands>
  6337. <comparators>
  6338. <comparator>
  6339. <type>RegexpComparator</type>
  6340. <expected-output>^tail: `file1': No such file or directory</expected-output>
  6341. </comparator>
  6342. </comparators>
  6343. </test>
  6344. <test> <!-- TESTED -->
  6345. <description>tail: contents of directory(absolute path) </description>
  6346. <test-commands>
  6347. <command>-fs NAMENODE -mkdir /dir1</command>
  6348. <command>-fs NAMENODE -tail /dir1</command>
  6349. </test-commands>
  6350. <cleanup-commands>
  6351. <command>-fs NAMENODE -rm -r /dir1</command>
  6352. </cleanup-commands>
  6353. <comparators>
  6354. <comparator>
  6355. <type>RegexpComparator</type>
  6356. <expected-output>^tail: `/dir1': Is a directory</expected-output>
  6357. </comparator>
  6358. </comparators>
  6359. </test>
  6360. <test> <!-- TESTED -->
  6361. <description>tail: contents of directory(relative path)</description>
  6362. <test-commands>
  6363. <command>-fs NAMENODE -mkdir dir1</command>
  6364. <command>-fs NAMENODE -tail dir1</command>
  6365. </test-commands>
  6366. <cleanup-commands>
  6367. <command>-fs NAMENODE -rm -r dir1</command>
  6368. </cleanup-commands>
  6369. <comparators>
  6370. <comparator>
  6371. <type>RegexpComparator</type>
  6372. <expected-output>^tail: `dir1': Is a directory</expected-output>
  6373. </comparator>
  6374. </comparators>
  6375. </test>
  6376. <test> <!-- TESTED -->
  6377. <description>tail: Test for hdfs:// path - contents of file</description>
  6378. <test-commands>
  6379. <command>-fs NAMENODE -put CLITEST_DATA/data15bytes hdfs:///data15bytes</command>
  6380. <command>-fs NAMENODE -tail hdfs:///data15bytes</command>
  6381. </test-commands>
  6382. <cleanup-commands>
  6383. <command>-fs NAMENODE -rm hdfs:///*</command>
  6384. </cleanup-commands>
  6385. <comparators>
  6386. <comparator>
  6387. <type>TokenComparator</type>
  6388. <expected-output>12345678901234</expected-output>
  6389. </comparator>
  6390. </comparators>
  6391. </test>
  6392. <test> <!-- TESTED -->
  6393. <description>tail: Test for hdfs:// path - contents of files using globbing</description>
  6394. <test-commands>
  6395. <command>-fs NAMENODE -touchz hdfs:///file1</command>
  6396. <command>-fs NAMENODE -touchz hdfs:///file2</command>
  6397. <command>-fs NAMENODE -touchz hdfs:///file3</command>
  6398. <command>-fs NAMENODE -touchz hdfs:///file4</command>
  6399. <command>-fs NAMENODE -tail hdfs:///file*</command>
  6400. </test-commands>
  6401. <cleanup-commands>
  6402. <command>-fs NAMENODE -rm -r hdfs:///*</command>
  6403. </cleanup-commands>
  6404. <comparators>
  6405. <comparator>
  6406. <type>RegexpComparator</type>
  6407. <expected-output>^tail: `hdfs:///file\*': No such file or directory</expected-output>
  6408. </comparator>
  6409. </comparators>
  6410. </test>
  6411. <test> <!-- TESTED -->
  6412. <description>tail: Test for hdfs:// path - contents of file that does not exist</description>
  6413. <test-commands>
  6414. <command>-fs NAMENODE -tail hdfs:///file</command>
  6415. </test-commands>
  6416. <cleanup-commands>
  6417. </cleanup-commands>
  6418. <comparators>
  6419. <comparator>
  6420. <type>RegexpComparator</type>
  6421. <expected-output>^tail: `hdfs:///file': No such file or directory</expected-output>
  6422. </comparator>
  6423. </comparators>
  6424. </test>
  6425. <test> <!-- TESTED -->
  6426. <description>tail: Test for hdfs:// path - contents of directory</description>
  6427. <test-commands>
  6428. <command>-fs NAMENODE -mkdir hdfs:///dir1</command>
  6429. <command>-fs NAMENODE -tail hdfs:///dir1</command>
  6430. </test-commands>
  6431. <cleanup-commands>
  6432. <command>-fs NAMENODE -rm -r hdfs:///dir1</command>
  6433. </cleanup-commands>
  6434. <comparators>
  6435. <comparator>
  6436. <type>RegexpComparator</type>
  6437. <expected-output>^tail: `hdfs:///dir1': Is a directory</expected-output>
  6438. </comparator>
  6439. </comparators>
  6440. </test>
  6441. <test> <!-- TESTED -->
  6442. <description>tail: Test for Namenode's path - contents of file</description>
  6443. <test-commands>
  6444. <command>-fs NAMENODE -put CLITEST_DATA/data15bytes NAMENODE/data15bytes</command>
  6445. <command>-fs NAMENODE -tail NAMENODE/data15bytes</command>
  6446. </test-commands>
  6447. <cleanup-commands>
  6448. <command>-fs NAMENODE -rm NAMENODE/*</command>
  6449. </cleanup-commands>
  6450. <comparators>
  6451. <comparator>
  6452. <type>TokenComparator</type>
  6453. <expected-output>12345678901234</expected-output>
  6454. </comparator>
  6455. </comparators>
  6456. </test>
  6457. <test> <!-- TESTED -->
  6458. <description>tail: Test for Namenode's path - contents of files using globbing</description>
  6459. <test-commands>
  6460. <command>-fs NAMENODE -touchz NAMENODE/file1</command>
  6461. <command>-fs NAMENODE -touchz NAMENODE/file2</command>
  6462. <command>-fs NAMENODE -touchz NAMENODE/file3</command>
  6463. <command>-fs NAMENODE -touchz NAMENODE/file4</command>
  6464. <command>-fs NAMENODE -tail NAMENODE/file*</command>
  6465. </test-commands>
  6466. <cleanup-commands>
  6467. <command>-fs NAMENODE -rm -r NAMENODE/*</command>
  6468. </cleanup-commands>
  6469. <comparators>
  6470. <comparator>
  6471. <type>RegexpComparator</type>
  6472. <expected-output>^tail: `hdfs://\w+[-.a-z0-9]*:[0-9]+/file\*': No such file or directory</expected-output>
  6473. </comparator>
  6474. </comparators>
  6475. </test>
  6476. <test> <!-- TESTED -->
  6477. <description>tail: Test for Namenode's path - contents of file that does not exist</description>
  6478. <test-commands>
  6479. <command>-fs NAMENODE -tail NAMENODE/file</command>
  6480. </test-commands>
  6481. <cleanup-commands>
  6482. </cleanup-commands>
  6483. <comparators>
  6484. <comparator>
  6485. <type>RegexpComparator</type>
  6486. <expected-output>^tail: `hdfs://\w+[-.a-z0-9]*:[0-9]+/file': No such file or directory</expected-output>
  6487. </comparator>
  6488. </comparators>
  6489. </test>
  6490. <test> <!-- TESTED -->
  6491. <description>tail: Test for Namenode's path - contents of directory</description>
  6492. <test-commands>
  6493. <command>-fs NAMENODE -mkdir NAMENODE/dir1</command>
  6494. <command>-fs NAMENODE -tail NAMENODE/dir1</command>
  6495. </test-commands>
  6496. <cleanup-commands>
  6497. <command>-fs NAMENODE -rm -r NAMENODE/dir1</command>
  6498. </cleanup-commands>
  6499. <comparators>
  6500. <comparator>
  6501. <type>RegexpComparator</type>
  6502. <expected-output>^tail: `hdfs://\w+[-.a-z0-9]*:[0-9]+/dir1': Is a directory</expected-output>
  6503. </comparator>
  6504. </comparators>
  6505. </test>
  6506. <!-- Tests for count -->
  6507. <test> <!-- TESTED -->
  6508. <description>count: file using absolute path</description>
  6509. <test-commands>
  6510. <command>-fs NAMENODE -touchz /file1</command>
  6511. <command>-fs NAMENODE -count /file1</command>
  6512. </test-commands>
  6513. <cleanup-commands>
  6514. <command>-fs NAMENODE -rm /file1</command>
  6515. </cleanup-commands>
  6516. <comparators>
  6517. <comparator>
  6518. <type>RegexpComparator</type>
  6519. <expected-output>( |\t)*0( |\t)*1( |\t)*0 /file1</expected-output>
  6520. </comparator>
  6521. </comparators>
  6522. </test>
  6523. <test> <!-- TESTED -->
  6524. <description>count: file using relative path</description>
  6525. <test-commands>
  6526. <command>-fs NAMENODE -touchz file1</command>
  6527. <command>-fs NAMENODE -count file1</command>
  6528. </test-commands>
  6529. <cleanup-commands>
  6530. <command>-fs NAMENODE -rm file1</command>
  6531. </cleanup-commands>
  6532. <comparators>
  6533. <comparator>
  6534. <type>RegexpComparator</type>
  6535. <expected-output>( |\t)*0( |\t)*1( |\t)*0 file1</expected-output>
  6536. </comparator>
  6537. </comparators>
  6538. </test>
  6539. <test> <!-- TESTED -->
  6540. <description>count: directory using absolute path</description>
  6541. <test-commands>
  6542. <command>-fs NAMENODE -mkdir /dir1</command>
  6543. <command>-fs NAMENODE -count /dir1</command>
  6544. </test-commands>
  6545. <cleanup-commands>
  6546. <command>-fs NAMENODE -rm -r /dir1</command>
  6547. </cleanup-commands>
  6548. <comparators>
  6549. <comparator>
  6550. <type>RegexpComparator</type>
  6551. <expected-output>( |\t)*1( |\t)*0( |\t)*0 /dir1</expected-output>
  6552. </comparator>
  6553. </comparators>
  6554. </test>
  6555. <test> <!-- TESTED -->
  6556. <description>count: directory using relative path</description>
  6557. <test-commands>
  6558. <command>-fs NAMENODE -mkdir dir1</command>
  6559. <command>-fs NAMENODE -count dir1</command>
  6560. </test-commands>
  6561. <cleanup-commands>
  6562. <command>-fs NAMENODE -rm -r dir1</command>
  6563. </cleanup-commands>
  6564. <comparators>
  6565. <comparator>
  6566. <type>RegexpComparator</type>
  6567. <expected-output>( |\t)*1( |\t)*0( |\t)*0 dir1</expected-output>
  6568. </comparator>
  6569. </comparators>
  6570. </test>
  6571. <test> <!-- TESTED -->
  6572. <description>count: absolute path to file/directory that does not exist</description>
  6573. <test-commands>
  6574. <command>-fs NAMENODE -count /file1 </command>
  6575. </test-commands>
  6576. <cleanup-commands>
  6577. </cleanup-commands>
  6578. <comparators>
  6579. <comparator>
  6580. <type>TokenComparator</type>
  6581. <expected-output>count: `/file1': No such file or directory</expected-output>
  6582. </comparator>
  6583. </comparators>
  6584. </test>
  6585. <test> <!-- TESTED -->
  6586. <description>count: relative path to file/directory that does not exist</description>
  6587. <test-commands>
  6588. <command>-fs NAMENODE -count file1</command>
  6589. </test-commands>
  6590. <cleanup-commands>
  6591. </cleanup-commands>
  6592. <comparators>
  6593. <comparator>
  6594. <type>TokenComparator</type>
  6595. <expected-output>count: `file1': No such file or directory</expected-output>
  6596. </comparator>
  6597. </comparators>
  6598. </test>
  6599. <test> <!-- TESTED -->
  6600. <description>count: absolute path to multiple files using globbing</description>
  6601. <test-commands>
  6602. <command>-fs NAMENODE -touchz /file1</command>
  6603. <command>-fs NAMENODE -touchz /file2</command>
  6604. <command>-fs NAMENODE -touchz /file3</command>
  6605. <command>-fs NAMENODE -touchz /file4</command>
  6606. <command>-fs NAMENODE -count /file*</command>
  6607. </test-commands>
  6608. <cleanup-commands>
  6609. <command>-fs NAMENODE -rm -r /file*</command>
  6610. </cleanup-commands>
  6611. <comparators>
  6612. <comparator>
  6613. <type>RegexpComparator</type>
  6614. <expected-output>( |\t)*0( |\t)*1( |\t)*0 /file1</expected-output>
  6615. </comparator>
  6616. <comparator>
  6617. <type>RegexpComparator</type>
  6618. <expected-output>( |\t)*0( |\t)*1( |\t)*0 /file2</expected-output>
  6619. </comparator>
  6620. <comparator>
  6621. <type>RegexpComparator</type>
  6622. <expected-output>( |\t)*0( |\t)*1( |\t)*0 /file3</expected-output>
  6623. </comparator>
  6624. <comparator>
  6625. <type>RegexpComparator</type>
  6626. <expected-output>( |\t)*0( |\t)*1( |\t)*0 /file4</expected-output>
  6627. </comparator>
  6628. </comparators>
  6629. </test>
  6630. <test> <!-- TESTED -->
  6631. <description>count: relative path to multiple files using globbing</description>
  6632. <test-commands>
  6633. <command>-fs NAMENODE -touchz file1</command>
  6634. <command>-fs NAMENODE -touchz file2</command>
  6635. <command>-fs NAMENODE -touchz file3</command>
  6636. <command>-fs NAMENODE -touchz file4</command>
  6637. <command>-fs NAMENODE -count file*</command>
  6638. </test-commands>
  6639. <cleanup-commands>
  6640. <command>-fs NAMENODE -rm -r /user</command>
  6641. </cleanup-commands>
  6642. <comparators>
  6643. <comparator>
  6644. <type>RegexpComparator</type>
  6645. <expected-output>( |\t)*0( |\t)*1( |\t)*0 file1</expected-output>
  6646. </comparator>
  6647. <comparator>
  6648. <type>RegexpComparator</type>
  6649. <expected-output>( |\t)*0( |\t)*1( |\t)*0 file2</expected-output>
  6650. </comparator>
  6651. <comparator>
  6652. <type>RegexpComparator</type>
  6653. <expected-output>( |\t)*0( |\t)*1( |\t)*0 file3</expected-output>
  6654. </comparator>
  6655. <comparator>
  6656. <type>RegexpComparator</type>
  6657. <expected-output>( |\t)*0( |\t)*1( |\t)*0 file4</expected-output>
  6658. </comparator>
  6659. </comparators>
  6660. </test>
  6661. <test> <!-- TESTED -->
  6662. <description>count: absolute path to multiple files without globbing</description>
  6663. <test-commands>
  6664. <command>-fs NAMENODE -touchz /file1</command>
  6665. <command>-fs NAMENODE -touchz /file2</command>
  6666. <command>-fs NAMENODE -touchz /file3</command>
  6667. <command>-fs NAMENODE -touchz /file4</command>
  6668. <command>-fs NAMENODE -count /file1 /file2 /file3 /file4</command>
  6669. </test-commands>
  6670. <cleanup-commands>
  6671. <command>-fs NAMENODE -rm -r /file*</command>
  6672. </cleanup-commands>
  6673. <comparators>
  6674. <comparator>
  6675. <type>RegexpComparator</type>
  6676. <expected-output>( |\t)*0( |\t)*1( |\t)*0 /file1</expected-output>
  6677. </comparator>
  6678. <comparator>
  6679. <type>RegexpComparator</type>
  6680. <expected-output>( |\t)*0( |\t)*1( |\t)*0 /file2</expected-output>
  6681. </comparator>
  6682. <comparator>
  6683. <type>RegexpComparator</type>
  6684. <expected-output>( |\t)*0( |\t)*1( |\t)*0 /file3</expected-output>
  6685. </comparator>
  6686. <comparator>
  6687. <type>RegexpComparator</type>
  6688. <expected-output>( |\t)*0( |\t)*1( |\t)*0 /file4</expected-output>
  6689. </comparator>
  6690. </comparators>
  6691. </test>
  6692. <test> <!-- TESTED -->
  6693. <description>count: relative path to multiple files without globbing</description>
  6694. <test-commands>
  6695. <command>-fs NAMENODE -touchz file1</command>
  6696. <command>-fs NAMENODE -touchz file2</command>
  6697. <command>-fs NAMENODE -touchz file3</command>
  6698. <command>-fs NAMENODE -touchz file4</command>
  6699. <command>-fs NAMENODE -count file1 file2 file3 file4</command>
  6700. </test-commands>
  6701. <cleanup-commands>
  6702. <command>-fs NAMENODE -rm -r /user</command>
  6703. </cleanup-commands>
  6704. <comparators>
  6705. <comparator>
  6706. <type>RegexpComparator</type>
  6707. <expected-output>( |\t)*0( |\t)*1( |\t)*0 file1</expected-output>
  6708. </comparator>
  6709. <comparator>
  6710. <type>RegexpComparator</type>
  6711. <expected-output>( |\t)*0( |\t)*1( |\t)*0 file2</expected-output>
  6712. </comparator>
  6713. <comparator>
  6714. <type>RegexpComparator</type>
  6715. <expected-output>( |\t)*0( |\t)*1( |\t)*0 file3</expected-output>
  6716. </comparator>
  6717. <comparator>
  6718. <type>RegexpComparator</type>
  6719. <expected-output>( |\t)*0( |\t)*1( |\t)*0 file4</expected-output>
  6720. </comparator>
  6721. </comparators>
  6722. </test>
  6723. <test> <!-- TESTED -->
  6724. <description>count: absolute path to multiple directories using globbing</description>
  6725. <test-commands>
  6726. <command>-fs NAMENODE -mkdir /dir1</command>
  6727. <command>-fs NAMENODE -mkdir /dir2</command>
  6728. <command>-fs NAMENODE -mkdir /dir3</command>
  6729. <command>-fs NAMENODE -mkdir /dir4</command>
  6730. <command>-fs NAMENODE -count /dir* </command>
  6731. </test-commands>
  6732. <cleanup-commands>
  6733. <command>-fs NAMENODE -rm -r /dir*</command>
  6734. </cleanup-commands>
  6735. <comparators>
  6736. <comparator>
  6737. <type>RegexpComparator</type>
  6738. <expected-output>( |\t)*1( |\t)*0( |\t)*0 /dir1</expected-output>
  6739. </comparator>
  6740. <comparator>
  6741. <type>RegexpComparator</type>
  6742. <expected-output>( |\t)*1( |\t)*0( |\t)*0 /dir2</expected-output>
  6743. </comparator>
  6744. <comparator>
  6745. <type>RegexpComparator</type>
  6746. <expected-output>( |\t)*1( |\t)*0( |\t)*0 /dir3</expected-output>
  6747. </comparator>
  6748. <comparator>
  6749. <type>RegexpComparator</type>
  6750. <expected-output>( |\t)*1( |\t)*0( |\t)*0 /dir4</expected-output>
  6751. </comparator>
  6752. </comparators>
  6753. </test>
  6754. <test> <!-- TESTED -->
  6755. <description>count: relative path to multiple directories using globbing</description>
  6756. <test-commands>
  6757. <command>-fs NAMENODE -mkdir dir1</command>
  6758. <command>-fs NAMENODE -mkdir dir2</command>
  6759. <command>-fs NAMENODE -mkdir dir3</command>
  6760. <command>-fs NAMENODE -mkdir dir4</command>
  6761. <command>-fs NAMENODE -count dir* </command>
  6762. </test-commands>
  6763. <cleanup-commands>
  6764. <command>-fs NAMENODE -rm -r /user</command>
  6765. </cleanup-commands>
  6766. <comparators>
  6767. <comparator>
  6768. <type>RegexpComparator</type>
  6769. <expected-output>( |\t)*1( |\t)*0( |\t)*0 dir1</expected-output>
  6770. </comparator>
  6771. <comparator>
  6772. <type>RegexpComparator</type>
  6773. <expected-output>( |\t)*1( |\t)*0( |\t)*0 dir2</expected-output>
  6774. </comparator>
  6775. <comparator>
  6776. <type>RegexpComparator</type>
  6777. <expected-output>( |\t)*1( |\t)*0( |\t)*0 dir3</expected-output>
  6778. </comparator>
  6779. <comparator>
  6780. <type>RegexpComparator</type>
  6781. <expected-output>( |\t)*1( |\t)*0( |\t)*0 dir4</expected-output>
  6782. </comparator>
  6783. </comparators>
  6784. </test>
  6785. <test> <!-- TESTED -->
  6786. <description>count: absolute path to multiple directories without globbing</description>
  6787. <test-commands>
  6788. <command>-fs NAMENODE -mkdir /dir1</command>
  6789. <command>-fs NAMENODE -mkdir /dir2</command>
  6790. <command>-fs NAMENODE -mkdir /dir3</command>
  6791. <command>-fs NAMENODE -mkdir /dir4</command>
  6792. <command>-fs NAMENODE -count /dir1 /dir2 /dir3 /dir4 </command>
  6793. </test-commands>
  6794. <cleanup-commands>
  6795. <command>-fs NAMENODE -rm -r /dir*</command>
  6796. </cleanup-commands>
  6797. <comparators>
  6798. <comparator>
  6799. <type>RegexpComparator</type>
  6800. <expected-output>( |\t)*1( |\t)*0( |\t)*0 /dir1</expected-output>
  6801. </comparator>
  6802. <comparator>
  6803. <type>RegexpComparator</type>
  6804. <expected-output>( |\t)*1( |\t)*0( |\t)*0 /dir2</expected-output>
  6805. </comparator>
  6806. <comparator>
  6807. <type>RegexpComparator</type>
  6808. <expected-output>( |\t)*1( |\t)*0( |\t)*0 /dir3</expected-output>
  6809. </comparator>
  6810. <comparator>
  6811. <type>RegexpComparator</type>
  6812. <expected-output>( |\t)*1( |\t)*0( |\t)*0 /dir4</expected-output>
  6813. </comparator>
  6814. </comparators>
  6815. </test>
  6816. <test> <!-- TESTED -->
  6817. <description>count: relative path to multiple directories without globbing</description>
  6818. <test-commands>
  6819. <command>-fs NAMENODE -mkdir dir1</command>
  6820. <command>-fs NAMENODE -mkdir dir2</command>
  6821. <command>-fs NAMENODE -mkdir dir3</command>
  6822. <command>-fs NAMENODE -mkdir dir4</command>
  6823. <command>-fs NAMENODE -count dir1 dir2 dir3 dir4 </command>
  6824. </test-commands>
  6825. <cleanup-commands>
  6826. <command>-fs NAMENODE -rm -r /user</command>
  6827. </cleanup-commands>
  6828. <comparators>
  6829. <comparator>
  6830. <type>RegexpComparator</type>
  6831. <expected-output>( |\t)*1( |\t)*0( |\t)*0 dir1</expected-output>
  6832. </comparator>
  6833. <comparator>
  6834. <type>RegexpComparator</type>
  6835. <expected-output>( |\t)*1( |\t)*0( |\t)*0 dir2</expected-output>
  6836. </comparator>
  6837. <comparator>
  6838. <type>RegexpComparator</type>
  6839. <expected-output>( |\t)*1( |\t)*0( |\t)*0 dir3</expected-output>
  6840. </comparator>
  6841. <comparator>
  6842. <type>RegexpComparator</type>
  6843. <expected-output>( |\t)*1( |\t)*0( |\t)*0 dir4</expected-output>
  6844. </comparator>
  6845. </comparators>
  6846. </test>
  6847. <test> <!-- TESTED -->
  6848. <description>count: file using absolute path with -q option</description>
  6849. <test-commands>
  6850. <command>-fs NAMENODE -touchz /file1</command>
  6851. <command>-fs NAMENODE -count -q /file1</command>
  6852. </test-commands>
  6853. <cleanup-commands>
  6854. <command>-fs NAMENODE -rm /file1</command>
  6855. </cleanup-commands>
  6856. <comparators>
  6857. <comparator>
  6858. <type>RegexpComparator</type>
  6859. <expected-output>( |\t)*none( |\t)*inf( |\t)*none( |\t)*inf( |\t)*0( |\t)*1( |\t)*0 /file1</expected-output>
  6860. </comparator>
  6861. </comparators>
  6862. </test>
  6863. <test> <!-- TESTED -->
  6864. <description>count: file using relative path with -q option</description>
  6865. <test-commands>
  6866. <command>-fs NAMENODE -touchz file1</command>
  6867. <command>-fs NAMENODE -count -q file1</command>
  6868. </test-commands>
  6869. <cleanup-commands>
  6870. <command>-fs NAMENODE -rm file1</command>
  6871. </cleanup-commands>
  6872. <comparators>
  6873. <comparator>
  6874. <type>RegexpComparator</type>
  6875. <expected-output>( |\t)*none( |\t)*inf( |\t)*none( |\t)*inf( |\t)*0( |\t)*1( |\t)*0 file1</expected-output>
  6876. </comparator>
  6877. </comparators>
  6878. </test>
  6879. <test> <!-- TESTED -->
  6880. <description>count: directory using absolute path with -q option</description>
  6881. <test-commands>
  6882. <command>-fs NAMENODE -mkdir /dir1</command>
  6883. <dfs-admin-command>-fs NAMENODE -setQuota 10 /dir1 </dfs-admin-command>
  6884. <dfs-admin-command>-fs NAMENODE -setSpaceQuota 1m /dir1 </dfs-admin-command>
  6885. <command>-fs NAMENODE -count -q /dir1</command>
  6886. </test-commands>
  6887. <cleanup-commands>
  6888. <command>-fs NAMENODE -rm -r /dir1</command>
  6889. </cleanup-commands>
  6890. <comparators>
  6891. <comparator>
  6892. <type>RegexpComparator</type>
  6893. <expected-output>( |\t)*10( |\t)*9( |\t)*1048576( |\t)*1048576( |\t)*1( |\t)*0( |\t)*0 /dir1</expected-output>
  6894. </comparator>
  6895. </comparators>
  6896. </test>
  6897. <test> <!-- TESTED -->
  6898. <description>count: directory using relative path with -q option</description>
  6899. <test-commands>
  6900. <command>-fs NAMENODE -mkdir dir1</command>
  6901. <dfs-admin-command>-fs NAMENODE -setQuota 10 dir1 </dfs-admin-command>
  6902. <dfs-admin-command>-fs NAMENODE -setSpaceQuota 1m dir1 </dfs-admin-command>
  6903. <command>-fs NAMENODE -count -q dir1</command>
  6904. </test-commands>
  6905. <cleanup-commands>
  6906. <command>-fs NAMENODE -rm -r dir1</command>
  6907. </cleanup-commands>
  6908. <comparators>
  6909. <comparator>
  6910. <type>RegexpComparator</type>
  6911. <expected-output>( |\t)*10( |\t)*9( |\t)*1048576( |\t)*1048576( |\t)*1( |\t)*0( |\t)*0 dir1</expected-output>
  6912. </comparator>
  6913. </comparators>
  6914. </test>
  6915. <test> <!-- TESTED -->
  6916. <description>count: absolute path to file/directory that does not exist with -q option</description>
  6917. <test-commands>
  6918. <command>-fs NAMENODE -count -q /file1 </command>
  6919. </test-commands>
  6920. <cleanup-commands>
  6921. </cleanup-commands>
  6922. <comparators>
  6923. <comparator>
  6924. <type>TokenComparator</type>
  6925. <expected-output>count: `/file1': No such file or directory</expected-output>
  6926. </comparator>
  6927. </comparators>
  6928. </test>
  6929. <test> <!-- TESTED -->
  6930. <description>count: relative path to file/directory that does not exist with -q option</description>
  6931. <test-commands>
  6932. <command>-fs NAMENODE -count -q file1</command>
  6933. </test-commands>
  6934. <cleanup-commands>
  6935. </cleanup-commands>
  6936. <comparators>
  6937. <comparator>
  6938. <type>TokenComparator</type>
  6939. <expected-output>count: `file1': No such file or directory</expected-output>
  6940. </comparator>
  6941. </comparators>
  6942. </test>
  6943. <test> <!-- TESTED -->
  6944. <description>count: absolute path to multiple files using globbing with -q option</description>
  6945. <test-commands>
  6946. <command>-fs NAMENODE -touchz /file1</command>
  6947. <command>-fs NAMENODE -touchz /file2</command>
  6948. <command>-fs NAMENODE -touchz /file3</command>
  6949. <command>-fs NAMENODE -touchz /file4</command>
  6950. <command>-fs NAMENODE -count -q /file*</command>
  6951. </test-commands>
  6952. <cleanup-commands>
  6953. <command>-fs NAMENODE -rm -r /file*</command>
  6954. </cleanup-commands>
  6955. <comparators>
  6956. <comparator>
  6957. <type>RegexpComparator</type>
  6958. <expected-output>( |\t)*none( |\t)*inf( |\t)*none( |\t)*inf( |\t)*0( |\t)*1( |\t)*0 /file1</expected-output>
  6959. </comparator>
  6960. <comparator>
  6961. <type>RegexpComparator</type>
  6962. <expected-output>( |\t)*none( |\t)*inf( |\t)*none( |\t)*inf( |\t)*0( |\t)*1( |\t)*0 /file2</expected-output>
  6963. </comparator>
  6964. <comparator>
  6965. <type>RegexpComparator</type>
  6966. <expected-output>( |\t)*none( |\t)*inf( |\t)*none( |\t)*inf( |\t)*0( |\t)*1( |\t)*0 /file3</expected-output>
  6967. </comparator>
  6968. <comparator>
  6969. <type>RegexpComparator</type>
  6970. <expected-output>( |\t)*none( |\t)*inf( |\t)*none( |\t)*inf( |\t)*0( |\t)*1( |\t)*0 /file4</expected-output>
  6971. </comparator>
  6972. </comparators>
  6973. </test>
  6974. <test> <!-- TESTED -->
  6975. <description>count: relative path to multiple files using globbing with -q option</description>
  6976. <test-commands>
  6977. <command>-fs NAMENODE -touchz file1</command>
  6978. <command>-fs NAMENODE -touchz file2</command>
  6979. <command>-fs NAMENODE -touchz file3</command>
  6980. <command>-fs NAMENODE -touchz file4</command>
  6981. <command>-fs NAMENODE -count -q file*</command>
  6982. </test-commands>
  6983. <cleanup-commands>
  6984. <command>-fs NAMENODE -rm -r /user</command>
  6985. </cleanup-commands>
  6986. <comparators>
  6987. <comparator>
  6988. <type>RegexpComparator</type>
  6989. <expected-output>( |\t)*none( |\t)*inf( |\t)*none( |\t)*inf( |\t)*0( |\t)*1( |\t)*0 file1</expected-output>
  6990. </comparator>
  6991. <comparator>
  6992. <type>RegexpComparator</type>
  6993. <expected-output>( |\t)*none( |\t)*inf( |\t)*none( |\t)*inf( |\t)*0( |\t)*1( |\t)*0 file2</expected-output>
  6994. </comparator>
  6995. <comparator>
  6996. <type>RegexpComparator</type>
  6997. <expected-output>( |\t)*none( |\t)*inf( |\t)*none( |\t)*inf( |\t)*0( |\t)*1( |\t)*0 file3</expected-output>
  6998. </comparator>
  6999. <comparator>
  7000. <type>RegexpComparator</type>
  7001. <expected-output>( |\t)*none( |\t)*inf( |\t)*none( |\t)*inf( |\t)*0( |\t)*1( |\t)*0 file4</expected-output>
  7002. </comparator>
  7003. </comparators>
  7004. </test>
  7005. <test> <!-- TESTED -->
  7006. <description>count: absolute path to multiple files without globbing with -q option</description>
  7007. <test-commands>
  7008. <command>-fs NAMENODE -touchz /file1</command>
  7009. <command>-fs NAMENODE -touchz /file2</command>
  7010. <command>-fs NAMENODE -touchz /file3</command>
  7011. <command>-fs NAMENODE -touchz /file4</command>
  7012. <command>-fs NAMENODE -count -q /file1 /file2 /file3 /file4</command>
  7013. </test-commands>
  7014. <cleanup-commands>
  7015. <command>-fs NAMENODE -rm -r /file*</command>
  7016. </cleanup-commands>
  7017. <comparators>
  7018. <comparator>
  7019. <type>RegexpComparator</type>
  7020. <expected-output>( |\t)*none( |\t)*inf( |\t)*none( |\t)*inf( |\t)*0( |\t)*1( |\t)*0 /file1</expected-output>
  7021. </comparator>
  7022. <comparator>
  7023. <type>RegexpComparator</type>
  7024. <expected-output>( |\t)*none( |\t)*inf( |\t)*none( |\t)*inf( |\t)*0( |\t)*1( |\t)*0 /file2</expected-output>
  7025. </comparator>
  7026. <comparator>
  7027. <type>RegexpComparator</type>
  7028. <expected-output>( |\t)*none( |\t)*inf( |\t)*none( |\t)*inf( |\t)*0( |\t)*1( |\t)*0 /file3</expected-output>
  7029. </comparator>
  7030. <comparator>
  7031. <type>RegexpComparator</type>
  7032. <expected-output>( |\t)*none( |\t)*inf( |\t)*none( |\t)*inf( |\t)*0( |\t)*1( |\t)*0 /file4</expected-output>
  7033. </comparator>
  7034. </comparators>
  7035. </test>
  7036. <test> <!-- TESTED -->
  7037. <description>count: relative path to multiple files without globbing with -q option</description>
  7038. <test-commands>
  7039. <command>-fs NAMENODE -touchz file1</command>
  7040. <command>-fs NAMENODE -touchz file2</command>
  7041. <command>-fs NAMENODE -touchz file3</command>
  7042. <command>-fs NAMENODE -touchz file4</command>
  7043. <command>-fs NAMENODE -count -q file1 file2 file3 file4</command>
  7044. </test-commands>
  7045. <cleanup-commands>
  7046. <command>-fs NAMENODE -rm -r /user</command>
  7047. </cleanup-commands>
  7048. <comparators>
  7049. <comparator>
  7050. <type>RegexpComparator</type>
  7051. <expected-output>( |\t)*none( |\t)*inf( |\t)*none( |\t)*inf( |\t)*0( |\t)*1( |\t)*0 file1</expected-output>
  7052. </comparator>
  7053. <comparator>
  7054. <type>RegexpComparator</type>
  7055. <expected-output>( |\t)*none( |\t)*inf( |\t)*none( |\t)*inf( |\t)*0( |\t)*1( |\t)*0 file2</expected-output>
  7056. </comparator>
  7057. <comparator>
  7058. <type>RegexpComparator</type>
  7059. <expected-output>( |\t)*none( |\t)*inf( |\t)*none( |\t)*inf( |\t)*0( |\t)*1( |\t)*0 file3</expected-output>
  7060. </comparator>
  7061. <comparator>
  7062. <type>RegexpComparator</type>
  7063. <expected-output>( |\t)*none( |\t)*inf( |\t)*none( |\t)*inf( |\t)*0( |\t)*1( |\t)*0 file4</expected-output>
  7064. </comparator>
  7065. </comparators>
  7066. </test>
  7067. <test> <!-- TESTED -->
  7068. <description>count: absolute path to multiple directories using globbing with -q option</description>
  7069. <test-commands>
  7070. <command>-fs NAMENODE -mkdir /dir1</command>
  7071. <command>-fs NAMENODE -mkdir /dir2</command>
  7072. <command>-fs NAMENODE -mkdir /dir3</command>
  7073. <command>-fs NAMENODE -mkdir /dir4</command>
  7074. <dfs-admin-command>-fs NAMENODE -setQuota 10 /dir1 </dfs-admin-command>
  7075. <dfs-admin-command>-fs NAMENODE -setSpaceQuota 1m /dir1 </dfs-admin-command>
  7076. <dfs-admin-command>-fs NAMENODE -setQuota 10 /dir2 </dfs-admin-command>
  7077. <dfs-admin-command>-fs NAMENODE -setSpaceQuota 1m /dir2 </dfs-admin-command>
  7078. <dfs-admin-command>-fs NAMENODE -setQuota 10 /dir3 </dfs-admin-command>
  7079. <dfs-admin-command>-fs NAMENODE -setSpaceQuota 1m /dir3 </dfs-admin-command>
  7080. <dfs-admin-command>-fs NAMENODE -setQuota 10 /dir4 </dfs-admin-command>
  7081. <dfs-admin-command>-fs NAMENODE -setSpaceQuota 1m /dir4 </dfs-admin-command>
  7082. <command>-fs NAMENODE -count -q /dir* </command>
  7083. </test-commands>
  7084. <cleanup-commands>
  7085. <command>-fs NAMENODE -rm -r /dir*</command>
  7086. </cleanup-commands>
  7087. <comparators>
  7088. <comparator>
  7089. <type>RegexpComparator</type>
  7090. <expected-output>( |\t)*10( |\t)*9( |\t)*1048576( |\t)*1048576( |\t)*1( |\t)*0( |\t)*0 /dir1</expected-output>
  7091. </comparator>
  7092. <comparator>
  7093. <type>RegexpComparator</type>
  7094. <expected-output>( |\t)*10( |\t)*9( |\t)*1048576( |\t)*1048576( |\t)*1( |\t)*0( |\t)*0 /dir2</expected-output>
  7095. </comparator>
  7096. <comparator>
  7097. <type>RegexpComparator</type>
  7098. <expected-output>( |\t)*10( |\t)*9( |\t)*1048576( |\t)*1048576( |\t)*1( |\t)*0( |\t)*0 /dir3</expected-output>
  7099. </comparator>
  7100. <comparator>
  7101. <type>RegexpComparator</type>
  7102. <expected-output>( |\t)*10( |\t)*9( |\t)*1048576( |\t)*1048576( |\t)*1( |\t)*0( |\t)*0 /dir4</expected-output>
  7103. </comparator>
  7104. </comparators>
  7105. </test>
  7106. <test> <!-- TESTED -->
  7107. <description>count: relative path to multiple directories using globbing with -q option</description>
  7108. <test-commands>
  7109. <command>-fs NAMENODE -mkdir dir1</command>
  7110. <command>-fs NAMENODE -mkdir dir2</command>
  7111. <command>-fs NAMENODE -mkdir dir3</command>
  7112. <command>-fs NAMENODE -mkdir dir4</command>
  7113. <dfs-admin-command>-fs NAMENODE -setQuota 10 dir1 </dfs-admin-command>
  7114. <dfs-admin-command>-fs NAMENODE -setSpaceQuota 1m dir1 </dfs-admin-command>
  7115. <dfs-admin-command>-fs NAMENODE -setQuota 10 dir2 </dfs-admin-command>
  7116. <dfs-admin-command>-fs NAMENODE -setSpaceQuota 1m dir2 </dfs-admin-command>
  7117. <dfs-admin-command>-fs NAMENODE -setQuota 10 dir3 </dfs-admin-command>
  7118. <dfs-admin-command>-fs NAMENODE -setSpaceQuota 1m dir3 </dfs-admin-command>
  7119. <dfs-admin-command>-fs NAMENODE -setQuota 10 dir4 </dfs-admin-command>
  7120. <dfs-admin-command>-fs NAMENODE -setSpaceQuota 1m dir4 </dfs-admin-command>
  7121. <command>-fs NAMENODE -count -q dir* </command>
  7122. </test-commands>
  7123. <cleanup-commands>
  7124. <command>-fs NAMENODE -rm -r /user</command>
  7125. </cleanup-commands>
  7126. <comparators>
  7127. <comparator>
  7128. <type>RegexpComparator</type>
  7129. <expected-output>( |\t)*10( |\t)*9( |\t)*1048576( |\t)*1048576( |\t)*1( |\t)*0( |\t)*0 dir1</expected-output>
  7130. </comparator>
  7131. <comparator>
  7132. <type>RegexpComparator</type>
  7133. <expected-output>( |\t)*10( |\t)*9( |\t)*1048576( |\t)*1048576( |\t)*1( |\t)*0( |\t)*0 dir2</expected-output>
  7134. </comparator>
  7135. <comparator>
  7136. <type>RegexpComparator</type>
  7137. <expected-output>( |\t)*10( |\t)*9( |\t)*1048576( |\t)*1048576( |\t)*1( |\t)*0( |\t)*0 dir3</expected-output>
  7138. </comparator>
  7139. <comparator>
  7140. <type>RegexpComparator</type>
  7141. <expected-output>( |\t)*10( |\t)*9( |\t)*1048576( |\t)*1048576( |\t)*1( |\t)*0( |\t)*0 dir4</expected-output>
  7142. </comparator>
  7143. </comparators>
  7144. </test>
  7145. <test> <!-- TESTED -->
  7146. <description>count: absolute path to multiple directories without globbing with -q option</description>
  7147. <test-commands>
  7148. <command>-fs NAMENODE -mkdir /dir1</command>
  7149. <command>-fs NAMENODE -mkdir /dir2</command>
  7150. <command>-fs NAMENODE -mkdir /dir3</command>
  7151. <command>-fs NAMENODE -mkdir /dir4</command>
  7152. <dfs-admin-command>-fs NAMENODE -setQuota 10 /dir1 </dfs-admin-command>
  7153. <dfs-admin-command>-fs NAMENODE -setSpaceQuota 1m /dir1 </dfs-admin-command>
  7154. <dfs-admin-command>-fs NAMENODE -setQuota 10 /dir2 </dfs-admin-command>
  7155. <dfs-admin-command>-fs NAMENODE -setSpaceQuota 1m /dir2 </dfs-admin-command>
  7156. <dfs-admin-command>-fs NAMENODE -setQuota 10 /dir3 </dfs-admin-command>
  7157. <dfs-admin-command>-fs NAMENODE -setSpaceQuota 1m /dir3 </dfs-admin-command>
  7158. <dfs-admin-command>-fs NAMENODE -setQuota 10 /dir4 </dfs-admin-command>
  7159. <dfs-admin-command>-fs NAMENODE -setSpaceQuota 1m /dir4 </dfs-admin-command>
  7160. <command>-fs NAMENODE -count -q /dir1 /dir2 /dir3 /dir4 </command>
  7161. </test-commands>
  7162. <cleanup-commands>
  7163. <command>-fs NAMENODE -rm -r /dir*</command>
  7164. </cleanup-commands>
  7165. <comparators>
  7166. <comparator>
  7167. <type>RegexpComparator</type>
  7168. <expected-output>( |\t)*10( |\t)*9( |\t)*1048576( |\t)*1048576( |\t)*1( |\t)*0( |\t)*0 /dir1</expected-output>
  7169. </comparator>
  7170. <comparator>
  7171. <type>RegexpComparator</type>
  7172. <expected-output>( |\t)*10( |\t)*9( |\t)*1048576( |\t)*1048576( |\t)*1( |\t)*0( |\t)*0 /dir2</expected-output>
  7173. </comparator>
  7174. <comparator>
  7175. <type>RegexpComparator</type>
  7176. <expected-output>( |\t)*10( |\t)*9( |\t)*1048576( |\t)*1048576( |\t)*1( |\t)*0( |\t)*0 /dir3</expected-output>
  7177. </comparator>
  7178. <comparator>
  7179. <type>RegexpComparator</type>
  7180. <expected-output>( |\t)*10( |\t)*9( |\t)*1048576( |\t)*1048576( |\t)*1( |\t)*0( |\t)*0 /dir4</expected-output>
  7181. </comparator>
  7182. </comparators>
  7183. </test>
  7184. <test> <!-- TESTED -->
  7185. <description>count: relative path to multiple directories without globbing with -q option</description>
  7186. <test-commands>
  7187. <command>-fs NAMENODE -mkdir dir1</command>
  7188. <command>-fs NAMENODE -mkdir dir2</command>
  7189. <command>-fs NAMENODE -mkdir dir3</command>
  7190. <command>-fs NAMENODE -mkdir dir4</command>
  7191. <dfs-admin-command>-fs NAMENODE -setQuota 10 dir1 </dfs-admin-command>
  7192. <dfs-admin-command>-fs NAMENODE -setSpaceQuota 1m dir1 </dfs-admin-command>
  7193. <dfs-admin-command>-fs NAMENODE -setQuota 10 dir2 </dfs-admin-command>
  7194. <dfs-admin-command>-fs NAMENODE -setSpaceQuota 1m dir2 </dfs-admin-command>
  7195. <dfs-admin-command>-fs NAMENODE -setQuota 10 dir3 </dfs-admin-command>
  7196. <dfs-admin-command>-fs NAMENODE -setSpaceQuota 1m dir3 </dfs-admin-command>
  7197. <dfs-admin-command>-fs NAMENODE -setQuota 10 dir4 </dfs-admin-command>
  7198. <dfs-admin-command>-fs NAMENODE -setSpaceQuota 1m dir4 </dfs-admin-command>
  7199. <command>-fs NAMENODE -count -q dir1 dir2 dir3 dir4 </command>
  7200. </test-commands>
  7201. <cleanup-commands>
  7202. <command>-fs NAMENODE -rm -r /user</command>
  7203. </cleanup-commands>
  7204. <comparators>
  7205. <comparator>
  7206. <type>RegexpComparator</type>
  7207. <expected-output>( |\t)*10( |\t)*9( |\t)*1048576( |\t)*1048576( |\t)*1( |\t)*0( |\t)*0 dir1</expected-output>
  7208. </comparator>
  7209. <comparator>
  7210. <type>RegexpComparator</type>
  7211. <expected-output>( |\t)*10( |\t)*9( |\t)*1048576( |\t)*1048576( |\t)*1( |\t)*0( |\t)*0 dir2</expected-output>
  7212. </comparator>
  7213. <comparator>
  7214. <type>RegexpComparator</type>
  7215. <expected-output>( |\t)*10( |\t)*9( |\t)*1048576( |\t)*1048576( |\t)*1( |\t)*0( |\t)*0 dir3</expected-output>
  7216. </comparator>
  7217. <comparator>
  7218. <type>RegexpComparator</type>
  7219. <expected-output>( |\t)*10( |\t)*9( |\t)*1048576( |\t)*1048576( |\t)*1( |\t)*0( |\t)*0 dir4</expected-output>
  7220. </comparator>
  7221. </comparators>
  7222. </test>
  7223. <test> <!-- TESTED -->
  7224. <description>count: Test for file using hdfs:// path</description>
  7225. <test-commands>
  7226. <command>-fs NAMENODE -touchz hdfs:///file1</command>
  7227. <command>-fs NAMENODE -count hdfs:///file1</command>
  7228. </test-commands>
  7229. <cleanup-commands>
  7230. <command>-fs NAMENODE -rm hdfs:///file1</command>
  7231. </cleanup-commands>
  7232. <comparators>
  7233. <comparator>
  7234. <type>RegexpComparator</type>
  7235. <expected-output>( |\t)*0( |\t)*1( |\t)*0 hdfs:///file1</expected-output>
  7236. </comparator>
  7237. </comparators>
  7238. </test>
  7239. <test> <!-- TESTED -->
  7240. <description>count: Test for directory using hdfs:// path</description>
  7241. <test-commands>
  7242. <command>-fs NAMENODE -mkdir hdfs:///dir1</command>
  7243. <command>-fs NAMENODE -count hdfs:///dir1</command>
  7244. </test-commands>
  7245. <cleanup-commands>
  7246. <command>-fs NAMENODE -rm -r hdfs:///dir1</command>
  7247. </cleanup-commands>
  7248. <comparators>
  7249. <comparator>
  7250. <type>RegexpComparator</type>
  7251. <expected-output>( |\t)*1( |\t)*0( |\t)*0 hdfs:///dir1</expected-output>
  7252. </comparator>
  7253. </comparators>
  7254. </test>
  7255. <test> <!-- TESTED -->
  7256. <description>count: Test for hdfs:// path - file/directory that does not exist</description>
  7257. <test-commands>
  7258. <command>-fs NAMENODE -count hdfs:///file1 </command>
  7259. </test-commands>
  7260. <cleanup-commands>
  7261. </cleanup-commands>
  7262. <comparators>
  7263. <comparator>
  7264. <type>TokenComparator</type>
  7265. <expected-output>count: `hdfs:///file1': No such file or directory</expected-output>
  7266. </comparator>
  7267. </comparators>
  7268. </test>
  7269. <test> <!-- TESTED -->
  7270. <description>count: Test for hdfs:// path - multiple files using globbing</description>
  7271. <test-commands>
  7272. <command>-fs NAMENODE -touchz hdfs:///file1</command>
  7273. <command>-fs NAMENODE -touchz hdfs:///file2</command>
  7274. <command>-fs NAMENODE -touchz hdfs:///file3</command>
  7275. <command>-fs NAMENODE -touchz hdfs:///file4</command>
  7276. <command>-fs NAMENODE -count hdfs:///file*</command>
  7277. </test-commands>
  7278. <cleanup-commands>
  7279. <command>-fs NAMENODE -rm -r hdfs:///file*</command>
  7280. </cleanup-commands>
  7281. <comparators>
  7282. <comparator>
  7283. <type>RegexpComparator</type>
  7284. <expected-output>( |\t)*0( |\t)*1( |\t)*0 hdfs:///file1</expected-output>
  7285. </comparator>
  7286. <comparator>
  7287. <type>RegexpComparator</type>
  7288. <expected-output>( |\t)*0( |\t)*1( |\t)*0 hdfs:///file2</expected-output>
  7289. </comparator>
  7290. <comparator>
  7291. <type>RegexpComparator</type>
  7292. <expected-output>( |\t)*0( |\t)*1( |\t)*0 hdfs:///file3</expected-output>
  7293. </comparator>
  7294. <comparator>
  7295. <type>RegexpComparator</type>
  7296. <expected-output>( |\t)*0( |\t)*1( |\t)*0 hdfs:///file4</expected-output>
  7297. </comparator>
  7298. </comparators>
  7299. </test>
  7300. <test> <!-- TESTED -->
  7301. <description>count: Test for hdfs:// path - multiple files without globbing</description>
  7302. <test-commands>
  7303. <command>-fs NAMENODE -touchz hdfs:///file1</command>
  7304. <command>-fs NAMENODE -touchz hdfs:///file2</command>
  7305. <command>-fs NAMENODE -touchz hdfs:///file3</command>
  7306. <command>-fs NAMENODE -touchz hdfs:///file4</command>
  7307. <command>-fs NAMENODE -count hdfs:///file1 hdfs:///file2 hdfs:///file3 hdfs:///file4</command>
  7308. </test-commands>
  7309. <cleanup-commands>
  7310. <command>-fs NAMENODE -rm -r hdfs:///file*</command>
  7311. </cleanup-commands>
  7312. <comparators>
  7313. <comparator>
  7314. <type>RegexpComparator</type>
  7315. <expected-output>( |\t)*0( |\t)*1( |\t)*0 hdfs:///file1</expected-output>
  7316. </comparator>
  7317. <comparator>
  7318. <type>RegexpComparator</type>
  7319. <expected-output>( |\t)*0( |\t)*1( |\t)*0 hdfs:///file2</expected-output>
  7320. </comparator>
  7321. <comparator>
  7322. <type>RegexpComparator</type>
  7323. <expected-output>( |\t)*0( |\t)*1( |\t)*0 hdfs:///file3</expected-output>
  7324. </comparator>
  7325. <comparator>
  7326. <type>RegexpComparator</type>
  7327. <expected-output>( |\t)*0( |\t)*1( |\t)*0 hdfs:///file4</expected-output>
  7328. </comparator>
  7329. </comparators>
  7330. </test>
  7331. <test> <!-- TESTED -->
  7332. <description>count: Test for hdfs:// path - multiple directories using globbing</description>
  7333. <test-commands>
  7334. <command>-fs NAMENODE -mkdir hdfs:///dir1</command>
  7335. <command>-fs NAMENODE -mkdir hdfs:///dir2</command>
  7336. <command>-fs NAMENODE -mkdir hdfs:///dir3</command>
  7337. <command>-fs NAMENODE -mkdir hdfs:///dir4</command>
  7338. <command>-fs NAMENODE -count hdfs:///dir* </command>
  7339. </test-commands>
  7340. <cleanup-commands>
  7341. <command>-fs NAMENODE -rm -r hdfs:///dir*</command>
  7342. </cleanup-commands>
  7343. <comparators>
  7344. <comparator>
  7345. <type>RegexpComparator</type>
  7346. <expected-output>( |\t)*1( |\t)*0( |\t)*0 hdfs:///dir1</expected-output>
  7347. </comparator>
  7348. <comparator>
  7349. <type>RegexpComparator</type>
  7350. <expected-output>( |\t)*1( |\t)*0( |\t)*0 hdfs:///dir2</expected-output>
  7351. </comparator>
  7352. <comparator>
  7353. <type>RegexpComparator</type>
  7354. <expected-output>( |\t)*1( |\t)*0( |\t)*0 hdfs:///dir3</expected-output>
  7355. </comparator>
  7356. <comparator>
  7357. <type>RegexpComparator</type>
  7358. <expected-output>( |\t)*1( |\t)*0( |\t)*0 hdfs:///dir4</expected-output>
  7359. </comparator>
  7360. </comparators>
  7361. </test>
  7362. <test> <!-- TESTED -->
  7363. <description>count: Test for hdfs:// path - multiple directories without globbing</description>
  7364. <test-commands>
  7365. <command>-fs NAMENODE -mkdir hdfs:///dir1</command>
  7366. <command>-fs NAMENODE -mkdir hdfs:///dir2</command>
  7367. <command>-fs NAMENODE -mkdir hdfs:///dir3</command>
  7368. <command>-fs NAMENODE -mkdir hdfs:///dir4</command>
  7369. <command>-fs NAMENODE -count hdfs:///dir1 hdfs:///dir2 hdfs:///dir3 hdfs:///dir4 </command>
  7370. </test-commands>
  7371. <cleanup-commands>
  7372. <command>-fs NAMENODE -rm -r hdfs:///dir*</command>
  7373. </cleanup-commands>
  7374. <comparators>
  7375. <comparator>
  7376. <type>RegexpComparator</type>
  7377. <expected-output>( |\t)*1( |\t)*0( |\t)*0 hdfs:///dir1</expected-output>
  7378. </comparator>
  7379. <comparator>
  7380. <type>RegexpComparator</type>
  7381. <expected-output>( |\t)*1( |\t)*0( |\t)*0 hdfs:///dir2</expected-output>
  7382. </comparator>
  7383. <comparator>
  7384. <type>RegexpComparator</type>
  7385. <expected-output>( |\t)*1( |\t)*0( |\t)*0 hdfs:///dir3</expected-output>
  7386. </comparator>
  7387. <comparator>
  7388. <type>RegexpComparator</type>
  7389. <expected-output>( |\t)*1( |\t)*0( |\t)*0 hdfs:///dir4</expected-output>
  7390. </comparator>
  7391. </comparators>
  7392. </test>
  7393. <test> <!-- TESTED -->
  7394. <description>count: Test for file using hdfs:// path with -q option</description>
  7395. <test-commands>
  7396. <command>-fs NAMENODE -touchz hdfs:///file1</command>
  7397. <command>-fs NAMENODE -count -q hdfs:///file1</command>
  7398. </test-commands>
  7399. <cleanup-commands>
  7400. <command>-fs NAMENODE -rm hdfs:///file1</command>
  7401. </cleanup-commands>
  7402. <comparators>
  7403. <comparator>
  7404. <type>RegexpComparator</type>
  7405. <expected-output>( |\t)*none( |\t)*inf( |\t)*none( |\t)*inf( |\t)*0( |\t)*1( |\t)*0 hdfs:///file1</expected-output>
  7406. </comparator>
  7407. </comparators>
  7408. </test>
  7409. <test> <!-- TESTED -->
  7410. <description>count: Test for directory using hdfs:// path with -q option</description>
  7411. <test-commands>
  7412. <command>-fs NAMENODE -mkdir hdfs:///dir1</command>
  7413. <dfs-admin-command>-fs NAMENODE -setQuota 10 hdfs:///dir1 </dfs-admin-command>
  7414. <dfs-admin-command>-fs NAMENODE -setSpaceQuota 1m hdfs:///dir1 </dfs-admin-command>
  7415. <command>-fs NAMENODE -count -q hdfs:///dir1</command>
  7416. </test-commands>
  7417. <cleanup-commands>
  7418. <command>-fs NAMENODE -rm -r hdfs:///dir1</command>
  7419. </cleanup-commands>
  7420. <comparators>
  7421. <comparator>
  7422. <type>RegexpComparator</type>
  7423. <expected-output>( |\t)*10( |\t)*9( |\t)*1048576( |\t)*1048576( |\t)*1( |\t)*0( |\t)*0 hdfs:///dir1</expected-output>
  7424. </comparator>
  7425. </comparators>
  7426. </test>
  7427. <test> <!-- TESTED -->
  7428. <description>count: Test for hdfs:// path - file/directory that does not exist with -q option</description>
  7429. <test-commands>
  7430. <command>-fs NAMENODE -count -q hdfs:///file1 </command>
  7431. </test-commands>
  7432. <cleanup-commands>
  7433. </cleanup-commands>
  7434. <comparators>
  7435. <comparator>
  7436. <type>TokenComparator</type>
  7437. <expected-output>count: `hdfs:///file1': No such file or directory</expected-output>
  7438. </comparator>
  7439. </comparators>
  7440. </test>
  7441. <test> <!-- TESTED -->
  7442. <description>count: Test for hdfs:// path - multiple files using globbing with -q option</description>
  7443. <test-commands>
  7444. <command>-fs NAMENODE -touchz hdfs:///file1</command>
  7445. <command>-fs NAMENODE -touchz hdfs:///file2</command>
  7446. <command>-fs NAMENODE -touchz hdfs:///file3</command>
  7447. <command>-fs NAMENODE -touchz hdfs:///file4</command>
  7448. <command>-fs NAMENODE -count -q hdfs:///file*</command>
  7449. </test-commands>
  7450. <cleanup-commands>
  7451. <command>-fs NAMENODE -rm -r hdfs:///file*</command>
  7452. </cleanup-commands>
  7453. <comparators>
  7454. <comparator>
  7455. <type>RegexpComparator</type>
  7456. <expected-output>( |\t)*none( |\t)*inf( |\t)*none( |\t)*inf( |\t)*0( |\t)*1( |\t)*0 hdfs:///file1</expected-output>
  7457. </comparator>
  7458. <comparator>
  7459. <type>RegexpComparator</type>
  7460. <expected-output>( |\t)*none( |\t)*inf( |\t)*none( |\t)*inf( |\t)*0( |\t)*1( |\t)*0 hdfs:///file2</expected-output>
  7461. </comparator>
  7462. <comparator>
  7463. <type>RegexpComparator</type>
  7464. <expected-output>( |\t)*none( |\t)*inf( |\t)*none( |\t)*inf( |\t)*0( |\t)*1( |\t)*0 hdfs:///file3</expected-output>
  7465. </comparator>
  7466. <comparator>
  7467. <type>RegexpComparator</type>
  7468. <expected-output>( |\t)*none( |\t)*inf( |\t)*none( |\t)*inf( |\t)*0( |\t)*1( |\t)*0 hdfs:///file4</expected-output>
  7469. </comparator>
  7470. </comparators>
  7471. </test>
  7472. <test> <!-- TESTED -->
  7473. <description>count: Test for hdfs:// path - multiple files without globbing with -q option</description>
  7474. <test-commands>
  7475. <command>-fs NAMENODE -touchz hdfs:///file1</command>
  7476. <command>-fs NAMENODE -touchz hdfs:///file2</command>
  7477. <command>-fs NAMENODE -touchz hdfs:///file3</command>
  7478. <command>-fs NAMENODE -touchz hdfs:///file4</command>
  7479. <command>-fs NAMENODE -count -q hdfs:///file1 hdfs:///file2 hdfs:///file3 hdfs:///file4</command>
  7480. </test-commands>
  7481. <cleanup-commands>
  7482. <command>-fs NAMENODE -rm -r hdfs:///file*</command>
  7483. </cleanup-commands>
  7484. <comparators>
  7485. <comparator>
  7486. <type>RegexpComparator</type>
  7487. <expected-output>( |\t)*none( |\t)*inf( |\t)*none( |\t)*inf( |\t)*0( |\t)*1( |\t)*0 hdfs:///file1</expected-output>
  7488. </comparator>
  7489. <comparator>
  7490. <type>RegexpComparator</type>
  7491. <expected-output>( |\t)*none( |\t)*inf( |\t)*none( |\t)*inf( |\t)*0( |\t)*1( |\t)*0 hdfs:///file2</expected-output>
  7492. </comparator>
  7493. <comparator>
  7494. <type>RegexpComparator</type>
  7495. <expected-output>( |\t)*none( |\t)*inf( |\t)*none( |\t)*inf( |\t)*0( |\t)*1( |\t)*0 hdfs:///file3</expected-output>
  7496. </comparator>
  7497. <comparator>
  7498. <type>RegexpComparator</type>
  7499. <expected-output>( |\t)*none( |\t)*inf( |\t)*none( |\t)*inf( |\t)*0( |\t)*1( |\t)*0 hdfs:///file4</expected-output>
  7500. </comparator>
  7501. </comparators>
  7502. </test>
  7503. <test> <!-- TESTED -->
  7504. <description>count: Test for hdfs:// path - multiple directories using globbing with -q option</description>
  7505. <test-commands>
  7506. <command>-fs NAMENODE -mkdir hdfs:///dir1</command>
  7507. <command>-fs NAMENODE -mkdir hdfs:///dir2</command>
  7508. <command>-fs NAMENODE -mkdir hdfs:///dir3</command>
  7509. <command>-fs NAMENODE -mkdir hdfs:///dir4</command>
  7510. <dfs-admin-command>-fs NAMENODE -setQuota 10 hdfs:///dir1 </dfs-admin-command>
  7511. <dfs-admin-command>-fs NAMENODE -setSpaceQuota 1m hdfs:///dir1 </dfs-admin-command>
  7512. <dfs-admin-command>-fs NAMENODE -setQuota 10 hdfs:///dir2 </dfs-admin-command>
  7513. <dfs-admin-command>-fs NAMENODE -setSpaceQuota 1m hdfs:///dir2 </dfs-admin-command>
  7514. <dfs-admin-command>-fs NAMENODE -setQuota 10 hdfs:///dir3 </dfs-admin-command>
  7515. <dfs-admin-command>-fs NAMENODE -setSpaceQuota 1m hdfs:///dir3 </dfs-admin-command>
  7516. <dfs-admin-command>-fs NAMENODE -setQuota 10 hdfs:///dir4 </dfs-admin-command>
  7517. <dfs-admin-command>-fs NAMENODE -setSpaceQuota 1m hdfs:///dir4 </dfs-admin-command>
  7518. <command>-fs NAMENODE -count -q hdfs:///dir* </command>
  7519. </test-commands>
  7520. <cleanup-commands>
  7521. <command>-fs NAMENODE -rm -r hdfs:///dir*</command>
  7522. </cleanup-commands>
  7523. <comparators>
  7524. <comparator>
  7525. <type>RegexpComparator</type>
  7526. <expected-output>( |\t)*10( |\t)*9( |\t)*1048576( |\t)*1048576( |\t)*1( |\t)*0( |\t)*0 hdfs:///dir1</expected-output>
  7527. </comparator>
  7528. <comparator>
  7529. <type>RegexpComparator</type>
  7530. <expected-output>( |\t)*10( |\t)*9( |\t)*1048576( |\t)*1048576( |\t)*1( |\t)*0( |\t)*0 hdfs:///dir2</expected-output>
  7531. </comparator>
  7532. <comparator>
  7533. <type>RegexpComparator</type>
  7534. <expected-output>( |\t)*10( |\t)*9( |\t)*1048576( |\t)*1048576( |\t)*1( |\t)*0( |\t)*0 hdfs:///dir3</expected-output>
  7535. </comparator>
  7536. <comparator>
  7537. <type>RegexpComparator</type>
  7538. <expected-output>( |\t)*10( |\t)*9( |\t)*1048576( |\t)*1048576( |\t)*1( |\t)*0( |\t)*0 hdfs:///dir4</expected-output>
  7539. </comparator>
  7540. </comparators>
  7541. </test>
  7542. <test> <!-- TESTED -->
  7543. <description>count: Test for hdfs:// path - multiple directories without globbing with -q option</description>
  7544. <test-commands>
  7545. <command>-fs NAMENODE -mkdir hdfs:///dir1</command>
  7546. <command>-fs NAMENODE -mkdir hdfs:///dir2</command>
  7547. <command>-fs NAMENODE -mkdir hdfs:///dir3</command>
  7548. <command>-fs NAMENODE -mkdir hdfs:///dir4</command>
  7549. <dfs-admin-command>-fs NAMENODE -setQuota 10 hdfs:///dir1 </dfs-admin-command>
  7550. <dfs-admin-command>-fs NAMENODE -setSpaceQuota 1m hdfs:///dir1 </dfs-admin-command>
  7551. <dfs-admin-command>-fs NAMENODE -setQuota 10 hdfs:///dir2 </dfs-admin-command>
  7552. <dfs-admin-command>-fs NAMENODE -setSpaceQuota 1m hdfs:///dir2 </dfs-admin-command>
  7553. <dfs-admin-command>-fs NAMENODE -setQuota 10 hdfs:///dir3 </dfs-admin-command>
  7554. <dfs-admin-command>-fs NAMENODE -setSpaceQuota 1m hdfs:///dir3 </dfs-admin-command>
  7555. <dfs-admin-command>-fs NAMENODE -setQuota 10 hdfs:///dir4 </dfs-admin-command>
  7556. <dfs-admin-command>-fs NAMENODE -setSpaceQuota 1m hdfs:///dir4 </dfs-admin-command>
  7557. <command>-fs NAMENODE -count -q hdfs:///dir1 hdfs:///dir2 hdfs:///dir3 hdfs:///dir4 </command>
  7558. </test-commands>
  7559. <cleanup-commands>
  7560. <command>-fs NAMENODE -rm -r /dir*</command>
  7561. </cleanup-commands>
  7562. <comparators>
  7563. <comparator>
  7564. <type>RegexpComparator</type>
  7565. <expected-output>( |\t)*10( |\t)*9( |\t)*1048576( |\t)*1048576( |\t)*1( |\t)*0( |\t)*0 hdfs:///dir1</expected-output>
  7566. </comparator>
  7567. <comparator>
  7568. <type>RegexpComparator</type>
  7569. <expected-output>( |\t)*10( |\t)*9( |\t)*1048576( |\t)*1048576( |\t)*1( |\t)*0( |\t)*0 hdfs:///dir2</expected-output>
  7570. </comparator>
  7571. <comparator>
  7572. <type>RegexpComparator</type>
  7573. <expected-output>( |\t)*10( |\t)*9( |\t)*1048576( |\t)*1048576( |\t)*1( |\t)*0( |\t)*0 hdfs:///dir3</expected-output>
  7574. </comparator>
  7575. <comparator>
  7576. <type>RegexpComparator</type>
  7577. <expected-output>( |\t)*10( |\t)*9( |\t)*1048576( |\t)*1048576( |\t)*1( |\t)*0( |\t)*0 hdfs:///dir4</expected-output>
  7578. </comparator>
  7579. </comparators>
  7580. </test>
  7581. <test> <!-- TESTED -->
  7582. <description>count: Test for file using Namenode's path</description>
  7583. <test-commands>
  7584. <command>-fs NAMENODE -touchz NAMENODE/file1</command>
  7585. <command>-fs NAMENODE -count NAMENODE/file1</command>
  7586. </test-commands>
  7587. <cleanup-commands>
  7588. <command>-fs NAMENODE -rm NAMENODE/file1</command>
  7589. </cleanup-commands>
  7590. <comparators>
  7591. <comparator>
  7592. <type>RegexpComparator</type>
  7593. <expected-output>( |\t)*0( |\t)*1( |\t)*0 NAMENODE/file1</expected-output>
  7594. </comparator>
  7595. </comparators>
  7596. </test>
  7597. <test> <!-- TESTED -->
  7598. <description>count: Test for directory using Namenode's path</description>
  7599. <test-commands>
  7600. <command>-fs NAMENODE -mkdir NAMENODE/dir1</command>
  7601. <command>-fs NAMENODE -count NAMENODE/dir1</command>
  7602. </test-commands>
  7603. <cleanup-commands>
  7604. <command>-fs NAMENODE -rm -r NAMENODE/dir1</command>
  7605. </cleanup-commands>
  7606. <comparators>
  7607. <comparator>
  7608. <type>RegexpComparator</type>
  7609. <expected-output>( |\t)*1( |\t)*0( |\t)*0 NAMENODE/dir1</expected-output>
  7610. </comparator>
  7611. </comparators>
  7612. </test>
  7613. <test> <!-- TESTED -->
  7614. <description>count: Test for Namenode's path - file/directory that does not exist</description>
  7615. <test-commands>
  7616. <command>-fs NAMENODE -count NAMENODE/file1 </command>
  7617. </test-commands>
  7618. <cleanup-commands>
  7619. </cleanup-commands>
  7620. <comparators>
  7621. <comparator>
  7622. <type>RegexpComparator</type>
  7623. <expected-output>count: `NAMENODE/file1': No such file or directory</expected-output>
  7624. </comparator>
  7625. </comparators>
  7626. </test>
  7627. <test> <!-- TESTED -->
  7628. <description>count: Test for Namenode's path - multiple files using globbing</description>
  7629. <test-commands>
  7630. <command>-fs NAMENODE -touchz NAMENODE/file1</command>
  7631. <command>-fs NAMENODE -touchz NAMENODE/file2</command>
  7632. <command>-fs NAMENODE -touchz NAMENODE/file3</command>
  7633. <command>-fs NAMENODE -touchz NAMENODE/file4</command>
  7634. <command>-fs NAMENODE -count NAMENODE/file*</command>
  7635. </test-commands>
  7636. <cleanup-commands>
  7637. <command>-fs NAMENODE -rm -r NAMENODE/file*</command>
  7638. </cleanup-commands>
  7639. <comparators>
  7640. <comparator>
  7641. <type>RegexpComparator</type>
  7642. <expected-output>( |\t)*0( |\t)*1( |\t)*0 NAMENODE/file1</expected-output>
  7643. </comparator>
  7644. <comparator>
  7645. <type>RegexpComparator</type>
  7646. <expected-output>( |\t)*0( |\t)*1( |\t)*0 NAMENODE/file2</expected-output>
  7647. </comparator>
  7648. <comparator>
  7649. <type>RegexpComparator</type>
  7650. <expected-output>( |\t)*0( |\t)*1( |\t)*0 NAMENODE/file3</expected-output>
  7651. </comparator>
  7652. <comparator>
  7653. <type>RegexpComparator</type>
  7654. <expected-output>( |\t)*0( |\t)*1( |\t)*0 NAMENODE/file4</expected-output>
  7655. </comparator>
  7656. </comparators>
  7657. </test>
  7658. <test> <!-- TESTED -->
  7659. <description>count: Test for Namenode's path - multiple files without globbing</description>
  7660. <test-commands>
  7661. <command>-fs NAMENODE -touchz NAMENODE/file1</command>
  7662. <command>-fs NAMENODE -touchz NAMENODE/file2</command>
  7663. <command>-fs NAMENODE -touchz NAMENODE/file3</command>
  7664. <command>-fs NAMENODE -touchz NAMENODE/file4</command>
  7665. <command>-fs NAMENODE -count NAMENODE/file1 NAMENODE/file2 NAMENODE/file3 NAMENODE/file4</command>
  7666. </test-commands>
  7667. <cleanup-commands>
  7668. <command>-fs NAMENODE -rm -r NAMENODE/file*</command>
  7669. </cleanup-commands>
  7670. <comparators>
  7671. <comparator>
  7672. <type>RegexpComparator</type>
  7673. <expected-output>( |\t)*0( |\t)*1( |\t)*0 NAMENODE/file1</expected-output>
  7674. </comparator>
  7675. <comparator>
  7676. <type>RegexpComparator</type>
  7677. <expected-output>( |\t)*0( |\t)*1( |\t)*0 NAMENODE/file2</expected-output>
  7678. </comparator>
  7679. <comparator>
  7680. <type>RegexpComparator</type>
  7681. <expected-output>( |\t)*0( |\t)*1( |\t)*0 NAMENODE/file3</expected-output>
  7682. </comparator>
  7683. <comparator>
  7684. <type>RegexpComparator</type>
  7685. <expected-output>( |\t)*0( |\t)*1( |\t)*0 NAMENODE/file4</expected-output>
  7686. </comparator>
  7687. </comparators>
  7688. </test>
  7689. <test> <!-- TESTED -->
  7690. <description>count: Test for Namenode's path - multiple directories using globbing</description>
  7691. <test-commands>
  7692. <command>-fs NAMENODE -mkdir NAMENODE/dir1</command>
  7693. <command>-fs NAMENODE -mkdir NAMENODE/dir2</command>
  7694. <command>-fs NAMENODE -mkdir NAMENODE/dir3</command>
  7695. <command>-fs NAMENODE -mkdir NAMENODE/dir4</command>
  7696. <command>-fs NAMENODE -count NAMENODE/dir* </command>
  7697. </test-commands>
  7698. <cleanup-commands>
  7699. <command>-fs NAMENODE -rm -r NAMENODE/dir*</command>
  7700. </cleanup-commands>
  7701. <comparators>
  7702. <comparator>
  7703. <type>RegexpComparator</type>
  7704. <expected-output>( |\t)*1( |\t)*0( |\t)*0 NAMENODE/dir1</expected-output>
  7705. </comparator>
  7706. <comparator>
  7707. <type>RegexpComparator</type>
  7708. <expected-output>( |\t)*1( |\t)*0( |\t)*0 NAMENODE/dir2</expected-output>
  7709. </comparator>
  7710. <comparator>
  7711. <type>RegexpComparator</type>
  7712. <expected-output>( |\t)*1( |\t)*0( |\t)*0 NAMENODE/dir3</expected-output>
  7713. </comparator>
  7714. <comparator>
  7715. <type>RegexpComparator</type>
  7716. <expected-output>( |\t)*1( |\t)*0( |\t)*0 NAMENODE/dir4</expected-output>
  7717. </comparator>
  7718. </comparators>
  7719. </test>
  7720. <test> <!-- TESTED -->
  7721. <description>count: Test for Namenode's path - multiple directories without globbing</description>
  7722. <test-commands>
  7723. <command>-fs NAMENODE -mkdir NAMENODE/dir1</command>
  7724. <command>-fs NAMENODE -mkdir NAMENODE/dir2</command>
  7725. <command>-fs NAMENODE -mkdir NAMENODE/dir3</command>
  7726. <command>-fs NAMENODE -mkdir NAMENODE/dir4</command>
  7727. <command>-fs NAMENODE -count NAMENODE/dir1 NAMENODE/dir2 NAMENODE/dir3 NAMENODE/dir4 </command>
  7728. </test-commands>
  7729. <cleanup-commands>
  7730. <command>-fs NAMENODE -rm -r NAMENODE/dir*</command>
  7731. </cleanup-commands>
  7732. <comparators>
  7733. <comparator>
  7734. <type>RegexpComparator</type>
  7735. <expected-output>( |\t)*1( |\t)*0( |\t)*0 NAMENODE/dir1</expected-output>
  7736. </comparator>
  7737. <comparator>
  7738. <type>RegexpComparator</type>
  7739. <expected-output>( |\t)*1( |\t)*0( |\t)*0 NAMENODE/dir2</expected-output>
  7740. </comparator>
  7741. <comparator>
  7742. <type>RegexpComparator</type>
  7743. <expected-output>( |\t)*1( |\t)*0( |\t)*0 NAMENODE/dir3</expected-output>
  7744. </comparator>
  7745. <comparator>
  7746. <type>RegexpComparator</type>
  7747. <expected-output>( |\t)*1( |\t)*0( |\t)*0 NAMENODE/dir4</expected-output>
  7748. </comparator>
  7749. </comparators>
  7750. </test>
  7751. <test> <!-- TESTED -->
  7752. <description>count: Test for file using Namenode's path with -q option</description>
  7753. <test-commands>
  7754. <command>-fs NAMENODE -touchz NAMENODE/file1</command>
  7755. <command>-fs NAMENODE -count -q NAMENODE/file1</command>
  7756. </test-commands>
  7757. <cleanup-commands>
  7758. <command>-fs NAMENODE -rm NAMENODE/file1</command>
  7759. </cleanup-commands>
  7760. <comparators>
  7761. <comparator>
  7762. <type>RegexpComparator</type>
  7763. <expected-output>( |\t)*none( |\t)*inf( |\t)*none( |\t)*inf( |\t)*0( |\t)*1( |\t)*0 NAMENODE/file1</expected-output>
  7764. </comparator>
  7765. </comparators>
  7766. </test>
  7767. <test> <!-- TESTED -->
  7768. <description>count: Test for directory using Namenode's path with -q option</description>
  7769. <test-commands>
  7770. <command>-fs NAMENODE -mkdir NAMENODE/dir1</command>
  7771. <dfs-admin-command>-fs NAMENODE -setQuota 10 NAMENODE/dir1 </dfs-admin-command>
  7772. <dfs-admin-command>-fs NAMENODE -setSpaceQuota 1m NAMENODE/dir1 </dfs-admin-command>
  7773. <command>-fs NAMENODE -count -q NAMENODE/dir1</command>
  7774. </test-commands>
  7775. <cleanup-commands>
  7776. <command>-fs NAMENODE -rm -r NAMENODE/dir1</command>
  7777. </cleanup-commands>
  7778. <comparators>
  7779. <comparator>
  7780. <type>RegexpComparator</type>
  7781. <expected-output>( |\t)*10( |\t)*9( |\t)*1048576( |\t)*1048576( |\t)*1( |\t)*0( |\t)*0 NAMENODE/dir1</expected-output>
  7782. </comparator>
  7783. </comparators>
  7784. </test>
  7785. <test> <!-- TESTED -->
  7786. <description>count: Test for Namenode's path - file/directory that does not exist with -q option</description>
  7787. <test-commands>
  7788. <command>-fs NAMENODE -count -q NAMENODE/file1 </command>
  7789. </test-commands>
  7790. <cleanup-commands>
  7791. </cleanup-commands>
  7792. <comparators>
  7793. <comparator>
  7794. <type>RegexpComparator</type>
  7795. <expected-output>count: `NAMENODE/file1': No such file or directory</expected-output>
  7796. </comparator>
  7797. </comparators>
  7798. </test>
  7799. <test> <!-- TESTED -->
  7800. <description>count: Test for Namenode's path - multiple files using globbing with -q option</description>
  7801. <test-commands>
  7802. <command>-fs NAMENODE -touchz NAMENODE/file1</command>
  7803. <command>-fs NAMENODE -touchz NAMENODE/file2</command>
  7804. <command>-fs NAMENODE -touchz NAMENODE/file3</command>
  7805. <command>-fs NAMENODE -touchz NAMENODE/file4</command>
  7806. <command>-fs NAMENODE -count -q NAMENODE/file*</command>
  7807. </test-commands>
  7808. <cleanup-commands>
  7809. <command>-fs NAMENODE -rm -r NAMENODE/file*</command>
  7810. </cleanup-commands>
  7811. <comparators>
  7812. <comparator>
  7813. <type>RegexpComparator</type>
  7814. <expected-output>( |\t)*none( |\t)*inf( |\t)*none( |\t)*inf( |\t)*0( |\t)*1( |\t)*0 NAMENODE/file1</expected-output>
  7815. </comparator>
  7816. <comparator>
  7817. <type>RegexpComparator</type>
  7818. <expected-output>( |\t)*none( |\t)*inf( |\t)*none( |\t)*inf( |\t)*0( |\t)*1( |\t)*0 NAMENODE/file2</expected-output>
  7819. </comparator>
  7820. <comparator>
  7821. <type>RegexpComparator</type>
  7822. <expected-output>( |\t)*none( |\t)*inf( |\t)*none( |\t)*inf( |\t)*0( |\t)*1( |\t)*0 NAMENODE/file3</expected-output>
  7823. </comparator>
  7824. <comparator>
  7825. <type>RegexpComparator</type>
  7826. <expected-output>( |\t)*none( |\t)*inf( |\t)*none( |\t)*inf( |\t)*0( |\t)*1( |\t)*0 NAMENODE/file4</expected-output>
  7827. </comparator>
  7828. </comparators>
  7829. </test>
  7830. <test> <!-- TESTED -->
  7831. <description>count: Test for Namenode's path - multiple files without globbing with -q option</description>
  7832. <test-commands>
  7833. <command>-fs NAMENODE -touchz NAMENODE/file1</command>
  7834. <command>-fs NAMENODE -touchz NAMENODE/file2</command>
  7835. <command>-fs NAMENODE -touchz NAMENODE/file3</command>
  7836. <command>-fs NAMENODE -touchz NAMENODE/file4</command>
  7837. <command>-fs NAMENODE -count -q NAMENODE/file1 NAMENODE/file2 NAMENODE/file3 NAMENODE/file4</command>
  7838. </test-commands>
  7839. <cleanup-commands>
  7840. <command>-fs NAMENODE -rm -r NAMENODE/file*</command>
  7841. </cleanup-commands>
  7842. <comparators>
  7843. <comparator>
  7844. <type>RegexpComparator</type>
  7845. <expected-output>( |\t)*none( |\t)*inf( |\t)*none( |\t)*inf( |\t)*0( |\t)*1( |\t)*0 NAMENODE/file1</expected-output>
  7846. </comparator>
  7847. <comparator>
  7848. <type>RegexpComparator</type>
  7849. <expected-output>( |\t)*none( |\t)*inf( |\t)*none( |\t)*inf( |\t)*0( |\t)*1( |\t)*0 NAMENODE/file2</expected-output>
  7850. </comparator>
  7851. <comparator>
  7852. <type>RegexpComparator</type>
  7853. <expected-output>( |\t)*none( |\t)*inf( |\t)*none( |\t)*inf( |\t)*0( |\t)*1( |\t)*0 NAMENODE/file3</expected-output>
  7854. </comparator>
  7855. <comparator>
  7856. <type>RegexpComparator</type>
  7857. <expected-output>( |\t)*none( |\t)*inf( |\t)*none( |\t)*inf( |\t)*0( |\t)*1( |\t)*0 NAMENODE/file4</expected-output>
  7858. </comparator>
  7859. </comparators>
  7860. </test>
  7861. <test> <!-- TESTED -->
  7862. <description>count: Test for Namenode's path - multiple directories using globbing with -q option</description>
  7863. <test-commands>
  7864. <command>-fs NAMENODE -mkdir NAMENODE/dir1</command>
  7865. <command>-fs NAMENODE -mkdir NAMENODE/dir2</command>
  7866. <command>-fs NAMENODE -mkdir NAMENODE/dir3</command>
  7867. <command>-fs NAMENODE -mkdir NAMENODE/dir4</command>
  7868. <dfs-admin-command>-fs NAMENODE -setQuota 10 NAMENODE/dir1 </dfs-admin-command>
  7869. <dfs-admin-command>-fs NAMENODE -setSpaceQuota 1m NAMENODE/dir1 </dfs-admin-command>
  7870. <dfs-admin-command>-fs NAMENODE -setQuota 10 NAMENODE/dir2 </dfs-admin-command>
  7871. <dfs-admin-command>-fs NAMENODE -setSpaceQuota 1m NAMENODE/dir2 </dfs-admin-command>
  7872. <dfs-admin-command>-fs NAMENODE -setQuota 10 NAMENODE/dir3 </dfs-admin-command>
  7873. <dfs-admin-command>-fs NAMENODE -setSpaceQuota 1m NAMENODE/dir3 </dfs-admin-command>
  7874. <dfs-admin-command>-fs NAMENODE -setQuota 10 NAMENODE/dir4 </dfs-admin-command>
  7875. <dfs-admin-command>-fs NAMENODE -setSpaceQuota 1m NAMENODE/dir4 </dfs-admin-command>
  7876. <command>-fs NAMENODE -count -q NAMENODE/dir* </command>
  7877. </test-commands>
  7878. <cleanup-commands>
  7879. <command>-fs NAMENODE -rm -r NAMENODE/dir*</command>
  7880. </cleanup-commands>
  7881. <comparators>
  7882. <comparator>
  7883. <type>RegexpComparator</type>
  7884. <expected-output>( |\t)*10( |\t)*9( |\t)*1048576( |\t)*1048576( |\t)*1( |\t)*0( |\t)*0 NAMENODE/dir1</expected-output>
  7885. </comparator>
  7886. <comparator>
  7887. <type>RegexpComparator</type>
  7888. <expected-output>( |\t)*10( |\t)*9( |\t)*1048576( |\t)*1048576( |\t)*1( |\t)*0( |\t)*0 NAMENODE/dir2</expected-output>
  7889. </comparator>
  7890. <comparator>
  7891. <type>RegexpComparator</type>
  7892. <expected-output>( |\t)*10( |\t)*9( |\t)*1048576( |\t)*1048576( |\t)*1( |\t)*0( |\t)*0 NAMENODE/dir3</expected-output>
  7893. </comparator>
  7894. <comparator>
  7895. <type>RegexpComparator</type>
  7896. <expected-output>( |\t)*10( |\t)*9( |\t)*1048576( |\t)*1048576( |\t)*1( |\t)*0( |\t)*0 NAMENODE/dir4</expected-output>
  7897. </comparator>
  7898. </comparators>
  7899. </test>
  7900. <test> <!-- TESTED -->
  7901. <description>count: Test for Namenode's path - multiple directories without globbing with -q option</description>
  7902. <test-commands>
  7903. <command>-fs NAMENODE -mkdir NAMENODE/dir1</command>
  7904. <command>-fs NAMENODE -mkdir NAMENODE/dir2</command>
  7905. <command>-fs NAMENODE -mkdir NAMENODE/dir3</command>
  7906. <command>-fs NAMENODE -mkdir NAMENODE/dir4</command>
  7907. <dfs-admin-command>-fs NAMENODE -setQuota 10 NAMENODE/dir1 </dfs-admin-command>
  7908. <dfs-admin-command>-fs NAMENODE -setSpaceQuota 1m NAMENODE/dir1 </dfs-admin-command>
  7909. <dfs-admin-command>-fs NAMENODE -setQuota 10 NAMENODE/dir2 </dfs-admin-command>
  7910. <dfs-admin-command>-fs NAMENODE -setSpaceQuota 1m NAMENODE/dir2 </dfs-admin-command>
  7911. <dfs-admin-command>-fs NAMENODE -setQuota 10 NAMENODE/dir3 </dfs-admin-command>
  7912. <dfs-admin-command>-fs NAMENODE -setSpaceQuota 1m NAMENODE/dir3 </dfs-admin-command>
  7913. <dfs-admin-command>-fs NAMENODE -setQuota 10 NAMENODE/dir4 </dfs-admin-command>
  7914. <dfs-admin-command>-fs NAMENODE -setSpaceQuota 1m NAMENODE/dir4 </dfs-admin-command>
  7915. <command>-fs NAMENODE -count -q NAMENODE/dir1 NAMENODE/dir2 NAMENODE/dir3 NAMENODE/dir4 </command>
  7916. </test-commands>
  7917. <cleanup-commands>
  7918. <command>-fs NAMENODE -rm -r NAMENODE/dir*</command>
  7919. </cleanup-commands>
  7920. <comparators>
  7921. <comparator>
  7922. <type>RegexpComparator</type>
  7923. <expected-output>( |\t)*10( |\t)*9( |\t)*1048576( |\t)*1048576( |\t)*1( |\t)*0( |\t)*0 NAMENODE/dir1</expected-output>
  7924. </comparator>
  7925. <comparator>
  7926. <type>RegexpComparator</type>
  7927. <expected-output>( |\t)*10( |\t)*9( |\t)*1048576( |\t)*1048576( |\t)*1( |\t)*0( |\t)*0 NAMENODE/dir2</expected-output>
  7928. </comparator>
  7929. <comparator>
  7930. <type>RegexpComparator</type>
  7931. <expected-output>( |\t)*10( |\t)*9( |\t)*1048576( |\t)*1048576( |\t)*1( |\t)*0( |\t)*0 NAMENODE/dir3</expected-output>
  7932. </comparator>
  7933. <comparator>
  7934. <type>RegexpComparator</type>
  7935. <expected-output>( |\t)*10( |\t)*9( |\t)*1048576( |\t)*1048576( |\t)*1( |\t)*0( |\t)*0 NAMENODE/dir4</expected-output>
  7936. </comparator>
  7937. </comparators>
  7938. </test>
  7939. <!-- Tests for chmod -->
  7940. <test> <!-- TESTED -->
  7941. <description>chmod: change permission(octal mode) of file in absolute path</description>
  7942. <test-commands>
  7943. <command>-fs NAMENODE -touchz /file1</command>
  7944. <command>-fs NAMENODE -chmod 777 /file1</command>
  7945. <command>-fs NAMENODE -ls /file1</command>
  7946. </test-commands>
  7947. <cleanup-commands>
  7948. <command>-fs NAMENODE -rm /file1</command>
  7949. </cleanup-commands>
  7950. <comparators>
  7951. <comparator>
  7952. <type>TokenComparator</type>
  7953. <expected-output>Found 1 items</expected-output>
  7954. </comparator>
  7955. <comparator>
  7956. <type>RegexpComparator</type>
  7957. <expected-output>^-rw-rw-rw-( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/file1</expected-output>
  7958. </comparator>
  7959. </comparators>
  7960. </test>
  7961. <test> <!-- TESTED -->
  7962. <description>chmod: change permission(octal mode) of file in relative path</description>
  7963. <test-commands>
  7964. <command>-fs NAMENODE -touchz file1</command>
  7965. <command>-fs NAMENODE -chmod 666 file1</command>
  7966. <command>-fs NAMENODE -ls file1</command>
  7967. </test-commands>
  7968. <cleanup-commands>
  7969. <command>-fs NAMENODE -rm file1</command>
  7970. </cleanup-commands>
  7971. <comparators>
  7972. <comparator>
  7973. <type>TokenComparator</type>
  7974. <expected-output>Found 1 items</expected-output>
  7975. </comparator>
  7976. <comparator>
  7977. <type>RegexpComparator</type>
  7978. <expected-output>^-rw-rw-rw-( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*file1</expected-output>
  7979. </comparator>
  7980. </comparators>
  7981. </test>
  7982. <test> <!-- TESTED -->
  7983. <description>chmod: change permission(octal mode) of directory in absolute path</description>
  7984. <test-commands>
  7985. <command>-fs NAMENODE -mkdir /dir0</command>
  7986. <command>-fs NAMENODE -mkdir /dir0/dir1</command>
  7987. <command>-fs NAMENODE -touchz /dir0/file0</command>
  7988. <command>-fs NAMENODE -touchz /dir0/dir1/file1</command>
  7989. <command>-fs NAMENODE -touchz /dir0/dir1/file2</command>
  7990. <command>-fs NAMENODE -chmod 777 /dir0/dir1</command>
  7991. <command>-fs NAMENODE -ls -R /dir0</command>
  7992. </test-commands>
  7993. <cleanup-commands>
  7994. <command>-fs NAMENODE -rm -r /dir0</command>
  7995. </cleanup-commands>
  7996. <comparators>
  7997. <comparator>
  7998. <type>RegexpComparator</type>
  7999. <expected-output>^drwxrwxrwx( )*-( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1</expected-output>
  8000. </comparator>
  8001. <comparator>
  8002. <type>RegexpComparator</type>
  8003. <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1/file1</expected-output>
  8004. </comparator>
  8005. <comparator>
  8006. <type>RegexpComparator</type>
  8007. <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1/file2</expected-output>
  8008. </comparator>
  8009. <comparator>
  8010. <type>RegexpComparator</type>
  8011. <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/file0</expected-output>
  8012. </comparator>
  8013. </comparators>
  8014. </test>
  8015. <test> <!-- TESTED -->
  8016. <description>chmod: change permission(octal mode) of directory in relative path</description>
  8017. <test-commands>
  8018. <command>-fs NAMENODE -mkdir dir0</command>
  8019. <command>-fs NAMENODE -mkdir dir0/dir1</command>
  8020. <command>-fs NAMENODE -touchz dir0/file0</command>
  8021. <command>-fs NAMENODE -touchz dir0/dir1/file1</command>
  8022. <command>-fs NAMENODE -touchz dir0/dir1/file2</command>
  8023. <command>-fs NAMENODE -chmod 777 dir0/dir1</command>
  8024. <command>-fs NAMENODE -ls -R dir0</command>
  8025. </test-commands>
  8026. <cleanup-commands>
  8027. <command>-fs NAMENODE -rm -r dir0</command>
  8028. </cleanup-commands>
  8029. <comparators>
  8030. <comparator>
  8031. <type>RegexpComparator</type>
  8032. <expected-output>^drwxrwxrwx( )*-( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/dir1</expected-output>
  8033. </comparator>
  8034. <comparator>
  8035. <type>RegexpComparator</type>
  8036. <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/dir1/file1</expected-output>
  8037. </comparator>
  8038. <comparator>
  8039. <type>RegexpComparator</type>
  8040. <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/dir1/file2</expected-output>
  8041. </comparator>
  8042. <comparator>
  8043. <type>RegexpComparator</type>
  8044. <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/file0</expected-output>
  8045. </comparator>
  8046. </comparators>
  8047. </test>
  8048. <test> <!-- TESTED -->
  8049. <description>chmod: change permission(normal mode) of file in absolute path</description>
  8050. <test-commands>
  8051. <command>-fs NAMENODE -touchz /file1</command>
  8052. <command>-fs NAMENODE -chmod a+rw /file1</command>
  8053. <command>-fs NAMENODE -ls /file1</command>
  8054. </test-commands>
  8055. <cleanup-commands>
  8056. <command>-fs NAMENODE -rm /file1</command>
  8057. </cleanup-commands>
  8058. <comparators>
  8059. <comparator>
  8060. <type>TokenComparator</type>
  8061. <expected-output>Found 1 items</expected-output>
  8062. </comparator>
  8063. <comparator>
  8064. <type>RegexpComparator</type>
  8065. <expected-output>^-rw-rw-rw-( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/file1</expected-output>
  8066. </comparator>
  8067. </comparators>
  8068. </test>
  8069. <test> <!-- TESTED -->
  8070. <description>chmod: change permission(normal mode) of file in relative path</description>
  8071. <test-commands>
  8072. <command>-fs NAMENODE -touchz file1</command>
  8073. <command>-fs NAMENODE -chmod a+rw file1</command>
  8074. <command>-fs NAMENODE -ls file1</command>
  8075. </test-commands>
  8076. <cleanup-commands>
  8077. <command>-fs NAMENODE -rm file1</command>
  8078. </cleanup-commands>
  8079. <comparators>
  8080. <comparator>
  8081. <type>TokenComparator</type>
  8082. <expected-output>Found 1 items</expected-output>
  8083. </comparator>
  8084. <comparator>
  8085. <type>RegexpComparator</type>
  8086. <expected-output>^-rw-rw-rw-( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*file1</expected-output>
  8087. </comparator>
  8088. </comparators>
  8089. </test>
  8090. <test> <!-- TESTED -->
  8091. <description>chmod: change permission(normal mode) of directory in absolute path</description>
  8092. <test-commands>
  8093. <command>-fs NAMENODE -mkdir /dir0</command>
  8094. <command>-fs NAMENODE -mkdir /dir0/dir1</command>
  8095. <command>-fs NAMENODE -touchz /dir0/file0</command>
  8096. <command>-fs NAMENODE -touchz /dir0/dir1/file1</command>
  8097. <command>-fs NAMENODE -touchz /dir0/dir1/file2</command>
  8098. <command>-fs NAMENODE -chmod a+rwx /dir0/dir1</command>
  8099. <command>-fs NAMENODE -ls -R /dir0</command>
  8100. </test-commands>
  8101. <cleanup-commands>
  8102. <command>-fs NAMENODE -rm -r /dir0</command>
  8103. </cleanup-commands>
  8104. <comparators>
  8105. <comparator>
  8106. <type>RegexpComparator</type>
  8107. <expected-output>^drwxrwxrwx( )*-( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1</expected-output>
  8108. </comparator>
  8109. <comparator>
  8110. <type>RegexpComparator</type>
  8111. <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1/file1</expected-output>
  8112. </comparator>
  8113. <comparator>
  8114. <type>RegexpComparator</type>
  8115. <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1/file2</expected-output>
  8116. </comparator>
  8117. <comparator>
  8118. <type>RegexpComparator</type>
  8119. <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/file0</expected-output>
  8120. </comparator>
  8121. </comparators>
  8122. </test>
  8123. <test> <!-- TESTED -->
  8124. <description>chmod: change permission(normal mode) of directory in relative path</description>
  8125. <test-commands>
  8126. <command>-fs NAMENODE -mkdir dir0</command>
  8127. <command>-fs NAMENODE -mkdir dir0/dir1</command>
  8128. <command>-fs NAMENODE -touchz dir0/file0</command>
  8129. <command>-fs NAMENODE -touchz dir0/dir1/file1</command>
  8130. <command>-fs NAMENODE -touchz dir0/dir1/file2</command>
  8131. <command>-fs NAMENODE -chmod a+rwx dir0/dir1</command>
  8132. <command>-fs NAMENODE -ls -R dir0</command>
  8133. </test-commands>
  8134. <cleanup-commands>
  8135. <command>-fs NAMENODE -rm -r dir0</command>
  8136. </cleanup-commands>
  8137. <comparators>
  8138. <comparator>
  8139. <type>RegexpComparator</type>
  8140. <expected-output>^drwxrwxrwx( )*-( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/dir1</expected-output>
  8141. </comparator>
  8142. <comparator>
  8143. <type>RegexpComparator</type>
  8144. <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/dir1/file1</expected-output>
  8145. </comparator>
  8146. <comparator>
  8147. <type>RegexpComparator</type>
  8148. <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/dir1/file2</expected-output>
  8149. </comparator>
  8150. <comparator>
  8151. <type>RegexpComparator</type>
  8152. <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/file0</expected-output>
  8153. </comparator>
  8154. </comparators>
  8155. </test>
  8156. <test> <!-- TESTED -->
  8157. <description>chmod: change permission(octal mode) of directory in absolute path recursively </description>
  8158. <test-commands>
  8159. <command>-fs NAMENODE -mkdir /dir0</command>
  8160. <command>-fs NAMENODE -mkdir /dir0/dir1</command>
  8161. <command>-fs NAMENODE -touchz /dir0/file0</command>
  8162. <command>-fs NAMENODE -touchz /dir0/dir1/file1</command>
  8163. <command>-fs NAMENODE -touchz /dir0/dir1/file2</command>
  8164. <command>-fs NAMENODE -chmod -R 777 /dir0/dir1</command>
  8165. <command>-fs NAMENODE -ls -R /dir0</command>
  8166. </test-commands>
  8167. <cleanup-commands>
  8168. <command>-fs NAMENODE -rm -r /dir0</command>
  8169. </cleanup-commands>
  8170. <comparators>
  8171. <comparator>
  8172. <type>RegexpComparator</type>
  8173. <expected-output>^drwxrwxrwx( )*-( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1</expected-output>
  8174. </comparator>
  8175. <comparator>
  8176. <type>RegexpComparator</type>
  8177. <expected-output>^-rw-rw-rw-( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1/file1</expected-output>
  8178. </comparator>
  8179. <comparator>
  8180. <type>RegexpComparator</type>
  8181. <expected-output>^-rw-rw-rw-( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1/file2</expected-output>
  8182. </comparator>
  8183. <comparator>
  8184. <type>RegexpComparator</type>
  8185. <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/file0</expected-output>
  8186. </comparator>
  8187. </comparators>
  8188. </test>
  8189. <test> <!-- TESTED -->
  8190. <description>chmod: change permission(octal mode) of directory in relative path recursively</description>
  8191. <test-commands>
  8192. <command>-fs NAMENODE -mkdir dir0</command>
  8193. <command>-fs NAMENODE -mkdir dir0/dir1</command>
  8194. <command>-fs NAMENODE -touchz dir0/file0</command>
  8195. <command>-fs NAMENODE -touchz dir0/dir1/file1</command>
  8196. <command>-fs NAMENODE -touchz dir0/dir1/file2</command>
  8197. <command>-fs NAMENODE -chmod -R 777 dir0/dir1</command>
  8198. <command>-fs NAMENODE -ls -R dir0</command>
  8199. </test-commands>
  8200. <cleanup-commands>
  8201. <command>-fs NAMENODE -rm -r dir0</command>
  8202. </cleanup-commands>
  8203. <comparators>
  8204. <comparator>
  8205. <type>RegexpComparator</type>
  8206. <expected-output>^drwxrwxrwx( )*-( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/dir1</expected-output>
  8207. </comparator>
  8208. <comparator>
  8209. <type>RegexpComparator</type>
  8210. <expected-output>^-rw-rw-rw-( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/dir1/file1</expected-output>
  8211. </comparator>
  8212. <comparator>
  8213. <type>RegexpComparator</type>
  8214. <expected-output>^-rw-rw-rw-( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/dir1/file2</expected-output>
  8215. </comparator>
  8216. <comparator>
  8217. <type>RegexpComparator</type>
  8218. <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/file0</expected-output>
  8219. </comparator>
  8220. </comparators>
  8221. </test>
  8222. <test> <!-- TESTED -->
  8223. <description>chmod: change permission(normal mode) of directory in absolute path recursively</description>
  8224. <test-commands>
  8225. <command>-fs NAMENODE -mkdir /dir0</command>
  8226. <command>-fs NAMENODE -mkdir /dir0/dir1</command>
  8227. <command>-fs NAMENODE -touchz /dir0/file0</command>
  8228. <command>-fs NAMENODE -touchz /dir0/dir1/file1</command>
  8229. <command>-fs NAMENODE -touchz /dir0/dir1/file2</command>
  8230. <command>-fs NAMENODE -chmod -R a+rwx /dir0/dir1</command>
  8231. <command>-fs NAMENODE -ls -R /dir0</command>
  8232. </test-commands>
  8233. <cleanup-commands>
  8234. <command>-fs NAMENODE -rm -r /dir0</command>
  8235. </cleanup-commands>
  8236. <comparators>
  8237. <comparator>
  8238. <type>RegexpComparator</type>
  8239. <expected-output>^drwxrwxrwx( )*-( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1</expected-output>
  8240. </comparator>
  8241. <comparator>
  8242. <type>RegexpComparator</type>
  8243. <expected-output>^-rw-rw-rw-( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1/file1</expected-output>
  8244. </comparator>
  8245. <comparator>
  8246. <type>RegexpComparator</type>
  8247. <expected-output>^-rw-rw-rw-( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1/file2</expected-output>
  8248. </comparator>
  8249. <comparator>
  8250. <type>RegexpComparator</type>
  8251. <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/file0</expected-output>
  8252. </comparator>
  8253. </comparators>
  8254. </test>
  8255. <test> <!-- TESTED -->
  8256. <description>chmod: change permission(normal mode) of directory in relative path recursively</description>
  8257. <test-commands>
  8258. <command>-fs NAMENODE -mkdir dir0</command>
  8259. <command>-fs NAMENODE -mkdir dir0/dir1</command>
  8260. <command>-fs NAMENODE -touchz dir0/file0</command>
  8261. <command>-fs NAMENODE -touchz dir0/dir1/file1</command>
  8262. <command>-fs NAMENODE -touchz dir0/dir1/file2</command>
  8263. <command>-fs NAMENODE -chmod -R a+rwx dir0/dir1</command>
  8264. <command>-fs NAMENODE -ls -R dir0</command>
  8265. </test-commands>
  8266. <cleanup-commands>
  8267. <command>-fs NAMENODE -rm -r dir0</command>
  8268. </cleanup-commands>
  8269. <comparators>
  8270. <comparator>
  8271. <type>RegexpComparator</type>
  8272. <expected-output>^drwxrwxrwx( )*-( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/dir1</expected-output>
  8273. </comparator>
  8274. <comparator>
  8275. <type>RegexpComparator</type>
  8276. <expected-output>^-rw-rw-rw-( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/dir1/file1</expected-output>
  8277. </comparator>
  8278. <comparator>
  8279. <type>RegexpComparator</type>
  8280. <expected-output>^-rw-rw-rw-( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/dir1/file2</expected-output>
  8281. </comparator>
  8282. <comparator>
  8283. <type>RegexpComparator</type>
  8284. <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/file0</expected-output>
  8285. </comparator>
  8286. </comparators>
  8287. </test>
  8288. <test> <!-- TESTED -->
  8289. <description>chmod: change permission(octal mode) of non existent file in absolute path</description>
  8290. <test-commands>
  8291. <command>-fs NAMENODE -chmod 777 /file1</command>
  8292. </test-commands>
  8293. <cleanup-commands>
  8294. <command>-fs NAMENODE -rm /file1</command>
  8295. </cleanup-commands>
  8296. <comparators>
  8297. <comparator>
  8298. <type>RegexpComparator</type>
  8299. <expected-output>^chmod: `/file1': No such file or directory</expected-output>
  8300. </comparator>
  8301. </comparators>
  8302. </test>
  8303. <test> <!-- TESTED -->
  8304. <description>chmod: change permission(octal mode) of non existent file in relative path</description>
  8305. <test-commands>
  8306. <command>-fs NAMENODE -chmod 666 file1</command>
  8307. </test-commands>
  8308. <cleanup-commands>
  8309. <command>-fs NAMENODE -rm file1</command>
  8310. </cleanup-commands>
  8311. <comparators>
  8312. <comparator>
  8313. <type>RegexpComparator</type>
  8314. <expected-output>^chmod: `file1': No such file or directory</expected-output>
  8315. </comparator>
  8316. </comparators>
  8317. </test>
  8318. <test> <!-- TESTED -->
  8319. <description>chmod: change permission(normal mode) of non existent file in absolute path</description>
  8320. <test-commands>
  8321. <command>-fs NAMENODE -chmod a+rw /file1</command>
  8322. </test-commands>
  8323. <cleanup-commands>
  8324. <command>-fs NAMENODE -rm /file1</command>
  8325. </cleanup-commands>
  8326. <comparators>
  8327. <comparator>
  8328. <type>RegexpComparator</type>
  8329. <expected-output>^chmod: `/file1': No such file or directory</expected-output>
  8330. </comparator>
  8331. </comparators>
  8332. </test>
  8333. <test> <!-- TESTED -->
  8334. <description>chmod: change permission(normal mode) of non existent file in relative path</description>
  8335. <test-commands>
  8336. <command>-fs NAMENODE -chmod a+rw file1</command>
  8337. </test-commands>
  8338. <cleanup-commands>
  8339. <command>-fs NAMENODE -rm file1</command>
  8340. </cleanup-commands>
  8341. <comparators>
  8342. <comparator>
  8343. <type>RegexpComparator</type>
  8344. <expected-output>^chmod: `file1': No such file or directory</expected-output>
  8345. </comparator>
  8346. </comparators>
  8347. </test>
  8348. <test> <!-- TESTED -->
  8349. <description>chmod: change permission(octal mode) of multiple files in absolute path using globbing</description>
  8350. <test-commands>
  8351. <command>-fs NAMENODE -touchz /file1</command>
  8352. <command>-fs NAMENODE -touchz /file2</command>
  8353. <command>-fs NAMENODE -touchz /file3</command>
  8354. <command>-fs NAMENODE -touchz /file4</command>
  8355. <command>-fs NAMENODE -chmod 777 /file* </command>
  8356. <command>-fs NAMENODE -ls -R /file*</command>
  8357. </test-commands>
  8358. <cleanup-commands>
  8359. <command>-fs NAMENODE -rm /file*</command>
  8360. </cleanup-commands>
  8361. <comparators>
  8362. <comparator>
  8363. <type>RegexpComparator</type>
  8364. <expected-output>^-rw-rw-rw-( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/file1</expected-output>
  8365. </comparator>
  8366. <comparator>
  8367. <type>RegexpComparator</type>
  8368. <expected-output>^-rw-rw-rw-( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/file2</expected-output>
  8369. </comparator>
  8370. <comparator>
  8371. <type>RegexpComparator</type>
  8372. <expected-output>^-rw-rw-rw-( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/file3</expected-output>
  8373. </comparator>
  8374. <comparator>
  8375. <type>RegexpComparator</type>
  8376. <expected-output>^-rw-rw-rw-( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/file4</expected-output>
  8377. </comparator>
  8378. </comparators>
  8379. </test>
  8380. <test> <!-- TESTED -->
  8381. <description>chmod: change permission(octal mode) of multiple files in relative path using globbing</description>
  8382. <test-commands>
  8383. <command>-fs NAMENODE -touchz file1</command>
  8384. <command>-fs NAMENODE -touchz file2</command>
  8385. <command>-fs NAMENODE -touchz file3</command>
  8386. <command>-fs NAMENODE -touchz file4</command>
  8387. <command>-fs NAMENODE -chmod 777 file* </command>
  8388. <command>-fs NAMENODE -ls -R file*</command>
  8389. </test-commands>
  8390. <cleanup-commands>
  8391. <command>-fs NAMENODE -rm file*</command>
  8392. </cleanup-commands>
  8393. <comparators>
  8394. <comparator>
  8395. <type>RegexpComparator</type>
  8396. <expected-output>^-rw-rw-rw-( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*file1</expected-output>
  8397. </comparator>
  8398. <comparator>
  8399. <type>RegexpComparator</type>
  8400. <expected-output>^-rw-rw-rw-( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*file2</expected-output>
  8401. </comparator>
  8402. <comparator>
  8403. <type>RegexpComparator</type>
  8404. <expected-output>^-rw-rw-rw-( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*file3</expected-output>
  8405. </comparator>
  8406. <comparator>
  8407. <type>RegexpComparator</type>
  8408. <expected-output>^-rw-rw-rw-( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*file4</expected-output>
  8409. </comparator>
  8410. </comparators>
  8411. </test>
  8412. <test> <!-- TESTED -->
  8413. <description>chmod: change permission(octal mode) of multiple directories in absolute path using globbing</description>
  8414. <test-commands>
  8415. <command>-fs NAMENODE -mkdir /dir0</command>
  8416. <command>-fs NAMENODE -mkdir /dir0/dir1</command>
  8417. <command>-fs NAMENODE -touchz /dir0/file0</command>
  8418. <command>-fs NAMENODE -touchz /dir0/dir1/file1</command>
  8419. <command>-fs NAMENODE -touchz /dir0/dir1/file2</command>
  8420. <command>-fs NAMENODE -mkdir /dir2</command>
  8421. <command>-fs NAMENODE -mkdir /dir2/dir1</command>
  8422. <command>-fs NAMENODE -touchz /dir2/file0</command>
  8423. <command>-fs NAMENODE -touchz /dir2/dir1/file1</command>
  8424. <command>-fs NAMENODE -touchz /dir2/dir1/file2</command>
  8425. <command>-fs NAMENODE -chmod 777 /dir*</command>
  8426. <command>-fs NAMENODE -ls -R /dir*</command>
  8427. </test-commands>
  8428. <cleanup-commands>
  8429. <command>-fs NAMENODE -rm -r /dir*</command>
  8430. </cleanup-commands>
  8431. <comparators>
  8432. <comparator>
  8433. <type>RegexpComparator</type>
  8434. <expected-output>^drwxr-xr-x( )*-( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1</expected-output>
  8435. </comparator>
  8436. <comparator>
  8437. <type>RegexpComparator</type>
  8438. <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1/file1</expected-output>
  8439. </comparator>
  8440. <comparator>
  8441. <type>RegexpComparator</type>
  8442. <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1/file2</expected-output>
  8443. </comparator>
  8444. <comparator>
  8445. <type>RegexpComparator</type>
  8446. <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/file0</expected-output>
  8447. </comparator>
  8448. <comparator>
  8449. <type>RegexpComparator</type>
  8450. <expected-output>^drwxr-xr-x( )*-( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir2/dir1</expected-output>
  8451. </comparator>
  8452. <comparator>
  8453. <type>RegexpComparator</type>
  8454. <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir2/dir1/file1</expected-output>
  8455. </comparator>
  8456. <comparator>
  8457. <type>RegexpComparator</type>
  8458. <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir2/dir1/file2</expected-output>
  8459. </comparator>
  8460. <comparator>
  8461. <type>RegexpComparator</type>
  8462. <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir2/file0</expected-output>
  8463. </comparator>
  8464. </comparators>
  8465. </test>
  8466. <test> <!-- TESTED -->
  8467. <description>chmod: change permission(octal mode) of multiple directories in relative path using globbing</description>
  8468. <test-commands>
  8469. <command>-fs NAMENODE -mkdir dir0</command>
  8470. <command>-fs NAMENODE -mkdir dir0/dir1</command>
  8471. <command>-fs NAMENODE -touchz dir0/file0</command>
  8472. <command>-fs NAMENODE -touchz dir0/dir1/file1</command>
  8473. <command>-fs NAMENODE -touchz dir0/dir1/file2</command>
  8474. <command>-fs NAMENODE -mkdir dir2</command>
  8475. <command>-fs NAMENODE -mkdir dir2/dir1</command>
  8476. <command>-fs NAMENODE -touchz dir2/file0</command>
  8477. <command>-fs NAMENODE -touchz dir2/dir1/file1</command>
  8478. <command>-fs NAMENODE -touchz dir2/dir1/file2</command>
  8479. <command>-fs NAMENODE -chmod 777 dir*</command>
  8480. <command>-fs NAMENODE -ls -R dir*</command>
  8481. </test-commands>
  8482. <cleanup-commands>
  8483. <command>-fs NAMENODE -rm -r dir*</command>
  8484. </cleanup-commands>
  8485. <comparators>
  8486. <comparator>
  8487. <type>RegexpComparator</type>
  8488. <expected-output>^drwxr-xr-x( )*-( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/dir1</expected-output>
  8489. </comparator>
  8490. <comparator>
  8491. <type>RegexpComparator</type>
  8492. <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/dir1/file1</expected-output>
  8493. </comparator>
  8494. <comparator>
  8495. <type>RegexpComparator</type>
  8496. <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/dir1/file2</expected-output>
  8497. </comparator>
  8498. <comparator>
  8499. <type>RegexpComparator</type>
  8500. <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/file0</expected-output>
  8501. </comparator>
  8502. <comparator>
  8503. <type>RegexpComparator</type>
  8504. <expected-output>^drwxr-xr-x( )*-( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir2/dir1</expected-output>
  8505. </comparator>
  8506. <comparator>
  8507. <type>RegexpComparator</type>
  8508. <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir2/dir1/file1</expected-output>
  8509. </comparator>
  8510. <comparator>
  8511. <type>RegexpComparator</type>
  8512. <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir2/dir1/file2</expected-output>
  8513. </comparator>
  8514. <comparator>
  8515. <type>RegexpComparator</type>
  8516. <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir2/file0</expected-output>
  8517. </comparator>
  8518. </comparators>
  8519. </test>
  8520. <test> <!-- TESTED -->
  8521. <description>chmod: change permission(octal mode) of multiple files in absolute path without globbing</description>
  8522. <test-commands>
  8523. <command>-fs NAMENODE -touchz /file1</command>
  8524. <command>-fs NAMENODE -touchz /file2</command>
  8525. <command>-fs NAMENODE -touchz /file3</command>
  8526. <command>-fs NAMENODE -touchz /file4</command>
  8527. <command>-fs NAMENODE -chmod 777 /file1 /file2 /file3 /file4 </command>
  8528. <command>-fs NAMENODE -ls -R /file*</command>
  8529. </test-commands>
  8530. <cleanup-commands>
  8531. <command>-fs NAMENODE -rm /file*</command>
  8532. </cleanup-commands>
  8533. <comparators>
  8534. <comparator>
  8535. <type>RegexpComparator</type>
  8536. <expected-output>^-rw-rw-rw-( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/file1</expected-output>
  8537. </comparator>
  8538. <comparator>
  8539. <type>RegexpComparator</type>
  8540. <expected-output>^-rw-rw-rw-( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/file2</expected-output>
  8541. </comparator>
  8542. <comparator>
  8543. <type>RegexpComparator</type>
  8544. <expected-output>^-rw-rw-rw-( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/file3</expected-output>
  8545. </comparator>
  8546. <comparator>
  8547. <type>RegexpComparator</type>
  8548. <expected-output>^-rw-rw-rw-( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/file4</expected-output>
  8549. </comparator>
  8550. </comparators>
  8551. </test>
  8552. <test> <!-- TESTED -->
  8553. <description>chmod: change permission(octal mode) of multiple files in relative path without globbing</description>
  8554. <test-commands>
  8555. <command>-fs NAMENODE -touchz file1</command>
  8556. <command>-fs NAMENODE -touchz file2</command>
  8557. <command>-fs NAMENODE -touchz file3</command>
  8558. <command>-fs NAMENODE -touchz file4</command>
  8559. <command>-fs NAMENODE -chmod 777 file1 file2 file3 file4 </command>
  8560. <command>-fs NAMENODE -ls -R file*</command>
  8561. </test-commands>
  8562. <cleanup-commands>
  8563. <command>-fs NAMENODE -rm file*</command>
  8564. </cleanup-commands>
  8565. <comparators>
  8566. <comparator>
  8567. <type>RegexpComparator</type>
  8568. <expected-output>^-rw-rw-rw-( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*file1</expected-output>
  8569. </comparator>
  8570. <comparator>
  8571. <type>RegexpComparator</type>
  8572. <expected-output>^-rw-rw-rw-( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*file2</expected-output>
  8573. </comparator>
  8574. <comparator>
  8575. <type>RegexpComparator</type>
  8576. <expected-output>^-rw-rw-rw-( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*file3</expected-output>
  8577. </comparator>
  8578. <comparator>
  8579. <type>RegexpComparator</type>
  8580. <expected-output>^-rw-rw-rw-( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*file4</expected-output>
  8581. </comparator>
  8582. </comparators>
  8583. </test>
  8584. <test> <!-- TESTED -->
  8585. <description>chmod: change permission(octal mode) of multiple directories in absolute path without globbing</description>
  8586. <test-commands>
  8587. <command>-fs NAMENODE -mkdir /dir0</command>
  8588. <command>-fs NAMENODE -mkdir /dir0/dir1</command>
  8589. <command>-fs NAMENODE -touchz /dir0/file0</command>
  8590. <command>-fs NAMENODE -touchz /dir0/dir1/file1</command>
  8591. <command>-fs NAMENODE -touchz /dir0/dir1/file2</command>
  8592. <command>-fs NAMENODE -mkdir /dir2</command>
  8593. <command>-fs NAMENODE -mkdir /dir2/dir1</command>
  8594. <command>-fs NAMENODE -touchz /dir2/file0</command>
  8595. <command>-fs NAMENODE -touchz /dir2/dir1/file1</command>
  8596. <command>-fs NAMENODE -touchz /dir2/dir1/file2</command>
  8597. <command>-fs NAMENODE -chmod 777 /dir0 /dir2</command>
  8598. <command>-fs NAMENODE -ls -R /dir*</command>
  8599. </test-commands>
  8600. <cleanup-commands>
  8601. <command>-fs NAMENODE -rm -r /dir*</command>
  8602. </cleanup-commands>
  8603. <comparators>
  8604. <comparator>
  8605. <type>RegexpComparator</type>
  8606. <expected-output>^drwxr-xr-x( )*-( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1</expected-output>
  8607. </comparator>
  8608. <comparator>
  8609. <type>RegexpComparator</type>
  8610. <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1/file1</expected-output>
  8611. </comparator>
  8612. <comparator>
  8613. <type>RegexpComparator</type>
  8614. <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1/file2</expected-output>
  8615. </comparator>
  8616. <comparator>
  8617. <type>RegexpComparator</type>
  8618. <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/file0</expected-output>
  8619. </comparator>
  8620. <comparator>
  8621. <type>RegexpComparator</type>
  8622. <expected-output>^drwxr-xr-x( )*-( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir2/dir1</expected-output>
  8623. </comparator>
  8624. <comparator>
  8625. <type>RegexpComparator</type>
  8626. <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir2/dir1/file1</expected-output>
  8627. </comparator>
  8628. <comparator>
  8629. <type>RegexpComparator</type>
  8630. <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir2/dir1/file2</expected-output>
  8631. </comparator>
  8632. <comparator>
  8633. <type>RegexpComparator</type>
  8634. <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir2/file0</expected-output>
  8635. </comparator>
  8636. </comparators>
  8637. </test>
  8638. <test> <!-- TESTED -->
  8639. <description>chmod: change permission(octal mode) of multiple directories in relative path without globbing</description>
  8640. <test-commands>
  8641. <command>-fs NAMENODE -mkdir dir0</command>
  8642. <command>-fs NAMENODE -mkdir dir0/dir1</command>
  8643. <command>-fs NAMENODE -touchz dir0/file0</command>
  8644. <command>-fs NAMENODE -touchz dir0/dir1/file1</command>
  8645. <command>-fs NAMENODE -touchz dir0/dir1/file2</command>
  8646. <command>-fs NAMENODE -mkdir dir2</command>
  8647. <command>-fs NAMENODE -mkdir dir2/dir1</command>
  8648. <command>-fs NAMENODE -touchz dir2/file0</command>
  8649. <command>-fs NAMENODE -touchz dir2/dir1/file1</command>
  8650. <command>-fs NAMENODE -touchz dir2/dir1/file2</command>
  8651. <command>-fs NAMENODE -chmod 777 dir0 dir2</command>
  8652. <command>-fs NAMENODE -ls -R dir*</command>
  8653. </test-commands>
  8654. <cleanup-commands>
  8655. <command>-fs NAMENODE -rm -r dir*</command>
  8656. </cleanup-commands>
  8657. <comparators>
  8658. <comparator>
  8659. <type>RegexpComparator</type>
  8660. <expected-output>^drwxr-xr-x( )*-( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/dir1</expected-output>
  8661. </comparator>
  8662. <comparator>
  8663. <type>RegexpComparator</type>
  8664. <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/dir1/file1</expected-output>
  8665. </comparator>
  8666. <comparator>
  8667. <type>RegexpComparator</type>
  8668. <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/dir1/file2</expected-output>
  8669. </comparator>
  8670. <comparator>
  8671. <type>RegexpComparator</type>
  8672. <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/file0</expected-output>
  8673. </comparator>
  8674. <comparator>
  8675. <type>RegexpComparator</type>
  8676. <expected-output>^drwxr-xr-x( )*-( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir2/dir1</expected-output>
  8677. </comparator>
  8678. <comparator>
  8679. <type>RegexpComparator</type>
  8680. <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir2/dir1/file1</expected-output>
  8681. </comparator>
  8682. <comparator>
  8683. <type>RegexpComparator</type>
  8684. <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir2/dir1/file2</expected-output>
  8685. </comparator>
  8686. <comparator>
  8687. <type>RegexpComparator</type>
  8688. <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir2/file0</expected-output>
  8689. </comparator>
  8690. </comparators>
  8691. </test>
  8692. <test> <!-- TESTED -->
  8693. <description>chmod: change permission(normal mode) of multiple files in absolute path using globbing</description>
  8694. <test-commands>
  8695. <command>-fs NAMENODE -touchz /file1</command>
  8696. <command>-fs NAMENODE -touchz /file2</command>
  8697. <command>-fs NAMENODE -touchz /file3</command>
  8698. <command>-fs NAMENODE -touchz /file4</command>
  8699. <command>-fs NAMENODE -chmod a+rw /file* </command>
  8700. <command>-fs NAMENODE -ls -R /file*</command>
  8701. </test-commands>
  8702. <cleanup-commands>
  8703. <command>-fs NAMENODE -rm /file*</command>
  8704. </cleanup-commands>
  8705. <comparators>
  8706. <comparator>
  8707. <type>RegexpComparator</type>
  8708. <expected-output>^-rw-rw-rw-( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/file1</expected-output>
  8709. </comparator>
  8710. <comparator>
  8711. <type>RegexpComparator</type>
  8712. <expected-output>^-rw-rw-rw-( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/file2</expected-output>
  8713. </comparator>
  8714. <comparator>
  8715. <type>RegexpComparator</type>
  8716. <expected-output>^-rw-rw-rw-( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/file3</expected-output>
  8717. </comparator>
  8718. <comparator>
  8719. <type>RegexpComparator</type>
  8720. <expected-output>^-rw-rw-rw-( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/file4</expected-output>
  8721. </comparator>
  8722. </comparators>
  8723. </test>
  8724. <test> <!-- TESTED -->
  8725. <description>chmod: change permission(normal mode) of multiple files in relative path using globbing</description>
  8726. <test-commands>
  8727. <command>-fs NAMENODE -touchz file1</command>
  8728. <command>-fs NAMENODE -touchz file2</command>
  8729. <command>-fs NAMENODE -touchz file3</command>
  8730. <command>-fs NAMENODE -touchz file4</command>
  8731. <command>-fs NAMENODE -chmod a+rw file* </command>
  8732. <command>-fs NAMENODE -ls -R file*</command>
  8733. </test-commands>
  8734. <cleanup-commands>
  8735. <command>-fs NAMENODE -rm file*</command>
  8736. </cleanup-commands>
  8737. <comparators>
  8738. <comparator>
  8739. <type>RegexpComparator</type>
  8740. <expected-output>^-rw-rw-rw-( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*file1</expected-output>
  8741. </comparator>
  8742. <comparator>
  8743. <type>RegexpComparator</type>
  8744. <expected-output>^-rw-rw-rw-( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*file2</expected-output>
  8745. </comparator>
  8746. <comparator>
  8747. <type>RegexpComparator</type>
  8748. <expected-output>^-rw-rw-rw-( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*file3</expected-output>
  8749. </comparator>
  8750. <comparator>
  8751. <type>RegexpComparator</type>
  8752. <expected-output>^-rw-rw-rw-( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*file4</expected-output>
  8753. </comparator>
  8754. </comparators>
  8755. </test>
  8756. <test> <!-- TESTED -->
  8757. <description>chmod: change permission(normal mode) of multiple directories in absolute path using globbing</description>
  8758. <test-commands>
  8759. <command>-fs NAMENODE -mkdir /dir0</command>
  8760. <command>-fs NAMENODE -mkdir /dir0/dir1</command>
  8761. <command>-fs NAMENODE -touchz /dir0/file0</command>
  8762. <command>-fs NAMENODE -touchz /dir0/dir1/file1</command>
  8763. <command>-fs NAMENODE -touchz /dir0/dir1/file2</command>
  8764. <command>-fs NAMENODE -mkdir /dir2</command>
  8765. <command>-fs NAMENODE -mkdir /dir2/dir1</command>
  8766. <command>-fs NAMENODE -touchz /dir2/file0</command>
  8767. <command>-fs NAMENODE -touchz /dir2/dir1/file1</command>
  8768. <command>-fs NAMENODE -touchz /dir2/dir1/file2</command>
  8769. <command>-fs NAMENODE -chmod a+rwx /dir*</command>
  8770. <command>-fs NAMENODE -ls -R /dir*</command>
  8771. </test-commands>
  8772. <cleanup-commands>
  8773. <command>-fs NAMENODE -rm -r /dir*</command>
  8774. </cleanup-commands>
  8775. <comparators>
  8776. <comparator>
  8777. <type>RegexpComparator</type>
  8778. <expected-output>^drwxr-xr-x( )*-( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1</expected-output>
  8779. </comparator>
  8780. <comparator>
  8781. <type>RegexpComparator</type>
  8782. <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1/file1</expected-output>
  8783. </comparator>
  8784. <comparator>
  8785. <type>RegexpComparator</type>
  8786. <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1/file2</expected-output>
  8787. </comparator>
  8788. <comparator>
  8789. <type>RegexpComparator</type>
  8790. <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/file0</expected-output>
  8791. </comparator>
  8792. <comparator>
  8793. <type>RegexpComparator</type>
  8794. <expected-output>^drwxr-xr-x( )*-( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir2/dir1</expected-output>
  8795. </comparator>
  8796. <comparator>
  8797. <type>RegexpComparator</type>
  8798. <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir2/dir1/file1</expected-output>
  8799. </comparator>
  8800. <comparator>
  8801. <type>RegexpComparator</type>
  8802. <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir2/dir1/file2</expected-output>
  8803. </comparator>
  8804. <comparator>
  8805. <type>RegexpComparator</type>
  8806. <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir2/file0</expected-output>
  8807. </comparator>
  8808. </comparators>
  8809. </test>
  8810. <test> <!-- TESTED -->
  8811. <description>chmod: change permission(normal mode) of multiple directories in relative path using globbing</description>
  8812. <test-commands>
  8813. <command>-fs NAMENODE -mkdir dir0</command>
  8814. <command>-fs NAMENODE -mkdir dir0/dir1</command>
  8815. <command>-fs NAMENODE -touchz dir0/file0</command>
  8816. <command>-fs NAMENODE -touchz dir0/dir1/file1</command>
  8817. <command>-fs NAMENODE -touchz dir0/dir1/file2</command>
  8818. <command>-fs NAMENODE -mkdir dir2</command>
  8819. <command>-fs NAMENODE -mkdir dir2/dir1</command>
  8820. <command>-fs NAMENODE -touchz dir2/file0</command>
  8821. <command>-fs NAMENODE -touchz dir2/dir1/file1</command>
  8822. <command>-fs NAMENODE -touchz dir2/dir1/file2</command>
  8823. <command>-fs NAMENODE -chmod a+rwx dir*</command>
  8824. <command>-fs NAMENODE -ls -R dir*</command>
  8825. </test-commands>
  8826. <cleanup-commands>
  8827. <command>-fs NAMENODE -rm -r dir*</command>
  8828. </cleanup-commands>
  8829. <comparators>
  8830. <comparator>
  8831. <type>RegexpComparator</type>
  8832. <expected-output>^drwxr-xr-x( )*-( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/dir1</expected-output>
  8833. </comparator>
  8834. <comparator>
  8835. <type>RegexpComparator</type>
  8836. <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/dir1/file1</expected-output>
  8837. </comparator>
  8838. <comparator>
  8839. <type>RegexpComparator</type>
  8840. <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/dir1/file2</expected-output>
  8841. </comparator>
  8842. <comparator>
  8843. <type>RegexpComparator</type>
  8844. <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/file0</expected-output>
  8845. </comparator>
  8846. <comparator>
  8847. <type>RegexpComparator</type>
  8848. <expected-output>^drwxr-xr-x( )*-( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir2/dir1</expected-output>
  8849. </comparator>
  8850. <comparator>
  8851. <type>RegexpComparator</type>
  8852. <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir2/dir1/file1</expected-output>
  8853. </comparator>
  8854. <comparator>
  8855. <type>RegexpComparator</type>
  8856. <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir2/dir1/file2</expected-output>
  8857. </comparator>
  8858. <comparator>
  8859. <type>RegexpComparator</type>
  8860. <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir2/file0</expected-output>
  8861. </comparator>
  8862. </comparators>
  8863. </test>
  8864. <test> <!-- TESTED -->
  8865. <description>chmod: change permission(normal mode) of multiple files in absolute path without globbing</description>
  8866. <test-commands>
  8867. <command>-fs NAMENODE -touchz /file1</command>
  8868. <command>-fs NAMENODE -touchz /file2</command>
  8869. <command>-fs NAMENODE -touchz /file3</command>
  8870. <command>-fs NAMENODE -touchz /file4</command>
  8871. <command>-fs NAMENODE -chmod a+rw /file1 /file2 /file3 /file4 </command>
  8872. <command>-fs NAMENODE -ls -R /file*</command>
  8873. </test-commands>
  8874. <cleanup-commands>
  8875. <command>-fs NAMENODE -rm /file*</command>
  8876. </cleanup-commands>
  8877. <comparators>
  8878. <comparator>
  8879. <type>RegexpComparator</type>
  8880. <expected-output>^-rw-rw-rw-( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/file1</expected-output>
  8881. </comparator>
  8882. <comparator>
  8883. <type>RegexpComparator</type>
  8884. <expected-output>^-rw-rw-rw-( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/file2</expected-output>
  8885. </comparator>
  8886. <comparator>
  8887. <type>RegexpComparator</type>
  8888. <expected-output>^-rw-rw-rw-( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/file3</expected-output>
  8889. </comparator>
  8890. <comparator>
  8891. <type>RegexpComparator</type>
  8892. <expected-output>^-rw-rw-rw-( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/file4</expected-output>
  8893. </comparator>
  8894. </comparators>
  8895. </test>
  8896. <test> <!-- TESTED -->
  8897. <description>chmod: change permission(normal mode) of multiple files in relative path without globbing</description>
  8898. <test-commands>
  8899. <command>-fs NAMENODE -touchz file1</command>
  8900. <command>-fs NAMENODE -touchz file2</command>
  8901. <command>-fs NAMENODE -touchz file3</command>
  8902. <command>-fs NAMENODE -touchz file4</command>
  8903. <command>-fs NAMENODE -chmod a+rw file1 file2 file3 file4 </command>
  8904. <command>-fs NAMENODE -ls -R file*</command>
  8905. </test-commands>
  8906. <cleanup-commands>
  8907. <command>-fs NAMENODE -rm file*</command>
  8908. </cleanup-commands>
  8909. <comparators>
  8910. <comparator>
  8911. <type>RegexpComparator</type>
  8912. <expected-output>^-rw-rw-rw-( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*file1</expected-output>
  8913. </comparator>
  8914. <comparator>
  8915. <type>RegexpComparator</type>
  8916. <expected-output>^-rw-rw-rw-( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*file2</expected-output>
  8917. </comparator>
  8918. <comparator>
  8919. <type>RegexpComparator</type>
  8920. <expected-output>^-rw-rw-rw-( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*file3</expected-output>
  8921. </comparator>
  8922. <comparator>
  8923. <type>RegexpComparator</type>
  8924. <expected-output>^-rw-rw-rw-( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*file4</expected-output>
  8925. </comparator>
  8926. </comparators>
  8927. </test>
  8928. <test> <!-- TESTED -->
  8929. <description>chmod: change permission(normal mode) of multiple directories in absolute path without globbing</description>
  8930. <test-commands>
  8931. <command>-fs NAMENODE -mkdir /dir0</command>
  8932. <command>-fs NAMENODE -mkdir /dir0/dir1</command>
  8933. <command>-fs NAMENODE -touchz /dir0/file0</command>
  8934. <command>-fs NAMENODE -touchz /dir0/dir1/file1</command>
  8935. <command>-fs NAMENODE -touchz /dir0/dir1/file2</command>
  8936. <command>-fs NAMENODE -mkdir /dir2</command>
  8937. <command>-fs NAMENODE -mkdir /dir2/dir1</command>
  8938. <command>-fs NAMENODE -touchz /dir2/file0</command>
  8939. <command>-fs NAMENODE -touchz /dir2/dir1/file1</command>
  8940. <command>-fs NAMENODE -touchz /dir2/dir1/file2</command>
  8941. <command>-fs NAMENODE -chmod a+rwx /dir0 /dir2</command>
  8942. <command>-fs NAMENODE -ls -R /dir*</command>
  8943. </test-commands>
  8944. <cleanup-commands>
  8945. <command>-fs NAMENODE -rm -r /dir*</command>
  8946. </cleanup-commands>
  8947. <comparators>
  8948. <comparator>
  8949. <type>RegexpComparator</type>
  8950. <expected-output>^drwxr-xr-x( )*-( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1</expected-output>
  8951. </comparator>
  8952. <comparator>
  8953. <type>RegexpComparator</type>
  8954. <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1/file1</expected-output>
  8955. </comparator>
  8956. <comparator>
  8957. <type>RegexpComparator</type>
  8958. <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1/file2</expected-output>
  8959. </comparator>
  8960. <comparator>
  8961. <type>RegexpComparator</type>
  8962. <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/file0</expected-output>
  8963. </comparator>
  8964. <comparator>
  8965. <type>RegexpComparator</type>
  8966. <expected-output>^drwxr-xr-x( )*-( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir2/dir1</expected-output>
  8967. </comparator>
  8968. <comparator>
  8969. <type>RegexpComparator</type>
  8970. <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir2/dir1/file1</expected-output>
  8971. </comparator>
  8972. <comparator>
  8973. <type>RegexpComparator</type>
  8974. <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir2/dir1/file2</expected-output>
  8975. </comparator>
  8976. <comparator>
  8977. <type>RegexpComparator</type>
  8978. <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir2/file0</expected-output>
  8979. </comparator>
  8980. </comparators>
  8981. </test>
  8982. <test> <!-- TESTED -->
  8983. <description>chmod: change permission(normal mode) of multiple directories in relative path without globbing</description>
  8984. <test-commands>
  8985. <command>-fs NAMENODE -mkdir dir0</command>
  8986. <command>-fs NAMENODE -mkdir 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 -mkdir dir2</command>
  8991. <command>-fs NAMENODE -mkdir dir2/dir1</command>
  8992. <command>-fs NAMENODE -touchz dir2/file0</command>
  8993. <command>-fs NAMENODE -touchz dir2/dir1/file1</command>
  8994. <command>-fs NAMENODE -touchz dir2/dir1/file2</command>
  8995. <command>-fs NAMENODE -chmod a+rwx dir0 dir2</command>
  8996. <command>-fs NAMENODE -ls -R dir*</command>
  8997. </test-commands>
  8998. <cleanup-commands>
  8999. <command>-fs NAMENODE -rm -r dir*</command>
  9000. </cleanup-commands>
  9001. <comparators>
  9002. <comparator>
  9003. <type>RegexpComparator</type>
  9004. <expected-output>^drwxr-xr-x( )*-( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/dir1</expected-output>
  9005. </comparator>
  9006. <comparator>
  9007. <type>RegexpComparator</type>
  9008. <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/dir1/file1</expected-output>
  9009. </comparator>
  9010. <comparator>
  9011. <type>RegexpComparator</type>
  9012. <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/dir1/file2</expected-output>
  9013. </comparator>
  9014. <comparator>
  9015. <type>RegexpComparator</type>
  9016. <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/file0</expected-output>
  9017. </comparator>
  9018. <comparator>
  9019. <type>RegexpComparator</type>
  9020. <expected-output>^drwxr-xr-x( )*-( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir2/dir1</expected-output>
  9021. </comparator>
  9022. <comparator>
  9023. <type>RegexpComparator</type>
  9024. <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir2/dir1/file1</expected-output>
  9025. </comparator>
  9026. <comparator>
  9027. <type>RegexpComparator</type>
  9028. <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir2/dir1/file2</expected-output>
  9029. </comparator>
  9030. <comparator>
  9031. <type>RegexpComparator</type>
  9032. <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir2/file0</expected-output>
  9033. </comparator>
  9034. </comparators>
  9035. </test>
  9036. <test> <!-- TESTED -->
  9037. <description>chmod: change permission(octal mode) of multiple directories in absolute path recursively using globbing</description>
  9038. <test-commands>
  9039. <command>-fs NAMENODE -mkdir /dir0</command>
  9040. <command>-fs NAMENODE -mkdir /dir0/dir1</command>
  9041. <command>-fs NAMENODE -touchz /dir0/file0</command>
  9042. <command>-fs NAMENODE -touchz /dir0/dir1/file1</command>
  9043. <command>-fs NAMENODE -touchz /dir0/dir1/file2</command>
  9044. <command>-fs NAMENODE -mkdir /dir2</command>
  9045. <command>-fs NAMENODE -mkdir /dir2/dir1</command>
  9046. <command>-fs NAMENODE -touchz /dir2/file0</command>
  9047. <command>-fs NAMENODE -touchz /dir2/dir1/file1</command>
  9048. <command>-fs NAMENODE -touchz /dir2/dir1/file2</command>
  9049. <command>-fs NAMENODE -chmod -R 777 /dir*</command>
  9050. <command>-fs NAMENODE -ls -R /dir*</command>
  9051. </test-commands>
  9052. <cleanup-commands>
  9053. <command>-fs NAMENODE -rm -r /dir*</command>
  9054. </cleanup-commands>
  9055. <comparators>
  9056. <comparator>
  9057. <type>RegexpComparator</type>
  9058. <expected-output>^drwxrwxrwx( )*-( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1</expected-output>
  9059. </comparator>
  9060. <comparator>
  9061. <type>RegexpComparator</type>
  9062. <expected-output>^-rw-rw-rw-( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1/file1</expected-output>
  9063. </comparator>
  9064. <comparator>
  9065. <type>RegexpComparator</type>
  9066. <expected-output>^-rw-rw-rw-( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1/file2</expected-output>
  9067. </comparator>
  9068. <comparator>
  9069. <type>RegexpComparator</type>
  9070. <expected-output>^-rw-rw-rw-( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/file0</expected-output>
  9071. </comparator>
  9072. <comparator>
  9073. <type>RegexpComparator</type>
  9074. <expected-output>^drwxrwxrwx( )*-( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir2/dir1</expected-output>
  9075. </comparator>
  9076. <comparator>
  9077. <type>RegexpComparator</type>
  9078. <expected-output>^-rw-rw-rw-( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir2/dir1/file1</expected-output>
  9079. </comparator>
  9080. <comparator>
  9081. <type>RegexpComparator</type>
  9082. <expected-output>^-rw-rw-rw-( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir2/dir1/file2</expected-output>
  9083. </comparator>
  9084. <comparator>
  9085. <type>RegexpComparator</type>
  9086. <expected-output>^-rw-rw-rw-( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir2/file0</expected-output>
  9087. </comparator>
  9088. </comparators>
  9089. </test>
  9090. <test> <!-- TESTED -->
  9091. <description>chmod: change permission(octal mode) of multiple directories in relative path recursively using globbing</description>
  9092. <test-commands>
  9093. <command>-fs NAMENODE -mkdir dir0</command>
  9094. <command>-fs NAMENODE -mkdir dir0/dir1</command>
  9095. <command>-fs NAMENODE -touchz dir0/file0</command>
  9096. <command>-fs NAMENODE -touchz dir0/dir1/file1</command>
  9097. <command>-fs NAMENODE -touchz dir0/dir1/file2</command>
  9098. <command>-fs NAMENODE -mkdir dir2</command>
  9099. <command>-fs NAMENODE -mkdir dir2/dir1</command>
  9100. <command>-fs NAMENODE -touchz dir2/file0</command>
  9101. <command>-fs NAMENODE -touchz dir2/dir1/file1</command>
  9102. <command>-fs NAMENODE -touchz dir2/dir1/file2</command>
  9103. <command>-fs NAMENODE -chmod -R 777 dir*</command>
  9104. <command>-fs NAMENODE -ls -R dir*</command>
  9105. </test-commands>
  9106. <cleanup-commands>
  9107. <command>-fs NAMENODE -rm -r dir*</command>
  9108. </cleanup-commands>
  9109. <comparators>
  9110. <comparator>
  9111. <type>RegexpComparator</type>
  9112. <expected-output>^drwxrwxrwx( )*-( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/dir1</expected-output>
  9113. </comparator>
  9114. <comparator>
  9115. <type>RegexpComparator</type>
  9116. <expected-output>^-rw-rw-rw-( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/dir1/file1</expected-output>
  9117. </comparator>
  9118. <comparator>
  9119. <type>RegexpComparator</type>
  9120. <expected-output>^-rw-rw-rw-( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/dir1/file2</expected-output>
  9121. </comparator>
  9122. <comparator>
  9123. <type>RegexpComparator</type>
  9124. <expected-output>^-rw-rw-rw-( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/file0</expected-output>
  9125. </comparator>
  9126. <comparator>
  9127. <type>RegexpComparator</type>
  9128. <expected-output>^drwxrwxrwx( )*-( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir2/dir1</expected-output>
  9129. </comparator>
  9130. <comparator>
  9131. <type>RegexpComparator</type>
  9132. <expected-output>^-rw-rw-rw-( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir2/dir1/file1</expected-output>
  9133. </comparator>
  9134. <comparator>
  9135. <type>RegexpComparator</type>
  9136. <expected-output>^-rw-rw-rw-( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir2/dir1/file2</expected-output>
  9137. </comparator>
  9138. <comparator>
  9139. <type>RegexpComparator</type>
  9140. <expected-output>^-rw-rw-rw-( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir2/file0</expected-output>
  9141. </comparator>
  9142. </comparators>
  9143. </test>
  9144. <test> <!-- TESTED -->
  9145. <description>chmod: change permission(octal mode) of multiple directories in absolute path recursively without globbing</description>
  9146. <test-commands>
  9147. <command>-fs NAMENODE -mkdir /dir0</command>
  9148. <command>-fs NAMENODE -mkdir /dir0/dir1</command>
  9149. <command>-fs NAMENODE -touchz /dir0/file0</command>
  9150. <command>-fs NAMENODE -touchz /dir0/dir1/file1</command>
  9151. <command>-fs NAMENODE -touchz /dir0/dir1/file2</command>
  9152. <command>-fs NAMENODE -mkdir /dir2</command>
  9153. <command>-fs NAMENODE -mkdir /dir2/dir1</command>
  9154. <command>-fs NAMENODE -touchz /dir2/file0</command>
  9155. <command>-fs NAMENODE -touchz /dir2/dir1/file1</command>
  9156. <command>-fs NAMENODE -touchz /dir2/dir1/file2</command>
  9157. <command>-fs NAMENODE -chmod -R 777 /dir0 /dir2</command>
  9158. <command>-fs NAMENODE -ls -R /dir*</command>
  9159. </test-commands>
  9160. <cleanup-commands>
  9161. <command>-fs NAMENODE -rm -r /dir*</command>
  9162. </cleanup-commands>
  9163. <comparators>
  9164. <comparator>
  9165. <type>RegexpComparator</type>
  9166. <expected-output>^drwxrwxrwx( )*-( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1</expected-output>
  9167. </comparator>
  9168. <comparator>
  9169. <type>RegexpComparator</type>
  9170. <expected-output>^-rw-rw-rw-( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1/file1</expected-output>
  9171. </comparator>
  9172. <comparator>
  9173. <type>RegexpComparator</type>
  9174. <expected-output>^-rw-rw-rw-( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1/file2</expected-output>
  9175. </comparator>
  9176. <comparator>
  9177. <type>RegexpComparator</type>
  9178. <expected-output>^-rw-rw-rw-( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/file0</expected-output>
  9179. </comparator>
  9180. <comparator>
  9181. <type>RegexpComparator</type>
  9182. <expected-output>^drwxrwxrwx( )*-( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir2/dir1</expected-output>
  9183. </comparator>
  9184. <comparator>
  9185. <type>RegexpComparator</type>
  9186. <expected-output>^-rw-rw-rw-( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir2/dir1/file1</expected-output>
  9187. </comparator>
  9188. <comparator>
  9189. <type>RegexpComparator</type>
  9190. <expected-output>^-rw-rw-rw-( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir2/dir1/file2</expected-output>
  9191. </comparator>
  9192. <comparator>
  9193. <type>RegexpComparator</type>
  9194. <expected-output>^-rw-rw-rw-( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir2/file0</expected-output>
  9195. </comparator>
  9196. </comparators>
  9197. </test>
  9198. <test> <!-- TESTED -->
  9199. <description>chmod: change permission(octal mode) of multiple directories in relative path recursively without globbing</description>
  9200. <test-commands>
  9201. <command>-fs NAMENODE -mkdir dir0</command>
  9202. <command>-fs NAMENODE -mkdir dir0/dir1</command>
  9203. <command>-fs NAMENODE -touchz dir0/file0</command>
  9204. <command>-fs NAMENODE -touchz dir0/dir1/file1</command>
  9205. <command>-fs NAMENODE -touchz dir0/dir1/file2</command>
  9206. <command>-fs NAMENODE -mkdir dir2</command>
  9207. <command>-fs NAMENODE -mkdir dir2/dir1</command>
  9208. <command>-fs NAMENODE -touchz dir2/file0</command>
  9209. <command>-fs NAMENODE -touchz dir2/dir1/file1</command>
  9210. <command>-fs NAMENODE -touchz dir2/dir1/file2</command>
  9211. <command>-fs NAMENODE -chmod -R 777 dir0 dir2</command>
  9212. <command>-fs NAMENODE -ls -R dir*</command>
  9213. </test-commands>
  9214. <cleanup-commands>
  9215. <command>-fs NAMENODE -rm -r dir*</command>
  9216. </cleanup-commands>
  9217. <comparators>
  9218. <comparator>
  9219. <type>RegexpComparator</type>
  9220. <expected-output>^drwxrwxrwx( )*-( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/dir1</expected-output>
  9221. </comparator>
  9222. <comparator>
  9223. <type>RegexpComparator</type>
  9224. <expected-output>^-rw-rw-rw-( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/dir1/file1</expected-output>
  9225. </comparator>
  9226. <comparator>
  9227. <type>RegexpComparator</type>
  9228. <expected-output>^-rw-rw-rw-( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/dir1/file2</expected-output>
  9229. </comparator>
  9230. <comparator>
  9231. <type>RegexpComparator</type>
  9232. <expected-output>^-rw-rw-rw-( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/file0</expected-output>
  9233. </comparator>
  9234. <comparator>
  9235. <type>RegexpComparator</type>
  9236. <expected-output>^drwxrwxrwx( )*-( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir2/dir1</expected-output>
  9237. </comparator>
  9238. <comparator>
  9239. <type>RegexpComparator</type>
  9240. <expected-output>^-rw-rw-rw-( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir2/dir1/file1</expected-output>
  9241. </comparator>
  9242. <comparator>
  9243. <type>RegexpComparator</type>
  9244. <expected-output>^-rw-rw-rw-( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir2/dir1/file2</expected-output>
  9245. </comparator>
  9246. <comparator>
  9247. <type>RegexpComparator</type>
  9248. <expected-output>^-rw-rw-rw-( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir2/file0</expected-output>
  9249. </comparator>
  9250. </comparators>
  9251. </test>
  9252. <test> <!-- TESTED -->
  9253. <description>chmod: change permission(normal mode) of multiple directories in absolute path recursively using globbing</description>
  9254. <test-commands>
  9255. <command>-fs NAMENODE -mkdir /dir0</command>
  9256. <command>-fs NAMENODE -mkdir /dir0/dir1</command>
  9257. <command>-fs NAMENODE -touchz /dir0/file0</command>
  9258. <command>-fs NAMENODE -touchz /dir0/dir1/file1</command>
  9259. <command>-fs NAMENODE -touchz /dir0/dir1/file2</command>
  9260. <command>-fs NAMENODE -mkdir /dir2</command>
  9261. <command>-fs NAMENODE -mkdir /dir2/dir1</command>
  9262. <command>-fs NAMENODE -touchz /dir2/file0</command>
  9263. <command>-fs NAMENODE -touchz /dir2/dir1/file1</command>
  9264. <command>-fs NAMENODE -touchz /dir2/dir1/file2</command>
  9265. <command>-fs NAMENODE -chmod -R a+rwx /dir*</command>
  9266. <command>-fs NAMENODE -ls -R /dir*</command>
  9267. </test-commands>
  9268. <cleanup-commands>
  9269. <command>-fs NAMENODE -rm -r /dir*</command>
  9270. </cleanup-commands>
  9271. <comparators>
  9272. <comparator>
  9273. <type>RegexpComparator</type>
  9274. <expected-output>^drwxrwxrwx( )*-( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1</expected-output>
  9275. </comparator>
  9276. <comparator>
  9277. <type>RegexpComparator</type>
  9278. <expected-output>^-rw-rw-rw-( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1/file1</expected-output>
  9279. </comparator>
  9280. <comparator>
  9281. <type>RegexpComparator</type>
  9282. <expected-output>^-rw-rw-rw-( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1/file2</expected-output>
  9283. </comparator>
  9284. <comparator>
  9285. <type>RegexpComparator</type>
  9286. <expected-output>^-rw-rw-rw-( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/file0</expected-output>
  9287. </comparator>
  9288. <comparator>
  9289. <type>RegexpComparator</type>
  9290. <expected-output>^drwxrwxrwx( )*-( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir2/dir1</expected-output>
  9291. </comparator>
  9292. <comparator>
  9293. <type>RegexpComparator</type>
  9294. <expected-output>^-rw-rw-rw-( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir2/dir1/file1</expected-output>
  9295. </comparator>
  9296. <comparator>
  9297. <type>RegexpComparator</type>
  9298. <expected-output>^-rw-rw-rw-( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir2/dir1/file2</expected-output>
  9299. </comparator>
  9300. <comparator>
  9301. <type>RegexpComparator</type>
  9302. <expected-output>^-rw-rw-rw-( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir2/file0</expected-output>
  9303. </comparator>
  9304. </comparators>
  9305. </test>
  9306. <test> <!-- TESTED -->
  9307. <description>chmod: change permission(normal mode) of multiple directories in relative path recursively using globbing</description>
  9308. <test-commands>
  9309. <command>-fs NAMENODE -mkdir dir0</command>
  9310. <command>-fs NAMENODE -mkdir dir0/dir1</command>
  9311. <command>-fs NAMENODE -touchz dir0/file0</command>
  9312. <command>-fs NAMENODE -touchz dir0/dir1/file1</command>
  9313. <command>-fs NAMENODE -touchz dir0/dir1/file2</command>
  9314. <command>-fs NAMENODE -mkdir dir2</command>
  9315. <command>-fs NAMENODE -mkdir dir2/dir1</command>
  9316. <command>-fs NAMENODE -touchz dir2/file0</command>
  9317. <command>-fs NAMENODE -touchz dir2/dir1/file1</command>
  9318. <command>-fs NAMENODE -touchz dir2/dir1/file2</command>
  9319. <command>-fs NAMENODE -chmod -R a+rwx dir*</command>
  9320. <command>-fs NAMENODE -ls -R dir*</command>
  9321. </test-commands>
  9322. <cleanup-commands>
  9323. <command>-fs NAMENODE -rm -r dir*</command>
  9324. </cleanup-commands>
  9325. <comparators>
  9326. <comparator>
  9327. <type>RegexpComparator</type>
  9328. <expected-output>^drwxrwxrwx( )*-( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/dir1</expected-output>
  9329. </comparator>
  9330. <comparator>
  9331. <type>RegexpComparator</type>
  9332. <expected-output>^-rw-rw-rw-( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/dir1/file1</expected-output>
  9333. </comparator>
  9334. <comparator>
  9335. <type>RegexpComparator</type>
  9336. <expected-output>^-rw-rw-rw-( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/dir1/file2</expected-output>
  9337. </comparator>
  9338. <comparator>
  9339. <type>RegexpComparator</type>
  9340. <expected-output>^-rw-rw-rw-( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/file0</expected-output>
  9341. </comparator>
  9342. <comparator>
  9343. <type>RegexpComparator</type>
  9344. <expected-output>^drwxrwxrwx( )*-( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir2/dir1</expected-output>
  9345. </comparator>
  9346. <comparator>
  9347. <type>RegexpComparator</type>
  9348. <expected-output>^-rw-rw-rw-( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir2/dir1/file1</expected-output>
  9349. </comparator>
  9350. <comparator>
  9351. <type>RegexpComparator</type>
  9352. <expected-output>^-rw-rw-rw-( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir2/dir1/file2</expected-output>
  9353. </comparator>
  9354. <comparator>
  9355. <type>RegexpComparator</type>
  9356. <expected-output>^-rw-rw-rw-( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir2/file0</expected-output>
  9357. </comparator>
  9358. </comparators>
  9359. </test>
  9360. <test> <!-- TESTED -->
  9361. <description>chmod: change permission(normal mode) of multiple directories in absolute path recursively without globbing</description>
  9362. <test-commands>
  9363. <command>-fs NAMENODE -mkdir /dir0</command>
  9364. <command>-fs NAMENODE -mkdir /dir0/dir1</command>
  9365. <command>-fs NAMENODE -touchz /dir0/file0</command>
  9366. <command>-fs NAMENODE -touchz /dir0/dir1/file1</command>
  9367. <command>-fs NAMENODE -touchz /dir0/dir1/file2</command>
  9368. <command>-fs NAMENODE -mkdir /dir2</command>
  9369. <command>-fs NAMENODE -mkdir /dir2/dir1</command>
  9370. <command>-fs NAMENODE -touchz /dir2/file0</command>
  9371. <command>-fs NAMENODE -touchz /dir2/dir1/file1</command>
  9372. <command>-fs NAMENODE -touchz /dir2/dir1/file2</command>
  9373. <command>-fs NAMENODE -chmod -R a+rwx /dir0 /dir2</command>
  9374. <command>-fs NAMENODE -ls -R /dir*</command>
  9375. </test-commands>
  9376. <cleanup-commands>
  9377. <command>-fs NAMENODE -rm -r /dir*</command>
  9378. </cleanup-commands>
  9379. <comparators>
  9380. <comparator>
  9381. <type>RegexpComparator</type>
  9382. <expected-output>^drwxrwxrwx( )*-( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1</expected-output>
  9383. </comparator>
  9384. <comparator>
  9385. <type>RegexpComparator</type>
  9386. <expected-output>^-rw-rw-rw-( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1/file1</expected-output>
  9387. </comparator>
  9388. <comparator>
  9389. <type>RegexpComparator</type>
  9390. <expected-output>^-rw-rw-rw-( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1/file2</expected-output>
  9391. </comparator>
  9392. <comparator>
  9393. <type>RegexpComparator</type>
  9394. <expected-output>^-rw-rw-rw-( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/file0</expected-output>
  9395. </comparator>
  9396. <comparator>
  9397. <type>RegexpComparator</type>
  9398. <expected-output>^drwxrwxrwx( )*-( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir2/dir1</expected-output>
  9399. </comparator>
  9400. <comparator>
  9401. <type>RegexpComparator</type>
  9402. <expected-output>^-rw-rw-rw-( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir2/dir1/file1</expected-output>
  9403. </comparator>
  9404. <comparator>
  9405. <type>RegexpComparator</type>
  9406. <expected-output>^-rw-rw-rw-( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir2/dir1/file2</expected-output>
  9407. </comparator>
  9408. <comparator>
  9409. <type>RegexpComparator</type>
  9410. <expected-output>^-rw-rw-rw-( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir2/file0</expected-output>
  9411. </comparator>
  9412. </comparators>
  9413. </test>
  9414. <test> <!-- TESTED -->
  9415. <description>chmod: change permission(normal mode) of multiple directories in relative path recursively without globbing</description>
  9416. <test-commands>
  9417. <command>-fs NAMENODE -mkdir dir0</command>
  9418. <command>-fs NAMENODE -mkdir dir0/dir1</command>
  9419. <command>-fs NAMENODE -touchz dir0/file0</command>
  9420. <command>-fs NAMENODE -touchz dir0/dir1/file1</command>
  9421. <command>-fs NAMENODE -touchz dir0/dir1/file2</command>
  9422. <command>-fs NAMENODE -mkdir dir2</command>
  9423. <command>-fs NAMENODE -mkdir dir2/dir1</command>
  9424. <command>-fs NAMENODE -touchz dir2/file0</command>
  9425. <command>-fs NAMENODE -touchz dir2/dir1/file1</command>
  9426. <command>-fs NAMENODE -touchz dir2/dir1/file2</command>
  9427. <command>-fs NAMENODE -chmod -R a+rwx dir0 dir2</command>
  9428. <command>-fs NAMENODE -ls -R dir*</command>
  9429. </test-commands>
  9430. <cleanup-commands>
  9431. <command>-fs NAMENODE -rm -r dir*</command>
  9432. </cleanup-commands>
  9433. <comparators>
  9434. <comparator>
  9435. <type>RegexpComparator</type>
  9436. <expected-output>^drwxrwxrwx( )*-( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/dir1</expected-output>
  9437. </comparator>
  9438. <comparator>
  9439. <type>RegexpComparator</type>
  9440. <expected-output>^-rw-rw-rw-( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/dir1/file1</expected-output>
  9441. </comparator>
  9442. <comparator>
  9443. <type>RegexpComparator</type>
  9444. <expected-output>^-rw-rw-rw-( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/dir1/file2</expected-output>
  9445. </comparator>
  9446. <comparator>
  9447. <type>RegexpComparator</type>
  9448. <expected-output>^-rw-rw-rw-( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/file0</expected-output>
  9449. </comparator>
  9450. <comparator>
  9451. <type>RegexpComparator</type>
  9452. <expected-output>^drwxrwxrwx( )*-( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir2/dir1</expected-output>
  9453. </comparator>
  9454. <comparator>
  9455. <type>RegexpComparator</type>
  9456. <expected-output>^-rw-rw-rw-( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir2/dir1/file1</expected-output>
  9457. </comparator>
  9458. <comparator>
  9459. <type>RegexpComparator</type>
  9460. <expected-output>^-rw-rw-rw-( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir2/dir1/file2</expected-output>
  9461. </comparator>
  9462. <comparator>
  9463. <type>RegexpComparator</type>
  9464. <expected-output>^-rw-rw-rw-( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir2/file0</expected-output>
  9465. </comparator>
  9466. </comparators>
  9467. </test>
  9468. <test> <!-- TESTED -->
  9469. <description>chmod: invalid value in octal mode of file in absolute path</description>
  9470. <test-commands>
  9471. <command>-fs NAMENODE -touchz /file1</command>
  9472. <command>-fs NAMENODE -chmod 999 /file1</command>
  9473. </test-commands>
  9474. <cleanup-commands>
  9475. <command>-fs NAMENODE -rm /file1</command>
  9476. </cleanup-commands>
  9477. <comparators>
  9478. <comparator>
  9479. <type>RegexpComparator</type>
  9480. <expected-output>^-chmod: chmod : mode '999' does not match the expected pattern.</expected-output>
  9481. </comparator>
  9482. </comparators>
  9483. </test>
  9484. <test> <!-- TESTED -->
  9485. <description>chmod: invalid value in octal mode of file in relative path</description>
  9486. <test-commands>
  9487. <command>-fs NAMENODE -touchz file1</command>
  9488. <command>-fs NAMENODE -chmod 999 file1</command>
  9489. </test-commands>
  9490. <cleanup-commands>
  9491. <command>-fs NAMENODE -rm file1</command>
  9492. </cleanup-commands>
  9493. <comparators>
  9494. <comparator>
  9495. <type>RegexpComparator</type>
  9496. <expected-output>^-chmod: chmod : mode '999' does not match the expected pattern.</expected-output>
  9497. </comparator>
  9498. </comparators>
  9499. </test>
  9500. <test> <!-- TESTED -->
  9501. <description>chmod: invalid value in normal mode of file in absolute path</description>
  9502. <test-commands>
  9503. <command>-fs NAMENODE -touchz /file1</command>
  9504. <command>-fs NAMENODE -chmod r+def /file1</command>
  9505. </test-commands>
  9506. <cleanup-commands>
  9507. <command>-fs NAMENODE -rm /file1</command>
  9508. </cleanup-commands>
  9509. <comparators>
  9510. <comparator>
  9511. <type>RegexpComparator</type>
  9512. <expected-output>^-chmod: chmod : mode \'r\+def\' does not match the expected pattern.</expected-output>
  9513. </comparator>
  9514. </comparators>
  9515. </test>
  9516. <test> <!-- TESTED -->
  9517. <description>chmod: invalid value in normal mode of file in relative path</description>
  9518. <test-commands>
  9519. <command>-fs NAMENODE -touchz file1</command>
  9520. <command>-fs NAMENODE -chmod r+def file1</command>
  9521. </test-commands>
  9522. <cleanup-commands>
  9523. <command>-fs NAMENODE -rm file1</command>
  9524. </cleanup-commands>
  9525. <comparators>
  9526. <comparator>
  9527. <type>RegexpComparator</type>
  9528. <expected-output>^-chmod: chmod : mode \'r\+def\' does not match the expected pattern.</expected-output>
  9529. </comparator>
  9530. </comparators>
  9531. </test>
  9532. <test> <!-- TESTED -->
  9533. <description>chmod: change permission(octal mode) of file in hdfs:// path</description>
  9534. <test-commands>
  9535. <command>-fs NAMENODE -touchz hdfs:///file1</command>
  9536. <command>-fs NAMENODE -chmod 777 hdfs:///file1</command>
  9537. <command>-fs NAMENODE -ls hdfs:///file1</command>
  9538. </test-commands>
  9539. <cleanup-commands>
  9540. <command>-fs NAMENODE -rm hdfs:///file1</command>
  9541. </cleanup-commands>
  9542. <comparators>
  9543. <comparator>
  9544. <type>TokenComparator</type>
  9545. <expected-output>Found 1 items</expected-output>
  9546. </comparator>
  9547. <comparator>
  9548. <type>RegexpComparator</type>
  9549. <expected-output>^-rw-rw-rw-( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///file1</expected-output>
  9550. </comparator>
  9551. </comparators>
  9552. </test>
  9553. <test> <!-- TESTED -->
  9554. <description>chmod: change permission(octal mode) of directory in hdfs:// path</description>
  9555. <test-commands>
  9556. <command>-fs NAMENODE -mkdir hdfs:///dir0</command>
  9557. <command>-fs NAMENODE -mkdir hdfs:///dir0/dir1</command>
  9558. <command>-fs NAMENODE -touchz hdfs:///dir0/file0</command>
  9559. <command>-fs NAMENODE -touchz hdfs:///dir0/dir1/file1</command>
  9560. <command>-fs NAMENODE -touchz hdfs:///dir0/dir1/file2</command>
  9561. <command>-fs NAMENODE -chmod 777 hdfs:///dir0/dir1</command>
  9562. <command>-fs NAMENODE -ls -R hdfs:///dir0</command>
  9563. </test-commands>
  9564. <cleanup-commands>
  9565. <command>-fs NAMENODE -rm -r hdfs:///dir0</command>
  9566. </cleanup-commands>
  9567. <comparators>
  9568. <comparator>
  9569. <type>RegexpComparator</type>
  9570. <expected-output>^drwxrwxrwx( )*-( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir0/dir1</expected-output>
  9571. </comparator>
  9572. <comparator>
  9573. <type>RegexpComparator</type>
  9574. <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir0/dir1/file1</expected-output>
  9575. </comparator>
  9576. <comparator>
  9577. <type>RegexpComparator</type>
  9578. <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir0/dir1/file2</expected-output>
  9579. </comparator>
  9580. <comparator>
  9581. <type>RegexpComparator</type>
  9582. <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir0/file0</expected-output>
  9583. </comparator>
  9584. </comparators>
  9585. </test>
  9586. <test> <!-- TESTED -->
  9587. <description>chmod: change permission(normal mode) of file in hdfs:// path</description>
  9588. <test-commands>
  9589. <command>-fs NAMENODE -touchz hdfs:///file1</command>
  9590. <command>-fs NAMENODE -chmod a+rw hdfs:///file1</command>
  9591. <command>-fs NAMENODE -ls hdfs:///file1</command>
  9592. </test-commands>
  9593. <cleanup-commands>
  9594. <command>-fs NAMENODE -rm hdfs:///file1</command>
  9595. </cleanup-commands>
  9596. <comparators>
  9597. <comparator>
  9598. <type>TokenComparator</type>
  9599. <expected-output>Found 1 items</expected-output>
  9600. </comparator>
  9601. <comparator>
  9602. <type>RegexpComparator</type>
  9603. <expected-output>^-rw-rw-rw-( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///file1</expected-output>
  9604. </comparator>
  9605. </comparators>
  9606. </test>
  9607. <test> <!-- TESTED -->
  9608. <description>chmod: change permission(normal mode) of directory in hdfs:// path</description>
  9609. <test-commands>
  9610. <command>-fs NAMENODE -mkdir hdfs:///dir0</command>
  9611. <command>-fs NAMENODE -mkdir hdfs:///dir0/dir1</command>
  9612. <command>-fs NAMENODE -touchz hdfs:///dir0/file0</command>
  9613. <command>-fs NAMENODE -touchz hdfs:///dir0/dir1/file1</command>
  9614. <command>-fs NAMENODE -touchz hdfs:///dir0/dir1/file2</command>
  9615. <command>-fs NAMENODE -chmod a+rwx hdfs:///dir0/dir1</command>
  9616. <command>-fs NAMENODE -ls -R hdfs:///dir0</command>
  9617. </test-commands>
  9618. <cleanup-commands>
  9619. <command>-fs NAMENODE -rm -r hdfs:///dir0</command>
  9620. </cleanup-commands>
  9621. <comparators>
  9622. <comparator>
  9623. <type>RegexpComparator</type>
  9624. <expected-output>^drwxrwxrwx( )*-( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir0/dir1</expected-output>
  9625. </comparator>
  9626. <comparator>
  9627. <type>RegexpComparator</type>
  9628. <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir0/dir1/file1</expected-output>
  9629. </comparator>
  9630. <comparator>
  9631. <type>RegexpComparator</type>
  9632. <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir0/dir1/file2</expected-output>
  9633. </comparator>
  9634. <comparator>
  9635. <type>RegexpComparator</type>
  9636. <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir0/file0</expected-output>
  9637. </comparator>
  9638. </comparators>
  9639. </test>
  9640. <test> <!-- TESTED -->
  9641. <description>chmod: change permission(octal mode) of directory in hdfs:// path recursively </description>
  9642. <test-commands>
  9643. <command>-fs NAMENODE -mkdir hdfs:///dir0</command>
  9644. <command>-fs NAMENODE -mkdir hdfs:///dir0/dir1</command>
  9645. <command>-fs NAMENODE -touchz hdfs:///dir0/file0</command>
  9646. <command>-fs NAMENODE -touchz hdfs:///dir0/dir1/file1</command>
  9647. <command>-fs NAMENODE -touchz hdfs:///dir0/dir1/file2</command>
  9648. <command>-fs NAMENODE -chmod -R 777 hdfs:///dir0/dir1</command>
  9649. <command>-fs NAMENODE -ls -R hdfs:///dir0</command>
  9650. </test-commands>
  9651. <cleanup-commands>
  9652. <command>-fs NAMENODE -rm -r hdfs:///dir0</command>
  9653. </cleanup-commands>
  9654. <comparators>
  9655. <comparator>
  9656. <type>RegexpComparator</type>
  9657. <expected-output>^drwxrwxrwx( )*-( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir0/dir1</expected-output>
  9658. </comparator>
  9659. <comparator>
  9660. <type>RegexpComparator</type>
  9661. <expected-output>^-rw-rw-rw-( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir0/dir1/file1</expected-output>
  9662. </comparator>
  9663. <comparator>
  9664. <type>RegexpComparator</type>
  9665. <expected-output>^-rw-rw-rw-( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir0/dir1/file2</expected-output>
  9666. </comparator>
  9667. <comparator>
  9668. <type>RegexpComparator</type>
  9669. <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir0/file0</expected-output>
  9670. </comparator>
  9671. </comparators>
  9672. </test>
  9673. <test> <!-- TESTED -->
  9674. <description>chmod: change permission(normal mode) of directory in hdfs:// path recursively</description>
  9675. <test-commands>
  9676. <command>-fs NAMENODE -mkdir hdfs:///dir0</command>
  9677. <command>-fs NAMENODE -mkdir hdfs:///dir0/dir1</command>
  9678. <command>-fs NAMENODE -touchz hdfs:///dir0/file0</command>
  9679. <command>-fs NAMENODE -touchz hdfs:///dir0/dir1/file1</command>
  9680. <command>-fs NAMENODE -touchz hdfs:///dir0/dir1/file2</command>
  9681. <command>-fs NAMENODE -chmod -R a+rwx hdfs:///dir0/dir1</command>
  9682. <command>-fs NAMENODE -ls -R hdfs:///dir0</command>
  9683. </test-commands>
  9684. <cleanup-commands>
  9685. <command>-fs NAMENODE -rm -r hdfs:///dir0</command>
  9686. </cleanup-commands>
  9687. <comparators>
  9688. <comparator>
  9689. <type>RegexpComparator</type>
  9690. <expected-output>^drwxrwxrwx( )*-( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir0/dir1</expected-output>
  9691. </comparator>
  9692. <comparator>
  9693. <type>RegexpComparator</type>
  9694. <expected-output>^-rw-rw-rw-( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir0/dir1/file1</expected-output>
  9695. </comparator>
  9696. <comparator>
  9697. <type>RegexpComparator</type>
  9698. <expected-output>^-rw-rw-rw-( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir0/dir1/file2</expected-output>
  9699. </comparator>
  9700. <comparator>
  9701. <type>RegexpComparator</type>
  9702. <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir0/file0</expected-output>
  9703. </comparator>
  9704. </comparators>
  9705. </test>
  9706. <test> <!-- TESTED -->
  9707. <description>chmod: change permission(octal mode) of non existent file in hdfs:// path</description>
  9708. <test-commands>
  9709. <command>-fs NAMENODE -chmod 777 hdfs:///file1</command>
  9710. </test-commands>
  9711. <cleanup-commands>
  9712. <command>-fs NAMENODE -rm hdfs:///file1</command>
  9713. </cleanup-commands>
  9714. <comparators>
  9715. <comparator>
  9716. <type>RegexpComparator</type>
  9717. <expected-output>^chmod: `hdfs:///file1': No such file or directory</expected-output>
  9718. </comparator>
  9719. </comparators>
  9720. </test>
  9721. <test> <!-- TESTED -->
  9722. <description>chmod: change permission(normal mode) of non existent file in hdfs:// path</description>
  9723. <test-commands>
  9724. <command>-fs NAMENODE -chmod a+rw hdfs:///file1</command>
  9725. </test-commands>
  9726. <cleanup-commands>
  9727. <command>-fs NAMENODE -rm hdfs:///file1</command>
  9728. </cleanup-commands>
  9729. <comparators>
  9730. <comparator>
  9731. <type>RegexpComparator</type>
  9732. <expected-output>^chmod: `hdfs:///file1': No such file or directory</expected-output>
  9733. </comparator>
  9734. </comparators>
  9735. </test>
  9736. <test> <!-- TESTED -->
  9737. <description>chmod: change permission(octal mode) of multiple files in hdfs:// path using globbing</description>
  9738. <test-commands>
  9739. <command>-fs NAMENODE -touchz hdfs:///file1</command>
  9740. <command>-fs NAMENODE -touchz hdfs:///file2</command>
  9741. <command>-fs NAMENODE -touchz hdfs:///file3</command>
  9742. <command>-fs NAMENODE -touchz hdfs:///file4</command>
  9743. <command>-fs NAMENODE -chmod 777 hdfs:///file* </command>
  9744. <command>-fs NAMENODE -ls -R hdfs:///file*</command>
  9745. </test-commands>
  9746. <cleanup-commands>
  9747. <command>-fs NAMENODE -rm hdfs:///file*</command>
  9748. </cleanup-commands>
  9749. <comparators>
  9750. <comparator>
  9751. <type>RegexpComparator</type>
  9752. <expected-output>^-rw-rw-rw-( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///file1</expected-output>
  9753. </comparator>
  9754. <comparator>
  9755. <type>RegexpComparator</type>
  9756. <expected-output>^-rw-rw-rw-( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///file2</expected-output>
  9757. </comparator>
  9758. <comparator>
  9759. <type>RegexpComparator</type>
  9760. <expected-output>^-rw-rw-rw-( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///file3</expected-output>
  9761. </comparator>
  9762. <comparator>
  9763. <type>RegexpComparator</type>
  9764. <expected-output>^-rw-rw-rw-( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///file4</expected-output>
  9765. </comparator>
  9766. </comparators>
  9767. </test>
  9768. <test> <!-- TESTED -->
  9769. <description>chmod: change permission(octal mode) of multiple directories in hdfs:// path using globbing</description>
  9770. <test-commands>
  9771. <command>-fs NAMENODE -mkdir hdfs:///dir0</command>
  9772. <command>-fs NAMENODE -mkdir hdfs:///dir0/dir1</command>
  9773. <command>-fs NAMENODE -touchz hdfs:///dir0/file0</command>
  9774. <command>-fs NAMENODE -touchz hdfs:///dir0/dir1/file1</command>
  9775. <command>-fs NAMENODE -touchz hdfs:///dir0/dir1/file2</command>
  9776. <command>-fs NAMENODE -mkdir hdfs:///dir2</command>
  9777. <command>-fs NAMENODE -mkdir hdfs:///dir2/dir1</command>
  9778. <command>-fs NAMENODE -touchz hdfs:///dir2/file0</command>
  9779. <command>-fs NAMENODE -touchz hdfs:///dir2/dir1/file1</command>
  9780. <command>-fs NAMENODE -touchz hdfs:///dir2/dir1/file2</command>
  9781. <command>-fs NAMENODE -chmod 777 hdfs:///dir*</command>
  9782. <command>-fs NAMENODE -ls -R hdfs:///dir*</command>
  9783. </test-commands>
  9784. <cleanup-commands>
  9785. <command>-fs NAMENODE -rm -r hdfs:///dir*</command>
  9786. </cleanup-commands>
  9787. <comparators>
  9788. <comparator>
  9789. <type>RegexpComparator</type>
  9790. <expected-output>^drwxr-xr-x( )*-( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir0/dir1</expected-output>
  9791. </comparator>
  9792. <comparator>
  9793. <type>RegexpComparator</type>
  9794. <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir0/dir1/file1</expected-output>
  9795. </comparator>
  9796. <comparator>
  9797. <type>RegexpComparator</type>
  9798. <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir0/dir1/file2</expected-output>
  9799. </comparator>
  9800. <comparator>
  9801. <type>RegexpComparator</type>
  9802. <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir0/file0</expected-output>
  9803. </comparator>
  9804. <comparator>
  9805. <type>RegexpComparator</type>
  9806. <expected-output>^drwxr-xr-x( )*-( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir2/dir1</expected-output>
  9807. </comparator>
  9808. <comparator>
  9809. <type>RegexpComparator</type>
  9810. <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir2/dir1/file1</expected-output>
  9811. </comparator>
  9812. <comparator>
  9813. <type>RegexpComparator</type>
  9814. <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir2/dir1/file2</expected-output>
  9815. </comparator>
  9816. <comparator>
  9817. <type>RegexpComparator</type>
  9818. <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir2/file0</expected-output>
  9819. </comparator>
  9820. </comparators>
  9821. </test>
  9822. <test> <!-- TESTED -->
  9823. <description>chmod: change permission(octal mode) of multiple files in hdfs:// path without globbing</description>
  9824. <test-commands>
  9825. <command>-fs NAMENODE -touchz hdfs:///file1</command>
  9826. <command>-fs NAMENODE -touchz hdfs:///file2</command>
  9827. <command>-fs NAMENODE -touchz hdfs:///file3</command>
  9828. <command>-fs NAMENODE -touchz hdfs:///file4</command>
  9829. <command>-fs NAMENODE -chmod 777 hdfs:///file1 hdfs:///file2 hdfs:///file3 hdfs:///file4 </command>
  9830. <command>-fs NAMENODE -ls -R hdfs:///file*</command>
  9831. </test-commands>
  9832. <cleanup-commands>
  9833. <command>-fs NAMENODE -rm hdfs:///file*</command>
  9834. </cleanup-commands>
  9835. <comparators>
  9836. <comparator>
  9837. <type>RegexpComparator</type>
  9838. <expected-output>^-rw-rw-rw-( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///file1</expected-output>
  9839. </comparator>
  9840. <comparator>
  9841. <type>RegexpComparator</type>
  9842. <expected-output>^-rw-rw-rw-( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///file2</expected-output>
  9843. </comparator>
  9844. <comparator>
  9845. <type>RegexpComparator</type>
  9846. <expected-output>^-rw-rw-rw-( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///file3</expected-output>
  9847. </comparator>
  9848. <comparator>
  9849. <type>RegexpComparator</type>
  9850. <expected-output>^-rw-rw-rw-( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///file4</expected-output>
  9851. </comparator>
  9852. </comparators>
  9853. </test>
  9854. <test> <!-- TESTED -->
  9855. <description>chmod: change permission(octal mode) of multiple directories in hdfs:// path without globbing</description>
  9856. <test-commands>
  9857. <command>-fs NAMENODE -mkdir hdfs:///dir0</command>
  9858. <command>-fs NAMENODE -mkdir hdfs:///dir0/dir1</command>
  9859. <command>-fs NAMENODE -touchz hdfs:///dir0/file0</command>
  9860. <command>-fs NAMENODE -touchz hdfs:///dir0/dir1/file1</command>
  9861. <command>-fs NAMENODE -touchz hdfs:///dir0/dir1/file2</command>
  9862. <command>-fs NAMENODE -mkdir hdfs:///dir2</command>
  9863. <command>-fs NAMENODE -mkdir hdfs:///dir2/dir1</command>
  9864. <command>-fs NAMENODE -touchz hdfs:///dir2/file0</command>
  9865. <command>-fs NAMENODE -touchz hdfs:///dir2/dir1/file1</command>
  9866. <command>-fs NAMENODE -touchz hdfs:///dir2/dir1/file2</command>
  9867. <command>-fs NAMENODE -chmod 777 hdfs:///dir0 hdfs:///dir2</command>
  9868. <command>-fs NAMENODE -ls -R hdfs:///dir*</command>
  9869. </test-commands>
  9870. <cleanup-commands>
  9871. <command>-fs NAMENODE -rm -r hdfs:///dir*</command>
  9872. </cleanup-commands>
  9873. <comparators>
  9874. <comparator>
  9875. <type>RegexpComparator</type>
  9876. <expected-output>^drwxr-xr-x( )*-( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir0/dir1</expected-output>
  9877. </comparator>
  9878. <comparator>
  9879. <type>RegexpComparator</type>
  9880. <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir0/dir1/file1</expected-output>
  9881. </comparator>
  9882. <comparator>
  9883. <type>RegexpComparator</type>
  9884. <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir0/dir1/file2</expected-output>
  9885. </comparator>
  9886. <comparator>
  9887. <type>RegexpComparator</type>
  9888. <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir0/file0</expected-output>
  9889. </comparator>
  9890. <comparator>
  9891. <type>RegexpComparator</type>
  9892. <expected-output>^drwxr-xr-x( )*-( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir2/dir1</expected-output>
  9893. </comparator>
  9894. <comparator>
  9895. <type>RegexpComparator</type>
  9896. <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir2/dir1/file1</expected-output>
  9897. </comparator>
  9898. <comparator>
  9899. <type>RegexpComparator</type>
  9900. <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir2/dir1/file2</expected-output>
  9901. </comparator>
  9902. <comparator>
  9903. <type>RegexpComparator</type>
  9904. <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir2/file0</expected-output>
  9905. </comparator>
  9906. </comparators>
  9907. </test>
  9908. <test> <!-- TESTED -->
  9909. <description>chmod: change permission(normal mode) of multiple files in hdfs:// path using globbing</description>
  9910. <test-commands>
  9911. <command>-fs NAMENODE -touchz hdfs:///file1</command>
  9912. <command>-fs NAMENODE -touchz hdfs:///file2</command>
  9913. <command>-fs NAMENODE -touchz hdfs:///file3</command>
  9914. <command>-fs NAMENODE -touchz hdfs:///file4</command>
  9915. <command>-fs NAMENODE -chmod a+rw hdfs:///file* </command>
  9916. <command>-fs NAMENODE -ls -R hdfs:///file*</command>
  9917. </test-commands>
  9918. <cleanup-commands>
  9919. <command>-fs NAMENODE -rm hdfs:///file*</command>
  9920. </cleanup-commands>
  9921. <comparators>
  9922. <comparator>
  9923. <type>RegexpComparator</type>
  9924. <expected-output>^-rw-rw-rw-( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///file1</expected-output>
  9925. </comparator>
  9926. <comparator>
  9927. <type>RegexpComparator</type>
  9928. <expected-output>^-rw-rw-rw-( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///file2</expected-output>
  9929. </comparator>
  9930. <comparator>
  9931. <type>RegexpComparator</type>
  9932. <expected-output>^-rw-rw-rw-( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///file3</expected-output>
  9933. </comparator>
  9934. <comparator>
  9935. <type>RegexpComparator</type>
  9936. <expected-output>^-rw-rw-rw-( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///file4</expected-output>
  9937. </comparator>
  9938. </comparators>
  9939. </test>
  9940. <test> <!-- TESTED -->
  9941. <description>chmod: change permission(normal mode) of multiple directories in hdfs:// path using globbing</description>
  9942. <test-commands>
  9943. <command>-fs NAMENODE -mkdir hdfs:///dir0</command>
  9944. <command>-fs NAMENODE -mkdir hdfs:///dir0/dir1</command>
  9945. <command>-fs NAMENODE -touchz hdfs:///dir0/file0</command>
  9946. <command>-fs NAMENODE -touchz hdfs:///dir0/dir1/file1</command>
  9947. <command>-fs NAMENODE -touchz hdfs:///dir0/dir1/file2</command>
  9948. <command>-fs NAMENODE -mkdir hdfs:///dir2</command>
  9949. <command>-fs NAMENODE -mkdir hdfs:///dir2/dir1</command>
  9950. <command>-fs NAMENODE -touchz hdfs:///dir2/file0</command>
  9951. <command>-fs NAMENODE -touchz hdfs:///dir2/dir1/file1</command>
  9952. <command>-fs NAMENODE -touchz hdfs:///dir2/dir1/file2</command>
  9953. <command>-fs NAMENODE -chmod a+rwx hdfs:///dir*</command>
  9954. <command>-fs NAMENODE -ls -R hdfs:///dir*</command>
  9955. </test-commands>
  9956. <cleanup-commands>
  9957. <command>-fs NAMENODE -rm -r hdfs:///dir*</command>
  9958. </cleanup-commands>
  9959. <comparators>
  9960. <comparator>
  9961. <type>RegexpComparator</type>
  9962. <expected-output>^drwxr-xr-x( )*-( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir0/dir1</expected-output>
  9963. </comparator>
  9964. <comparator>
  9965. <type>RegexpComparator</type>
  9966. <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir0/dir1/file1</expected-output>
  9967. </comparator>
  9968. <comparator>
  9969. <type>RegexpComparator</type>
  9970. <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir0/dir1/file2</expected-output>
  9971. </comparator>
  9972. <comparator>
  9973. <type>RegexpComparator</type>
  9974. <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir0/file0</expected-output>
  9975. </comparator>
  9976. <comparator>
  9977. <type>RegexpComparator</type>
  9978. <expected-output>^drwxr-xr-x( )*-( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir2/dir1</expected-output>
  9979. </comparator>
  9980. <comparator>
  9981. <type>RegexpComparator</type>
  9982. <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir2/dir1/file1</expected-output>
  9983. </comparator>
  9984. <comparator>
  9985. <type>RegexpComparator</type>
  9986. <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir2/dir1/file2</expected-output>
  9987. </comparator>
  9988. <comparator>
  9989. <type>RegexpComparator</type>
  9990. <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir2/file0</expected-output>
  9991. </comparator>
  9992. </comparators>
  9993. </test>
  9994. <test> <!-- TESTED -->
  9995. <description>chmod: change permission(normal mode) of multiple files in hdfs:// path without globbing</description>
  9996. <test-commands>
  9997. <command>-fs NAMENODE -touchz hdfs:///file1</command>
  9998. <command>-fs NAMENODE -touchz hdfs:///file2</command>
  9999. <command>-fs NAMENODE -touchz hdfs:///file3</command>
  10000. <command>-fs NAMENODE -touchz hdfs:///file4</command>
  10001. <command>-fs NAMENODE -chmod a+rw hdfs:///file1 hdfs:///file2 hdfs:///file3 hdfs:///file4 </command>
  10002. <command>-fs NAMENODE -ls -R hdfs:///file*</command>
  10003. </test-commands>
  10004. <cleanup-commands>
  10005. <command>-fs NAMENODE -rm hdfs:///file*</command>
  10006. </cleanup-commands>
  10007. <comparators>
  10008. <comparator>
  10009. <type>RegexpComparator</type>
  10010. <expected-output>^-rw-rw-rw-( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///file1</expected-output>
  10011. </comparator>
  10012. <comparator>
  10013. <type>RegexpComparator</type>
  10014. <expected-output>^-rw-rw-rw-( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///file2</expected-output>
  10015. </comparator>
  10016. <comparator>
  10017. <type>RegexpComparator</type>
  10018. <expected-output>^-rw-rw-rw-( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///file3</expected-output>
  10019. </comparator>
  10020. <comparator>
  10021. <type>RegexpComparator</type>
  10022. <expected-output>^-rw-rw-rw-( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///file4</expected-output>
  10023. </comparator>
  10024. </comparators>
  10025. </test>
  10026. <test> <!-- TESTED -->
  10027. <description>chmod: change permission(normal mode) of multiple directories in hdfs:// path without globbing</description>
  10028. <test-commands>
  10029. <command>-fs NAMENODE -mkdir hdfs:///dir0</command>
  10030. <command>-fs NAMENODE -mkdir hdfs:///dir0/dir1</command>
  10031. <command>-fs NAMENODE -touchz hdfs:///dir0/file0</command>
  10032. <command>-fs NAMENODE -touchz hdfs:///dir0/dir1/file1</command>
  10033. <command>-fs NAMENODE -touchz hdfs:///dir0/dir1/file2</command>
  10034. <command>-fs NAMENODE -mkdir hdfs:///dir2</command>
  10035. <command>-fs NAMENODE -mkdir hdfs:///dir2/dir1</command>
  10036. <command>-fs NAMENODE -touchz hdfs:///dir2/file0</command>
  10037. <command>-fs NAMENODE -touchz hdfs:///dir2/dir1/file1</command>
  10038. <command>-fs NAMENODE -touchz hdfs:///dir2/dir1/file2</command>
  10039. <command>-fs NAMENODE -chmod a+rwx hdfs:///dir0 hdfs:///dir2</command>
  10040. <command>-fs NAMENODE -ls -R hdfs:///dir*</command>
  10041. </test-commands>
  10042. <cleanup-commands>
  10043. <command>-fs NAMENODE -rm -r hdfs:///dir*</command>
  10044. </cleanup-commands>
  10045. <comparators>
  10046. <comparator>
  10047. <type>RegexpComparator</type>
  10048. <expected-output>^drwxr-xr-x( )*-( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir0/dir1</expected-output>
  10049. </comparator>
  10050. <comparator>
  10051. <type>RegexpComparator</type>
  10052. <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir0/dir1/file1</expected-output>
  10053. </comparator>
  10054. <comparator>
  10055. <type>RegexpComparator</type>
  10056. <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir0/dir1/file2</expected-output>
  10057. </comparator>
  10058. <comparator>
  10059. <type>RegexpComparator</type>
  10060. <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir0/file0</expected-output>
  10061. </comparator>
  10062. <comparator>
  10063. <type>RegexpComparator</type>
  10064. <expected-output>^drwxr-xr-x( )*-( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir2/dir1</expected-output>
  10065. </comparator>
  10066. <comparator>
  10067. <type>RegexpComparator</type>
  10068. <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir2/dir1/file1</expected-output>
  10069. </comparator>
  10070. <comparator>
  10071. <type>RegexpComparator</type>
  10072. <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir2/dir1/file2</expected-output>
  10073. </comparator>
  10074. <comparator>
  10075. <type>RegexpComparator</type>
  10076. <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir2/file0</expected-output>
  10077. </comparator>
  10078. </comparators>
  10079. </test>
  10080. <test> <!-- TESTED -->
  10081. <description>chmod: change permission(octal mode) of multiple directories in hdfs:// path recursively using globbing</description>
  10082. <test-commands>
  10083. <command>-fs NAMENODE -mkdir hdfs:///dir0</command>
  10084. <command>-fs NAMENODE -mkdir hdfs:///dir0/dir1</command>
  10085. <command>-fs NAMENODE -touchz hdfs:///dir0/file0</command>
  10086. <command>-fs NAMENODE -touchz hdfs:///dir0/dir1/file1</command>
  10087. <command>-fs NAMENODE -touchz hdfs:///dir0/dir1/file2</command>
  10088. <command>-fs NAMENODE -mkdir hdfs:///dir2</command>
  10089. <command>-fs NAMENODE -mkdir hdfs:///dir2/dir1</command>
  10090. <command>-fs NAMENODE -touchz hdfs:///dir2/file0</command>
  10091. <command>-fs NAMENODE -touchz hdfs:///dir2/dir1/file1</command>
  10092. <command>-fs NAMENODE -touchz hdfs:///dir2/dir1/file2</command>
  10093. <command>-fs NAMENODE -chmod -R 777 hdfs:///dir*</command>
  10094. <command>-fs NAMENODE -ls -R hdfs:///dir*</command>
  10095. </test-commands>
  10096. <cleanup-commands>
  10097. <command>-fs NAMENODE -rm -r hdfs:///dir*</command>
  10098. </cleanup-commands>
  10099. <comparators>
  10100. <comparator>
  10101. <type>RegexpComparator</type>
  10102. <expected-output>^drwxrwxrwx( )*-( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir0/dir1</expected-output>
  10103. </comparator>
  10104. <comparator>
  10105. <type>RegexpComparator</type>
  10106. <expected-output>^-rw-rw-rw-( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir0/dir1/file1</expected-output>
  10107. </comparator>
  10108. <comparator>
  10109. <type>RegexpComparator</type>
  10110. <expected-output>^-rw-rw-rw-( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir0/dir1/file2</expected-output>
  10111. </comparator>
  10112. <comparator>
  10113. <type>RegexpComparator</type>
  10114. <expected-output>^-rw-rw-rw-( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir0/file0</expected-output>
  10115. </comparator>
  10116. <comparator>
  10117. <type>RegexpComparator</type>
  10118. <expected-output>^drwxrwxrwx( )*-( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir2/dir1</expected-output>
  10119. </comparator>
  10120. <comparator>
  10121. <type>RegexpComparator</type>
  10122. <expected-output>^-rw-rw-rw-( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir2/dir1/file1</expected-output>
  10123. </comparator>
  10124. <comparator>
  10125. <type>RegexpComparator</type>
  10126. <expected-output>^-rw-rw-rw-( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir2/dir1/file2</expected-output>
  10127. </comparator>
  10128. <comparator>
  10129. <type>RegexpComparator</type>
  10130. <expected-output>^-rw-rw-rw-( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir2/file0</expected-output>
  10131. </comparator>
  10132. </comparators>
  10133. </test>
  10134. <test> <!-- TESTED -->
  10135. <description>chmod: change permission(octal mode) of multiple directories in hdfs:// path recursively without globbing</description>
  10136. <test-commands>
  10137. <command>-fs NAMENODE -mkdir hdfs:///dir0</command>
  10138. <command>-fs NAMENODE -mkdir hdfs:///dir0/dir1</command>
  10139. <command>-fs NAMENODE -touchz hdfs:///dir0/file0</command>
  10140. <command>-fs NAMENODE -touchz hdfs:///dir0/dir1/file1</command>
  10141. <command>-fs NAMENODE -touchz hdfs:///dir0/dir1/file2</command>
  10142. <command>-fs NAMENODE -mkdir hdfs:///dir2</command>
  10143. <command>-fs NAMENODE -mkdir hdfs:///dir2/dir1</command>
  10144. <command>-fs NAMENODE -touchz hdfs:///dir2/file0</command>
  10145. <command>-fs NAMENODE -touchz hdfs:///dir2/dir1/file1</command>
  10146. <command>-fs NAMENODE -touchz hdfs:///dir2/dir1/file2</command>
  10147. <command>-fs NAMENODE -chmod -R 777 hdfs:///dir0 hdfs:///dir2</command>
  10148. <command>-fs NAMENODE -ls -R hdfs:///dir*</command>
  10149. </test-commands>
  10150. <cleanup-commands>
  10151. <command>-fs NAMENODE -rm -r hdfs:///dir*</command>
  10152. </cleanup-commands>
  10153. <comparators>
  10154. <comparator>
  10155. <type>RegexpComparator</type>
  10156. <expected-output>^drwxrwxrwx( )*-( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir0/dir1</expected-output>
  10157. </comparator>
  10158. <comparator>
  10159. <type>RegexpComparator</type>
  10160. <expected-output>^-rw-rw-rw-( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir0/dir1/file1</expected-output>
  10161. </comparator>
  10162. <comparator>
  10163. <type>RegexpComparator</type>
  10164. <expected-output>^-rw-rw-rw-( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir0/dir1/file2</expected-output>
  10165. </comparator>
  10166. <comparator>
  10167. <type>RegexpComparator</type>
  10168. <expected-output>^-rw-rw-rw-( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir0/file0</expected-output>
  10169. </comparator>
  10170. <comparator>
  10171. <type>RegexpComparator</type>
  10172. <expected-output>^drwxrwxrwx( )*-( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir2/dir1</expected-output>
  10173. </comparator>
  10174. <comparator>
  10175. <type>RegexpComparator</type>
  10176. <expected-output>^-rw-rw-rw-( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir2/dir1/file1</expected-output>
  10177. </comparator>
  10178. <comparator>
  10179. <type>RegexpComparator</type>
  10180. <expected-output>^-rw-rw-rw-( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir2/dir1/file2</expected-output>
  10181. </comparator>
  10182. <comparator>
  10183. <type>RegexpComparator</type>
  10184. <expected-output>^-rw-rw-rw-( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir2/file0</expected-output>
  10185. </comparator>
  10186. </comparators>
  10187. </test>
  10188. <test> <!-- TESTED -->
  10189. <description>chmod: change permission(normal mode) of multiple directories in hdfs:// path recursively using globbing</description>
  10190. <test-commands>
  10191. <command>-fs NAMENODE -mkdir hdfs:///dir0</command>
  10192. <command>-fs NAMENODE -mkdir hdfs:///dir0/dir1</command>
  10193. <command>-fs NAMENODE -touchz hdfs:///dir0/file0</command>
  10194. <command>-fs NAMENODE -touchz hdfs:///dir0/dir1/file1</command>
  10195. <command>-fs NAMENODE -touchz hdfs:///dir0/dir1/file2</command>
  10196. <command>-fs NAMENODE -mkdir hdfs:///dir2</command>
  10197. <command>-fs NAMENODE -mkdir hdfs:///dir2/dir1</command>
  10198. <command>-fs NAMENODE -touchz hdfs:///dir2/file0</command>
  10199. <command>-fs NAMENODE -touchz hdfs:///dir2/dir1/file1</command>
  10200. <command>-fs NAMENODE -touchz hdfs:///dir2/dir1/file2</command>
  10201. <command>-fs NAMENODE -chmod -R a+rwx hdfs:///dir*</command>
  10202. <command>-fs NAMENODE -ls -R hdfs:///dir*</command>
  10203. </test-commands>
  10204. <cleanup-commands>
  10205. <command>-fs NAMENODE -rm -r hdfs:///dir*</command>
  10206. </cleanup-commands>
  10207. <comparators>
  10208. <comparator>
  10209. <type>RegexpComparator</type>
  10210. <expected-output>^drwxrwxrwx( )*-( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir0/dir1</expected-output>
  10211. </comparator>
  10212. <comparator>
  10213. <type>RegexpComparator</type>
  10214. <expected-output>^-rw-rw-rw-( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir0/dir1/file1</expected-output>
  10215. </comparator>
  10216. <comparator>
  10217. <type>RegexpComparator</type>
  10218. <expected-output>^-rw-rw-rw-( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir0/dir1/file2</expected-output>
  10219. </comparator>
  10220. <comparator>
  10221. <type>RegexpComparator</type>
  10222. <expected-output>^-rw-rw-rw-( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir0/file0</expected-output>
  10223. </comparator>
  10224. <comparator>
  10225. <type>RegexpComparator</type>
  10226. <expected-output>^drwxrwxrwx( )*-( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir2/dir1</expected-output>
  10227. </comparator>
  10228. <comparator>
  10229. <type>RegexpComparator</type>
  10230. <expected-output>^-rw-rw-rw-( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir2/dir1/file1</expected-output>
  10231. </comparator>
  10232. <comparator>
  10233. <type>RegexpComparator</type>
  10234. <expected-output>^-rw-rw-rw-( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir2/dir1/file2</expected-output>
  10235. </comparator>
  10236. <comparator>
  10237. <type>RegexpComparator</type>
  10238. <expected-output>^-rw-rw-rw-( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir2/file0</expected-output>
  10239. </comparator>
  10240. </comparators>
  10241. </test>
  10242. <test> <!-- TESTED -->
  10243. <description>chmod: change permission(normal mode) of multiple directories in hdfs:// path recursively without globbing</description>
  10244. <test-commands>
  10245. <command>-fs NAMENODE -mkdir hdfs:///dir0</command>
  10246. <command>-fs NAMENODE -mkdir hdfs:///dir0/dir1</command>
  10247. <command>-fs NAMENODE -touchz hdfs:///dir0/file0</command>
  10248. <command>-fs NAMENODE -touchz hdfs:///dir0/dir1/file1</command>
  10249. <command>-fs NAMENODE -touchz hdfs:///dir0/dir1/file2</command>
  10250. <command>-fs NAMENODE -mkdir hdfs:///dir2</command>
  10251. <command>-fs NAMENODE -mkdir hdfs:///dir2/dir1</command>
  10252. <command>-fs NAMENODE -touchz hdfs:///dir2/file0</command>
  10253. <command>-fs NAMENODE -touchz hdfs:///dir2/dir1/file1</command>
  10254. <command>-fs NAMENODE -touchz hdfs:///dir2/dir1/file2</command>
  10255. <command>-fs NAMENODE -chmod -R a+rwx hdfs:///dir0 hdfs:///dir2</command>
  10256. <command>-fs NAMENODE -ls -R hdfs:///dir*</command>
  10257. </test-commands>
  10258. <cleanup-commands>
  10259. <command>-fs NAMENODE -rm -r hdfs:///dir*</command>
  10260. </cleanup-commands>
  10261. <comparators>
  10262. <comparator>
  10263. <type>RegexpComparator</type>
  10264. <expected-output>^drwxrwxrwx( )*-( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir0/dir1</expected-output>
  10265. </comparator>
  10266. <comparator>
  10267. <type>RegexpComparator</type>
  10268. <expected-output>^-rw-rw-rw-( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir0/dir1/file1</expected-output>
  10269. </comparator>
  10270. <comparator>
  10271. <type>RegexpComparator</type>
  10272. <expected-output>^-rw-rw-rw-( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir0/dir1/file2</expected-output>
  10273. </comparator>
  10274. <comparator>
  10275. <type>RegexpComparator</type>
  10276. <expected-output>^-rw-rw-rw-( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir0/file0</expected-output>
  10277. </comparator>
  10278. <comparator>
  10279. <type>RegexpComparator</type>
  10280. <expected-output>^drwxrwxrwx( )*-( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir2/dir1</expected-output>
  10281. </comparator>
  10282. <comparator>
  10283. <type>RegexpComparator</type>
  10284. <expected-output>^-rw-rw-rw-( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir2/dir1/file1</expected-output>
  10285. </comparator>
  10286. <comparator>
  10287. <type>RegexpComparator</type>
  10288. <expected-output>^-rw-rw-rw-( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir2/dir1/file2</expected-output>
  10289. </comparator>
  10290. <comparator>
  10291. <type>RegexpComparator</type>
  10292. <expected-output>^-rw-rw-rw-( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir2/file0</expected-output>
  10293. </comparator>
  10294. </comparators>
  10295. </test>
  10296. <test> <!-- TESTED -->
  10297. <description>chmod: invalid value in octal mode of file in hdfs:// path</description>
  10298. <test-commands>
  10299. <command>-fs NAMENODE -touchz hdfs:///file1</command>
  10300. <command>-fs NAMENODE -chmod 999 hdfs:///file1</command>
  10301. </test-commands>
  10302. <cleanup-commands>
  10303. <command>-fs NAMENODE -rm hdfs:///file1</command>
  10304. </cleanup-commands>
  10305. <comparators>
  10306. <comparator>
  10307. <type>RegexpComparator</type>
  10308. <expected-output>^-chmod: chmod : mode '999' does not match the expected pattern.</expected-output>
  10309. </comparator>
  10310. </comparators>
  10311. </test>
  10312. <test> <!-- TESTED -->
  10313. <description>chmod: invalid value in normal mode of file in hdfs:// path</description>
  10314. <test-commands>
  10315. <command>-fs NAMENODE -touchz hdfs:///file1</command>
  10316. <command>-fs NAMENODE -chmod rdef hdfs:///file1</command>
  10317. </test-commands>
  10318. <cleanup-commands>
  10319. <command>-fs NAMENODE -rm hdfs:///file1</command>
  10320. </cleanup-commands>
  10321. <comparators>
  10322. <comparator>
  10323. <type>RegexpComparator</type>
  10324. <expected-output>^-chmod: chmod : mode \'rdef\' does not match the expected pattern.</expected-output>
  10325. </comparator>
  10326. </comparators>
  10327. </test>
  10328. <!-- Tests for chmod -->
  10329. <test> <!-- TESTED -->
  10330. <description>chmod: change permission(octal mode) of file in Namenode's path</description>
  10331. <test-commands>
  10332. <command>-fs NAMENODE -touchz NAMENODE/file1</command>
  10333. <command>-fs NAMENODE -chmod 777 NAMENODE/file1</command>
  10334. <command>-fs NAMENODE -ls NAMENODE/file1</command>
  10335. </test-commands>
  10336. <cleanup-commands>
  10337. <command>-fs NAMENODE -rm NAMENODE/file1</command>
  10338. </cleanup-commands>
  10339. <comparators>
  10340. <comparator>
  10341. <type>TokenComparator</type>
  10342. <expected-output>Found 1 items</expected-output>
  10343. </comparator>
  10344. <comparator>
  10345. <type>RegexpComparator</type>
  10346. <expected-output>^-rw-rw-rw-( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/file1</expected-output>
  10347. </comparator>
  10348. </comparators>
  10349. </test>
  10350. <test> <!-- TESTED -->
  10351. <description>chmod: change permission(octal mode) of directory in Namenode's path</description>
  10352. <test-commands>
  10353. <command>-fs NAMENODE -mkdir NAMENODE/dir0</command>
  10354. <command>-fs NAMENODE -mkdir NAMENODE/dir0/dir1</command>
  10355. <command>-fs NAMENODE -touchz NAMENODE/dir0/file0</command>
  10356. <command>-fs NAMENODE -touchz NAMENODE/dir0/dir1/file1</command>
  10357. <command>-fs NAMENODE -touchz NAMENODE/dir0/dir1/file2</command>
  10358. <command>-fs NAMENODE -chmod 777 NAMENODE/dir0/dir1</command>
  10359. <command>-fs NAMENODE -ls -R NAMENODE/dir0</command>
  10360. </test-commands>
  10361. <cleanup-commands>
  10362. <command>-fs NAMENODE -rm -r NAMENODE/dir0</command>
  10363. </cleanup-commands>
  10364. <comparators>
  10365. <comparator>
  10366. <type>RegexpComparator</type>
  10367. <expected-output>^drwxrwxrwx( )*-( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir0/dir1</expected-output>
  10368. </comparator>
  10369. <comparator>
  10370. <type>RegexpComparator</type>
  10371. <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir0/dir1/file1</expected-output>
  10372. </comparator>
  10373. <comparator>
  10374. <type>RegexpComparator</type>
  10375. <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir0/dir1/file2</expected-output>
  10376. </comparator>
  10377. <comparator>
  10378. <type>RegexpComparator</type>
  10379. <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir0/file0</expected-output>
  10380. </comparator>
  10381. </comparators>
  10382. </test>
  10383. <test> <!-- TESTED -->
  10384. <description>chmod: change permission(normal mode) of file in Namenode's path</description>
  10385. <test-commands>
  10386. <command>-fs NAMENODE -touchz NAMENODE/file1</command>
  10387. <command>-fs NAMENODE -chmod a+rw NAMENODE/file1</command>
  10388. <command>-fs NAMENODE -ls NAMENODE/file1</command>
  10389. </test-commands>
  10390. <cleanup-commands>
  10391. <command>-fs NAMENODE -rm NAMENODE/file1</command>
  10392. </cleanup-commands>
  10393. <comparators>
  10394. <comparator>
  10395. <type>TokenComparator</type>
  10396. <expected-output>Found 1 items</expected-output>
  10397. </comparator>
  10398. <comparator>
  10399. <type>RegexpComparator</type>
  10400. <expected-output>^-rw-rw-rw-( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/file1</expected-output>
  10401. </comparator>
  10402. </comparators>
  10403. </test>
  10404. <test> <!-- TESTED -->
  10405. <description>chmod: change permission(normal mode) of directory in Namenode's path</description>
  10406. <test-commands>
  10407. <command>-fs NAMENODE -mkdir NAMENODE/dir0</command>
  10408. <command>-fs NAMENODE -mkdir NAMENODE/dir0/dir1</command>
  10409. <command>-fs NAMENODE -touchz NAMENODE/dir0/file0</command>
  10410. <command>-fs NAMENODE -touchz NAMENODE/dir0/dir1/file1</command>
  10411. <command>-fs NAMENODE -touchz NAMENODE/dir0/dir1/file2</command>
  10412. <command>-fs NAMENODE -chmod a+rwx NAMENODE/dir0/dir1</command>
  10413. <command>-fs NAMENODE -ls -R NAMENODE/dir0</command>
  10414. </test-commands>
  10415. <cleanup-commands>
  10416. <command>-fs NAMENODE -rm -r NAMENODE/dir0</command>
  10417. </cleanup-commands>
  10418. <comparators>
  10419. <comparator>
  10420. <type>RegexpComparator</type>
  10421. <expected-output>^drwxrwxrwx( )*-( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir0/dir1</expected-output>
  10422. </comparator>
  10423. <comparator>
  10424. <type>RegexpComparator</type>
  10425. <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir0/dir1/file1</expected-output>
  10426. </comparator>
  10427. <comparator>
  10428. <type>RegexpComparator</type>
  10429. <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir0/dir1/file2</expected-output>
  10430. </comparator>
  10431. <comparator>
  10432. <type>RegexpComparator</type>
  10433. <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir0/file0</expected-output>
  10434. </comparator>
  10435. </comparators>
  10436. </test>
  10437. <test> <!-- TESTED -->
  10438. <description>chmod: change permission(octal mode) of directory in Namenode's path recursively </description>
  10439. <test-commands>
  10440. <command>-fs NAMENODE -mkdir NAMENODE/dir0</command>
  10441. <command>-fs NAMENODE -mkdir NAMENODE/dir0/dir1</command>
  10442. <command>-fs NAMENODE -touchz NAMENODE/dir0/file0</command>
  10443. <command>-fs NAMENODE -touchz NAMENODE/dir0/dir1/file1</command>
  10444. <command>-fs NAMENODE -touchz NAMENODE/dir0/dir1/file2</command>
  10445. <command>-fs NAMENODE -chmod -R 777 NAMENODE/dir0/dir1</command>
  10446. <command>-fs NAMENODE -ls -R NAMENODE/dir0</command>
  10447. </test-commands>
  10448. <cleanup-commands>
  10449. <command>-fs NAMENODE -rm -r NAMENODE/dir0</command>
  10450. </cleanup-commands>
  10451. <comparators>
  10452. <comparator>
  10453. <type>RegexpComparator</type>
  10454. <expected-output>^drwxrwxrwx( )*-( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir0/dir1</expected-output>
  10455. </comparator>
  10456. <comparator>
  10457. <type>RegexpComparator</type>
  10458. <expected-output>^-rw-rw-rw-( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir0/dir1/file1</expected-output>
  10459. </comparator>
  10460. <comparator>
  10461. <type>RegexpComparator</type>
  10462. <expected-output>^-rw-rw-rw-( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir0/dir1/file2</expected-output>
  10463. </comparator>
  10464. <comparator>
  10465. <type>RegexpComparator</type>
  10466. <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir0/file0</expected-output>
  10467. </comparator>
  10468. </comparators>
  10469. </test>
  10470. <test> <!-- TESTED -->
  10471. <description>chmod: change permission(normal mode) of directory in Namenode's path recursively</description>
  10472. <test-commands>
  10473. <command>-fs NAMENODE -mkdir NAMENODE/dir0</command>
  10474. <command>-fs NAMENODE -mkdir NAMENODE/dir0/dir1</command>
  10475. <command>-fs NAMENODE -touchz NAMENODE/dir0/file0</command>
  10476. <command>-fs NAMENODE -touchz NAMENODE/dir0/dir1/file1</command>
  10477. <command>-fs NAMENODE -touchz NAMENODE/dir0/dir1/file2</command>
  10478. <command>-fs NAMENODE -chmod -R a+rwx NAMENODE/dir0/dir1</command>
  10479. <command>-fs NAMENODE -ls -R NAMENODE/dir0</command>
  10480. </test-commands>
  10481. <cleanup-commands>
  10482. <command>-fs NAMENODE -rm -r NAMENODE/dir0</command>
  10483. </cleanup-commands>
  10484. <comparators>
  10485. <comparator>
  10486. <type>RegexpComparator</type>
  10487. <expected-output>^drwxrwxrwx( )*-( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir0/dir1</expected-output>
  10488. </comparator>
  10489. <comparator>
  10490. <type>RegexpComparator</type>
  10491. <expected-output>^-rw-rw-rw-( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir0/dir1/file1</expected-output>
  10492. </comparator>
  10493. <comparator>
  10494. <type>RegexpComparator</type>
  10495. <expected-output>^-rw-rw-rw-( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir0/dir1/file2</expected-output>
  10496. </comparator>
  10497. <comparator>
  10498. <type>RegexpComparator</type>
  10499. <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir0/file0</expected-output>
  10500. </comparator>
  10501. </comparators>
  10502. </test>
  10503. <test> <!-- TESTED -->
  10504. <description>chmod: change permission(octal mode) of non existent file in Namenode's path</description>
  10505. <test-commands>
  10506. <command>-fs NAMENODE -chmod 777 NAMENODE/file1</command>
  10507. </test-commands>
  10508. <cleanup-commands>
  10509. <command>-fs NAMENODE -rm NAMENODE/file1</command>
  10510. </cleanup-commands>
  10511. <comparators>
  10512. <comparator>
  10513. <type>RegexpComparator</type>
  10514. <expected-output>^chmod: `NAMENODE/file1': No such file or directory</expected-output>
  10515. </comparator>
  10516. </comparators>
  10517. </test>
  10518. <test> <!-- TESTED -->
  10519. <description>chmod: change permission(normal mode) of non existent file in Namenode's path</description>
  10520. <test-commands>
  10521. <command>-fs NAMENODE -chmod a+rw NAMENODE/file1</command>
  10522. </test-commands>
  10523. <cleanup-commands>
  10524. <command>-fs NAMENODE -rm NAMENODE/file1</command>
  10525. </cleanup-commands>
  10526. <comparators>
  10527. <comparator>
  10528. <type>RegexpComparator</type>
  10529. <expected-output>^chmod: `NAMENODE/file1': No such file or directory</expected-output>
  10530. </comparator>
  10531. </comparators>
  10532. </test>
  10533. <test> <!-- TESTED -->
  10534. <description>chmod: change permission(octal mode) of multiple files in Namenode's path using globbing</description>
  10535. <test-commands>
  10536. <command>-fs NAMENODE -touchz NAMENODE/file1</command>
  10537. <command>-fs NAMENODE -touchz NAMENODE/file2</command>
  10538. <command>-fs NAMENODE -touchz NAMENODE/file3</command>
  10539. <command>-fs NAMENODE -touchz NAMENODE/file4</command>
  10540. <command>-fs NAMENODE -chmod 777 NAMENODE/file* </command>
  10541. <command>-fs NAMENODE -ls -R NAMENODE/file*</command>
  10542. </test-commands>
  10543. <cleanup-commands>
  10544. <command>-fs NAMENODE -rm NAMENODE/file*</command>
  10545. </cleanup-commands>
  10546. <comparators>
  10547. <comparator>
  10548. <type>RegexpComparator</type>
  10549. <expected-output>^-rw-rw-rw-( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/file1</expected-output>
  10550. </comparator>
  10551. <comparator>
  10552. <type>RegexpComparator</type>
  10553. <expected-output>^-rw-rw-rw-( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/file2</expected-output>
  10554. </comparator>
  10555. <comparator>
  10556. <type>RegexpComparator</type>
  10557. <expected-output>^-rw-rw-rw-( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/file3</expected-output>
  10558. </comparator>
  10559. <comparator>
  10560. <type>RegexpComparator</type>
  10561. <expected-output>^-rw-rw-rw-( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/file4</expected-output>
  10562. </comparator>
  10563. </comparators>
  10564. </test>
  10565. <test> <!-- TESTED -->
  10566. <description>chmod: change permission(octal mode) of multiple directories in Namenode's path using globbing</description>
  10567. <test-commands>
  10568. <command>-fs NAMENODE -mkdir NAMENODE/dir0</command>
  10569. <command>-fs NAMENODE -mkdir NAMENODE/dir0/dir1</command>
  10570. <command>-fs NAMENODE -touchz NAMENODE/dir0/file0</command>
  10571. <command>-fs NAMENODE -touchz NAMENODE/dir0/dir1/file1</command>
  10572. <command>-fs NAMENODE -touchz NAMENODE/dir0/dir1/file2</command>
  10573. <command>-fs NAMENODE -mkdir NAMENODE/dir2</command>
  10574. <command>-fs NAMENODE -mkdir NAMENODE/dir2/dir1</command>
  10575. <command>-fs NAMENODE -touchz NAMENODE/dir2/file0</command>
  10576. <command>-fs NAMENODE -touchz NAMENODE/dir2/dir1/file1</command>
  10577. <command>-fs NAMENODE -touchz NAMENODE/dir2/dir1/file2</command>
  10578. <command>-fs NAMENODE -chmod 777 NAMENODE/dir*</command>
  10579. <command>-fs NAMENODE -ls -R NAMENODE/dir*</command>
  10580. </test-commands>
  10581. <cleanup-commands>
  10582. <command>-fs NAMENODE -rm -r NAMENODE/dir*</command>
  10583. </cleanup-commands>
  10584. <comparators>
  10585. <comparator>
  10586. <type>RegexpComparator</type>
  10587. <expected-output>^drwxr-xr-x( )*-( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir0/dir1</expected-output>
  10588. </comparator>
  10589. <comparator>
  10590. <type>RegexpComparator</type>
  10591. <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir0/dir1/file1</expected-output>
  10592. </comparator>
  10593. <comparator>
  10594. <type>RegexpComparator</type>
  10595. <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir0/dir1/file2</expected-output>
  10596. </comparator>
  10597. <comparator>
  10598. <type>RegexpComparator</type>
  10599. <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir0/file0</expected-output>
  10600. </comparator>
  10601. <comparator>
  10602. <type>RegexpComparator</type>
  10603. <expected-output>^drwxr-xr-x( )*-( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir2/dir1</expected-output>
  10604. </comparator>
  10605. <comparator>
  10606. <type>RegexpComparator</type>
  10607. <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir2/dir1/file1</expected-output>
  10608. </comparator>
  10609. <comparator>
  10610. <type>RegexpComparator</type>
  10611. <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir2/dir1/file2</expected-output>
  10612. </comparator>
  10613. <comparator>
  10614. <type>RegexpComparator</type>
  10615. <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir2/file0</expected-output>
  10616. </comparator>
  10617. </comparators>
  10618. </test>
  10619. <test> <!-- TESTED -->
  10620. <description>chmod: change permission(octal mode) of multiple files in Namenode's path without globbing</description>
  10621. <test-commands>
  10622. <command>-fs NAMENODE -touchz NAMENODE/file1</command>
  10623. <command>-fs NAMENODE -touchz NAMENODE/file2</command>
  10624. <command>-fs NAMENODE -touchz NAMENODE/file3</command>
  10625. <command>-fs NAMENODE -touchz NAMENODE/file4</command>
  10626. <command>-fs NAMENODE -chmod 777 NAMENODE/file1 NAMENODE/file2 NAMENODE/file3 NAMENODE/file4 </command>
  10627. <command>-fs NAMENODE -ls -R NAMENODE/file*</command>
  10628. </test-commands>
  10629. <cleanup-commands>
  10630. <command>-fs NAMENODE -rm NAMENODE/file*</command>
  10631. </cleanup-commands>
  10632. <comparators>
  10633. <comparator>
  10634. <type>RegexpComparator</type>
  10635. <expected-output>^-rw-rw-rw-( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/file1</expected-output>
  10636. </comparator>
  10637. <comparator>
  10638. <type>RegexpComparator</type>
  10639. <expected-output>^-rw-rw-rw-( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/file2</expected-output>
  10640. </comparator>
  10641. <comparator>
  10642. <type>RegexpComparator</type>
  10643. <expected-output>^-rw-rw-rw-( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/file3</expected-output>
  10644. </comparator>
  10645. <comparator>
  10646. <type>RegexpComparator</type>
  10647. <expected-output>^-rw-rw-rw-( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/file4</expected-output>
  10648. </comparator>
  10649. </comparators>
  10650. </test>
  10651. <test> <!-- TESTED -->
  10652. <description>chmod: change permission(octal mode) of multiple directories in Namenode's path without globbing</description>
  10653. <test-commands>
  10654. <command>-fs NAMENODE -mkdir NAMENODE/dir0</command>
  10655. <command>-fs NAMENODE -mkdir NAMENODE/dir0/dir1</command>
  10656. <command>-fs NAMENODE -touchz NAMENODE/dir0/file0</command>
  10657. <command>-fs NAMENODE -touchz NAMENODE/dir0/dir1/file1</command>
  10658. <command>-fs NAMENODE -touchz NAMENODE/dir0/dir1/file2</command>
  10659. <command>-fs NAMENODE -mkdir NAMENODE/dir2</command>
  10660. <command>-fs NAMENODE -mkdir NAMENODE/dir2/dir1</command>
  10661. <command>-fs NAMENODE -touchz NAMENODE/dir2/file0</command>
  10662. <command>-fs NAMENODE -touchz NAMENODE/dir2/dir1/file1</command>
  10663. <command>-fs NAMENODE -touchz NAMENODE/dir2/dir1/file2</command>
  10664. <command>-fs NAMENODE -chmod 777 NAMENODE/dir0 NAMENODE/dir2</command>
  10665. <command>-fs NAMENODE -ls -R NAMENODE/dir*</command>
  10666. </test-commands>
  10667. <cleanup-commands>
  10668. <command>-fs NAMENODE -rm -r NAMENODE/dir*</command>
  10669. </cleanup-commands>
  10670. <comparators>
  10671. <comparator>
  10672. <type>RegexpComparator</type>
  10673. <expected-output>^drwxr-xr-x( )*-( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir0/dir1</expected-output>
  10674. </comparator>
  10675. <comparator>
  10676. <type>RegexpComparator</type>
  10677. <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir0/dir1/file1</expected-output>
  10678. </comparator>
  10679. <comparator>
  10680. <type>RegexpComparator</type>
  10681. <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir0/dir1/file2</expected-output>
  10682. </comparator>
  10683. <comparator>
  10684. <type>RegexpComparator</type>
  10685. <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir0/file0</expected-output>
  10686. </comparator>
  10687. <comparator>
  10688. <type>RegexpComparator</type>
  10689. <expected-output>^drwxr-xr-x( )*-( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir2/dir1</expected-output>
  10690. </comparator>
  10691. <comparator>
  10692. <type>RegexpComparator</type>
  10693. <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir2/dir1/file1</expected-output>
  10694. </comparator>
  10695. <comparator>
  10696. <type>RegexpComparator</type>
  10697. <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir2/dir1/file2</expected-output>
  10698. </comparator>
  10699. <comparator>
  10700. <type>RegexpComparator</type>
  10701. <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir2/file0</expected-output>
  10702. </comparator>
  10703. </comparators>
  10704. </test>
  10705. <test> <!-- TESTED -->
  10706. <description>chmod: change permission(normal mode) of multiple files in Namenode's path using globbing</description>
  10707. <test-commands>
  10708. <command>-fs NAMENODE -touchz NAMENODE/file1</command>
  10709. <command>-fs NAMENODE -touchz NAMENODE/file2</command>
  10710. <command>-fs NAMENODE -touchz NAMENODE/file3</command>
  10711. <command>-fs NAMENODE -touchz NAMENODE/file4</command>
  10712. <command>-fs NAMENODE -chmod a+rw NAMENODE/file* </command>
  10713. <command>-fs NAMENODE -ls -R NAMENODE/file*</command>
  10714. </test-commands>
  10715. <cleanup-commands>
  10716. <command>-fs NAMENODE -rm NAMENODE/file*</command>
  10717. </cleanup-commands>
  10718. <comparators>
  10719. <comparator>
  10720. <type>RegexpComparator</type>
  10721. <expected-output>^-rw-rw-rw-( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/file1</expected-output>
  10722. </comparator>
  10723. <comparator>
  10724. <type>RegexpComparator</type>
  10725. <expected-output>^-rw-rw-rw-( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/file2</expected-output>
  10726. </comparator>
  10727. <comparator>
  10728. <type>RegexpComparator</type>
  10729. <expected-output>^-rw-rw-rw-( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/file3</expected-output>
  10730. </comparator>
  10731. <comparator>
  10732. <type>RegexpComparator</type>
  10733. <expected-output>^-rw-rw-rw-( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/file4</expected-output>
  10734. </comparator>
  10735. </comparators>
  10736. </test>
  10737. <test> <!-- TESTED -->
  10738. <description>chmod: change permission(normal mode) of multiple directories in Namenode's path using globbing</description>
  10739. <test-commands>
  10740. <command>-fs NAMENODE -mkdir NAMENODE/dir0</command>
  10741. <command>-fs NAMENODE -mkdir NAMENODE/dir0/dir1</command>
  10742. <command>-fs NAMENODE -touchz NAMENODE/dir0/file0</command>
  10743. <command>-fs NAMENODE -touchz NAMENODE/dir0/dir1/file1</command>
  10744. <command>-fs NAMENODE -touchz NAMENODE/dir0/dir1/file2</command>
  10745. <command>-fs NAMENODE -mkdir NAMENODE/dir2</command>
  10746. <command>-fs NAMENODE -mkdir NAMENODE/dir2/dir1</command>
  10747. <command>-fs NAMENODE -touchz NAMENODE/dir2/file0</command>
  10748. <command>-fs NAMENODE -touchz NAMENODE/dir2/dir1/file1</command>
  10749. <command>-fs NAMENODE -touchz NAMENODE/dir2/dir1/file2</command>
  10750. <command>-fs NAMENODE -chmod a+rwx NAMENODE/dir*</command>
  10751. <command>-fs NAMENODE -ls -R NAMENODE/dir*</command>
  10752. </test-commands>
  10753. <cleanup-commands>
  10754. <command>-fs NAMENODE -rm -r NAMENODE/dir*</command>
  10755. </cleanup-commands>
  10756. <comparators>
  10757. <comparator>
  10758. <type>RegexpComparator</type>
  10759. <expected-output>^drwxr-xr-x( )*-( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir0/dir1</expected-output>
  10760. </comparator>
  10761. <comparator>
  10762. <type>RegexpComparator</type>
  10763. <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir0/dir1/file1</expected-output>
  10764. </comparator>
  10765. <comparator>
  10766. <type>RegexpComparator</type>
  10767. <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir0/dir1/file2</expected-output>
  10768. </comparator>
  10769. <comparator>
  10770. <type>RegexpComparator</type>
  10771. <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir0/file0</expected-output>
  10772. </comparator>
  10773. <comparator>
  10774. <type>RegexpComparator</type>
  10775. <expected-output>^drwxr-xr-x( )*-( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir2/dir1</expected-output>
  10776. </comparator>
  10777. <comparator>
  10778. <type>RegexpComparator</type>
  10779. <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir2/dir1/file1</expected-output>
  10780. </comparator>
  10781. <comparator>
  10782. <type>RegexpComparator</type>
  10783. <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir2/dir1/file2</expected-output>
  10784. </comparator>
  10785. <comparator>
  10786. <type>RegexpComparator</type>
  10787. <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir2/file0</expected-output>
  10788. </comparator>
  10789. </comparators>
  10790. </test>
  10791. <test> <!-- TESTED -->
  10792. <description>chmod: change permission(normal mode) of multiple files in Namenode's path without globbing</description>
  10793. <test-commands>
  10794. <command>-fs NAMENODE -touchz NAMENODE/file1</command>
  10795. <command>-fs NAMENODE -touchz NAMENODE/file2</command>
  10796. <command>-fs NAMENODE -touchz NAMENODE/file3</command>
  10797. <command>-fs NAMENODE -touchz NAMENODE/file4</command>
  10798. <command>-fs NAMENODE -chmod a+rw NAMENODE/file1 NAMENODE/file2 NAMENODE/file3 NAMENODE/file4 </command>
  10799. <command>-fs NAMENODE -ls -R NAMENODE/file*</command>
  10800. </test-commands>
  10801. <cleanup-commands>
  10802. <command>-fs NAMENODE -rm NAMENODE/file*</command>
  10803. </cleanup-commands>
  10804. <comparators>
  10805. <comparator>
  10806. <type>RegexpComparator</type>
  10807. <expected-output>^-rw-rw-rw-( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/file1</expected-output>
  10808. </comparator>
  10809. <comparator>
  10810. <type>RegexpComparator</type>
  10811. <expected-output>^-rw-rw-rw-( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/file2</expected-output>
  10812. </comparator>
  10813. <comparator>
  10814. <type>RegexpComparator</type>
  10815. <expected-output>^-rw-rw-rw-( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/file3</expected-output>
  10816. </comparator>
  10817. <comparator>
  10818. <type>RegexpComparator</type>
  10819. <expected-output>^-rw-rw-rw-( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/file4</expected-output>
  10820. </comparator>
  10821. </comparators>
  10822. </test>
  10823. <test> <!-- TESTED -->
  10824. <description>chmod: change permission(normal mode) of multiple directories in Namenode's path without globbing</description>
  10825. <test-commands>
  10826. <command>-fs NAMENODE -mkdir NAMENODE/dir0</command>
  10827. <command>-fs NAMENODE -mkdir NAMENODE/dir0/dir1</command>
  10828. <command>-fs NAMENODE -touchz NAMENODE/dir0/file0</command>
  10829. <command>-fs NAMENODE -touchz NAMENODE/dir0/dir1/file1</command>
  10830. <command>-fs NAMENODE -touchz NAMENODE/dir0/dir1/file2</command>
  10831. <command>-fs NAMENODE -mkdir NAMENODE/dir2</command>
  10832. <command>-fs NAMENODE -mkdir NAMENODE/dir2/dir1</command>
  10833. <command>-fs NAMENODE -touchz NAMENODE/dir2/file0</command>
  10834. <command>-fs NAMENODE -touchz NAMENODE/dir2/dir1/file1</command>
  10835. <command>-fs NAMENODE -touchz NAMENODE/dir2/dir1/file2</command>
  10836. <command>-fs NAMENODE -chmod a+rwx NAMENODE/dir0 NAMENODE/dir2</command>
  10837. <command>-fs NAMENODE -ls -R NAMENODE/dir*</command>
  10838. </test-commands>
  10839. <cleanup-commands>
  10840. <command>-fs NAMENODE -rm -r NAMENODE/dir*</command>
  10841. </cleanup-commands>
  10842. <comparators>
  10843. <comparator>
  10844. <type>RegexpComparator</type>
  10845. <expected-output>^drwxr-xr-x( )*-( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir0/dir1</expected-output>
  10846. </comparator>
  10847. <comparator>
  10848. <type>RegexpComparator</type>
  10849. <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir0/dir1/file1</expected-output>
  10850. </comparator>
  10851. <comparator>
  10852. <type>RegexpComparator</type>
  10853. <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir0/dir1/file2</expected-output>
  10854. </comparator>
  10855. <comparator>
  10856. <type>RegexpComparator</type>
  10857. <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir0/file0</expected-output>
  10858. </comparator>
  10859. <comparator>
  10860. <type>RegexpComparator</type>
  10861. <expected-output>^drwxr-xr-x( )*-( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir2/dir1</expected-output>
  10862. </comparator>
  10863. <comparator>
  10864. <type>RegexpComparator</type>
  10865. <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir2/dir1/file1</expected-output>
  10866. </comparator>
  10867. <comparator>
  10868. <type>RegexpComparator</type>
  10869. <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir2/dir1/file2</expected-output>
  10870. </comparator>
  10871. <comparator>
  10872. <type>RegexpComparator</type>
  10873. <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir2/file0</expected-output>
  10874. </comparator>
  10875. </comparators>
  10876. </test>
  10877. <test> <!-- TESTED -->
  10878. <description>chmod: change permission(octal mode) of multiple directories in Namenode's path recursively using globbing</description>
  10879. <test-commands>
  10880. <command>-fs NAMENODE -mkdir NAMENODE/dir0</command>
  10881. <command>-fs NAMENODE -mkdir NAMENODE/dir0/dir1</command>
  10882. <command>-fs NAMENODE -touchz NAMENODE/dir0/file0</command>
  10883. <command>-fs NAMENODE -touchz NAMENODE/dir0/dir1/file1</command>
  10884. <command>-fs NAMENODE -touchz NAMENODE/dir0/dir1/file2</command>
  10885. <command>-fs NAMENODE -mkdir NAMENODE/dir2</command>
  10886. <command>-fs NAMENODE -mkdir NAMENODE/dir2/dir1</command>
  10887. <command>-fs NAMENODE -touchz NAMENODE/dir2/file0</command>
  10888. <command>-fs NAMENODE -touchz NAMENODE/dir2/dir1/file1</command>
  10889. <command>-fs NAMENODE -touchz NAMENODE/dir2/dir1/file2</command>
  10890. <command>-fs NAMENODE -chmod -R 777 NAMENODE/dir*</command>
  10891. <command>-fs NAMENODE -ls -R NAMENODE/dir*</command>
  10892. </test-commands>
  10893. <cleanup-commands>
  10894. <command>-fs NAMENODE -rm -r NAMENODE/dir*</command>
  10895. </cleanup-commands>
  10896. <comparators>
  10897. <comparator>
  10898. <type>RegexpComparator</type>
  10899. <expected-output>^drwxrwxrwx( )*-( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir0/dir1</expected-output>
  10900. </comparator>
  10901. <comparator>
  10902. <type>RegexpComparator</type>
  10903. <expected-output>^-rw-rw-rw-( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir0/dir1/file1</expected-output>
  10904. </comparator>
  10905. <comparator>
  10906. <type>RegexpComparator</type>
  10907. <expected-output>^-rw-rw-rw-( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir0/dir1/file2</expected-output>
  10908. </comparator>
  10909. <comparator>
  10910. <type>RegexpComparator</type>
  10911. <expected-output>^-rw-rw-rw-( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir0/file0</expected-output>
  10912. </comparator>
  10913. <comparator>
  10914. <type>RegexpComparator</type>
  10915. <expected-output>^drwxrwxrwx( )*-( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir2/dir1</expected-output>
  10916. </comparator>
  10917. <comparator>
  10918. <type>RegexpComparator</type>
  10919. <expected-output>^-rw-rw-rw-( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir2/dir1/file1</expected-output>
  10920. </comparator>
  10921. <comparator>
  10922. <type>RegexpComparator</type>
  10923. <expected-output>^-rw-rw-rw-( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir2/dir1/file2</expected-output>
  10924. </comparator>
  10925. <comparator>
  10926. <type>RegexpComparator</type>
  10927. <expected-output>^-rw-rw-rw-( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir2/file0</expected-output>
  10928. </comparator>
  10929. </comparators>
  10930. </test>
  10931. <test> <!-- TESTED -->
  10932. <description>chmod: change permission(octal mode) of multiple directories in Namenode's path recursively without globbing</description>
  10933. <test-commands>
  10934. <command>-fs NAMENODE -mkdir NAMENODE/dir0</command>
  10935. <command>-fs NAMENODE -mkdir NAMENODE/dir0/dir1</command>
  10936. <command>-fs NAMENODE -touchz NAMENODE/dir0/file0</command>
  10937. <command>-fs NAMENODE -touchz NAMENODE/dir0/dir1/file1</command>
  10938. <command>-fs NAMENODE -touchz NAMENODE/dir0/dir1/file2</command>
  10939. <command>-fs NAMENODE -mkdir NAMENODE/dir2</command>
  10940. <command>-fs NAMENODE -mkdir NAMENODE/dir2/dir1</command>
  10941. <command>-fs NAMENODE -touchz NAMENODE/dir2/file0</command>
  10942. <command>-fs NAMENODE -touchz NAMENODE/dir2/dir1/file1</command>
  10943. <command>-fs NAMENODE -touchz NAMENODE/dir2/dir1/file2</command>
  10944. <command>-fs NAMENODE -chmod -R 777 NAMENODE/dir0 NAMENODE/dir2</command>
  10945. <command>-fs NAMENODE -ls -R NAMENODE/dir*</command>
  10946. </test-commands>
  10947. <cleanup-commands>
  10948. <command>-fs NAMENODE -rm -r NAMENODE/dir*</command>
  10949. </cleanup-commands>
  10950. <comparators>
  10951. <comparator>
  10952. <type>RegexpComparator</type>
  10953. <expected-output>^drwxrwxrwx( )*-( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir0/dir1</expected-output>
  10954. </comparator>
  10955. <comparator>
  10956. <type>RegexpComparator</type>
  10957. <expected-output>^-rw-rw-rw-( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir0/dir1/file1</expected-output>
  10958. </comparator>
  10959. <comparator>
  10960. <type>RegexpComparator</type>
  10961. <expected-output>^-rw-rw-rw-( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir0/dir1/file2</expected-output>
  10962. </comparator>
  10963. <comparator>
  10964. <type>RegexpComparator</type>
  10965. <expected-output>^-rw-rw-rw-( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir0/file0</expected-output>
  10966. </comparator>
  10967. <comparator>
  10968. <type>RegexpComparator</type>
  10969. <expected-output>^drwxrwxrwx( )*-( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir2/dir1</expected-output>
  10970. </comparator>
  10971. <comparator>
  10972. <type>RegexpComparator</type>
  10973. <expected-output>^-rw-rw-rw-( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir2/dir1/file1</expected-output>
  10974. </comparator>
  10975. <comparator>
  10976. <type>RegexpComparator</type>
  10977. <expected-output>^-rw-rw-rw-( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir2/dir1/file2</expected-output>
  10978. </comparator>
  10979. <comparator>
  10980. <type>RegexpComparator</type>
  10981. <expected-output>^-rw-rw-rw-( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir2/file0</expected-output>
  10982. </comparator>
  10983. </comparators>
  10984. </test>
  10985. <test> <!-- TESTED -->
  10986. <description>chmod: change permission(normal mode) of multiple directories in Namenode's path recursively using globbing</description>
  10987. <test-commands>
  10988. <command>-fs NAMENODE -mkdir NAMENODE/dir0</command>
  10989. <command>-fs NAMENODE -mkdir NAMENODE/dir0/dir1</command>
  10990. <command>-fs NAMENODE -touchz NAMENODE/dir0/file0</command>
  10991. <command>-fs NAMENODE -touchz NAMENODE/dir0/dir1/file1</command>
  10992. <command>-fs NAMENODE -touchz NAMENODE/dir0/dir1/file2</command>
  10993. <command>-fs NAMENODE -mkdir NAMENODE/dir2</command>
  10994. <command>-fs NAMENODE -mkdir NAMENODE/dir2/dir1</command>
  10995. <command>-fs NAMENODE -touchz NAMENODE/dir2/file0</command>
  10996. <command>-fs NAMENODE -touchz NAMENODE/dir2/dir1/file1</command>
  10997. <command>-fs NAMENODE -touchz NAMENODE/dir2/dir1/file2</command>
  10998. <command>-fs NAMENODE -chmod -R a+rwx NAMENODE/dir*</command>
  10999. <command>-fs NAMENODE -ls -R NAMENODE/dir*</command>
  11000. </test-commands>
  11001. <cleanup-commands>
  11002. <command>-fs NAMENODE -rm -r NAMENODE/dir*</command>
  11003. </cleanup-commands>
  11004. <comparators>
  11005. <comparator>
  11006. <type>RegexpComparator</type>
  11007. <expected-output>^drwxrwxrwx( )*-( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir0/dir1</expected-output>
  11008. </comparator>
  11009. <comparator>
  11010. <type>RegexpComparator</type>
  11011. <expected-output>^-rw-rw-rw-( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir0/dir1/file1</expected-output>
  11012. </comparator>
  11013. <comparator>
  11014. <type>RegexpComparator</type>
  11015. <expected-output>^-rw-rw-rw-( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir0/dir1/file2</expected-output>
  11016. </comparator>
  11017. <comparator>
  11018. <type>RegexpComparator</type>
  11019. <expected-output>^-rw-rw-rw-( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir0/file0</expected-output>
  11020. </comparator>
  11021. <comparator>
  11022. <type>RegexpComparator</type>
  11023. <expected-output>^drwxrwxrwx( )*-( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir2/dir1</expected-output>
  11024. </comparator>
  11025. <comparator>
  11026. <type>RegexpComparator</type>
  11027. <expected-output>^-rw-rw-rw-( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir2/dir1/file1</expected-output>
  11028. </comparator>
  11029. <comparator>
  11030. <type>RegexpComparator</type>
  11031. <expected-output>^-rw-rw-rw-( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir2/dir1/file2</expected-output>
  11032. </comparator>
  11033. <comparator>
  11034. <type>RegexpComparator</type>
  11035. <expected-output>^-rw-rw-rw-( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir2/file0</expected-output>
  11036. </comparator>
  11037. </comparators>
  11038. </test>
  11039. <test> <!-- TESTED -->
  11040. <description>chmod: change permission(normal mode) of multiple directories in Namenode's path recursively without globbing</description>
  11041. <test-commands>
  11042. <command>-fs NAMENODE -mkdir NAMENODE/dir0</command>
  11043. <command>-fs NAMENODE -mkdir NAMENODE/dir0/dir1</command>
  11044. <command>-fs NAMENODE -touchz NAMENODE/dir0/file0</command>
  11045. <command>-fs NAMENODE -touchz NAMENODE/dir0/dir1/file1</command>
  11046. <command>-fs NAMENODE -touchz NAMENODE/dir0/dir1/file2</command>
  11047. <command>-fs NAMENODE -mkdir NAMENODE/dir2</command>
  11048. <command>-fs NAMENODE -mkdir NAMENODE/dir2/dir1</command>
  11049. <command>-fs NAMENODE -touchz NAMENODE/dir2/file0</command>
  11050. <command>-fs NAMENODE -touchz NAMENODE/dir2/dir1/file1</command>
  11051. <command>-fs NAMENODE -touchz NAMENODE/dir2/dir1/file2</command>
  11052. <command>-fs NAMENODE -chmod -R a+rwx NAMENODE/dir0 NAMENODE/dir2</command>
  11053. <command>-fs NAMENODE -ls -R NAMENODE/dir*</command>
  11054. </test-commands>
  11055. <cleanup-commands>
  11056. <command>-fs NAMENODE -rm -r NAMENODE/dir*</command>
  11057. </cleanup-commands>
  11058. <comparators>
  11059. <comparator>
  11060. <type>RegexpComparator</type>
  11061. <expected-output>^drwxrwxrwx( )*-( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir0/dir1</expected-output>
  11062. </comparator>
  11063. <comparator>
  11064. <type>RegexpComparator</type>
  11065. <expected-output>^-rw-rw-rw-( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir0/dir1/file1</expected-output>
  11066. </comparator>
  11067. <comparator>
  11068. <type>RegexpComparator</type>
  11069. <expected-output>^-rw-rw-rw-( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir0/dir1/file2</expected-output>
  11070. </comparator>
  11071. <comparator>
  11072. <type>RegexpComparator</type>
  11073. <expected-output>^-rw-rw-rw-( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir0/file0</expected-output>
  11074. </comparator>
  11075. <comparator>
  11076. <type>RegexpComparator</type>
  11077. <expected-output>^drwxrwxrwx( )*-( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir2/dir1</expected-output>
  11078. </comparator>
  11079. <comparator>
  11080. <type>RegexpComparator</type>
  11081. <expected-output>^-rw-rw-rw-( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir2/dir1/file1</expected-output>
  11082. </comparator>
  11083. <comparator>
  11084. <type>RegexpComparator</type>
  11085. <expected-output>^-rw-rw-rw-( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir2/dir1/file2</expected-output>
  11086. </comparator>
  11087. <comparator>
  11088. <type>RegexpComparator</type>
  11089. <expected-output>^-rw-rw-rw-( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir2/file0</expected-output>
  11090. </comparator>
  11091. </comparators>
  11092. </test>
  11093. <test> <!-- TESTED -->
  11094. <description>chmod: invalid value in octal mode of file in Namenode's path</description>
  11095. <test-commands>
  11096. <command>-fs NAMENODE -touchz NAMENODE/file1</command>
  11097. <command>-fs NAMENODE -chmod 999 NAMENODE/file1</command>
  11098. </test-commands>
  11099. <cleanup-commands>
  11100. <command>-fs NAMENODE -rm NAMENODE/file1</command>
  11101. </cleanup-commands>
  11102. <comparators>
  11103. <comparator>
  11104. <type>RegexpComparator</type>
  11105. <expected-output>^-chmod: chmod : mode '999' does not match the expected pattern.</expected-output>
  11106. </comparator>
  11107. </comparators>
  11108. </test>
  11109. <test> <!-- TESTED -->
  11110. <description>chmod: invalid value in normal mode of file in Namenode's path</description>
  11111. <test-commands>
  11112. <command>-fs NAMENODE -touchz NAMENODE/file1</command>
  11113. <command>-fs NAMENODE -chmod rdef NAMENODE/file1</command>
  11114. </test-commands>
  11115. <cleanup-commands>
  11116. <command>-fs NAMENODE -rm NAMENODE/file1</command>
  11117. </cleanup-commands>
  11118. <comparators>
  11119. <comparator>
  11120. <type>RegexpComparator</type>
  11121. <expected-output>^-chmod: chmod : mode \'rdef\' does not match the expected pattern.</expected-output>
  11122. </comparator>
  11123. </comparators>
  11124. </test>
  11125. <!-- Tests for chown -->
  11126. <test> <!-- TESTED -->
  11127. <description>chown: change ownership of file in hdfs:// path</description>
  11128. <test-commands>
  11129. <command>-fs NAMENODE -touchz hdfs:///file1</command>
  11130. <command>-fs NAMENODE -chown newowner:newgroup hdfs:///file1</command>
  11131. <command>-fs NAMENODE -ls hdfs:///file1</command>
  11132. </test-commands>
  11133. <cleanup-commands>
  11134. <command>-fs NAMENODE -rm hdfs:///file1</command>
  11135. </cleanup-commands>
  11136. <comparators>
  11137. <comparator>
  11138. <type>TokenComparator</type>
  11139. <expected-output>Found 1 items</expected-output>
  11140. </comparator>
  11141. <comparator>
  11142. <type>RegexpComparator</type>
  11143. <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>
  11144. </comparator>
  11145. </comparators>
  11146. </test>
  11147. <test> <!-- TESTED -->
  11148. <description>chown: change ownership of directory in hdfs:// path</description>
  11149. <test-commands>
  11150. <command>-fs NAMENODE -mkdir hdfs:///dir0</command>
  11151. <command>-fs NAMENODE -mkdir hdfs:///dir0/dir1</command>
  11152. <command>-fs NAMENODE -touchz hdfs:///dir0/file0</command>
  11153. <command>-fs NAMENODE -touchz hdfs:///dir0/dir1/file1</command>
  11154. <command>-fs NAMENODE -touchz hdfs:///dir0/dir1/file2</command>
  11155. <command>-fs NAMENODE -chown newowner:newgroup hdfs:///dir0/dir1</command>
  11156. <command>-fs NAMENODE -ls -R hdfs:///dir0</command>
  11157. </test-commands>
  11158. <cleanup-commands>
  11159. <command>-fs NAMENODE -rm -r hdfs:///dir0</command>
  11160. </cleanup-commands>
  11161. <comparators>
  11162. <comparator>
  11163. <type>RegexpComparator</type>
  11164. <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>
  11165. </comparator>
  11166. <comparator>
  11167. <type>RegexpComparator</type>
  11168. <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir0/dir1/file1</expected-output>
  11169. </comparator>
  11170. <comparator>
  11171. <type>RegexpComparator</type>
  11172. <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir0/dir1/file2</expected-output>
  11173. </comparator>
  11174. <comparator>
  11175. <type>RegexpComparator</type>
  11176. <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir0/file0</expected-output>
  11177. </comparator>
  11178. </comparators>
  11179. </test>
  11180. <test> <!-- TESTED -->
  11181. <description>chown: change ownership of directory in hdfs:// path recursively </description>
  11182. <test-commands>
  11183. <command>-fs NAMENODE -mkdir hdfs:///dir0</command>
  11184. <command>-fs NAMENODE -mkdir hdfs:///dir0/dir1</command>
  11185. <command>-fs NAMENODE -touchz hdfs:///dir0/file0</command>
  11186. <command>-fs NAMENODE -touchz hdfs:///dir0/dir1/file1</command>
  11187. <command>-fs NAMENODE -touchz hdfs:///dir0/dir1/file2</command>
  11188. <command>-fs NAMENODE -chown -R newowner:newgroup hdfs:///dir0/dir1</command>
  11189. <command>-fs NAMENODE -ls -R hdfs:///dir0</command>
  11190. </test-commands>
  11191. <cleanup-commands>
  11192. <command>-fs NAMENODE -rm -r hdfs:///dir0</command>
  11193. </cleanup-commands>
  11194. <comparators>
  11195. <comparator>
  11196. <type>RegexpComparator</type>
  11197. <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>
  11198. </comparator>
  11199. <comparator>
  11200. <type>RegexpComparator</type>
  11201. <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>
  11202. </comparator>
  11203. <comparator>
  11204. <type>RegexpComparator</type>
  11205. <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>
  11206. </comparator>
  11207. <comparator>
  11208. <type>RegexpComparator</type>
  11209. <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir0/file0</expected-output>
  11210. </comparator>
  11211. </comparators>
  11212. </test>
  11213. <test> <!-- TESTED -->
  11214. <description>chown: change ownership of non existent file in hdfs:// path</description>
  11215. <test-commands>
  11216. <command>-fs NAMENODE -chown newowner:newgroup hdfs:///file1</command>
  11217. </test-commands>
  11218. <cleanup-commands>
  11219. <command>-fs NAMENODE -rm hdfs:///file1</command>
  11220. </cleanup-commands>
  11221. <comparators>
  11222. <comparator>
  11223. <type>RegexpComparator</type>
  11224. <expected-output>^chown: `hdfs:///file1': No such file or directory</expected-output>
  11225. </comparator>
  11226. </comparators>
  11227. </test>
  11228. <test> <!-- TESTED -->
  11229. <description>chown: change ownership of multiple files in hdfs:// path using globbing</description>
  11230. <test-commands>
  11231. <command>-fs NAMENODE -touchz hdfs:///file1</command>
  11232. <command>-fs NAMENODE -touchz hdfs:///file2</command>
  11233. <command>-fs NAMENODE -touchz hdfs:///file3</command>
  11234. <command>-fs NAMENODE -touchz hdfs:///file4</command>
  11235. <command>-fs NAMENODE -chown newowner:newgroup hdfs:///file* </command>
  11236. <command>-fs NAMENODE -ls -R hdfs:///file*</command>
  11237. </test-commands>
  11238. <cleanup-commands>
  11239. <command>-fs NAMENODE -rm hdfs:///file*</command>
  11240. </cleanup-commands>
  11241. <comparators>
  11242. <comparator>
  11243. <type>RegexpComparator</type>
  11244. <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>
  11245. </comparator>
  11246. <comparator>
  11247. <type>RegexpComparator</type>
  11248. <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>
  11249. </comparator>
  11250. <comparator>
  11251. <type>RegexpComparator</type>
  11252. <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>
  11253. </comparator>
  11254. <comparator>
  11255. <type>RegexpComparator</type>
  11256. <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>
  11257. </comparator>
  11258. </comparators>
  11259. </test>
  11260. <test> <!-- TESTED -->
  11261. <description>chown: change ownership of multiple directories in hdfs:// path using globbing</description>
  11262. <test-commands>
  11263. <command>-fs NAMENODE -mkdir hdfs:///dir0</command>
  11264. <command>-fs NAMENODE -mkdir hdfs:///dir0/dir1</command>
  11265. <command>-fs NAMENODE -touchz hdfs:///dir0/file0</command>
  11266. <command>-fs NAMENODE -touchz hdfs:///dir0/dir1/file1</command>
  11267. <command>-fs NAMENODE -touchz hdfs:///dir0/dir1/file2</command>
  11268. <command>-fs NAMENODE -mkdir hdfs:///dir2</command>
  11269. <command>-fs NAMENODE -mkdir hdfs:///dir2/dir1</command>
  11270. <command>-fs NAMENODE -touchz hdfs:///dir2/file0</command>
  11271. <command>-fs NAMENODE -touchz hdfs:///dir2/dir1/file1</command>
  11272. <command>-fs NAMENODE -touchz hdfs:///dir2/dir1/file2</command>
  11273. <command>-fs NAMENODE -chown newowner:newgroup hdfs:///dir*</command>
  11274. <command>-fs NAMENODE -ls -R hdfs:///dir*</command>
  11275. </test-commands>
  11276. <cleanup-commands>
  11277. <command>-fs NAMENODE -rm -r hdfs:///dir*</command>
  11278. </cleanup-commands>
  11279. <comparators>
  11280. <comparator>
  11281. <type>RegexpComparator</type>
  11282. <expected-output>^drwxr-xr-x( )*-( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir0/dir1</expected-output>
  11283. </comparator>
  11284. <comparator>
  11285. <type>RegexpComparator</type>
  11286. <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir0/dir1/file1</expected-output>
  11287. </comparator>
  11288. <comparator>
  11289. <type>RegexpComparator</type>
  11290. <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir0/dir1/file2</expected-output>
  11291. </comparator>
  11292. <comparator>
  11293. <type>RegexpComparator</type>
  11294. <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir0/file0</expected-output>
  11295. </comparator>
  11296. <comparator>
  11297. <type>RegexpComparator</type>
  11298. <expected-output>^drwxr-xr-x( )*-( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir2/dir1</expected-output>
  11299. </comparator>
  11300. <comparator>
  11301. <type>RegexpComparator</type>
  11302. <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir2/dir1/file1</expected-output>
  11303. </comparator>
  11304. <comparator>
  11305. <type>RegexpComparator</type>
  11306. <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir2/dir1/file2</expected-output>
  11307. </comparator>
  11308. <comparator>
  11309. <type>RegexpComparator</type>
  11310. <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir2/file0</expected-output>
  11311. </comparator>
  11312. </comparators>
  11313. </test>
  11314. <test> <!-- TESTED -->
  11315. <description>chown: change ownership of multiple files in hdfs:// path without globbing</description>
  11316. <test-commands>
  11317. <command>-fs NAMENODE -touchz hdfs:///file1</command>
  11318. <command>-fs NAMENODE -touchz hdfs:///file2</command>
  11319. <command>-fs NAMENODE -touchz hdfs:///file3</command>
  11320. <command>-fs NAMENODE -touchz hdfs:///file4</command>
  11321. <command>-fs NAMENODE -chown newowner:newgroup hdfs:///file1 hdfs:///file2 hdfs:///file3 hdfs:///file4 </command>
  11322. <command>-fs NAMENODE -ls -R hdfs:///file*</command>
  11323. </test-commands>
  11324. <cleanup-commands>
  11325. <command>-fs NAMENODE -rm hdfs:///file*</command>
  11326. </cleanup-commands>
  11327. <comparators>
  11328. <comparator>
  11329. <type>RegexpComparator</type>
  11330. <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>
  11331. </comparator>
  11332. <comparator>
  11333. <type>RegexpComparator</type>
  11334. <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>
  11335. </comparator>
  11336. <comparator>
  11337. <type>RegexpComparator</type>
  11338. <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>
  11339. </comparator>
  11340. <comparator>
  11341. <type>RegexpComparator</type>
  11342. <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>
  11343. </comparator>
  11344. </comparators>
  11345. </test>
  11346. <test> <!-- TESTED -->
  11347. <description>chown: change ownership of multiple directories in hdfs:// path without globbing</description>
  11348. <test-commands>
  11349. <command>-fs NAMENODE -mkdir hdfs:///dir0</command>
  11350. <command>-fs NAMENODE -mkdir hdfs:///dir0/dir1</command>
  11351. <command>-fs NAMENODE -touchz hdfs:///dir0/file0</command>
  11352. <command>-fs NAMENODE -touchz hdfs:///dir0/dir1/file1</command>
  11353. <command>-fs NAMENODE -touchz hdfs:///dir0/dir1/file2</command>
  11354. <command>-fs NAMENODE -mkdir hdfs:///dir2</command>
  11355. <command>-fs NAMENODE -mkdir hdfs:///dir2/dir1</command>
  11356. <command>-fs NAMENODE -touchz hdfs:///dir2/file0</command>
  11357. <command>-fs NAMENODE -touchz hdfs:///dir2/dir1/file1</command>
  11358. <command>-fs NAMENODE -touchz hdfs:///dir2/dir1/file2</command>
  11359. <command>-fs NAMENODE -chown newowner:newgroup hdfs:///dir0 hdfs:///dir2</command>
  11360. <command>-fs NAMENODE -ls -R hdfs:///dir*</command>
  11361. </test-commands>
  11362. <cleanup-commands>
  11363. <command>-fs NAMENODE -rm -r hdfs:///dir*</command>
  11364. </cleanup-commands>
  11365. <comparators>
  11366. <comparator>
  11367. <type>RegexpComparator</type>
  11368. <expected-output>^drwxr-xr-x( )*-( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir0/dir1</expected-output>
  11369. </comparator>
  11370. <comparator>
  11371. <type>RegexpComparator</type>
  11372. <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir0/dir1/file1</expected-output>
  11373. </comparator>
  11374. <comparator>
  11375. <type>RegexpComparator</type>
  11376. <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir0/dir1/file2</expected-output>
  11377. </comparator>
  11378. <comparator>
  11379. <type>RegexpComparator</type>
  11380. <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir0/file0</expected-output>
  11381. </comparator>
  11382. <comparator>
  11383. <type>RegexpComparator</type>
  11384. <expected-output>^drwxr-xr-x( )*-( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir2/dir1</expected-output>
  11385. </comparator>
  11386. <comparator>
  11387. <type>RegexpComparator</type>
  11388. <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir2/dir1/file1</expected-output>
  11389. </comparator>
  11390. <comparator>
  11391. <type>RegexpComparator</type>
  11392. <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir2/dir1/file2</expected-output>
  11393. </comparator>
  11394. <comparator>
  11395. <type>RegexpComparator</type>
  11396. <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir2/file0</expected-output>
  11397. </comparator>
  11398. </comparators>
  11399. </test>
  11400. <test> <!-- TESTED -->
  11401. <description>chown: change ownership of multiple directories recursively in hdfs:// path using globbing</description>
  11402. <test-commands>
  11403. <command>-fs NAMENODE -mkdir hdfs:///dir0</command>
  11404. <command>-fs NAMENODE -mkdir hdfs:///dir0/dir1</command>
  11405. <command>-fs NAMENODE -touchz hdfs:///dir0/file0</command>
  11406. <command>-fs NAMENODE -touchz hdfs:///dir0/dir1/file1</command>
  11407. <command>-fs NAMENODE -touchz hdfs:///dir0/dir1/file2</command>
  11408. <command>-fs NAMENODE -mkdir hdfs:///dir2</command>
  11409. <command>-fs NAMENODE -mkdir hdfs:///dir2/dir1</command>
  11410. <command>-fs NAMENODE -touchz hdfs:///dir2/file0</command>
  11411. <command>-fs NAMENODE -touchz hdfs:///dir2/dir1/file1</command>
  11412. <command>-fs NAMENODE -touchz hdfs:///dir2/dir1/file2</command>
  11413. <command>-fs NAMENODE -chown -R newowner:newgroup hdfs:///dir*</command>
  11414. <command>-fs NAMENODE -ls -R hdfs:///dir*</command>
  11415. </test-commands>
  11416. <cleanup-commands>
  11417. <command>-fs NAMENODE -rm -r hdfs:///dir*</command>
  11418. </cleanup-commands>
  11419. <comparators>
  11420. <comparator>
  11421. <type>RegexpComparator</type>
  11422. <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>
  11423. </comparator>
  11424. <comparator>
  11425. <type>RegexpComparator</type>
  11426. <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>
  11427. </comparator>
  11428. <comparator>
  11429. <type>RegexpComparator</type>
  11430. <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>
  11431. </comparator>
  11432. <comparator>
  11433. <type>RegexpComparator</type>
  11434. <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>
  11435. </comparator>
  11436. <comparator>
  11437. <type>RegexpComparator</type>
  11438. <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>
  11439. </comparator>
  11440. <comparator>
  11441. <type>RegexpComparator</type>
  11442. <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>
  11443. </comparator>
  11444. <comparator>
  11445. <type>RegexpComparator</type>
  11446. <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>
  11447. </comparator>
  11448. <comparator>
  11449. <type>RegexpComparator</type>
  11450. <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>
  11451. </comparator>
  11452. </comparators>
  11453. </test>
  11454. <test> <!-- TESTED -->
  11455. <description>chown: change ownership of multiple directories recursively in hdfs:// path without globbing</description>
  11456. <test-commands>
  11457. <command>-fs NAMENODE -mkdir hdfs:///dir0</command>
  11458. <command>-fs NAMENODE -mkdir hdfs:///dir0/dir1</command>
  11459. <command>-fs NAMENODE -touchz hdfs:///dir0/file0</command>
  11460. <command>-fs NAMENODE -touchz hdfs:///dir0/dir1/file1</command>
  11461. <command>-fs NAMENODE -touchz hdfs:///dir0/dir1/file2</command>
  11462. <command>-fs NAMENODE -mkdir hdfs:///dir2</command>
  11463. <command>-fs NAMENODE -mkdir hdfs:///dir2/dir1</command>
  11464. <command>-fs NAMENODE -touchz hdfs:///dir2/file0</command>
  11465. <command>-fs NAMENODE -touchz hdfs:///dir2/dir1/file1</command>
  11466. <command>-fs NAMENODE -touchz hdfs:///dir2/dir1/file2</command>
  11467. <command>-fs NAMENODE -chown -R newowner:newgroup hdfs:///dir0 hdfs:///dir2</command>
  11468. <command>-fs NAMENODE -ls -R hdfs:///dir*</command>
  11469. </test-commands>
  11470. <cleanup-commands>
  11471. <command>-fs NAMENODE -rm -r hdfs:///dir*</command>
  11472. </cleanup-commands>
  11473. <comparators>
  11474. <comparator>
  11475. <type>RegexpComparator</type>
  11476. <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>
  11477. </comparator>
  11478. <comparator>
  11479. <type>RegexpComparator</type>
  11480. <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>
  11481. </comparator>
  11482. <comparator>
  11483. <type>RegexpComparator</type>
  11484. <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>
  11485. </comparator>
  11486. <comparator>
  11487. <type>RegexpComparator</type>
  11488. <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>
  11489. </comparator>
  11490. <comparator>
  11491. <type>RegexpComparator</type>
  11492. <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>
  11493. </comparator>
  11494. <comparator>
  11495. <type>RegexpComparator</type>
  11496. <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>
  11497. </comparator>
  11498. <comparator>
  11499. <type>RegexpComparator</type>
  11500. <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>
  11501. </comparator>
  11502. <comparator>
  11503. <type>RegexpComparator</type>
  11504. <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>
  11505. </comparator>
  11506. </comparators>
  11507. </test>
  11508. <test> <!-- TESTED -->
  11509. <description>chown: invalid option for owner of file in hdfs:// path</description>
  11510. <test-commands>
  11511. <command>-fs NAMENODE -touchz hdfs:///file1</command>
  11512. <command>-fs NAMENODE -chown %:newgroup hdfs:///file1</command>
  11513. </test-commands>
  11514. <cleanup-commands>
  11515. <command>-fs NAMENODE -rm hdfs:///file1</command>
  11516. </cleanup-commands>
  11517. <comparators>
  11518. <comparator>
  11519. <type>RegexpComparator</type>
  11520. <expected-output>^-chown: '%:newgroup' does not match expected pattern for \[owner\]\[:group\].</expected-output>
  11521. </comparator>
  11522. </comparators>
  11523. </test>
  11524. <test> <!-- TESTED -->
  11525. <description>chown: invalid option for group of file in hdfs:// path</description>
  11526. <test-commands>
  11527. <command>-fs NAMENODE -touchz hdfs:///file1</command>
  11528. <command>-fs NAMENODE -chown newowner:% hdfs:///file1</command>
  11529. </test-commands>
  11530. <cleanup-commands>
  11531. <command>-fs NAMENODE -rm hdfs:///file1</command>
  11532. </cleanup-commands>
  11533. <comparators>
  11534. <comparator>
  11535. <type>RegexpComparator</type>
  11536. <expected-output>^-chown: 'newowner:%' does not match expected pattern for \[owner\]\[:group\].</expected-output>
  11537. </comparator>
  11538. </comparators>
  11539. </test>
  11540. <!-- Tests for chown -->
  11541. <test> <!-- TESTED -->
  11542. <description>chown: change ownership of file in absolute path</description>
  11543. <test-commands>
  11544. <command>-fs NAMENODE -touchz /file1</command>
  11545. <command>-fs NAMENODE -chown newowner:newgroup /file1</command>
  11546. <command>-fs NAMENODE -ls /file1</command>
  11547. </test-commands>
  11548. <cleanup-commands>
  11549. <command>-fs NAMENODE -rm /file1</command>
  11550. </cleanup-commands>
  11551. <comparators>
  11552. <comparator>
  11553. <type>TokenComparator</type>
  11554. <expected-output>Found 1 items</expected-output>
  11555. </comparator>
  11556. <comparator>
  11557. <type>RegexpComparator</type>
  11558. <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>
  11559. </comparator>
  11560. </comparators>
  11561. </test>
  11562. <test> <!-- TESTED -->
  11563. <description>chown: change ownership of file in relative path</description>
  11564. <test-commands>
  11565. <command>-fs NAMENODE -touchz file1</command>
  11566. <command>-fs NAMENODE -chown newowner:newgroup file1</command>
  11567. <command>-fs NAMENODE -ls file1</command>
  11568. </test-commands>
  11569. <cleanup-commands>
  11570. <command>-fs NAMENODE -rm file1</command>
  11571. </cleanup-commands>
  11572. <comparators>
  11573. <comparator>
  11574. <type>TokenComparator</type>
  11575. <expected-output>Found 1 items</expected-output>
  11576. </comparator>
  11577. <comparator>
  11578. <type>RegexpComparator</type>
  11579. <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>
  11580. </comparator>
  11581. </comparators>
  11582. </test>
  11583. <test> <!-- TESTED -->
  11584. <description>chown: change ownership of directory in absolute path</description>
  11585. <test-commands>
  11586. <command>-fs NAMENODE -mkdir /dir0</command>
  11587. <command>-fs NAMENODE -mkdir /dir0/dir1</command>
  11588. <command>-fs NAMENODE -touchz /dir0/file0</command>
  11589. <command>-fs NAMENODE -touchz /dir0/dir1/file1</command>
  11590. <command>-fs NAMENODE -touchz /dir0/dir1/file2</command>
  11591. <command>-fs NAMENODE -chown newowner:newgroup /dir0/dir1</command>
  11592. <command>-fs NAMENODE -ls -R /dir0</command>
  11593. </test-commands>
  11594. <cleanup-commands>
  11595. <command>-fs NAMENODE -rm -r /dir0</command>
  11596. </cleanup-commands>
  11597. <comparators>
  11598. <comparator>
  11599. <type>RegexpComparator</type>
  11600. <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>
  11601. </comparator>
  11602. <comparator>
  11603. <type>RegexpComparator</type>
  11604. <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1/file1</expected-output>
  11605. </comparator>
  11606. <comparator>
  11607. <type>RegexpComparator</type>
  11608. <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1/file2</expected-output>
  11609. </comparator>
  11610. <comparator>
  11611. <type>RegexpComparator</type>
  11612. <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/file0</expected-output>
  11613. </comparator>
  11614. </comparators>
  11615. </test>
  11616. <test> <!-- TESTED -->
  11617. <description>chown: change ownership of directory in relative path</description>
  11618. <test-commands>
  11619. <command>-fs NAMENODE -mkdir dir0</command>
  11620. <command>-fs NAMENODE -mkdir dir0/dir1</command>
  11621. <command>-fs NAMENODE -touchz dir0/file0</command>
  11622. <command>-fs NAMENODE -touchz dir0/dir1/file1</command>
  11623. <command>-fs NAMENODE -touchz dir0/dir1/file2</command>
  11624. <command>-fs NAMENODE -chown newowner:newgroup dir0/dir1</command>
  11625. <command>-fs NAMENODE -ls -R dir0</command>
  11626. </test-commands>
  11627. <cleanup-commands>
  11628. <command>-fs NAMENODE -rm -r dir0</command>
  11629. </cleanup-commands>
  11630. <comparators>
  11631. <comparator>
  11632. <type>RegexpComparator</type>
  11633. <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>
  11634. </comparator>
  11635. <comparator>
  11636. <type>RegexpComparator</type>
  11637. <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/dir1/file1</expected-output>
  11638. </comparator>
  11639. <comparator>
  11640. <type>RegexpComparator</type>
  11641. <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/dir1/file2</expected-output>
  11642. </comparator>
  11643. <comparator>
  11644. <type>RegexpComparator</type>
  11645. <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/file0</expected-output>
  11646. </comparator>
  11647. </comparators>
  11648. </test>
  11649. <test> <!-- TESTED -->
  11650. <description>chown: change ownership of directory in absolute path recursively </description>
  11651. <test-commands>
  11652. <command>-fs NAMENODE -mkdir /dir0</command>
  11653. <command>-fs NAMENODE -mkdir /dir0/dir1</command>
  11654. <command>-fs NAMENODE -touchz /dir0/file0</command>
  11655. <command>-fs NAMENODE -touchz /dir0/dir1/file1</command>
  11656. <command>-fs NAMENODE -touchz /dir0/dir1/file2</command>
  11657. <command>-fs NAMENODE -chown -R newowner:newgroup /dir0/dir1</command>
  11658. <command>-fs NAMENODE -ls -R /dir0</command>
  11659. </test-commands>
  11660. <cleanup-commands>
  11661. <command>-fs NAMENODE -rm -r /dir0</command>
  11662. </cleanup-commands>
  11663. <comparators>
  11664. <comparator>
  11665. <type>RegexpComparator</type>
  11666. <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>
  11667. </comparator>
  11668. <comparator>
  11669. <type>RegexpComparator</type>
  11670. <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>
  11671. </comparator>
  11672. <comparator>
  11673. <type>RegexpComparator</type>
  11674. <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>
  11675. </comparator>
  11676. <comparator>
  11677. <type>RegexpComparator</type>
  11678. <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/file0</expected-output>
  11679. </comparator>
  11680. </comparators>
  11681. </test>
  11682. <test> <!-- TESTED -->
  11683. <description>chown: change ownership of directory in relative path recursively </description>
  11684. <test-commands>
  11685. <command>-fs NAMENODE -mkdir dir0</command>
  11686. <command>-fs NAMENODE -mkdir dir0/dir1</command>
  11687. <command>-fs NAMENODE -touchz dir0/file0</command>
  11688. <command>-fs NAMENODE -touchz dir0/dir1/file1</command>
  11689. <command>-fs NAMENODE -touchz dir0/dir1/file2</command>
  11690. <command>-fs NAMENODE -chown -R newowner:newgroup dir0/dir1</command>
  11691. <command>-fs NAMENODE -ls -R dir0</command>
  11692. </test-commands>
  11693. <cleanup-commands>
  11694. <command>-fs NAMENODE -rm -r dir0</command>
  11695. </cleanup-commands>
  11696. <comparators>
  11697. <comparator>
  11698. <type>RegexpComparator</type>
  11699. <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>
  11700. </comparator>
  11701. <comparator>
  11702. <type>RegexpComparator</type>
  11703. <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>
  11704. </comparator>
  11705. <comparator>
  11706. <type>RegexpComparator</type>
  11707. <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>
  11708. </comparator>
  11709. <comparator>
  11710. <type>RegexpComparator</type>
  11711. <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/file0</expected-output>
  11712. </comparator>
  11713. </comparators>
  11714. </test>
  11715. <test> <!-- TESTED -->
  11716. <description>chown: change ownership of non existent file in absolute path</description>
  11717. <test-commands>
  11718. <command>-fs NAMENODE -chown newowner:newgroup /file1</command>
  11719. </test-commands>
  11720. <cleanup-commands>
  11721. <command>-fs NAMENODE -rm /file1</command>
  11722. </cleanup-commands>
  11723. <comparators>
  11724. <comparator>
  11725. <type>RegexpComparator</type>
  11726. <expected-output>^chown: `/file1': No such file or directory</expected-output>
  11727. </comparator>
  11728. </comparators>
  11729. </test>
  11730. <test> <!-- TESTED -->
  11731. <description>chown: change ownership of non existent file in relative path</description>
  11732. <test-commands>
  11733. <command>-fs NAMENODE -chown newowner:newgroup file1</command>
  11734. </test-commands>
  11735. <cleanup-commands>
  11736. <command>-fs NAMENODE -rm file1</command>
  11737. </cleanup-commands>
  11738. <comparators>
  11739. <comparator>
  11740. <type>RegexpComparator</type>
  11741. <expected-output>^chown: `file1': No such file or directory</expected-output>
  11742. </comparator>
  11743. </comparators>
  11744. </test>
  11745. <test> <!-- TESTED -->
  11746. <description>chown: change ownership of multiple files in absolute path using globbing</description>
  11747. <test-commands>
  11748. <command>-fs NAMENODE -touchz /file1</command>
  11749. <command>-fs NAMENODE -touchz /file2</command>
  11750. <command>-fs NAMENODE -touchz /file3</command>
  11751. <command>-fs NAMENODE -touchz /file4</command>
  11752. <command>-fs NAMENODE -chown newowner:newgroup /file* </command>
  11753. <command>-fs NAMENODE -ls -R /file*</command>
  11754. </test-commands>
  11755. <cleanup-commands>
  11756. <command>-fs NAMENODE -rm /file*</command>
  11757. </cleanup-commands>
  11758. <comparators>
  11759. <comparator>
  11760. <type>RegexpComparator</type>
  11761. <expected-output>^-rw-r--r--( )*1( )*newowner( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/file1</expected-output>
  11762. </comparator>
  11763. <comparator>
  11764. <type>RegexpComparator</type>
  11765. <expected-output>^-rw-r--r--( )*1( )*newowner( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/file2</expected-output>
  11766. </comparator>
  11767. <comparator>
  11768. <type>RegexpComparator</type>
  11769. <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>
  11770. </comparator>
  11771. <comparator>
  11772. <type>RegexpComparator</type>
  11773. <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>
  11774. </comparator>
  11775. </comparators>
  11776. </test>
  11777. <test> <!-- TESTED -->
  11778. <description>chown: change ownership of multiple files in relative path using globbing</description>
  11779. <test-commands>
  11780. <command>-fs NAMENODE -touchz file1</command>
  11781. <command>-fs NAMENODE -touchz file2</command>
  11782. <command>-fs NAMENODE -touchz file3</command>
  11783. <command>-fs NAMENODE -touchz file4</command>
  11784. <command>-fs NAMENODE -chown newowner:newgroup file* </command>
  11785. <command>-fs NAMENODE -ls -R file*</command>
  11786. </test-commands>
  11787. <cleanup-commands>
  11788. <command>-fs NAMENODE -rm file*</command>
  11789. </cleanup-commands>
  11790. <comparators>
  11791. <comparator>
  11792. <type>RegexpComparator</type>
  11793. <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>
  11794. </comparator>
  11795. <comparator>
  11796. <type>RegexpComparator</type>
  11797. <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>
  11798. </comparator>
  11799. <comparator>
  11800. <type>RegexpComparator</type>
  11801. <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>
  11802. </comparator>
  11803. <comparator>
  11804. <type>RegexpComparator</type>
  11805. <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>
  11806. </comparator>
  11807. </comparators>
  11808. </test>
  11809. <test> <!-- TESTED -->
  11810. <description>chown: change ownership of multiple directories in absolute path using globbing</description>
  11811. <test-commands>
  11812. <command>-fs NAMENODE -mkdir /dir0</command>
  11813. <command>-fs NAMENODE -mkdir /dir0/dir1</command>
  11814. <command>-fs NAMENODE -touchz /dir0/file0</command>
  11815. <command>-fs NAMENODE -touchz /dir0/dir1/file1</command>
  11816. <command>-fs NAMENODE -touchz /dir0/dir1/file2</command>
  11817. <command>-fs NAMENODE -mkdir /dir2</command>
  11818. <command>-fs NAMENODE -mkdir /dir2/dir1</command>
  11819. <command>-fs NAMENODE -touchz /dir2/file0</command>
  11820. <command>-fs NAMENODE -touchz /dir2/dir1/file1</command>
  11821. <command>-fs NAMENODE -touchz /dir2/dir1/file2</command>
  11822. <command>-fs NAMENODE -chown newowner:newgroup /dir*</command>
  11823. <command>-fs NAMENODE -ls -R /dir*</command>
  11824. </test-commands>
  11825. <cleanup-commands>
  11826. <command>-fs NAMENODE -rm -r /dir*</command>
  11827. </cleanup-commands>
  11828. <comparators>
  11829. <comparator>
  11830. <type>RegexpComparator</type>
  11831. <expected-output>^drwxr-xr-x( )*-( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1</expected-output>
  11832. </comparator>
  11833. <comparator>
  11834. <type>RegexpComparator</type>
  11835. <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1/file1</expected-output>
  11836. </comparator>
  11837. <comparator>
  11838. <type>RegexpComparator</type>
  11839. <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1/file2</expected-output>
  11840. </comparator>
  11841. <comparator>
  11842. <type>RegexpComparator</type>
  11843. <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/file0</expected-output>
  11844. </comparator>
  11845. <comparator>
  11846. <type>RegexpComparator</type>
  11847. <expected-output>^drwxr-xr-x( )*-( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir2/dir1</expected-output>
  11848. </comparator>
  11849. <comparator>
  11850. <type>RegexpComparator</type>
  11851. <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir2/dir1/file1</expected-output>
  11852. </comparator>
  11853. <comparator>
  11854. <type>RegexpComparator</type>
  11855. <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir2/dir1/file2</expected-output>
  11856. </comparator>
  11857. <comparator>
  11858. <type>RegexpComparator</type>
  11859. <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir2/file0</expected-output>
  11860. </comparator>
  11861. </comparators>
  11862. </test>
  11863. <test> <!-- TESTED -->
  11864. <description>chown: change ownership of multiple directories in relative path using globbing</description>
  11865. <test-commands>
  11866. <command>-fs NAMENODE -mkdir dir0</command>
  11867. <command>-fs NAMENODE -mkdir dir0/dir1</command>
  11868. <command>-fs NAMENODE -touchz dir0/file0</command>
  11869. <command>-fs NAMENODE -touchz dir0/dir1/file1</command>
  11870. <command>-fs NAMENODE -touchz dir0/dir1/file2</command>
  11871. <command>-fs NAMENODE -mkdir dir2</command>
  11872. <command>-fs NAMENODE -mkdir dir2/dir1</command>
  11873. <command>-fs NAMENODE -touchz dir2/file0</command>
  11874. <command>-fs NAMENODE -touchz dir2/dir1/file1</command>
  11875. <command>-fs NAMENODE -touchz dir2/dir1/file2</command>
  11876. <command>-fs NAMENODE -chown newowner:newgroup dir*</command>
  11877. <command>-fs NAMENODE -ls -R dir*</command>
  11878. </test-commands>
  11879. <cleanup-commands>
  11880. <command>-fs NAMENODE -rm -r dir*</command>
  11881. </cleanup-commands>
  11882. <comparators>
  11883. <comparator>
  11884. <type>RegexpComparator</type>
  11885. <expected-output>^drwxr-xr-x( )*-( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/dir1</expected-output>
  11886. </comparator>
  11887. <comparator>
  11888. <type>RegexpComparator</type>
  11889. <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/dir1/file1</expected-output>
  11890. </comparator>
  11891. <comparator>
  11892. <type>RegexpComparator</type>
  11893. <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/dir1/file2</expected-output>
  11894. </comparator>
  11895. <comparator>
  11896. <type>RegexpComparator</type>
  11897. <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/file0</expected-output>
  11898. </comparator>
  11899. <comparator>
  11900. <type>RegexpComparator</type>
  11901. <expected-output>^drwxr-xr-x( )*-( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir2/dir1</expected-output>
  11902. </comparator>
  11903. <comparator>
  11904. <type>RegexpComparator</type>
  11905. <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir2/dir1/file1</expected-output>
  11906. </comparator>
  11907. <comparator>
  11908. <type>RegexpComparator</type>
  11909. <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir2/dir1/file2</expected-output>
  11910. </comparator>
  11911. <comparator>
  11912. <type>RegexpComparator</type>
  11913. <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir2/file0</expected-output>
  11914. </comparator>
  11915. </comparators>
  11916. </test>
  11917. <test> <!-- TESTED -->
  11918. <description>chown: change ownership of multiple files in absolute path without globbing</description>
  11919. <test-commands>
  11920. <command>-fs NAMENODE -touchz /file1</command>
  11921. <command>-fs NAMENODE -touchz /file2</command>
  11922. <command>-fs NAMENODE -touchz /file3</command>
  11923. <command>-fs NAMENODE -touchz /file4</command>
  11924. <command>-fs NAMENODE -chown newowner:newgroup /file1 /file2 /file3 /file4 </command>
  11925. <command>-fs NAMENODE -ls -R /file*</command>
  11926. </test-commands>
  11927. <cleanup-commands>
  11928. <command>-fs NAMENODE -rm /file*</command>
  11929. </cleanup-commands>
  11930. <comparators>
  11931. <comparator>
  11932. <type>RegexpComparator</type>
  11933. <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>
  11934. </comparator>
  11935. <comparator>
  11936. <type>RegexpComparator</type>
  11937. <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>
  11938. </comparator>
  11939. <comparator>
  11940. <type>RegexpComparator</type>
  11941. <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>
  11942. </comparator>
  11943. <comparator>
  11944. <type>RegexpComparator</type>
  11945. <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>
  11946. </comparator>
  11947. </comparators>
  11948. </test>
  11949. <test> <!-- TESTED -->
  11950. <description>chown: change ownership of multiple files in relative path without globbing</description>
  11951. <test-commands>
  11952. <command>-fs NAMENODE -touchz file1</command>
  11953. <command>-fs NAMENODE -touchz file2</command>
  11954. <command>-fs NAMENODE -touchz file3</command>
  11955. <command>-fs NAMENODE -touchz file4</command>
  11956. <command>-fs NAMENODE -chown newowner:newgroup file1 file2 file3 file4 </command>
  11957. <command>-fs NAMENODE -ls -R file*</command>
  11958. </test-commands>
  11959. <cleanup-commands>
  11960. <command>-fs NAMENODE -rm file*</command>
  11961. </cleanup-commands>
  11962. <comparators>
  11963. <comparator>
  11964. <type>RegexpComparator</type>
  11965. <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>
  11966. </comparator>
  11967. <comparator>
  11968. <type>RegexpComparator</type>
  11969. <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>
  11970. </comparator>
  11971. <comparator>
  11972. <type>RegexpComparator</type>
  11973. <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>
  11974. </comparator>
  11975. <comparator>
  11976. <type>RegexpComparator</type>
  11977. <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>
  11978. </comparator>
  11979. </comparators>
  11980. </test>
  11981. <test> <!-- TESTED -->
  11982. <description>chown: change ownership of multiple directories in absolute path without globbing</description>
  11983. <test-commands>
  11984. <command>-fs NAMENODE -mkdir /dir0</command>
  11985. <command>-fs NAMENODE -mkdir /dir0/dir1</command>
  11986. <command>-fs NAMENODE -touchz /dir0/file0</command>
  11987. <command>-fs NAMENODE -touchz /dir0/dir1/file1</command>
  11988. <command>-fs NAMENODE -touchz /dir0/dir1/file2</command>
  11989. <command>-fs NAMENODE -mkdir /dir2</command>
  11990. <command>-fs NAMENODE -mkdir /dir2/dir1</command>
  11991. <command>-fs NAMENODE -touchz /dir2/file0</command>
  11992. <command>-fs NAMENODE -touchz /dir2/dir1/file1</command>
  11993. <command>-fs NAMENODE -touchz /dir2/dir1/file2</command>
  11994. <command>-fs NAMENODE -chown newowner:newgroup /dir0 /dir2</command>
  11995. <command>-fs NAMENODE -ls -R /dir*</command>
  11996. </test-commands>
  11997. <cleanup-commands>
  11998. <command>-fs NAMENODE -rm -r /dir*</command>
  11999. </cleanup-commands>
  12000. <comparators>
  12001. <comparator>
  12002. <type>RegexpComparator</type>
  12003. <expected-output>^drwxr-xr-x( )*-( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1</expected-output>
  12004. </comparator>
  12005. <comparator>
  12006. <type>RegexpComparator</type>
  12007. <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1/file1</expected-output>
  12008. </comparator>
  12009. <comparator>
  12010. <type>RegexpComparator</type>
  12011. <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1/file2</expected-output>
  12012. </comparator>
  12013. <comparator>
  12014. <type>RegexpComparator</type>
  12015. <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/file0</expected-output>
  12016. </comparator>
  12017. <comparator>
  12018. <type>RegexpComparator</type>
  12019. <expected-output>^drwxr-xr-x( )*-( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir2/dir1</expected-output>
  12020. </comparator>
  12021. <comparator>
  12022. <type>RegexpComparator</type>
  12023. <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir2/dir1/file1</expected-output>
  12024. </comparator>
  12025. <comparator>
  12026. <type>RegexpComparator</type>
  12027. <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir2/dir1/file2</expected-output>
  12028. </comparator>
  12029. <comparator>
  12030. <type>RegexpComparator</type>
  12031. <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir2/file0</expected-output>
  12032. </comparator>
  12033. </comparators>
  12034. </test>
  12035. <test> <!-- TESTED -->
  12036. <description>chown: change ownership of multiple directories in relative path without globbing</description>
  12037. <test-commands>
  12038. <command>-fs NAMENODE -mkdir dir0</command>
  12039. <command>-fs NAMENODE -mkdir dir0/dir1</command>
  12040. <command>-fs NAMENODE -touchz dir0/file0</command>
  12041. <command>-fs NAMENODE -touchz dir0/dir1/file1</command>
  12042. <command>-fs NAMENODE -touchz dir0/dir1/file2</command>
  12043. <command>-fs NAMENODE -mkdir dir2</command>
  12044. <command>-fs NAMENODE -mkdir dir2/dir1</command>
  12045. <command>-fs NAMENODE -touchz dir2/file0</command>
  12046. <command>-fs NAMENODE -touchz dir2/dir1/file1</command>
  12047. <command>-fs NAMENODE -touchz dir2/dir1/file2</command>
  12048. <command>-fs NAMENODE -chown newowner:newgroup dir0 dir2</command>
  12049. <command>-fs NAMENODE -ls -R dir*</command>
  12050. </test-commands>
  12051. <cleanup-commands>
  12052. <command>-fs NAMENODE -rm -r dir*</command>
  12053. </cleanup-commands>
  12054. <comparators>
  12055. <comparator>
  12056. <type>RegexpComparator</type>
  12057. <expected-output>^drwxr-xr-x( )*-( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/dir1</expected-output>
  12058. </comparator>
  12059. <comparator>
  12060. <type>RegexpComparator</type>
  12061. <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/dir1/file1</expected-output>
  12062. </comparator>
  12063. <comparator>
  12064. <type>RegexpComparator</type>
  12065. <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/dir1/file2</expected-output>
  12066. </comparator>
  12067. <comparator>
  12068. <type>RegexpComparator</type>
  12069. <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/file0</expected-output>
  12070. </comparator>
  12071. <comparator>
  12072. <type>RegexpComparator</type>
  12073. <expected-output>^drwxr-xr-x( )*-( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir2/dir1</expected-output>
  12074. </comparator>
  12075. <comparator>
  12076. <type>RegexpComparator</type>
  12077. <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir2/dir1/file1</expected-output>
  12078. </comparator>
  12079. <comparator>
  12080. <type>RegexpComparator</type>
  12081. <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir2/dir1/file2</expected-output>
  12082. </comparator>
  12083. <comparator>
  12084. <type>RegexpComparator</type>
  12085. <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir2/file0</expected-output>
  12086. </comparator>
  12087. </comparators>
  12088. </test>
  12089. <test> <!-- TESTED -->
  12090. <description>chown: change ownership of multiple directories recursively in absolute path using globbing</description>
  12091. <test-commands>
  12092. <command>-fs NAMENODE -mkdir /dir0</command>
  12093. <command>-fs NAMENODE -mkdir /dir0/dir1</command>
  12094. <command>-fs NAMENODE -touchz /dir0/file0</command>
  12095. <command>-fs NAMENODE -touchz /dir0/dir1/file1</command>
  12096. <command>-fs NAMENODE -touchz /dir0/dir1/file2</command>
  12097. <command>-fs NAMENODE -mkdir /dir2</command>
  12098. <command>-fs NAMENODE -mkdir /dir2/dir1</command>
  12099. <command>-fs NAMENODE -touchz /dir2/file0</command>
  12100. <command>-fs NAMENODE -touchz /dir2/dir1/file1</command>
  12101. <command>-fs NAMENODE -touchz /dir2/dir1/file2</command>
  12102. <command>-fs NAMENODE -chown -R newowner:newgroup /dir*</command>
  12103. <command>-fs NAMENODE -ls -R /dir*</command>
  12104. </test-commands>
  12105. <cleanup-commands>
  12106. <command>-fs NAMENODE -rm -r /dir*</command>
  12107. </cleanup-commands>
  12108. <comparators>
  12109. <comparator>
  12110. <type>RegexpComparator</type>
  12111. <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>
  12112. </comparator>
  12113. <comparator>
  12114. <type>RegexpComparator</type>
  12115. <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>
  12116. </comparator>
  12117. <comparator>
  12118. <type>RegexpComparator</type>
  12119. <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>
  12120. </comparator>
  12121. <comparator>
  12122. <type>RegexpComparator</type>
  12123. <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>
  12124. </comparator>
  12125. <comparator>
  12126. <type>RegexpComparator</type>
  12127. <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>
  12128. </comparator>
  12129. <comparator>
  12130. <type>RegexpComparator</type>
  12131. <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>
  12132. </comparator>
  12133. <comparator>
  12134. <type>RegexpComparator</type>
  12135. <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>
  12136. </comparator>
  12137. <comparator>
  12138. <type>RegexpComparator</type>
  12139. <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>
  12140. </comparator>
  12141. </comparators>
  12142. </test>
  12143. <test> <!-- TESTED -->
  12144. <description>chown: change ownership of multiple directories recursively in relative path using globbing</description>
  12145. <test-commands>
  12146. <command>-fs NAMENODE -mkdir dir0</command>
  12147. <command>-fs NAMENODE -mkdir dir0/dir1</command>
  12148. <command>-fs NAMENODE -touchz dir0/file0</command>
  12149. <command>-fs NAMENODE -touchz dir0/dir1/file1</command>
  12150. <command>-fs NAMENODE -touchz dir0/dir1/file2</command>
  12151. <command>-fs NAMENODE -mkdir dir2</command>
  12152. <command>-fs NAMENODE -mkdir dir2/dir1</command>
  12153. <command>-fs NAMENODE -touchz dir2/file0</command>
  12154. <command>-fs NAMENODE -touchz dir2/dir1/file1</command>
  12155. <command>-fs NAMENODE -touchz dir2/dir1/file2</command>
  12156. <command>-fs NAMENODE -chown -R newowner:newgroup dir*</command>
  12157. <command>-fs NAMENODE -ls -R dir*</command>
  12158. </test-commands>
  12159. <cleanup-commands>
  12160. <command>-fs NAMENODE -rm -r dir*</command>
  12161. </cleanup-commands>
  12162. <comparators>
  12163. <comparator>
  12164. <type>RegexpComparator</type>
  12165. <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>
  12166. </comparator>
  12167. <comparator>
  12168. <type>RegexpComparator</type>
  12169. <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>
  12170. </comparator>
  12171. <comparator>
  12172. <type>RegexpComparator</type>
  12173. <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>
  12174. </comparator>
  12175. <comparator>
  12176. <type>RegexpComparator</type>
  12177. <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>
  12178. </comparator>
  12179. <comparator>
  12180. <type>RegexpComparator</type>
  12181. <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>
  12182. </comparator>
  12183. <comparator>
  12184. <type>RegexpComparator</type>
  12185. <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>
  12186. </comparator>
  12187. <comparator>
  12188. <type>RegexpComparator</type>
  12189. <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>
  12190. </comparator>
  12191. <comparator>
  12192. <type>RegexpComparator</type>
  12193. <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>
  12194. </comparator>
  12195. </comparators>
  12196. </test>
  12197. <test> <!-- TESTED -->
  12198. <description>chown: change ownership of multiple directories recursively in absolute path without globbing</description>
  12199. <test-commands>
  12200. <command>-fs NAMENODE -mkdir /dir0</command>
  12201. <command>-fs NAMENODE -mkdir /dir0/dir1</command>
  12202. <command>-fs NAMENODE -touchz /dir0/file0</command>
  12203. <command>-fs NAMENODE -touchz /dir0/dir1/file1</command>
  12204. <command>-fs NAMENODE -touchz /dir0/dir1/file2</command>
  12205. <command>-fs NAMENODE -mkdir /dir2</command>
  12206. <command>-fs NAMENODE -mkdir /dir2/dir1</command>
  12207. <command>-fs NAMENODE -touchz /dir2/file0</command>
  12208. <command>-fs NAMENODE -touchz /dir2/dir1/file1</command>
  12209. <command>-fs NAMENODE -touchz /dir2/dir1/file2</command>
  12210. <command>-fs NAMENODE -chown -R newowner:newgroup /dir0 /dir2</command>
  12211. <command>-fs NAMENODE -ls -R /dir*</command>
  12212. </test-commands>
  12213. <cleanup-commands>
  12214. <command>-fs NAMENODE -rm -r /dir*</command>
  12215. </cleanup-commands>
  12216. <comparators>
  12217. <comparator>
  12218. <type>RegexpComparator</type>
  12219. <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>
  12220. </comparator>
  12221. <comparator>
  12222. <type>RegexpComparator</type>
  12223. <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>
  12224. </comparator>
  12225. <comparator>
  12226. <type>RegexpComparator</type>
  12227. <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>
  12228. </comparator>
  12229. <comparator>
  12230. <type>RegexpComparator</type>
  12231. <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>
  12232. </comparator>
  12233. <comparator>
  12234. <type>RegexpComparator</type>
  12235. <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>
  12236. </comparator>
  12237. <comparator>
  12238. <type>RegexpComparator</type>
  12239. <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>
  12240. </comparator>
  12241. <comparator>
  12242. <type>RegexpComparator</type>
  12243. <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>
  12244. </comparator>
  12245. <comparator>
  12246. <type>RegexpComparator</type>
  12247. <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>
  12248. </comparator>
  12249. </comparators>
  12250. </test>
  12251. <test> <!-- TESTED -->
  12252. <description>chown: change ownership of multiple directories recursively in relative path without globbing</description>
  12253. <test-commands>
  12254. <command>-fs NAMENODE -mkdir dir0</command>
  12255. <command>-fs NAMENODE -mkdir dir0/dir1</command>
  12256. <command>-fs NAMENODE -touchz dir0/file0</command>
  12257. <command>-fs NAMENODE -touchz dir0/dir1/file1</command>
  12258. <command>-fs NAMENODE -touchz dir0/dir1/file2</command>
  12259. <command>-fs NAMENODE -mkdir dir2</command>
  12260. <command>-fs NAMENODE -mkdir dir2/dir1</command>
  12261. <command>-fs NAMENODE -touchz dir2/file0</command>
  12262. <command>-fs NAMENODE -touchz dir2/dir1/file1</command>
  12263. <command>-fs NAMENODE -touchz dir2/dir1/file2</command>
  12264. <command>-fs NAMENODE -chown -R newowner:newgroup dir0 dir2</command>
  12265. <command>-fs NAMENODE -ls -R dir*</command>
  12266. </test-commands>
  12267. <cleanup-commands>
  12268. <command>-fs NAMENODE -rm -r dir*</command>
  12269. </cleanup-commands>
  12270. <comparators>
  12271. <comparator>
  12272. <type>RegexpComparator</type>
  12273. <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>
  12274. </comparator>
  12275. <comparator>
  12276. <type>RegexpComparator</type>
  12277. <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>
  12278. </comparator>
  12279. <comparator>
  12280. <type>RegexpComparator</type>
  12281. <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>
  12282. </comparator>
  12283. <comparator>
  12284. <type>RegexpComparator</type>
  12285. <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>
  12286. </comparator>
  12287. <comparator>
  12288. <type>RegexpComparator</type>
  12289. <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>
  12290. </comparator>
  12291. <comparator>
  12292. <type>RegexpComparator</type>
  12293. <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>
  12294. </comparator>
  12295. <comparator>
  12296. <type>RegexpComparator</type>
  12297. <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>
  12298. </comparator>
  12299. <comparator>
  12300. <type>RegexpComparator</type>
  12301. <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>
  12302. </comparator>
  12303. </comparators>
  12304. </test>
  12305. <test> <!-- TESTED -->
  12306. <description>chown: invalid option for owner of file in absolute path</description>
  12307. <test-commands>
  12308. <command>-fs NAMENODE -touchz /file1</command>
  12309. <command>-fs NAMENODE -chown %:newgroup /file1</command>
  12310. </test-commands>
  12311. <cleanup-commands>
  12312. <command>-fs NAMENODE -rm /file1</command>
  12313. </cleanup-commands>
  12314. <comparators>
  12315. <comparator>
  12316. <type>RegexpComparator</type>
  12317. <expected-output>^-chown: '%:newgroup' does not match expected pattern for \[owner\]\[:group\].</expected-output>
  12318. </comparator>
  12319. </comparators>
  12320. </test>
  12321. <test> <!-- TESTED -->
  12322. <description>chown: invalid option for owner of file in relative path</description>
  12323. <test-commands>
  12324. <command>-fs NAMENODE -touchz file1</command>
  12325. <command>-fs NAMENODE -chown %:newgroup file1</command>
  12326. </test-commands>
  12327. <cleanup-commands>
  12328. <command>-fs NAMENODE -rm file1</command>
  12329. </cleanup-commands>
  12330. <comparators>
  12331. <comparator>
  12332. <type>RegexpComparator</type>
  12333. <expected-output>^-chown: '%:newgroup' does not match expected pattern for \[owner\]\[:group\].</expected-output>
  12334. </comparator>
  12335. </comparators>
  12336. </test>
  12337. <test> <!-- TESTED -->
  12338. <description>chown: invalid option for group of file in absolute path</description>
  12339. <test-commands>
  12340. <command>-fs NAMENODE -touchz /file1</command>
  12341. <command>-fs NAMENODE -chown newowner:% /file1</command>
  12342. </test-commands>
  12343. <cleanup-commands>
  12344. <command>-fs NAMENODE -rm /file1</command>
  12345. </cleanup-commands>
  12346. <comparators>
  12347. <comparator>
  12348. <type>RegexpComparator</type>
  12349. <expected-output>^-chown: 'newowner:%' does not match expected pattern for \[owner\]\[:group\].</expected-output>
  12350. </comparator>
  12351. </comparators>
  12352. </test>
  12353. <test> <!-- TESTED -->
  12354. <description>chown: invalid option for group of file in relative path</description>
  12355. <test-commands>
  12356. <command>-fs NAMENODE -touchz file1</command>
  12357. <command>-fs NAMENODE -chown newowner:% file1</command>
  12358. </test-commands>
  12359. <cleanup-commands>
  12360. <command>-fs NAMENODE -rm file1</command>
  12361. </cleanup-commands>
  12362. <comparators>
  12363. <comparator>
  12364. <type>RegexpComparator</type>
  12365. <expected-output>^-chown: 'newowner:%' does not match expected pattern for \[owner\]\[:group\].</expected-output>
  12366. </comparator>
  12367. </comparators>
  12368. </test>
  12369. <test> <!-- TESTED -->
  12370. <description>chown: change ownership of file in Namenode's path</description>
  12371. <test-commands>
  12372. <command>-fs NAMENODE -touchz NAMENODE/file1</command>
  12373. <command>-fs NAMENODE -chown newowner:newgroup NAMENODE/file1</command>
  12374. <command>-fs NAMENODE -ls NAMENODE/file1</command>
  12375. </test-commands>
  12376. <cleanup-commands>
  12377. <command>-fs NAMENODE -rm NAMENODE/file1</command>
  12378. </cleanup-commands>
  12379. <comparators>
  12380. <comparator>
  12381. <type>TokenComparator</type>
  12382. <expected-output>Found 1 items</expected-output>
  12383. </comparator>
  12384. <comparator>
  12385. <type>RegexpComparator</type>
  12386. <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>
  12387. </comparator>
  12388. </comparators>
  12389. </test>
  12390. <test> <!-- TESTED -->
  12391. <description>chown: change ownership of directory in Namenode's path</description>
  12392. <test-commands>
  12393. <command>-fs NAMENODE -mkdir NAMENODE/dir0</command>
  12394. <command>-fs NAMENODE -mkdir NAMENODE/dir0/dir1</command>
  12395. <command>-fs NAMENODE -touchz NAMENODE/dir0/file0</command>
  12396. <command>-fs NAMENODE -touchz NAMENODE/dir0/dir1/file1</command>
  12397. <command>-fs NAMENODE -touchz NAMENODE/dir0/dir1/file2</command>
  12398. <command>-fs NAMENODE -chown newowner:newgroup NAMENODE/dir0/dir1</command>
  12399. <command>-fs NAMENODE -ls -R NAMENODE/dir0</command>
  12400. </test-commands>
  12401. <cleanup-commands>
  12402. <command>-fs NAMENODE -rm -r NAMENODE/dir0</command>
  12403. </cleanup-commands>
  12404. <comparators>
  12405. <comparator>
  12406. <type>RegexpComparator</type>
  12407. <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>
  12408. </comparator>
  12409. <comparator>
  12410. <type>RegexpComparator</type>
  12411. <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir0/dir1/file1</expected-output>
  12412. </comparator>
  12413. <comparator>
  12414. <type>RegexpComparator</type>
  12415. <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir0/dir1/file2</expected-output>
  12416. </comparator>
  12417. <comparator>
  12418. <type>RegexpComparator</type>
  12419. <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir0/file0</expected-output>
  12420. </comparator>
  12421. </comparators>
  12422. </test>
  12423. <test> <!-- TESTED -->
  12424. <description>chown: change ownership of directory in Namenode's path recursively </description>
  12425. <test-commands>
  12426. <command>-fs NAMENODE -mkdir NAMENODE/dir0</command>
  12427. <command>-fs NAMENODE -mkdir NAMENODE/dir0/dir1</command>
  12428. <command>-fs NAMENODE -touchz NAMENODE/dir0/file0</command>
  12429. <command>-fs NAMENODE -touchz NAMENODE/dir0/dir1/file1</command>
  12430. <command>-fs NAMENODE -touchz NAMENODE/dir0/dir1/file2</command>
  12431. <command>-fs NAMENODE -chown -R newowner:newgroup NAMENODE/dir0/dir1</command>
  12432. <command>-fs NAMENODE -ls -R NAMENODE/dir0</command>
  12433. </test-commands>
  12434. <cleanup-commands>
  12435. <command>-fs NAMENODE -rm -r NAMENODE/dir0</command>
  12436. </cleanup-commands>
  12437. <comparators>
  12438. <comparator>
  12439. <type>RegexpComparator</type>
  12440. <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>
  12441. </comparator>
  12442. <comparator>
  12443. <type>RegexpComparator</type>
  12444. <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>
  12445. </comparator>
  12446. <comparator>
  12447. <type>RegexpComparator</type>
  12448. <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>
  12449. </comparator>
  12450. <comparator>
  12451. <type>RegexpComparator</type>
  12452. <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir0/file0</expected-output>
  12453. </comparator>
  12454. </comparators>
  12455. </test>
  12456. <test> <!-- TESTED -->
  12457. <description>chown: change ownership of non existent file in Namenode's path</description>
  12458. <test-commands>
  12459. <command>-fs NAMENODE -chown newowner:newgroup NAMENODE/file1</command>
  12460. </test-commands>
  12461. <cleanup-commands>
  12462. <command>-fs NAMENODE -rm NAMENODE/file1</command>
  12463. </cleanup-commands>
  12464. <comparators>
  12465. <comparator>
  12466. <type>RegexpComparator</type>
  12467. <expected-output>^chown: `NAMENODE/file1': No such file or directory</expected-output>
  12468. </comparator>
  12469. </comparators>
  12470. </test>
  12471. <test> <!-- TESTED -->
  12472. <description>chown: change ownership of multiple files in Namenode's path using globbing</description>
  12473. <test-commands>
  12474. <command>-fs NAMENODE -touchz NAMENODE/file1</command>
  12475. <command>-fs NAMENODE -touchz NAMENODE/file2</command>
  12476. <command>-fs NAMENODE -touchz NAMENODE/file3</command>
  12477. <command>-fs NAMENODE -touchz NAMENODE/file4</command>
  12478. <command>-fs NAMENODE -chown newowner:newgroup NAMENODE/file* </command>
  12479. <command>-fs NAMENODE -ls -R NAMENODE/file*</command>
  12480. </test-commands>
  12481. <cleanup-commands>
  12482. <command>-fs NAMENODE -rm NAMENODE/file*</command>
  12483. </cleanup-commands>
  12484. <comparators>
  12485. <comparator>
  12486. <type>RegexpComparator</type>
  12487. <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>
  12488. </comparator>
  12489. <comparator>
  12490. <type>RegexpComparator</type>
  12491. <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>
  12492. </comparator>
  12493. <comparator>
  12494. <type>RegexpComparator</type>
  12495. <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>
  12496. </comparator>
  12497. <comparator>
  12498. <type>RegexpComparator</type>
  12499. <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>
  12500. </comparator>
  12501. </comparators>
  12502. </test>
  12503. <test> <!-- TESTED -->
  12504. <description>chown: change ownership of multiple directories in Namenode's path using globbing</description>
  12505. <test-commands>
  12506. <command>-fs NAMENODE -mkdir NAMENODE/dir0</command>
  12507. <command>-fs NAMENODE -mkdir NAMENODE/dir0/dir1</command>
  12508. <command>-fs NAMENODE -touchz NAMENODE/dir0/file0</command>
  12509. <command>-fs NAMENODE -touchz NAMENODE/dir0/dir1/file1</command>
  12510. <command>-fs NAMENODE -touchz NAMENODE/dir0/dir1/file2</command>
  12511. <command>-fs NAMENODE -mkdir NAMENODE/dir2</command>
  12512. <command>-fs NAMENODE -mkdir NAMENODE/dir2/dir1</command>
  12513. <command>-fs NAMENODE -touchz NAMENODE/dir2/file0</command>
  12514. <command>-fs NAMENODE -touchz NAMENODE/dir2/dir1/file1</command>
  12515. <command>-fs NAMENODE -touchz NAMENODE/dir2/dir1/file2</command>
  12516. <command>-fs NAMENODE -chown newowner:newgroup NAMENODE/dir*</command>
  12517. <command>-fs NAMENODE -ls -R NAMENODE/dir*</command>
  12518. </test-commands>
  12519. <cleanup-commands>
  12520. <command>-fs NAMENODE -rm -r NAMENODE/dir*</command>
  12521. </cleanup-commands>
  12522. <comparators>
  12523. <comparator>
  12524. <type>RegexpComparator</type>
  12525. <expected-output>^drwxr-xr-x( )*-( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir0/dir1</expected-output>
  12526. </comparator>
  12527. <comparator>
  12528. <type>RegexpComparator</type>
  12529. <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir0/dir1/file1</expected-output>
  12530. </comparator>
  12531. <comparator>
  12532. <type>RegexpComparator</type>
  12533. <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir0/dir1/file2</expected-output>
  12534. </comparator>
  12535. <comparator>
  12536. <type>RegexpComparator</type>
  12537. <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir0/file0</expected-output>
  12538. </comparator>
  12539. <comparator>
  12540. <type>RegexpComparator</type>
  12541. <expected-output>^drwxr-xr-x( )*-( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir2/dir1</expected-output>
  12542. </comparator>
  12543. <comparator>
  12544. <type>RegexpComparator</type>
  12545. <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir2/dir1/file1</expected-output>
  12546. </comparator>
  12547. <comparator>
  12548. <type>RegexpComparator</type>
  12549. <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir2/dir1/file2</expected-output>
  12550. </comparator>
  12551. <comparator>
  12552. <type>RegexpComparator</type>
  12553. <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir2/file0</expected-output>
  12554. </comparator>
  12555. </comparators>
  12556. </test>
  12557. <test> <!-- TESTED -->
  12558. <description>chown: change ownership of multiple files in Namenode's path without globbing</description>
  12559. <test-commands>
  12560. <command>-fs NAMENODE -touchz NAMENODE/file1</command>
  12561. <command>-fs NAMENODE -touchz NAMENODE/file2</command>
  12562. <command>-fs NAMENODE -touchz NAMENODE/file3</command>
  12563. <command>-fs NAMENODE -touchz NAMENODE/file4</command>
  12564. <command>-fs NAMENODE -chown newowner:newgroup NAMENODE/file1 NAMENODE/file2 NAMENODE/file3 NAMENODE/file4 </command>
  12565. <command>-fs NAMENODE -ls -R NAMENODE/file*</command>
  12566. </test-commands>
  12567. <cleanup-commands>
  12568. <command>-fs NAMENODE -rm NAMENODE/file*</command>
  12569. </cleanup-commands>
  12570. <comparators>
  12571. <comparator>
  12572. <type>RegexpComparator</type>
  12573. <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>
  12574. </comparator>
  12575. <comparator>
  12576. <type>RegexpComparator</type>
  12577. <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>
  12578. </comparator>
  12579. <comparator>
  12580. <type>RegexpComparator</type>
  12581. <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>
  12582. </comparator>
  12583. <comparator>
  12584. <type>RegexpComparator</type>
  12585. <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>
  12586. </comparator>
  12587. </comparators>
  12588. </test>
  12589. <test> <!-- TESTED -->
  12590. <description>chown: change ownership of multiple directories in Namenode's path without globbing</description>
  12591. <test-commands>
  12592. <command>-fs NAMENODE -mkdir NAMENODE/dir0</command>
  12593. <command>-fs NAMENODE -mkdir NAMENODE/dir0/dir1</command>
  12594. <command>-fs NAMENODE -touchz NAMENODE/dir0/file0</command>
  12595. <command>-fs NAMENODE -touchz NAMENODE/dir0/dir1/file1</command>
  12596. <command>-fs NAMENODE -touchz NAMENODE/dir0/dir1/file2</command>
  12597. <command>-fs NAMENODE -mkdir NAMENODE/dir2</command>
  12598. <command>-fs NAMENODE -mkdir NAMENODE/dir2/dir1</command>
  12599. <command>-fs NAMENODE -touchz NAMENODE/dir2/file0</command>
  12600. <command>-fs NAMENODE -touchz NAMENODE/dir2/dir1/file1</command>
  12601. <command>-fs NAMENODE -touchz NAMENODE/dir2/dir1/file2</command>
  12602. <command>-fs NAMENODE -chown newowner:newgroup NAMENODE/dir0 NAMENODE/dir2</command>
  12603. <command>-fs NAMENODE -ls -R NAMENODE/dir*</command>
  12604. </test-commands>
  12605. <cleanup-commands>
  12606. <command>-fs NAMENODE -rm -r NAMENODE/dir*</command>
  12607. </cleanup-commands>
  12608. <comparators>
  12609. <comparator>
  12610. <type>RegexpComparator</type>
  12611. <expected-output>^drwxr-xr-x( )*-( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir0/dir1</expected-output>
  12612. </comparator>
  12613. <comparator>
  12614. <type>RegexpComparator</type>
  12615. <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir0/dir1/file1</expected-output>
  12616. </comparator>
  12617. <comparator>
  12618. <type>RegexpComparator</type>
  12619. <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir0/dir1/file2</expected-output>
  12620. </comparator>
  12621. <comparator>
  12622. <type>RegexpComparator</type>
  12623. <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir0/file0</expected-output>
  12624. </comparator>
  12625. <comparator>
  12626. <type>RegexpComparator</type>
  12627. <expected-output>^drwxr-xr-x( )*-( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir2/dir1</expected-output>
  12628. </comparator>
  12629. <comparator>
  12630. <type>RegexpComparator</type>
  12631. <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir2/dir1/file1</expected-output>
  12632. </comparator>
  12633. <comparator>
  12634. <type>RegexpComparator</type>
  12635. <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir2/dir1/file2</expected-output>
  12636. </comparator>
  12637. <comparator>
  12638. <type>RegexpComparator</type>
  12639. <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir2/file0</expected-output>
  12640. </comparator>
  12641. </comparators>
  12642. </test>
  12643. <test> <!-- TESTED -->
  12644. <description>chown: change ownership of multiple directories recursively in Namenode's path using globbing</description>
  12645. <test-commands>
  12646. <command>-fs NAMENODE -mkdir NAMENODE/dir0</command>
  12647. <command>-fs NAMENODE -mkdir NAMENODE/dir0/dir1</command>
  12648. <command>-fs NAMENODE -touchz NAMENODE/dir0/file0</command>
  12649. <command>-fs NAMENODE -touchz NAMENODE/dir0/dir1/file1</command>
  12650. <command>-fs NAMENODE -touchz NAMENODE/dir0/dir1/file2</command>
  12651. <command>-fs NAMENODE -mkdir NAMENODE/dir2</command>
  12652. <command>-fs NAMENODE -mkdir NAMENODE/dir2/dir1</command>
  12653. <command>-fs NAMENODE -touchz NAMENODE/dir2/file0</command>
  12654. <command>-fs NAMENODE -touchz NAMENODE/dir2/dir1/file1</command>
  12655. <command>-fs NAMENODE -touchz NAMENODE/dir2/dir1/file2</command>
  12656. <command>-fs NAMENODE -chown -R newowner:newgroup NAMENODE/dir*</command>
  12657. <command>-fs NAMENODE -ls -R NAMENODE/dir*</command>
  12658. </test-commands>
  12659. <cleanup-commands>
  12660. <command>-fs NAMENODE -rm -r NAMENODE/dir*</command>
  12661. </cleanup-commands>
  12662. <comparators>
  12663. <comparator>
  12664. <type>RegexpComparator</type>
  12665. <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>
  12666. </comparator>
  12667. <comparator>
  12668. <type>RegexpComparator</type>
  12669. <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>
  12670. </comparator>
  12671. <comparator>
  12672. <type>RegexpComparator</type>
  12673. <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>
  12674. </comparator>
  12675. <comparator>
  12676. <type>RegexpComparator</type>
  12677. <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>
  12678. </comparator>
  12679. <comparator>
  12680. <type>RegexpComparator</type>
  12681. <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>
  12682. </comparator>
  12683. <comparator>
  12684. <type>RegexpComparator</type>
  12685. <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>
  12686. </comparator>
  12687. <comparator>
  12688. <type>RegexpComparator</type>
  12689. <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>
  12690. </comparator>
  12691. <comparator>
  12692. <type>RegexpComparator</type>
  12693. <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>
  12694. </comparator>
  12695. </comparators>
  12696. </test>
  12697. <test> <!-- TESTED -->
  12698. <description>chown: change ownership of multiple directories recursively in Namenode's path without globbing</description>
  12699. <test-commands>
  12700. <command>-fs NAMENODE -mkdir NAMENODE/dir0</command>
  12701. <command>-fs NAMENODE -mkdir NAMENODE/dir0/dir1</command>
  12702. <command>-fs NAMENODE -touchz NAMENODE/dir0/file0</command>
  12703. <command>-fs NAMENODE -touchz NAMENODE/dir0/dir1/file1</command>
  12704. <command>-fs NAMENODE -touchz NAMENODE/dir0/dir1/file2</command>
  12705. <command>-fs NAMENODE -mkdir NAMENODE/dir2</command>
  12706. <command>-fs NAMENODE -mkdir NAMENODE/dir2/dir1</command>
  12707. <command>-fs NAMENODE -touchz NAMENODE/dir2/file0</command>
  12708. <command>-fs NAMENODE -touchz NAMENODE/dir2/dir1/file1</command>
  12709. <command>-fs NAMENODE -touchz NAMENODE/dir2/dir1/file2</command>
  12710. <command>-fs NAMENODE -chown -R newowner:newgroup NAMENODE/dir0 NAMENODE/dir2</command>
  12711. <command>-fs NAMENODE -ls -R NAMENODE/dir*</command>
  12712. </test-commands>
  12713. <cleanup-commands>
  12714. <command>-fs NAMENODE -rm -r NAMENODE/dir*</command>
  12715. </cleanup-commands>
  12716. <comparators>
  12717. <comparator>
  12718. <type>RegexpComparator</type>
  12719. <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>
  12720. </comparator>
  12721. <comparator>
  12722. <type>RegexpComparator</type>
  12723. <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>
  12724. </comparator>
  12725. <comparator>
  12726. <type>RegexpComparator</type>
  12727. <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>
  12728. </comparator>
  12729. <comparator>
  12730. <type>RegexpComparator</type>
  12731. <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>
  12732. </comparator>
  12733. <comparator>
  12734. <type>RegexpComparator</type>
  12735. <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>
  12736. </comparator>
  12737. <comparator>
  12738. <type>RegexpComparator</type>
  12739. <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>
  12740. </comparator>
  12741. <comparator>
  12742. <type>RegexpComparator</type>
  12743. <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>
  12744. </comparator>
  12745. <comparator>
  12746. <type>RegexpComparator</type>
  12747. <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>
  12748. </comparator>
  12749. </comparators>
  12750. </test>
  12751. <test> <!-- TESTED -->
  12752. <description>chown: invalid option for owner of file in Namenode's path</description>
  12753. <test-commands>
  12754. <command>-fs NAMENODE -touchz NAMENODE/file1</command>
  12755. <command>-fs NAMENODE -chown %:newgroup NAMENODE/file1</command>
  12756. </test-commands>
  12757. <cleanup-commands>
  12758. <command>-fs NAMENODE -rm NAMENODE/file1</command>
  12759. </cleanup-commands>
  12760. <comparators>
  12761. <comparator>
  12762. <type>RegexpComparator</type>
  12763. <expected-output>^-chown: '%:newgroup' does not match expected pattern for \[owner\]\[:group\].</expected-output>
  12764. </comparator>
  12765. </comparators>
  12766. </test>
  12767. <test> <!-- TESTED -->
  12768. <description>chown: invalid option for group of file in Namenode's path</description>
  12769. <test-commands>
  12770. <command>-fs NAMENODE -touchz NAMENODE/file1</command>
  12771. <command>-fs NAMENODE -chown newowner:% NAMENODE/file1</command>
  12772. </test-commands>
  12773. <cleanup-commands>
  12774. <command>-fs NAMENODE -rm NAMENODE/file1</command>
  12775. </cleanup-commands>
  12776. <comparators>
  12777. <comparator>
  12778. <type>RegexpComparator</type>
  12779. <expected-output>^-chown: 'newowner:%' does not match expected pattern for \[owner\]\[:group\].</expected-output>
  12780. </comparator>
  12781. </comparators>
  12782. </test>
  12783. <!-- Tests for chgrp -->
  12784. <test> <!-- TESTED -->
  12785. <description>chgrp: change group of file in absolute path</description>
  12786. <test-commands>
  12787. <command>-fs NAMENODE -touchz /file1</command>
  12788. <command>-fs NAMENODE -chgrp newgroup /file1</command>
  12789. <command>-fs NAMENODE -ls /file1</command>
  12790. </test-commands>
  12791. <cleanup-commands>
  12792. <command>-fs NAMENODE -rm /file1</command>
  12793. </cleanup-commands>
  12794. <comparators>
  12795. <comparator>
  12796. <type>TokenComparator</type>
  12797. <expected-output>Found 1 items</expected-output>
  12798. </comparator>
  12799. <comparator>
  12800. <type>RegexpComparator</type>
  12801. <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/file1</expected-output>
  12802. </comparator>
  12803. </comparators>
  12804. </test>
  12805. <test> <!-- TESTED -->
  12806. <description>chgrp: change group of file in relative path</description>
  12807. <test-commands>
  12808. <command>-fs NAMENODE -touchz file1</command>
  12809. <command>-fs NAMENODE -chgrp newgroup file1</command>
  12810. <command>-fs NAMENODE -ls file1</command>
  12811. </test-commands>
  12812. <cleanup-commands>
  12813. <command>-fs NAMENODE -rm file1</command>
  12814. </cleanup-commands>
  12815. <comparators>
  12816. <comparator>
  12817. <type>TokenComparator</type>
  12818. <expected-output>Found 1 items</expected-output>
  12819. </comparator>
  12820. <comparator>
  12821. <type>RegexpComparator</type>
  12822. <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*file1</expected-output>
  12823. </comparator>
  12824. </comparators>
  12825. </test>
  12826. <test> <!-- TESTED -->
  12827. <description>chgrp: change group of directory in absolute path</description>
  12828. <test-commands>
  12829. <command>-fs NAMENODE -mkdir /dir0</command>
  12830. <command>-fs NAMENODE -mkdir /dir0/dir1</command>
  12831. <command>-fs NAMENODE -touchz /dir0/file0</command>
  12832. <command>-fs NAMENODE -touchz /dir0/dir1/file1</command>
  12833. <command>-fs NAMENODE -touchz /dir0/dir1/file2</command>
  12834. <command>-fs NAMENODE -chgrp newgroup /dir0/dir1</command>
  12835. <command>-fs NAMENODE -ls -R /dir0</command>
  12836. </test-commands>
  12837. <cleanup-commands>
  12838. <command>-fs NAMENODE -rm -r /dir0</command>
  12839. </cleanup-commands>
  12840. <comparators>
  12841. <comparator>
  12842. <type>RegexpComparator</type>
  12843. <expected-output>^drwxr-xr-x( )*-( )*[a-z]*( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1</expected-output>
  12844. </comparator>
  12845. <comparator>
  12846. <type>RegexpComparator</type>
  12847. <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1/file1</expected-output>
  12848. </comparator>
  12849. <comparator>
  12850. <type>RegexpComparator</type>
  12851. <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1/file2</expected-output>
  12852. </comparator>
  12853. <comparator>
  12854. <type>RegexpComparator</type>
  12855. <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/file0</expected-output>
  12856. </comparator>
  12857. </comparators>
  12858. </test>
  12859. <test> <!-- TESTED -->
  12860. <description>chgrp: change group of directory in relative path</description>
  12861. <test-commands>
  12862. <command>-fs NAMENODE -mkdir dir0</command>
  12863. <command>-fs NAMENODE -mkdir dir0/dir1</command>
  12864. <command>-fs NAMENODE -touchz dir0/file0</command>
  12865. <command>-fs NAMENODE -touchz dir0/dir1/file1</command>
  12866. <command>-fs NAMENODE -touchz dir0/dir1/file2</command>
  12867. <command>-fs NAMENODE -chgrp newgroup dir0/dir1</command>
  12868. <command>-fs NAMENODE -ls -R dir0</command>
  12869. </test-commands>
  12870. <cleanup-commands>
  12871. <command>-fs NAMENODE -rm -r dir0</command>
  12872. </cleanup-commands>
  12873. <comparators>
  12874. <comparator>
  12875. <type>RegexpComparator</type>
  12876. <expected-output>^drwxr-xr-x( )*-( )*[a-z]*( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/dir1</expected-output>
  12877. </comparator>
  12878. <comparator>
  12879. <type>RegexpComparator</type>
  12880. <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/dir1/file1</expected-output>
  12881. </comparator>
  12882. <comparator>
  12883. <type>RegexpComparator</type>
  12884. <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/dir1/file2</expected-output>
  12885. </comparator>
  12886. <comparator>
  12887. <type>RegexpComparator</type>
  12888. <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/file0</expected-output>
  12889. </comparator>
  12890. </comparators>
  12891. </test>
  12892. <test> <!-- TESTED -->
  12893. <description>chgrp: change group of directory in absolute path recursively </description>
  12894. <test-commands>
  12895. <command>-fs NAMENODE -mkdir /dir0</command>
  12896. <command>-fs NAMENODE -mkdir /dir0/dir1</command>
  12897. <command>-fs NAMENODE -touchz /dir0/file0</command>
  12898. <command>-fs NAMENODE -touchz /dir0/dir1/file1</command>
  12899. <command>-fs NAMENODE -touchz /dir0/dir1/file2</command>
  12900. <command>-fs NAMENODE -chgrp -R newgroup /dir0/dir1</command>
  12901. <command>-fs NAMENODE -ls -R /dir0</command>
  12902. </test-commands>
  12903. <cleanup-commands>
  12904. <command>-fs NAMENODE -rm -r /dir0</command>
  12905. </cleanup-commands>
  12906. <comparators>
  12907. <comparator>
  12908. <type>RegexpComparator</type>
  12909. <expected-output>^drwxr-xr-x( )*-( )*[a-z]*( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1</expected-output>
  12910. </comparator>
  12911. <comparator>
  12912. <type>RegexpComparator</type>
  12913. <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1/file1</expected-output>
  12914. </comparator>
  12915. <comparator>
  12916. <type>RegexpComparator</type>
  12917. <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1/file2</expected-output>
  12918. </comparator>
  12919. <comparator>
  12920. <type>RegexpComparator</type>
  12921. <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/file0</expected-output>
  12922. </comparator>
  12923. </comparators>
  12924. </test>
  12925. <test> <!-- TESTED -->
  12926. <description>chgrp: change group of directory in relative path recursively </description>
  12927. <test-commands>
  12928. <command>-fs NAMENODE -mkdir dir0</command>
  12929. <command>-fs NAMENODE -mkdir dir0/dir1</command>
  12930. <command>-fs NAMENODE -touchz dir0/file0</command>
  12931. <command>-fs NAMENODE -touchz dir0/dir1/file1</command>
  12932. <command>-fs NAMENODE -touchz dir0/dir1/file2</command>
  12933. <command>-fs NAMENODE -chgrp -R newgroup dir0/dir1</command>
  12934. <command>-fs NAMENODE -ls -R dir0</command>
  12935. </test-commands>
  12936. <cleanup-commands>
  12937. <command>-fs NAMENODE -rm -r dir0</command>
  12938. </cleanup-commands>
  12939. <comparators>
  12940. <comparator>
  12941. <type>RegexpComparator</type>
  12942. <expected-output>^drwxr-xr-x( )*-( )*[a-z]*( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/dir1</expected-output>
  12943. </comparator>
  12944. <comparator>
  12945. <type>RegexpComparator</type>
  12946. <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/dir1/file1</expected-output>
  12947. </comparator>
  12948. <comparator>
  12949. <type>RegexpComparator</type>
  12950. <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/dir1/file2</expected-output>
  12951. </comparator>
  12952. <comparator>
  12953. <type>RegexpComparator</type>
  12954. <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/file0</expected-output>
  12955. </comparator>
  12956. </comparators>
  12957. </test>
  12958. <test> <!-- TESTED -->
  12959. <description>chgrp: change group of non existent file in absolute path</description>
  12960. <test-commands>
  12961. <command>-fs NAMENODE -chgrp newgroup /file1</command>
  12962. </test-commands>
  12963. <cleanup-commands>
  12964. <command>-fs NAMENODE -rm /file1</command>
  12965. </cleanup-commands>
  12966. <comparators>
  12967. <comparator>
  12968. <type>RegexpComparator</type>
  12969. <expected-output>^chgrp: `/file1': No such file or directory</expected-output>
  12970. </comparator>
  12971. </comparators>
  12972. </test>
  12973. <test> <!-- TESTED -->
  12974. <description>chgrp: change group of non existent file in relative path</description>
  12975. <test-commands>
  12976. <command>-fs NAMENODE -chgrp newgroup file1</command>
  12977. </test-commands>
  12978. <cleanup-commands>
  12979. <command>-fs NAMENODE -rm file1</command>
  12980. </cleanup-commands>
  12981. <comparators>
  12982. <comparator>
  12983. <type>RegexpComparator</type>
  12984. <expected-output>^chgrp: `file1': No such file or directory</expected-output>
  12985. </comparator>
  12986. </comparators>
  12987. </test>
  12988. <test> <!-- TESTED -->
  12989. <description>chgrp: change group of multiple files in absolute path using globbing</description>
  12990. <test-commands>
  12991. <command>-fs NAMENODE -touchz /file1</command>
  12992. <command>-fs NAMENODE -touchz /file2</command>
  12993. <command>-fs NAMENODE -touchz /file3</command>
  12994. <command>-fs NAMENODE -touchz /file4</command>
  12995. <command>-fs NAMENODE -chgrp newgroup /file* </command>
  12996. <command>-fs NAMENODE -ls -R /file*</command>
  12997. </test-commands>
  12998. <cleanup-commands>
  12999. <command>-fs NAMENODE -rm /file*</command>
  13000. </cleanup-commands>
  13001. <comparators>
  13002. <comparator>
  13003. <type>RegexpComparator</type>
  13004. <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/file1</expected-output>
  13005. </comparator>
  13006. <comparator>
  13007. <type>RegexpComparator</type>
  13008. <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/file2</expected-output>
  13009. </comparator>
  13010. <comparator>
  13011. <type>RegexpComparator</type>
  13012. <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/file3</expected-output>
  13013. </comparator>
  13014. <comparator>
  13015. <type>RegexpComparator</type>
  13016. <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/file4</expected-output>
  13017. </comparator>
  13018. </comparators>
  13019. </test>
  13020. <test> <!-- TESTED -->
  13021. <description>chgrp: change group of multiple files in relative path using globbing</description>
  13022. <test-commands>
  13023. <command>-fs NAMENODE -touchz file1</command>
  13024. <command>-fs NAMENODE -touchz file2</command>
  13025. <command>-fs NAMENODE -touchz file3</command>
  13026. <command>-fs NAMENODE -touchz file4</command>
  13027. <command>-fs NAMENODE -chgrp newgroup file* </command>
  13028. <command>-fs NAMENODE -ls -R file*</command>
  13029. </test-commands>
  13030. <cleanup-commands>
  13031. <command>-fs NAMENODE -rm file*</command>
  13032. </cleanup-commands>
  13033. <comparators>
  13034. <comparator>
  13035. <type>RegexpComparator</type>
  13036. <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*file1</expected-output>
  13037. </comparator>
  13038. <comparator>
  13039. <type>RegexpComparator</type>
  13040. <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*file2</expected-output>
  13041. </comparator>
  13042. <comparator>
  13043. <type>RegexpComparator</type>
  13044. <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*file3</expected-output>
  13045. </comparator>
  13046. <comparator>
  13047. <type>RegexpComparator</type>
  13048. <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*file4</expected-output>
  13049. </comparator>
  13050. </comparators>
  13051. </test>
  13052. <test> <!-- TESTED -->
  13053. <description>chgrp: change group of multiple directories in absolute path using globbing</description>
  13054. <test-commands>
  13055. <command>-fs NAMENODE -mkdir /dir0</command>
  13056. <command>-fs NAMENODE -mkdir /dir0/dir1</command>
  13057. <command>-fs NAMENODE -touchz /dir0/file0</command>
  13058. <command>-fs NAMENODE -touchz /dir0/dir1/file1</command>
  13059. <command>-fs NAMENODE -touchz /dir0/dir1/file2</command>
  13060. <command>-fs NAMENODE -mkdir /dir2</command>
  13061. <command>-fs NAMENODE -mkdir /dir2/dir1</command>
  13062. <command>-fs NAMENODE -touchz /dir2/file0</command>
  13063. <command>-fs NAMENODE -touchz /dir2/dir1/file1</command>
  13064. <command>-fs NAMENODE -touchz /dir2/dir1/file2</command>
  13065. <command>-fs NAMENODE -chgrp newgroup /dir*</command>
  13066. <command>-fs NAMENODE -ls -R /dir*</command>
  13067. </test-commands>
  13068. <cleanup-commands>
  13069. <command>-fs NAMENODE -rm -r /dir*</command>
  13070. </cleanup-commands>
  13071. <comparators>
  13072. <comparator>
  13073. <type>RegexpComparator</type>
  13074. <expected-output>^drwxr-xr-x( )*-( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1</expected-output>
  13075. </comparator>
  13076. <comparator>
  13077. <type>RegexpComparator</type>
  13078. <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1/file1</expected-output>
  13079. </comparator>
  13080. <comparator>
  13081. <type>RegexpComparator</type>
  13082. <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1/file2</expected-output>
  13083. </comparator>
  13084. <comparator>
  13085. <type>RegexpComparator</type>
  13086. <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/file0</expected-output>
  13087. </comparator>
  13088. <comparator>
  13089. <type>RegexpComparator</type>
  13090. <expected-output>^drwxr-xr-x( )*-( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir2/dir1</expected-output>
  13091. </comparator>
  13092. <comparator>
  13093. <type>RegexpComparator</type>
  13094. <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir2/dir1/file1</expected-output>
  13095. </comparator>
  13096. <comparator>
  13097. <type>RegexpComparator</type>
  13098. <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir2/dir1/file2</expected-output>
  13099. </comparator>
  13100. <comparator>
  13101. <type>RegexpComparator</type>
  13102. <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir2/file0</expected-output>
  13103. </comparator>
  13104. </comparators>
  13105. </test>
  13106. <test> <!-- TESTED -->
  13107. <description>chgrp: change group of multiple directories in relative path using globbing</description>
  13108. <test-commands>
  13109. <command>-fs NAMENODE -mkdir dir0</command>
  13110. <command>-fs NAMENODE -mkdir dir0/dir1</command>
  13111. <command>-fs NAMENODE -touchz dir0/file0</command>
  13112. <command>-fs NAMENODE -touchz dir0/dir1/file1</command>
  13113. <command>-fs NAMENODE -touchz dir0/dir1/file2</command>
  13114. <command>-fs NAMENODE -mkdir dir2</command>
  13115. <command>-fs NAMENODE -mkdir dir2/dir1</command>
  13116. <command>-fs NAMENODE -touchz dir2/file0</command>
  13117. <command>-fs NAMENODE -touchz dir2/dir1/file1</command>
  13118. <command>-fs NAMENODE -touchz dir2/dir1/file2</command>
  13119. <command>-fs NAMENODE -chgrp newgroup dir*</command>
  13120. <command>-fs NAMENODE -ls -R dir*</command>
  13121. </test-commands>
  13122. <cleanup-commands>
  13123. <command>-fs NAMENODE -rm -r dir*</command>
  13124. </cleanup-commands>
  13125. <comparators>
  13126. <comparator>
  13127. <type>RegexpComparator</type>
  13128. <expected-output>^drwxr-xr-x( )*-( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/dir1</expected-output>
  13129. </comparator>
  13130. <comparator>
  13131. <type>RegexpComparator</type>
  13132. <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/dir1/file1</expected-output>
  13133. </comparator>
  13134. <comparator>
  13135. <type>RegexpComparator</type>
  13136. <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/dir1/file2</expected-output>
  13137. </comparator>
  13138. <comparator>
  13139. <type>RegexpComparator</type>
  13140. <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/file0</expected-output>
  13141. </comparator>
  13142. <comparator>
  13143. <type>RegexpComparator</type>
  13144. <expected-output>^drwxr-xr-x( )*-( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir2/dir1</expected-output>
  13145. </comparator>
  13146. <comparator>
  13147. <type>RegexpComparator</type>
  13148. <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir2/dir1/file1</expected-output>
  13149. </comparator>
  13150. <comparator>
  13151. <type>RegexpComparator</type>
  13152. <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir2/dir1/file2</expected-output>
  13153. </comparator>
  13154. <comparator>
  13155. <type>RegexpComparator</type>
  13156. <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir2/file0</expected-output>
  13157. </comparator>
  13158. </comparators>
  13159. </test>
  13160. <test> <!-- TESTED -->
  13161. <description>chgrp: change of multiple files in absolute path without globbing</description>
  13162. <test-commands>
  13163. <command>-fs NAMENODE -touchz /file1</command>
  13164. <command>-fs NAMENODE -touchz /file2</command>
  13165. <command>-fs NAMENODE -touchz /file3</command>
  13166. <command>-fs NAMENODE -touchz /file4</command>
  13167. <command>-fs NAMENODE -chgrp newgroup /file1 /file2 /file3 /file4 </command>
  13168. <command>-fs NAMENODE -ls -R /file*</command>
  13169. </test-commands>
  13170. <cleanup-commands>
  13171. <command>-fs NAMENODE -rm /file*</command>
  13172. </cleanup-commands>
  13173. <comparators>
  13174. <comparator>
  13175. <type>RegexpComparator</type>
  13176. <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/file1</expected-output>
  13177. </comparator>
  13178. <comparator>
  13179. <type>RegexpComparator</type>
  13180. <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/file2</expected-output>
  13181. </comparator>
  13182. <comparator>
  13183. <type>RegexpComparator</type>
  13184. <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/file3</expected-output>
  13185. </comparator>
  13186. <comparator>
  13187. <type>RegexpComparator</type>
  13188. <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/file4</expected-output>
  13189. </comparator>
  13190. </comparators>
  13191. </test>
  13192. <test> <!-- TESTED -->
  13193. <description>chgrp: change group of multiple files in relative path without globbing</description>
  13194. <test-commands>
  13195. <command>-fs NAMENODE -touchz file1</command>
  13196. <command>-fs NAMENODE -touchz file2</command>
  13197. <command>-fs NAMENODE -touchz file3</command>
  13198. <command>-fs NAMENODE -touchz file4</command>
  13199. <command>-fs NAMENODE -chgrp newgroup file1 file2 file3 file4 </command>
  13200. <command>-fs NAMENODE -ls -R file*</command>
  13201. </test-commands>
  13202. <cleanup-commands>
  13203. <command>-fs NAMENODE -rm file*</command>
  13204. </cleanup-commands>
  13205. <comparators>
  13206. <comparator>
  13207. <type>RegexpComparator</type>
  13208. <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*file1</expected-output>
  13209. </comparator>
  13210. <comparator>
  13211. <type>RegexpComparator</type>
  13212. <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*file2</expected-output>
  13213. </comparator>
  13214. <comparator>
  13215. <type>RegexpComparator</type>
  13216. <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*file3</expected-output>
  13217. </comparator>
  13218. <comparator>
  13219. <type>RegexpComparator</type>
  13220. <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*file4</expected-output>
  13221. </comparator>
  13222. </comparators>
  13223. </test>
  13224. <test> <!-- TESTED -->
  13225. <description>chgrp: change group of multiple directories in absolute path without globbing</description>
  13226. <test-commands>
  13227. <command>-fs NAMENODE -mkdir /dir0</command>
  13228. <command>-fs NAMENODE -mkdir /dir0/dir1</command>
  13229. <command>-fs NAMENODE -touchz /dir0/file0</command>
  13230. <command>-fs NAMENODE -touchz /dir0/dir1/file1</command>
  13231. <command>-fs NAMENODE -touchz /dir0/dir1/file2</command>
  13232. <command>-fs NAMENODE -mkdir /dir2</command>
  13233. <command>-fs NAMENODE -mkdir /dir2/dir1</command>
  13234. <command>-fs NAMENODE -touchz /dir2/file0</command>
  13235. <command>-fs NAMENODE -touchz /dir2/dir1/file1</command>
  13236. <command>-fs NAMENODE -touchz /dir2/dir1/file2</command>
  13237. <command>-fs NAMENODE -chgrp newgroup /dir0 /dir2</command>
  13238. <command>-fs NAMENODE -ls -R /dir*</command>
  13239. </test-commands>
  13240. <cleanup-commands>
  13241. <command>-fs NAMENODE -rm -r /dir*</command>
  13242. </cleanup-commands>
  13243. <comparators>
  13244. <comparator>
  13245. <type>RegexpComparator</type>
  13246. <expected-output>^drwxr-xr-x( )*-( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1</expected-output>
  13247. </comparator>
  13248. <comparator>
  13249. <type>RegexpComparator</type>
  13250. <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1/file1</expected-output>
  13251. </comparator>
  13252. <comparator>
  13253. <type>RegexpComparator</type>
  13254. <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1/file2</expected-output>
  13255. </comparator>
  13256. <comparator>
  13257. <type>RegexpComparator</type>
  13258. <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/file0</expected-output>
  13259. </comparator>
  13260. <comparator>
  13261. <type>RegexpComparator</type>
  13262. <expected-output>^drwxr-xr-x( )*-( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir2/dir1</expected-output>
  13263. </comparator>
  13264. <comparator>
  13265. <type>RegexpComparator</type>
  13266. <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir2/dir1/file1</expected-output>
  13267. </comparator>
  13268. <comparator>
  13269. <type>RegexpComparator</type>
  13270. <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir2/dir1/file2</expected-output>
  13271. </comparator>
  13272. <comparator>
  13273. <type>RegexpComparator</type>
  13274. <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir2/file0</expected-output>
  13275. </comparator>
  13276. </comparators>
  13277. </test>
  13278. <test> <!-- TESTED -->
  13279. <description>chgrp: change group of multiple directories in relative path without globbing</description>
  13280. <test-commands>
  13281. <command>-fs NAMENODE -mkdir dir0</command>
  13282. <command>-fs NAMENODE -mkdir dir0/dir1</command>
  13283. <command>-fs NAMENODE -touchz dir0/file0</command>
  13284. <command>-fs NAMENODE -touchz dir0/dir1/file1</command>
  13285. <command>-fs NAMENODE -touchz dir0/dir1/file2</command>
  13286. <command>-fs NAMENODE -mkdir dir2</command>
  13287. <command>-fs NAMENODE -mkdir dir2/dir1</command>
  13288. <command>-fs NAMENODE -touchz dir2/file0</command>
  13289. <command>-fs NAMENODE -touchz dir2/dir1/file1</command>
  13290. <command>-fs NAMENODE -touchz dir2/dir1/file2</command>
  13291. <command>-fs NAMENODE -chgrp newgroup dir0 dir2</command>
  13292. <command>-fs NAMENODE -ls -R dir*</command>
  13293. </test-commands>
  13294. <cleanup-commands>
  13295. <command>-fs NAMENODE -rm -r dir*</command>
  13296. </cleanup-commands>
  13297. <comparators>
  13298. <comparator>
  13299. <type>RegexpComparator</type>
  13300. <expected-output>^drwxr-xr-x( )*-( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/dir1</expected-output>
  13301. </comparator>
  13302. <comparator>
  13303. <type>RegexpComparator</type>
  13304. <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/dir1/file1</expected-output>
  13305. </comparator>
  13306. <comparator>
  13307. <type>RegexpComparator</type>
  13308. <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/dir1/file2</expected-output>
  13309. </comparator>
  13310. <comparator>
  13311. <type>RegexpComparator</type>
  13312. <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/file0</expected-output>
  13313. </comparator>
  13314. <comparator>
  13315. <type>RegexpComparator</type>
  13316. <expected-output>^drwxr-xr-x( )*-( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir2/dir1</expected-output>
  13317. </comparator>
  13318. <comparator>
  13319. <type>RegexpComparator</type>
  13320. <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir2/dir1/file1</expected-output>
  13321. </comparator>
  13322. <comparator>
  13323. <type>RegexpComparator</type>
  13324. <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir2/dir1/file2</expected-output>
  13325. </comparator>
  13326. <comparator>
  13327. <type>RegexpComparator</type>
  13328. <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir2/file0</expected-output>
  13329. </comparator>
  13330. </comparators>
  13331. </test>
  13332. <test> <!-- TESTED -->
  13333. <description>chgrp: change group of multiple directories recursively in absolute path using globbing</description>
  13334. <test-commands>
  13335. <command>-fs NAMENODE -mkdir /dir0</command>
  13336. <command>-fs NAMENODE -mkdir /dir0/dir1</command>
  13337. <command>-fs NAMENODE -touchz /dir0/file0</command>
  13338. <command>-fs NAMENODE -touchz /dir0/dir1/file1</command>
  13339. <command>-fs NAMENODE -touchz /dir0/dir1/file2</command>
  13340. <command>-fs NAMENODE -mkdir /dir2</command>
  13341. <command>-fs NAMENODE -mkdir /dir2/dir1</command>
  13342. <command>-fs NAMENODE -touchz /dir2/file0</command>
  13343. <command>-fs NAMENODE -touchz /dir2/dir1/file1</command>
  13344. <command>-fs NAMENODE -touchz /dir2/dir1/file2</command>
  13345. <command>-fs NAMENODE -chgrp -R newgroup /dir*</command>
  13346. <command>-fs NAMENODE -ls -R /dir*</command>
  13347. </test-commands>
  13348. <cleanup-commands>
  13349. <command>-fs NAMENODE -rm -r /dir*</command>
  13350. </cleanup-commands>
  13351. <comparators>
  13352. <comparator>
  13353. <type>RegexpComparator</type>
  13354. <expected-output>^drwxr-xr-x( )*-( )*[a-z]*( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1</expected-output>
  13355. </comparator>
  13356. <comparator>
  13357. <type>RegexpComparator</type>
  13358. <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1/file1</expected-output>
  13359. </comparator>
  13360. <comparator>
  13361. <type>RegexpComparator</type>
  13362. <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1/file2</expected-output>
  13363. </comparator>
  13364. <comparator>
  13365. <type>RegexpComparator</type>
  13366. <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/file0</expected-output>
  13367. </comparator>
  13368. <comparator>
  13369. <type>RegexpComparator</type>
  13370. <expected-output>^drwxr-xr-x( )*-( )*[a-z]*( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir2/dir1</expected-output>
  13371. </comparator>
  13372. <comparator>
  13373. <type>RegexpComparator</type>
  13374. <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir2/dir1/file1</expected-output>
  13375. </comparator>
  13376. <comparator>
  13377. <type>RegexpComparator</type>
  13378. <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir2/dir1/file2</expected-output>
  13379. </comparator>
  13380. <comparator>
  13381. <type>RegexpComparator</type>
  13382. <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir2/file0</expected-output>
  13383. </comparator>
  13384. </comparators>
  13385. </test>
  13386. <test> <!-- TESTED -->
  13387. <description>chgrp: change group of multiple directories recursively in relative path using globbing</description>
  13388. <test-commands>
  13389. <command>-fs NAMENODE -mkdir dir0</command>
  13390. <command>-fs NAMENODE -mkdir dir0/dir1</command>
  13391. <command>-fs NAMENODE -touchz dir0/file0</command>
  13392. <command>-fs NAMENODE -touchz dir0/dir1/file1</command>
  13393. <command>-fs NAMENODE -touchz dir0/dir1/file2</command>
  13394. <command>-fs NAMENODE -mkdir dir2</command>
  13395. <command>-fs NAMENODE -mkdir dir2/dir1</command>
  13396. <command>-fs NAMENODE -touchz dir2/file0</command>
  13397. <command>-fs NAMENODE -touchz dir2/dir1/file1</command>
  13398. <command>-fs NAMENODE -touchz dir2/dir1/file2</command>
  13399. <command>-fs NAMENODE -chgrp -R newgroup dir*</command>
  13400. <command>-fs NAMENODE -ls -R dir*</command>
  13401. </test-commands>
  13402. <cleanup-commands>
  13403. <command>-fs NAMENODE -rm -r dir*</command>
  13404. </cleanup-commands>
  13405. <comparators>
  13406. <comparator>
  13407. <type>RegexpComparator</type>
  13408. <expected-output>^drwxr-xr-x( )*-( )*[a-z]*( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/dir1</expected-output>
  13409. </comparator>
  13410. <comparator>
  13411. <type>RegexpComparator</type>
  13412. <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/dir1/file1</expected-output>
  13413. </comparator>
  13414. <comparator>
  13415. <type>RegexpComparator</type>
  13416. <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/dir1/file2</expected-output>
  13417. </comparator>
  13418. <comparator>
  13419. <type>RegexpComparator</type>
  13420. <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/file0</expected-output>
  13421. </comparator>
  13422. <comparator>
  13423. <type>RegexpComparator</type>
  13424. <expected-output>^drwxr-xr-x( )*-( )*[a-z]*( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir2/dir1</expected-output>
  13425. </comparator>
  13426. <comparator>
  13427. <type>RegexpComparator</type>
  13428. <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir2/dir1/file1</expected-output>
  13429. </comparator>
  13430. <comparator>
  13431. <type>RegexpComparator</type>
  13432. <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir2/dir1/file2</expected-output>
  13433. </comparator>
  13434. <comparator>
  13435. <type>RegexpComparator</type>
  13436. <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir2/file0</expected-output>
  13437. </comparator>
  13438. </comparators>
  13439. </test>
  13440. <test> <!-- TESTED -->
  13441. <description>chgrp: change group of multiple directories recursively in absolute path without globbing</description>
  13442. <test-commands>
  13443. <command>-fs NAMENODE -mkdir /dir0</command>
  13444. <command>-fs NAMENODE -mkdir /dir0/dir1</command>
  13445. <command>-fs NAMENODE -touchz /dir0/file0</command>
  13446. <command>-fs NAMENODE -touchz /dir0/dir1/file1</command>
  13447. <command>-fs NAMENODE -touchz /dir0/dir1/file2</command>
  13448. <command>-fs NAMENODE -mkdir /dir2</command>
  13449. <command>-fs NAMENODE -mkdir /dir2/dir1</command>
  13450. <command>-fs NAMENODE -touchz /dir2/file0</command>
  13451. <command>-fs NAMENODE -touchz /dir2/dir1/file1</command>
  13452. <command>-fs NAMENODE -touchz /dir2/dir1/file2</command>
  13453. <command>-fs NAMENODE -chgrp -R newgroup /dir0 /dir2</command>
  13454. <command>-fs NAMENODE -ls -R /dir*</command>
  13455. </test-commands>
  13456. <cleanup-commands>
  13457. <command>-fs NAMENODE -rm -r /dir*</command>
  13458. </cleanup-commands>
  13459. <comparators>
  13460. <comparator>
  13461. <type>RegexpComparator</type>
  13462. <expected-output>^drwxr-xr-x( )*-( )*[a-z]*( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1</expected-output>
  13463. </comparator>
  13464. <comparator>
  13465. <type>RegexpComparator</type>
  13466. <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1/file1</expected-output>
  13467. </comparator>
  13468. <comparator>
  13469. <type>RegexpComparator</type>
  13470. <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1/file2</expected-output>
  13471. </comparator>
  13472. <comparator>
  13473. <type>RegexpComparator</type>
  13474. <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/file0</expected-output>
  13475. </comparator>
  13476. <comparator>
  13477. <type>RegexpComparator</type>
  13478. <expected-output>^drwxr-xr-x( )*-( )*[a-z]*( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir2/dir1</expected-output>
  13479. </comparator>
  13480. <comparator>
  13481. <type>RegexpComparator</type>
  13482. <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir2/dir1/file1</expected-output>
  13483. </comparator>
  13484. <comparator>
  13485. <type>RegexpComparator</type>
  13486. <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir2/dir1/file2</expected-output>
  13487. </comparator>
  13488. <comparator>
  13489. <type>RegexpComparator</type>
  13490. <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir2/file0</expected-output>
  13491. </comparator>
  13492. </comparators>
  13493. </test>
  13494. <test> <!-- TESTED -->
  13495. <description>chgrp: change group of multiple directories recursively in relative path without globbing</description>
  13496. <test-commands>
  13497. <command>-fs NAMENODE -mkdir dir0</command>
  13498. <command>-fs NAMENODE -mkdir dir0/dir1</command>
  13499. <command>-fs NAMENODE -touchz dir0/file0</command>
  13500. <command>-fs NAMENODE -touchz dir0/dir1/file1</command>
  13501. <command>-fs NAMENODE -touchz dir0/dir1/file2</command>
  13502. <command>-fs NAMENODE -mkdir dir2</command>
  13503. <command>-fs NAMENODE -mkdir dir2/dir1</command>
  13504. <command>-fs NAMENODE -touchz dir2/file0</command>
  13505. <command>-fs NAMENODE -touchz dir2/dir1/file1</command>
  13506. <command>-fs NAMENODE -touchz dir2/dir1/file2</command>
  13507. <command>-fs NAMENODE -chgrp -R newgroup dir0 dir2</command>
  13508. <command>-fs NAMENODE -ls -R dir*</command>
  13509. </test-commands>
  13510. <cleanup-commands>
  13511. <command>-fs NAMENODE -rm -r dir*</command>
  13512. </cleanup-commands>
  13513. <comparators>
  13514. <comparator>
  13515. <type>RegexpComparator</type>
  13516. <expected-output>^drwxr-xr-x( )*-( )*[a-z]*( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/dir1</expected-output>
  13517. </comparator>
  13518. <comparator>
  13519. <type>RegexpComparator</type>
  13520. <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/dir1/file1</expected-output>
  13521. </comparator>
  13522. <comparator>
  13523. <type>RegexpComparator</type>
  13524. <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/dir1/file2</expected-output>
  13525. </comparator>
  13526. <comparator>
  13527. <type>RegexpComparator</type>
  13528. <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/file0</expected-output>
  13529. </comparator>
  13530. <comparator>
  13531. <type>RegexpComparator</type>
  13532. <expected-output>^drwxr-xr-x( )*-( )*[a-z]*( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir2/dir1</expected-output>
  13533. </comparator>
  13534. <comparator>
  13535. <type>RegexpComparator</type>
  13536. <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir2/dir1/file1</expected-output>
  13537. </comparator>
  13538. <comparator>
  13539. <type>RegexpComparator</type>
  13540. <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir2/dir1/file2</expected-output>
  13541. </comparator>
  13542. <comparator>
  13543. <type>RegexpComparator</type>
  13544. <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir2/file0</expected-output>
  13545. </comparator>
  13546. </comparators>
  13547. </test>
  13548. <test> <!-- TESTED -->
  13549. <description>chgrp: invalid option for group of file in absolute path</description>
  13550. <test-commands>
  13551. <command>-fs NAMENODE -touchz /file1</command>
  13552. <command>-fs NAMENODE -chgrp % /file1</command>
  13553. </test-commands>
  13554. <cleanup-commands>
  13555. <command>-fs NAMENODE -rm /file1</command>
  13556. </cleanup-commands>
  13557. <comparators>
  13558. <comparator>
  13559. <type>RegexpComparator</type>
  13560. <expected-output>^-chgrp: '%' does not match expected pattern for group</expected-output>
  13561. </comparator>
  13562. </comparators>
  13563. </test>
  13564. <test> <!-- TESTED -->
  13565. <description>chgrp: invalid option for group of file in relative path</description>
  13566. <test-commands>
  13567. <command>-fs NAMENODE -touchz file1</command>
  13568. <command>-fs NAMENODE -chgrp % file1</command>
  13569. </test-commands>
  13570. <cleanup-commands>
  13571. <command>-fs NAMENODE -rm file1</command>
  13572. </cleanup-commands>
  13573. <comparators>
  13574. <comparator>
  13575. <type>RegexpComparator</type>
  13576. <expected-output>^-chgrp: '%' does not match expected pattern for group</expected-output>
  13577. </comparator>
  13578. </comparators>
  13579. </test>
  13580. <test> <!-- TESTED -->
  13581. <description>chgrp: change group of file in hdfs:// path</description>
  13582. <test-commands>
  13583. <command>-fs NAMENODE -touchz hdfs:///file1</command>
  13584. <command>-fs NAMENODE -chgrp newgroup hdfs:///file1</command>
  13585. <command>-fs NAMENODE -ls hdfs:///file1</command>
  13586. </test-commands>
  13587. <cleanup-commands>
  13588. <command>-fs NAMENODE -rm hdfs:///file1</command>
  13589. </cleanup-commands>
  13590. <comparators>
  13591. <comparator>
  13592. <type>TokenComparator</type>
  13593. <expected-output>Found 1 items</expected-output>
  13594. </comparator>
  13595. <comparator>
  13596. <type>RegexpComparator</type>
  13597. <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///file1</expected-output>
  13598. </comparator>
  13599. </comparators>
  13600. </test>
  13601. <test> <!-- TESTED -->
  13602. <description>chgrp: change group of directory in hdfs:// path</description>
  13603. <test-commands>
  13604. <command>-fs NAMENODE -mkdir hdfs:///dir0</command>
  13605. <command>-fs NAMENODE -mkdir hdfs:///dir0/dir1</command>
  13606. <command>-fs NAMENODE -touchz hdfs:///dir0/file0</command>
  13607. <command>-fs NAMENODE -touchz hdfs:///dir0/dir1/file1</command>
  13608. <command>-fs NAMENODE -touchz hdfs:///dir0/dir1/file2</command>
  13609. <command>-fs NAMENODE -chgrp newgroup hdfs:///dir0/dir1</command>
  13610. <command>-fs NAMENODE -ls -R hdfs:///dir0</command>
  13611. </test-commands>
  13612. <cleanup-commands>
  13613. <command>-fs NAMENODE -rm -r hdfs:///dir0</command>
  13614. </cleanup-commands>
  13615. <comparators>
  13616. <comparator>
  13617. <type>RegexpComparator</type>
  13618. <expected-output>^drwxr-xr-x( )*-( )*[a-z]*( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir0/dir1</expected-output>
  13619. </comparator>
  13620. <comparator>
  13621. <type>RegexpComparator</type>
  13622. <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir0/dir1/file1</expected-output>
  13623. </comparator>
  13624. <comparator>
  13625. <type>RegexpComparator</type>
  13626. <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir0/dir1/file2</expected-output>
  13627. </comparator>
  13628. <comparator>
  13629. <type>RegexpComparator</type>
  13630. <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir0/file0</expected-output>
  13631. </comparator>
  13632. </comparators>
  13633. </test>
  13634. <test> <!-- TESTED -->
  13635. <description>chgrp: change group of directory in hdfs:// path recursively </description>
  13636. <test-commands>
  13637. <command>-fs NAMENODE -mkdir hdfs:///dir0</command>
  13638. <command>-fs NAMENODE -mkdir hdfs:///dir0/dir1</command>
  13639. <command>-fs NAMENODE -touchz hdfs:///dir0/file0</command>
  13640. <command>-fs NAMENODE -touchz hdfs:///dir0/dir1/file1</command>
  13641. <command>-fs NAMENODE -touchz hdfs:///dir0/dir1/file2</command>
  13642. <command>-fs NAMENODE -chgrp -R newgroup hdfs:///dir0/dir1</command>
  13643. <command>-fs NAMENODE -ls -R hdfs:///dir0</command>
  13644. </test-commands>
  13645. <cleanup-commands>
  13646. <command>-fs NAMENODE -rm -r hdfs:///dir0</command>
  13647. </cleanup-commands>
  13648. <comparators>
  13649. <comparator>
  13650. <type>RegexpComparator</type>
  13651. <expected-output>^drwxr-xr-x( )*-( )*[a-z]*( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir0/dir1</expected-output>
  13652. </comparator>
  13653. <comparator>
  13654. <type>RegexpComparator</type>
  13655. <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir0/dir1/file1</expected-output>
  13656. </comparator>
  13657. <comparator>
  13658. <type>RegexpComparator</type>
  13659. <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir0/dir1/file2</expected-output>
  13660. </comparator>
  13661. <comparator>
  13662. <type>RegexpComparator</type>
  13663. <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir0/file0</expected-output>
  13664. </comparator>
  13665. </comparators>
  13666. </test>
  13667. <test> <!-- TESTED -->
  13668. <description>chgrp: change group of non existent file in hdfs:// path</description>
  13669. <test-commands>
  13670. <command>-fs NAMENODE -chgrp newgroup hdfs:///file1</command>
  13671. </test-commands>
  13672. <cleanup-commands>
  13673. <command>-fs NAMENODE -rm hdfs:///file1</command>
  13674. </cleanup-commands>
  13675. <comparators>
  13676. <comparator>
  13677. <type>RegexpComparator</type>
  13678. <expected-output>^chgrp: `hdfs:///file1': No such file or directory</expected-output>
  13679. </comparator>
  13680. </comparators>
  13681. </test>
  13682. <test> <!-- TESTED -->
  13683. <description>chgrp: change group of multiple files in hdfs:// path using globbing</description>
  13684. <test-commands>
  13685. <command>-fs NAMENODE -touchz hdfs:///file1</command>
  13686. <command>-fs NAMENODE -touchz hdfs:///file2</command>
  13687. <command>-fs NAMENODE -touchz hdfs:///file3</command>
  13688. <command>-fs NAMENODE -touchz hdfs:///file4</command>
  13689. <command>-fs NAMENODE -chgrp newgroup hdfs:///file* </command>
  13690. <command>-fs NAMENODE -ls -R hdfs:///file*</command>
  13691. </test-commands>
  13692. <cleanup-commands>
  13693. <command>-fs NAMENODE -rm hdfs:///file*</command>
  13694. </cleanup-commands>
  13695. <comparators>
  13696. <comparator>
  13697. <type>RegexpComparator</type>
  13698. <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///file1</expected-output>
  13699. </comparator>
  13700. <comparator>
  13701. <type>RegexpComparator</type>
  13702. <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///file2</expected-output>
  13703. </comparator>
  13704. <comparator>
  13705. <type>RegexpComparator</type>
  13706. <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///file3</expected-output>
  13707. </comparator>
  13708. <comparator>
  13709. <type>RegexpComparator</type>
  13710. <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///file4</expected-output>
  13711. </comparator>
  13712. </comparators>
  13713. </test>
  13714. <test> <!-- TESTED -->
  13715. <description>chgrp: change group of multiple directories in hdfs:// path using globbing</description>
  13716. <test-commands>
  13717. <command>-fs NAMENODE -mkdir hdfs:///dir0</command>
  13718. <command>-fs NAMENODE -mkdir hdfs:///dir0/dir1</command>
  13719. <command>-fs NAMENODE -touchz hdfs:///dir0/file0</command>
  13720. <command>-fs NAMENODE -touchz hdfs:///dir0/dir1/file1</command>
  13721. <command>-fs NAMENODE -touchz hdfs:///dir0/dir1/file2</command>
  13722. <command>-fs NAMENODE -mkdir hdfs:///dir2</command>
  13723. <command>-fs NAMENODE -mkdir hdfs:///dir2/dir1</command>
  13724. <command>-fs NAMENODE -touchz hdfs:///dir2/file0</command>
  13725. <command>-fs NAMENODE -touchz hdfs:///dir2/dir1/file1</command>
  13726. <command>-fs NAMENODE -touchz hdfs:///dir2/dir1/file2</command>
  13727. <command>-fs NAMENODE -chgrp newgroup hdfs:///dir*</command>
  13728. <command>-fs NAMENODE -ls -R hdfs:///dir*</command>
  13729. </test-commands>
  13730. <cleanup-commands>
  13731. <command>-fs NAMENODE -rm -r hdfs:///dir*</command>
  13732. </cleanup-commands>
  13733. <comparators>
  13734. <comparator>
  13735. <type>RegexpComparator</type>
  13736. <expected-output>^drwxr-xr-x( )*-( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir0/dir1</expected-output>
  13737. </comparator>
  13738. <comparator>
  13739. <type>RegexpComparator</type>
  13740. <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir0/dir1/file1</expected-output>
  13741. </comparator>
  13742. <comparator>
  13743. <type>RegexpComparator</type>
  13744. <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir0/dir1/file2</expected-output>
  13745. </comparator>
  13746. <comparator>
  13747. <type>RegexpComparator</type>
  13748. <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir0/file0</expected-output>
  13749. </comparator>
  13750. <comparator>
  13751. <type>RegexpComparator</type>
  13752. <expected-output>^drwxr-xr-x( )*-( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir2/dir1</expected-output>
  13753. </comparator>
  13754. <comparator>
  13755. <type>RegexpComparator</type>
  13756. <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir2/dir1/file1</expected-output>
  13757. </comparator>
  13758. <comparator>
  13759. <type>RegexpComparator</type>
  13760. <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir2/dir1/file2</expected-output>
  13761. </comparator>
  13762. <comparator>
  13763. <type>RegexpComparator</type>
  13764. <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir2/file0</expected-output>
  13765. </comparator>
  13766. </comparators>
  13767. </test>
  13768. <test> <!-- TESTED -->
  13769. <description>chgrp: change of multiple files in hdfs:// path without globbing</description>
  13770. <test-commands>
  13771. <command>-fs NAMENODE -touchz hdfs:///file1</command>
  13772. <command>-fs NAMENODE -touchz hdfs:///file2</command>
  13773. <command>-fs NAMENODE -touchz hdfs:///file3</command>
  13774. <command>-fs NAMENODE -touchz hdfs:///file4</command>
  13775. <command>-fs NAMENODE -chgrp newgroup hdfs:///file1 hdfs:///file2 hdfs:///file3 hdfs:///file4 </command>
  13776. <command>-fs NAMENODE -ls -R hdfs:///file*</command>
  13777. </test-commands>
  13778. <cleanup-commands>
  13779. <command>-fs NAMENODE -rm hdfs:///file*</command>
  13780. </cleanup-commands>
  13781. <comparators>
  13782. <comparator>
  13783. <type>RegexpComparator</type>
  13784. <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///file1</expected-output>
  13785. </comparator>
  13786. <comparator>
  13787. <type>RegexpComparator</type>
  13788. <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///file2</expected-output>
  13789. </comparator>
  13790. <comparator>
  13791. <type>RegexpComparator</type>
  13792. <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///file3</expected-output>
  13793. </comparator>
  13794. <comparator>
  13795. <type>RegexpComparator</type>
  13796. <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///file4</expected-output>
  13797. </comparator>
  13798. </comparators>
  13799. </test>
  13800. <test> <!-- TESTED -->
  13801. <description>chgrp: change group of multiple directories in hdfs:// path without globbing</description>
  13802. <test-commands>
  13803. <command>-fs NAMENODE -mkdir hdfs:///dir0</command>
  13804. <command>-fs NAMENODE -mkdir hdfs:///dir0/dir1</command>
  13805. <command>-fs NAMENODE -touchz hdfs:///dir0/file0</command>
  13806. <command>-fs NAMENODE -touchz hdfs:///dir0/dir1/file1</command>
  13807. <command>-fs NAMENODE -touchz hdfs:///dir0/dir1/file2</command>
  13808. <command>-fs NAMENODE -mkdir hdfs:///dir2</command>
  13809. <command>-fs NAMENODE -mkdir hdfs:///dir2/dir1</command>
  13810. <command>-fs NAMENODE -touchz hdfs:///dir2/file0</command>
  13811. <command>-fs NAMENODE -touchz hdfs:///dir2/dir1/file1</command>
  13812. <command>-fs NAMENODE -touchz hdfs:///dir2/dir1/file2</command>
  13813. <command>-fs NAMENODE -chgrp newgroup hdfs:///dir0 hdfs:///dir2</command>
  13814. <command>-fs NAMENODE -ls -R hdfs:///dir*</command>
  13815. </test-commands>
  13816. <cleanup-commands>
  13817. <command>-fs NAMENODE -rm -r hdfs:///dir*</command>
  13818. </cleanup-commands>
  13819. <comparators>
  13820. <comparator>
  13821. <type>RegexpComparator</type>
  13822. <expected-output>^drwxr-xr-x( )*-( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir0/dir1</expected-output>
  13823. </comparator>
  13824. <comparator>
  13825. <type>RegexpComparator</type>
  13826. <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir0/dir1/file1</expected-output>
  13827. </comparator>
  13828. <comparator>
  13829. <type>RegexpComparator</type>
  13830. <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir0/dir1/file2</expected-output>
  13831. </comparator>
  13832. <comparator>
  13833. <type>RegexpComparator</type>
  13834. <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir0/file0</expected-output>
  13835. </comparator>
  13836. <comparator>
  13837. <type>RegexpComparator</type>
  13838. <expected-output>^drwxr-xr-x( )*-( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir2/dir1</expected-output>
  13839. </comparator>
  13840. <comparator>
  13841. <type>RegexpComparator</type>
  13842. <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir2/dir1/file1</expected-output>
  13843. </comparator>
  13844. <comparator>
  13845. <type>RegexpComparator</type>
  13846. <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir2/dir1/file2</expected-output>
  13847. </comparator>
  13848. <comparator>
  13849. <type>RegexpComparator</type>
  13850. <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir2/file0</expected-output>
  13851. </comparator>
  13852. </comparators>
  13853. </test>
  13854. <test> <!-- TESTED -->
  13855. <description>chgrp: change group of multiple directories recursively in hdfs:// path using globbing</description>
  13856. <test-commands>
  13857. <command>-fs NAMENODE -mkdir hdfs:///dir0</command>
  13858. <command>-fs NAMENODE -mkdir hdfs:///dir0/dir1</command>
  13859. <command>-fs NAMENODE -touchz hdfs:///dir0/file0</command>
  13860. <command>-fs NAMENODE -touchz hdfs:///dir0/dir1/file1</command>
  13861. <command>-fs NAMENODE -touchz hdfs:///dir0/dir1/file2</command>
  13862. <command>-fs NAMENODE -mkdir hdfs:///dir2</command>
  13863. <command>-fs NAMENODE -mkdir hdfs:///dir2/dir1</command>
  13864. <command>-fs NAMENODE -touchz hdfs:///dir2/file0</command>
  13865. <command>-fs NAMENODE -touchz hdfs:///dir2/dir1/file1</command>
  13866. <command>-fs NAMENODE -touchz hdfs:///dir2/dir1/file2</command>
  13867. <command>-fs NAMENODE -chgrp -R newgroup hdfs:///dir*</command>
  13868. <command>-fs NAMENODE -ls -R hdfs:///dir*</command>
  13869. </test-commands>
  13870. <cleanup-commands>
  13871. <command>-fs NAMENODE -rm -r hdfs:///dir*</command>
  13872. </cleanup-commands>
  13873. <comparators>
  13874. <comparator>
  13875. <type>RegexpComparator</type>
  13876. <expected-output>^drwxr-xr-x( )*-( )*[a-z]*( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir0/dir1</expected-output>
  13877. </comparator>
  13878. <comparator>
  13879. <type>RegexpComparator</type>
  13880. <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir0/dir1/file1</expected-output>
  13881. </comparator>
  13882. <comparator>
  13883. <type>RegexpComparator</type>
  13884. <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir0/dir1/file2</expected-output>
  13885. </comparator>
  13886. <comparator>
  13887. <type>RegexpComparator</type>
  13888. <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir0/file0</expected-output>
  13889. </comparator>
  13890. <comparator>
  13891. <type>RegexpComparator</type>
  13892. <expected-output>^drwxr-xr-x( )*-( )*[a-z]*( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir2/dir1</expected-output>
  13893. </comparator>
  13894. <comparator>
  13895. <type>RegexpComparator</type>
  13896. <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir2/dir1/file1</expected-output>
  13897. </comparator>
  13898. <comparator>
  13899. <type>RegexpComparator</type>
  13900. <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir2/dir1/file2</expected-output>
  13901. </comparator>
  13902. <comparator>
  13903. <type>RegexpComparator</type>
  13904. <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir2/file0</expected-output>
  13905. </comparator>
  13906. </comparators>
  13907. </test>
  13908. <test> <!-- TESTED -->
  13909. <description>chgrp: change group of multiple directories recursively in hdfs:// path without globbing</description>
  13910. <test-commands>
  13911. <command>-fs NAMENODE -mkdir hdfs:///dir0</command>
  13912. <command>-fs NAMENODE -mkdir hdfs:///dir0/dir1</command>
  13913. <command>-fs NAMENODE -touchz hdfs:///dir0/file0</command>
  13914. <command>-fs NAMENODE -touchz hdfs:///dir0/dir1/file1</command>
  13915. <command>-fs NAMENODE -touchz hdfs:///dir0/dir1/file2</command>
  13916. <command>-fs NAMENODE -mkdir hdfs:///dir2</command>
  13917. <command>-fs NAMENODE -mkdir hdfs:///dir2/dir1</command>
  13918. <command>-fs NAMENODE -touchz hdfs:///dir2/file0</command>
  13919. <command>-fs NAMENODE -touchz hdfs:///dir2/dir1/file1</command>
  13920. <command>-fs NAMENODE -touchz hdfs:///dir2/dir1/file2</command>
  13921. <command>-fs NAMENODE -chgrp -R newgroup hdfs:///dir0 hdfs:///dir2</command>
  13922. <command>-fs NAMENODE -ls -R hdfs:///dir*</command>
  13923. </test-commands>
  13924. <cleanup-commands>
  13925. <command>-fs NAMENODE -rm -r hdfs:///dir*</command>
  13926. </cleanup-commands>
  13927. <comparators>
  13928. <comparator>
  13929. <type>RegexpComparator</type>
  13930. <expected-output>^drwxr-xr-x( )*-( )*[a-z]*( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir0/dir1</expected-output>
  13931. </comparator>
  13932. <comparator>
  13933. <type>RegexpComparator</type>
  13934. <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir0/dir1/file1</expected-output>
  13935. </comparator>
  13936. <comparator>
  13937. <type>RegexpComparator</type>
  13938. <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir0/dir1/file2</expected-output>
  13939. </comparator>
  13940. <comparator>
  13941. <type>RegexpComparator</type>
  13942. <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir0/file0</expected-output>
  13943. </comparator>
  13944. <comparator>
  13945. <type>RegexpComparator</type>
  13946. <expected-output>^drwxr-xr-x( )*-( )*[a-z]*( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir2/dir1</expected-output>
  13947. </comparator>
  13948. <comparator>
  13949. <type>RegexpComparator</type>
  13950. <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir2/dir1/file1</expected-output>
  13951. </comparator>
  13952. <comparator>
  13953. <type>RegexpComparator</type>
  13954. <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir2/dir1/file2</expected-output>
  13955. </comparator>
  13956. <comparator>
  13957. <type>RegexpComparator</type>
  13958. <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir2/file0</expected-output>
  13959. </comparator>
  13960. </comparators>
  13961. </test>
  13962. <test> <!-- TESTED -->
  13963. <description>chgrp: invalid option for group of file in hdfs:// path</description>
  13964. <test-commands>
  13965. <command>-fs NAMENODE -touchz hdfs:///file1</command>
  13966. <command>-fs NAMENODE -chgrp % hdfs:///file1</command>
  13967. </test-commands>
  13968. <cleanup-commands>
  13969. <command>-fs NAMENODE -rm hdfs:///file1</command>
  13970. </cleanup-commands>
  13971. <comparators>
  13972. <comparator>
  13973. <type>RegexpComparator</type>
  13974. <expected-output>^-chgrp: '%' does not match expected pattern for group</expected-output>
  13975. </comparator>
  13976. </comparators>
  13977. </test>
  13978. <!-- Tests for chgrp -->
  13979. <test> <!-- TESTED -->
  13980. <description>chgrp: change group of file in Namenode's path</description>
  13981. <test-commands>
  13982. <command>-fs NAMENODE -touchz NAMENODE/file1</command>
  13983. <command>-fs NAMENODE -chgrp newgroup NAMENODE/file1</command>
  13984. <command>-fs NAMENODE -ls NAMENODE/file1</command>
  13985. </test-commands>
  13986. <cleanup-commands>
  13987. <command>-fs NAMENODE -rm NAMENODE/file1</command>
  13988. </cleanup-commands>
  13989. <comparators>
  13990. <comparator>
  13991. <type>TokenComparator</type>
  13992. <expected-output>Found 1 items</expected-output>
  13993. </comparator>
  13994. <comparator>
  13995. <type>RegexpComparator</type>
  13996. <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/file1</expected-output>
  13997. </comparator>
  13998. </comparators>
  13999. </test>
  14000. <test> <!-- TESTED -->
  14001. <description>chgrp: change group of directory in Namenode's path</description>
  14002. <test-commands>
  14003. <command>-fs NAMENODE -mkdir NAMENODE/dir0</command>
  14004. <command>-fs NAMENODE -mkdir NAMENODE/dir0/dir1</command>
  14005. <command>-fs NAMENODE -touchz NAMENODE/dir0/file0</command>
  14006. <command>-fs NAMENODE -touchz NAMENODE/dir0/dir1/file1</command>
  14007. <command>-fs NAMENODE -touchz NAMENODE/dir0/dir1/file2</command>
  14008. <command>-fs NAMENODE -chgrp newgroup NAMENODE/dir0/dir1</command>
  14009. <command>-fs NAMENODE -ls -R NAMENODE/dir0</command>
  14010. </test-commands>
  14011. <cleanup-commands>
  14012. <command>-fs NAMENODE -rm -r NAMENODE/dir0</command>
  14013. </cleanup-commands>
  14014. <comparators>
  14015. <comparator>
  14016. <type>RegexpComparator</type>
  14017. <expected-output>^drwxr-xr-x( )*-( )*[a-z]*( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir0/dir1</expected-output>
  14018. </comparator>
  14019. <comparator>
  14020. <type>RegexpComparator</type>
  14021. <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir0/dir1/file1</expected-output>
  14022. </comparator>
  14023. <comparator>
  14024. <type>RegexpComparator</type>
  14025. <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir0/dir1/file2</expected-output>
  14026. </comparator>
  14027. <comparator>
  14028. <type>RegexpComparator</type>
  14029. <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir0/file0</expected-output>
  14030. </comparator>
  14031. </comparators>
  14032. </test>
  14033. <test> <!-- TESTED -->
  14034. <description>chgrp: change group of directory in Namenode's path recursively </description>
  14035. <test-commands>
  14036. <command>-fs NAMENODE -mkdir NAMENODE/dir0</command>
  14037. <command>-fs NAMENODE -mkdir NAMENODE/dir0/dir1</command>
  14038. <command>-fs NAMENODE -touchz NAMENODE/dir0/file0</command>
  14039. <command>-fs NAMENODE -touchz NAMENODE/dir0/dir1/file1</command>
  14040. <command>-fs NAMENODE -touchz NAMENODE/dir0/dir1/file2</command>
  14041. <command>-fs NAMENODE -chgrp -R newgroup NAMENODE/dir0/dir1</command>
  14042. <command>-fs NAMENODE -ls -R NAMENODE/dir0</command>
  14043. </test-commands>
  14044. <cleanup-commands>
  14045. <command>-fs NAMENODE -rm -r NAMENODE/dir0</command>
  14046. </cleanup-commands>
  14047. <comparators>
  14048. <comparator>
  14049. <type>RegexpComparator</type>
  14050. <expected-output>^drwxr-xr-x( )*-( )*[a-z]*( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir0/dir1</expected-output>
  14051. </comparator>
  14052. <comparator>
  14053. <type>RegexpComparator</type>
  14054. <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir0/dir1/file1</expected-output>
  14055. </comparator>
  14056. <comparator>
  14057. <type>RegexpComparator</type>
  14058. <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir0/dir1/file2</expected-output>
  14059. </comparator>
  14060. <comparator>
  14061. <type>RegexpComparator</type>
  14062. <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir0/file0</expected-output>
  14063. </comparator>
  14064. </comparators>
  14065. </test>
  14066. <test> <!-- TESTED -->
  14067. <description>chgrp: change group of non existent file in Namenode's path</description>
  14068. <test-commands>
  14069. <command>-fs NAMENODE -chgrp newgroup NAMENODE/file1</command>
  14070. </test-commands>
  14071. <cleanup-commands>
  14072. <command>-fs NAMENODE -rm NAMENODE/file1</command>
  14073. </cleanup-commands>
  14074. <comparators>
  14075. <comparator>
  14076. <type>RegexpComparator</type>
  14077. <expected-output>^chgrp: `NAMENODE/file1': No such file or directory</expected-output>
  14078. </comparator>
  14079. </comparators>
  14080. </test>
  14081. <test> <!-- TESTED -->
  14082. <description>chgrp: change group of multiple files in Namenode's path using globbing</description>
  14083. <test-commands>
  14084. <command>-fs NAMENODE -touchz NAMENODE/file1</command>
  14085. <command>-fs NAMENODE -touchz NAMENODE/file2</command>
  14086. <command>-fs NAMENODE -touchz NAMENODE/file3</command>
  14087. <command>-fs NAMENODE -touchz NAMENODE/file4</command>
  14088. <command>-fs NAMENODE -chgrp newgroup NAMENODE/file* </command>
  14089. <command>-fs NAMENODE -ls -R NAMENODE/file*</command>
  14090. </test-commands>
  14091. <cleanup-commands>
  14092. <command>-fs NAMENODE -rm NAMENODE/file*</command>
  14093. </cleanup-commands>
  14094. <comparators>
  14095. <comparator>
  14096. <type>RegexpComparator</type>
  14097. <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/file1</expected-output>
  14098. </comparator>
  14099. <comparator>
  14100. <type>RegexpComparator</type>
  14101. <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/file2</expected-output>
  14102. </comparator>
  14103. <comparator>
  14104. <type>RegexpComparator</type>
  14105. <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/file3</expected-output>
  14106. </comparator>
  14107. <comparator>
  14108. <type>RegexpComparator</type>
  14109. <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/file4</expected-output>
  14110. </comparator>
  14111. </comparators>
  14112. </test>
  14113. <test> <!-- TESTED -->
  14114. <description>chgrp: change group of multiple directories in Namenode's path using globbing</description>
  14115. <test-commands>
  14116. <command>-fs NAMENODE -mkdir NAMENODE/dir0</command>
  14117. <command>-fs NAMENODE -mkdir NAMENODE/dir0/dir1</command>
  14118. <command>-fs NAMENODE -touchz NAMENODE/dir0/file0</command>
  14119. <command>-fs NAMENODE -touchz NAMENODE/dir0/dir1/file1</command>
  14120. <command>-fs NAMENODE -touchz NAMENODE/dir0/dir1/file2</command>
  14121. <command>-fs NAMENODE -mkdir NAMENODE/dir2</command>
  14122. <command>-fs NAMENODE -mkdir NAMENODE/dir2/dir1</command>
  14123. <command>-fs NAMENODE -touchz NAMENODE/dir2/file0</command>
  14124. <command>-fs NAMENODE -touchz NAMENODE/dir2/dir1/file1</command>
  14125. <command>-fs NAMENODE -touchz NAMENODE/dir2/dir1/file2</command>
  14126. <command>-fs NAMENODE -chgrp newgroup NAMENODE/dir*</command>
  14127. <command>-fs NAMENODE -ls -R NAMENODE/dir*</command>
  14128. </test-commands>
  14129. <cleanup-commands>
  14130. <command>-fs NAMENODE -rm -r NAMENODE/dir*</command>
  14131. </cleanup-commands>
  14132. <comparators>
  14133. <comparator>
  14134. <type>RegexpComparator</type>
  14135. <expected-output>^drwxr-xr-x( )*-( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir0/dir1</expected-output>
  14136. </comparator>
  14137. <comparator>
  14138. <type>RegexpComparator</type>
  14139. <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir0/dir1/file1</expected-output>
  14140. </comparator>
  14141. <comparator>
  14142. <type>RegexpComparator</type>
  14143. <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir0/dir1/file2</expected-output>
  14144. </comparator>
  14145. <comparator>
  14146. <type>RegexpComparator</type>
  14147. <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir0/file0</expected-output>
  14148. </comparator>
  14149. <comparator>
  14150. <type>RegexpComparator</type>
  14151. <expected-output>^drwxr-xr-x( )*-( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir2/dir1</expected-output>
  14152. </comparator>
  14153. <comparator>
  14154. <type>RegexpComparator</type>
  14155. <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir2/dir1/file1</expected-output>
  14156. </comparator>
  14157. <comparator>
  14158. <type>RegexpComparator</type>
  14159. <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir2/dir1/file2</expected-output>
  14160. </comparator>
  14161. <comparator>
  14162. <type>RegexpComparator</type>
  14163. <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir2/file0</expected-output>
  14164. </comparator>
  14165. </comparators>
  14166. </test>
  14167. <test> <!-- TESTED -->
  14168. <description>chgrp: change of multiple files in Namenode's path without globbing</description>
  14169. <test-commands>
  14170. <command>-fs NAMENODE -touchz NAMENODE/file1</command>
  14171. <command>-fs NAMENODE -touchz NAMENODE/file2</command>
  14172. <command>-fs NAMENODE -touchz NAMENODE/file3</command>
  14173. <command>-fs NAMENODE -touchz NAMENODE/file4</command>
  14174. <command>-fs NAMENODE -chgrp newgroup NAMENODE/file1 NAMENODE/file2 NAMENODE/file3 NAMENODE/file4 </command>
  14175. <command>-fs NAMENODE -ls -R NAMENODE/file*</command>
  14176. </test-commands>
  14177. <cleanup-commands>
  14178. <command>-fs NAMENODE -rm NAMENODE/file*</command>
  14179. </cleanup-commands>
  14180. <comparators>
  14181. <comparator>
  14182. <type>RegexpComparator</type>
  14183. <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/file1</expected-output>
  14184. </comparator>
  14185. <comparator>
  14186. <type>RegexpComparator</type>
  14187. <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/file2</expected-output>
  14188. </comparator>
  14189. <comparator>
  14190. <type>RegexpComparator</type>
  14191. <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/file3</expected-output>
  14192. </comparator>
  14193. <comparator>
  14194. <type>RegexpComparator</type>
  14195. <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/file4</expected-output>
  14196. </comparator>
  14197. </comparators>
  14198. </test>
  14199. <test> <!-- TESTED -->
  14200. <description>chgrp: change group of multiple directories in Namenode's path without globbing</description>
  14201. <test-commands>
  14202. <command>-fs NAMENODE -mkdir NAMENODE/dir0</command>
  14203. <command>-fs NAMENODE -mkdir NAMENODE/dir0/dir1</command>
  14204. <command>-fs NAMENODE -touchz NAMENODE/dir0/file0</command>
  14205. <command>-fs NAMENODE -touchz NAMENODE/dir0/dir1/file1</command>
  14206. <command>-fs NAMENODE -touchz NAMENODE/dir0/dir1/file2</command>
  14207. <command>-fs NAMENODE -mkdir NAMENODE/dir2</command>
  14208. <command>-fs NAMENODE -mkdir NAMENODE/dir2/dir1</command>
  14209. <command>-fs NAMENODE -touchz NAMENODE/dir2/file0</command>
  14210. <command>-fs NAMENODE -touchz NAMENODE/dir2/dir1/file1</command>
  14211. <command>-fs NAMENODE -touchz NAMENODE/dir2/dir1/file2</command>
  14212. <command>-fs NAMENODE -chgrp newgroup NAMENODE/dir0 NAMENODE/dir2</command>
  14213. <command>-fs NAMENODE -ls -R NAMENODE/dir*</command>
  14214. </test-commands>
  14215. <cleanup-commands>
  14216. <command>-fs NAMENODE -rm -r NAMENODE/dir*</command>
  14217. </cleanup-commands>
  14218. <comparators>
  14219. <comparator>
  14220. <type>RegexpComparator</type>
  14221. <expected-output>^drwxr-xr-x( )*-( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir0/dir1</expected-output>
  14222. </comparator>
  14223. <comparator>
  14224. <type>RegexpComparator</type>
  14225. <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir0/dir1/file1</expected-output>
  14226. </comparator>
  14227. <comparator>
  14228. <type>RegexpComparator</type>
  14229. <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir0/dir1/file2</expected-output>
  14230. </comparator>
  14231. <comparator>
  14232. <type>RegexpComparator</type>
  14233. <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir0/file0</expected-output>
  14234. </comparator>
  14235. <comparator>
  14236. <type>RegexpComparator</type>
  14237. <expected-output>^drwxr-xr-x( )*-( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir2/dir1</expected-output>
  14238. </comparator>
  14239. <comparator>
  14240. <type>RegexpComparator</type>
  14241. <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir2/dir1/file1</expected-output>
  14242. </comparator>
  14243. <comparator>
  14244. <type>RegexpComparator</type>
  14245. <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir2/dir1/file2</expected-output>
  14246. </comparator>
  14247. <comparator>
  14248. <type>RegexpComparator</type>
  14249. <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir2/file0</expected-output>
  14250. </comparator>
  14251. </comparators>
  14252. </test>
  14253. <test> <!-- TESTED -->
  14254. <description>chgrp: change group of multiple directories recursively in Namenode's path using globbing</description>
  14255. <test-commands>
  14256. <command>-fs NAMENODE -mkdir NAMENODE/dir0</command>
  14257. <command>-fs NAMENODE -mkdir NAMENODE/dir0/dir1</command>
  14258. <command>-fs NAMENODE -touchz NAMENODE/dir0/file0</command>
  14259. <command>-fs NAMENODE -touchz NAMENODE/dir0/dir1/file1</command>
  14260. <command>-fs NAMENODE -touchz NAMENODE/dir0/dir1/file2</command>
  14261. <command>-fs NAMENODE -mkdir NAMENODE/dir2</command>
  14262. <command>-fs NAMENODE -mkdir NAMENODE/dir2/dir1</command>
  14263. <command>-fs NAMENODE -touchz NAMENODE/dir2/file0</command>
  14264. <command>-fs NAMENODE -touchz NAMENODE/dir2/dir1/file1</command>
  14265. <command>-fs NAMENODE -touchz NAMENODE/dir2/dir1/file2</command>
  14266. <command>-fs NAMENODE -chgrp -R newgroup NAMENODE/dir*</command>
  14267. <command>-fs NAMENODE -ls -R NAMENODE/dir*</command>
  14268. </test-commands>
  14269. <cleanup-commands>
  14270. <command>-fs NAMENODE -rm -r NAMENODE/dir*</command>
  14271. </cleanup-commands>
  14272. <comparators>
  14273. <comparator>
  14274. <type>RegexpComparator</type>
  14275. <expected-output>^drwxr-xr-x( )*-( )*[a-z]*( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir0/dir1</expected-output>
  14276. </comparator>
  14277. <comparator>
  14278. <type>RegexpComparator</type>
  14279. <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir0/dir1/file1</expected-output>
  14280. </comparator>
  14281. <comparator>
  14282. <type>RegexpComparator</type>
  14283. <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir0/dir1/file2</expected-output>
  14284. </comparator>
  14285. <comparator>
  14286. <type>RegexpComparator</type>
  14287. <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir0/file0</expected-output>
  14288. </comparator>
  14289. <comparator>
  14290. <type>RegexpComparator</type>
  14291. <expected-output>^drwxr-xr-x( )*-( )*[a-z]*( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir2/dir1</expected-output>
  14292. </comparator>
  14293. <comparator>
  14294. <type>RegexpComparator</type>
  14295. <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir2/dir1/file1</expected-output>
  14296. </comparator>
  14297. <comparator>
  14298. <type>RegexpComparator</type>
  14299. <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir2/dir1/file2</expected-output>
  14300. </comparator>
  14301. <comparator>
  14302. <type>RegexpComparator</type>
  14303. <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir2/file0</expected-output>
  14304. </comparator>
  14305. </comparators>
  14306. </test>
  14307. <test> <!-- TESTED -->
  14308. <description>chgrp: change group of multiple directories recursively in Namenode's path without globbing</description>
  14309. <test-commands>
  14310. <command>-fs NAMENODE -mkdir NAMENODE/dir0</command>
  14311. <command>-fs NAMENODE -mkdir NAMENODE/dir0/dir1</command>
  14312. <command>-fs NAMENODE -touchz NAMENODE/dir0/file0</command>
  14313. <command>-fs NAMENODE -touchz NAMENODE/dir0/dir1/file1</command>
  14314. <command>-fs NAMENODE -touchz NAMENODE/dir0/dir1/file2</command>
  14315. <command>-fs NAMENODE -mkdir NAMENODE/dir2</command>
  14316. <command>-fs NAMENODE -mkdir NAMENODE/dir2/dir1</command>
  14317. <command>-fs NAMENODE -touchz NAMENODE/dir2/file0</command>
  14318. <command>-fs NAMENODE -touchz NAMENODE/dir2/dir1/file1</command>
  14319. <command>-fs NAMENODE -touchz NAMENODE/dir2/dir1/file2</command>
  14320. <command>-fs NAMENODE -chgrp -R newgroup NAMENODE/dir0 NAMENODE/dir2</command>
  14321. <command>-fs NAMENODE -ls -R NAMENODE/dir*</command>
  14322. </test-commands>
  14323. <cleanup-commands>
  14324. <command>-fs NAMENODE -rm -r NAMENODE/dir*</command>
  14325. </cleanup-commands>
  14326. <comparators>
  14327. <comparator>
  14328. <type>RegexpComparator</type>
  14329. <expected-output>^drwxr-xr-x( )*-( )*[a-z]*( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir0/dir1</expected-output>
  14330. </comparator>
  14331. <comparator>
  14332. <type>RegexpComparator</type>
  14333. <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir0/dir1/file1</expected-output>
  14334. </comparator>
  14335. <comparator>
  14336. <type>RegexpComparator</type>
  14337. <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir0/dir1/file2</expected-output>
  14338. </comparator>
  14339. <comparator>
  14340. <type>RegexpComparator</type>
  14341. <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir0/file0</expected-output>
  14342. </comparator>
  14343. <comparator>
  14344. <type>RegexpComparator</type>
  14345. <expected-output>^drwxr-xr-x( )*-( )*[a-z]*( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir2/dir1</expected-output>
  14346. </comparator>
  14347. <comparator>
  14348. <type>RegexpComparator</type>
  14349. <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir2/dir1/file1</expected-output>
  14350. </comparator>
  14351. <comparator>
  14352. <type>RegexpComparator</type>
  14353. <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir2/dir1/file2</expected-output>
  14354. </comparator>
  14355. <comparator>
  14356. <type>RegexpComparator</type>
  14357. <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir2/file0</expected-output>
  14358. </comparator>
  14359. </comparators>
  14360. </test>
  14361. <test> <!-- TESTED -->
  14362. <description>chgrp: invalid option for group of file in Namenode's path</description>
  14363. <test-commands>
  14364. <command>-fs NAMENODE -touchz NAMENODE/file1</command>
  14365. <command>-fs NAMENODE -chgrp % NAMENODE/file1</command>
  14366. </test-commands>
  14367. <cleanup-commands>
  14368. <command>-fs NAMENODE -rm NAMENODE/file1</command>
  14369. </cleanup-commands>
  14370. <comparators>
  14371. <comparator>
  14372. <type>RegexpComparator</type>
  14373. <expected-output>^-chgrp: '%' does not match expected pattern for group</expected-output>
  14374. </comparator>
  14375. </comparators>
  14376. </test>
  14377. <test> <!--Tested -->
  14378. <description>help: help for dfsadmin report</description>
  14379. <test-commands>
  14380. <dfs-admin-command>-fs NAMENODE -help report</dfs-admin-command>
  14381. </test-commands>
  14382. <cleanup-commands>
  14383. </cleanup-commands>
  14384. <comparators>
  14385. <comparator>
  14386. <type>RegexpComparator</type>
  14387. <expected-output>^-report:( |\t)*Reports basic filesystem information and statistics.( )*</expected-output>
  14388. </comparator>
  14389. </comparators>
  14390. </test>
  14391. <test> <!--Tested -->
  14392. <description>help: help for dfsadmin safemode</description>
  14393. <test-commands>
  14394. <dfs-admin-command>-fs NAMENODE -help safemode</dfs-admin-command>
  14395. </test-commands>
  14396. <cleanup-commands>
  14397. </cleanup-commands>
  14398. <comparators>
  14399. <comparator>
  14400. <type>RegexpComparator</type>
  14401. <expected-output>^-safemode &lt;enter\|leave\|get\|wait&gt;:( |\t)*Safe mode maintenance command.( )*</expected-output>
  14402. </comparator>
  14403. <comparator>
  14404. <type>RegexpComparator</type>
  14405. <expected-output>^( |\t)*Safe mode is a Namenode state in which it( )*</expected-output>
  14406. </comparator>
  14407. <comparator>
  14408. <type>RegexpComparator</type>
  14409. <expected-output>^( |\t)*1.( )*does not accept changes to the name space \(read-only\)( )*</expected-output>
  14410. </comparator>
  14411. <comparator>
  14412. <type>RegexpComparator</type>
  14413. <expected-output>^( |\t)*2.( )*does not replicate or delete blocks.( )*</expected-output>
  14414. </comparator>
  14415. <comparator>
  14416. <type>RegexpComparator</type>
  14417. <expected-output>^( |\t)*Safe mode is entered automatically at Namenode startup, and( )*</expected-output>
  14418. </comparator>
  14419. <comparator>
  14420. <type>RegexpComparator</type>
  14421. <expected-output>^( |\t)*leaves safe mode automatically when the configured minimum( )*</expected-output>
  14422. </comparator>
  14423. <comparator>
  14424. <type>RegexpComparator</type>
  14425. <expected-output>^( |\t)*percentage of blocks satisfies the minimum replication( )*</expected-output>
  14426. </comparator>
  14427. <comparator>
  14428. <type>RegexpComparator</type>
  14429. <expected-output>^( |\t)*condition. Safe mode can also be entered manually, but then( )*</expected-output>
  14430. </comparator>
  14431. <comparator>
  14432. <type>RegexpComparator</type>
  14433. <expected-output>^( |\t)*it can only be turned off manually as well.( )*</expected-output>
  14434. </comparator>
  14435. </comparators>
  14436. </test>
  14437. <test> <!--Tested -->
  14438. <description>help: help for dfsadmin refreshNodes</description>
  14439. <test-commands>
  14440. <dfs-admin-command>-fs NAMENODE -help refreshNodes</dfs-admin-command>
  14441. </test-commands>
  14442. <cleanup-commands>
  14443. </cleanup-commands>
  14444. <comparators>
  14445. <comparator>
  14446. <type>RegexpComparator</type>
  14447. <expected-output>^-refreshNodes:( |\t)*Updates the namenode with the set of datanodes allowed to connect to the namenode.( )*</expected-output>
  14448. </comparator>
  14449. <comparator>
  14450. <type>RegexpComparator</type>
  14451. <expected-output>^( |\t)*Namenode re-reads datanode hostnames from the file defined by( )*</expected-output>
  14452. </comparator>
  14453. <comparator>
  14454. <type>RegexpComparator</type>
  14455. <expected-output>^( |\t)*dfs.hosts, dfs.hosts.exclude configuration parameters.( )*</expected-output>
  14456. </comparator>
  14457. <comparator>
  14458. <type>RegexpComparator</type>
  14459. <expected-output>^( |\t)*Hosts defined in dfs.hosts are the datanodes that are part of( )*</expected-output>
  14460. </comparator>
  14461. <comparator>
  14462. <type>RegexpComparator</type>
  14463. <expected-output>^( |\t)*the cluster. If there are entries in dfs.hosts, only the hosts( )*</expected-output>
  14464. </comparator>
  14465. <comparator>
  14466. <type>RegexpComparator</type>
  14467. <expected-output>^( |\t)*in it are allowed to register with the namenode.( )*</expected-output>
  14468. </comparator>
  14469. <comparator>
  14470. <type>RegexpComparator</type>
  14471. <expected-output>^( |\t)*Entries in dfs.hosts.exclude are datanodes that need to be( )*</expected-output>
  14472. </comparator>
  14473. <comparator>
  14474. <type>RegexpComparator</type>
  14475. <expected-output>^( |\t)*decommissioned. Datanodes complete decommissioning when ( )*</expected-output>
  14476. </comparator>
  14477. <comparator>
  14478. <type>RegexpComparator</type>
  14479. <expected-output>^( |\t)*all the replicas from them are replicated to other datanodes.( )*</expected-output>
  14480. </comparator>
  14481. <comparator>
  14482. <type>RegexpComparator</type>
  14483. <expected-output>^( |\t)*Decommissioned nodes are not automatically shutdown and( )*</expected-output>
  14484. </comparator>
  14485. <comparator>
  14486. <type>RegexpComparator</type>
  14487. <expected-output>^( |\t)*are not chosen for writing new replicas.( )*</expected-output>
  14488. </comparator>
  14489. </comparators>
  14490. </test>
  14491. <test> <!--Tested -->
  14492. <description>help: help for dfsadmin finalizeUpgrade</description>
  14493. <test-commands>
  14494. <dfs-admin-command>-fs NAMENODE -help finalizeUpgrade</dfs-admin-command>
  14495. </test-commands>
  14496. <cleanup-commands>
  14497. </cleanup-commands>
  14498. <comparators>
  14499. <comparator>
  14500. <type>RegexpComparator</type>
  14501. <expected-output>^-finalizeUpgrade:( )*Finalize upgrade of HDFS.( )*</expected-output>
  14502. </comparator>
  14503. <comparator>
  14504. <type>RegexpComparator</type>
  14505. <expected-output>^( |\t)*Datanodes delete their previous version working directories,( )*</expected-output>
  14506. </comparator>
  14507. <comparator>
  14508. <type>RegexpComparator</type>
  14509. <expected-output>^( |\t)*followed by Namenode doing the same.( )*</expected-output>
  14510. </comparator>
  14511. <comparator>
  14512. <type>RegexpComparator</type>
  14513. <expected-output>^( |\t)*This completes the upgrade process.( )*</expected-output>
  14514. </comparator>
  14515. </comparators>
  14516. </test>
  14517. <test> <!--Tested -->
  14518. <description>help: help for dfsadmin upgradeProgress</description>
  14519. <test-commands>
  14520. <dfs-admin-command>-fs NAMENODE -help upgradeProgress</dfs-admin-command>
  14521. </test-commands>
  14522. <cleanup-commands>
  14523. </cleanup-commands>
  14524. <comparators>
  14525. <comparator>
  14526. <type>RegexpComparator</type>
  14527. <expected-output>^-upgradeProgress &lt;status\|details\|force&gt;:( )*</expected-output>
  14528. </comparator>
  14529. <comparator>
  14530. <type>RegexpComparator</type>
  14531. <expected-output>^( |\t)*request current distributed upgrade status,( )*</expected-output>
  14532. </comparator>
  14533. <comparator>
  14534. <type>RegexpComparator</type>
  14535. <expected-output>^( |\t)*a detailed status or force the upgrade to proceed.( )*</expected-output>
  14536. </comparator>
  14537. </comparators>
  14538. </test>
  14539. <test> <!--Tested -->
  14540. <description>help: help for dfsadmin metasave</description>
  14541. <test-commands>
  14542. <dfs-admin-command>-fs NAMENODE -help metasave</dfs-admin-command>
  14543. </test-commands>
  14544. <cleanup-commands>
  14545. </cleanup-commands>
  14546. <comparators>
  14547. <comparator>
  14548. <type>RegexpComparator</type>
  14549. <expected-output>^-metasave &lt;filename&gt;:( |\t)*Save Namenode's primary data structures( )*</expected-output>
  14550. </comparator>
  14551. <comparator>
  14552. <type>RegexpComparator</type>
  14553. <expected-output>^( |\t)*to &lt;filename&gt; in the directory specified by hadoop.log.dir property.( )*</expected-output>
  14554. </comparator>
  14555. <comparator>
  14556. <type>RegexpComparator</type>
  14557. <expected-output>^( |\t)*&lt;filename&gt; will contain one line for each of the following( )*</expected-output>
  14558. </comparator>
  14559. <comparator>
  14560. <type>RegexpComparator</type>
  14561. <expected-output>^( |\t)*1. Datanodes heart beating with Namenode( )*</expected-output>
  14562. </comparator>
  14563. <comparator>
  14564. <type>RegexpComparator</type>
  14565. <expected-output>^( |\t)*2. Blocks waiting to be replicated( )*</expected-output>
  14566. </comparator>
  14567. <comparator>
  14568. <type>RegexpComparator</type>
  14569. <expected-output>^( |\t)*3. Blocks currrently being replicated( )*</expected-output>
  14570. </comparator>
  14571. <comparator>
  14572. <type>RegexpComparator</type>
  14573. <expected-output>^( |\t)*4. Blocks waiting to be deleted( )*</expected-output>
  14574. </comparator>
  14575. </comparators>
  14576. </test>
  14577. <test> <!--Tested -->
  14578. <description>help: help for dfsadmin setQuota</description>
  14579. <test-commands>
  14580. <dfs-admin-command>-fs NAMENODE -help setQuota</dfs-admin-command>
  14581. </test-commands>
  14582. <cleanup-commands>
  14583. </cleanup-commands>
  14584. <comparators>
  14585. <comparator>
  14586. <type>RegexpComparator</type>
  14587. <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>
  14588. </comparator>
  14589. <comparator>
  14590. <type>RegexpComparator</type>
  14591. <expected-output>^( |\t)*The directory quota is a long integer that puts a hard limit( )*</expected-output>
  14592. </comparator>
  14593. <comparator>
  14594. <type>RegexpComparator</type>
  14595. <expected-output>^( |\t)*on the number of names in the directory tree( )*</expected-output>
  14596. </comparator>
  14597. <comparator>
  14598. <type>RegexpComparator</type>
  14599. <expected-output>^( |\t)*For each directory, attempt to set the quota. An error will be reported if( )*</expected-output>
  14600. </comparator>
  14601. <comparator>
  14602. <type>RegexpComparator</type>
  14603. <expected-output>^( |\t)*1. N is not a positive integer, or( )*</expected-output>
  14604. </comparator>
  14605. <comparator>
  14606. <type>RegexpComparator</type>
  14607. <expected-output>^( |\t)*2. User is not an administrator, or( )*</expected-output>
  14608. </comparator>
  14609. <comparator>
  14610. <type>RegexpComparator</type>
  14611. <expected-output>^( |\t)*3. The directory does not exist or is a file.( )*</expected-output>
  14612. </comparator>
  14613. </comparators>
  14614. </test>
  14615. <test> <!--Tested -->
  14616. <description>help: help for dfsadmin clrQuota</description>
  14617. <test-commands>
  14618. <dfs-admin-command>-fs NAMENODE -help clrQuota</dfs-admin-command>
  14619. </test-commands>
  14620. <cleanup-commands>
  14621. </cleanup-commands>
  14622. <comparators>
  14623. <comparator>
  14624. <type>RegexpComparator</type>
  14625. <expected-output>^-clrQuota &lt;dirname&gt;...&lt;dirname&gt;: Clear the quota for each directory &lt;dirName&gt;.( )*</expected-output>
  14626. </comparator>
  14627. <comparator>
  14628. <type>RegexpComparator</type>
  14629. <expected-output>^( |\t)*For each directory, attempt to clear the quota. An error will be reported if( )*</expected-output>
  14630. </comparator>
  14631. <comparator>
  14632. <type>RegexpComparator</type>
  14633. <expected-output>^( |\t)*1. the directory does not exist or is a file, or( )*</expected-output>
  14634. </comparator>
  14635. <comparator>
  14636. <type>RegexpComparator</type>
  14637. <expected-output>^( |\t)*2. user is not an administrator.( )*</expected-output>
  14638. </comparator>
  14639. <comparator>
  14640. <type>RegexpComparator</type>
  14641. <expected-output>^( |\t)*It does not fault if the directory has no quota.( )*</expected-output>
  14642. </comparator>
  14643. </comparators>
  14644. </test>
  14645. <test> <!--Tested -->
  14646. <description>help: help for dfsadmin setSpaceQuota</description>
  14647. <test-commands>
  14648. <dfs-admin-command>-fs NAMENODE -help setSpaceQuota</dfs-admin-command>
  14649. </test-commands>
  14650. <cleanup-commands>
  14651. </cleanup-commands>
  14652. <comparators>
  14653. <comparator>
  14654. <type>RegexpComparator</type>
  14655. <expected-output>^-setSpaceQuota &lt;quota&gt; &lt;dirname&gt;...&lt;dirname&gt;: Set the disk space quota &lt;quota&gt; for each directory &lt;dirName&gt;.( )*</expected-output>
  14656. </comparator>
  14657. <comparator>
  14658. <type>RegexpComparator</type>
  14659. <expected-output>^( |\t)*The space quota is a long integer that puts a hard limit( )*</expected-output>
  14660. </comparator>
  14661. <comparator>
  14662. <type>RegexpComparator</type>
  14663. <expected-output>^( |\t)*on the total size of all the files under the directory tree.( )*</expected-output>
  14664. </comparator>
  14665. <comparator>
  14666. <type>RegexpComparator</type>
  14667. <expected-output>^( |\t)*2. user is not an administrator, or( )*</expected-output>
  14668. </comparator>
  14669. </comparators>
  14670. </test>
  14671. <test> <!--Tested -->
  14672. <description>help: help for dfsadmin clrSpaceQuota</description>
  14673. <test-commands>
  14674. <dfs-admin-command>-fs NAMENODE -help clrSpaceQuota</dfs-admin-command>
  14675. </test-commands>
  14676. <cleanup-commands>
  14677. </cleanup-commands>
  14678. <comparators>
  14679. <comparator>
  14680. <type>RegexpComparator</type>
  14681. <expected-output>^-clrSpaceQuota &lt;dirname&gt;...&lt;dirname&gt;: Clear the disk space quota for each directory &lt;dirName&gt;.( )*</expected-output>
  14682. </comparator>
  14683. <comparator>
  14684. <type>RegexpComparator</type>
  14685. <expected-output>^( |\t)*For each directory, attempt to clear the quota. An error will be reported if( )*</expected-output>
  14686. </comparator>
  14687. <comparator>
  14688. <type>RegexpComparator</type>
  14689. <expected-output>^( |\t)*1. the directory does not exist or is a file, or( )*</expected-output>
  14690. </comparator>
  14691. <comparator>
  14692. <type>RegexpComparator</type>
  14693. <expected-output>^( |\t)*2. user is not an administrator.( )*</expected-output>
  14694. </comparator>
  14695. <comparator>
  14696. <type>RegexpComparator</type>
  14697. <expected-output>^( |\t)*It does not fault if the directory has no quota.( )*</expected-output>
  14698. </comparator>
  14699. </comparators>
  14700. </test>
  14701. <test> <!--Tested -->
  14702. <description>help: help for dfsadmin refreshServiceAcl</description>
  14703. <test-commands>
  14704. <dfs-admin-command>-fs NAMENODE -help refreshServiceAcl</dfs-admin-command>
  14705. </test-commands>
  14706. <cleanup-commands>
  14707. </cleanup-commands>
  14708. <comparators>
  14709. <comparator>
  14710. <type>RegexpComparator</type>
  14711. <expected-output>^-refreshServiceAcl: Reload the service-level authorization policy file( )*</expected-output>
  14712. </comparator>
  14713. <comparator>
  14714. <type>RegexpComparator</type>
  14715. <expected-output>^( |\t)*Namenode will reload the authorization policy file.( )*</expected-output>
  14716. </comparator>
  14717. </comparators>
  14718. </test>
  14719. <test> <!--Tested -->
  14720. <description>help: help for dfsadmin help</description>
  14721. <test-commands>
  14722. <dfs-admin-command>-fs NAMENODE -help help</dfs-admin-command>
  14723. </test-commands>
  14724. <cleanup-commands>
  14725. </cleanup-commands>
  14726. <comparators>
  14727. <comparator>
  14728. <type>RegexpComparator</type>
  14729. <expected-output>^-help \[cmd\]:( |\t)*Displays help for the given command or all commands if none( )*</expected-output>
  14730. </comparator>
  14731. <comparator>
  14732. <type>RegexpComparator</type>
  14733. <expected-output>^( |\t)*is specified.( )*</expected-output>
  14734. </comparator>
  14735. </comparators>
  14736. </test>
  14737. <test> <!--Tested -->
  14738. <description>verifying error messages for quota commands - setting quota on a file</description>
  14739. <test-commands>
  14740. <command>-fs NAMENODE -mkdir /test </command>
  14741. <command>-fs NAMENODE -touchz /test/file1 </command>
  14742. <dfs-admin-command>-fs NAMENODE -setQuota 1 /test/file1 </dfs-admin-command>
  14743. </test-commands>
  14744. <cleanup-commands>
  14745. <dfs-admin-command>-fs NAMENODE -setQuota 5 /test </dfs-admin-command>
  14746. <!-- Same directory will be used in the next test -->
  14747. </cleanup-commands>
  14748. <comparators>
  14749. <comparator>
  14750. <type>SubstringComparator</type>
  14751. <expected-output>Cannot set quota on a file: /test/file1</expected-output>
  14752. </comparator>
  14753. </comparators>
  14754. </test>
  14755. <test> <!--Tested -->
  14756. <description>verifying error messages for quota commands - setting quota on non-existing file</description>
  14757. <test-commands>
  14758. <dfs-admin-command>-fs NAMENODE -setSpaceQuota 1g /test1 </dfs-admin-command>
  14759. </test-commands>
  14760. <cleanup-commands>
  14761. <!-- Same directory will be used in the next test -->
  14762. </cleanup-commands>
  14763. <comparators>
  14764. <comparator>
  14765. <type>SubstringComparator</type>
  14766. <expected-output>setSpaceQuota: Directory does not exist: /test1</expected-output>
  14767. </comparator>
  14768. </comparators>
  14769. </test>
  14770. <test> <!--Tested -->
  14771. <description>verifying error messages for quota commands - exceeding quota</description>
  14772. <test-commands>
  14773. <dfs-admin-command>-fs NAMENODE -setQuota 3 /test </dfs-admin-command>
  14774. <command>-fs NAMENODE -touchz /test/file0 </command>
  14775. <command>-fs NAMENODE -mkdir /test/test1 </command>
  14776. </test-commands>
  14777. <cleanup-commands>
  14778. <!-- Same directory(/test) will be used in the next test -->
  14779. </cleanup-commands>
  14780. <comparators>
  14781. <comparator>
  14782. <type>SubstringComparator</type>
  14783. <expected-output>The NameSpace quota (directories and files) of directory /test is exceeded</expected-output>
  14784. </comparator>
  14785. </comparators>
  14786. </test>
  14787. <test> <!--Tested -->
  14788. <description>verifying error messages for quota commands - setting not valid quota</description>
  14789. <test-commands>
  14790. <dfs-admin-command>-fs NAMENODE -setQuota 0 /test </dfs-admin-command>
  14791. </test-commands>
  14792. <cleanup-commands>
  14793. <!-- Same directory will be used in the next test -->
  14794. </cleanup-commands>
  14795. <comparators>
  14796. <comparator>
  14797. <type>SubstringComparator</type>
  14798. <expected-output>Invalid values for quota : 0</expected-output>
  14799. </comparator>
  14800. </comparators>
  14801. </test>
  14802. <test> <!--Tested -->
  14803. <description>verifying error messages for quota commands - setting not valid space quota</description>
  14804. <test-commands>
  14805. <dfs-admin-command>-fs NAMENODE -setSpaceQuota a5 /test </dfs-admin-command>
  14806. </test-commands>
  14807. <cleanup-commands>
  14808. <!-- Same directory will be used in the next test -->
  14809. </cleanup-commands>
  14810. <comparators>
  14811. <comparator>
  14812. <type>SubstringComparator</type>
  14813. <expected-output>For input string: "a5"</expected-output>
  14814. </comparator>
  14815. </comparators>
  14816. </test>
  14817. <test> <!--Tested -->
  14818. <description>verifying error messages for quota commands - clearQuota on non existing file</description>
  14819. <test-commands>
  14820. <dfs-admin-command>-fs NAMENODE -clrQuota /test1 </dfs-admin-command>
  14821. </test-commands>
  14822. <cleanup-commands>
  14823. <command>-fs NAMENODE -rm -r /test </command>
  14824. </cleanup-commands>
  14825. <comparators>
  14826. <comparator>
  14827. <type>SubstringComparator</type>
  14828. <expected-output>clrQuota: Directory does not exist: /test1</expected-output>
  14829. </comparator>
  14830. </comparators>
  14831. </test>
  14832. <test> <!--Tested -->
  14833. <description>verifying error messages for quota commands - using globing</description>
  14834. <test-commands>
  14835. <command>-fs NAMENODE -mkdir /dir1</command>
  14836. <command>-fs NAMENODE -mkdir /dir2</command>
  14837. <command>-fs NAMENODE -mkdir /dir3</command>
  14838. <dfs-admin-command>-fs NAMENODE -setSpaceQuota 1k /dir* </dfs-admin-command>
  14839. <command>-fs NAMENODE -put CLITEST_DATA/data15bytes /dir1/</command>
  14840. </test-commands>
  14841. <cleanup-commands>
  14842. <command>-fs NAMENODE -rm -r /dir* </command>
  14843. </cleanup-commands>
  14844. <comparators>
  14845. <comparator>
  14846. <type>RegexpComparator</type>
  14847. <expected-output>put: The DiskSpace quota of /dir1 is exceeded: quota=1.0k diskspace consumed=[0-9.]+[kmg]*</expected-output>
  14848. </comparator>
  14849. </comparators>
  14850. </test>
  14851. <test> <!--Tested -->
  14852. <description>verifying error messages for quota commands - setting quota using globing</description>
  14853. <test-commands>
  14854. <command>-fs NAMENODE -mkdir /dir1</command>
  14855. <command>-fs NAMENODE -mkdir /dir2</command>
  14856. <command>-fs NAMENODE -mkdir /dir3</command>
  14857. <dfs-admin-command>-fs NAMENODE -setQuota 1 /dir* </dfs-admin-command>
  14858. <command>-fs NAMENODE -mkdir /dir1/dir4</command>
  14859. </test-commands>
  14860. <cleanup-commands>
  14861. <command>-fs NAMENODE -rm -r /dir* </command>
  14862. </cleanup-commands>
  14863. <comparators>
  14864. <comparator>
  14865. <type>SubstringComparator</type>
  14866. <expected-output>mkdir: The NameSpace quota (directories and files) of directory /dir1 is exceeded: quota=1 file count=2</expected-output>
  14867. </comparator>
  14868. </comparators>
  14869. </test>
  14870. <test> <!--Tested -->
  14871. <description>refreshServiceAcl: refreshing security authorization policy for namenode</description>
  14872. <test-commands>
  14873. <dfs-admin-command>-fs NAMENODE -refreshServiceAcl </dfs-admin-command>
  14874. </test-commands>
  14875. <cleanup-commands>
  14876. <!-- No cleanup -->
  14877. </cleanup-commands>
  14878. <comparators>
  14879. <comparator>
  14880. <type>ExactComparator</type>
  14881. <expected-output></expected-output>
  14882. </comparator>
  14883. </comparators>
  14884. </test><!--
  14885. <test> Tested
  14886. <description>refreshServiceAcl: verifying error message while refreshing security authorization policy for namenode</description>
  14887. <test-commands>
  14888. hadoop-policy.xml for tests has
  14889. security.refresh.policy.protocol.acl = ${user.name}
  14890. <dfs-admin-command>-fs NAMENODE -Dhadoop.job.ugi=blah,blah -refreshServiceAcl </dfs-admin-command>
  14891. </test-commands>
  14892. <cleanup-commands>
  14893. No cleanup
  14894. </cleanup-commands>
  14895. <comparators>
  14896. <comparator>
  14897. <type>SubstringComparator</type>
  14898. <expected-output>access denied</expected-output>
  14899. </comparator>
  14900. </comparators>
  14901. </test>
  14902. --><!-- Test for safemode -->
  14903. <test> <!-- TESTED -->
  14904. <description>safemode: Test for enter - Namenode is not in safemode</description>
  14905. <test-commands>
  14906. <dfs-admin-command>-fs NAMENODE -safemode enter</dfs-admin-command>
  14907. </test-commands>
  14908. <cleanup-commands>
  14909. <dfs-admin-command>-fs NAMENODE -safemode leave</dfs-admin-command>
  14910. </cleanup-commands>
  14911. <comparators>
  14912. <comparator>
  14913. <type>TokenComparator</type>
  14914. <expected-output>Safe mode is ON</expected-output>
  14915. </comparator>
  14916. </comparators>
  14917. </test>
  14918. <test> <!-- TESTED -->
  14919. <description>safemode: Test for enter - Namenode is already in safemode</description>
  14920. <test-commands>
  14921. <dfs-admin-command>-fs NAMENODE -safemode enter</dfs-admin-command>
  14922. <dfs-admin-command>-fs NAMENODE -safemode enter</dfs-admin-command>
  14923. </test-commands>
  14924. <cleanup-commands>
  14925. <dfs-admin-command>-fs NAMENODE -safemode leave</dfs-admin-command>
  14926. </cleanup-commands>
  14927. <comparators>
  14928. <comparator>
  14929. <type>TokenComparator</type>
  14930. <expected-output>Safe mode is ON</expected-output>
  14931. </comparator>
  14932. </comparators>
  14933. </test>
  14934. <test> <!-- TESTED -->
  14935. <description>safemode: Test for leave - Namenode is already in safemode</description>
  14936. <test-commands>
  14937. <dfs-admin-command>-fs NAMENODE -safemode enter</dfs-admin-command>
  14938. <dfs-admin-command>-fs NAMENODE -safemode leave</dfs-admin-command>
  14939. </test-commands>
  14940. <cleanup-commands>
  14941. <!-- No cleanup -->
  14942. </cleanup-commands>
  14943. <comparators>
  14944. <comparator>
  14945. <type>TokenComparator</type>
  14946. <expected-output>Safe mode is OFF</expected-output>
  14947. </comparator>
  14948. </comparators>
  14949. </test>
  14950. <test> <!-- TESTED -->
  14951. <description>safemode: Test for leave - Namenode is not in safemode</description>
  14952. <test-commands>
  14953. <dfs-admin-command>-fs NAMENODE -safemode leave</dfs-admin-command>
  14954. </test-commands>
  14955. <cleanup-commands>
  14956. <!-- No cleanup -->
  14957. </cleanup-commands>
  14958. <comparators>
  14959. <comparator>
  14960. <type>TokenComparator</type>
  14961. <expected-output>Safe mode is OFF</expected-output>
  14962. </comparator>
  14963. </comparators>
  14964. </test>
  14965. <test> <!-- TESTED -->
  14966. <description>safemode: Test for get - Namenode is not in safemode</description>
  14967. <test-commands>
  14968. <dfs-admin-command>-fs NAMENODE -safemode leave</dfs-admin-command>
  14969. <dfs-admin-command>-fs NAMENODE -safemode get</dfs-admin-command>
  14970. </test-commands>
  14971. <cleanup-commands>
  14972. <!-- No cleanup -->
  14973. </cleanup-commands>
  14974. <comparators>
  14975. <comparator>
  14976. <type>TokenComparator</type>
  14977. <expected-output>Safe mode is OFF</expected-output>
  14978. </comparator>
  14979. </comparators>
  14980. </test>
  14981. <test> <!-- TESTED -->
  14982. <description>safemode:Test for get - Namenode is already in safemode</description>
  14983. <test-commands>
  14984. <dfs-admin-command>-fs NAMENODE -safemode enter</dfs-admin-command>
  14985. <dfs-admin-command>-fs NAMENODE -safemode get</dfs-admin-command>
  14986. </test-commands>
  14987. <cleanup-commands>
  14988. <dfs-admin-command>-fs NAMENODE -safemode leave</dfs-admin-command>
  14989. </cleanup-commands>
  14990. <comparators>
  14991. <comparator>
  14992. <type>TokenComparator</type>
  14993. <expected-output>Safe mode is ON</expected-output>
  14994. </comparator>
  14995. </comparators>
  14996. </test>
  14997. <test> <!-- TESTED -->
  14998. <description>safemode: Test for wait - Namenode is not in safemode</description>
  14999. <test-commands>
  15000. <dfs-admin-command>-fs NAMENODE -safemode leave</dfs-admin-command>
  15001. <dfs-admin-command>-fs NAMENODE -safemode wait</dfs-admin-command>
  15002. </test-commands>
  15003. <cleanup-commands>
  15004. <!-- No cleanup -->
  15005. </cleanup-commands>
  15006. <comparators>
  15007. <comparator>
  15008. <type>TokenComparator</type>
  15009. <expected-output>Safe mode is OFF</expected-output>
  15010. </comparator>
  15011. </comparators>
  15012. </test>
  15013. <test> <!-- TESTED -->
  15014. <description>safemode: Test for wait - Namenode is already in safemode</description>
  15015. <test-commands>
  15016. <dfs-admin-command>-fs NAMENODE -safemode enter</dfs-admin-command>
  15017. <dfs-admin-command>-fs NAMENODE -safemode wait &amp;</dfs-admin-command>
  15018. <dfs-admin-command>-fs NAMENODE -safemode leave</dfs-admin-command>
  15019. </test-commands>
  15020. <cleanup-commands>
  15021. <!-- No cleanup -->
  15022. </cleanup-commands>
  15023. <comparators>
  15024. <comparator>
  15025. <type>TokenComparator</type>
  15026. <expected-output>Safe mode is OFF</expected-output>
  15027. </comparator>
  15028. </comparators>
  15029. </test>
  15030. <!-- Test for report -->
  15031. <test> <!-- TESTED -->
  15032. <description>report: Displays the report about the Datanodes</description>
  15033. <test-commands>
  15034. <dfs-admin-command>-fs NAMENODE -report</dfs-admin-command>
  15035. </test-commands>
  15036. <cleanup-commands>
  15037. <!-- no cleanup cmd -->
  15038. </cleanup-commands>
  15039. <comparators>
  15040. <comparator>
  15041. <type>RegexpComparator</type>
  15042. <expected-output>Configured Capacity: [0-9]+ \([0-9]+\.[0-9]+ [BKMGT]+\)</expected-output>
  15043. </comparator>
  15044. <comparator>
  15045. <type>RegexpComparator</type>
  15046. <expected-output>Present Capacity: [0-9]+ \([0-9\.]+ [BKMGT]+\)</expected-output>
  15047. </comparator>
  15048. <comparator>
  15049. <type>RegexpComparator</type>
  15050. <expected-output>DFS Remaining: [0-9]+ \([0-9\.]+ [BKMGT]+\)</expected-output>
  15051. </comparator>
  15052. <comparator>
  15053. <type>RegexpComparator</type>
  15054. <expected-output>DFS Used: [0-9]+ \([0-9\.]+ [BKMGT]+\)</expected-output>
  15055. </comparator>
  15056. <comparator>
  15057. <type>RegexpComparator</type>
  15058. <expected-output>DFS Used\%: [0-9\.]+%</expected-output>
  15059. </comparator>
  15060. <comparator>
  15061. <type>RegexpComparator</type>
  15062. <expected-output>Datanodes available: [0-9]+ \([0-9]+ total, [0-9]+ dead\)</expected-output>
  15063. </comparator>
  15064. <comparator>
  15065. <type>RegexpComparator</type>
  15066. <expected-output>Name: [0-9\.:]+ \([-.a-zA-z0-9\.]+\)</expected-output>
  15067. </comparator>
  15068. <comparator>
  15069. <type>RegexpComparator</type>
  15070. <expected-output>Decommission Status : [a-zA-Z]+</expected-output>
  15071. </comparator>
  15072. <comparator>
  15073. <type>RegexpComparator</type>
  15074. <expected-output>Non DFS Used: [0-9]+ \([0-9\.]+ [BKMGT]+\)</expected-output>
  15075. </comparator>
  15076. <comparator>
  15077. <type>RegexpComparator</type>
  15078. <expected-output>DFS Remaining%: [0-9\.]+%</expected-output>
  15079. </comparator>
  15080. <comparator>
  15081. <type>RegexpComparator</type>
  15082. <expected-output>Last contact: [a-zA-Z]+ [a-zA-Z]+ [0-9]+ [0-9:]+ [A-Z\-\+\:0-9]+ [0-9]+</expected-output>
  15083. </comparator>
  15084. <comparator>
  15085. <type>TokenComparator</type>
  15086. <expected-output>Live datanodes:</expected-output>
  15087. </comparator>
  15088. </comparators>
  15089. </test>
  15090. <!-- Test for saveNamespace -->
  15091. <test> <!-- TESTED -->
  15092. <description>saveNamespace: to save the namespace when safemode is ON</description>
  15093. <test-commands>
  15094. <dfs-admin-command>-fs NAMENODE -safemode enter</dfs-admin-command>
  15095. <dfs-admin-command>-fs NAMENODE -saveNamespace</dfs-admin-command>
  15096. </test-commands>
  15097. <cleanup-commands>
  15098. <dfs-admin-command>-fs NAMENODE -safemode leave</dfs-admin-command>
  15099. </cleanup-commands>
  15100. <comparators>
  15101. <comparator>
  15102. <type>ExactComparator</type>
  15103. <expected-output></expected-output>
  15104. </comparator>
  15105. </comparators>
  15106. </test>
  15107. <test> <!-- TESTED -->
  15108. <description>saveNamespace: to save the namespace when safemode is OFF</description>
  15109. <test-commands>
  15110. <dfs-admin-command>-fs NAMENODE -safemode leave</dfs-admin-command>
  15111. <dfs-admin-command>-fs NAMENODE -saveNamespace</dfs-admin-command>
  15112. </test-commands>
  15113. <cleanup-commands>
  15114. <dfs-admin-command>-fs NAMENODE -safemode leave</dfs-admin-command>
  15115. </cleanup-commands>
  15116. <comparators>
  15117. <comparator>
  15118. <type>TokenComparator</type>
  15119. <expected-output>saveNamespace: Safe mode should be turned ON in order to create namespace image.</expected-output>
  15120. </comparator>
  15121. </comparators>
  15122. </test>
  15123. <!-- Test for refreshNodes -->
  15124. <test> <!-- TESTED -->
  15125. <description>refreshNodes: to refresh the nodes</description>
  15126. <test-commands>
  15127. <dfs-admin-command>-fs NAMENODE -refreshNodes</dfs-admin-command>
  15128. <dfs-admin-command>-fs NAMENODE -report</dfs-admin-command>
  15129. </test-commands>
  15130. <cleanup-commands>
  15131. <!-- no cleanup -->
  15132. </cleanup-commands>
  15133. <comparators>
  15134. <comparator>
  15135. <type>RegexpComparator</type>
  15136. <expected-output>Configured Capacity: [0-9]+ \([0-9]+\.[0-9]+ [BKMGT]+\)</expected-output>
  15137. </comparator>
  15138. <comparator>
  15139. <type>RegexpComparator</type>
  15140. <expected-output>Present Capacity: [0-9]+ \([0-9\.]+ [BKMGT]+\)</expected-output>
  15141. </comparator>
  15142. <comparator>
  15143. <type>RegexpComparator</type>
  15144. <expected-output>DFS Remaining: [0-9]+ \([0-9\.]+ [BKMGT]+\)</expected-output>
  15145. </comparator>
  15146. <comparator>
  15147. <type>RegexpComparator</type>
  15148. <expected-output>DFS Used: [0-9]+ \([0-9\.]+ [BKMGT]+\)</expected-output>
  15149. </comparator>
  15150. <comparator>
  15151. <type>RegexpComparator</type>
  15152. <expected-output>DFS Used\%: [0-9\.]+%</expected-output>
  15153. </comparator>
  15154. <comparator>
  15155. <type>RegexpComparator</type>
  15156. <expected-output>Datanodes available: [0-9]+ \([0-9]+ total, [0-9]+ dead\)</expected-output>
  15157. </comparator>
  15158. <comparator>
  15159. <type>RegexpComparator</type>
  15160. <expected-output>Name: [0-9\.:]+ \([-.a-zA-z0-9\.]+\)</expected-output>
  15161. </comparator>
  15162. <comparator>
  15163. <type>RegexpComparator</type>
  15164. <expected-output>Decommission Status : [a-zA-Z]+</expected-output>
  15165. </comparator>
  15166. <comparator>
  15167. <type>RegexpComparator</type>
  15168. <expected-output>Non DFS Used: [0-9]+ \([0-9\.]+ [BKMGT]+\)</expected-output>
  15169. </comparator>
  15170. <comparator>
  15171. <type>RegexpComparator</type>
  15172. <expected-output>DFS Remaining%: [0-9\.]+%</expected-output>
  15173. </comparator>
  15174. <comparator>
  15175. <type>RegexpComparator</type>
  15176. <expected-output>Last contact: [a-zA-Z]+ [a-zA-Z]+ [0-9]+ [0-9:]+ [A-Z\-\+\:0-9]+ [0-9]+</expected-output>
  15177. </comparator>
  15178. <comparator>
  15179. <type>TokenComparator</type>
  15180. <expected-output>Live datanodes:</expected-output>
  15181. </comparator>
  15182. </comparators>
  15183. </test>
  15184. <!-- Test for metasave -->
  15185. <test> <!-- TESTED -->
  15186. <description>metasave: to save metadata</description>
  15187. <test-commands>
  15188. <dfs-admin-command>-fs NAMENODE -metasave metafile</dfs-admin-command>
  15189. </test-commands>
  15190. <cleanup-commands>
  15191. <!-- No cleanup -->
  15192. </cleanup-commands>
  15193. <comparators>
  15194. <comparator>
  15195. <type>RegexpComparator</type>
  15196. <expected-output>Created file metafile on server hdfs:\/\/[-.a-zA-Z0-9\.:]+</expected-output>
  15197. </comparator>
  15198. </comparators>
  15199. </test>
  15200. <!-- Test for clrSpacequota -->
  15201. <test> <!-- TESTED -->
  15202. <description>clrSpaceQuota: Namenode is already in safemode</description>
  15203. <test-commands>
  15204. <command>-fs NAMENODE -mkdir test</command>
  15205. <dfs-admin-command>-fs NAMENODE -setSpaceQuota 15 test</dfs-admin-command>
  15206. <dfs-admin-command>-fs NAMENODE -clrSpaceQuota test</dfs-admin-command>
  15207. </test-commands>
  15208. <cleanup-commands>
  15209. <command>-fs NAMENODE -rm -r test</command>
  15210. </cleanup-commands>
  15211. <comparators>
  15212. <comparator>
  15213. <type>ExactComparator</type>
  15214. <expected-output></expected-output>
  15215. </comparator>
  15216. </comparators>
  15217. </test>
  15218. <test> <!-- Tested -->
  15219. <description>printTopology: verifying that the topology map is what we expect</description>
  15220. <test-commands>
  15221. <dfs-admin-command>-fs NAMENODE -printTopology</dfs-admin-command>
  15222. </test-commands>
  15223. <cleanup-commands>
  15224. <!-- No cleanup -->
  15225. </cleanup-commands>
  15226. <comparators>
  15227. <!-- miniDFS cluster started in CLITestHelper is set to match this output -->
  15228. <comparator>
  15229. <type>RegexpAcrossOutputComparator</type>
  15230. <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>
  15231. </comparator>
  15232. <comparator>
  15233. <type>RegexpAcrossOutputComparator</type>
  15234. <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>
  15235. </comparator>
  15236. <comparator>
  15237. <type>RegexpAcrossOutputComparator</type>
  15238. <expected-output>Rack: \/rack3\s*127\.0\.0\.1:\d+\s\([-.a-zA-Z0-9]+\)</expected-output>
  15239. </comparator>
  15240. <comparator>
  15241. <type>RegexpAcrossOutputComparator</type>
  15242. <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>
  15243. </comparator>
  15244. </comparators>
  15245. </test>
  15246. <!-- Tests for moveFromLocal -->
  15247. <test> <!-- TESTED -->
  15248. <description>moveFromLocal: moving non existent file(absolute path)</description>
  15249. <test-commands>
  15250. <command>-fs NAMENODE -moveFromLocal /user/wrongdata file</command>
  15251. </test-commands>
  15252. <cleanup-commands>
  15253. <command>-fs NAMENODE -rm -r /user</command>
  15254. </cleanup-commands>
  15255. <comparators>
  15256. <comparator>
  15257. <type>TokenComparator</type>
  15258. <expected-output>moveFromLocal: `/user/wrongdata': No such file or directory</expected-output>
  15259. </comparator>
  15260. </comparators>
  15261. </test>
  15262. <test> <!-- TESTED -->
  15263. <description>moveFromLocal: moving non existent file(relative path)</description>
  15264. <test-commands>
  15265. <command>-fs NAMENODE -touchz test</command>
  15266. <command>-fs NAMENODE -moveFromLocal wrongdata file</command>
  15267. </test-commands>
  15268. <cleanup-commands>
  15269. <command>-fs NAMENODE -rm -r /user</command>
  15270. </cleanup-commands>
  15271. <comparators>
  15272. <comparator>
  15273. <type>TokenComparator</type>
  15274. <expected-output>moveFromLocal: `wrongdata': No such file or directory</expected-output>
  15275. </comparator>
  15276. </comparators>
  15277. </test>
  15278. <test> <!-- TESTED -->
  15279. <description>moveFromLocal: moving many files into an existing file</description>
  15280. <test-commands>
  15281. <command>-fs NAMENODE -moveFromLocal CLITEST_DATA/data15bytes /data15bytes</command>
  15282. <command>-fs NAMENODE -moveFromLocal CLITEST_DATA/data30bytes /data30bytes</command>
  15283. <command>-fs NAMENODE -touchz file0</command>
  15284. <command>-fs NAMENODE -moveFromLocal /data15bytes /data30bytes file0</command>
  15285. </test-commands>
  15286. <cleanup-commands>
  15287. <command>-fs NAMENODE -rm -r /user</command>
  15288. </cleanup-commands>
  15289. <comparators>
  15290. <comparator>
  15291. <type>RegexpComparator</type>
  15292. <expected-output>^moveFromLocal: `file0': Is not a directory</expected-output>
  15293. </comparator>
  15294. </comparators>
  15295. </test>
  15296. <test> <!-- TESTED -->
  15297. <description>moveFromLocal: moving many files into a non existent directory</description>
  15298. <test-commands>
  15299. <command>-fs NAMENODE -moveFromLocal CLITEST_DATA/data15bytes /data15bytes</command>
  15300. <command>-fs NAMENODE -moveFromLocal CLITEST_DATA/data30bytes /data30bytes</command>
  15301. <command>-fs NAMENODE -moveFromLocal /data15bytes /data30bytes wrongdir</command>
  15302. </test-commands>
  15303. <cleanup-commands>
  15304. <command>-fs NAMENODE -rm -r /user</command>
  15305. </cleanup-commands>
  15306. <comparators>
  15307. <comparator>
  15308. <type>RegexpComparator</type>
  15309. <expected-output>^moveFromLocal: `wrongdir': No such file or directory</expected-output>
  15310. </comparator>
  15311. </comparators>
  15312. </test>
  15313. <test> <!-- TESTED -->
  15314. <description>moveFromLocal: Test for hdfs:// path - moving non existent file</description>
  15315. <test-commands>
  15316. <command>-fs NAMENODE -moveFromLocal /user/wrongdata hdfs:///file</command>
  15317. </test-commands>
  15318. <cleanup-commands>
  15319. <command>-fs NAMENODE -rm -r hdfs:///*</command>
  15320. </cleanup-commands>
  15321. <comparators>
  15322. <comparator>
  15323. <type>TokenComparator</type>
  15324. <expected-output>moveFromLocal: `/user/wrongdata': No such file or directory</expected-output>
  15325. </comparator>
  15326. </comparators>
  15327. </test>
  15328. <test> <!-- TESTED -->
  15329. <description>moveFromLocal: Test for hdfs:// path - moving many files into an existing file</description>
  15330. <test-commands>
  15331. <command>-fs NAMENODE -touchz hdfs:///file0</command>
  15332. <command>-fs NAMENODE -moveFromLocal CLITEST_DATA/data15bytes CLITEST_DATA/data30bytes hdfs:///file0</command>
  15333. </test-commands>
  15334. <cleanup-commands>
  15335. <command>-fs NAMENODE -rm -r hdfs:///*</command>
  15336. </cleanup-commands>
  15337. <comparators>
  15338. <comparator>
  15339. <type>RegexpComparator</type>
  15340. <expected-output>^moveFromLocal: `hdfs:///file0': Is not a directory</expected-output>
  15341. </comparator>
  15342. </comparators>
  15343. </test>
  15344. <test> <!-- TESTED -->
  15345. <description>moveFromLocal: Test for hdfs:// path - moving many files into a non existent directory</description>
  15346. <test-commands>
  15347. <command>-fs NAMENODE -moveFromLocal CLITEST_DATA/data15bytes CLITEST_DATA/data30bytes hdfs:///wrongdir</command>
  15348. </test-commands>
  15349. <cleanup-commands>
  15350. <command>-fs NAMENODE -rm -r /user</command>
  15351. </cleanup-commands>
  15352. <comparators>
  15353. <comparator>
  15354. <type>RegexpComparator</type>
  15355. <expected-output>^moveFromLocal: `hdfs:///wrongdir': No such file or directory</expected-output>
  15356. </comparator>
  15357. </comparators>
  15358. </test>
  15359. <test> <!-- TESTED -->
  15360. <description>moveFromLocal: Test for Namenode's path - moving non existent file</description>
  15361. <test-commands>
  15362. <command>-fs NAMENODE -moveFromLocal /user/wrongdata NAMENODE/file</command>
  15363. </test-commands>
  15364. <cleanup-commands>
  15365. <command>-fs NAMENODE -rm -r NAMENODE/*</command>
  15366. </cleanup-commands>
  15367. <comparators>
  15368. <comparator>
  15369. <type>TokenComparator</type>
  15370. <expected-output>moveFromLocal: `/user/wrongdata': No such file or directory</expected-output>
  15371. </comparator>
  15372. </comparators>
  15373. </test>
  15374. <test> <!-- TESTED -->
  15375. <description>moveFromLocal: Test for Namenode's path - moving many files into an existing file</description>
  15376. <test-commands>
  15377. <command>-fs NAMENODE -touchz NAMENODE/file0</command>
  15378. <command>-fs NAMENODE -moveFromLocal CLITEST_DATA/data15bytes CLITEST_DATA/data30bytes NAMENODE/file0</command>
  15379. </test-commands>
  15380. <cleanup-commands>
  15381. <command>-fs NAMENODE -rm -r NAMENODE/*</command>
  15382. </cleanup-commands>
  15383. <comparators>
  15384. <comparator>
  15385. <type>RegexpComparator</type>
  15386. <expected-output>^moveFromLocal: `hdfs://\w+[-.a-z0-9]*:[0-9]+/file0': Is not a directory</expected-output>
  15387. </comparator>
  15388. </comparators>
  15389. </test>
  15390. <test> <!-- TESTED -->
  15391. <description>moveFromLocal: Test for Namenode's path - moving many files into a non existent directory</description>
  15392. <test-commands>
  15393. <command>-fs NAMENODE -moveFromLocal CLITEST_DATA/data15bytes CLITEST_DATA/data30bytes NAMENODE/wrongdir</command>
  15394. </test-commands>
  15395. <cleanup-commands>
  15396. <command>-fs NAMENODE -rm -r /user</command>
  15397. </cleanup-commands>
  15398. <comparators>
  15399. <comparator>
  15400. <type>RegexpComparator</type>
  15401. <expected-output>^moveFromLocal: `hdfs://\w+[-.a-z0-9]*:[0-9]+/wrongdir': No such file or directory</expected-output>
  15402. </comparator>
  15403. </comparators>
  15404. </test>
  15405. <test> <!--Tested -->
  15406. <description>Verifying chmod operation is not permitted in safemode</description>
  15407. <test-commands>
  15408. <command>-fs NAMENODE -mkdir /test </command>
  15409. <command>-fs NAMENODE -touchz /test/file1 </command>
  15410. <dfs-admin-command>-fs NAMENODE -safemode enter </dfs-admin-command>
  15411. <command>-fs NAMENODE -chmod 777 /test/file1 </command>
  15412. </test-commands>
  15413. <cleanup-commands>
  15414. <dfs-admin-command>-fs NAMENODE -safemode leave </dfs-admin-command>
  15415. <dfs-admin-command>-fs NAMENODE -rm -r /test </dfs-admin-command>
  15416. </cleanup-commands>
  15417. <comparators>
  15418. <comparator>
  15419. <type>SubstringComparator</type>
  15420. <expected-output>Cannot set permission for /test/file1. Name node is in safe mode.</expected-output>
  15421. </comparator>
  15422. </comparators>
  15423. </test>
  15424. <test> <!--Tested -->
  15425. <description>Verifying chown operation is not permitted in safemode</description>
  15426. <test-commands>
  15427. <command>-fs NAMENODE -mkdir /test </command>
  15428. <command>-fs NAMENODE -touchz /test/file1 </command>
  15429. <dfs-admin-command>-fs NAMENODE -safemode enter </dfs-admin-command>
  15430. <command>-fs NAMENODE -chown newgroup /test/file1 </command>
  15431. </test-commands>
  15432. <cleanup-commands>
  15433. <dfs-admin-command>-fs NAMENODE -safemode leave </dfs-admin-command>
  15434. <dfs-admin-command>-fs NAMENODE -rm -r /test </dfs-admin-command>
  15435. </cleanup-commands>
  15436. <comparators>
  15437. <comparator>
  15438. <type>SubstringComparator</type>
  15439. <expected-output>Cannot set owner for /test/file1. Name node is in safe mode.</expected-output>
  15440. </comparator>
  15441. </comparators>
  15442. </test>
  15443. <test> <!--Tested -->
  15444. <description>Verifying chgrp operation is not permitted in safemode</description>
  15445. <test-commands>
  15446. <command>-fs NAMENODE -mkdir /test </command>
  15447. <command>-fs NAMENODE -touchz /test/file1 </command>
  15448. <dfs-admin-command>-fs NAMENODE -safemode enter </dfs-admin-command>
  15449. <command>-fs NAMENODE -chgrp newgroup /test/file1 </command>
  15450. </test-commands>
  15451. <cleanup-commands>
  15452. <dfs-admin-command>-fs NAMENODE -safemode leave </dfs-admin-command>
  15453. <dfs-admin-command>-fs NAMENODE -rm -r /test </dfs-admin-command>
  15454. </cleanup-commands>
  15455. <comparators>
  15456. <comparator>
  15457. <type>SubstringComparator</type>
  15458. <expected-output>Cannot set owner for /test/file1. Name node is in safe mode.</expected-output>
  15459. </comparator>
  15460. </comparators>
  15461. </test>
  15462. <test> <!--Tested -->
  15463. <description>Verifying setQuota operation is not permitted in safemode</description>
  15464. <test-commands>
  15465. <command>-fs NAMENODE -mkdir /test </command>
  15466. <dfs-admin-command>-fs NAMENODE -safemode enter </dfs-admin-command>
  15467. <dfs-admin-command>-fs NAMENODE -setQuota 100 /test </dfs-admin-command>
  15468. </test-commands>
  15469. <cleanup-commands>
  15470. <dfs-admin-command>-fs NAMENODE -safemode leave </dfs-admin-command>
  15471. <dfs-admin-command>-fs NAMENODE -rm -r /test </dfs-admin-command>
  15472. </cleanup-commands>
  15473. <comparators>
  15474. <comparator>
  15475. <type>SubstringComparator</type>
  15476. <expected-output>setQuota: Cannot set quota on /test. Name node is in safe mode.</expected-output>
  15477. </comparator>
  15478. </comparators>
  15479. </test>
  15480. <test> <!--Tested -->
  15481. <description>Verifying clrQuota operation is not permitted in safemode</description>
  15482. <test-commands>
  15483. <command>-fs NAMENODE -mkdir /test </command>
  15484. <dfs-admin-command>-fs NAMENODE -safemode enter </dfs-admin-command>
  15485. <dfs-admin-command>-fs NAMENODE -clrQuota /test </dfs-admin-command>
  15486. </test-commands>
  15487. <cleanup-commands>
  15488. <dfs-admin-command>-fs NAMENODE -safemode leave </dfs-admin-command>
  15489. <dfs-admin-command>-fs NAMENODE -rm -r /test </dfs-admin-command>
  15490. </cleanup-commands>
  15491. <comparators>
  15492. <comparator>
  15493. <type>SubstringComparator</type>
  15494. <expected-output>clrQuota: Cannot set quota on /test. Name node is in safe mode.</expected-output>
  15495. </comparator>
  15496. </comparators>
  15497. </test>
  15498. <test> <!--Tested -->
  15499. <description>Verifying setSpaceQuota operation is not permitted in safemode</description>
  15500. <test-commands>
  15501. <command>-fs NAMENODE -mkdir /test </command>
  15502. <dfs-admin-command>-fs NAMENODE -safemode enter </dfs-admin-command>
  15503. <dfs-admin-command>-fs NAMENODE -setSpaceQuota 100 /test </dfs-admin-command>
  15504. </test-commands>
  15505. <cleanup-commands>
  15506. <dfs-admin-command>-fs NAMENODE -safemode leave </dfs-admin-command>
  15507. <dfs-admin-command>-fs NAMENODE -rm -r /test </dfs-admin-command>
  15508. </cleanup-commands>
  15509. <comparators>
  15510. <comparator>
  15511. <type>SubstringComparator</type>
  15512. <expected-output>setSpaceQuota: Cannot set quota on /test. Name node is in safe mode.</expected-output>
  15513. </comparator>
  15514. </comparators>
  15515. </test>
  15516. <test> <!--Tested -->
  15517. <description>Verifying clrSpaceQuota operation is not permitted in safemode</description>
  15518. <test-commands>
  15519. <command>-fs NAMENODE -mkdir /test </command>
  15520. <dfs-admin-command>-fs NAMENODE -safemode enter </dfs-admin-command>
  15521. <dfs-admin-command>-fs NAMENODE -clrSpaceQuota /test </dfs-admin-command>
  15522. </test-commands>
  15523. <cleanup-commands>
  15524. <dfs-admin-command>-fs NAMENODE -safemode leave </dfs-admin-command>
  15525. <dfs-admin-command>-fs NAMENODE -rm -r /test </dfs-admin-command>
  15526. </cleanup-commands>
  15527. <comparators>
  15528. <comparator>
  15529. <type>SubstringComparator</type>
  15530. <expected-output>clrSpaceQuota: Cannot set quota on /test. Name node is in safe mode.</expected-output>
  15531. </comparator>
  15532. </comparators>
  15533. </test>
  15534. </tests>
  15535. </configuration>