testHDFSConf.xml 770 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488348934903491349234933494349534963497349834993500350135023503350435053506350735083509351035113512351335143515351635173518351935203521352235233524352535263527352835293530353135323533353435353536353735383539354035413542354335443545354635473548354935503551355235533554355535563557355835593560356135623563356435653566356735683569357035713572357335743575357635773578357935803581358235833584358535863587358835893590359135923593359435953596359735983599360036013602360336043605360636073608360936103611361236133614361536163617361836193620362136223623362436253626362736283629363036313632363336343635363636373638363936403641364236433644364536463647364836493650365136523653365436553656365736583659366036613662366336643665366636673668366936703671367236733674367536763677367836793680368136823683368436853686368736883689369036913692369336943695369636973698369937003701370237033704370537063707370837093710371137123713371437153716371737183719372037213722372337243725372637273728372937303731373237333734373537363737373837393740374137423743374437453746374737483749375037513752375337543755375637573758375937603761376237633764376537663767376837693770377137723773377437753776377737783779378037813782378337843785378637873788378937903791379237933794379537963797379837993800380138023803380438053806380738083809381038113812381338143815381638173818381938203821382238233824382538263827382838293830383138323833383438353836383738383839384038413842384338443845384638473848384938503851385238533854385538563857385838593860386138623863386438653866386738683869387038713872387338743875387638773878387938803881388238833884388538863887388838893890389138923893389438953896389738983899390039013902390339043905390639073908390939103911391239133914391539163917391839193920392139223923392439253926392739283929393039313932393339343935393639373938393939403941394239433944394539463947394839493950395139523953395439553956395739583959396039613962396339643965396639673968396939703971397239733974397539763977397839793980398139823983398439853986398739883989399039913992399339943995399639973998399940004001400240034004400540064007400840094010401140124013401440154016401740184019402040214022402340244025402640274028402940304031403240334034403540364037403840394040404140424043404440454046404740484049405040514052405340544055405640574058405940604061406240634064406540664067406840694070407140724073407440754076407740784079408040814082408340844085408640874088408940904091409240934094409540964097409840994100410141024103410441054106410741084109411041114112411341144115411641174118411941204121412241234124412541264127412841294130413141324133413441354136413741384139414041414142414341444145414641474148414941504151415241534154415541564157415841594160416141624163416441654166416741684169417041714172417341744175417641774178417941804181418241834184418541864187418841894190419141924193419441954196419741984199420042014202420342044205420642074208420942104211421242134214421542164217421842194220422142224223422442254226422742284229423042314232423342344235423642374238423942404241424242434244424542464247424842494250425142524253425442554256425742584259426042614262426342644265426642674268426942704271427242734274427542764277427842794280428142824283428442854286428742884289429042914292429342944295429642974298429943004301430243034304430543064307430843094310431143124313431443154316431743184319432043214322432343244325432643274328432943304331433243334334433543364337433843394340434143424343434443454346434743484349435043514352435343544355435643574358435943604361436243634364436543664367436843694370437143724373437443754376437743784379438043814382438343844385438643874388438943904391439243934394439543964397439843994400440144024403440444054406440744084409441044114412441344144415441644174418441944204421442244234424442544264427442844294430443144324433443444354436443744384439444044414442444344444445444644474448444944504451445244534454445544564457445844594460446144624463446444654466446744684469447044714472447344744475447644774478447944804481448244834484448544864487448844894490449144924493449444954496449744984499450045014502450345044505450645074508450945104511451245134514451545164517451845194520452145224523452445254526452745284529453045314532453345344535453645374538453945404541454245434544454545464547454845494550455145524553455445554556455745584559456045614562456345644565456645674568456945704571457245734574457545764577457845794580458145824583458445854586458745884589459045914592459345944595459645974598459946004601460246034604460546064607460846094610461146124613461446154616461746184619462046214622462346244625462646274628462946304631463246334634463546364637463846394640464146424643464446454646464746484649465046514652465346544655465646574658465946604661466246634664466546664667466846694670467146724673467446754676467746784679468046814682468346844685468646874688468946904691469246934694469546964697469846994700470147024703470447054706470747084709471047114712471347144715471647174718471947204721472247234724472547264727472847294730473147324733473447354736473747384739474047414742474347444745474647474748474947504751475247534754475547564757475847594760476147624763476447654766476747684769477047714772477347744775477647774778477947804781478247834784478547864787478847894790479147924793479447954796479747984799480048014802480348044805480648074808480948104811481248134814481548164817481848194820482148224823482448254826482748284829483048314832483348344835483648374838483948404841484248434844484548464847484848494850485148524853485448554856485748584859486048614862486348644865486648674868486948704871487248734874487548764877487848794880488148824883488448854886488748884889489048914892489348944895489648974898489949004901490249034904490549064907490849094910491149124913491449154916491749184919492049214922492349244925492649274928492949304931493249334934493549364937493849394940494149424943494449454946494749484949495049514952495349544955495649574958495949604961496249634964496549664967496849694970497149724973497449754976497749784979498049814982498349844985498649874988498949904991499249934994499549964997499849995000500150025003500450055006500750085009501050115012501350145015501650175018501950205021502250235024502550265027502850295030503150325033503450355036503750385039504050415042504350445045504650475048504950505051505250535054505550565057505850595060506150625063506450655066506750685069507050715072507350745075507650775078507950805081508250835084508550865087508850895090509150925093509450955096509750985099510051015102510351045105510651075108510951105111511251135114511551165117511851195120512151225123512451255126512751285129513051315132513351345135513651375138513951405141514251435144514551465147514851495150515151525153515451555156515751585159516051615162516351645165516651675168516951705171517251735174517551765177517851795180518151825183518451855186518751885189519051915192519351945195519651975198519952005201520252035204520552065207520852095210521152125213521452155216521752185219522052215222522352245225522652275228522952305231523252335234523552365237523852395240524152425243524452455246524752485249525052515252525352545255525652575258525952605261526252635264526552665267526852695270527152725273527452755276527752785279528052815282528352845285528652875288528952905291529252935294529552965297529852995300530153025303530453055306530753085309531053115312531353145315531653175318531953205321532253235324532553265327532853295330533153325333533453355336533753385339534053415342534353445345534653475348534953505351535253535354535553565357535853595360536153625363536453655366536753685369537053715372537353745375537653775378537953805381538253835384538553865387538853895390539153925393539453955396539753985399540054015402540354045405540654075408540954105411541254135414541554165417541854195420542154225423542454255426542754285429543054315432543354345435543654375438543954405441544254435444544554465447544854495450545154525453545454555456545754585459546054615462546354645465546654675468546954705471547254735474547554765477547854795480548154825483548454855486548754885489549054915492549354945495549654975498549955005501550255035504550555065507550855095510551155125513551455155516551755185519552055215522552355245525552655275528552955305531553255335534553555365537553855395540554155425543554455455546554755485549555055515552555355545555555655575558555955605561556255635564556555665567556855695570557155725573557455755576557755785579558055815582558355845585558655875588558955905591559255935594559555965597559855995600560156025603560456055606560756085609561056115612561356145615561656175618561956205621562256235624562556265627562856295630563156325633563456355636563756385639564056415642564356445645564656475648564956505651565256535654565556565657565856595660566156625663566456655666566756685669567056715672567356745675567656775678567956805681568256835684568556865687568856895690569156925693569456955696569756985699570057015702570357045705570657075708570957105711571257135714571557165717571857195720572157225723572457255726572757285729573057315732573357345735573657375738573957405741574257435744574557465747574857495750575157525753575457555756575757585759576057615762576357645765576657675768576957705771577257735774577557765777577857795780578157825783578457855786578757885789579057915792579357945795579657975798579958005801580258035804580558065807580858095810581158125813581458155816581758185819582058215822582358245825582658275828582958305831583258335834583558365837583858395840584158425843584458455846584758485849585058515852585358545855585658575858585958605861586258635864586558665867586858695870587158725873587458755876587758785879588058815882588358845885588658875888588958905891589258935894589558965897589858995900590159025903590459055906590759085909591059115912591359145915591659175918591959205921592259235924592559265927592859295930593159325933593459355936593759385939594059415942594359445945594659475948594959505951595259535954595559565957595859595960596159625963596459655966596759685969597059715972597359745975597659775978597959805981598259835984598559865987598859895990599159925993599459955996599759985999600060016002600360046005600660076008600960106011601260136014601560166017601860196020602160226023602460256026602760286029603060316032603360346035603660376038603960406041604260436044604560466047604860496050605160526053605460556056605760586059606060616062606360646065606660676068606960706071607260736074607560766077607860796080608160826083608460856086608760886089609060916092609360946095609660976098609961006101610261036104610561066107610861096110611161126113611461156116611761186119612061216122612361246125612661276128612961306131613261336134613561366137613861396140614161426143614461456146614761486149615061516152615361546155615661576158615961606161616261636164616561666167616861696170617161726173617461756176617761786179618061816182618361846185618661876188618961906191619261936194619561966197619861996200620162026203620462056206620762086209621062116212621362146215621662176218621962206221622262236224622562266227622862296230623162326233623462356236623762386239624062416242624362446245624662476248624962506251625262536254625562566257625862596260626162626263626462656266626762686269627062716272627362746275627662776278627962806281628262836284628562866287628862896290629162926293629462956296629762986299630063016302630363046305630663076308630963106311631263136314631563166317631863196320632163226323632463256326632763286329633063316332633363346335633663376338633963406341634263436344634563466347634863496350635163526353635463556356635763586359636063616362636363646365636663676368636963706371637263736374637563766377637863796380638163826383638463856386638763886389639063916392639363946395639663976398639964006401640264036404640564066407640864096410641164126413641464156416641764186419642064216422642364246425642664276428642964306431643264336434643564366437643864396440644164426443644464456446644764486449645064516452645364546455645664576458645964606461646264636464646564666467646864696470647164726473647464756476647764786479648064816482648364846485648664876488648964906491649264936494649564966497649864996500650165026503650465056506650765086509651065116512651365146515651665176518651965206521652265236524652565266527652865296530653165326533653465356536653765386539654065416542654365446545654665476548654965506551655265536554655565566557655865596560656165626563656465656566656765686569657065716572657365746575657665776578657965806581658265836584658565866587658865896590659165926593659465956596659765986599660066016602660366046605660666076608660966106611661266136614661566166617661866196620662166226623662466256626662766286629663066316632663366346635663666376638663966406641664266436644664566466647664866496650665166526653665466556656665766586659666066616662666366646665666666676668666966706671667266736674667566766677667866796680668166826683668466856686668766886689669066916692669366946695669666976698669967006701670267036704670567066707670867096710671167126713671467156716671767186719672067216722672367246725672667276728672967306731673267336734673567366737673867396740674167426743674467456746674767486749675067516752675367546755675667576758675967606761676267636764676567666767676867696770677167726773677467756776677767786779678067816782678367846785678667876788678967906791679267936794679567966797679867996800680168026803680468056806680768086809681068116812681368146815681668176818681968206821682268236824682568266827682868296830683168326833683468356836683768386839684068416842684368446845684668476848684968506851685268536854685568566857685868596860686168626863686468656866686768686869687068716872687368746875687668776878687968806881688268836884688568866887688868896890689168926893689468956896689768986899690069016902690369046905690669076908690969106911691269136914691569166917691869196920692169226923692469256926692769286929693069316932693369346935693669376938693969406941694269436944694569466947694869496950695169526953695469556956695769586959696069616962696369646965696669676968696969706971697269736974697569766977697869796980698169826983698469856986698769886989699069916992699369946995699669976998699970007001700270037004700570067007700870097010701170127013701470157016701770187019702070217022702370247025702670277028702970307031703270337034703570367037703870397040704170427043704470457046704770487049705070517052705370547055705670577058705970607061706270637064706570667067706870697070707170727073707470757076707770787079708070817082708370847085708670877088708970907091709270937094709570967097709870997100710171027103710471057106710771087109711071117112711371147115711671177118711971207121712271237124712571267127712871297130713171327133713471357136713771387139714071417142714371447145714671477148714971507151715271537154715571567157715871597160716171627163716471657166716771687169717071717172717371747175717671777178717971807181718271837184718571867187718871897190719171927193719471957196719771987199720072017202720372047205720672077208720972107211721272137214721572167217721872197220722172227223722472257226722772287229723072317232723372347235723672377238723972407241724272437244724572467247724872497250725172527253725472557256725772587259726072617262726372647265726672677268726972707271727272737274727572767277727872797280728172827283728472857286728772887289729072917292729372947295729672977298729973007301730273037304730573067307730873097310731173127313731473157316731773187319732073217322732373247325732673277328732973307331733273337334733573367337733873397340734173427343734473457346734773487349735073517352735373547355735673577358735973607361736273637364736573667367736873697370737173727373737473757376737773787379738073817382738373847385738673877388738973907391739273937394739573967397739873997400740174027403740474057406740774087409741074117412741374147415741674177418741974207421742274237424742574267427742874297430743174327433743474357436743774387439744074417442744374447445744674477448744974507451745274537454745574567457745874597460746174627463746474657466746774687469747074717472747374747475747674777478747974807481748274837484748574867487748874897490749174927493749474957496749774987499750075017502750375047505750675077508750975107511751275137514751575167517751875197520752175227523752475257526752775287529753075317532753375347535753675377538753975407541754275437544754575467547754875497550755175527553755475557556755775587559756075617562756375647565756675677568756975707571757275737574757575767577757875797580758175827583758475857586758775887589759075917592759375947595759675977598759976007601760276037604760576067607760876097610761176127613761476157616761776187619762076217622762376247625762676277628762976307631763276337634763576367637763876397640764176427643764476457646764776487649765076517652765376547655765676577658765976607661766276637664766576667667766876697670767176727673767476757676767776787679768076817682768376847685768676877688768976907691769276937694769576967697769876997700770177027703770477057706770777087709771077117712771377147715771677177718771977207721772277237724772577267727772877297730773177327733773477357736773777387739774077417742774377447745774677477748774977507751775277537754775577567757775877597760776177627763776477657766776777687769777077717772777377747775777677777778777977807781778277837784778577867787778877897790779177927793779477957796779777987799780078017802780378047805780678077808780978107811781278137814781578167817781878197820782178227823782478257826782778287829783078317832783378347835783678377838783978407841784278437844784578467847784878497850785178527853785478557856785778587859786078617862786378647865786678677868786978707871787278737874787578767877787878797880788178827883788478857886788778887889789078917892789378947895789678977898789979007901790279037904790579067907790879097910791179127913791479157916791779187919792079217922792379247925792679277928792979307931793279337934793579367937793879397940794179427943794479457946794779487949795079517952795379547955795679577958795979607961796279637964796579667967796879697970797179727973797479757976797779787979798079817982798379847985798679877988798979907991799279937994799579967997799879998000800180028003800480058006800780088009801080118012801380148015801680178018801980208021802280238024802580268027802880298030803180328033803480358036803780388039804080418042804380448045804680478048804980508051805280538054805580568057805880598060806180628063806480658066806780688069807080718072807380748075807680778078807980808081808280838084808580868087808880898090809180928093809480958096809780988099810081018102810381048105810681078108810981108111811281138114811581168117811881198120812181228123812481258126812781288129813081318132813381348135813681378138813981408141814281438144814581468147814881498150815181528153815481558156815781588159816081618162816381648165816681678168816981708171817281738174817581768177817881798180818181828183818481858186818781888189819081918192819381948195819681978198819982008201820282038204820582068207820882098210821182128213821482158216821782188219822082218222822382248225822682278228822982308231823282338234823582368237823882398240824182428243824482458246824782488249825082518252825382548255825682578258825982608261826282638264826582668267826882698270827182728273827482758276827782788279828082818282828382848285828682878288828982908291829282938294829582968297829882998300830183028303830483058306830783088309831083118312831383148315831683178318831983208321832283238324832583268327832883298330833183328333833483358336833783388339834083418342834383448345834683478348834983508351835283538354835583568357835883598360836183628363836483658366836783688369837083718372837383748375837683778378837983808381838283838384838583868387838883898390839183928393839483958396839783988399840084018402840384048405840684078408840984108411841284138414841584168417841884198420842184228423842484258426842784288429843084318432843384348435843684378438843984408441844284438444844584468447844884498450845184528453845484558456845784588459846084618462846384648465846684678468846984708471847284738474847584768477847884798480848184828483848484858486848784888489849084918492849384948495849684978498849985008501850285038504850585068507850885098510851185128513851485158516851785188519852085218522852385248525852685278528852985308531853285338534853585368537853885398540854185428543854485458546854785488549855085518552855385548555855685578558855985608561856285638564856585668567856885698570857185728573857485758576857785788579858085818582858385848585858685878588858985908591859285938594859585968597859885998600860186028603860486058606860786088609861086118612861386148615861686178618861986208621862286238624862586268627862886298630863186328633863486358636863786388639864086418642864386448645864686478648864986508651865286538654865586568657865886598660866186628663866486658666866786688669867086718672867386748675867686778678867986808681868286838684868586868687868886898690869186928693869486958696869786988699870087018702870387048705870687078708870987108711871287138714871587168717871887198720872187228723872487258726872787288729873087318732873387348735873687378738873987408741874287438744874587468747874887498750875187528753875487558756875787588759876087618762876387648765876687678768876987708771877287738774877587768777877887798780878187828783878487858786878787888789879087918792879387948795879687978798879988008801880288038804880588068807880888098810881188128813881488158816881788188819882088218822882388248825882688278828882988308831883288338834883588368837883888398840884188428843884488458846884788488849885088518852885388548855885688578858885988608861886288638864886588668867886888698870887188728873887488758876887788788879888088818882888388848885888688878888888988908891889288938894889588968897889888998900890189028903890489058906890789088909891089118912891389148915891689178918891989208921892289238924892589268927892889298930893189328933893489358936893789388939894089418942894389448945894689478948894989508951895289538954895589568957895889598960896189628963896489658966896789688969897089718972897389748975897689778978897989808981898289838984898589868987898889898990899189928993899489958996899789988999900090019002900390049005900690079008900990109011901290139014901590169017901890199020902190229023902490259026902790289029903090319032903390349035903690379038903990409041904290439044904590469047904890499050905190529053905490559056905790589059906090619062906390649065906690679068906990709071907290739074907590769077907890799080908190829083908490859086908790889089909090919092909390949095909690979098909991009101910291039104910591069107910891099110911191129113911491159116911791189119912091219122912391249125912691279128912991309131913291339134913591369137913891399140914191429143914491459146914791489149915091519152915391549155915691579158915991609161916291639164916591669167916891699170917191729173917491759176917791789179918091819182918391849185918691879188918991909191919291939194919591969197919891999200920192029203920492059206920792089209921092119212921392149215921692179218921992209221922292239224922592269227922892299230923192329233923492359236923792389239924092419242924392449245924692479248924992509251925292539254925592569257925892599260926192629263926492659266926792689269927092719272927392749275927692779278927992809281928292839284928592869287928892899290929192929293929492959296929792989299930093019302930393049305930693079308930993109311931293139314931593169317931893199320932193229323932493259326932793289329933093319332933393349335933693379338933993409341934293439344934593469347934893499350935193529353935493559356935793589359936093619362936393649365936693679368936993709371937293739374937593769377937893799380938193829383938493859386938793889389939093919392939393949395939693979398939994009401940294039404940594069407940894099410941194129413941494159416941794189419942094219422942394249425942694279428942994309431943294339434943594369437943894399440944194429443944494459446944794489449945094519452945394549455945694579458945994609461946294639464946594669467946894699470947194729473947494759476947794789479948094819482948394849485948694879488948994909491949294939494949594969497949894999500950195029503950495059506950795089509951095119512951395149515951695179518951995209521952295239524952595269527952895299530953195329533953495359536953795389539954095419542954395449545954695479548954995509551955295539554955595569557955895599560956195629563956495659566956795689569957095719572957395749575957695779578957995809581958295839584958595869587958895899590959195929593959495959596959795989599960096019602960396049605960696079608960996109611961296139614961596169617961896199620962196229623962496259626962796289629963096319632963396349635963696379638963996409641964296439644964596469647964896499650965196529653965496559656965796589659966096619662966396649665966696679668966996709671967296739674967596769677967896799680968196829683968496859686968796889689969096919692969396949695969696979698969997009701970297039704970597069707970897099710971197129713971497159716971797189719972097219722972397249725972697279728972997309731973297339734973597369737973897399740974197429743974497459746974797489749975097519752975397549755975697579758975997609761976297639764976597669767976897699770977197729773977497759776977797789779978097819782978397849785978697879788978997909791979297939794979597969797979897999800980198029803980498059806980798089809981098119812981398149815981698179818981998209821982298239824982598269827982898299830983198329833983498359836983798389839984098419842984398449845984698479848984998509851985298539854985598569857985898599860986198629863986498659866986798689869987098719872987398749875987698779878987998809881988298839884988598869887988898899890989198929893989498959896989798989899990099019902990399049905990699079908990999109911991299139914991599169917991899199920992199229923992499259926992799289929993099319932993399349935993699379938993999409941994299439944994599469947994899499950995199529953995499559956995799589959996099619962996399649965996699679968996999709971997299739974997599769977997899799980998199829983998499859986998799889989999099919992999399949995999699979998999910000100011000210003100041000510006100071000810009100101001110012100131001410015100161001710018100191002010021100221002310024100251002610027100281002910030100311003210033100341003510036100371003810039100401004110042100431004410045100461004710048100491005010051100521005310054100551005610057100581005910060100611006210063100641006510066100671006810069100701007110072100731007410075100761007710078100791008010081100821008310084100851008610087100881008910090100911009210093100941009510096100971009810099101001010110102101031010410105101061010710108101091011010111101121011310114101151011610117101181011910120101211012210123101241012510126101271012810129101301013110132101331013410135101361013710138101391014010141101421014310144101451014610147101481014910150101511015210153101541015510156101571015810159101601016110162101631016410165101661016710168101691017010171101721017310174101751017610177101781017910180101811018210183101841018510186101871018810189101901019110192101931019410195101961019710198101991020010201102021020310204102051020610207102081020910210102111021210213102141021510216102171021810219102201022110222102231022410225102261022710228102291023010231102321023310234102351023610237102381023910240102411024210243102441024510246102471024810249102501025110252102531025410255102561025710258102591026010261102621026310264102651026610267102681026910270102711027210273102741027510276102771027810279102801028110282102831028410285102861028710288102891029010291102921029310294102951029610297102981029910300103011030210303103041030510306103071030810309103101031110312103131031410315103161031710318103191032010321103221032310324103251032610327103281032910330103311033210333103341033510336103371033810339103401034110342103431034410345103461034710348103491035010351103521035310354103551035610357103581035910360103611036210363103641036510366103671036810369103701037110372103731037410375103761037710378103791038010381103821038310384103851038610387103881038910390103911039210393103941039510396103971039810399104001040110402104031040410405104061040710408104091041010411104121041310414104151041610417104181041910420104211042210423104241042510426104271042810429104301043110432104331043410435104361043710438104391044010441104421044310444104451044610447104481044910450104511045210453104541045510456104571045810459104601046110462104631046410465104661046710468104691047010471104721047310474104751047610477104781047910480104811048210483104841048510486104871048810489104901049110492104931049410495104961049710498104991050010501105021050310504105051050610507105081050910510105111051210513105141051510516105171051810519105201052110522105231052410525105261052710528105291053010531105321053310534105351053610537105381053910540105411054210543105441054510546105471054810549105501055110552105531055410555105561055710558105591056010561105621056310564105651056610567105681056910570105711057210573105741057510576105771057810579105801058110582105831058410585105861058710588105891059010591105921059310594105951059610597105981059910600106011060210603106041060510606106071060810609106101061110612106131061410615106161061710618106191062010621106221062310624106251062610627106281062910630106311063210633106341063510636106371063810639106401064110642106431064410645106461064710648106491065010651106521065310654106551065610657106581065910660106611066210663106641066510666106671066810669106701067110672106731067410675106761067710678106791068010681106821068310684106851068610687106881068910690106911069210693106941069510696106971069810699107001070110702107031070410705107061070710708107091071010711107121071310714107151071610717107181071910720107211072210723107241072510726107271072810729107301073110732107331073410735107361073710738107391074010741107421074310744107451074610747107481074910750107511075210753107541075510756107571075810759107601076110762107631076410765107661076710768107691077010771107721077310774107751077610777107781077910780107811078210783107841078510786107871078810789107901079110792107931079410795107961079710798107991080010801108021080310804108051080610807108081080910810108111081210813108141081510816108171081810819108201082110822108231082410825108261082710828108291083010831108321083310834108351083610837108381083910840108411084210843108441084510846108471084810849108501085110852108531085410855108561085710858108591086010861108621086310864108651086610867108681086910870108711087210873108741087510876108771087810879108801088110882108831088410885108861088710888108891089010891108921089310894108951089610897108981089910900109011090210903109041090510906109071090810909109101091110912109131091410915109161091710918109191092010921109221092310924109251092610927109281092910930109311093210933109341093510936109371093810939109401094110942109431094410945109461094710948109491095010951109521095310954109551095610957109581095910960109611096210963109641096510966109671096810969109701097110972109731097410975109761097710978109791098010981109821098310984109851098610987109881098910990109911099210993109941099510996109971099810999110001100111002110031100411005110061100711008110091101011011110121101311014110151101611017110181101911020110211102211023110241102511026110271102811029110301103111032110331103411035110361103711038110391104011041110421104311044110451104611047110481104911050110511105211053110541105511056110571105811059110601106111062110631106411065110661106711068110691107011071110721107311074110751107611077110781107911080110811108211083110841108511086110871108811089110901109111092110931109411095110961109711098110991110011101111021110311104111051110611107111081110911110111111111211113111141111511116111171111811119111201112111122111231112411125111261112711128111291113011131111321113311134111351113611137111381113911140111411114211143111441114511146111471114811149111501115111152111531115411155111561115711158111591116011161111621116311164111651116611167111681116911170111711117211173111741117511176111771117811179111801118111182111831118411185111861118711188111891119011191111921119311194111951119611197111981119911200112011120211203112041120511206112071120811209112101121111212112131121411215112161121711218112191122011221112221122311224112251122611227112281122911230112311123211233112341123511236112371123811239112401124111242112431124411245112461124711248112491125011251112521125311254112551125611257112581125911260112611126211263112641126511266112671126811269112701127111272112731127411275112761127711278112791128011281112821128311284112851128611287112881128911290112911129211293112941129511296112971129811299113001130111302113031130411305113061130711308113091131011311113121131311314113151131611317113181131911320113211132211323113241132511326113271132811329113301133111332113331133411335113361133711338113391134011341113421134311344113451134611347113481134911350113511135211353113541135511356113571135811359113601136111362113631136411365113661136711368113691137011371113721137311374113751137611377113781137911380113811138211383113841138511386113871138811389113901139111392113931139411395113961139711398113991140011401114021140311404114051140611407114081140911410114111141211413114141141511416114171141811419114201142111422114231142411425114261142711428114291143011431114321143311434114351143611437114381143911440114411144211443114441144511446114471144811449114501145111452114531145411455114561145711458114591146011461114621146311464114651146611467114681146911470114711147211473114741147511476114771147811479114801148111482114831148411485114861148711488114891149011491114921149311494114951149611497114981149911500115011150211503115041150511506115071150811509115101151111512115131151411515115161151711518115191152011521115221152311524115251152611527115281152911530115311153211533115341153511536115371153811539115401154111542115431154411545115461154711548115491155011551115521155311554115551155611557115581155911560115611156211563115641156511566115671156811569115701157111572115731157411575115761157711578115791158011581115821158311584115851158611587115881158911590115911159211593115941159511596115971159811599116001160111602116031160411605116061160711608116091161011611116121161311614116151161611617116181161911620116211162211623116241162511626116271162811629116301163111632116331163411635116361163711638116391164011641116421164311644116451164611647116481164911650116511165211653116541165511656116571165811659116601166111662116631166411665116661166711668116691167011671116721167311674116751167611677116781167911680116811168211683116841168511686116871168811689116901169111692116931169411695116961169711698116991170011701117021170311704117051170611707117081170911710117111171211713117141171511716117171171811719117201172111722117231172411725117261172711728117291173011731117321173311734117351173611737117381173911740117411174211743117441174511746117471174811749117501175111752117531175411755117561175711758117591176011761117621176311764117651176611767117681176911770117711177211773117741177511776117771177811779117801178111782117831178411785117861178711788117891179011791117921179311794117951179611797117981179911800118011180211803118041180511806118071180811809118101181111812118131181411815118161181711818118191182011821118221182311824118251182611827118281182911830118311183211833118341183511836118371183811839118401184111842118431184411845118461184711848118491185011851118521185311854118551185611857118581185911860118611186211863118641186511866118671186811869118701187111872118731187411875118761187711878118791188011881118821188311884118851188611887118881188911890118911189211893118941189511896118971189811899119001190111902119031190411905119061190711908119091191011911119121191311914119151191611917119181191911920119211192211923119241192511926119271192811929119301193111932119331193411935119361193711938119391194011941119421194311944119451194611947119481194911950119511195211953119541195511956119571195811959119601196111962119631196411965119661196711968119691197011971119721197311974119751197611977119781197911980119811198211983119841198511986119871198811989119901199111992119931199411995119961199711998119991200012001120021200312004120051200612007120081200912010120111201212013120141201512016120171201812019120201202112022120231202412025120261202712028120291203012031120321203312034120351203612037120381203912040120411204212043120441204512046120471204812049120501205112052120531205412055120561205712058120591206012061120621206312064120651206612067120681206912070120711207212073120741207512076120771207812079120801208112082120831208412085120861208712088120891209012091120921209312094120951209612097120981209912100121011210212103121041210512106121071210812109121101211112112121131211412115121161211712118121191212012121121221212312124121251212612127121281212912130121311213212133121341213512136121371213812139121401214112142121431214412145121461214712148121491215012151121521215312154121551215612157121581215912160121611216212163121641216512166121671216812169121701217112172121731217412175121761217712178121791218012181121821218312184121851218612187121881218912190121911219212193121941219512196121971219812199122001220112202122031220412205122061220712208122091221012211122121221312214122151221612217122181221912220122211222212223122241222512226122271222812229122301223112232122331223412235122361223712238122391224012241122421224312244122451224612247122481224912250122511225212253122541225512256122571225812259122601226112262122631226412265122661226712268122691227012271122721227312274122751227612277122781227912280122811228212283122841228512286122871228812289122901229112292122931229412295122961229712298122991230012301123021230312304123051230612307123081230912310123111231212313123141231512316123171231812319123201232112322123231232412325123261232712328123291233012331123321233312334123351233612337123381233912340123411234212343123441234512346123471234812349123501235112352123531235412355123561235712358123591236012361123621236312364123651236612367123681236912370123711237212373123741237512376123771237812379123801238112382123831238412385123861238712388123891239012391123921239312394123951239612397123981239912400124011240212403124041240512406124071240812409124101241112412124131241412415124161241712418124191242012421124221242312424124251242612427124281242912430124311243212433124341243512436124371243812439124401244112442124431244412445124461244712448124491245012451124521245312454124551245612457124581245912460124611246212463124641246512466124671246812469124701247112472124731247412475124761247712478124791248012481124821248312484124851248612487124881248912490124911249212493124941249512496124971249812499125001250112502125031250412505125061250712508125091251012511125121251312514125151251612517125181251912520125211252212523125241252512526125271252812529125301253112532125331253412535125361253712538125391254012541125421254312544125451254612547125481254912550125511255212553125541255512556125571255812559125601256112562125631256412565125661256712568125691257012571125721257312574125751257612577125781257912580125811258212583125841258512586125871258812589125901259112592125931259412595125961259712598125991260012601126021260312604126051260612607126081260912610126111261212613126141261512616126171261812619126201262112622126231262412625126261262712628126291263012631126321263312634126351263612637126381263912640126411264212643126441264512646126471264812649126501265112652126531265412655126561265712658126591266012661126621266312664126651266612667126681266912670126711267212673126741267512676126771267812679126801268112682126831268412685126861268712688126891269012691126921269312694126951269612697126981269912700127011270212703127041270512706127071270812709127101271112712127131271412715127161271712718127191272012721127221272312724127251272612727127281272912730127311273212733127341273512736127371273812739127401274112742127431274412745127461274712748127491275012751127521275312754127551275612757127581275912760127611276212763127641276512766127671276812769127701277112772127731277412775127761277712778127791278012781127821278312784127851278612787127881278912790127911279212793127941279512796127971279812799128001280112802128031280412805128061280712808128091281012811128121281312814128151281612817128181281912820128211282212823128241282512826128271282812829128301283112832128331283412835128361283712838128391284012841128421284312844128451284612847128481284912850128511285212853128541285512856128571285812859128601286112862128631286412865128661286712868128691287012871128721287312874128751287612877128781287912880128811288212883128841288512886128871288812889128901289112892128931289412895128961289712898128991290012901129021290312904129051290612907129081290912910129111291212913129141291512916129171291812919129201292112922129231292412925129261292712928129291293012931129321293312934129351293612937129381293912940129411294212943129441294512946129471294812949129501295112952129531295412955129561295712958129591296012961129621296312964129651296612967129681296912970129711297212973129741297512976129771297812979129801298112982129831298412985129861298712988129891299012991129921299312994129951299612997129981299913000130011300213003130041300513006130071300813009130101301113012130131301413015130161301713018130191302013021130221302313024130251302613027130281302913030130311303213033130341303513036130371303813039130401304113042130431304413045130461304713048130491305013051130521305313054130551305613057130581305913060130611306213063130641306513066130671306813069130701307113072130731307413075130761307713078130791308013081130821308313084130851308613087130881308913090130911309213093130941309513096130971309813099131001310113102131031310413105131061310713108131091311013111131121311313114131151311613117131181311913120131211312213123131241312513126131271312813129131301313113132131331313413135131361313713138131391314013141131421314313144131451314613147131481314913150131511315213153131541315513156131571315813159131601316113162131631316413165131661316713168131691317013171131721317313174131751317613177131781317913180131811318213183131841318513186131871318813189131901319113192131931319413195131961319713198131991320013201132021320313204132051320613207132081320913210132111321213213132141321513216132171321813219132201322113222132231322413225132261322713228132291323013231132321323313234132351323613237132381323913240132411324213243132441324513246132471324813249132501325113252132531325413255132561325713258132591326013261132621326313264132651326613267132681326913270132711327213273132741327513276132771327813279132801328113282132831328413285132861328713288132891329013291132921329313294132951329613297132981329913300133011330213303133041330513306133071330813309133101331113312133131331413315133161331713318133191332013321133221332313324133251332613327133281332913330133311333213333133341333513336133371333813339133401334113342133431334413345133461334713348133491335013351133521335313354133551335613357133581335913360133611336213363133641336513366133671336813369133701337113372133731337413375133761337713378133791338013381133821338313384133851338613387133881338913390133911339213393133941339513396133971339813399134001340113402134031340413405134061340713408134091341013411134121341313414134151341613417134181341913420134211342213423134241342513426134271342813429134301343113432134331343413435134361343713438134391344013441134421344313444134451344613447134481344913450134511345213453134541345513456134571345813459134601346113462134631346413465134661346713468134691347013471134721347313474134751347613477134781347913480134811348213483134841348513486134871348813489134901349113492134931349413495134961349713498134991350013501135021350313504135051350613507135081350913510135111351213513135141351513516135171351813519135201352113522135231352413525135261352713528135291353013531135321353313534135351353613537135381353913540135411354213543135441354513546135471354813549135501355113552135531355413555135561355713558135591356013561135621356313564135651356613567135681356913570135711357213573135741357513576135771357813579135801358113582135831358413585135861358713588135891359013591135921359313594135951359613597135981359913600136011360213603136041360513606136071360813609136101361113612136131361413615136161361713618136191362013621136221362313624136251362613627136281362913630136311363213633136341363513636136371363813639136401364113642136431364413645136461364713648136491365013651136521365313654136551365613657136581365913660136611366213663136641366513666136671366813669136701367113672136731367413675136761367713678136791368013681136821368313684136851368613687136881368913690136911369213693136941369513696136971369813699137001370113702137031370413705137061370713708137091371013711137121371313714137151371613717137181371913720137211372213723137241372513726137271372813729137301373113732137331373413735137361373713738137391374013741137421374313744137451374613747137481374913750137511375213753137541375513756137571375813759137601376113762137631376413765137661376713768137691377013771137721377313774137751377613777137781377913780137811378213783137841378513786137871378813789137901379113792137931379413795137961379713798137991380013801138021380313804138051380613807138081380913810138111381213813138141381513816138171381813819138201382113822138231382413825138261382713828138291383013831138321383313834138351383613837138381383913840138411384213843138441384513846138471384813849138501385113852138531385413855138561385713858138591386013861138621386313864138651386613867138681386913870138711387213873138741387513876138771387813879138801388113882138831388413885138861388713888138891389013891138921389313894138951389613897138981389913900139011390213903139041390513906139071390813909139101391113912139131391413915139161391713918139191392013921139221392313924139251392613927139281392913930139311393213933139341393513936139371393813939139401394113942139431394413945139461394713948139491395013951139521395313954139551395613957139581395913960139611396213963139641396513966139671396813969139701397113972139731397413975139761397713978139791398013981139821398313984139851398613987139881398913990139911399213993139941399513996139971399813999140001400114002140031400414005140061400714008140091401014011140121401314014140151401614017140181401914020140211402214023140241402514026140271402814029140301403114032140331403414035140361403714038140391404014041140421404314044140451404614047140481404914050140511405214053140541405514056140571405814059140601406114062140631406414065140661406714068140691407014071140721407314074140751407614077140781407914080140811408214083140841408514086140871408814089140901409114092140931409414095140961409714098140991410014101141021410314104141051410614107141081410914110141111411214113141141411514116141171411814119141201412114122141231412414125141261412714128141291413014131141321413314134141351413614137141381413914140141411414214143141441414514146141471414814149141501415114152141531415414155141561415714158141591416014161141621416314164141651416614167141681416914170141711417214173141741417514176141771417814179141801418114182141831418414185141861418714188141891419014191141921419314194141951419614197141981419914200142011420214203142041420514206142071420814209142101421114212142131421414215142161421714218142191422014221142221422314224142251422614227142281422914230142311423214233142341423514236142371423814239142401424114242142431424414245142461424714248142491425014251142521425314254142551425614257142581425914260142611426214263142641426514266142671426814269142701427114272142731427414275142761427714278142791428014281142821428314284142851428614287142881428914290142911429214293142941429514296142971429814299143001430114302143031430414305143061430714308143091431014311143121431314314143151431614317143181431914320143211432214323143241432514326143271432814329143301433114332143331433414335143361433714338143391434014341143421434314344143451434614347143481434914350143511435214353143541435514356143571435814359143601436114362143631436414365143661436714368143691437014371143721437314374143751437614377143781437914380143811438214383143841438514386143871438814389143901439114392143931439414395143961439714398143991440014401144021440314404144051440614407144081440914410144111441214413144141441514416144171441814419144201442114422144231442414425144261442714428144291443014431144321443314434144351443614437144381443914440144411444214443144441444514446144471444814449144501445114452144531445414455144561445714458144591446014461144621446314464144651446614467144681446914470144711447214473144741447514476144771447814479144801448114482144831448414485144861448714488144891449014491144921449314494144951449614497144981449914500145011450214503145041450514506145071450814509145101451114512145131451414515145161451714518145191452014521145221452314524145251452614527145281452914530145311453214533145341453514536145371453814539145401454114542145431454414545145461454714548145491455014551145521455314554145551455614557145581455914560145611456214563145641456514566145671456814569145701457114572145731457414575145761457714578145791458014581145821458314584145851458614587145881458914590145911459214593145941459514596145971459814599146001460114602146031460414605146061460714608146091461014611146121461314614146151461614617146181461914620146211462214623146241462514626146271462814629146301463114632146331463414635146361463714638146391464014641146421464314644146451464614647146481464914650146511465214653146541465514656146571465814659146601466114662146631466414665146661466714668146691467014671146721467314674146751467614677146781467914680146811468214683146841468514686146871468814689146901469114692146931469414695146961469714698146991470014701147021470314704147051470614707147081470914710147111471214713147141471514716147171471814719147201472114722147231472414725147261472714728147291473014731147321473314734147351473614737147381473914740147411474214743147441474514746147471474814749147501475114752147531475414755147561475714758147591476014761147621476314764147651476614767147681476914770147711477214773147741477514776147771477814779147801478114782147831478414785147861478714788147891479014791147921479314794147951479614797147981479914800148011480214803148041480514806148071480814809148101481114812148131481414815148161481714818148191482014821148221482314824148251482614827148281482914830148311483214833148341483514836148371483814839148401484114842148431484414845148461484714848148491485014851148521485314854148551485614857148581485914860148611486214863148641486514866148671486814869148701487114872148731487414875148761487714878148791488014881148821488314884148851488614887148881488914890148911489214893148941489514896148971489814899149001490114902149031490414905149061490714908149091491014911149121491314914149151491614917149181491914920149211492214923149241492514926149271492814929149301493114932149331493414935149361493714938149391494014941149421494314944149451494614947149481494914950149511495214953149541495514956149571495814959149601496114962149631496414965149661496714968149691497014971149721497314974149751497614977149781497914980149811498214983149841498514986149871498814989149901499114992149931499414995149961499714998149991500015001150021500315004150051500615007150081500915010150111501215013150141501515016150171501815019150201502115022150231502415025150261502715028150291503015031150321503315034150351503615037150381503915040150411504215043150441504515046150471504815049150501505115052150531505415055150561505715058150591506015061150621506315064150651506615067150681506915070150711507215073150741507515076150771507815079150801508115082150831508415085150861508715088150891509015091150921509315094150951509615097150981509915100151011510215103151041510515106151071510815109151101511115112151131511415115151161511715118151191512015121151221512315124151251512615127151281512915130151311513215133151341513515136151371513815139151401514115142151431514415145151461514715148151491515015151151521515315154151551515615157151581515915160151611516215163151641516515166151671516815169151701517115172151731517415175151761517715178151791518015181151821518315184151851518615187151881518915190151911519215193151941519515196151971519815199152001520115202152031520415205152061520715208152091521015211152121521315214152151521615217152181521915220152211522215223152241522515226152271522815229152301523115232152331523415235152361523715238152391524015241152421524315244152451524615247152481524915250152511525215253152541525515256152571525815259152601526115262152631526415265152661526715268152691527015271152721527315274152751527615277152781527915280152811528215283152841528515286152871528815289152901529115292152931529415295152961529715298152991530015301153021530315304153051530615307153081530915310153111531215313153141531515316153171531815319153201532115322153231532415325153261532715328153291533015331153321533315334153351533615337153381533915340153411534215343153441534515346153471534815349153501535115352153531535415355153561535715358153591536015361153621536315364153651536615367153681536915370153711537215373153741537515376153771537815379153801538115382153831538415385153861538715388153891539015391153921539315394153951539615397153981539915400154011540215403154041540515406154071540815409154101541115412154131541415415154161541715418154191542015421154221542315424154251542615427154281542915430154311543215433154341543515436154371543815439154401544115442154431544415445154461544715448154491545015451154521545315454154551545615457154581545915460154611546215463154641546515466154671546815469154701547115472154731547415475154761547715478154791548015481154821548315484154851548615487154881548915490154911549215493154941549515496154971549815499155001550115502155031550415505155061550715508155091551015511155121551315514155151551615517155181551915520155211552215523155241552515526155271552815529155301553115532155331553415535155361553715538155391554015541155421554315544155451554615547155481554915550155511555215553155541555515556155571555815559155601556115562155631556415565155661556715568155691557015571155721557315574155751557615577155781557915580155811558215583155841558515586155871558815589155901559115592155931559415595155961559715598155991560015601156021560315604156051560615607156081560915610156111561215613156141561515616156171561815619156201562115622156231562415625156261562715628156291563015631156321563315634156351563615637156381563915640156411564215643156441564515646156471564815649156501565115652156531565415655156561565715658156591566015661156621566315664156651566615667156681566915670156711567215673156741567515676156771567815679156801568115682156831568415685156861568715688156891569015691156921569315694156951569615697156981569915700157011570215703157041570515706157071570815709157101571115712157131571415715157161571715718157191572015721157221572315724157251572615727157281572915730157311573215733157341573515736157371573815739157401574115742157431574415745157461574715748157491575015751157521575315754157551575615757157581575915760157611576215763157641576515766157671576815769157701577115772157731577415775157761577715778157791578015781157821578315784157851578615787157881578915790157911579215793157941579515796157971579815799158001580115802158031580415805158061580715808158091581015811158121581315814158151581615817158181581915820158211582215823158241582515826158271582815829158301583115832158331583415835158361583715838158391584015841158421584315844158451584615847158481584915850158511585215853158541585515856158571585815859158601586115862158631586415865158661586715868158691587015871158721587315874158751587615877158781587915880158811588215883158841588515886158871588815889158901589115892158931589415895158961589715898158991590015901159021590315904159051590615907159081590915910159111591215913159141591515916159171591815919159201592115922159231592415925159261592715928159291593015931159321593315934159351593615937159381593915940159411594215943159441594515946159471594815949159501595115952159531595415955159561595715958159591596015961159621596315964159651596615967159681596915970159711597215973159741597515976159771597815979159801598115982159831598415985159861598715988159891599015991159921599315994159951599615997159981599916000160011600216003160041600516006160071600816009160101601116012160131601416015160161601716018160191602016021160221602316024160251602616027160281602916030160311603216033160341603516036160371603816039160401604116042160431604416045160461604716048160491605016051160521605316054160551605616057160581605916060160611606216063160641606516066160671606816069160701607116072160731607416075160761607716078160791608016081160821608316084160851608616087160881608916090160911609216093160941609516096160971609816099161001610116102161031610416105161061610716108161091611016111161121611316114161151611616117161181611916120161211612216123161241612516126161271612816129161301613116132161331613416135161361613716138161391614016141161421614316144161451614616147161481614916150161511615216153161541615516156161571615816159161601616116162161631616416165161661616716168161691617016171161721617316174161751617616177161781617916180161811618216183161841618516186161871618816189161901619116192161931619416195161961619716198161991620016201162021620316204162051620616207162081620916210162111621216213162141621516216162171621816219162201622116222162231622416225162261622716228162291623016231162321623316234162351623616237162381623916240162411624216243162441624516246162471624816249162501625116252162531625416255162561625716258162591626016261162621626316264162651626616267162681626916270162711627216273162741627516276162771627816279162801628116282162831628416285162861628716288162891629016291162921629316294162951629616297162981629916300163011630216303163041630516306163071630816309163101631116312163131631416315163161631716318163191632016321163221632316324163251632616327163281632916330163311633216333163341633516336163371633816339163401634116342163431634416345163461634716348163491635016351163521635316354163551635616357163581635916360163611636216363163641636516366163671636816369163701637116372163731637416375163761637716378163791638016381163821638316384163851638616387163881638916390163911639216393163941639516396163971639816399164001640116402164031640416405164061640716408164091641016411164121641316414164151641616417164181641916420164211642216423164241642516426164271642816429164301643116432164331643416435164361643716438164391644016441164421644316444164451644616447164481644916450164511645216453164541645516456164571645816459164601646116462164631646416465164661646716468164691647016471164721647316474164751647616477164781647916480164811648216483164841648516486164871648816489164901649116492164931649416495164961649716498164991650016501165021650316504165051650616507165081650916510165111651216513165141651516516165171651816519165201652116522165231652416525165261652716528165291653016531165321653316534165351653616537165381653916540165411654216543165441654516546165471654816549165501655116552165531655416555165561655716558165591656016561165621656316564165651656616567165681656916570165711657216573165741657516576165771657816579165801658116582165831658416585165861658716588165891659016591165921659316594165951659616597165981659916600166011660216603166041660516606166071660816609166101661116612166131661416615166161661716618166191662016621166221662316624166251662616627166281662916630166311663216633166341663516636166371663816639166401664116642166431664416645166461664716648166491665016651166521665316654166551665616657166581665916660166611666216663166641666516666166671666816669166701667116672166731667416675166761667716678166791668016681166821668316684166851668616687166881668916690166911669216693166941669516696166971669816699167001670116702167031670416705167061670716708167091671016711167121671316714167151671616717167181671916720167211672216723167241672516726167271672816729167301673116732167331673416735167361673716738167391674016741167421674316744167451674616747167481674916750167511675216753167541675516756167571675816759167601676116762167631676416765167661676716768167691677016771167721677316774167751677616777167781677916780167811678216783167841678516786167871678816789167901679116792167931679416795167961679716798167991680016801168021680316804168051680616807168081680916810168111681216813168141681516816168171681816819168201682116822168231682416825168261682716828168291683016831168321683316834168351683616837168381683916840168411684216843168441684516846168471684816849168501685116852168531685416855168561685716858168591686016861168621686316864168651686616867168681686916870168711687216873168741687516876168771687816879168801688116882168831688416885168861688716888168891689016891168921689316894168951689616897168981689916900169011690216903169041690516906169071690816909169101691116912169131691416915169161691716918169191692016921169221692316924169251692616927169281692916930169311693216933169341693516936169371693816939169401694116942169431694416945169461694716948169491695016951169521695316954169551695616957169581695916960169611696216963169641696516966169671696816969169701697116972169731697416975169761697716978169791698016981169821698316984169851698616987169881698916990169911699216993169941699516996169971699816999170001700117002170031700417005170061700717008170091701017011170121701317014170151701617017170181701917020170211702217023170241702517026170271702817029170301703117032170331703417035170361703717038170391704017041170421704317044170451704617047170481704917050170511705217053170541705517056170571705817059170601706117062170631706417065170661706717068170691707017071170721707317074170751707617077170781707917080170811708217083170841708517086170871708817089170901709117092170931709417095170961709717098170991710017101171021710317104171051710617107171081710917110171111711217113171141711517116
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <?xml-stylesheet type="text/xsl" href="testConf.xsl"?>
  3. <!--
  4. Licensed to the Apache Software Foundation (ASF) under one or more
  5. contributor license agreements. See the NOTICE file distributed with
  6. this work for additional information regarding copyright ownership.
  7. The ASF licenses this file to You under the Apache License, Version 2.0
  8. (the "License"); you may not use this file except in compliance with
  9. the License. You may obtain a copy of the License at
  10. http://www.apache.org/licenses/LICENSE-2.0
  11. Unless required by applicable law or agreed to in writing, software
  12. distributed under the License is distributed on an "AS IS" BASIS,
  13. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  14. See the License for the specific language governing permissions and
  15. limitations under the License.
  16. -->
  17. <configuration>
  18. <!-- Normal mode is test. To run just the commands and dump the output
  19. to the log, set it to nocompare -->
  20. <mode>test</mode>
  21. <!-- Comparator types:
  22. ExactComparator
  23. SubstringComparator
  24. RegexpComparator
  25. TokenComparator
  26. -->
  27. <tests>
  28. <!-- Tests for ls -->
  29. <test> <!-- TESTED -->
  30. <description>ls: file using absolute path</description>
  31. <test-commands>
  32. <command>-fs NAMENODE -touchz /file1</command>
  33. <command>-fs NAMENODE -ls /file1</command>
  34. </test-commands>
  35. <cleanup-commands>
  36. <command>-fs NAMENODE -rm /file1</command>
  37. </cleanup-commands>
  38. <comparators>
  39. <comparator>
  40. <type>RegexpComparator</type>
  41. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/file1</expected-output>
  42. </comparator>
  43. </comparators>
  44. </test>
  45. <test> <!-- TESTED -->
  46. <description>ls: file using relative path</description>
  47. <test-commands>
  48. <command>-fs NAMENODE -mkdir -p dir</command>
  49. <command>-fs NAMENODE -touchz file1</command>
  50. <command>-fs NAMENODE -ls file1</command>
  51. </test-commands>
  52. <cleanup-commands>
  53. <command>-fs NAMENODE -rm file1</command>
  54. </cleanup-commands>
  55. <comparators>
  56. <comparator>
  57. <type>RegexpComparator</type>
  58. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*file1</expected-output>
  59. </comparator>
  60. </comparators>
  61. </test>
  62. <test> <!-- TESTED -->
  63. <description>ls: files using globbing</description>
  64. <test-commands>
  65. <command>-fs NAMENODE -mkdir -p dir</command>
  66. <command>-fs NAMENODE -touchz file1</command>
  67. <command>-fs NAMENODE -touchz file2</command>
  68. <command>-fs NAMENODE -touchz file3</command>
  69. <command>-fs NAMENODE -touchz file4</command>
  70. <command>-fs NAMENODE -ls file*</command>
  71. </test-commands>
  72. <cleanup-commands>
  73. <command>-fs NAMENODE -rm -r /user</command>
  74. </cleanup-commands>
  75. <comparators>
  76. <comparator>
  77. <type>RegexpComparator</type>
  78. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*file1</expected-output>
  79. </comparator>
  80. <comparator>
  81. <type>RegexpComparator</type>
  82. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*file2</expected-output>
  83. </comparator>
  84. <comparator>
  85. <type>RegexpComparator</type>
  86. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*file3</expected-output>
  87. </comparator>
  88. <comparator>
  89. <type>RegexpComparator</type>
  90. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*file4</expected-output>
  91. </comparator>
  92. </comparators>
  93. </test>
  94. <test> <!-- TESTED -->
  95. <description>ls: directory using absolute path</description>
  96. <test-commands>
  97. <command>-fs NAMENODE -mkdir /dir1</command>
  98. <command>-fs NAMENODE -ls /</command>
  99. </test-commands>
  100. <cleanup-commands>
  101. <command>-fs NAMENODE -rm -r /dir1</command>
  102. </cleanup-commands>
  103. <comparators>
  104. <comparator>
  105. <type>RegexpComparator</type>
  106. <expected-output>^drwxr-xr-x( )*-( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir1</expected-output>
  107. </comparator>
  108. </comparators>
  109. </test>
  110. <test> <!-- TESTED -->
  111. <description>ls: directory using relative path</description>
  112. <test-commands>
  113. <command>-fs NAMENODE -mkdir -p dir1</command>
  114. <command>-fs NAMENODE -ls </command>
  115. </test-commands>
  116. <cleanup-commands>
  117. <command>-fs NAMENODE -rm -r dir1</command>
  118. </cleanup-commands>
  119. <comparators>
  120. <comparator>
  121. <type>RegexpComparator</type>
  122. <expected-output>^drwxr-xr-x( )*-( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir1</expected-output>
  123. </comparator>
  124. </comparators>
  125. </test>
  126. <test> <!-- TESTED -->
  127. <description>ls: directory using globbing</description>
  128. <test-commands>
  129. <command>-fs NAMENODE -mkdir -p dir1</command>
  130. <command>-fs NAMENODE -mkdir -p dir2</command>
  131. <command>-fs NAMENODE -mkdir -p dir3</command>
  132. <command>-fs NAMENODE -mkdir -p dir4</command>
  133. <command>-fs NAMENODE -ls </command>
  134. </test-commands>
  135. <cleanup-commands>
  136. <command>-fs NAMENODE -rm -r /user</command>
  137. </cleanup-commands>
  138. <comparators>
  139. <comparator>
  140. <type>RegexpComparator</type>
  141. <expected-output>^drwxr-xr-x( )*-( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir1</expected-output>
  142. </comparator>
  143. <comparator>
  144. <type>RegexpComparator</type>
  145. <expected-output>^drwxr-xr-x( )*-( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir2</expected-output>
  146. </comparator>
  147. <comparator>
  148. <type>RegexpComparator</type>
  149. <expected-output>^drwxr-xr-x( )*-( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir3</expected-output>
  150. </comparator>
  151. <comparator>
  152. <type>RegexpComparator</type>
  153. <expected-output>^drwxr-xr-x( )*-( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir4</expected-output>
  154. </comparator>
  155. </comparators>
  156. </test>
  157. <test> <!-- TESTED -->
  158. <description>ls: file/directory that does not exist in /</description>
  159. <test-commands>
  160. <command>-fs NAMENODE -ls /file1</command>
  161. </test-commands>
  162. <cleanup-commands>
  163. </cleanup-commands>
  164. <comparators>
  165. <comparator>
  166. <type>RegexpComparator</type>
  167. <expected-output>^ls: `/file1': No such file or directory</expected-output>
  168. </comparator>
  169. </comparators>
  170. </test>
  171. <test> <!-- TESTED -->
  172. <description>ls: file/directory that does not exist in home directory (/user/username)</description>
  173. <test-commands>
  174. <command>-fs NAMENODE -ls /user</command>
  175. </test-commands>
  176. <cleanup-commands>
  177. </cleanup-commands>
  178. <comparators>
  179. <comparator>
  180. <type>RegexpComparator</type>
  181. <expected-output>^ls: `/user': No such file or directory</expected-output>
  182. </comparator>
  183. </comparators>
  184. </test>
  185. <test> <!-- TESTED -->
  186. <description>ls: Non-URI input file at Namenode's path</description>
  187. <test-commands>
  188. <command>-fs NAMENODE -touchz NAMENODE/file1</command>
  189. <command>-fs NAMENODE -ls NAMENODE/file1</command>
  190. </test-commands>
  191. <cleanup-commands>
  192. <command>-fs NAMENODE -rm NAMENODE/file1</command>
  193. </cleanup-commands>
  194. <comparators>
  195. <comparator>
  196. <type>RegexpComparator</type>
  197. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/file1</expected-output>
  198. </comparator>
  199. </comparators>
  200. </test>
  201. <test> <!-- TESTED -->
  202. <description>ls: file at hdfs:// path</description>
  203. <test-commands>
  204. <command>-fs NAMENODE -touchz hdfs:///file1</command>
  205. <command>-fs NAMENODE -ls hdfs:///file1</command>
  206. </test-commands>
  207. <cleanup-commands>
  208. <command>-fs NAMENODE -rm hdfs:///file1</command>
  209. </cleanup-commands>
  210. <comparators>
  211. <comparator>
  212. <type>RegexpComparator</type>
  213. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///file1</expected-output>
  214. </comparator>
  215. </comparators>
  216. </test>
  217. <test> <!-- TESTED -->
  218. <description>ls: Non-URI input file at Namenode's path using globing</description>
  219. <test-commands>
  220. <command>-fs NAMENODE -touchz NAMENODE/file1</command>
  221. <command>-fs NAMENODE -touchz NAMENODE/file2</command>
  222. <command>-fs NAMENODE -touchz NAMENODE/file3</command>
  223. <command>-fs NAMENODE -ls NAMENODE/file*</command>
  224. </test-commands>
  225. <cleanup-commands>
  226. <command>-fs NAMENODE -rm NAMENODE/file*</command>
  227. </cleanup-commands>
  228. <comparators>
  229. <comparator>
  230. <type>RegexpComparator</type>
  231. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/file1</expected-output>
  232. </comparator>
  233. <comparator>
  234. <type>RegexpComparator</type>
  235. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/file2</expected-output>
  236. </comparator>
  237. <comparator>
  238. <type>RegexpComparator</type>
  239. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/file3</expected-output>
  240. </comparator>
  241. </comparators>
  242. </test>
  243. <test> <!-- TESTED -->
  244. <description>ls: file at hdfs:// path using globing</description>
  245. <test-commands>
  246. <command>-fs NAMENODE -touchz hdfs:///file1</command>
  247. <command>-fs NAMENODE -touchz hdfs:///file2</command>
  248. <command>-fs NAMENODE -touchz hdfs:///file3</command>
  249. <command>-fs NAMENODE -ls hdfs:///file*</command>
  250. </test-commands>
  251. <cleanup-commands>
  252. <command>-fs NAMENODE -rm hdfs:///file*</command>
  253. </cleanup-commands>
  254. <comparators>
  255. <comparator>
  256. <type>RegexpComparator</type>
  257. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///file1</expected-output>
  258. </comparator>
  259. <comparator>
  260. <type>RegexpComparator</type>
  261. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///file2</expected-output>
  262. </comparator>
  263. <comparator>
  264. <type>RegexpComparator</type>
  265. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///file3</expected-output>
  266. </comparator>
  267. </comparators>
  268. </test>
  269. <test> <!-- TESTED -->
  270. <description>ls: Non-URI input dir at Namenode's path</description>
  271. <test-commands>
  272. <command>-fs NAMENODE -mkdir -p NAMENODE/user/dir1</command>
  273. <command>-fs NAMENODE -ls hdfs:///user/</command>
  274. </test-commands>
  275. <cleanup-commands>
  276. <command>-fs NAMENODE -rm hdfs:///user/dir1</command>
  277. </cleanup-commands>
  278. <comparators>
  279. <comparator>
  280. <type>RegexpComparator</type>
  281. <expected-output>Found [0-9] items</expected-output>
  282. </comparator>
  283. <comparator>
  284. <type>RegexpComparator</type>
  285. <expected-output>^drwxr-xr-x( )*-( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///user/dir1</expected-output>
  286. </comparator>
  287. </comparators>
  288. </test>
  289. <test> <!-- TESTED -->
  290. <description>ls: dir at hdfs:// path</description>
  291. <test-commands>
  292. <command>-fs NAMENODE -mkdir -p hdfs:///user/dir1</command>
  293. <command>-fs NAMENODE -ls hdfs:///user/</command>
  294. </test-commands>
  295. <cleanup-commands>
  296. <command>-fs NAMENODE -rm hdfs:///user/dir1</command>
  297. </cleanup-commands>
  298. <comparators>
  299. <comparator>
  300. <type>RegexpComparator</type>
  301. <expected-output>Found [0-9] items</expected-output>
  302. </comparator>
  303. <comparator>
  304. <type>RegexpComparator</type>
  305. <expected-output>^drwxr-xr-x( )*-( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///user/dir1</expected-output>
  306. </comparator>
  307. </comparators>
  308. </test>
  309. <test> <!-- TESTED -->
  310. <description>ls: Non-URI input dir at Namenode's path using globing</description>
  311. <test-commands>
  312. <command>-fs NAMENODE -mkdir -p NAMENODE/user/dir1</command>
  313. <command>-fs NAMENODE -mkdir -p NAMENODE/user/dir2</command>
  314. <command>-fs NAMENODE -mkdir -p NAMENODE/user/dir3</command>
  315. <command>-fs NAMENODE -ls hdfs:///user/</command>
  316. </test-commands>
  317. <cleanup-commands>
  318. <command>-fs NAMENODE -rm hdfs:///user/dir*</command>
  319. </cleanup-commands>
  320. <comparators>
  321. <comparator>
  322. <type>RegexpComparator</type>
  323. <expected-output>Found [0-9] items</expected-output>
  324. </comparator>
  325. <comparator>
  326. <type>RegexpComparator</type>
  327. <expected-output>^drwxr-xr-x( )*-( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///user/dir1</expected-output>
  328. </comparator>
  329. <comparator>
  330. <type>RegexpComparator</type>
  331. <expected-output>^drwxr-xr-x( )*-( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///user/dir2</expected-output>
  332. </comparator>
  333. <comparator>
  334. <type>RegexpComparator</type>
  335. <expected-output>^drwxr-xr-x( )*-( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///user/dir3</expected-output>
  336. </comparator>
  337. </comparators>
  338. </test>
  339. <test> <!-- TESTED -->
  340. <description>ls: dir at hdfs:// path using globing</description>
  341. <test-commands>
  342. <command>-fs NAMENODE -mkdir -p hdfs:///user/dir1</command>
  343. <command>-fs NAMENODE -mkdir -p hdfs:///user/dir2</command>
  344. <command>-fs NAMENODE -mkdir -p hdfs:///user/dir3</command>
  345. <command>-fs NAMENODE -ls hdfs:///user/</command>
  346. </test-commands>
  347. <cleanup-commands>
  348. <command>-fs NAMENODE -rm hdfs:///user/dir*</command>
  349. </cleanup-commands>
  350. <comparators>
  351. <comparator>
  352. <type>RegexpComparator</type>
  353. <expected-output>Found [0-9] items</expected-output>
  354. </comparator>
  355. <comparator>
  356. <type>RegexpComparator</type>
  357. <expected-output>^drwxr-xr-x( )*-( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///user/dir1</expected-output>
  358. </comparator>
  359. <comparator>
  360. <type>RegexpComparator</type>
  361. <expected-output>^drwxr-xr-x( )*-( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///user/dir2</expected-output>
  362. </comparator>
  363. <comparator>
  364. <type>RegexpComparator</type>
  365. <expected-output>^drwxr-xr-x( )*-( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///user/dir3</expected-output>
  366. </comparator>
  367. </comparators>
  368. </test>
  369. <test> <!-- TESTED -->
  370. <description>ls: non-existent file/directory at hdfs:// path </description>
  371. <test-commands>
  372. <command>-fs NAMENODE -ls hdfs:///file1</command>
  373. </test-commands>
  374. <cleanup-commands>
  375. <!-- no cleanup -->
  376. </cleanup-commands>
  377. <comparators>
  378. <comparator>
  379. <type>RegexpComparator</type>
  380. <expected-output>^ls: `hdfs:///file1': No such file or directory</expected-output>
  381. </comparator>
  382. </comparators>
  383. </test>
  384. <test> <!-- TESTED -->
  385. <description>ls: non-existent file/directory in Namenode's path </description>
  386. <test-commands>
  387. <command>-fs NAMENODE -ls NAMENODE/file1</command>
  388. </test-commands>
  389. <cleanup-commands>
  390. <!-- no cleanup -->
  391. </cleanup-commands>
  392. <comparators>
  393. <comparator>
  394. <type>RegexpComparator</type>
  395. <expected-output>^ls: `hdfs://\w+[-.a-z0-9]*:[0-9]+/file1': No such file or directory</expected-output>
  396. </comparator>
  397. </comparators>
  398. </test>
  399. <test> <!-- TESTED -->
  400. <description>ls: whitespaces in an absolute path to a file</description>
  401. <test-commands>
  402. <command>-fs NAMENODE -mkdir -p "/a path with/whitespaces in directories"</command>
  403. <command>-fs NAMENODE -touchz "/a path with/whitespaces in directories/and file names"</command>
  404. <command>-fs NAMENODE -ls "/a path with/whitespaces in directories"</command>
  405. </test-commands>
  406. <cleanup-commands>
  407. <command>-fs NAMENODE -rm -r "/a path with"</command>
  408. </cleanup-commands>
  409. <comparators>
  410. <comparator>
  411. <type>RegexpComparator</type>
  412. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/a path with/whitespaces in directories/and file names</expected-output>
  413. </comparator>
  414. </comparators>
  415. </test>
  416. <test> <!-- TESTED -->
  417. <description>ls: whitespaces in a relative path to a file</description>
  418. <test-commands>
  419. <command>-fs NAMENODE -mkdir -p "a path with/whitespaces in directories"</command>
  420. <command>-fs NAMENODE -touchz "a path with/whitespaces in directories/and file names"</command>
  421. <command>-fs NAMENODE -ls "a path with/whitespaces in directories"</command>
  422. </test-commands>
  423. <cleanup-commands>
  424. <command>-fs NAMENODE -rm -r "a path with"</command>
  425. </cleanup-commands>
  426. <comparators>
  427. <comparator>
  428. <type>RegexpComparator</type>
  429. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*a path with/whitespaces in directories/and file names</expected-output>
  430. </comparator>
  431. </comparators>
  432. </test>
  433. <test> <!-- TESTED -->
  434. <description>ls: whitespaces in a scheme-qualified path to a file</description>
  435. <test-commands>
  436. <command>-fs NAMENODE -mkdir -p "NAMENODE/a path with/whitespaces in directories"</command>
  437. <command>-fs NAMENODE -touchz "NAMENODE/a path with/whitespaces in directories/and file names"</command>
  438. <command>-fs NAMENODE -ls "NAMENODE/a path with/whitespaces in directories"</command>
  439. </test-commands>
  440. <cleanup-commands>
  441. <command>-fs NAMENODE -rm -r "NAMENODE/a path with"</command>
  442. </cleanup-commands>
  443. <comparators>
  444. <comparator>
  445. <type>RegexpComparator</type>
  446. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/a path with/whitespaces in directories/and file names</expected-output>
  447. </comparator>
  448. </comparators>
  449. </test>
  450. <test> <!-- TESTED -->
  451. <description>ls: whitespaces in an absolute path to a file, using globbing</description>
  452. <test-commands>
  453. <command>-fs NAMENODE -mkdir -p "/a path with/whitespaces in directories"</command>
  454. <command>-fs NAMENODE -touchz "/a path with/whitespaces in directories/and file names"</command>
  455. <command>-fs NAMENODE -touchz "/a path with/whitespaces in directories/and file names 2"</command>
  456. <command>-fs NAMENODE -ls "/a*/w*"</command>
  457. </test-commands>
  458. <cleanup-commands>
  459. <command>-fs NAMENODE -rm -r "/a path with"</command>
  460. </cleanup-commands>
  461. <comparators>
  462. <comparator>
  463. <type>TokenComparator</type>
  464. <expected-output>Found 2 items</expected-output>
  465. </comparator>
  466. <comparator>
  467. <type>RegexpComparator</type>
  468. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/a path with/whitespaces in directories/and file names</expected-output>
  469. </comparator>
  470. <comparator>
  471. <type>RegexpComparator</type>
  472. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/a path with/whitespaces in directories/and file names 2</expected-output>
  473. </comparator>
  474. </comparators>
  475. </test>
  476. <test> <!-- TESTED -->
  477. <description>ls: whitespaces in a relative path to a file, using globbing</description>
  478. <test-commands>
  479. <command>-fs NAMENODE -mkdir -p "a path with/whitespaces in directories"</command>
  480. <command>-fs NAMENODE -touchz "a path with/whitespaces in directories/and file names"</command>
  481. <command>-fs NAMENODE -touchz "a path with/whitespaces in directories/and file names 2"</command>
  482. <command>-fs NAMENODE -ls "a*/w*"</command>
  483. </test-commands>
  484. <cleanup-commands>
  485. <command>-fs NAMENODE -rm -r "a path with"</command>
  486. </cleanup-commands>
  487. <comparators>
  488. <comparator>
  489. <type>TokenComparator</type>
  490. <expected-output>Found 2 items</expected-output>
  491. </comparator>
  492. <comparator>
  493. <type>RegexpComparator</type>
  494. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*a path with/whitespaces in directories/and file names</expected-output>
  495. </comparator>
  496. <comparator>
  497. <type>RegexpComparator</type>
  498. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*a path with/whitespaces in directories/and file names 2</expected-output>
  499. </comparator>
  500. </comparators>
  501. </test>
  502. <test> <!-- TESTED -->
  503. <description>ls: whitespaces in a scheme-qualified path to a file, using globbing</description>
  504. <test-commands>
  505. <command>-fs NAMENODE -mkdir -p "NAMENODE/a path with/whitespaces in directories"</command>
  506. <command>-fs NAMENODE -touchz "NAMENODE/a path with/whitespaces in directories/and file names"</command>
  507. <command>-fs NAMENODE -touchz "NAMENODE/a path with/whitespaces in directories/and file names 2"</command>
  508. <command>-fs NAMENODE -ls "NAMENODE/a*/w*"</command>
  509. </test-commands>
  510. <cleanup-commands>
  511. <command>-fs NAMENODE -rm -r "NAMENODE/a path with"</command>
  512. </cleanup-commands>
  513. <comparators>
  514. <comparator>
  515. <type>TokenComparator</type>
  516. <expected-output>Found 2 items</expected-output>
  517. </comparator>
  518. <comparator>
  519. <type>RegexpComparator</type>
  520. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/a path with/whitespaces in directories/and file names</expected-output>
  521. </comparator>
  522. <comparator>
  523. <type>RegexpComparator</type>
  524. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/a path with/whitespaces in directories/and file names 2</expected-output>
  525. </comparator>
  526. </comparators>
  527. </test>
  528. <!-- Tests for ls -R -->
  529. <test> <!-- TESTED -->
  530. <description>ls: files/directories using absolute path</description>
  531. <test-commands>
  532. <command>-fs NAMENODE -mkdir /dir0</command>
  533. <command>-fs NAMENODE -mkdir /dir0/dir1</command>
  534. <command>-fs NAMENODE -mkdir /dir0/dir1/dir1</command>
  535. <command>-fs NAMENODE -mkdir /dir0/dir1/dir2</command>
  536. <command>-fs NAMENODE -mkdir /dir0/dir2</command>
  537. <command>-fs NAMENODE -mkdir /dir0/dir2/dir1</command>
  538. <command>-fs NAMENODE -mkdir /dir0/dir2/dir2</command>
  539. <command>-fs NAMENODE -touchz /dir0/file0</command>
  540. <command>-fs NAMENODE -touchz /dir0/dir1/file1</command>
  541. <command>-fs NAMENODE -touchz /dir0/dir1/file2</command>
  542. <command>-fs NAMENODE -touchz /dir0/dir2/file1</command>
  543. <command>-fs NAMENODE -touchz /dir0/dir2/file2</command>
  544. <command>-fs NAMENODE -touchz /dir0/dir1/dir1/file1</command>
  545. <command>-fs NAMENODE -touchz /dir0/dir1/dir1/file2</command>
  546. <command>-fs NAMENODE -touchz /dir0/dir2/dir2/file1</command>
  547. <command>-fs NAMENODE -touchz /dir0/dir2/dir2/file2</command>
  548. <command>-fs NAMENODE -ls -R /dir0</command>
  549. </test-commands>
  550. <cleanup-commands>
  551. <command>-fs NAMENODE -rm -r /dir0</command>
  552. </cleanup-commands>
  553. <comparators>
  554. <comparator>
  555. <type>RegexpComparator</type>
  556. <expected-output>^drwxr-xr-x( )*-( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1</expected-output>
  557. </comparator>
  558. <comparator>
  559. <type>RegexpComparator</type>
  560. <expected-output>^drwxr-xr-x( )*-( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir2</expected-output>
  561. </comparator>
  562. <comparator>
  563. <type>RegexpComparator</type>
  564. <expected-output>^drwxr-xr-x( )*-( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1/dir1</expected-output>
  565. </comparator>
  566. <comparator>
  567. <type>RegexpComparator</type>
  568. <expected-output>^drwxr-xr-x( )*-( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1/dir2</expected-output>
  569. </comparator>
  570. <comparator>
  571. <type>RegexpComparator</type>
  572. <expected-output>^drwxr-xr-x( )*-( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir2/dir1</expected-output>
  573. </comparator>
  574. <comparator>
  575. <type>RegexpComparator</type>
  576. <expected-output>^drwxr-xr-x( )*-( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir2/dir2</expected-output>
  577. </comparator>
  578. <comparator>
  579. <type>RegexpComparator</type>
  580. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/file0</expected-output>
  581. </comparator>
  582. <comparator>
  583. <type>RegexpComparator</type>
  584. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1/file1</expected-output>
  585. </comparator>
  586. <comparator>
  587. <type>RegexpComparator</type>
  588. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1/file2</expected-output>
  589. </comparator>
  590. <comparator>
  591. <type>RegexpComparator</type>
  592. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir2/file1</expected-output>
  593. </comparator>
  594. <comparator>
  595. <type>RegexpComparator</type>
  596. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir2/file2</expected-output>
  597. </comparator>
  598. <comparator>
  599. <type>RegexpComparator</type>
  600. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1/dir1/file1</expected-output>
  601. </comparator>
  602. <comparator>
  603. <type>RegexpComparator</type>
  604. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1/dir1/file2</expected-output>
  605. </comparator>
  606. <comparator>
  607. <type>RegexpComparator</type>
  608. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir2/dir2/file1</expected-output>
  609. </comparator>
  610. <comparator>
  611. <type>RegexpComparator</type>
  612. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir2/dir2/file2</expected-output>
  613. </comparator>
  614. </comparators>
  615. </test>
  616. <test> <!-- TESTED -->
  617. <description>ls: files/directories using relative path</description>
  618. <test-commands>
  619. <command>-fs NAMENODE -mkdir -p dir0</command>
  620. <command>-fs NAMENODE -mkdir -p dir0/dir1</command>
  621. <command>-fs NAMENODE -mkdir -p dir0/dir1/dir1</command>
  622. <command>-fs NAMENODE -mkdir -p dir0/dir1/dir2</command>
  623. <command>-fs NAMENODE -mkdir -p dir0/dir2</command>
  624. <command>-fs NAMENODE -mkdir -p dir0/dir2/dir1</command>
  625. <command>-fs NAMENODE -mkdir -p dir0/dir2/dir2</command>
  626. <command>-fs NAMENODE -touchz dir0/file0</command>
  627. <command>-fs NAMENODE -touchz dir0/dir1/file1</command>
  628. <command>-fs NAMENODE -touchz dir0/dir1/file2</command>
  629. <command>-fs NAMENODE -touchz dir0/dir2/file1</command>
  630. <command>-fs NAMENODE -touchz dir0/dir2/file2</command>
  631. <command>-fs NAMENODE -touchz dir0/dir1/dir1/file1</command>
  632. <command>-fs NAMENODE -touchz dir0/dir1/dir1/file2</command>
  633. <command>-fs NAMENODE -touchz dir0/dir2/dir2/file1</command>
  634. <command>-fs NAMENODE -touchz dir0/dir2/dir2/file2</command>
  635. <command>-fs NAMENODE -ls -R dir0</command>
  636. </test-commands>
  637. <cleanup-commands>
  638. <command>-fs NAMENODE -rm -r /user</command>
  639. </cleanup-commands>
  640. <comparators>
  641. <comparator>
  642. <type>RegexpComparator</type>
  643. <expected-output>^drwxr-xr-x( )*-( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/dir1</expected-output>
  644. </comparator>
  645. <comparator>
  646. <type>RegexpComparator</type>
  647. <expected-output>^drwxr-xr-x( )*-( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/dir2</expected-output>
  648. </comparator>
  649. <comparator>
  650. <type>RegexpComparator</type>
  651. <expected-output>^drwxr-xr-x( )*-( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/dir1/dir1</expected-output>
  652. </comparator>
  653. <comparator>
  654. <type>RegexpComparator</type>
  655. <expected-output>^drwxr-xr-x( )*-( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/dir1/dir2</expected-output>
  656. </comparator>
  657. <comparator>
  658. <type>RegexpComparator</type>
  659. <expected-output>^drwxr-xr-x( )*-( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/dir2/dir1</expected-output>
  660. </comparator>
  661. <comparator>
  662. <type>RegexpComparator</type>
  663. <expected-output>^drwxr-xr-x( )*-( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/dir2/dir2</expected-output>
  664. </comparator>
  665. <comparator>
  666. <type>RegexpComparator</type>
  667. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/file0</expected-output>
  668. </comparator>
  669. <comparator>
  670. <type>RegexpComparator</type>
  671. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/dir1/file1</expected-output>
  672. </comparator>
  673. <comparator>
  674. <type>RegexpComparator</type>
  675. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/dir1/file2</expected-output>
  676. </comparator>
  677. <comparator>
  678. <type>RegexpComparator</type>
  679. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/dir2/file1</expected-output>
  680. </comparator>
  681. <comparator>
  682. <type>RegexpComparator</type>
  683. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/dir2/file2</expected-output>
  684. </comparator>
  685. <comparator>
  686. <type>RegexpComparator</type>
  687. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/dir1/dir1/file1</expected-output>
  688. </comparator>
  689. <comparator>
  690. <type>RegexpComparator</type>
  691. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/dir1/dir1/file2</expected-output>
  692. </comparator>
  693. <comparator>
  694. <type>RegexpComparator</type>
  695. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/dir2/dir2/file1</expected-output>
  696. </comparator>
  697. <comparator>
  698. <type>RegexpComparator</type>
  699. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/dir2/dir2/file2</expected-output>
  700. </comparator>
  701. </comparators>
  702. </test>
  703. <test> <!-- TESTED -->
  704. <description>ls: files/directories using globbing</description>
  705. <test-commands>
  706. <command>-fs NAMENODE -mkdir -p dir0</command>
  707. <command>-fs NAMENODE -mkdir -p dir0/dir1</command>
  708. <command>-fs NAMENODE -mkdir -p dir0/dir1/dir1</command>
  709. <command>-fs NAMENODE -mkdir -p dir0/dir1/dir2</command>
  710. <command>-fs NAMENODE -mkdir -p dir0/dir2</command>
  711. <command>-fs NAMENODE -mkdir -p dir0/dir2/dir1</command>
  712. <command>-fs NAMENODE -mkdir -p dir0/dir2/dir2</command>
  713. <command>-fs NAMENODE -touchz dir0/file0</command>
  714. <command>-fs NAMENODE -touchz dir0/dir1/file1</command>
  715. <command>-fs NAMENODE -touchz dir0/dir1/file2</command>
  716. <command>-fs NAMENODE -touchz dir0/dir2/file1</command>
  717. <command>-fs NAMENODE -touchz dir0/dir2/file2</command>
  718. <command>-fs NAMENODE -touchz dir0/dir1/dir1/file1</command>
  719. <command>-fs NAMENODE -touchz dir0/dir1/dir1/file2</command>
  720. <command>-fs NAMENODE -touchz dir0/dir2/dir2/file1</command>
  721. <command>-fs NAMENODE -touchz dir0/dir2/dir2/file2</command>
  722. <command>-fs NAMENODE -ls -R dir0/*</command>
  723. </test-commands>
  724. <cleanup-commands>
  725. <command>-fs NAMENODE -rm -r /user</command>
  726. </cleanup-commands>
  727. <comparators>
  728. <!-- JIRA?
  729. <comparator>
  730. <type>RegexpComparator</type>
  731. <expected-output>^/user/[a-zA-z0-9]*/dir0/dir1</expected-output>
  732. </comparator>
  733. <comparator>
  734. <type>RegexpComparator</type>
  735. <expected-output>^/user/[a-zA-z0-9]*/dir0/dir2</expected-output>
  736. </comparator>
  737. -->
  738. <comparator>
  739. <type>RegexpComparator</type>
  740. <expected-output>^drwxr-xr-x( )*-( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/dir1/dir1</expected-output>
  741. </comparator>
  742. <comparator>
  743. <type>RegexpComparator</type>
  744. <expected-output>^drwxr-xr-x( )*-( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/dir1/dir2</expected-output>
  745. </comparator>
  746. <comparator>
  747. <type>RegexpComparator</type>
  748. <expected-output>^drwxr-xr-x( )*-( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/dir2/dir1</expected-output>
  749. </comparator>
  750. <comparator>
  751. <type>RegexpComparator</type>
  752. <expected-output>^drwxr-xr-x( )*-( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/dir2/dir2</expected-output>
  753. </comparator>
  754. <comparator>
  755. <type>RegexpComparator</type>
  756. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/file0</expected-output>
  757. </comparator>
  758. <comparator>
  759. <type>RegexpComparator</type>
  760. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/dir1/file1</expected-output>
  761. </comparator>
  762. <comparator>
  763. <type>RegexpComparator</type>
  764. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/dir1/file2</expected-output>
  765. </comparator>
  766. <comparator>
  767. <type>RegexpComparator</type>
  768. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/dir2/file1</expected-output>
  769. </comparator>
  770. <comparator>
  771. <type>RegexpComparator</type>
  772. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/dir2/file2</expected-output>
  773. </comparator>
  774. <comparator>
  775. <type>RegexpComparator</type>
  776. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/dir1/dir1/file1</expected-output>
  777. </comparator>
  778. <comparator>
  779. <type>RegexpComparator</type>
  780. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/dir1/dir1/file2</expected-output>
  781. </comparator>
  782. <comparator>
  783. <type>RegexpComparator</type>
  784. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/dir2/dir2/file1</expected-output>
  785. </comparator>
  786. <comparator>
  787. <type>RegexpComparator</type>
  788. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/dir2/dir2/file2</expected-output>
  789. </comparator>
  790. </comparators>
  791. </test>
  792. <test> <!-- TESTED -->
  793. <description>ls: file/directory that does not exist in /</description>
  794. <test-commands>
  795. <command>-fs NAMENODE -ls -R /file1</command>
  796. </test-commands>
  797. <cleanup-commands>
  798. </cleanup-commands>
  799. <comparators>
  800. <comparator>
  801. <type>RegexpComparator</type>
  802. <expected-output>^ls: `/file1': No such file or directory</expected-output>
  803. </comparator>
  804. </comparators>
  805. </test>
  806. <test> <!-- TESTED -->
  807. <description>ls: file/directory that does not exist in home directory (/user/username)</description>
  808. <test-commands>
  809. <command>-fs NAMENODE -ls -R /user</command>
  810. </test-commands>
  811. <cleanup-commands>
  812. </cleanup-commands>
  813. <comparators>
  814. <comparator>
  815. <type>RegexpComparator</type>
  816. <expected-output>^ls: `/user': No such file or directory</expected-output>
  817. </comparator>
  818. </comparators>
  819. </test>
  820. <test> <!-- TESTED -->
  821. <description>ls: dir at hdfs:// path</description>
  822. <test-commands>
  823. <command>-fs NAMENODE -mkdir hdfs:///dir0</command>
  824. <command>-fs NAMENODE -mkdir hdfs:///dir0/dir1</command>
  825. <command>-fs NAMENODE -touchz hdfs:///file1</command>
  826. <command>-fs NAMENODE -touchz hdfs:///dir0/file1</command>
  827. <command>-fs NAMENODE -touchz hdfs:///dir0/dir1/file1</command>
  828. <command>-fs NAMENODE -ls -R hdfs:///</command>
  829. </test-commands>
  830. <cleanup-commands>
  831. <command>-fs NAMENODE -rm hdfs:///dir0</command>
  832. <command>-fs NAMENODE -rm hdfs:///file1</command>
  833. </cleanup-commands>
  834. <comparators>
  835. <comparator>
  836. <type>RegexpComparator</type>
  837. <expected-output>^drwxr-xr-x( )*-( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir0</expected-output>
  838. </comparator>
  839. <comparator>
  840. <type>RegexpComparator</type>
  841. <expected-output>^drwxr-xr-x( )*-( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir0/dir1</expected-output>
  842. </comparator>
  843. <comparator>
  844. <type>RegexpComparator</type>
  845. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///file1</expected-output>
  846. </comparator>
  847. <comparator>
  848. <type>RegexpComparator</type>
  849. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir0/file1</expected-output>
  850. </comparator>
  851. <comparator>
  852. <type>RegexpComparator</type>
  853. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir0/dir1/file1</expected-output>
  854. </comparator>
  855. </comparators>
  856. </test>
  857. <test> <!-- TESTED -->
  858. <description>ls: files/directories in hdfs:// path using globbing</description>
  859. <test-commands>
  860. <command>-fs NAMENODE -mkdir hdfs:///dir0</command>
  861. <command>-fs NAMENODE -mkdir hdfs:///dir0/dir1</command>
  862. <command>-fs NAMENODE -touchz hdfs:///dir0/file1</command>
  863. <command>-fs NAMENODE -touchz hdfs:///dir0/dir1/file1</command>
  864. <command>-fs NAMENODE -ls -R hdfs:///dir0/*</command>
  865. </test-commands>
  866. <cleanup-commands>
  867. <command>-fs NAMENODE -rm -r hdfs:///dir0</command>
  868. </cleanup-commands>
  869. <comparators>
  870. <comparator>
  871. <type>RegexpComparator</type>
  872. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir0/file1</expected-output>
  873. </comparator>
  874. <comparator>
  875. <type>RegexpComparator</type>
  876. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir0/dir1/file1</expected-output>
  877. </comparator>
  878. </comparators>
  879. </test>
  880. <test> <!-- TESTED -->
  881. <description>ls: Non-existent file/directory in hdfs:// path</description>
  882. <test-commands>
  883. <command>-fs NAMENODE -ls -R hdfs:///file1</command>
  884. </test-commands>
  885. <cleanup-commands>
  886. </cleanup-commands>
  887. <comparators>
  888. <comparator>
  889. <type>RegexpComparator</type>
  890. <expected-output>^ls: `hdfs:///file1': No such file or directory</expected-output>
  891. </comparator>
  892. </comparators>
  893. </test>
  894. <test> <!-- TESTED -->
  895. <description>ls: dir at Namenode's path</description>
  896. <test-commands>
  897. <command>-fs NAMENODE -mkdir NAMENODE/dir0</command>
  898. <command>-fs NAMENODE -mkdir NAMENODE/dir0/dir1</command>
  899. <command>-fs NAMENODE -touchz NAMENODE/file1</command>
  900. <command>-fs NAMENODE -touchz NAMENODE/dir0/file1</command>
  901. <command>-fs NAMENODE -touchz NAMENODE/dir0/dir1/file1</command>
  902. <command>-fs NAMENODE -ls -R NAMENODE/</command>
  903. </test-commands>
  904. <cleanup-commands>
  905. <command>-fs NAMENODE -rm hdfs:///dir0</command>
  906. <command>-fs NAMENODE -rm hdfs:///file1</command>
  907. </cleanup-commands>
  908. <comparators>
  909. <comparator>
  910. <type>RegexpComparator</type>
  911. <expected-output>^drwxr-xr-x( )*-( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir0</expected-output>
  912. </comparator>
  913. <comparator>
  914. <type>RegexpComparator</type>
  915. <expected-output>^drwxr-xr-x( )*-( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir0/dir1</expected-output>
  916. </comparator>
  917. <comparator>
  918. <type>RegexpComparator</type>
  919. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/file1</expected-output>
  920. </comparator>
  921. <comparator>
  922. <type>RegexpComparator</type>
  923. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir0/file1</expected-output>
  924. </comparator>
  925. <comparator>
  926. <type>RegexpComparator</type>
  927. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir0/dir1/file1</expected-output>
  928. </comparator>
  929. </comparators>
  930. </test>
  931. <test> <!-- TESTED -->
  932. <description>ls: Non-URI input files/directories in Namenode's path </description>
  933. <test-commands>
  934. <command>-fs NAMENODE -mkdir NAMENODE/dir0</command>
  935. <command>-fs NAMENODE -mkdir NAMENODE/dir0/dir1</command>
  936. <command>-fs NAMENODE -touchz NAMENODE/dir0/file1</command>
  937. <command>-fs NAMENODE -touchz NAMENODE/dir0/dir1/file1</command>
  938. <command>-fs NAMENODE -ls -R NAMENODE/dir0/*</command>
  939. </test-commands>
  940. <cleanup-commands>
  941. <command>-fs NAMENODE -rm -r NAMENODE/dir0</command>
  942. </cleanup-commands>
  943. <comparators>
  944. <comparator>
  945. <type>RegexpComparator</type>
  946. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir0/file1</expected-output>
  947. </comparator>
  948. <comparator>
  949. <type>RegexpComparator</type>
  950. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir0/dir1/file1</expected-output>
  951. </comparator>
  952. </comparators>
  953. </test>
  954. <test> <!-- TESTED -->
  955. <description>ls: Non-URI input for non-existent file/directory in Namenode's path </description>
  956. <test-commands>
  957. <command>-fs NAMENODE -ls -R NAMENODE/file1</command>
  958. </test-commands>
  959. <cleanup-commands>
  960. </cleanup-commands>
  961. <comparators>
  962. <comparator>
  963. <type>RegexpComparator</type>
  964. <expected-output>^ls: `hdfs://\w+[-.a-z0-9]*:[0-9]+/file1': No such file or directory</expected-output>
  965. </comparator>
  966. </comparators>
  967. </test>
  968. <test> <!-- TESTED -->
  969. <description>ls: Negative test for quoted /*/* globbing </description>
  970. <windows>false</windows>
  971. <test-commands>
  972. <command>-fs NAMENODE -mkdir /dir0</command>
  973. <command>-fs NAMENODE -mkdir /dir0/dir1</command>
  974. <command>-fs NAMENODE -touchz /dir0/dir1/file1</command>
  975. <command>-fs NAMENODE -ls -R /\*/\*</command>
  976. </test-commands>
  977. <cleanup-commands>
  978. <command>-fs NAMENODE -rm -r /dir0</command>
  979. </cleanup-commands>
  980. <comparators>
  981. <comparator>
  982. <type>TokenComparator</type>
  983. <expected-output>ls: `/*/*': No such file or directory</expected-output>
  984. </comparator>
  985. </comparators>
  986. </test>
  987. <test> <!-- TESTED -->
  988. <description>ls: Test for quoted globbing </description>
  989. <windows>false</windows>
  990. <test-commands>
  991. <command>-fs NAMENODE -mkdir /dir0</command>
  992. <command>-fs NAMENODE -mkdir /dir0/\*</command>
  993. <command>-fs NAMENODE -touchz /dir0/\*/file</command>
  994. <command>-fs NAMENODE -touchz /dir0/dir1/file1</command>
  995. <command>-fs NAMENODE -ls -R /dir0/\*</command>
  996. </test-commands>
  997. <cleanup-commands>
  998. <command>-fs NAMENODE -rm -r /dir0</command>
  999. </cleanup-commands>
  1000. <comparators>
  1001. <comparator>
  1002. <type>RegexpComparator</type>
  1003. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/\*/file</expected-output>
  1004. </comparator>
  1005. </comparators>
  1006. </test>
  1007. <test> <!-- TESTED -->
  1008. <description>rm: Test for quoted globbing </description>
  1009. <windows>false</windows>
  1010. <test-commands>
  1011. <command>-fs NAMENODE -mkdir /dir0</command>
  1012. <command>-fs NAMENODE -mkdir /dir0/\*</command>
  1013. <command>-fs NAMENODE -touchz /dir0/\*/file</command>
  1014. <command>-fs NAMENODE -mkdir /dir0/dir1/</command>
  1015. <command>-fs NAMENODE -touchz /dir0/dir1/file1</command>
  1016. <command>-fs NAMENODE -rm -r /dir0/\*</command>
  1017. <command>-fs NAMENODE -ls -R /dir0</command>
  1018. </test-commands>
  1019. <cleanup-commands>
  1020. <command>-fs NAMENODE -rm -r /dir0</command>
  1021. </cleanup-commands>
  1022. <comparators>
  1023. <comparator>
  1024. <type>RegexpComparator</type>
  1025. <expected-output>^drwxr-xr-x( )*-( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1</expected-output>
  1026. </comparator>
  1027. <comparator>
  1028. <type>RegexpComparator</type>
  1029. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1/file1</expected-output>
  1030. </comparator>
  1031. </comparators>
  1032. </test>
  1033. <!-- Tests for du -->
  1034. <test> <!-- TESTED -->
  1035. <description>du: file using absolute path</description>
  1036. <test-commands>
  1037. <command>-fs NAMENODE -put CLITEST_DATA/data15bytes /data15bytes</command>
  1038. <command>-fs NAMENODE -du /data15bytes</command>
  1039. </test-commands>
  1040. <cleanup-commands>
  1041. <command>-fs NAMENODE -rm /data15bytes</command>
  1042. </cleanup-commands>
  1043. <comparators>
  1044. <comparator>
  1045. <type>RegexpComparator</type>
  1046. <expected-output>^15\s+/data15bytes</expected-output>
  1047. </comparator>
  1048. </comparators>
  1049. </test>
  1050. <test> <!-- TESTED -->
  1051. <description>du: file using relative path</description>
  1052. <test-commands>
  1053. <command>-fs NAMENODE -mkdir -p dir</command> <!-- make sure user home dir exists -->
  1054. <command>-fs NAMENODE -put CLITEST_DATA/data15bytes data15bytesZZ</command>
  1055. <command>-fs NAMENODE -du data15bytesZZ</command>
  1056. </test-commands>
  1057. <cleanup-commands>
  1058. <command>-fs NAMENODE -rm data15bytesZZ</command>
  1059. </cleanup-commands>
  1060. <comparators>
  1061. <comparator>
  1062. <type>RegexpComparator</type>
  1063. <expected-output>^15\s+data15bytesZZ</expected-output>
  1064. </comparator>
  1065. </comparators>
  1066. </test>
  1067. <test> <!-- TESTED -->
  1068. <description>du: files using globbing</description>
  1069. <test-commands>
  1070. <command>-fs NAMENODE -mkdir -p CLITEST_DATA</command>
  1071. <command>-fs NAMENODE -put CLITEST_DATA/data15bytes data15bytes</command>
  1072. <command>-fs NAMENODE -put CLITEST_DATA/data30bytes data30bytes</command>
  1073. <command>-fs NAMENODE -put CLITEST_DATA/data60bytes data60bytes</command>
  1074. <command>-fs NAMENODE -put CLITEST_DATA/data120bytes data120bytes</command>
  1075. <command>-fs NAMENODE -du data*</command>
  1076. </test-commands>
  1077. <cleanup-commands>
  1078. <command>-fs NAMENODE -rm data*bytes</command>
  1079. </cleanup-commands>
  1080. <comparators>
  1081. <comparator>
  1082. <type>RegexpComparator</type>
  1083. <expected-output>^120\s+data120bytes</expected-output>
  1084. </comparator>
  1085. <comparator>
  1086. <type>RegexpComparator</type>
  1087. <expected-output>^15\s+data15bytes</expected-output>
  1088. </comparator>
  1089. <comparator>
  1090. <type>RegexpComparator</type>
  1091. <expected-output>^30\s+data30bytes</expected-output>
  1092. </comparator>
  1093. <comparator>
  1094. <type>RegexpComparator</type>
  1095. <expected-output>^60\s+data60bytes</expected-output>
  1096. </comparator>
  1097. </comparators>
  1098. </test>
  1099. <test> <!-- TESTED -->
  1100. <description>du: directory using absolute path</description>
  1101. <test-commands>
  1102. <command>-fs NAMENODE -mkdir /dir0</command>
  1103. <command>-fs NAMENODE -put CLITEST_DATA/data15bytes /dir0/data15bytes</command>
  1104. <command>-fs NAMENODE -du /dir0</command>
  1105. </test-commands>
  1106. <cleanup-commands>
  1107. <command>-fs NAMENODE -rm -r /dir0</command>
  1108. </cleanup-commands>
  1109. <comparators>
  1110. <comparator>
  1111. <type>RegexpComparator</type>
  1112. <expected-output>^15\s+/dir0/data15bytes</expected-output>
  1113. </comparator>
  1114. </comparators>
  1115. </test>
  1116. <test> <!-- TESTED -->
  1117. <description>du: directory using relative path</description>
  1118. <test-commands>
  1119. <command>-fs NAMENODE -mkdir -p dir0</command>
  1120. <command>-fs NAMENODE -put CLITEST_DATA/data15bytes dir0/data15bytes</command>
  1121. <command>-fs NAMENODE -du dir0</command>
  1122. </test-commands>
  1123. <cleanup-commands>
  1124. <command>-fs NAMENODE -rm -r /user</command>
  1125. </cleanup-commands>
  1126. <comparators>
  1127. <comparator>
  1128. <type>RegexpComparator</type>
  1129. <expected-output>^15\s+dir0/data15bytes</expected-output>
  1130. </comparator>
  1131. </comparators>
  1132. </test>
  1133. <test> <!-- TESTED -->
  1134. <description>du: directory using globbing</description>
  1135. <test-commands>
  1136. <command>-fs NAMENODE -mkdir /dir0</command>
  1137. <command>-fs NAMENODE -put CLITEST_DATA/data15bytes /dir0/data15bytes</command>
  1138. <command>-fs NAMENODE -put CLITEST_DATA/data30bytes /dir0/data30bytes</command>
  1139. <command>-fs NAMENODE -put CLITEST_DATA/data60bytes /dir0/data60bytes</command>
  1140. <command>-fs NAMENODE -put CLITEST_DATA/data120bytes /dir0/data120bytes</command>
  1141. <command>-fs NAMENODE -du /dir0/*</command>
  1142. </test-commands>
  1143. <cleanup-commands>
  1144. <command>-fs NAMENODE -rm -r /dir0</command>
  1145. </cleanup-commands>
  1146. <comparators>
  1147. <comparator>
  1148. <type>RegexpComparator</type>
  1149. <expected-output>^15( |\t)*/dir0/data15bytes</expected-output>
  1150. </comparator>
  1151. <comparator>
  1152. <type>RegexpComparator</type>
  1153. <expected-output>^30( |\t)*/dir0/data30bytes</expected-output>
  1154. </comparator>
  1155. <comparator>
  1156. <type>RegexpComparator</type>
  1157. <expected-output>^60( |\t)*/dir0/data60bytes</expected-output>
  1158. </comparator>
  1159. <comparator>
  1160. <type>RegexpComparator</type>
  1161. <expected-output>^120( |\t)*/dir0/data120bytes</expected-output>
  1162. </comparator>
  1163. </comparators>
  1164. </test>
  1165. <test> <!-- TESTED -->
  1166. <description>du: Test for hdfs:// path - file</description>
  1167. <test-commands>
  1168. <command>-fs NAMENODE -put CLITEST_DATA/data15bytes hdfs:///data15bytes</command>
  1169. <command>-fs NAMENODE -du hdfs:///data15bytes</command>
  1170. </test-commands>
  1171. <cleanup-commands>
  1172. <command>-fs NAMENODE -rm hdfs:///data15bytes</command>
  1173. </cleanup-commands>
  1174. <comparators>
  1175. <comparator>
  1176. <type>RegexpComparator</type>
  1177. <expected-output>^15\s+hdfs:///data15bytes</expected-output>
  1178. </comparator>
  1179. </comparators>
  1180. </test>
  1181. <test> <!-- TESTED -->
  1182. <description>du: Test for hdfs:// path - files using globbing</description>
  1183. <test-commands>
  1184. <command>-fs NAMENODE -put CLITEST_DATA/data15bytes hdfs:///data15bytes</command>
  1185. <command>-fs NAMENODE -put CLITEST_DATA/data30bytes hdfs:///data30bytes</command>
  1186. <command>-fs NAMENODE -put CLITEST_DATA/data60bytes hdfs:///data60bytes</command>
  1187. <command>-fs NAMENODE -put CLITEST_DATA/data120bytes hdfs:///data120bytes</command>
  1188. <command>-fs NAMENODE -du hdfs:///data*</command>
  1189. </test-commands>
  1190. <cleanup-commands>
  1191. <command>-fs NAMENODE -rm -r hdfs:///*</command>
  1192. </cleanup-commands>
  1193. <comparators>
  1194. <comparator>
  1195. <type>RegexpComparator</type>
  1196. <expected-output>^120\s+hdfs:///data120bytes</expected-output>
  1197. </comparator>
  1198. <comparator>
  1199. <type>RegexpComparator</type>
  1200. <expected-output>^15\s+hdfs:///data15bytes</expected-output>
  1201. </comparator>
  1202. <comparator>
  1203. <type>RegexpComparator</type>
  1204. <expected-output>^30\s+hdfs:///data30bytes</expected-output>
  1205. </comparator>
  1206. <comparator>
  1207. <type>RegexpComparator</type>
  1208. <expected-output>^60\s+hdfs:///data60bytes</expected-output>
  1209. </comparator>
  1210. </comparators>
  1211. </test>
  1212. <test> <!-- TESTED -->
  1213. <description>du: Test for hdfs:// path - directory</description>
  1214. <test-commands>
  1215. <command>-fs NAMENODE -mkdir hdfs:///dir0</command>
  1216. <command>-fs NAMENODE -put CLITEST_DATA/data15bytes hdfs:///dir0/data15bytes</command>
  1217. <command>-fs NAMENODE -du hdfs:///dir0</command>
  1218. </test-commands>
  1219. <cleanup-commands>
  1220. <command>-fs NAMENODE -rm -r hdfs:///dir0</command>
  1221. </cleanup-commands>
  1222. <comparators>
  1223. <comparator>
  1224. <type>RegexpComparator</type>
  1225. <expected-output>^15\s+hdfs:///dir0/data15bytes</expected-output>
  1226. </comparator>
  1227. </comparators>
  1228. </test>
  1229. <test> <!-- TESTED -->
  1230. <description>duh: Test for hdfs:// path - directory</description>
  1231. <test-commands>
  1232. <command>-fs NAMENODE -mkdir hdfs:///dir0</command>
  1233. <command>-fs NAMENODE -put CLITEST_DATA/data15bytes hdfs:///dir0/data15bytes</command>
  1234. <command>-fs NAMENODE -put CLITEST_DATA/data1k hdfs:///dir0/data1k</command>
  1235. <command>-fs NAMENODE -du -h hdfs:///dir0</command>
  1236. </test-commands>
  1237. <cleanup-commands>
  1238. <command>-fs NAMENODE -rm -r hdfs:///dir0</command>
  1239. </cleanup-commands>
  1240. <comparators>
  1241. <comparator>
  1242. <type>RegexpComparator</type>
  1243. <expected-output>^15\s+hdfs:///dir0/data15bytes</expected-output>
  1244. </comparator>
  1245. <comparator>
  1246. <type>RegexpComparator</type>
  1247. <expected-output>^1\.0 K\s+hdfs:///dir0/data1k</expected-output>
  1248. </comparator>
  1249. </comparators>
  1250. </test>
  1251. <test> <!-- TESTED -->
  1252. <description>du: Test for hdfs:// path - directory using globbing</description>
  1253. <test-commands>
  1254. <command>-fs NAMENODE -mkdir hdfs:///dir0</command>
  1255. <command>-fs NAMENODE -put CLITEST_DATA/data15bytes hdfs:///dir0/data15bytes</command>
  1256. <command>-fs NAMENODE -put CLITEST_DATA/data30bytes hdfs:///dir0/data30bytes</command>
  1257. <command>-fs NAMENODE -put CLITEST_DATA/data60bytes hdfs:///dir0/data60bytes</command>
  1258. <command>-fs NAMENODE -put CLITEST_DATA/data120bytes hdfs:///dir0/data120bytes</command>
  1259. <command>-fs NAMENODE -du hdfs:///dir0/*</command>
  1260. </test-commands>
  1261. <cleanup-commands>
  1262. <command>-fs NAMENODE -rm -r hdfs:///dir0</command>
  1263. </cleanup-commands>
  1264. <comparators>
  1265. <comparator>
  1266. <type>RegexpComparator</type>
  1267. <expected-output>^15( |\t)*hdfs:///dir0/data15bytes</expected-output>
  1268. </comparator>
  1269. <comparator>
  1270. <type>RegexpComparator</type>
  1271. <expected-output>^30( |\t)*hdfs:///dir0/data30bytes</expected-output>
  1272. </comparator>
  1273. <comparator>
  1274. <type>RegexpComparator</type>
  1275. <expected-output>^60( |\t)*hdfs:///dir0/data60bytes</expected-output>
  1276. </comparator>
  1277. <comparator>
  1278. <type>RegexpComparator</type>
  1279. <expected-output>^120( |\t)*hdfs:///dir0/data120bytes</expected-output>
  1280. </comparator>
  1281. </comparators>
  1282. </test>
  1283. <test> <!-- TESTED -->
  1284. <description>du: Test for Namenode's path - file</description>
  1285. <test-commands>
  1286. <command>-fs NAMENODE -put CLITEST_DATA/data15bytes NAMENODE/data15bytes</command>
  1287. <command>-fs NAMENODE -du NAMENODE/data15bytes</command>
  1288. </test-commands>
  1289. <cleanup-commands>
  1290. <command>-fs NAMENODE -rm NAMENODE/data15bytes</command>
  1291. </cleanup-commands>
  1292. <comparators>
  1293. <comparator>
  1294. <type>RegexpComparator</type>
  1295. <expected-output>^15( |\t)*NAMENODE/data15bytes</expected-output>
  1296. </comparator>
  1297. </comparators>
  1298. </test>
  1299. <test> <!-- TESTED -->
  1300. <description>du: Test for Namenode's path - files using globbing</description>
  1301. <test-commands>
  1302. <command>-fs NAMENODE -put CLITEST_DATA/data15bytes NAMENODE/data15bytes</command>
  1303. <command>-fs NAMENODE -put CLITEST_DATA/data30bytes NAMENODE/data30bytes</command>
  1304. <command>-fs NAMENODE -put CLITEST_DATA/data60bytes NAMENODE/data60bytes</command>
  1305. <command>-fs NAMENODE -put CLITEST_DATA/data120bytes NAMENODE/data120bytes</command>
  1306. <command>-fs NAMENODE -du NAMENODE/data*</command>
  1307. </test-commands>
  1308. <cleanup-commands>
  1309. <command>-fs NAMENODE -rm -r NAMENODE/*</command>
  1310. </cleanup-commands>
  1311. <comparators>
  1312. <comparator>
  1313. <type>RegexpComparator</type>
  1314. <expected-output>^15( |\t)*NAMENODE/data15bytes</expected-output>
  1315. </comparator>
  1316. <comparator>
  1317. <type>RegexpComparator</type>
  1318. <expected-output>^30( |\t)*NAMENODE/data30bytes</expected-output>
  1319. </comparator>
  1320. <comparator>
  1321. <type>RegexpComparator</type>
  1322. <expected-output>^60( |\t)*NAMENODE/data60bytes</expected-output>
  1323. </comparator>
  1324. <comparator>
  1325. <type>RegexpComparator</type>
  1326. <expected-output>^120( |\t)*NAMENODE/data120bytes</expected-output>
  1327. </comparator>
  1328. </comparators>
  1329. </test>
  1330. <test> <!-- TESTED -->
  1331. <description>du: Test for Namenode's path - directory</description>
  1332. <test-commands>
  1333. <command>-fs NAMENODE -mkdir NAMENODE/dir0</command>
  1334. <command>-fs NAMENODE -put CLITEST_DATA/data15bytes NAMENODE/dir0/data15bytes</command>
  1335. <command>-fs NAMENODE -du NAMENODE/dir0</command>
  1336. </test-commands>
  1337. <cleanup-commands>
  1338. <command>-fs NAMENODE -rm -r NAMENODE/dir0</command>
  1339. </cleanup-commands>
  1340. <comparators>
  1341. <comparator>
  1342. <type>RegexpComparator</type>
  1343. <expected-output>^15( |\t)*NAMENODE/dir0/data15bytes</expected-output>
  1344. </comparator>
  1345. </comparators>
  1346. </test>
  1347. <test> <!-- TESTED -->
  1348. <description>du: Test for Namenode's path - directory using globbing</description>
  1349. <test-commands>
  1350. <command>-fs NAMENODE -mkdir NAMENODE/dir0</command>
  1351. <command>-fs NAMENODE -put CLITEST_DATA/data15bytes NAMENODE/dir0/data15bytes</command>
  1352. <command>-fs NAMENODE -put CLITEST_DATA/data30bytes NAMENODE/dir0/data30bytes</command>
  1353. <command>-fs NAMENODE -put CLITEST_DATA/data60bytes NAMENODE/dir0/data60bytes</command>
  1354. <command>-fs NAMENODE -put CLITEST_DATA/data120bytes NAMENODE/dir0/data120bytes</command>
  1355. <command>-fs NAMENODE -du NAMENODE/dir0/*</command>
  1356. </test-commands>
  1357. <cleanup-commands>
  1358. <command>-fs NAMENODE -rm -r NAMENODE/dir0</command>
  1359. </cleanup-commands>
  1360. <comparators>
  1361. <comparator>
  1362. <type>RegexpComparator</type>
  1363. <expected-output>^15( |\t)*NAMENODE/dir0/data15bytes</expected-output>
  1364. </comparator>
  1365. <comparator>
  1366. <type>RegexpComparator</type>
  1367. <expected-output>^30( |\t)*NAMENODE/dir0/data30bytes</expected-output>
  1368. </comparator>
  1369. <comparator>
  1370. <type>RegexpComparator</type>
  1371. <expected-output>^60( |\t)*NAMENODE/dir0/data60bytes</expected-output>
  1372. </comparator>
  1373. <comparator>
  1374. <type>RegexpComparator</type>
  1375. <expected-output>^120( |\t)*NAMENODE/dir0/data120bytes</expected-output>
  1376. </comparator>
  1377. </comparators>
  1378. </test>
  1379. <!-- Tests for dus -->
  1380. <test> <!-- TESTED -->
  1381. <description>dus: directories/files using absolute path</description>
  1382. <test-commands>
  1383. <command>-fs NAMENODE -mkdir /dir0</command>
  1384. <command>-fs NAMENODE -mkdir /dir0/dir1</command>
  1385. <command>-fs NAMENODE -mkdir /dir0/dir1/dir1</command>
  1386. <command>-fs NAMENODE -mkdir /dir0/dir1/dir2</command>
  1387. <command>-fs NAMENODE -mkdir /dir0/dir2</command>
  1388. <command>-fs NAMENODE -mkdir /dir0/dir2/dir1</command>
  1389. <command>-fs NAMENODE -mkdir /dir0/dir2/dir2</command>
  1390. <command>-fs NAMENODE -touchz /dir0/file0</command>
  1391. <command>-fs NAMENODE -put CLITEST_DATA/data15bytes /dir0/dir1/data15bytes</command>
  1392. <command>-fs NAMENODE -put CLITEST_DATA/data30bytes /dir0/dir1/data30bytes</command>
  1393. <command>-fs NAMENODE -put CLITEST_DATA/data15bytes /dir0/dir2/data15bytes</command>
  1394. <command>-fs NAMENODE -put CLITEST_DATA/data30bytes /dir0/dir2/data30bytes</command>
  1395. <command>-fs NAMENODE -put CLITEST_DATA/data60bytes /dir0/dir1/dir1/data60bytes</command>
  1396. <command>-fs NAMENODE -put CLITEST_DATA/data120bytes /dir0/dir1/dir2/data120bytes</command>
  1397. <command>-fs NAMENODE -put CLITEST_DATA/data60bytes /dir0/dir2/dir1/data60bytes</command>
  1398. <command>-fs NAMENODE -put CLITEST_DATA/data120bytes /dir0/dir2/dir2/data120bytes</command>
  1399. <command>-fs NAMENODE -du -s /dir0</command>
  1400. </test-commands>
  1401. <cleanup-commands>
  1402. <command>-fs NAMENODE -rm -r /dir0</command>
  1403. </cleanup-commands>
  1404. <comparators>
  1405. <comparator>
  1406. <type>RegexpComparator</type>
  1407. <expected-output>^450\s+/dir0</expected-output>
  1408. </comparator>
  1409. </comparators>
  1410. </test>
  1411. <test> <!-- TESTED -->
  1412. <description>dus: directories/files using relative path</description>
  1413. <test-commands>
  1414. <command>-fs NAMENODE -mkdir -p dir0</command>
  1415. <command>-fs NAMENODE -mkdir -p dir0/dir1</command>
  1416. <command>-fs NAMENODE -mkdir -p dir0/dir1/dir1</command>
  1417. <command>-fs NAMENODE -mkdir -p dir0/dir1/dir2</command>
  1418. <command>-fs NAMENODE -mkdir -p dir0/dir2</command>
  1419. <command>-fs NAMENODE -mkdir -p dir0/dir2/dir1</command>
  1420. <command>-fs NAMENODE -mkdir -p dir0/dir2/dir2</command>
  1421. <command>-fs NAMENODE -touchz dir0/file0</command>
  1422. <command>-fs NAMENODE -put CLITEST_DATA/data15bytes dir0/dir1/data15bytes</command>
  1423. <command>-fs NAMENODE -put CLITEST_DATA/data30bytes dir0/dir1/data30bytes</command>
  1424. <command>-fs NAMENODE -put CLITEST_DATA/data15bytes dir0/dir2/data15bytes</command>
  1425. <command>-fs NAMENODE -put CLITEST_DATA/data30bytes dir0/dir2/data30bytes</command>
  1426. <command>-fs NAMENODE -put CLITEST_DATA/data60bytes dir0/dir1/dir1/data60bytes</command>
  1427. <command>-fs NAMENODE -put CLITEST_DATA/data120bytes dir0/dir1/dir2/data120bytes</command>
  1428. <command>-fs NAMENODE -put CLITEST_DATA/data60bytes dir0/dir2/dir1/data60bytes</command>
  1429. <command>-fs NAMENODE -put CLITEST_DATA/data120bytes dir0/dir2/dir2/data120bytes</command>
  1430. <command>-fs NAMENODE -du -s dir0</command>
  1431. </test-commands>
  1432. <cleanup-commands>
  1433. <command>-fs NAMENODE -rm -r /user</command>
  1434. </cleanup-commands>
  1435. <comparators>
  1436. <comparator>
  1437. <type>RegexpComparator</type>
  1438. <expected-output>^450\s+dir0</expected-output>
  1439. </comparator>
  1440. </comparators>
  1441. </test>
  1442. <test> <!-- TESTED -->
  1443. <description>dus: directories/files using globbing</description>
  1444. <test-commands>
  1445. <command>-fs NAMENODE -mkdir /dir0</command>
  1446. <command>-fs NAMENODE -mkdir /dir0/dir1</command>
  1447. <command>-fs NAMENODE -mkdir /dir0/dir1/dir1</command>
  1448. <command>-fs NAMENODE -mkdir /dir0/dir1/dir2</command>
  1449. <command>-fs NAMENODE -mkdir /dir0/dir2</command>
  1450. <command>-fs NAMENODE -mkdir /dir0/dir2/dir1</command>
  1451. <command>-fs NAMENODE -mkdir /dir0/dir2/dir2</command>
  1452. <command>-fs NAMENODE -touchz /dir0/file0</command>
  1453. <command>-fs NAMENODE -put CLITEST_DATA/data15bytes /dir0/dir1/data15bytes</command>
  1454. <command>-fs NAMENODE -put CLITEST_DATA/data30bytes /dir0/dir1/data30bytes</command>
  1455. <command>-fs NAMENODE -put CLITEST_DATA/data15bytes /dir0/dir2/data15bytes</command>
  1456. <command>-fs NAMENODE -put CLITEST_DATA/data30bytes /dir0/dir2/data30bytes</command>
  1457. <command>-fs NAMENODE -put CLITEST_DATA/data60bytes /dir0/dir1/dir1/data60bytes</command>
  1458. <command>-fs NAMENODE -put CLITEST_DATA/data120bytes /dir0/dir1/dir2/data120bytes</command>
  1459. <command>-fs NAMENODE -put CLITEST_DATA/data60bytes /dir0/dir2/dir1/data60bytes</command>
  1460. <command>-fs NAMENODE -put CLITEST_DATA/data120bytes /dir0/dir2/dir2/data120bytes</command>
  1461. <command>-fs NAMENODE -mkdir /donotcountdir0</command>
  1462. <command>-fs NAMENODE -put CLITEST_DATA/data15bytes /donotcountdir0/data15bytes</command>
  1463. <command>-fs NAMENODE -put CLITEST_DATA/data15bytes /donotcountdir0/data15bytes</command>
  1464. <command>-fs NAMENODE -put CLITEST_DATA/data15bytes /donotcountdir0/data15bytes</command>
  1465. <command>-fs NAMENODE -put CLITEST_DATA/data15bytes /donotcountdir0/data15bytes</command>
  1466. <command>-fs NAMENODE -du -s /dir*</command>
  1467. </test-commands>
  1468. <cleanup-commands>
  1469. <command>-fs NAMENODE -rm -r /dir0</command>
  1470. <command>-fs NAMENODE -rm -r /donotcountdir0</command>
  1471. </cleanup-commands>
  1472. <comparators>
  1473. <comparator>
  1474. <type>RegexpComparator</type>
  1475. <expected-output>^450\s+/dir0</expected-output>
  1476. </comparator>
  1477. </comparators>
  1478. </test>
  1479. <!-- Tests for dus -->
  1480. <test> <!-- TESTED -->
  1481. <description>dus: Test for hdfs:// path - directories/files</description>
  1482. <test-commands>
  1483. <command>-fs NAMENODE -mkdir hdfs:///dir0</command>
  1484. <command>-fs NAMENODE -mkdir hdfs:///dir0/dir1</command>
  1485. <command>-fs NAMENODE -mkdir hdfs:///dir0/dir1/dir1</command>
  1486. <command>-fs NAMENODE -mkdir hdfs:///dir0/dir1/dir2</command>
  1487. <command>-fs NAMENODE -mkdir hdfs:///dir0/dir2</command>
  1488. <command>-fs NAMENODE -mkdir hdfs:///dir0/dir2/dir1</command>
  1489. <command>-fs NAMENODE -mkdir hdfs:///dir0/dir2/dir2</command>
  1490. <command>-fs NAMENODE -touchz hdfs:///dir0/file0</command>
  1491. <command>-fs NAMENODE -put CLITEST_DATA/data15bytes hdfs:///dir0/dir1/data15bytes</command>
  1492. <command>-fs NAMENODE -put CLITEST_DATA/data30bytes hdfs:///dir0/dir1/data30bytes</command>
  1493. <command>-fs NAMENODE -put CLITEST_DATA/data15bytes hdfs:///dir0/dir2/data15bytes</command>
  1494. <command>-fs NAMENODE -put CLITEST_DATA/data30bytes hdfs:///dir0/dir2/data30bytes</command>
  1495. <command>-fs NAMENODE -put CLITEST_DATA/data60bytes hdfs:///dir0/dir1/dir1/data60bytes</command>
  1496. <command>-fs NAMENODE -put CLITEST_DATA/data120bytes hdfs:///dir0/dir1/dir2/data120bytes</command>
  1497. <command>-fs NAMENODE -put CLITEST_DATA/data60bytes hdfs:///dir0/dir2/dir1/data60bytes</command>
  1498. <command>-fs NAMENODE -put CLITEST_DATA/data120bytes hdfs:///dir0/dir2/dir2/data120bytes</command>
  1499. <command>-fs NAMENODE -du -s hdfs:///dir0</command>
  1500. </test-commands>
  1501. <cleanup-commands>
  1502. <command>-fs NAMENODE -rm -r hdfs:///dir0</command>
  1503. </cleanup-commands>
  1504. <comparators>
  1505. <comparator>
  1506. <type>RegexpComparator</type>
  1507. <expected-output>^450\s+hdfs:///dir0</expected-output>
  1508. </comparator>
  1509. </comparators>
  1510. </test>
  1511. <test> <!-- TESTED -->
  1512. <description>dus: Test for hdfs:// path - directories/files using globbing</description>
  1513. <test-commands>
  1514. <command>-fs NAMENODE -mkdir hdfs:///dir0</command>
  1515. <command>-fs NAMENODE -mkdir hdfs:///dir0/dir1</command>
  1516. <command>-fs NAMENODE -mkdir hdfs:///dir0/dir1/dir1</command>
  1517. <command>-fs NAMENODE -mkdir hdfs:///dir0/dir1/dir2</command>
  1518. <command>-fs NAMENODE -mkdir hdfs:///dir0/dir2</command>
  1519. <command>-fs NAMENODE -mkdir hdfs:///dir0/dir2/dir1</command>
  1520. <command>-fs NAMENODE -mkdir hdfs:///dir0/dir2/dir2</command>
  1521. <command>-fs NAMENODE -touchz hdfs:///dir0/file0</command>
  1522. <command>-fs NAMENODE -put CLITEST_DATA/data15bytes hdfs:///dir0/dir1/data15bytes</command>
  1523. <command>-fs NAMENODE -put CLITEST_DATA/data30bytes hdfs:///dir0/dir1/data30bytes</command>
  1524. <command>-fs NAMENODE -put CLITEST_DATA/data15bytes hdfs:///dir0/dir2/data15bytes</command>
  1525. <command>-fs NAMENODE -put CLITEST_DATA/data30bytes hdfs:///dir0/dir2/data30bytes</command>
  1526. <command>-fs NAMENODE -put CLITEST_DATA/data60bytes hdfs:///dir0/dir1/dir1/data60bytes</command>
  1527. <command>-fs NAMENODE -put CLITEST_DATA/data120bytes hdfs:///dir0/dir1/dir2/data120bytes</command>
  1528. <command>-fs NAMENODE -put CLITEST_DATA/data60bytes hdfs:///dir0/dir2/dir1/data60bytes</command>
  1529. <command>-fs NAMENODE -put CLITEST_DATA/data120bytes hdfs:///dir0/dir2/dir2/data120bytes</command>
  1530. <command>-fs NAMENODE -mkdir /donotcountdir0</command>
  1531. <command>-fs NAMENODE -put CLITEST_DATA/data15bytes hdfs:///donotcountdir0/data15bytes</command>
  1532. <command>-fs NAMENODE -put CLITEST_DATA/data15bytes hdfs:///donotcountdir0/data15bytes</command>
  1533. <command>-fs NAMENODE -put CLITEST_DATA/data15bytes hdfs:///donotcountdir0/data15bytes</command>
  1534. <command>-fs NAMENODE -put CLITEST_DATA/data15bytes hdfs:///donotcountdir0/data15bytes</command>
  1535. <command>-fs NAMENODE -du -s hdfs:///dir*</command>
  1536. </test-commands>
  1537. <cleanup-commands>
  1538. <command>-fs NAMENODE -rm -r hdfs:///dir0</command>
  1539. <command>-fs NAMENODE -rm -r hdfs:///donotcountdir0</command>
  1540. </cleanup-commands>
  1541. <comparators>
  1542. <comparator>
  1543. <type>RegexpComparator</type>
  1544. <expected-output>^450\s+hdfs:///dir0</expected-output>
  1545. </comparator>
  1546. </comparators>
  1547. </test>
  1548. <test> <!-- TESTED -->
  1549. <description>dus: Test for Namenode's path - directories/files</description>
  1550. <test-commands>
  1551. <command>-fs NAMENODE -mkdir NAMENODE/dir0</command>
  1552. <command>-fs NAMENODE -mkdir NAMENODE/dir0/dir1</command>
  1553. <command>-fs NAMENODE -mkdir NAMENODE/dir0/dir1/dir1</command>
  1554. <command>-fs NAMENODE -mkdir NAMENODE/dir0/dir1/dir2</command>
  1555. <command>-fs NAMENODE -mkdir NAMENODE/dir0/dir2</command>
  1556. <command>-fs NAMENODE -mkdir NAMENODE/dir0/dir2/dir1</command>
  1557. <command>-fs NAMENODE -mkdir NAMENODE/dir0/dir2/dir2</command>
  1558. <command>-fs NAMENODE -touchz NAMENODE/dir0/file0</command>
  1559. <command>-fs NAMENODE -put CLITEST_DATA/data15bytes NAMENODE/dir0/dir1/data15bytes</command>
  1560. <command>-fs NAMENODE -put CLITEST_DATA/data30bytes NAMENODE/dir0/dir1/data30bytes</command>
  1561. <command>-fs NAMENODE -put CLITEST_DATA/data15bytes NAMENODE/dir0/dir2/data15bytes</command>
  1562. <command>-fs NAMENODE -put CLITEST_DATA/data30bytes NAMENODE/dir0/dir2/data30bytes</command>
  1563. <command>-fs NAMENODE -put CLITEST_DATA/data60bytes NAMENODE/dir0/dir1/dir1/data60bytes</command>
  1564. <command>-fs NAMENODE -put CLITEST_DATA/data120bytes NAMENODE/dir0/dir1/dir2/data120bytes</command>
  1565. <command>-fs NAMENODE -put CLITEST_DATA/data60bytes NAMENODE/dir0/dir2/dir1/data60bytes</command>
  1566. <command>-fs NAMENODE -put CLITEST_DATA/data120bytes NAMENODE/dir0/dir2/dir2/data120bytes</command>
  1567. <command>-fs NAMENODE -du -s NAMENODE/dir0</command>
  1568. </test-commands>
  1569. <cleanup-commands>
  1570. <command>-fs NAMENODE -rm -r NAMENODE/dir0</command>
  1571. </cleanup-commands>
  1572. <comparators>
  1573. <comparator>
  1574. <type>RegexpComparator</type>
  1575. <expected-output>^450\s+NAMENODE/dir0</expected-output>
  1576. </comparator>
  1577. </comparators>
  1578. </test>
  1579. <test> <!-- TESTED -->
  1580. <description>dus: Test for Namenode's path - directories/files using globbing</description>
  1581. <test-commands>
  1582. <command>-fs NAMENODE -mkdir NAMENODE/dir0</command>
  1583. <command>-fs NAMENODE -mkdir NAMENODE/dir0/dir1</command>
  1584. <command>-fs NAMENODE -mkdir NAMENODE/dir0/dir1/dir1</command>
  1585. <command>-fs NAMENODE -mkdir NAMENODE/dir0/dir1/dir2</command>
  1586. <command>-fs NAMENODE -mkdir NAMENODE/dir0/dir2</command>
  1587. <command>-fs NAMENODE -mkdir NAMENODE/dir0/dir2/dir1</command>
  1588. <command>-fs NAMENODE -mkdir NAMENODE/dir0/dir2/dir2</command>
  1589. <command>-fs NAMENODE -touchz NAMENODE/dir0/file0</command>
  1590. <command>-fs NAMENODE -put CLITEST_DATA/data15bytes NAMENODE/dir0/dir1/data15bytes</command>
  1591. <command>-fs NAMENODE -put CLITEST_DATA/data30bytes NAMENODE/dir0/dir1/data30bytes</command>
  1592. <command>-fs NAMENODE -put CLITEST_DATA/data15bytes NAMENODE/dir0/dir2/data15bytes</command>
  1593. <command>-fs NAMENODE -put CLITEST_DATA/data30bytes NAMENODE/dir0/dir2/data30bytes</command>
  1594. <command>-fs NAMENODE -put CLITEST_DATA/data60bytes NAMENODE/dir0/dir1/dir1/data60bytes</command>
  1595. <command>-fs NAMENODE -put CLITEST_DATA/data120bytes NAMENODE/dir0/dir1/dir2/data120bytes</command>
  1596. <command>-fs NAMENODE -put CLITEST_DATA/data60bytes NAMENODE/dir0/dir2/dir1/data60bytes</command>
  1597. <command>-fs NAMENODE -put CLITEST_DATA/data120bytes NAMENODE/dir0/dir2/dir2/data120bytes</command>
  1598. <command>-fs NAMENODE -mkdir NAMENODE/donotcountdir0</command>
  1599. <command>-fs NAMENODE -put CLITEST_DATA/data15bytes NAMENODE/donotcountdir0/data15bytes</command>
  1600. <command>-fs NAMENODE -put CLITEST_DATA/data15bytes NAMENODE/donotcountdir0/data15bytes</command>
  1601. <command>-fs NAMENODE -put CLITEST_DATA/data15bytes NAMENODE/donotcountdir0/data15bytes</command>
  1602. <command>-fs NAMENODE -put CLITEST_DATA/data15bytes NAMENODE/donotcountdir0/data15bytes</command>
  1603. <command>-fs NAMENODE -du -s NAMENODE/dir*</command>
  1604. </test-commands>
  1605. <cleanup-commands>
  1606. <command>-fs NAMENODE -rm -r NAMENODE/dir0</command>
  1607. <command>-fs NAMENODE -rm -r NAMENODE/donotcountdir0</command>
  1608. </cleanup-commands>
  1609. <comparators>
  1610. <comparator>
  1611. <type>RegexpComparator</type>
  1612. <expected-output>^450\s+NAMENODE/dir0</expected-output>
  1613. </comparator>
  1614. </comparators>
  1615. </test>
  1616. <!-- Tests for mv -->
  1617. <test> <!-- TESTED -->
  1618. <description>mv: file (absolute path) to file (absolute path)</description>
  1619. <test-commands>
  1620. <command>-fs NAMENODE -touchz /file1</command>
  1621. <command>-fs NAMENODE -mv /file1 /file2</command>
  1622. <command>-fs NAMENODE -ls /file*</command>
  1623. </test-commands>
  1624. <cleanup-commands>
  1625. <command>-fs NAMENODE -rm /file2</command>
  1626. </cleanup-commands>:
  1627. <comparators>
  1628. <comparator>
  1629. <type>RegexpComparator</type>
  1630. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/file2</expected-output>
  1631. </comparator>
  1632. <comparator>
  1633. <type>RegexpComparator</type>
  1634. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/file[^1]</expected-output>
  1635. </comparator>
  1636. </comparators>
  1637. </test>
  1638. <test> <!-- TESTED -->
  1639. <description>mv: file (absolute path) to file (relative path)</description>
  1640. <test-commands>
  1641. <command>-fs NAMENODE -touchz /file1</command>
  1642. <command>-fs NAMENODE -mv /file1 file2</command>
  1643. </test-commands>
  1644. <cleanup-commands>
  1645. <command>-fs NAMENODE -rm -r /file1</command>
  1646. </cleanup-commands>
  1647. <comparators>
  1648. <comparator>
  1649. <type>RegexpComparator</type>
  1650. <expected-output>^mv: `file2': No such file or directory</expected-output>
  1651. </comparator>
  1652. </comparators>
  1653. </test>
  1654. <test> <!-- TESTED -->
  1655. <description>mv: file (absolute path) to directory (absolute path); keep the same name at the destination</description>
  1656. <test-commands>
  1657. <command>-fs NAMENODE -touchz /file1</command>
  1658. <command>-fs NAMENODE -mkdir /dir0</command>
  1659. <command>-fs NAMENODE -mv /file1 /dir0</command>
  1660. <command>-fs NAMENODE -ls -R /dir0</command>
  1661. </test-commands>
  1662. <cleanup-commands>
  1663. <command>-fs NAMENODE -rm -r /dir0</command>
  1664. </cleanup-commands>
  1665. <comparators>
  1666. <comparator>
  1667. <type>RegexpComparator</type>
  1668. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/file1</expected-output>
  1669. </comparator>
  1670. </comparators>
  1671. </test>
  1672. <test> <!-- TESTED -->
  1673. <description>mv: file (absolute path) to directory (absolute path); keep the same name at the destination [ TIED to previous test ]</description>
  1674. <test-commands>
  1675. <command>-fs NAMENODE -ls /file1</command>
  1676. </test-commands>
  1677. <cleanup-commands>
  1678. </cleanup-commands>
  1679. <comparators>
  1680. <comparator>
  1681. <type>TokenComparator</type>
  1682. <expected-output>ls: `/file1': No such file or directory</expected-output>
  1683. </comparator>
  1684. </comparators>
  1685. </test>
  1686. <test> <!-- TESTED -->
  1687. <description>mv: file (absolute path) to directory (absolute path); change the name at the destination</description>
  1688. <test-commands>
  1689. <command>-fs NAMENODE -touchz /file1</command>
  1690. <command>-fs NAMENODE -mkdir /dir0</command>
  1691. <command>-fs NAMENODE -mv /file1 /dir0/file2</command>
  1692. <command>-fs NAMENODE -ls /dir0</command>
  1693. </test-commands>
  1694. <cleanup-commands>
  1695. <command>-fs NAMENODE -rm -r /dir0</command>
  1696. </cleanup-commands>
  1697. <comparators>
  1698. <comparator>
  1699. <type>RegexpComparator</type>
  1700. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/file2</expected-output>
  1701. </comparator>
  1702. </comparators>
  1703. </test>
  1704. <test> <!-- TESTED -->
  1705. <description>mv: file (absolute path) to directory (absolute path); change the name at the destination [ TIED to previous test ]</description>
  1706. <test-commands>
  1707. <command>-fs NAMENODE -ls /file1</command>
  1708. </test-commands>
  1709. <cleanup-commands>
  1710. </cleanup-commands>
  1711. <comparators>
  1712. <comparator>
  1713. <type>TokenComparator</type>
  1714. <expected-output>ls: `/file1': No such file or directory</expected-output>
  1715. </comparator>
  1716. </comparators>
  1717. </test>
  1718. <test> <!-- TESTED -->
  1719. <description>mv: files (absolute path) to directory (absolute path) using globbing</description>
  1720. <test-commands>
  1721. <command>-fs NAMENODE -touchz /file1</command>
  1722. <command>-fs NAMENODE -touchz /file2</command>
  1723. <command>-fs NAMENODE -touchz /file3</command>
  1724. <command>-fs NAMENODE -touchz /file4</command>
  1725. <command>-fs NAMENODE -mkdir /dir0</command>
  1726. <command>-fs NAMENODE -mv /file* /dir0</command>
  1727. <command>-fs NAMENODE -ls -R /*</command>
  1728. </test-commands>
  1729. <cleanup-commands>
  1730. <command>-fs NAMENODE -rm -r /dir0</command>
  1731. </cleanup-commands>
  1732. <comparators>
  1733. <comparator>
  1734. <type>RegexpComparator</type>
  1735. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/file1</expected-output>
  1736. </comparator>
  1737. <comparator>
  1738. <type>RegexpComparator</type>
  1739. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/file2</expected-output>
  1740. </comparator>
  1741. <comparator>
  1742. <type>RegexpComparator</type>
  1743. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/file3</expected-output>
  1744. </comparator>
  1745. <comparator>
  1746. <type>RegexpComparator</type>
  1747. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/file4</expected-output>
  1748. </comparator>
  1749. </comparators>
  1750. </test>
  1751. <test> <!-- TESTED -->
  1752. <description>mv: files (absolute path) to directory (absolute path) using globbing [ TIED to previous test ]</description>
  1753. <test-commands>
  1754. <command>-fs NAMENODE -ls /file*</command>
  1755. </test-commands>
  1756. <cleanup-commands>
  1757. </cleanup-commands>
  1758. <comparators>
  1759. <comparator>
  1760. <type>TokenComparator</type>
  1761. <expected-output>ls: `/file*': No such file or directory</expected-output>
  1762. </comparator>
  1763. </comparators>
  1764. </test>
  1765. <test> <!-- TESTED -->
  1766. <description>mv: file (relative) to file (relative)</description>
  1767. <test-commands>
  1768. <command>-fs NAMENODE -mkdir -p dir</command> <!-- make sure user home dir exists -->
  1769. <command>-fs NAMENODE -touchz file1</command>
  1770. <command>-fs NAMENODE -mv file1 file2</command>
  1771. <command>-fs NAMENODE -ls file*</command>
  1772. </test-commands>
  1773. <cleanup-commands>
  1774. <command>-fs NAMENODE -rm /user</command>
  1775. </cleanup-commands>
  1776. <comparators>
  1777. <comparator>
  1778. <type>RegexpComparator</type>
  1779. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*file2</expected-output>
  1780. </comparator>
  1781. <comparator>
  1782. <type>RegexpComparator</type>
  1783. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*file[^1]</expected-output>
  1784. </comparator>
  1785. </comparators>
  1786. </test>
  1787. <test> <!-- TESTED -->
  1788. <description>mv: moving file to file(rename in for hdfs:// path) </description>
  1789. <test-commands>
  1790. <command>-fs NAMENODE -touchz hdfs:///file1</command>
  1791. <command>-fs NAMENODE -mv hdfs:///file1 hdfs:///file2</command>
  1792. <command>-fs NAMENODE -ls hdfs:///file*</command>
  1793. </test-commands>
  1794. <cleanup-commands>
  1795. <command>-fs NAMENODE -rm hdfs:///file2</command>
  1796. </cleanup-commands>:
  1797. <comparators>
  1798. <comparator>
  1799. <type>RegexpComparator</type>
  1800. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///file2</expected-output>
  1801. </comparator>
  1802. <comparator>
  1803. <type>RegexpComparator</type>
  1804. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///file[^1]</expected-output>
  1805. </comparator>
  1806. </comparators>
  1807. </test>
  1808. <test> <!-- TESTED -->
  1809. <description>mv: moving file to directory (keep the same name at the destination) in hdfs:// path - </description>
  1810. <test-commands>
  1811. <command>-fs NAMENODE -touchz hdfs:///file1</command>
  1812. <command>-fs NAMENODE -mkdir hdfs:///dir0</command>
  1813. <command>-fs NAMENODE -mv hdfs:///file1 hdfs:///dir0</command>
  1814. <command>-fs NAMENODE -ls -R hdfs:///dir0</command>
  1815. </test-commands>
  1816. <cleanup-commands>
  1817. <command>-fs NAMENODE -rm -r hdfs:///dir0</command>
  1818. </cleanup-commands>
  1819. <comparators>
  1820. <comparator>
  1821. <type>RegexpComparator</type>
  1822. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir0/file1</expected-output>
  1823. </comparator>
  1824. </comparators>
  1825. </test>
  1826. <test> <!-- TESTED -->
  1827. <description>mv: moving files to directory in hdfs:// path - [ TIED to previous test ]</description>
  1828. <test-commands>
  1829. <command>-fs NAMENODE -ls hdfs:///file*</command>
  1830. </test-commands>
  1831. <cleanup-commands>
  1832. </cleanup-commands>
  1833. <comparators>
  1834. <comparator>
  1835. <type>TokenComparator</type>
  1836. <expected-output>ls: `hdfs:///file*': No such file or directory</expected-output>
  1837. </comparator>
  1838. </comparators>
  1839. </test>
  1840. <test> <!-- TESTED -->
  1841. <description>mv: moving file that does not exist in hdfs:// path </description>
  1842. <test-commands>
  1843. <command>-fs NAMENODE -mv hdfs:///file1 hdfs:///file2</command>
  1844. </test-commands>
  1845. <cleanup-commands>
  1846. </cleanup-commands>
  1847. <comparators>
  1848. <comparator>
  1849. <type>TokenComparator</type>
  1850. <expected-output>mv: `hdfs:///file1': No such file or directory</expected-output>
  1851. </comparator>
  1852. </comparators>
  1853. </test>
  1854. <test> <!-- TESTED -->
  1855. <description>mv: moving file to directory (different name at the destination) in hdfs:// path </description>
  1856. <test-commands>
  1857. <command>-fs NAMENODE -touchz hdfs:///file1</command>
  1858. <command>-fs NAMENODE -mkdir hdfs:///dir0</command>
  1859. <command>-fs NAMENODE -mv hdfs:///file1 hdfs:///dir0/file2</command>
  1860. <command>-fs NAMENODE -ls hdfs:///dir0</command>
  1861. </test-commands>
  1862. <cleanup-commands>
  1863. <command>-fs NAMENODE -rm -r hdfs:///dir0</command>
  1864. </cleanup-commands>
  1865. <comparators>
  1866. <comparator>
  1867. <type>RegexpComparator</type>
  1868. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir0/file2</expected-output>
  1869. </comparator>
  1870. </comparators>
  1871. </test>
  1872. <test> <!-- TESTED -->
  1873. <description>mv: moving file to directory (different name at the destination) in hdfs:// path [ TIED to previous test ]</description>
  1874. <test-commands>
  1875. <command>-fs NAMENODE -ls hdfs:///file1</command>
  1876. </test-commands>
  1877. <cleanup-commands>
  1878. </cleanup-commands>
  1879. <comparators>
  1880. <comparator>
  1881. <type>TokenComparator</type>
  1882. <expected-output>ls: `hdfs:///file1': No such file or directory</expected-output>
  1883. </comparator>
  1884. </comparators>
  1885. </test>
  1886. <test> <!-- TESTED -->
  1887. <description>mv: moving group of files to directory using globbing in hdfs:// path - </description>
  1888. <test-commands>
  1889. <command>-fs NAMENODE -touchz hdfs:///file1</command>
  1890. <command>-fs NAMENODE -touchz hdfs:///file2</command>
  1891. <command>-fs NAMENODE -touchz hdfs:///file3</command>
  1892. <command>-fs NAMENODE -mkdir hdfs:///dir0</command>
  1893. <command>-fs NAMENODE -mv hdfs:///file* hdfs:///dir0</command>
  1894. <command>-fs NAMENODE -ls -R hdfs:///*</command>
  1895. </test-commands>
  1896. <cleanup-commands>
  1897. <command>-fs NAMENODE -rm -r hdfs:///dir0</command>
  1898. </cleanup-commands>
  1899. <comparators>
  1900. <comparator>
  1901. <type>RegexpComparator</type>
  1902. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir0/file1</expected-output>
  1903. </comparator>
  1904. <comparator>
  1905. <type>RegexpComparator</type>
  1906. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir0/file2</expected-output>
  1907. </comparator>
  1908. <comparator>
  1909. <type>RegexpComparator</type>
  1910. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir0/file3</expected-output>
  1911. </comparator>
  1912. </comparators>
  1913. </test>
  1914. <test> <!-- TESTED -->
  1915. <description>mv: moving files to directory using globbing in hdfs:// [ TIED to previous test ]</description>
  1916. <test-commands>
  1917. <command>-fs NAMENODE -ls hdfs:///file*</command>
  1918. </test-commands>
  1919. <cleanup-commands>
  1920. </cleanup-commands>
  1921. <comparators>
  1922. <comparator>
  1923. <type>TokenComparator</type>
  1924. <expected-output>ls: `hdfs:///file*': No such file or directory</expected-output>
  1925. </comparator>
  1926. </comparators>
  1927. </test>
  1928. <test> <!-- TESTED -->
  1929. <description>mv: moving file to file(rename) in Namenode's path - </description>
  1930. <test-commands>
  1931. <command>-fs NAMENODE -touchz NAMENODE/file1</command>
  1932. <command>-fs NAMENODE -mv NAMENODE/file1 NAMENODE/file2</command>
  1933. <command>-fs NAMENODE -ls NAMENODE/file*</command>
  1934. </test-commands>
  1935. <cleanup-commands>
  1936. <command>-fs NAMENODE -rm NAMENODE/file2</command>
  1937. </cleanup-commands>:
  1938. <comparators>
  1939. <comparator>
  1940. <type>RegexpComparator</type>
  1941. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/file2</expected-output>
  1942. </comparator>
  1943. <comparator>
  1944. <type>RegexpComparator</type>
  1945. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/file[^1]</expected-output>
  1946. </comparator>
  1947. </comparators>
  1948. </test>
  1949. <test> <!-- TESTED -->
  1950. <description>mv: moving file to directory (keep the same name at the destination) in Namenode's path </description>
  1951. <test-commands>
  1952. <command>-fs NAMENODE -touchz NAMENODE/file1</command>
  1953. <command>-fs NAMENODE -mkdir NAMENODE/dir0</command>
  1954. <command>-fs NAMENODE -mv NAMENODE/file1 NAMENODE/dir0</command>
  1955. <command>-fs NAMENODE -ls -R NAMENODE/dir0</command>
  1956. </test-commands>
  1957. <cleanup-commands>
  1958. <command>-fs NAMENODE -rm -r NAMENODE/dir0</command>
  1959. </cleanup-commands>
  1960. <comparators>
  1961. <comparator>
  1962. <type>RegexpComparator</type>
  1963. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir0/file1</expected-output>
  1964. </comparator>
  1965. </comparators>
  1966. </test>
  1967. <test> <!-- TESTED -->
  1968. <description>mv: moving files to directory in Namenode's path - [ TIED to previous test ]</description>
  1969. <test-commands>
  1970. <command>-fs NAMENODE -ls NAMENODE/file1</command>
  1971. </test-commands>
  1972. <cleanup-commands>
  1973. </cleanup-commands>
  1974. <comparators>
  1975. <comparator>
  1976. <type>RegexpComparator</type>
  1977. <expected-output>^ls: `hdfs://\w+[-.a-z0-9]*:[0-9]+/file1': No such file or directory</expected-output>
  1978. </comparator>
  1979. </comparators>
  1980. </test>
  1981. <test> <!-- TESTED -->
  1982. <description>mv: moving file that does not exist in Namenode's path </description>
  1983. <test-commands>
  1984. <command>-fs NAMENODE -mv NAMENODE/file1 NAMENODE/file2</command>
  1985. </test-commands>
  1986. <cleanup-commands>
  1987. </cleanup-commands>
  1988. <comparators>
  1989. <comparator>
  1990. <type>RegexpComparator</type>
  1991. <expected-output>^mv: `hdfs://\w+[-.a-z0-9]*:[0-9]+/file1': No such file or directory</expected-output>
  1992. </comparator>
  1993. </comparators>
  1994. </test>
  1995. <test> <!-- TESTED -->
  1996. <description>mv: moving file to directory (different name at the destination) in Namenode's path </description>
  1997. <test-commands>
  1998. <command>-fs NAMENODE -touchz NAMENODE/file1</command>
  1999. <command>-fs NAMENODE -mkdir NAMENODE/dir0</command>
  2000. <command>-fs NAMENODE -mv NAMENODE/file1 NAMENODE/dir0/file2</command>
  2001. <command>-fs NAMENODE -ls NAMENODE/dir0</command>
  2002. </test-commands>
  2003. <cleanup-commands>
  2004. <command>-fs NAMENODE -rm -r NAMENODE/dir0</command>
  2005. </cleanup-commands>
  2006. <comparators>
  2007. <comparator>
  2008. <type>RegexpComparator</type>
  2009. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir0/file2</expected-output>
  2010. </comparator>
  2011. </comparators>
  2012. </test>
  2013. <test> <!-- TESTED -->
  2014. <description>mv: moving file to directory (different name at the destination) in Namenode's path [ TIED to previous test ]</description>
  2015. <test-commands>
  2016. <command>-fs NAMENODE -ls NAMENODE/file1</command>
  2017. </test-commands>
  2018. <cleanup-commands>
  2019. </cleanup-commands>
  2020. <comparators>
  2021. <comparator>
  2022. <type>RegexpComparator</type>
  2023. <expected-output>^ls: `NAMENODE/file1': No such file or directory</expected-output>
  2024. </comparator>
  2025. </comparators>
  2026. </test>
  2027. <test> <!-- TESTED -->
  2028. <description>mv: moving group of files to directory using globbing in Namenode's path </description>
  2029. <test-commands>
  2030. <command>-fs NAMENODE -touchz NAMENODE/file1</command>
  2031. <command>-fs NAMENODE -touchz NAMENODE/file2</command>
  2032. <command>-fs NAMENODE -touchz NAMENODE/file3</command>
  2033. <command>-fs NAMENODE -mkdir NAMENODE/dir0</command>
  2034. <command>-fs NAMENODE -mv NAMENODE/file* NAMENODE/dir0</command>
  2035. <command>-fs NAMENODE -ls -R NAMENODE/*</command>
  2036. </test-commands>
  2037. <cleanup-commands>
  2038. <command>-fs NAMENODE -rm -r NAMENODE/dir0</command>
  2039. </cleanup-commands>
  2040. <comparators>
  2041. <comparator>
  2042. <type>RegexpComparator</type>
  2043. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir0/file1</expected-output>
  2044. </comparator>
  2045. <comparator>
  2046. <type>RegexpComparator</type>
  2047. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir0/file2</expected-output>
  2048. </comparator>
  2049. <comparator>
  2050. <type>RegexpComparator</type>
  2051. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir0/file3</expected-output>
  2052. </comparator>
  2053. </comparators>
  2054. </test>
  2055. <test> <!-- TESTED -->
  2056. <description>mv: moving files to directory using globbing in Namenode's path [ TIED to previous test ]</description>
  2057. <test-commands>
  2058. <command>-fs NAMENODE -ls NAMENODE/file*</command>
  2059. </test-commands>
  2060. <cleanup-commands>
  2061. </cleanup-commands>
  2062. <comparators>
  2063. <comparator>
  2064. <type>RegexpComparator</type>
  2065. <expected-output>^ls: `hdfs://\w+[-.a-z0-9]*:[0-9]+/file\*': No such file or directory</expected-output>
  2066. </comparator>
  2067. </comparators>
  2068. </test>
  2069. <test> <!-- TESTED -->
  2070. <description>mv: moving directory to directory in hdfs:// path </description>
  2071. <test-commands>
  2072. <command>-fs NAMENODE -mkdir hdfs:///dir0</command>
  2073. <command>-fs NAMENODE -mkdir hdfs:///dir1</command>
  2074. <command>-fs NAMENODE -touchz hdfs:///dir0/file1</command>
  2075. <command>-fs NAMENODE -mv hdfs:///dir0 hdfs:///dir1</command>
  2076. <command>-fs NAMENODE -ls -R hdfs:///dir1</command>
  2077. </test-commands>
  2078. <cleanup-commands>
  2079. <command>-fs NAMENODE -rm hdfs:///dir1</command>
  2080. </cleanup-commands>
  2081. <comparators>
  2082. <comparator>
  2083. <type>RegexpComparator</type>
  2084. <expected-output>^drwxr-xr-x( )*-( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir1/dir0</expected-output>
  2085. </comparator>
  2086. <comparator>
  2087. <type>RegexpComparator</type>
  2088. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir1/dir0/file1</expected-output>
  2089. </comparator>
  2090. </comparators>
  2091. </test>
  2092. <test> <!-- TESTED -->
  2093. <description>mv: moving directory to directory in Namenode's path </description>
  2094. <test-commands>
  2095. <command>-fs NAMENODE -mkdir NAMENODE/dir0</command>
  2096. <command>-fs NAMENODE -mkdir NAMENODE/dir1</command>
  2097. <command>-fs NAMENODE -touchz NAMENODE/dir0/file1</command>
  2098. <command>-fs NAMENODE -mv NAMENODE/dir0 NAMENODE/dir1</command>
  2099. <command>-fs NAMENODE -ls -R NAMENODE/dir1</command>
  2100. </test-commands>
  2101. <cleanup-commands>
  2102. <command>-fs NAMENODE -rm NAMENODE/dir1</command>
  2103. </cleanup-commands>
  2104. <comparators>
  2105. <comparator>
  2106. <type>RegexpComparator</type>
  2107. <expected-output>^drwxr-xr-x( )*-( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir1/dir0</expected-output>
  2108. </comparator>
  2109. <comparator>
  2110. <type>RegexpComparator</type>
  2111. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir1/dir0/file1</expected-output>
  2112. </comparator>
  2113. </comparators>
  2114. </test>
  2115. <!-- Tests for cp-->
  2116. <test> <!-- TESTED -->
  2117. <description>cp: file (absolute path) to file (absolute path)</description>
  2118. <test-commands>
  2119. <command>-fs NAMENODE -touchz /file1</command>
  2120. <command>-fs NAMENODE -cp /file1 /file2</command>
  2121. <command>-fs NAMENODE -ls /file*</command>
  2122. </test-commands>
  2123. <cleanup-commands>
  2124. <command>-fs NAMENODE -rm /file*</command>
  2125. </cleanup-commands>:
  2126. <comparators>
  2127. <comparator>
  2128. <type>RegexpComparator</type>
  2129. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/file1</expected-output>
  2130. </comparator>
  2131. <comparator>
  2132. <type>RegexpComparator</type>
  2133. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/file2</expected-output>
  2134. </comparator>
  2135. </comparators>
  2136. </test>
  2137. <test> <!-- TESTED -->
  2138. <description>cp: file (absolute path) to file (relative path)</description>
  2139. <test-commands>
  2140. <command>-fs NAMENODE -mkdir -p dir</command> <!-- make sure user home dir exists -->
  2141. <command>-fs NAMENODE -touchz /file1</command>
  2142. <command>-fs NAMENODE -cp /file1 file2</command>
  2143. <command>-fs NAMENODE -ls /file1 file2</command>
  2144. </test-commands>
  2145. <cleanup-commands>
  2146. <command>-fs NAMENODE -rm -r /file1 file2</command>
  2147. </cleanup-commands>
  2148. <comparators>
  2149. <comparator>
  2150. <type>RegexpComparator</type>
  2151. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/file1</expected-output>
  2152. </comparator>
  2153. <comparator>
  2154. <type>RegexpComparator</type>
  2155. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*file2</expected-output>
  2156. </comparator>
  2157. </comparators>
  2158. </test>
  2159. <test> <!-- TESTED -->
  2160. <description>cp: file (relative path) to file (absolute path)</description>
  2161. <test-commands>
  2162. <command>-fs NAMENODE -mkdir -p dir</command> <!-- make sure user home dir exists -->
  2163. <command>-fs NAMENODE -touchz file1</command>
  2164. <command>-fs NAMENODE -cp file1 /file2</command>
  2165. <command>-fs NAMENODE -ls file1 /file2</command>
  2166. </test-commands>
  2167. <cleanup-commands>
  2168. <command>-fs NAMENODE -rm -r file1 /file2</command>
  2169. </cleanup-commands>
  2170. <comparators>
  2171. <comparator>
  2172. <type>RegexpComparator</type>
  2173. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*file1</expected-output>
  2174. </comparator>
  2175. <comparator>
  2176. <type>RegexpComparator</type>
  2177. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/file2</expected-output>
  2178. </comparator>
  2179. </comparators>
  2180. </test>
  2181. <test> <!-- TESTED -->
  2182. <description>cp: file (relative path) to file (relative path)</description>
  2183. <test-commands>
  2184. <command>-fs NAMENODE -mkdir -p dir</command> <!-- make sure user home dir exists -->
  2185. <command>-fs NAMENODE -touchz file1</command>
  2186. <command>-fs NAMENODE -cp file1 file2</command>
  2187. <command>-fs NAMENODE -ls file1 file2</command>
  2188. </test-commands>
  2189. <cleanup-commands>
  2190. <command>-fs NAMENODE -rm -r file1 file2</command>
  2191. </cleanup-commands>
  2192. <comparators>
  2193. <comparator>
  2194. <type>RegexpComparator</type>
  2195. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*file1</expected-output>
  2196. </comparator>
  2197. <comparator>
  2198. <type>RegexpComparator</type>
  2199. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*file2</expected-output>
  2200. </comparator>
  2201. </comparators>
  2202. </test>
  2203. <test> <!-- TESTED -->
  2204. <description>cp: file (absolute path) to directory (absolute path); keep the same name at the destination</description>
  2205. <test-commands>
  2206. <command>-fs NAMENODE -touchz /file1</command>
  2207. <command>-fs NAMENODE -mkdir /dir0</command>
  2208. <command>-fs NAMENODE -cp /file1 /dir0</command>
  2209. <command>-fs NAMENODE -ls /file1 /dir0</command>
  2210. </test-commands>
  2211. <cleanup-commands>
  2212. <command>-fs NAMENODE -rm -r /dir0</command>
  2213. </cleanup-commands>
  2214. <comparators>
  2215. <comparator>
  2216. <type>RegexpComparator</type>
  2217. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/file1</expected-output>
  2218. </comparator>
  2219. <comparator>
  2220. <type>RegexpComparator</type>
  2221. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/file1</expected-output>
  2222. </comparator>
  2223. </comparators>
  2224. </test>
  2225. <test> <!-- TESTED -->
  2226. <description>cp: file (absolute path) to directory (absolute path); change the name at the destination</description>
  2227. <test-commands>
  2228. <command>-fs NAMENODE -touchz /file1</command>
  2229. <command>-fs NAMENODE -mkdir /dir0</command>
  2230. <command>-fs NAMENODE -cp /file1 /dir0/file2</command>
  2231. <command>-fs NAMENODE -ls /file1 /dir0</command>
  2232. </test-commands>
  2233. <cleanup-commands>
  2234. <command>-fs NAMENODE -rm -r /dir0</command>
  2235. </cleanup-commands>
  2236. <comparators>
  2237. <comparator>
  2238. <type>RegexpComparator</type>
  2239. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/file1</expected-output>
  2240. </comparator>
  2241. <comparator>
  2242. <type>RegexpComparator</type>
  2243. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/file2</expected-output>
  2244. </comparator>
  2245. </comparators>
  2246. </test>
  2247. <test> <!-- TESTED -->
  2248. <description>cp: files to directory (absolute path) using globbing</description>
  2249. <test-commands>
  2250. <command>-fs NAMENODE -touchz /file1</command>
  2251. <command>-fs NAMENODE -touchz /file2</command>
  2252. <command>-fs NAMENODE -touchz /file3</command>
  2253. <command>-fs NAMENODE -touchz /file4</command>
  2254. <command>-fs NAMENODE -mkdir /dir0</command>
  2255. <command>-fs NAMENODE -cp /file* /dir0</command>
  2256. <command>-fs NAMENODE -ls -R /*</command>
  2257. </test-commands>
  2258. <cleanup-commands>
  2259. <command>-fs NAMENODE -rm -r /dir0</command>
  2260. </cleanup-commands>
  2261. <comparators>
  2262. <comparator>
  2263. <type>RegexpComparator</type>
  2264. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/file1</expected-output>
  2265. </comparator>
  2266. <comparator>
  2267. <type>RegexpComparator</type>
  2268. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/file2</expected-output>
  2269. </comparator>
  2270. <comparator>
  2271. <type>RegexpComparator</type>
  2272. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/file3</expected-output>
  2273. </comparator>
  2274. <comparator>
  2275. <type>RegexpComparator</type>
  2276. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/file4</expected-output>
  2277. </comparator>
  2278. <comparator>
  2279. <type>RegexpComparator</type>
  2280. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/file1</expected-output>
  2281. </comparator>
  2282. <comparator>
  2283. <type>RegexpComparator</type>
  2284. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/file2</expected-output>
  2285. </comparator>
  2286. <comparator>
  2287. <type>RegexpComparator</type>
  2288. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/file3</expected-output>
  2289. </comparator>
  2290. <comparator>
  2291. <type>RegexpComparator</type>
  2292. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/file4</expected-output>
  2293. </comparator>
  2294. </comparators>
  2295. </test>
  2296. <test> <!-- TESTED -->
  2297. <description>cp: files to directory (absolute path) without globbing</description>
  2298. <test-commands>
  2299. <command>-fs NAMENODE -touchz /file1</command>
  2300. <command>-fs NAMENODE -touchz /file2</command>
  2301. <command>-fs NAMENODE -touchz /file3</command>
  2302. <command>-fs NAMENODE -touchz /file4</command>
  2303. <command>-fs NAMENODE -mkdir /dir0</command>
  2304. <command>-fs NAMENODE -cp /file1 /file2 /file3 /file4 /dir0</command>
  2305. <command>-fs NAMENODE -ls -R /*</command>
  2306. </test-commands>
  2307. <cleanup-commands>
  2308. <command>-fs NAMENODE -rm -r /dir0 /file*</command>
  2309. </cleanup-commands>
  2310. <comparators>
  2311. <comparator>
  2312. <type>RegexpComparator</type>
  2313. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/file1</expected-output>
  2314. </comparator>
  2315. <comparator>
  2316. <type>RegexpComparator</type>
  2317. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/file2</expected-output>
  2318. </comparator>
  2319. <comparator>
  2320. <type>RegexpComparator</type>
  2321. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/file3</expected-output>
  2322. </comparator>
  2323. <comparator>
  2324. <type>RegexpComparator</type>
  2325. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/file4</expected-output>
  2326. </comparator>
  2327. <comparator>
  2328. <type>RegexpComparator</type>
  2329. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/file1</expected-output>
  2330. </comparator>
  2331. <comparator>
  2332. <type>RegexpComparator</type>
  2333. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/file2</expected-output>
  2334. </comparator>
  2335. <comparator>
  2336. <type>RegexpComparator</type>
  2337. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/file3</expected-output>
  2338. </comparator>
  2339. <comparator>
  2340. <type>RegexpComparator</type>
  2341. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/file4</expected-output>
  2342. </comparator>
  2343. </comparators>
  2344. </test>
  2345. <test> <!-- TESTED -->
  2346. <description>cp: copying non existent file (absolute path)</description>
  2347. <test-commands>
  2348. <command>-fs NAMENODE -cp /file /file1</command>
  2349. </test-commands>
  2350. <cleanup-commands>
  2351. <command>-fs NAMENODE -rm -r /user</command>
  2352. </cleanup-commands>:
  2353. <comparators>
  2354. <comparator>
  2355. <type>RegexpComparator</type>
  2356. <expected-output>^cp: `/file': No such file or directory</expected-output>
  2357. </comparator>
  2358. </comparators>
  2359. </test>
  2360. <test> <!-- TESTED -->
  2361. <description>cp: copying non existent file (relative path)</description>
  2362. <test-commands>
  2363. <command>-fs NAMENODE -cp touchz test</command>
  2364. <command>-fs NAMENODE -cp file1 file2</command>
  2365. </test-commands>
  2366. <cleanup-commands>
  2367. <command>-fs NAMENODE -rm -r /user</command>
  2368. </cleanup-commands>:
  2369. <comparators>
  2370. <comparator>
  2371. <type>RegexpComparator</type>
  2372. <expected-output>^cp: `file2': No such file or directory</expected-output>
  2373. </comparator>
  2374. </comparators>
  2375. </test>
  2376. <test> <!-- TESTED -->
  2377. <description>cp: files to an existent file using globbing</description>
  2378. <test-commands>
  2379. <command>-fs NAMENODE -touchz /file1</command>
  2380. <command>-fs NAMENODE -touchz /file2</command>
  2381. <command>-fs NAMENODE -touchz /file3</command>
  2382. <command>-fs NAMENODE -touchz /file4</command>
  2383. <command>-fs NAMENODE -touchz /file5</command>
  2384. <command>-fs NAMENODE -cp /file* /file5</command>
  2385. </test-commands>
  2386. <cleanup-commands>
  2387. <command>-fs NAMENODE -rm -r /user</command>
  2388. </cleanup-commands>
  2389. <comparators>
  2390. <comparator>
  2391. <type>RegexpComparator</type>
  2392. <expected-output>^cp: `/file5': Is not a directory</expected-output>
  2393. </comparator>
  2394. </comparators>
  2395. </test>
  2396. <test> <!-- TESTED -->
  2397. <description>cp: files to an existent file without globbing</description>
  2398. <test-commands>
  2399. <command>-fs NAMENODE -touchz /file1</command>
  2400. <command>-fs NAMENODE -touchz /file2</command>
  2401. <command>-fs NAMENODE -touchz /file3</command>
  2402. <command>-fs NAMENODE -touchz /file4</command>
  2403. <command>-fs NAMENODE -touchz /file5</command>
  2404. <command>-fs NAMENODE -cp /file1 /file2 /file3 /file4 /file5</command>
  2405. </test-commands>
  2406. <cleanup-commands>
  2407. <command>-fs NAMENODE -rm -r /user</command>
  2408. </cleanup-commands>
  2409. <comparators>
  2410. <comparator>
  2411. <type>RegexpComparator</type>
  2412. <expected-output>^cp: `/file5': Is not a directory</expected-output>
  2413. </comparator>
  2414. </comparators>
  2415. </test>
  2416. <test> <!-- TESTED -->
  2417. <description>cp: files to a non existent directory using globbing</description>
  2418. <test-commands>
  2419. <command>-fs NAMENODE -touchz /file1</command>
  2420. <command>-fs NAMENODE -touchz /file2</command>
  2421. <command>-fs NAMENODE -touchz /file3</command>
  2422. <command>-fs NAMENODE -touchz /file4</command>
  2423. <command>-fs NAMENODE -cp /file* dir</command>
  2424. </test-commands>
  2425. <cleanup-commands>
  2426. <command>-fs NAMENODE -rm -r /user</command>
  2427. </cleanup-commands>
  2428. <comparators>
  2429. <comparator>
  2430. <type>RegexpComparator</type>
  2431. <expected-output>^cp: `dir': No such file or directory</expected-output>
  2432. </comparator>
  2433. </comparators>
  2434. </test>
  2435. <test> <!-- TESTED -->
  2436. <description>cp: files to a non existent directory without globbing</description>
  2437. <test-commands>
  2438. <command>-fs NAMENODE -touchz /file1</command>
  2439. <command>-fs NAMENODE -touchz /file2</command>
  2440. <command>-fs NAMENODE -touchz /file3</command>
  2441. <command>-fs NAMENODE -touchz /file4</command>
  2442. <command>-fs NAMENODE -cp /file1 /file2 /file3 /file4 dir</command>
  2443. </test-commands>
  2444. <cleanup-commands>
  2445. <command>-fs NAMENODE -rm -r /user</command>
  2446. </cleanup-commands>
  2447. <comparators>
  2448. <comparator>
  2449. <type>RegexpComparator</type>
  2450. <expected-output>^cp: `dir': No such file or directory</expected-output>
  2451. </comparator>
  2452. </comparators>
  2453. </test>
  2454. <test> <!-- TESTED -->
  2455. <description>cp: file to file copy in hdfs:// path </description>
  2456. <test-commands>
  2457. <command>-fs NAMENODE -touchz hdfs:///file1</command>
  2458. <command>-fs NAMENODE -cp hdfs:///file1 hdfs:///file2</command>
  2459. <command>-fs NAMENODE -ls hdfs:///file*</command>
  2460. </test-commands>
  2461. <cleanup-commands>
  2462. <command>-fs NAMENODE -rm hdfs:///file*</command>
  2463. </cleanup-commands>:
  2464. <comparators>
  2465. <comparator>
  2466. <type>RegexpComparator</type>
  2467. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///file1</expected-output>
  2468. </comparator>
  2469. <comparator>
  2470. <type>RegexpComparator</type>
  2471. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///file2</expected-output>
  2472. </comparator>
  2473. </comparators>
  2474. </test>
  2475. <test> <!-- TESTED -->
  2476. <description>cp: file to directory copy (same name at the destination) in hdfs:// path</description>
  2477. <test-commands>
  2478. <command>-fs NAMENODE -touchz hdfs:///file1</command>
  2479. <command>-fs NAMENODE -mkdir hdfs:///dir0</command>
  2480. <command>-fs NAMENODE -cp hdfs:///file1 hdfs:///dir0</command>
  2481. <command>-fs NAMENODE -ls hdfs:///file1 hdfs:///dir0</command>
  2482. </test-commands>
  2483. <cleanup-commands>
  2484. <command>-fs NAMENODE -rm -r hdfs:///dir0/ hdfs://file1</command>
  2485. </cleanup-commands>
  2486. <comparators>
  2487. <comparator>
  2488. <type>RegexpComparator</type>
  2489. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///file1</expected-output>
  2490. </comparator>
  2491. <comparator>
  2492. <type>RegexpComparator</type>
  2493. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir0/file1</expected-output>
  2494. </comparator>
  2495. </comparators>
  2496. </test>
  2497. <test> <!-- TESTED -->
  2498. <description>cp: file to directory (different name at the destination) in hdfs:// path </description>
  2499. <test-commands>
  2500. <command>-fs NAMENODE -touchz hdfs:///file1</command>
  2501. <command>-fs NAMENODE -mkdir hdfs:///dir0</command>
  2502. <command>-fs NAMENODE -cp hdfs:///file1 hdfs:///dir0/file2</command>
  2503. <command>-fs NAMENODE -ls hdfs:///file1 hdfs:///dir0</command>
  2504. </test-commands>
  2505. <cleanup-commands>
  2506. <command>-fs NAMENODE -rm -r hdfs:///dir0/</command>
  2507. </cleanup-commands>
  2508. <comparators>
  2509. <comparator>
  2510. <type>RegexpComparator</type>
  2511. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///file1</expected-output>
  2512. </comparator>
  2513. <comparator>
  2514. <type>RegexpComparator</type>
  2515. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir0/file2</expected-output>
  2516. </comparator>
  2517. </comparators>
  2518. </test>
  2519. <test> <!-- TESTED -->
  2520. <description>cp: files to directory using globbing in hdfs:// path</description>
  2521. <test-commands>
  2522. <command>-fs NAMENODE -touchz hdfs:///file1</command>
  2523. <command>-fs NAMENODE -touchz hdfs:///file2</command>
  2524. <command>-fs NAMENODE -touchz hdfs:///file3</command>
  2525. <command>-fs NAMENODE -mkdir hdfs:///dir0</command>
  2526. <command>-fs NAMENODE -cp hdfs:///file* hdfs:///dir0</command>
  2527. <command>-fs NAMENODE -ls -R hdfs:///*</command>
  2528. </test-commands>
  2529. <cleanup-commands>
  2530. <command>-fs NAMENODE -rm -r hdfs:///file*</command>
  2531. <command>-fs NAMENODE -rm -r hdfs:///dir0/</command>
  2532. </cleanup-commands>
  2533. <comparators>
  2534. <comparator>
  2535. <type>RegexpComparator</type>
  2536. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///file1</expected-output>
  2537. </comparator>
  2538. <comparator>
  2539. <type>RegexpComparator</type>
  2540. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///file2</expected-output>
  2541. </comparator>
  2542. <comparator>
  2543. <type>RegexpComparator</type>
  2544. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///file3</expected-output>
  2545. </comparator>
  2546. <comparator>
  2547. <type>RegexpComparator</type>
  2548. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir0/file1</expected-output>
  2549. </comparator>
  2550. <comparator>
  2551. <type>RegexpComparator</type>
  2552. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir0/file2</expected-output>
  2553. </comparator>
  2554. <comparator>
  2555. <type>RegexpComparator</type>
  2556. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir0/file3</expected-output>
  2557. </comparator>
  2558. </comparators>
  2559. </test>
  2560. <test> <!-- TESTED -->
  2561. <description>cp: files to directory in hdfs:// path without globbing</description>
  2562. <test-commands>
  2563. <command>-fs NAMENODE -touchz hdfs:///file1</command>
  2564. <command>-fs NAMENODE -touchz hdfs:///file2</command>
  2565. <command>-fs NAMENODE -touchz hdfs:///file3</command>
  2566. <command>-fs NAMENODE -mkdir hdfs:///dir0</command>
  2567. <command>-fs NAMENODE -cp hdfs:///file1 hdfs:///file2 hdfs:///file3 hdfs:///dir0</command>
  2568. <command>-fs NAMENODE -ls -R hdfs:///*</command>
  2569. </test-commands>
  2570. <cleanup-commands>
  2571. <command>-fs NAMENODE -rm -r hdfs:///file*</command>
  2572. <command>-fs NAMENODE -rm -r hdfs:///dir0/</command>
  2573. </cleanup-commands>
  2574. <comparators>
  2575. <comparator>
  2576. <type>RegexpComparator</type>
  2577. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///file1</expected-output>
  2578. </comparator>
  2579. <comparator>
  2580. <type>RegexpComparator</type>
  2581. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///file2</expected-output>
  2582. </comparator>
  2583. <comparator>
  2584. <type>RegexpComparator</type>
  2585. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///file3</expected-output>
  2586. </comparator>
  2587. <comparator>
  2588. <type>RegexpComparator</type>
  2589. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir0/file1</expected-output>
  2590. </comparator>
  2591. <comparator>
  2592. <type>RegexpComparator</type>
  2593. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir0/file2</expected-output>
  2594. </comparator>
  2595. <comparator>
  2596. <type>RegexpComparator</type>
  2597. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir0/file3</expected-output>
  2598. </comparator>
  2599. </comparators>
  2600. </test>
  2601. <test> <!-- TESTED -->
  2602. <description>cp: copying non existent file in hdfs:// path </description>
  2603. <test-commands>
  2604. <command>-fs NAMENODE -cp hdfs:///file hdfs:///file1</command>
  2605. </test-commands>
  2606. <cleanup-commands>
  2607. </cleanup-commands>:
  2608. <comparators>
  2609. <comparator>
  2610. <type>RegexpComparator</type>
  2611. <expected-output>^cp: `hdfs:///file': No such file or directory</expected-output>
  2612. </comparator>
  2613. </comparators>
  2614. </test>
  2615. <test> <!-- TESTED -->
  2616. <description>cp: copying files to an existent file in hdfs:// path using globbing</description>
  2617. <test-commands>
  2618. <command>-fs NAMENODE -touchz hdfs:///file1</command>
  2619. <command>-fs NAMENODE -touchz hdfs:///file2</command>
  2620. <command>-fs NAMENODE -touchz hdfs:///file3</command>
  2621. <command>-fs NAMENODE -touchz hdfs:///file4</command>
  2622. <command>-fs NAMENODE -touchz hdfs:///file5</command>
  2623. <command>-fs NAMENODE -cp hdfs:///file* hdfs:///file5</command>
  2624. </test-commands>
  2625. <cleanup-commands>
  2626. <command>-fs NAMENODE -rm -r hdfs:///file*</command>
  2627. </cleanup-commands>
  2628. <comparators>
  2629. <comparator>
  2630. <type>RegexpComparator</type>
  2631. <expected-output>^cp: `hdfs:///file5': Is not a directory</expected-output>
  2632. </comparator>
  2633. </comparators>
  2634. </test>
  2635. <test> <!-- TESTED -->
  2636. <description>cp: copying files to an existent file in hdfs:// path without globbing</description>
  2637. <test-commands>
  2638. <command>-fs NAMENODE -touchz hdfs:///file1</command>
  2639. <command>-fs NAMENODE -touchz hdfs:///file2</command>
  2640. <command>-fs NAMENODE -touchz hdfs:///file3</command>
  2641. <command>-fs NAMENODE -touchz hdfs:///file4</command>
  2642. <command>-fs NAMENODE -touchz hdfs:///file5</command>
  2643. <command>-fs NAMENODE -cp hdfs:///file1 hdfs:///file2 hdfs:///file3 hdfs:///file4 hdfs:///file5</command>
  2644. </test-commands>
  2645. <cleanup-commands>
  2646. <command>-fs NAMENODE -rm -r hdfs:///file*</command>
  2647. </cleanup-commands>
  2648. <comparators>
  2649. <comparator>
  2650. <type>RegexpComparator</type>
  2651. <expected-output>^cp: `hdfs:///file5': Is not a directory</expected-output>
  2652. </comparator>
  2653. </comparators>
  2654. </test>
  2655. <test> <!-- TESTED -->
  2656. <description>cp: copying files to a non existent directory in hdfs:// path using globbing</description>
  2657. <test-commands>
  2658. <command>-fs NAMENODE -touchz hdfs:///file1</command>
  2659. <command>-fs NAMENODE -touchz hdfs:///file2</command>
  2660. <command>-fs NAMENODE -touchz hdfs:///file3</command>
  2661. <command>-fs NAMENODE -touchz hdfs:///file4</command>
  2662. <command>-fs NAMENODE -cp hdfs:///file* hdfs:///dir</command>
  2663. </test-commands>
  2664. <cleanup-commands>
  2665. <command>-fs NAMENODE -rm -r hdfs:///file*</command>
  2666. </cleanup-commands>
  2667. <comparators>
  2668. <comparator>
  2669. <type>RegexpComparator</type>
  2670. <expected-output>^cp: `hdfs:///dir': No such file or directory</expected-output>
  2671. </comparator>
  2672. </comparators>
  2673. </test>
  2674. <test> <!-- TESTED -->
  2675. <description>cp: copying files to a non existent directory in hdfs:// path without globbing</description>
  2676. <test-commands>
  2677. <command>-fs NAMENODE -touchz hdfs:///file1</command>
  2678. <command>-fs NAMENODE -touchz hdfs:///file2</command>
  2679. <command>-fs NAMENODE -touchz hdfs:///file3</command>
  2680. <command>-fs NAMENODE -touchz hdfs:///file4</command>
  2681. <command>-fs NAMENODE -cp hdfs:///file1 hdfs:///file2 hdfs:///file3 hdfs:///file4 hdfs:///dir</command>
  2682. </test-commands>
  2683. <cleanup-commands>
  2684. <command>-fs NAMENODE -rm -r hdfs:///file*</command>
  2685. </cleanup-commands>
  2686. <comparators>
  2687. <comparator>
  2688. <type>RegexpComparator</type>
  2689. <expected-output>^cp: `hdfs:///dir': No such file or directory</expected-output>
  2690. </comparator>
  2691. </comparators>
  2692. </test>
  2693. <test> <!-- TESTED -->
  2694. <description>cp: copying non existent directory in hdfs:// path</description>
  2695. <test-commands>
  2696. <command>-fs NAMENODE -mkdir hdfs:///dir1</command>
  2697. <command>-fs NAMENODE -cp hdfs:///dir0 hdfs:///dir1</command>
  2698. </test-commands>
  2699. <cleanup-commands>
  2700. <command>-fs NAMNEODE -rm -r hdfs:///dir1</command>
  2701. </cleanup-commands>
  2702. <comparators>
  2703. <comparator>
  2704. <type>RegexpComparator</type>
  2705. <expected-output>^cp: `hdfs:///dir0': No such file or directory</expected-output>
  2706. </comparator>
  2707. </comparators>
  2708. </test>
  2709. <test> <!-- TESTED -->
  2710. <description>cp: putting file into an already existing destination with -f option(absolute path)</description>
  2711. <test-commands>
  2712. <command>-fs NAMENODE -mkdir /user</command> <!-- make sure user home dir exists -->
  2713. <command>-fs NAMENODE -touchz /user/file0</command>
  2714. <command>-fs NAMENODE -cp -f CLITEST_DATA/data120bytes /user/file0</command>
  2715. <command>-fs NAMENODE -cat /user/file0</command>
  2716. </test-commands>
  2717. <cleanup-commands>
  2718. <command>-fs NAMENODE -rm -r /user</command>
  2719. </cleanup-commands>
  2720. <comparators>
  2721. <comparator>
  2722. <type>RegexpComparator</type>
  2723. <expected-output>12345678901234</expected-output>
  2724. </comparator>
  2725. </comparators>
  2726. </test>
  2727. <test> <!-- TESTED -->
  2728. <description>cp: copying directory to directory in hdfs:// path</description>
  2729. <test-commands>
  2730. <command>-fs NAMENODE -mkdir hdfs:///dir0</command>
  2731. <command>-fs NAMENODE -mkdir hdfs:///dir1</command>
  2732. <command>-fs NAMENODE -touchz hdfs:///dir0/file1</command>
  2733. <command>-fs NAMENODE -cp hdfs:///dir0 hdfs:///dir1</command>
  2734. <command>-fs NAMENODE -ls -R hdfs:///dir*</command>
  2735. </test-commands>
  2736. <cleanup-commands>
  2737. <command>-fs NAMENODE -rm -r hdfs:///*</command>
  2738. </cleanup-commands>
  2739. <comparators>
  2740. <comparator>
  2741. <type>RegexpComparator</type>
  2742. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir0/file1</expected-output>
  2743. </comparator>
  2744. <comparator>
  2745. <type>RegexpComparator</type>
  2746. <expected-output>^drwxr-xr-x( )*-( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir1/dir0</expected-output>
  2747. </comparator>
  2748. <comparator>
  2749. <type>RegexpComparator</type>
  2750. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir1/dir0/file1</expected-output>
  2751. </comparator>
  2752. </comparators>
  2753. </test>
  2754. <test> <!-- TESTED -->
  2755. <description>cp: copying multiple directories to directory using globbing in hdfs:// path </description>
  2756. <test-commands>
  2757. <command>-fs NAMENODE -mkdir hdfs:///dir0</command>
  2758. <command>-fs NAMENODE -mkdir hdfs:///dir1</command>
  2759. <command>-fs NAMENODE -mkdir hdfs:///dir2</command>
  2760. <command>-fs NAMENODE -mkdir hdfs:///dest</command>
  2761. <command>-fs NAMENODE -cp hdfs:///dir* hdfs:///dest</command>
  2762. <command>-fs NAMENODE -ls -R hdfs:///d*</command>
  2763. </test-commands>
  2764. <cleanup-commands>
  2765. <command>-fs NAMNEODE -rm -r hdfs:///d*</command>
  2766. </cleanup-commands>
  2767. <comparators>
  2768. <comparator>
  2769. <type>RegexpComparator</type>
  2770. <expected-output>^drwxr-xr-x( )*-( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dest/dir0</expected-output>
  2771. </comparator>
  2772. <comparator>
  2773. <type>RegexpComparator</type>
  2774. <expected-output>^drwxr-xr-x( )*-( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dest/dir1</expected-output>
  2775. </comparator>
  2776. <comparator>
  2777. <type>RegexpComparator</type>
  2778. <expected-output>^drwxr-xr-x( )*-( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dest/dir2</expected-output>
  2779. </comparator>
  2780. </comparators>
  2781. </test>
  2782. <test> <!-- TESTED -->
  2783. <description>cp: copying multiple directories to directory in hdfs:// path without using globbing</description>
  2784. <test-commands>
  2785. <command>-fs NAMENODE -mkdir hdfs:///dir0</command>
  2786. <command>-fs NAMENODE -mkdir hdfs:///dir1</command>
  2787. <command>-fs NAMENODE -mkdir hdfs:///dir2</command>
  2788. <command>-fs NAMENODE -mkdir hdfs:///dest</command>
  2789. <command>-fs NAMENODE -cp hdfs:///dir0 hdfs:///dir1 hdfs:///dir2 hdfs:///dest</command>
  2790. <command>-fs NAMENODE -ls -R hdfs:///d*</command>
  2791. </test-commands>
  2792. <cleanup-commands>
  2793. <command>-fs NAMNEODE -rm -r hdfs:///*</command>
  2794. </cleanup-commands>
  2795. <comparators>
  2796. <comparator>
  2797. <type>RegexpComparator</type>
  2798. <expected-output>^drwxr-xr-x( )*-( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dest/dir0</expected-output>
  2799. </comparator>
  2800. <comparator>
  2801. <type>RegexpComparator</type>
  2802. <expected-output>^drwxr-xr-x( )*-( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dest/dir1</expected-output>
  2803. </comparator>
  2804. <comparator>
  2805. <type>RegexpComparator</type>
  2806. <expected-output>^drwxr-xr-x( )*-( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dest/dir2</expected-output>
  2807. </comparator>
  2808. </comparators>
  2809. </test>
  2810. <test> <!-- TESTED -->
  2811. <description>cp: file to file copy in Namenode's path </description>
  2812. <test-commands>
  2813. <command>-fs NAMENODE -touchz NAMENODE/file1</command>
  2814. <command>-fs NAMENODE -cp NAMENODE/file1 NAMENODE/file2</command>
  2815. <command>-fs NAMENODE -ls NAMENODE/file*</command>
  2816. </test-commands>
  2817. <cleanup-commands>
  2818. <command>-fs NAMENODE -rm NAMENODE/file*</command>
  2819. </cleanup-commands>:
  2820. <comparators>
  2821. <comparator>
  2822. <type>RegexpComparator</type>
  2823. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/file1</expected-output>
  2824. </comparator>
  2825. <comparator>
  2826. <type>RegexpComparator</type>
  2827. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/file2</expected-output>
  2828. </comparator>
  2829. </comparators>
  2830. </test>
  2831. <test> <!-- TESTED -->
  2832. <description>cp: file to directory copy (same name at the destination) in Namenode's path </description>
  2833. <test-commands>
  2834. <command>-fs NAMENODE -touchz NAMENODE/file1</command>
  2835. <command>-fs NAMENODE -mkdir NAMENODE/dir0</command>
  2836. <command>-fs NAMENODE -cp NAMENODE/file1 NAMENODE/dir0</command>
  2837. <command>-fs NAMENODE -ls NAMENODE/file1 NAMENODE/dir0</command>
  2838. </test-commands>
  2839. <cleanup-commands>
  2840. <command>-fs NAMENODE -rm -r NAMENODE/dir0/ NAMENODE/file1</command>
  2841. </cleanup-commands>
  2842. <comparators>
  2843. <comparator>
  2844. <type>RegexpComparator</type>
  2845. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/file1</expected-output>
  2846. </comparator>
  2847. <comparator>
  2848. <type>RegexpComparator</type>
  2849. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir0/file1</expected-output>
  2850. </comparator>
  2851. </comparators>
  2852. </test>
  2853. <test> <!-- TESTED -->
  2854. <description>cp: file to directory (different name at the destination) in Namenode's path </description>
  2855. <test-commands>
  2856. <command>-fs NAMENODE -touchz NAMENODE/file1</command>
  2857. <command>-fs NAMENODE -mkdir NAMENODE/dir0</command>
  2858. <command>-fs NAMENODE -cp NAMENODE/file1 NAMENODE/dir0/file2</command>
  2859. <command>-fs NAMENODE -ls NAMENODE/file1 NAMENODE/dir0</command>
  2860. </test-commands>
  2861. <cleanup-commands>
  2862. <command>-fs NAMENODE -rm -r NAMENODE/dir0/</command>
  2863. </cleanup-commands>
  2864. <comparators>
  2865. <comparator>
  2866. <type>RegexpComparator</type>
  2867. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/file1</expected-output>
  2868. </comparator>
  2869. <comparator>
  2870. <type>RegexpComparator</type>
  2871. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir0/file2</expected-output>
  2872. </comparator>
  2873. </comparators>
  2874. </test>
  2875. <test> <!-- TESTED -->
  2876. <description>cp: files to directory in Namenode's path using globbing</description>
  2877. <test-commands>
  2878. <command>-fs NAMENODE -touchz NAMENODE/file1</command>
  2879. <command>-fs NAMENODE -touchz NAMENODE/file2</command>
  2880. <command>-fs NAMENODE -touchz NAMENODE/file3</command>
  2881. <command>-fs NAMENODE -mkdir NAMENODE/dir0</command>
  2882. <command>-fs NAMENODE -cp NAMENODE/file* NAMENODE/dir0</command>
  2883. <command>-fs NAMENODE -ls -R NAMENODE/*</command>
  2884. </test-commands>
  2885. <cleanup-commands>
  2886. <command>-fs NAMENODE -rm -r NAMENODE/file*</command>
  2887. <command>-fs NAMENODE -rm -r NAMENODE/dir0/</command>
  2888. </cleanup-commands>
  2889. <comparators>
  2890. <comparator>
  2891. <type>RegexpComparator</type>
  2892. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/file1</expected-output>
  2893. </comparator>
  2894. <comparator>
  2895. <type>RegexpComparator</type>
  2896. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/file2</expected-output>
  2897. </comparator>
  2898. <comparator>
  2899. <type>RegexpComparator</type>
  2900. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/file3</expected-output>
  2901. </comparator>
  2902. <comparator>
  2903. <type>RegexpComparator</type>
  2904. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir0/file1</expected-output>
  2905. </comparator>
  2906. <comparator>
  2907. <type>RegexpComparator</type>
  2908. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir0/file2</expected-output>
  2909. </comparator>
  2910. <comparator>
  2911. <type>RegexpComparator</type>
  2912. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir0/file3</expected-output>
  2913. </comparator>
  2914. </comparators>
  2915. </test>
  2916. <test> <!-- TESTED -->
  2917. <description>cp: files to directory in Namenode's path without globbing</description>
  2918. <test-commands>
  2919. <command>-fs NAMENODE -touchz NAMENODE/file1</command>
  2920. <command>-fs NAMENODE -touchz NAMENODE/file2</command>
  2921. <command>-fs NAMENODE -touchz NAMENODE/file3</command>
  2922. <command>-fs NAMENODE -mkdir NAMENODE/dir0</command>
  2923. <command>-fs NAMENODE -cp NAMENODE/file1 NAMENODE/file2 NAMENODE/file3 NAMENODE/dir0</command>
  2924. <command>-fs NAMENODE -ls -R NAMENODE/*</command>
  2925. </test-commands>
  2926. <cleanup-commands>
  2927. <command>-fs NAMENODE -rm -r NAMENODE/file*</command>
  2928. <command>-fs NAMENODE -rm -r NAMENODE/dir0/</command>
  2929. </cleanup-commands>
  2930. <comparators>
  2931. <comparator>
  2932. <type>RegexpComparator</type>
  2933. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/file1</expected-output>
  2934. </comparator>
  2935. <comparator>
  2936. <type>RegexpComparator</type>
  2937. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/file2</expected-output>
  2938. </comparator>
  2939. <comparator>
  2940. <type>RegexpComparator</type>
  2941. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/file3</expected-output>
  2942. </comparator>
  2943. <comparator>
  2944. <type>RegexpComparator</type>
  2945. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir0/file1</expected-output>
  2946. </comparator>
  2947. <comparator>
  2948. <type>RegexpComparator</type>
  2949. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir0/file2</expected-output>
  2950. </comparator>
  2951. <comparator>
  2952. <type>RegexpComparator</type>
  2953. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir0/file3</expected-output>
  2954. </comparator>
  2955. </comparators>
  2956. </test>
  2957. <test> <!-- TESTED -->
  2958. <description>cp: copying non existent file in Namenode's path </description>
  2959. <test-commands>
  2960. <command>-fs NAMENODE -cp NAMENODE/file NAMENODE/file1</command>
  2961. </test-commands>
  2962. <cleanup-commands>
  2963. </cleanup-commands>:
  2964. <comparators>
  2965. <comparator>
  2966. <type>RegexpComparator</type>
  2967. <expected-output>^cp: `hdfs://\w+[-.a-z0-9]*:[0-9]+/file': No such file or directory</expected-output>
  2968. </comparator>
  2969. </comparators>
  2970. </test>
  2971. <test> <!-- TESTED -->
  2972. <description>cp: copying files to an existent file in Namenode's path using globbing</description>
  2973. <test-commands>
  2974. <command>-fs NAMENODE -touchz NAMENODE/file1</command>
  2975. <command>-fs NAMENODE -touchz NAMENODE/file2</command>
  2976. <command>-fs NAMENODE -touchz NAMENODE/file3</command>
  2977. <command>-fs NAMENODE -touchz NAMENODE/file4</command>
  2978. <command>-fs NAMENODE -touchz NAMENODE/file5</command>
  2979. <command>-fs NAMENODE -cp NAMENODE/file* NAMENODE/file5</command>
  2980. </test-commands>
  2981. <cleanup-commands>
  2982. <command>-fs NAMENODE -rm -r NAMENODE/file*</command>
  2983. </cleanup-commands>
  2984. <comparators>
  2985. <comparator>
  2986. <type>RegexpComparator</type>
  2987. <expected-output>^cp: `hdfs://\w+[-.a-z0-9]*:[0-9]+/file5': Is not a directory</expected-output>
  2988. </comparator>
  2989. </comparators>
  2990. </test>
  2991. <test> <!-- TESTED -->
  2992. <description>cp: copying files to an existent file in Namenode's path without globbing</description>
  2993. <test-commands>
  2994. <command>-fs NAMENODE -touchz NAMENODE/file1</command>
  2995. <command>-fs NAMENODE -touchz NAMENODE/file2</command>
  2996. <command>-fs NAMENODE -touchz NAMENODE/file3</command>
  2997. <command>-fs NAMENODE -touchz NAMENODE/file4</command>
  2998. <command>-fs NAMENODE -touchz NAMENODE/file5</command>
  2999. <command>-fs NAMENODE -cp NAMENODE/file1 NAMENODE/file2 NAMENODE/file3 NAMENODE/file4 NAMENODE/file5</command>
  3000. </test-commands>
  3001. <cleanup-commands>
  3002. <command>-fs NAMENODE -rm -r NAMENODE/file*</command>
  3003. </cleanup-commands>
  3004. <comparators>
  3005. <comparator>
  3006. <type>RegexpComparator</type>
  3007. <expected-output>^cp: `hdfs://\w+[-.a-z0-9]*:[0-9]+/file5': Is not a directory</expected-output>
  3008. </comparator>
  3009. </comparators>
  3010. </test>
  3011. <test> <!-- TESTED -->
  3012. <description>cp: copying files to a non existent directory in Namenode's path using globbing</description>
  3013. <test-commands>
  3014. <command>-fs NAMENODE -touchz NAMENODE/file1</command>
  3015. <command>-fs NAMENODE -touchz NAMENODE/file2</command>
  3016. <command>-fs NAMENODE -touchz NAMENODE/file3</command>
  3017. <command>-fs NAMENODE -touchz NAMENODE/file4</command>
  3018. <command>-fs NAMENODE -cp NAMENODE/file* NAMENODE/dir</command>
  3019. </test-commands>
  3020. <cleanup-commands>
  3021. <command>-fs NAMENODE -rm -r NAMENODE/file*</command>
  3022. </cleanup-commands>
  3023. <comparators>
  3024. <comparator>
  3025. <type>RegexpComparator</type>
  3026. <expected-output>^cp: `hdfs://\w+[-.a-z0-9]*:[0-9]+/dir': No such file or directory</expected-output>
  3027. </comparator>
  3028. </comparators>
  3029. </test>
  3030. <test> <!-- TESTED -->
  3031. <description>cp: copying files to a non existent directory in Namenode's path without globbing</description>
  3032. <test-commands>
  3033. <command>-fs NAMENODE -touchz NAMENODE/file1</command>
  3034. <command>-fs NAMENODE -touchz NAMENODE/file2</command>
  3035. <command>-fs NAMENODE -touchz NAMENODE/file3</command>
  3036. <command>-fs NAMENODE -touchz NAMENODE/file4</command>
  3037. <command>-fs NAMENODE -cp NAMENODE/file1 NAMENODE/file2 NAMENODE/file3 NAMENODE/file4 NAMENODE/dir</command>
  3038. </test-commands>
  3039. <cleanup-commands>
  3040. <command>-fs NAMENODE -rm -r NAMENODE/file*</command>
  3041. </cleanup-commands>
  3042. <comparators>
  3043. <comparator>
  3044. <type>RegexpComparator</type>
  3045. <expected-output>^cp: `hdfs://\w+[-.a-z0-9]*:[0-9]+/dir': No such file or directory</expected-output>
  3046. </comparator>
  3047. </comparators>
  3048. </test>
  3049. <test> <!-- TESTED -->
  3050. <description>cp: copying directory to directory in Namenode's path </description>
  3051. <test-commands>
  3052. <command>-fs NAMENODE -mkdir NAMENODE/dir0</command>
  3053. <command>-fs NAMENODE -mkdir NAMENODE/dir1</command>
  3054. <command>-fs NAMENODE -touchz NAMENODE/dir0/file1</command>
  3055. <command>-fs NAMENODE -cp NAMENODE/dir0 NAMENODE/dir1</command>
  3056. <command>-fs NAMENODE -ls -R NAMENODE/dir*</command>
  3057. </test-commands>
  3058. <cleanup-commands>
  3059. <command>-fs NAMENODE -rm -r NAMENODE/*</command>
  3060. </cleanup-commands>
  3061. <comparators>
  3062. <comparator>
  3063. <type>RegexpComparator</type>
  3064. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir0/file1</expected-output>
  3065. </comparator>
  3066. <comparator>
  3067. <type>RegexpComparator</type>
  3068. <expected-output>^drwxr-xr-x( )*-( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir1/dir0</expected-output>
  3069. </comparator>
  3070. <comparator>
  3071. <type>RegexpComparator</type>
  3072. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir1/dir0/file1</expected-output>
  3073. </comparator>
  3074. </comparators>
  3075. </test>
  3076. <test> <!-- TESTED -->
  3077. <description>cp: copying multiple directories to directory in Namenode's path using globbing</description>
  3078. <test-commands>
  3079. <command>-fs NAMENODE -mkdir NAMENODE/dir0</command>
  3080. <command>-fs NAMENODE -mkdir NAMENODE/dir1</command>
  3081. <command>-fs NAMENODE -mkdir NAMENODE/dir2</command>
  3082. <command>-fs NAMENODE -mkdir NAMENODE/dest</command>
  3083. <command>-fs NAMENODE -cp NAMENODE/dir* NAMENODE/dest</command>
  3084. <command>-fs NAMENODE -ls -R NAMENODE/d*</command>
  3085. </test-commands>
  3086. <cleanup-commands>
  3087. <command>-fs NAMNEODE -rm -r NAMENODE/d*</command>
  3088. </cleanup-commands>
  3089. <comparators>
  3090. <comparator>
  3091. <type>RegexpComparator</type>
  3092. <expected-output>^drwxr-xr-x( )*-( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dest/dir0</expected-output>
  3093. </comparator>
  3094. <comparator>
  3095. <type>RegexpComparator</type>
  3096. <expected-output>^drwxr-xr-x( )*-( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dest/dir1</expected-output>
  3097. </comparator>
  3098. <comparator>
  3099. <type>RegexpComparator</type>
  3100. <expected-output>^drwxr-xr-x( )*-( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dest/dir2</expected-output>
  3101. </comparator>
  3102. </comparators>
  3103. </test>
  3104. <test> <!-- TESTED -->
  3105. <description>cp: copying multiple directories to directory in Namenode's path without using globbing</description>
  3106. <test-commands>
  3107. <command>-fs NAMENODE -mkdir NAMENODE/dir0</command>
  3108. <command>-fs NAMENODE -mkdir NAMENODE/dir1</command>
  3109. <command>-fs NAMENODE -mkdir NAMENODE/dir2</command>
  3110. <command>-fs NAMENODE -mkdir NAMENODE/dest</command>
  3111. <command>-fs NAMENODE -cp NAMENODE/dir0 NAMENODE/dir1 NAMENODE/dir2 NAMENODE/dest</command>
  3112. <command>-fs NAMENODE -ls -R NAMENODE/d*</command>
  3113. </test-commands>
  3114. <cleanup-commands>
  3115. <command>-fs NAMNEODE -rm -r NAMENODE/*</command>
  3116. </cleanup-commands>
  3117. <comparators>
  3118. <comparator>
  3119. <type>RegexpComparator</type>
  3120. <expected-output>^drwxr-xr-x( )*-( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dest/dir0</expected-output>
  3121. </comparator>
  3122. <comparator>
  3123. <type>RegexpComparator</type>
  3124. <expected-output>^drwxr-xr-x( )*-( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dest/dir1</expected-output>
  3125. </comparator>
  3126. <comparator>
  3127. <type>RegexpComparator</type>
  3128. <expected-output>^drwxr-xr-x( )*-( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dest/dir2</expected-output>
  3129. </comparator>
  3130. </comparators>
  3131. </test>
  3132. <!-- Tests for rm -->
  3133. <test> <!-- TESTED -->
  3134. <description>rm: removing a file (absolute path) </description>
  3135. <test-commands>
  3136. <command>-fs NAMENODE -mkdir /dir0</command>
  3137. <command>-fs NAMENODE -touchz /dir0/file0</command>
  3138. <command>-fs NAMENODE -rm /dir0/file0</command>
  3139. </test-commands>
  3140. <cleanup-commands>
  3141. <command>-fs NAMENODE -rm /user</command>
  3142. </cleanup-commands>
  3143. <comparators>
  3144. <comparator>
  3145. <type>RegexpComparator</type>
  3146. <expected-output>^Deleted /dir0/file0</expected-output>
  3147. </comparator>
  3148. </comparators>
  3149. </test>
  3150. <test> <!-- TESTED -->
  3151. <description>rm: removing a file (relative path) </description>
  3152. <test-commands>
  3153. <command>-fs NAMENODE -mkdir -p dir</command> <!-- make sure user home dir exists -->
  3154. <command>-fs NAMENODE -touchz file0</command>
  3155. <command>-fs NAMENODE -rm file0</command>
  3156. </test-commands>
  3157. <cleanup-commands>
  3158. <command>-fs NAMENODE -rm /user</command>
  3159. </cleanup-commands>
  3160. <comparators>
  3161. <comparator>
  3162. <type>RegexpComparator</type>
  3163. <expected-output>^Deleted file0</expected-output>
  3164. </comparator>
  3165. </comparators>
  3166. </test>
  3167. <test> <!-- TESTED -->
  3168. <description>rm: removing files by globbing (absolute path) </description>
  3169. <test-commands>
  3170. <command>-fs NAMENODE -mkdir /dir0</command>
  3171. <command>-fs NAMENODE -touchz /dir0/file0</command>
  3172. <command>-fs NAMENODE -touchz /dir0/file1</command>
  3173. <command>-fs NAMENODE -touchz /dir0/file2</command>
  3174. <command>-fs NAMENODE -touchz /dir0/file3</command>
  3175. <command>-fs NAMENODE -rm /dir0/file*</command>
  3176. </test-commands>
  3177. <cleanup-commands>
  3178. <command>-fs NAMENODE -rm /user</command>
  3179. </cleanup-commands>
  3180. <comparators>
  3181. <comparator>
  3182. <type>RegexpComparator</type>
  3183. <expected-output>^Deleted /dir0/file0</expected-output>
  3184. </comparator>
  3185. <comparator>
  3186. <type>RegexpComparator</type>
  3187. <expected-output>^Deleted /dir0/file1</expected-output>
  3188. </comparator>
  3189. <comparator>
  3190. <type>RegexpComparator</type>
  3191. <expected-output>^Deleted /dir0/file2</expected-output>
  3192. </comparator>
  3193. <comparator>
  3194. <type>RegexpComparator</type>
  3195. <expected-output>^Deleted /dir0/file3</expected-output>
  3196. </comparator>
  3197. </comparators>
  3198. </test>
  3199. <test> <!-- TESTED -->
  3200. <description>rm: removing files by globbing (relative path) </description>
  3201. <test-commands>
  3202. <command>-fs NAMENODE -mkdir dir</command>
  3203. <command>-fs NAMENODE -touchz file0</command>
  3204. <command>-fs NAMENODE -touchz file1</command>
  3205. <command>-fs NAMENODE -touchz file2</command>
  3206. <command>-fs NAMENODE -touchz file3</command>
  3207. <command>-fs NAMENODE -rm file*</command>
  3208. </test-commands>
  3209. <cleanup-commands>
  3210. <command>-fs NAMENODE -rm /user</command>
  3211. </cleanup-commands>
  3212. <comparators>
  3213. <comparator>
  3214. <type>RegexpComparator</type>
  3215. <expected-output>^Deleted file0</expected-output>
  3216. </comparator>
  3217. <comparator>
  3218. <type>RegexpComparator</type>
  3219. <expected-output>^Deleted file1</expected-output>
  3220. </comparator>
  3221. <comparator>
  3222. <type>RegexpComparator</type>
  3223. <expected-output>^Deleted file2</expected-output>
  3224. </comparator>
  3225. <comparator>
  3226. <type>RegexpComparator</type>
  3227. <expected-output>^Deleted file3</expected-output>
  3228. </comparator>
  3229. </comparators>
  3230. </test>
  3231. <test> <!-- TESTED -->
  3232. <description>rm: removing a directory (absolute path) </description>
  3233. <test-commands>
  3234. <command>-fs NAMENODE mkdir /dir0</command>
  3235. <command>-fs NAMENODE -rm /dir0</command>
  3236. </test-commands>
  3237. <cleanup-commands>
  3238. <command>-fs NAMENODE -rm /user</command>
  3239. </cleanup-commands>
  3240. <comparators>
  3241. <comparator>
  3242. <type>RegexpComparator</type>
  3243. <expected-output>^rm: `/dir0': Is a directory</expected-output>
  3244. </comparator>
  3245. </comparators>
  3246. </test>
  3247. <test> <!-- TESTED -->
  3248. <description>rm: removing a directory (relative path) </description>
  3249. <test-commands>
  3250. <command>-fs NAMENODE mkdir -p dir0</command>
  3251. <command>-fs NAMENODE -rm dir0</command>
  3252. </test-commands>
  3253. <cleanup-commands>
  3254. <command>-fs NAMENODE -rm /user</command>
  3255. </cleanup-commands>
  3256. <comparators>
  3257. <comparator>
  3258. <type>RegexpComparator</type>
  3259. <expected-output>^rm: `dir0': No such file or directory</expected-output>
  3260. </comparator>
  3261. </comparators>
  3262. </test>
  3263. <test> <!-- TESTED -->
  3264. <description>rm: removing a nonexistent file (absolute path) </description>
  3265. <test-commands>
  3266. <command>-fs NAMENODE -rm /dir0/file0</command>
  3267. </test-commands>
  3268. <cleanup-commands>
  3269. <command>-fs NAMENODE -rm /user</command>
  3270. </cleanup-commands>
  3271. <comparators>
  3272. <comparator>
  3273. <type>RegexpComparator</type>
  3274. <expected-output>^rm: `/dir0/file0': No such file or directory</expected-output>
  3275. </comparator>
  3276. </comparators>
  3277. </test>
  3278. <test> <!-- TESTED -->
  3279. <description>rm: removing a nonexistent file (relative path) </description>
  3280. <test-commands>
  3281. <command>-fs NAMENODE -rm file0</command>
  3282. </test-commands>
  3283. <cleanup-commands>
  3284. <command>-fs NAMENODE -rm /user</command>
  3285. </cleanup-commands>
  3286. <comparators>
  3287. <comparator>
  3288. <type>RegexpComparator</type>
  3289. <expected-output>^rm: `file0': No such file or directory</expected-output>
  3290. </comparator>
  3291. </comparators>
  3292. </test>
  3293. <test> <!-- TESTED -->
  3294. <description>rm: removing a file in hdfs:// path </description>
  3295. <test-commands>
  3296. <command>-fs NAMENODE -touchz hdfs:///file0</command>
  3297. <command>-fs NAMENODE -rm hdfs:///file0</command>
  3298. </test-commands>
  3299. <cleanup-commands>
  3300. <command>-fs NAMENODE -rm hdfs:///*</command>
  3301. </cleanup-commands>
  3302. <comparators>
  3303. <comparator>
  3304. <type>RegexpComparator</type>
  3305. <expected-output>^Deleted hdfs:///file0</expected-output>
  3306. </comparator>
  3307. </comparators>
  3308. </test>
  3309. <test> <!-- TESTED -->
  3310. <description>rm: removing files by globbing in hdfs:// path </description>
  3311. <test-commands>
  3312. <command>-fs NAMENODE -touchz hdfs:///file0</command>
  3313. <command>-fs NAMENODE -touchz hdfs:///file1</command>
  3314. <command>-fs NAMENODE -touchz hdfs:///file2</command>
  3315. <command>-fs NAMENODE -touchz hdfs:///file3</command>
  3316. <command>-fs NAMENODE -rm hdfs:///file*</command>
  3317. </test-commands>
  3318. <cleanup-commands>
  3319. <command>-fs NAMENODE -rm hdfs:///*</command>
  3320. </cleanup-commands>
  3321. <comparators>
  3322. <comparator>
  3323. <type>RegexpComparator</type>
  3324. <expected-output>^Deleted hdfs:///file0</expected-output>
  3325. </comparator>
  3326. <comparator>
  3327. <type>RegexpComparator</type>
  3328. <expected-output>^Deleted hdfs:///file1</expected-output>
  3329. </comparator>
  3330. <comparator>
  3331. <type>RegexpComparator</type>
  3332. <expected-output>^Deleted hdfs:///file2</expected-output>
  3333. </comparator>
  3334. <comparator>
  3335. <type>RegexpComparator</type>
  3336. <expected-output>^Deleted hdfs:///file3</expected-output>
  3337. </comparator>
  3338. </comparators>
  3339. </test>
  3340. <test> <!-- TESTED -->
  3341. <description>rm: removing a directory in hdfs:// path </description>
  3342. <test-commands>
  3343. <command>-fs NAMENODE mkdir hdfs:///dir0</command>
  3344. <command>-fs NAMENODE -rm hdfs:///dir0</command>
  3345. </test-commands>
  3346. <cleanup-commands>
  3347. <command>-fs NAMENODE -rm -r hdfs:///*</command>
  3348. </cleanup-commands>
  3349. <comparators>
  3350. <comparator>
  3351. <type>RegexpComparator</type>
  3352. <expected-output>^rm: `hdfs:///dir0': Is a directory</expected-output>
  3353. </comparator>
  3354. </comparators>
  3355. </test>
  3356. <test> <!-- TESTED -->
  3357. <description>rm: removing a nonexistent file or dirctory in hdfs:// path </description>
  3358. <test-commands>
  3359. <command>-fs NAMENODE -rm hdfs:///file0</command>
  3360. </test-commands>
  3361. <cleanup-commands>
  3362. <command>-fs NAMENODE -rm hdfs:///*</command>
  3363. </cleanup-commands>
  3364. <comparators>
  3365. <comparator>
  3366. <type>RegexpComparator</type>
  3367. <expected-output>^rm: `hdfs:///file0': No such file or directory</expected-output>
  3368. </comparator>
  3369. </comparators>
  3370. </test>
  3371. <test> <!-- TESTED -->
  3372. <description>rm: removing files without globbing in hdfs:// path </description>
  3373. <test-commands>
  3374. <command>-fs NAMENODE -touchz hdfs:///file0</command>
  3375. <command>-fs NAMENODE -touchz hdfs:///file1</command>
  3376. <command>-fs NAMENODE -touchz hdfs:///file2</command>
  3377. <command>-fs NAMENODE -touchz hdfs:///file3</command>
  3378. <command>-fs NAMENODE -rm hdfs:///file0 hdfs:///file1 hdfs:///file2 hdfs:///file3</command>
  3379. </test-commands>
  3380. <cleanup-commands>
  3381. <command>-fs NAMENODE -rm hdfs:///*</command>
  3382. </cleanup-commands>
  3383. <comparators>
  3384. <comparator>
  3385. <type>RegexpComparator</type>
  3386. <expected-output>^Deleted hdfs:///file0</expected-output>
  3387. </comparator>
  3388. <comparator>
  3389. <type>RegexpComparator</type>
  3390. <expected-output>^Deleted hdfs:///file1</expected-output>
  3391. </comparator>
  3392. <comparator>
  3393. <type>RegexpComparator</type>
  3394. <expected-output>^Deleted hdfs:///file2</expected-output>
  3395. </comparator>
  3396. <comparator>
  3397. <type>RegexpComparator</type>
  3398. <expected-output>^Deleted hdfs:///file3</expected-output>
  3399. </comparator>
  3400. </comparators>
  3401. </test>
  3402. <test> <!-- TESTED -->
  3403. <description>rm: removing a file in Namenode's path </description>
  3404. <test-commands>
  3405. <command>-fs NAMENODE -touchz NAMENODE/file0</command>
  3406. <command>-fs NAMENODE -rm NAMENODE/file0</command>
  3407. </test-commands>
  3408. <cleanup-commands>
  3409. <command>-fs NAMENODE -rm NAMENODE/*</command>
  3410. </cleanup-commands>
  3411. <comparators>
  3412. <comparator>
  3413. <type>RegexpComparator</type>
  3414. <expected-output>^Deleted NAMENODE/file0</expected-output>
  3415. </comparator>
  3416. </comparators>
  3417. </test>
  3418. <test> <!-- TESTED -->
  3419. <description>rm: removing files by globbing in Namenode's path </description>
  3420. <test-commands>
  3421. <command>-fs NAMENODE -touchz NAMENODE/file0</command>
  3422. <command>-fs NAMENODE -touchz NAMENODE/file1</command>
  3423. <command>-fs NAMENODE -touchz NAMENODE/file2</command>
  3424. <command>-fs NAMENODE -touchz NAMENODE/file3</command>
  3425. <command>-fs NAMENODE -rm NAMENODE/file*</command>
  3426. </test-commands>
  3427. <cleanup-commands>
  3428. <command>-fs NAMENODE -rm NAMENODE/*</command>
  3429. </cleanup-commands>
  3430. <comparators>
  3431. <comparator>
  3432. <type>RegexpComparator</type>
  3433. <expected-output>^Deleted NAMENODE/file0</expected-output>
  3434. </comparator>
  3435. <comparator>
  3436. <type>RegexpComparator</type>
  3437. <expected-output>^Deleted NAMENODE/file1</expected-output>
  3438. </comparator>
  3439. <comparator>
  3440. <type>RegexpComparator</type>
  3441. <expected-output>^Deleted NAMENODE/file2</expected-output>
  3442. </comparator>
  3443. <comparator>
  3444. <type>RegexpComparator</type>
  3445. <expected-output>^Deleted NAMENODE/file3</expected-output>
  3446. </comparator>
  3447. </comparators>
  3448. </test>
  3449. <test> <!-- TESTED -->
  3450. <description>rm: removing a directory in Namenode's path </description>
  3451. <test-commands>
  3452. <command>-fs NAMENODE mkdir NAMENODE/dir0</command>
  3453. <command>-fs NAMENODE -rm NAMENODE/dir0</command>
  3454. </test-commands>
  3455. <cleanup-commands>
  3456. <command>-fs NAMENODE -rm -r NAMENODE/*</command>
  3457. </cleanup-commands>
  3458. <comparators>
  3459. <comparator>
  3460. <type>RegexpComparator</type>
  3461. <expected-output>rm: `NAMENODE/dir0': No such file or directory</expected-output>
  3462. </comparator>
  3463. </comparators>
  3464. </test>
  3465. <test> <!-- TESTED -->
  3466. <description>rm: removing a nonexistent file or directory in Namenode's path </description>
  3467. <test-commands>
  3468. <command>-fs NAMENODE -rm NAMENODE/file0</command>
  3469. </test-commands>
  3470. <cleanup-commands>
  3471. <command>-fs NAMENODE -rm NAMENODE/*</command>
  3472. </cleanup-commands>
  3473. <comparators>
  3474. <comparator>
  3475. <type>RegexpComparator</type>
  3476. <expected-output>^rm: `NAMENODE/file0': No such file or directory</expected-output>
  3477. </comparator>
  3478. </comparators>
  3479. </test>
  3480. <test> <!-- TESTED -->
  3481. <description>rm: Tremoving files without globbing in Namenode path </description>
  3482. <test-commands>
  3483. <command>-fs NAMENODE -touchz NAMENODE/file0</command>
  3484. <command>-fs NAMENODE -touchz NAMENODE/file1</command>
  3485. <command>-fs NAMENODE -touchz NAMENODE/file2</command>
  3486. <command>-fs NAMENODE -touchz NAMENODE/file3</command>
  3487. <command>-fs NAMENODE -rm NAMENODE/file0 NAMENODE/file1 NAMENODE/file2 NAMENODE/file3</command>
  3488. </test-commands>
  3489. <cleanup-commands>
  3490. <command>-fs NAMENODE -rm NAMENODE/*</command>
  3491. </cleanup-commands>
  3492. <comparators>
  3493. <comparator>
  3494. <type>RegexpComparator</type>
  3495. <expected-output>^Deleted NAMENODE/file0</expected-output>
  3496. </comparator>
  3497. <comparator>
  3498. <type>RegexpComparator</type>
  3499. <expected-output>^Deleted NAMENODE/file1</expected-output>
  3500. </comparator>
  3501. <comparator>
  3502. <type>RegexpComparator</type>
  3503. <expected-output>^Deleted NAMENODE/file2</expected-output>
  3504. </comparator>
  3505. <comparator>
  3506. <type>RegexpComparator</type>
  3507. <expected-output>^Deleted NAMENODE/file3</expected-output>
  3508. </comparator>
  3509. </comparators>
  3510. </test>
  3511. <!--Tests for rmr-->
  3512. <test> <!-- TESTED -->
  3513. <description>rm: removing a file (absolute path) </description>
  3514. <test-commands>
  3515. <command>-fs NAMENODE -mkdir /dir0</command>
  3516. <command>-fs NAMENODE -touchz /dir0/file0</command>
  3517. <command>-fs NAMENODE -rm -r /dir0/file0</command>
  3518. </test-commands>
  3519. <cleanup-commands>
  3520. <command>-fs NAMENODE -rm -r /user</command>
  3521. </cleanup-commands>
  3522. <comparators>
  3523. <comparator>
  3524. <type>RegexpComparator</type>
  3525. <expected-output>^Deleted /dir0/file0</expected-output>
  3526. </comparator>
  3527. </comparators>
  3528. </test>
  3529. <test> <!-- TESTED -->
  3530. <description>rm: removing a file (relative path) </description>
  3531. <test-commands>
  3532. <command>-fs NAMENODE -mkdir -p dir</command> <!-- make sure user home dir exists -->
  3533. <command>-fs NAMENODE -touchz file0</command>
  3534. <command>-fs NAMENODE -rm -r file0</command>
  3535. </test-commands>
  3536. <cleanup-commands>
  3537. <command>-fs NAMENODE -rm -r /user</command>
  3538. </cleanup-commands>
  3539. <comparators>
  3540. <comparator>
  3541. <type>RegexpComparator</type>
  3542. <expected-output>^Deleted file0</expected-output>
  3543. </comparator>
  3544. </comparators>
  3545. </test>
  3546. <test> <!-- TESTED -->
  3547. <description>rm: removing a directory (absolute path) </description>
  3548. <test-commands>
  3549. <command>-fs NAMENODE -touchz /dir0</command>
  3550. <command>-fs NAMENODE -rm -r /dir0</command>
  3551. </test-commands>
  3552. <cleanup-commands>
  3553. <command>-fs NAMENODE -rm -r /user</command>
  3554. </cleanup-commands>
  3555. <comparators>
  3556. <comparator>
  3557. <type>RegexpComparator</type>
  3558. <expected-output>^Deleted /dir0</expected-output>
  3559. </comparator>
  3560. </comparators>
  3561. </test>
  3562. <test> <!-- TESTED -->
  3563. <description>rm: removing a directory (relative path) </description>
  3564. <test-commands>
  3565. <command>-fs NAMENODE -mkdir -p dir0</command>
  3566. <command>-fs NAMENODE -rm -r dir0</command>
  3567. </test-commands>
  3568. <cleanup-commands>
  3569. <command>-fs NAMENODE -rm -r /user</command>
  3570. </cleanup-commands>
  3571. <comparators>
  3572. <comparator>
  3573. <type>RegexpComparator</type>
  3574. <expected-output>^Deleted dir0</expected-output>
  3575. </comparator>
  3576. </comparators>
  3577. </test>
  3578. <test> <!-- TESTED -->
  3579. <description>rm: removing directories by globbing (absolute path) </description>
  3580. <test-commands>
  3581. <command>-fs NAMENODE -mkdir /dir0</command>
  3582. <command>-fs NAMENODE -mkdir /dir1</command>
  3583. <command>-fs NAMENODE -mkdir /dir2</command>
  3584. <command>-fs NAMENODE -mkdir /dir3</command>
  3585. <command>-fs NAMENODE -rm -r /dir*</command>
  3586. </test-commands>
  3587. <cleanup-commands>
  3588. <command>-fs NAMENODE -rm /user</command>
  3589. </cleanup-commands>
  3590. <comparators>
  3591. <comparator>
  3592. <type>RegexpComparator</type>
  3593. <expected-output>^Deleted /dir0</expected-output>
  3594. </comparator>
  3595. <comparator>
  3596. <type>RegexpComparator</type>
  3597. <expected-output>^Deleted /dir1</expected-output>
  3598. </comparator>
  3599. <comparator>
  3600. <type>RegexpComparator</type>
  3601. <expected-output>^Deleted /dir2</expected-output>
  3602. </comparator>
  3603. <comparator>
  3604. <type>RegexpComparator</type>
  3605. <expected-output>^Deleted /dir3</expected-output>
  3606. </comparator>
  3607. </comparators>
  3608. </test>
  3609. <test> <!-- TESTED -->
  3610. <description>rm: removing directories by globbing (relative path) </description>
  3611. <test-commands>
  3612. <command>-fs NAMENODE -mkdir -p dir0</command>
  3613. <command>-fs NAMENODE -mkdir -p dir1</command>
  3614. <command>-fs NAMENODE -mkdir -p dir2</command>
  3615. <command>-fs NAMENODE -mkdir -p dir3</command>
  3616. <command>-fs NAMENODE -rm -r dir*</command>
  3617. </test-commands>
  3618. <cleanup-commands>
  3619. <command>-fs NAMENODE -rm /user</command>
  3620. </cleanup-commands>
  3621. <comparators>
  3622. <comparator>
  3623. <type>RegexpComparator</type>
  3624. <expected-output>^Deleted dir0</expected-output>
  3625. </comparator>
  3626. <comparator>
  3627. <type>RegexpComparator</type>
  3628. <expected-output>^Deleted dir1</expected-output>
  3629. </comparator>
  3630. <comparator>
  3631. <type>RegexpComparator</type>
  3632. <expected-output>^Deleted dir2</expected-output>
  3633. </comparator>
  3634. <comparator>
  3635. <type>RegexpComparator</type>
  3636. <expected-output>^Deleted dir3</expected-output>
  3637. </comparator>
  3638. </comparators>
  3639. </test>
  3640. <test> <!--TESTED-->
  3641. <description>rm: removing a nonexistent file (absolute path) </description>
  3642. <test-commands>
  3643. <command>-fs NAMENODE -rm -r /dir0/file0</command>
  3644. </test-commands>
  3645. <cleanup-commands>
  3646. <command>-fs NAMENODE -rm -r /user</command>
  3647. </cleanup-commands>
  3648. <comparators>
  3649. <comparator>
  3650. <type>RegexpComparator</type>
  3651. <expected-output>^rm: `/dir0/file0': No such file or directory</expected-output>
  3652. </comparator>
  3653. </comparators>
  3654. </test>
  3655. <test> <!-- TESTED -->
  3656. <description>rm: removing a nonexistent file (relative path) </description>
  3657. <test-commands>
  3658. <command>-fs NAMENODE -rm -r file0</command>
  3659. </test-commands>
  3660. <cleanup-commands>
  3661. <command>-fs NAMENODE -rm -r /user</command>
  3662. </cleanup-commands>
  3663. <comparators>
  3664. <comparator>
  3665. <type>RegexpComparator</type>
  3666. <expected-output>^rm: `file0': No such file or directory</expected-output>
  3667. </comparator>
  3668. </comparators>
  3669. </test>
  3670. <test> <!-- TESTED -->
  3671. <description>rm: removing a file in hdfs:// path </description>
  3672. <test-commands>
  3673. <command>-fs NAMENODE -touchz hdfs:///file0</command>
  3674. <command>-fs NAMENODE -rm -r hdfs:///file0</command>
  3675. </test-commands>
  3676. <cleanup-commands>
  3677. <command>-fs NAMENODE -rm -r hdfs:///*</command>
  3678. </cleanup-commands>
  3679. <comparators>
  3680. <comparator>
  3681. <type>RegexpComparator</type>
  3682. <expected-output>^Deleted hdfs:///file0</expected-output>
  3683. </comparator>
  3684. </comparators>
  3685. </test>
  3686. <test> <!-- TESTED -->
  3687. <description>rm: removing a directory in hdfs:// path </description>
  3688. <test-commands>
  3689. <command>-fs NAMENODE -touchz hdfs:///dir0</command>
  3690. <command>-fs NAMENODE -rm -r hdfs:///dir0</command>
  3691. </test-commands>
  3692. <cleanup-commands>
  3693. <command>-fs NAMENODE -rm -r hdfs:///*</command>
  3694. </cleanup-commands>
  3695. <comparators>
  3696. <comparator>
  3697. <type>RegexpComparator</type>
  3698. <expected-output>^Deleted hdfs:///dir0</expected-output>
  3699. </comparator>
  3700. </comparators>
  3701. </test>
  3702. <test> <!-- TESTED -->
  3703. <description>rm: removing directories by globbing in hdfs:// path </description>
  3704. <test-commands>
  3705. <command>-fs NAMENODE -mkdir hdfs:///dir0</command>
  3706. <command>-fs NAMENODE -mkdir hdfs:///dir1</command>
  3707. <command>-fs NAMENODE -mkdir hdfs:///dir2</command>
  3708. <command>-fs NAMENODE -mkdir hdfs:///dir3</command>
  3709. <command>-fs NAMENODE -rm -r hdfs:///dir*</command>
  3710. </test-commands>
  3711. <cleanup-commands>
  3712. <command>-fs NAMENODE -rm -r hdfs:///*</command>
  3713. </cleanup-commands>
  3714. <comparators>
  3715. <comparator>
  3716. <type>RegexpComparator</type>
  3717. <expected-output>^Deleted hdfs:///dir0</expected-output>
  3718. </comparator>
  3719. <comparator>
  3720. <type>RegexpComparator</type>
  3721. <expected-output>^Deleted hdfs:///dir1</expected-output>
  3722. </comparator>
  3723. <comparator>
  3724. <type>RegexpComparator</type>
  3725. <expected-output>^Deleted hdfs:///dir2</expected-output>
  3726. </comparator>
  3727. <comparator>
  3728. <type>RegexpComparator</type>
  3729. <expected-output>^Deleted hdfs:///dir3</expected-output>
  3730. </comparator>
  3731. </comparators>
  3732. </test>
  3733. <test> <!--TESTED-->
  3734. <description>rm: removing a nonexistent file or directory in hdfs:// path </description>
  3735. <test-commands>
  3736. <command>-fs NAMENODE -rm -r hdfs:///file0</command>
  3737. </test-commands>
  3738. <cleanup-commands>
  3739. <command>-fs NAMENODE -rm -r hdfs:///*</command>
  3740. </cleanup-commands>
  3741. <comparators>
  3742. <comparator>
  3743. <type>RegexpComparator</type>
  3744. <expected-output>^rm: `hdfs:///file0': No such file or directory</expected-output>
  3745. </comparator>
  3746. </comparators>
  3747. </test>
  3748. <test> <!-- TESTED -->
  3749. <description>rm: removing directories without globbing in hdfs:// path </description>
  3750. <test-commands>
  3751. <command>-fs NAMENODE -mkdir hdfs:///dir0</command>
  3752. <command>-fs NAMENODE -mkdir hdfs:///dir1</command>
  3753. <command>-fs NAMENODE -mkdir hdfs:///dir2</command>
  3754. <command>-fs NAMENODE -mkdir hdfs:///dir3</command>
  3755. <command>-fs NAMENODE -rm -r hdfs:///dir0 hdfs:///dir1 hdfs:///dir2 hdfs:///dir3</command>
  3756. </test-commands>
  3757. <cleanup-commands>
  3758. <command>-fs NAMENODE -rm -r hdfs:///*</command>
  3759. </cleanup-commands>
  3760. <comparators>
  3761. <comparator>
  3762. <type>RegexpComparator</type>
  3763. <expected-output>^Deleted hdfs:///dir0</expected-output>
  3764. </comparator>
  3765. <comparator>
  3766. <type>RegexpComparator</type>
  3767. <expected-output>^Deleted hdfs:///dir1</expected-output>
  3768. </comparator>
  3769. <comparator>
  3770. <type>RegexpComparator</type>
  3771. <expected-output>^Deleted hdfs:///dir2</expected-output>
  3772. </comparator>
  3773. <comparator>
  3774. <type>RegexpComparator</type>
  3775. <expected-output>^Deleted hdfs:///dir3</expected-output>
  3776. </comparator>
  3777. </comparators>
  3778. </test>
  3779. <test> <!-- TESTED -->
  3780. <description>rm: Test for Namenode's path - removing a file</description>
  3781. <test-commands>
  3782. <command>-fs NAMENODE -touchz NAMENODE/file0</command>
  3783. <command>-fs NAMENODE -rm -r NAMENODE/file0</command>
  3784. </test-commands>
  3785. <cleanup-commands>
  3786. <command>-fs NAMENODE -rm -r NAMENODE/*</command>
  3787. </cleanup-commands>
  3788. <comparators>
  3789. <comparator>
  3790. <type>RegexpComparator</type>
  3791. <expected-output>^Deleted NAMENODE/file0</expected-output>
  3792. </comparator>
  3793. </comparators>
  3794. </test>
  3795. <test> <!-- TESTED -->
  3796. <description>rm: Test for Namenode's path - removing a directory</description>
  3797. <test-commands>
  3798. <command>-fs NAMENODE -touchz NAMENODE/dir0</command>
  3799. <command>-fs NAMENODE -rm -r NAMENODE/dir0</command>
  3800. </test-commands>
  3801. <cleanup-commands>
  3802. <command>-fs NAMENODE -rm -r NAMENODE/*</command>
  3803. </cleanup-commands>
  3804. <comparators>
  3805. <comparator>
  3806. <type>RegexpComparator</type>
  3807. <expected-output>^Deleted NAMENODE/dir0</expected-output>
  3808. </comparator>
  3809. </comparators>
  3810. </test>
  3811. <test> <!-- TESTED -->
  3812. <description>rm: removing directories by globbing in Namenode's path </description>
  3813. <test-commands>
  3814. <command>-fs NAMENODE -mkdir NAMENODE/dir0</command>
  3815. <command>-fs NAMENODE -mkdir NAMENODE/dir1</command>
  3816. <command>-fs NAMENODE -mkdir NAMENODE/dir2</command>
  3817. <command>-fs NAMENODE -mkdir NAMENODE/dir3</command>
  3818. <command>-fs NAMENODE -rm -r NAMENODE/dir*</command>
  3819. </test-commands>
  3820. <cleanup-commands>
  3821. <command>-fs NAMENODE -rm -r NAMENODE/*</command>
  3822. </cleanup-commands>
  3823. <comparators>
  3824. <comparator>
  3825. <type>RegexpComparator</type>
  3826. <expected-output>^Deleted NAMENODE/dir0</expected-output>
  3827. </comparator>
  3828. <comparator>
  3829. <type>RegexpComparator</type>
  3830. <expected-output>^Deleted NAMENODE/dir1</expected-output>
  3831. </comparator>
  3832. <comparator>
  3833. <type>RegexpComparator</type>
  3834. <expected-output>^Deleted NAMENODE/dir2</expected-output>
  3835. </comparator>
  3836. <comparator>
  3837. <type>RegexpComparator</type>
  3838. <expected-output>^Deleted NAMENODE/dir3</expected-output>
  3839. </comparator>
  3840. </comparators>
  3841. </test>
  3842. <test> <!--TESTED-->
  3843. <description>rm: removing a nonexistent file or directory in Namenode's path </description>
  3844. <test-commands>
  3845. <command>-fs NAMENODE -rm -r NAMENODE/file0</command>
  3846. </test-commands>
  3847. <cleanup-commands>
  3848. <command>-fs NAMENODE -rm -r NAMENODE/*</command>
  3849. </cleanup-commands>
  3850. <comparators>
  3851. <comparator>
  3852. <type>RegexpComparator</type>
  3853. <expected-output>^rm: `NAMENODE/file0': No such file or directory</expected-output>
  3854. </comparator>
  3855. </comparators>
  3856. </test>
  3857. <test> <!-- TESTED -->
  3858. <description>rm: removing directories without globbing in Namenode's path </description>
  3859. <test-commands>
  3860. <command>-fs NAMENODE -mkdir NAMENODE/dir0</command>
  3861. <command>-fs NAMENODE -mkdir NAMENODE/dir1</command>
  3862. <command>-fs NAMENODE -mkdir NAMENODE/dir2</command>
  3863. <command>-fs NAMENODE -mkdir NAMENODE/dir3</command>
  3864. <command>-fs NAMENODE -rm -r NAMENODE/dir0 NAMENODE/dir1 NAMENODE/dir2 NAMENODE/dir3</command>
  3865. </test-commands>
  3866. <cleanup-commands>
  3867. <command>-fs NAMENODE -rm -r NAMENODE/*</command>
  3868. </cleanup-commands>
  3869. <comparators>
  3870. <comparator>
  3871. <type>RegexpComparator</type>
  3872. <expected-output>^Deleted NAMENODE/dir0</expected-output>
  3873. </comparator>
  3874. <comparator>
  3875. <type>RegexpComparator</type>
  3876. <expected-output>^Deleted NAMENODE/dir1</expected-output>
  3877. </comparator>
  3878. <comparator>
  3879. <type>RegexpComparator</type>
  3880. <expected-output>^Deleted NAMENODE/dir2</expected-output>
  3881. </comparator>
  3882. <comparator>
  3883. <type>RegexpComparator</type>
  3884. <expected-output>^Deleted NAMENODE/dir3</expected-output>
  3885. </comparator>
  3886. </comparators>
  3887. </test>
  3888. <!-- Tests for expunge -->
  3889. <!-- Not yet implemented -->
  3890. <!-- Tests for put -->
  3891. <test> <!-- TESTED -->
  3892. <description>put: putting file into a file (absolute path)</description>
  3893. <test-commands>
  3894. <command>-fs NAMENODE -put CLITEST_DATA/data15bytes /data15bytes</command>
  3895. <command>-fs NAMENODE -du /data15bytes</command>
  3896. </test-commands>
  3897. <cleanup-commands>
  3898. <command>-fs NAMENODE -rm /data15bytes</command>
  3899. </cleanup-commands>
  3900. <comparators>
  3901. <comparator>
  3902. <type>RegexpComparator</type>
  3903. <expected-output>^15\s+/data15bytes</expected-output>
  3904. </comparator>
  3905. </comparators>
  3906. </test>
  3907. <test> <!-- TESTED -->
  3908. <description>put: putting file into a file (relative path)</description>
  3909. <test-commands>
  3910. <command>-fs NAMENODE -mkdir -p dir</command> <!-- make sure user home dir exists -->
  3911. <command>-fs NAMENODE -touchz test</command>
  3912. <command>-fs NAMENODE -put CLITEST_DATA/data15bytes data15bytes</command>
  3913. <command>-fs NAMENODE -du data15bytes</command>
  3914. </test-commands>
  3915. <cleanup-commands>
  3916. <command>-fs NAMENODE -rm -r /user</command>
  3917. </cleanup-commands>
  3918. <comparators>
  3919. <comparator>
  3920. <type>RegexpComparator</type>
  3921. <expected-output>^15\s+data15bytes</expected-output>
  3922. </comparator>
  3923. </comparators>
  3924. </test>
  3925. <test> <!-- TESTED -->
  3926. <description>put: putting file into a directory(absolute path)</description>
  3927. <test-commands>
  3928. <command>-fs NAMENODE -mkdir -p /dir0/dir1/data</command>
  3929. <command>-fs NAMENODE -put CLITEST_DATA/data15bytes /dir0/dir1/data</command> -->
  3930. <command>-fs NAMENODE -du /dir0/dir1/data</command>
  3931. </test-commands>
  3932. <cleanup-commands>
  3933. <command>-fs NAMENODE -rm -r /dir0</command>
  3934. </cleanup-commands>
  3935. <comparators>
  3936. <comparator>
  3937. <type>RegexpComparator</type>
  3938. <expected-output>^15\s+/dir0/dir1/data/data15bytes</expected-output>
  3939. </comparator>
  3940. </comparators>
  3941. </test>
  3942. <test> <!-- TESTED -->
  3943. <description>put: putting file into a directory(relative path)</description>
  3944. <test-commands>
  3945. <command>-fs NAMENODE -mkdir -p dir0/dir1/data</command>
  3946. <command>-fs NAMENODE -put CLITEST_DATA/data15bytes dir0/dir1/data</command>
  3947. <command>-fs NAMENODE -du dir0/dir1/data</command>
  3948. </test-commands>
  3949. <cleanup-commands>
  3950. <command>-fs NAMENODE -rm -r /user</command>
  3951. </cleanup-commands>
  3952. <comparators>
  3953. <comparator>
  3954. <type>RegexpComparator</type>
  3955. <expected-output>^15\s+dir0/dir1/data/data15bytes</expected-output>
  3956. </comparator>
  3957. </comparators>
  3958. </test>
  3959. <test> <!-- TESTED -->
  3960. <description>put: putting many files into an existing directory(absolute path)</description>
  3961. <test-commands>
  3962. <command>-fs NAMENODE -mkdir /dir0</command>
  3963. <command>-fs NAMENODE -put CLITEST_DATA/data15bytes CLITEST_DATA/data30bytes /dir0</command>
  3964. <command>-fs NAMENODE -du /dir0</command>
  3965. </test-commands>
  3966. <cleanup-commands>
  3967. <command>-fs NAMENODE -rm -r /user</command>
  3968. </cleanup-commands>
  3969. <comparators>
  3970. <comparator>
  3971. <type>RegexpComparator</type>
  3972. <expected-output>^15\s+/dir0/data15bytes</expected-output>
  3973. </comparator>
  3974. <comparator>
  3975. <type>RegexpComparator</type>
  3976. <expected-output>^30\s+/dir0/data30bytes</expected-output>
  3977. </comparator>
  3978. </comparators>
  3979. </test>
  3980. <test> <!-- TESTED -->
  3981. <description>put: putting many files into an existing directory(relative path)</description>
  3982. <test-commands>
  3983. <command>-fs NAMENODE -mkdir -p dir0</command>
  3984. <command>-fs NAMENODE -put CLITEST_DATA/data15bytes CLITEST_DATA/data30bytes dir0</command>
  3985. <command>-fs NAMENODE -du dir0</command>
  3986. </test-commands>
  3987. <cleanup-commands>
  3988. <command>-fs NAMENODE -rm -r /user</command>
  3989. </cleanup-commands>
  3990. <comparators>
  3991. <comparator>
  3992. <type>RegexpComparator</type>
  3993. <expected-output>^15\s+dir0/data15bytes</expected-output>
  3994. </comparator>
  3995. <comparator>
  3996. <type>RegexpComparator</type>
  3997. <expected-output>^30\s+dir0/data30bytes</expected-output>
  3998. </comparator>
  3999. </comparators>
  4000. </test>
  4001. <test> <!-- TESTED -->
  4002. <description>put: putting non existent file(absolute path)</description>
  4003. <test-commands>
  4004. <command>-fs NAMENODE -mkdir -p dir</command> <!-- make sure user home dir exists -->
  4005. <command>-fs NAMENODE -touchz test</command>
  4006. <command>-fs NAMENODE -put /user/wrongdata file</command>
  4007. </test-commands>
  4008. <cleanup-commands>
  4009. <command>-fs NAMENODE -rm -r /user</command>
  4010. </cleanup-commands>
  4011. <comparators>
  4012. <comparator>
  4013. <type>TokenComparator</type>
  4014. <expected-output>put: `/user/wrongdata': No such file or directory</expected-output>
  4015. </comparator>
  4016. </comparators>
  4017. </test>
  4018. <test> <!-- TESTED -->
  4019. <description>put: putting non existent file(relative path)</description>
  4020. <test-commands>
  4021. <command>-fs NAMENODE -mkdir -p dir</command> <!-- make sure user home dir exists -->
  4022. <command>-fs NAMENODE -touchz test</command>
  4023. <command>-fs NAMENODE -put wrongdata file</command>
  4024. </test-commands>
  4025. <cleanup-commands>
  4026. <command>-fs NAMENODE -rm -r /user</command>
  4027. </cleanup-commands>
  4028. <comparators>
  4029. <comparator>
  4030. <type>TokenComparator</type>
  4031. <expected-output>put: `wrongdata': No such file or directory</expected-output>
  4032. </comparator>
  4033. </comparators>
  4034. </test>
  4035. <test> <!-- TESTED -->
  4036. <description>put: putting file into an already existing destination(absolute path)</description>
  4037. <test-commands>
  4038. <command>-fs NAMENODE -mkdir /user</command>
  4039. <command>-fs NAMENODE -touchz /user/file0</command>
  4040. <command>-fs NAMENODE -put CLITEST_DATA/data15bytes /user/file0</command>
  4041. </test-commands>
  4042. <cleanup-commands>
  4043. <command>-fs NAMENODE -rm -r /user</command>
  4044. </cleanup-commands>
  4045. <comparators>
  4046. <comparator>
  4047. <type>TokenComparator</type>
  4048. <expected-output>put: `/user/file0': File exists</expected-output>
  4049. </comparator>
  4050. </comparators>
  4051. </test>
  4052. <test> <!-- TESTED -->
  4053. <description>put: putting file into an already existing destination with -f option(absolute path)</description>
  4054. <test-commands>
  4055. <command>-fs NAMENODE -mkdir /user</command>
  4056. <command>-fs NAMENODE -touchz /user/file0</command>
  4057. <command>-fs NAMENODE -put -f CLITEST_DATA/data120bytes /user/file0</command>
  4058. <command>-fs NAMENODE -cat /user/file0</command>
  4059. </test-commands>
  4060. <cleanup-commands>
  4061. <command>-fs NAMENODE -rm -r /user</command>
  4062. </cleanup-commands>
  4063. <comparators>
  4064. <comparator>
  4065. <type>RegexpComparator</type>
  4066. <expected-output>12345678901234</expected-output>
  4067. </comparator>
  4068. </comparators>
  4069. </test>
  4070. <test> <!-- TESTED -->
  4071. <description>put: putting file into an already existing destination(relative path)</description>
  4072. <test-commands>
  4073. <command>-fs NAMENODE -mkdir -p dir</command> <!-- make sure user home dir exists -->
  4074. <command>-fs NAMENODE -touchz file0</command>
  4075. <command>-fs NAMENODE -put CLITEST_DATA/data15bytes file0</command>
  4076. </test-commands>
  4077. <cleanup-commands>
  4078. <command>-fs NAMENODE -rm -r /user</command>
  4079. </cleanup-commands>
  4080. <comparators>
  4081. <comparator>
  4082. <type>TokenComparator</type>
  4083. <expected-output>put: `file0': File exists</expected-output>
  4084. </comparator>
  4085. </comparators>
  4086. </test>
  4087. <test> <!-- TESTED -->
  4088. <description>put: putting many files into an existing file</description>
  4089. <test-commands>
  4090. <command>-fs NAMENODE -put CLITEST_DATA/data15bytes /data15bytes</command>
  4091. <command>-fs NAMENODE -put CLITEST_DATA/data30bytes /data30bytes</command>
  4092. <command>-fs NAMENODE -mkdir -p dir</command> <!-- make sure user home dir exists -->
  4093. <command>-fs NAMENODE -touchz file0</command>
  4094. <command>-fs NAMENODE -put /data15bytes /data30bytes file0</command>
  4095. </test-commands>
  4096. <cleanup-commands>
  4097. <command>-fs NAMENODE -rm -r /user</command>
  4098. </cleanup-commands>
  4099. <comparators>
  4100. <comparator>
  4101. <type>RegexpComparator</type>
  4102. <expected-output>^put: `file0': Is not a directory</expected-output>
  4103. </comparator>
  4104. </comparators>
  4105. </test>
  4106. <test> <!-- TESTED -->
  4107. <description>put: putting many files into a non existent directory</description>
  4108. <test-commands>
  4109. <command>-fs NAMENODE -put CLITEST_DATA/data15bytes /data15bytes</command>
  4110. <command>-fs NAMENODE -put CLITEST_DATA/data30bytes /data30bytes</command>
  4111. <command>-fs NAMENODE -put /data15bytes /data30bytes wrongdir</command>
  4112. </test-commands>
  4113. <cleanup-commands>
  4114. <command>-fs NAMENODE -rm -r /user</command>
  4115. </cleanup-commands>
  4116. <comparators>
  4117. <comparator>
  4118. <type>RegexpComparator</type>
  4119. <expected-output>^put: `wrongdir': No such file or directory</expected-output>
  4120. </comparator>
  4121. </comparators>
  4122. </test>
  4123. <test> <!-- TESTED -->
  4124. <description>put: putting a local file into hdfs:// path </description>
  4125. <test-commands>
  4126. <command>-fs NAMENODE -put CLITEST_DATA/data15bytes hdfs:///data15bytes</command>
  4127. <command>-fs NAMENODE -du hdfs:///data15bytes</command>
  4128. </test-commands>
  4129. <cleanup-commands>
  4130. <command>-fs NAMENODE -rm hdfs:///data15bytes</command>
  4131. </cleanup-commands>
  4132. <comparators>
  4133. <comparator>
  4134. <type>RegexpComparator</type>
  4135. <expected-output>^15\s+hdfs:///data15bytes</expected-output>
  4136. </comparator>
  4137. </comparators>
  4138. </test>
  4139. <test> <!-- TESTED -->
  4140. <description>put: putting file into a directory in hdfs:// path </description>
  4141. <test-commands>
  4142. <command>-fs NAMENODE -mkdir -p /dir1/data</command>
  4143. <command>-fs NAMENODE -put CLITEST_DATA/data15bytes hdfs:///dir1/data</command>
  4144. <command>-fs NAMENODE -du hdfs:///dir1/data/</command>
  4145. </test-commands>
  4146. <cleanup-commands>
  4147. <command>-fs NAMENODE -rm -r hdfs:///dir1/data</command>
  4148. </cleanup-commands>
  4149. <comparators>
  4150. <comparator>
  4151. <type>RegexpComparator</type>
  4152. <expected-output>^15\s+hdfs:///dir1/data/data15bytes</expected-output>
  4153. </comparator>
  4154. </comparators>
  4155. </test>
  4156. <test> <!-- TESTED -->
  4157. <description>put: putting many local files into an existing directory in hdfs:// path </description>
  4158. <test-commands>
  4159. <command>-fs NAMENODE -mkdir hdfs:///dir0</command>
  4160. <command>-fs NAMENODE -put CLITEST_DATA/data15bytes CLITEST_DATA/data30bytes hdfs:///dir0</command>
  4161. <command>-fs NAMENODE -du hdfs:///dir0</command>
  4162. </test-commands>
  4163. <cleanup-commands>
  4164. <command>-fs NAMENODE -rm -r hdfs:///dir0</command>
  4165. </cleanup-commands>
  4166. <comparators>
  4167. <comparator>
  4168. <type>RegexpComparator</type>
  4169. <expected-output>^15\s+hdfs:///dir0/data15bytes</expected-output>
  4170. </comparator>
  4171. <comparator>
  4172. <type>RegexpComparator</type>
  4173. <expected-output>^30\s+hdfs:///dir0/data30bytes</expected-output>
  4174. </comparator>
  4175. </comparators>
  4176. </test>
  4177. <test> <!-- TESTED -->
  4178. <description>put: putting non existent file in hdfs:// path </description>
  4179. <test-commands>
  4180. <command>-fs NAMENODE -put /user/wrongdata hdfs:///file</command>
  4181. </test-commands>
  4182. <cleanup-commands>
  4183. <command>-fs NAMENODE -rm -r hdfs:///*</command>
  4184. </cleanup-commands>
  4185. <comparators>
  4186. <comparator>
  4187. <type>TokenComparator</type>
  4188. <expected-output>put: `/user/wrongdata': No such file or directory</expected-output>
  4189. </comparator>
  4190. </comparators>
  4191. </test>
  4192. <test> <!-- TESTED -->
  4193. <description>put: putting local file into an already existing destination in hdfs:// path </description>
  4194. <test-commands>
  4195. <command>-fs NAMENODE -mkdir hdfs:///user/</command>
  4196. <command>-fs NAMENODE -touchz hdfs:///user/file0</command>
  4197. <command>-fs NAMENODE -put CLITEST_DATA/data15bytes hdfs:///user/file0</command>
  4198. </test-commands>
  4199. <cleanup-commands>
  4200. <command>-fs NAMENODE -rm -r hdfs:///user</command>
  4201. </cleanup-commands>
  4202. <comparators>
  4203. <comparator>
  4204. <type>TokenComparator</type>
  4205. <expected-output>put: `hdfs:///user/file0': File exists</expected-output>
  4206. </comparator>
  4207. </comparators>
  4208. </test>
  4209. <test> <!-- TESTED -->
  4210. <description>put: putting many local files into an existing file in hdfs:// path</description>
  4211. <test-commands>
  4212. <command>-fs NAMENODE -touchz hdfs:///file0</command>
  4213. <command>-fs NAMENODE -put CLITEST_DATA/data15bytes CLITEST_DATA/data30bytes hdfs:///file0</command>
  4214. </test-commands>
  4215. <cleanup-commands>
  4216. <command>-fs NAMENODE -rm -r hdfs:///*</command>
  4217. </cleanup-commands>
  4218. <comparators>
  4219. <comparator>
  4220. <type>RegexpComparator</type>
  4221. <expected-output>^put: `hdfs:///file0': Is not a directory</expected-output>
  4222. </comparator>
  4223. </comparators>
  4224. </test>
  4225. <test> <!-- TESTED -->
  4226. <description>put: putting file into a non existent directory in hdfs:// path </description>
  4227. <test-commands>
  4228. <command>-fs NAMENODE -put CLITEST_DATA/data15bytes CLITEST_DATA/data30bytes hdfs:///wrongdir</command>
  4229. </test-commands>
  4230. <cleanup-commands>
  4231. <command>-fs NAMENODE -rm -r hdfs:///*</command>
  4232. </cleanup-commands>
  4233. <comparators>
  4234. <comparator>
  4235. <type>RegexpComparator</type>
  4236. <expected-output>^put: `hdfs:///wrongdir': No such file or directory</expected-output>
  4237. </comparator>
  4238. </comparators>
  4239. </test>
  4240. <test> <!-- TESTED -->
  4241. <description>put: putting a local file into in Namenode's path </description>
  4242. <test-commands>
  4243. <command>-fs NAMENODE -put CLITEST_DATA/data15bytes NAMENODE/data15bytes</command>
  4244. <command>-fs NAMENODE -du NAMENODE/data15bytes</command>
  4245. </test-commands>
  4246. <cleanup-commands>
  4247. <command>-fs NAMENODE -rm NAMENODE/data15bytes</command>
  4248. </cleanup-commands>
  4249. <comparators>
  4250. <comparator>
  4251. <type>RegexpComparator</type>
  4252. <expected-output>^15\s+NAMENODE/data15bytes</expected-output>
  4253. </comparator>
  4254. </comparators>
  4255. </test>
  4256. <test> <!-- TESTED -->
  4257. <description>put: putting file into a directory in Namenode's path </description>
  4258. <test-commands>
  4259. <command>-fs NAMENODE -mkdir -p /dir1/data</command>
  4260. <command>-fs NAMENODE -put CLITEST_DATA/data15bytes NAMENODE/dir1/data</command>
  4261. <command>-fs NAMENODE -du NAMENODE/dir1/data</command>
  4262. </test-commands>
  4263. <cleanup-commands>
  4264. <command>-fs NAMENODE -rm -r NAMENODE/dir1/data</command>
  4265. </cleanup-commands>
  4266. <comparators>
  4267. <comparator>
  4268. <type>RegexpComparator</type>
  4269. <expected-output>^15\s+NAMENODE/dir1/data/data15bytes</expected-output>
  4270. </comparator>
  4271. </comparators>
  4272. </test>
  4273. <test> <!-- TESTED -->
  4274. <description>put: putting many local files into an existing directory in Namenode's path</description>
  4275. <test-commands>
  4276. <command>-fs NAMENODE -mkdir NAMENODE/dir0</command>
  4277. <command>-fs NAMENODE -put CLITEST_DATA/data15bytes CLITEST_DATA/data30bytes NAMENODE/dir0</command>
  4278. <command>-fs NAMENODE -du NAMENODE/dir0</command>
  4279. </test-commands>
  4280. <cleanup-commands>
  4281. <command>-fs NAMENODE -rm -r NAMENODE/dir0</command>
  4282. </cleanup-commands>
  4283. <comparators>
  4284. <comparator>
  4285. <type>RegexpComparator</type>
  4286. <expected-output>^15\s+NAMENODE/dir0/data15bytes</expected-output>
  4287. </comparator>
  4288. <comparator>
  4289. <type>RegexpComparator</type>
  4290. <expected-output>^30\s+NAMENODE/dir0/data30bytes</expected-output>
  4291. </comparator>
  4292. </comparators>
  4293. </test>
  4294. <test> <!-- TESTED -->
  4295. <description>put: putting non existent file in Namenode's path </description>
  4296. <test-commands>
  4297. <command>-fs NAMENODE -put /user/wrongdata NAMENODE/file</command>
  4298. </test-commands>
  4299. <cleanup-commands>
  4300. <command>-fs NAMENODE -rm -r NAMENODE/*</command>
  4301. </cleanup-commands>
  4302. <comparators>
  4303. <comparator>
  4304. <type>RegexpComparator</type>
  4305. <expected-output>^put: `/user/wrongdata': No such file or directory</expected-output>
  4306. </comparator>
  4307. </comparators>
  4308. </test>
  4309. <test> <!-- TESTED -->
  4310. <description>put: putting local file into an already existing destination in Namenode's path</description>
  4311. <test-commands>
  4312. <command>-fs NAMENODE -mkdir NAMENODE/user/</command>
  4313. <command>-fs NAMENODE -touchz NAMENODE/user/file0</command>
  4314. <command>-fs NAMENODE -put CLITEST_DATA/data15bytes NAMENODE/user/file0</command>
  4315. </test-commands>
  4316. <cleanup-commands>
  4317. <command>-fs NAMENODE -rm -r NAMENODE/user</command>
  4318. </cleanup-commands>
  4319. <comparators>
  4320. <comparator>
  4321. <type>RegexpComparator</type>
  4322. <expected-output>^put: `hdfs://\w+[-.a-z0-9]*:[0-9]+/user/file0': File exists</expected-output>
  4323. </comparator>
  4324. </comparators>
  4325. </test>
  4326. <test> <!-- TESTED -->
  4327. <description>put: putting many local files into an existing file in Namenode's path </description>
  4328. <test-commands>
  4329. <command>-fs NAMENODE -touchz NAMENODE/file0</command>
  4330. <command>-fs NAMENODE -put CLITEST_DATA/data15bytes CLITEST_DATA/data30bytes NAMENODE/file0</command>
  4331. </test-commands>
  4332. <cleanup-commands>
  4333. <command>-fs NAMENODE -rm -r NAMENODE/*</command>
  4334. </cleanup-commands>
  4335. <comparators>
  4336. <comparator>
  4337. <type>RegexpComparator</type>
  4338. <expected-output>^put: `hdfs://\w+[-.a-z0-9]*:[0-9]+/file0': Is not a directory</expected-output>
  4339. </comparator>
  4340. </comparators>
  4341. </test>
  4342. <test> <!-- TESTED -->
  4343. <description>put: putting many files into a non existent directory in Namenode's path </description>
  4344. <test-commands>
  4345. <command>-fs NAMENODE -put CLITEST_DATA/data15bytes CLITEST_DATA/data30bytes NAMENODE/wrongdir</command>
  4346. </test-commands>
  4347. <cleanup-commands>
  4348. <command>-fs NAMENODE -rm -r NAMENODE/*</command>
  4349. </cleanup-commands>
  4350. <comparators>
  4351. <comparator>
  4352. <type>RegexpComparator</type>
  4353. <expected-output>^put: `hdfs://\w+[-.a-z0-9]*:[0-9]+/wrongdir': No such file or directory</expected-output>
  4354. </comparator>
  4355. </comparators>
  4356. </test>
  4357. <!-- Tests for copyFromLocal -->
  4358. <test> <!-- TESTED -->
  4359. <description>copyFromLocal: copying file into a file (absolute path)</description>
  4360. <test-commands>
  4361. <command>-fs NAMENODE -copyFromLocal CLITEST_DATA/data15bytes /data15bytes</command>
  4362. <command>-fs NAMENODE -du /data15bytes</command>
  4363. </test-commands>
  4364. <cleanup-commands>
  4365. <command>-fs NAMENODE -rm /data15bytes</command>
  4366. </cleanup-commands>
  4367. <comparators>
  4368. <comparator>
  4369. <type>RegexpComparator</type>
  4370. <expected-output>^15\s+/data15bytes</expected-output>
  4371. </comparator>
  4372. </comparators>
  4373. </test>
  4374. <test> <!-- TESTED -->
  4375. <description>copyFromLocal: copying file into a file (relative path)</description>
  4376. <test-commands>
  4377. <command>-fs NAMENODE -mkdir -p dir</command> <!-- make sure user home dir exists -->
  4378. <command>-fs NAMENODE -touchz test</command>
  4379. <command>-fs NAMENODE -copyFromLocal CLITEST_DATA/data15bytes data15bytes</command>
  4380. <command>-fs NAMENODE -du data15bytes</command>
  4381. </test-commands>
  4382. <cleanup-commands>
  4383. <command>-fs NAMENODE -rm -r /user</command>
  4384. </cleanup-commands>
  4385. <comparators>
  4386. <comparator>
  4387. <type>RegexpComparator</type>
  4388. <expected-output>^15\s+data15bytes</expected-output>
  4389. </comparator>
  4390. </comparators>
  4391. </test>
  4392. <test> <!-- TESTED -->
  4393. <description>copyFromLocal: copying file into a directory(absolute path)</description>
  4394. <test-commands>
  4395. <command>-fs NAMENODE -mkdir -p /dir0/dir1/data</command>
  4396. <command>-fs NAMENODE -copyFromLocal CLITEST_DATA/data15bytes /dir0/dir1/data</command>
  4397. <command>-fs NAMENODE -du /dir0/dir1/data/*</command>
  4398. </test-commands>
  4399. <cleanup-commands>
  4400. <command>-fs NAMENODE -rm -r /dir0</command>
  4401. </cleanup-commands>
  4402. <comparators>
  4403. <comparator>
  4404. <type>RegexpComparator</type>
  4405. <expected-output>^15\s+/dir0/dir1/data/data15bytes</expected-output>
  4406. </comparator>
  4407. </comparators>
  4408. </test>
  4409. <test> <!-- TESTED -->
  4410. <description>copyFromLocal: copying file into a directory(relative path)</description>
  4411. <test-commands>
  4412. <command>-fs NAMENODE -mkdir -p dir0/dir1/data</command>
  4413. <command>-fs NAMENODE -copyFromLocal CLITEST_DATA/data15bytes dir0/dir1/data</command>
  4414. <command>-fs NAMENODE -du dir0/dir1/data/*</command>
  4415. </test-commands>
  4416. <cleanup-commands>
  4417. <command>-fs NAMENODE -rm -r /user</command>
  4418. </cleanup-commands>
  4419. <comparators>
  4420. <comparator>
  4421. <type>RegexpComparator</type>
  4422. <expected-output>^15\s+dir0/dir1/data/data15bytes</expected-output>
  4423. </comparator>
  4424. </comparators>
  4425. </test>
  4426. <test> <!-- TESTED -->
  4427. <description>copyFromLocal: copying many files into an existing directory(absolute path)</description>
  4428. <test-commands>
  4429. <command>-fs NAMENODE -mkdir /dir0</command>
  4430. <command>-fs NAMENODE -copyFromLocal CLITEST_DATA/data15bytes CLITEST_DATA/data30bytes /dir0</command>
  4431. <command>-fs NAMENODE -du /dir0</command>
  4432. </test-commands>
  4433. <cleanup-commands>
  4434. <command>-fs NAMENODE -rm -r /user</command>
  4435. </cleanup-commands>
  4436. <comparators>
  4437. <comparator>
  4438. <type>RegexpComparator</type>
  4439. <expected-output>^15\s+/dir0/data15bytes</expected-output>
  4440. </comparator>
  4441. <comparator>
  4442. <type>RegexpComparator</type>
  4443. <expected-output>^30\s+/dir0/data30bytes</expected-output>
  4444. </comparator>
  4445. </comparators>
  4446. </test>
  4447. <test> <!-- TESTED -->
  4448. <description>copyFromLocal: copying many files into an existing directory(relative path)</description>
  4449. <test-commands>
  4450. <command>-fs NAMENODE -mkdir -p dir0</command>
  4451. <command>-fs NAMENODE -copyFromLocal CLITEST_DATA/data15bytes CLITEST_DATA/data30bytes dir0</command>
  4452. <command>-fs NAMENODE -du dir0</command>
  4453. </test-commands>
  4454. <cleanup-commands>
  4455. <command>-fs NAMENODE -rm -r /user</command>
  4456. </cleanup-commands>
  4457. <comparators>
  4458. <comparator>
  4459. <type>RegexpComparator</type>
  4460. <expected-output>^15\s+dir0/data15bytes</expected-output>
  4461. </comparator>
  4462. <comparator>
  4463. <type>RegexpComparator</type>
  4464. <expected-output>^30\s+dir0/data30bytes</expected-output>
  4465. </comparator>
  4466. </comparators>
  4467. </test>
  4468. <test> <!-- TESTED -->
  4469. <description>copyFromLocal: copying non existent file(absolute path)</description>
  4470. <test-commands>
  4471. <command>-fs NAMENODE -mkdir -p dir</command> <!-- make sure user home dir exists -->
  4472. <command>-fs NAMENODE -touchz test</command>
  4473. <command>-fs NAMENODE -copyFromLocal /user/wrongdata file</command>
  4474. </test-commands>
  4475. <cleanup-commands>
  4476. <command>-fs NAMENODE -rm -r /user</command>
  4477. </cleanup-commands>
  4478. <comparators>
  4479. <comparator>
  4480. <type>TokenComparator</type>
  4481. <expected-output>copyFromLocal: `/user/wrongdata': No such file or directory</expected-output>
  4482. </comparator>
  4483. </comparators>
  4484. </test>
  4485. <test> <!-- TESTED -->
  4486. <description>copyFromLocal: copying non existent file(relative path)</description>
  4487. <test-commands>
  4488. <command>-fs NAMENODE -mkdir -p dir</command> <!-- make sure user home dir exists -->
  4489. <command>-fs NAMENODE -touchz test</command>
  4490. <command>-fs NAMENODE -copyFromLocal wrongdata file</command>
  4491. </test-commands>
  4492. <cleanup-commands>
  4493. <command>-fs NAMENODE -rm -r /user</command>
  4494. </cleanup-commands>
  4495. <comparators>
  4496. <comparator>
  4497. <type>TokenComparator</type>
  4498. <expected-output>copyFromLocal: `wrongdata': No such file or directory</expected-output>
  4499. </comparator>
  4500. </comparators>
  4501. </test>
  4502. <test> <!-- TESTED -->
  4503. <description>copyFromLocal: copying file into an already existing destination(absolute path)</description>
  4504. <test-commands>
  4505. <command>-fs NAMENODE -mkdir /user</command>
  4506. <command>-fs NAMENODE -touchz /user/file0</command>
  4507. <command>-fs NAMENODE -copyFromLocal CLITEST_DATA/data15bytes /user/file0</command>
  4508. </test-commands>
  4509. <cleanup-commands>
  4510. <command>-fs NAMENODE -rm -r /user</command>
  4511. </cleanup-commands>
  4512. <comparators>
  4513. <comparator>
  4514. <type>TokenComparator</type>
  4515. <expected-output>copyFromLocal: `/user/file0': File exists</expected-output>
  4516. </comparator>
  4517. </comparators>
  4518. </test>
  4519. <test> <!-- TESTED -->
  4520. <description>copyFromLocal: copying file into an already existing destination with -f option(absolute path)</description>
  4521. <test-commands>
  4522. <command>-fs NAMENODE -mkdir /user</command>
  4523. <command>-fs NAMENODE -touchz /user/file0</command>
  4524. <command>-fs NAMENODE -copyFromLocal -f CLITEST_DATA/data120bytes /user/file0</command>
  4525. <command>-fs NAMENODE -cat /user/file0</command>
  4526. </test-commands>
  4527. <cleanup-commands>
  4528. <command>-fs NAMENODE -rm -r /user</command>
  4529. </cleanup-commands>
  4530. <comparators>
  4531. <comparator>
  4532. <type>RegexpComparator</type>
  4533. <expected-output>12345678901234</expected-output>
  4534. </comparator>
  4535. </comparators>
  4536. </test>
  4537. <test> <!-- TESTED -->
  4538. <description>copyFromLocal: copying file into an already existing destination(relative path)</description>
  4539. <test-commands>
  4540. <command>-fs NAMENODE -mkdir -p dir</command> <!-- make sure user home dir exists -->
  4541. <command>-fs NAMENODE -touchz file0</command>
  4542. <command>-fs NAMENODE -copyFromLocal CLITEST_DATA/data15bytes file0</command>
  4543. </test-commands>
  4544. <cleanup-commands>
  4545. <command>-fs NAMENODE -rm -r /user</command>
  4546. </cleanup-commands>
  4547. <comparators>
  4548. <comparator>
  4549. <type>TokenComparator</type>
  4550. <expected-output>copyFromLocal: `file0': File exists</expected-output>
  4551. </comparator>
  4552. </comparators>
  4553. </test>
  4554. <test> <!-- TESTED -->
  4555. <description>copyFromLocal: copying many files into an existing file</description>
  4556. <test-commands>
  4557. <command>-fs NAMENODE -copyFromLocal CLITEST_DATA/data15bytes /data15bytes</command>
  4558. <command>-fs NAMENODE -copyFromLocal CLITEST_DATA/data30bytes /data30bytes</command>
  4559. <command>-fs NAMENODE -mkdir -p dir</command> <!-- make sure user home dir exists -->
  4560. <command>-fs NAMENODE -touchz file0</command>
  4561. <command>-fs NAMENODE -copyFromLocal /data15bytes /data30bytes file0</command>
  4562. </test-commands>
  4563. <cleanup-commands>
  4564. <command>-fs NAMENODE -rm -r /user</command>
  4565. </cleanup-commands>
  4566. <comparators>
  4567. <comparator>
  4568. <type>RegexpComparator</type>
  4569. <expected-output>^copyFromLocal: `file0': Is not a directory</expected-output>
  4570. </comparator>
  4571. </comparators>
  4572. </test>
  4573. <test> <!-- TESTED -->
  4574. <description>copyFromLocal: copying many files into a non existent directory</description>
  4575. <test-commands>
  4576. <command>-fs NAMENODE -copyFromLocal CLITEST_DATA/data15bytes /data15bytes</command>
  4577. <command>-fs NAMENODE -copyFromLocal CLITEST_DATA/data30bytes /data30bytes</command>
  4578. <command>-fs NAMENODE -copyFromLocal /data15bytes /data30bytes wrongdir</command>
  4579. </test-commands>
  4580. <cleanup-commands>
  4581. <command>-fs NAMENODE -rm -r /user</command>
  4582. </cleanup-commands>
  4583. <comparators>
  4584. <comparator>
  4585. <type>RegexpComparator</type>
  4586. <expected-output>^copyFromLocal: `wrongdir': No such file or directory</expected-output>
  4587. </comparator>
  4588. </comparators>
  4589. </test>
  4590. <test> <!-- TESTED -->
  4591. <description>copyFromLocal: Test for hdfs:// path - copying local file into a hdfs://file</description>
  4592. <test-commands>
  4593. <command>-fs NAMENODE -copyFromLocal CLITEST_DATA/data15bytes hdfs:///data15bytes</command>
  4594. <command>-fs NAMENODE -du hdfs:///data15bytes</command>
  4595. </test-commands>
  4596. <cleanup-commands>
  4597. <command>-fs NAMENODE -rm hdfs:///data15bytes</command>
  4598. </cleanup-commands>
  4599. <comparators>
  4600. <comparator>
  4601. <type>RegexpComparator</type>
  4602. <expected-output>^15\s+hdfs:///data15bytes</expected-output>
  4603. </comparator>
  4604. </comparators>
  4605. </test>
  4606. <test> <!-- TESTED -->
  4607. <description>copyFromLocal: Test for hdfs:// path - copying local file into a hdfs directory</description>
  4608. <test-commands>
  4609. <command>-fs NAMENODE -mkdir hdfs:///dir0</command>
  4610. <command>-fs NAMENODE -mkdir hdfs:///dir0/dir1</command>
  4611. <command>-fs NAMENODE -mkdir hdfs:///dir0/dir1/data</command>
  4612. <command>-fs NAMENODE -copyFromLocal CLITEST_DATA/data15bytes hdfs:///dir0/dir1/data/</command>
  4613. <command>-fs NAMENODE -du hdfs:///dir0/dir1/data/data15bytes</command>
  4614. </test-commands>
  4615. <cleanup-commands>
  4616. <command>-fs NAMENODE -rm -r hdfs:///dir0</command>
  4617. </cleanup-commands>
  4618. <comparators>
  4619. <comparator>
  4620. <type>RegexpComparator</type>
  4621. <expected-output>^15\s+hdfs:///dir0/dir1/data/data15bytes</expected-output>
  4622. </comparator>
  4623. </comparators>
  4624. </test>
  4625. <test> <!-- TESTED -->
  4626. <description>copyFromLocal: Test for hdfs:// path copying many local files into an existing hdfs directory</description>
  4627. <test-commands>
  4628. <command>-fs NAMENODE -mkdir hdfs:///dir0</command>
  4629. <command>-fs NAMENODE -copyFromLocal CLITEST_DATA/data15bytes CLITEST_DATA/data30bytes hdfs:///dir0</command>
  4630. <command>-fs NAMENODE -du hdfs:///dir0</command>
  4631. </test-commands>
  4632. <cleanup-commands>
  4633. <command>-fs NAMENODE -rm -r hdfs:///dir0</command>
  4634. </cleanup-commands>
  4635. <comparators>
  4636. <comparator>
  4637. <type>RegexpComparator</type>
  4638. <expected-output>^15\s+hdfs:///dir0/data15bytes</expected-output>
  4639. </comparator>
  4640. <comparator>
  4641. <type>RegexpComparator</type>
  4642. <expected-output>^30\s+hdfs:///dir0/data30bytes</expected-output>
  4643. </comparator>
  4644. </comparators>
  4645. </test>
  4646. <test> <!-- TESTED -->
  4647. <description>copyFromLocal: Test for hdfs:// path - copying non existent file</description>
  4648. <test-commands>
  4649. <command>-fs NAMENODE -copyFromLocal /user/wrongdata hdfs:///file</command>
  4650. </test-commands>
  4651. <cleanup-commands>
  4652. <command>-fs NAMENODE -rm -r hdfs:///*</command>
  4653. </cleanup-commands>
  4654. <comparators>
  4655. <comparator>
  4656. <type>TokenComparator</type>
  4657. <expected-output>copyFromLocal: `/user/wrongdata': No such file or directory</expected-output>
  4658. </comparator>
  4659. </comparators>
  4660. </test>
  4661. <test> <!-- TESTED -->
  4662. <description>copyFromLocal: Test for hdfs:// path - copying local file into an already existing destination</description>
  4663. <test-commands>
  4664. <command>-fs NAMENODE -mkdir hdfs:///user/</command>
  4665. <command>-fs NAMENODE -touchz hdfs:///user/file0</command>
  4666. <command>-fs NAMENODE -copyFromLocal CLITEST_DATA/data15bytes hdfs:///user/file0</command>
  4667. </test-commands>
  4668. <cleanup-commands>
  4669. <command>-fs NAMENODE -rm -r hdfs:///user</command>
  4670. </cleanup-commands>
  4671. <comparators>
  4672. <comparator>
  4673. <type>TokenComparator</type>
  4674. <expected-output>copyFromLocal: `hdfs:///user/file0': File exists</expected-output>
  4675. </comparator>
  4676. </comparators>
  4677. </test>
  4678. <test> <!-- TESTED -->
  4679. <description>copyFromLocal: Test for hdfs:// path - copying many local files into an existing file</description>
  4680. <test-commands>
  4681. <command>-fs NAMENODE -touchz hdfs:///file0</command>
  4682. <command>-fs NAMENODE -copyFromLocal CLITEST_DATA/data15bytes CLITEST_DATA/data30bytes hdfs:///file0</command>
  4683. </test-commands>
  4684. <cleanup-commands>
  4685. <command>-fs NAMENODE -rm -r hdfs:///*</command>
  4686. </cleanup-commands>
  4687. <comparators>
  4688. <comparator>
  4689. <type>RegexpComparator</type>
  4690. <expected-output>^copyFromLocal: `hdfs:///file0': Is not a directory</expected-output>
  4691. </comparator>
  4692. </comparators>
  4693. </test>
  4694. <test> <!-- TESTED -->
  4695. <description>copyFromLocal: Test for hdfs:// path - copying many local files into a non existent directory</description>
  4696. <test-commands>
  4697. <command>-fs NAMENODE -copyFromLocal CLITEST_DATA/data15bytes CLITEST_DATA/data30bytes hdfs:///wrongdir</command>
  4698. </test-commands>
  4699. <cleanup-commands>
  4700. <command>-fs NAMENODE -rm -r hdfs:///*</command>
  4701. </cleanup-commands>
  4702. <comparators>
  4703. <comparator>
  4704. <type>RegexpComparator</type>
  4705. <expected-output>^copyFromLocal: `hdfs:///wrongdir': No such file or directory</expected-output>
  4706. </comparator>
  4707. </comparators>
  4708. </test>
  4709. <!-- Tests for copyFromLocal using Namenode's path-->
  4710. <test> <!-- TESTED -->
  4711. <description>copyFromLocal: Test for Namenode's path - copying local file into a hdfs://file</description>
  4712. <test-commands>
  4713. <command>-fs NAMENODE -copyFromLocal CLITEST_DATA/data15bytes NAMENODE/data15bytes</command>
  4714. <command>-fs NAMENODE -du NAMENODE/data15bytes</command>
  4715. </test-commands>
  4716. <cleanup-commands>
  4717. <command>-fs NAMENODE -rm NAMENODE/data15bytes</command>
  4718. </cleanup-commands>
  4719. <comparators>
  4720. <comparator>
  4721. <type>RegexpComparator</type>
  4722. <expected-output>^15\s+NAMENODE/data15bytes</expected-output>
  4723. </comparator>
  4724. </comparators>
  4725. </test>
  4726. <test> <!-- TESTED -->
  4727. <description>copyFromLocal: Test for Namenode's path - copying local file into a hdfs directory</description>
  4728. <test-commands>
  4729. <command>-fs NAMENODE -mkdir NAMENODE/dir0</command>
  4730. <command>-fs NAMENODE -mkdir NAMENODE/dir0/dir1</command>
  4731. <command>-fs NAMENODE -mkdir NAMENODE/dir0/dir1/data</command>
  4732. <command>-fs NAMENODE -copyFromLocal CLITEST_DATA/data15bytes NAMENODE/dir0/dir1/data/</command>
  4733. <command>-fs NAMENODE -du NAMENODE/dir0/dir1/data/data15bytes</command>
  4734. </test-commands>
  4735. <cleanup-commands>
  4736. <command>-fs NAMENODE -rm -r NAMENODE/dir0</command>
  4737. </cleanup-commands>
  4738. <comparators>
  4739. <comparator>
  4740. <type>RegexpComparator</type>
  4741. <expected-output>^15\s+NAMENODE/dir0/dir1/data/data15bytes</expected-output>
  4742. </comparator>
  4743. </comparators>
  4744. </test>
  4745. <test> <!-- TESTED -->
  4746. <description>copyFromLocal: Test for Namenode's path copying many local files into an existing hdfs directory</description>
  4747. <test-commands>
  4748. <command>-fs NAMENODE -mkdir NAMENODE/dir0</command>
  4749. <command>-fs NAMENODE -copyFromLocal CLITEST_DATA/data15bytes CLITEST_DATA/data30bytes NAMENODE/dir0</command>
  4750. <command>-fs NAMENODE -du NAMENODE/dir0</command>
  4751. </test-commands>
  4752. <cleanup-commands>
  4753. <command>-fs NAMENODE -rm -r NAMENODE/dir0</command>
  4754. </cleanup-commands>
  4755. <comparators>
  4756. <comparator>
  4757. <type>RegexpComparator</type>
  4758. <expected-output>^15\s+NAMENODE/dir0/data15bytes</expected-output>
  4759. </comparator>
  4760. <comparator>
  4761. <type>RegexpComparator</type>
  4762. <expected-output>^30\s+NAMENODE/dir0/data30bytes</expected-output>
  4763. </comparator>
  4764. </comparators>
  4765. </test>
  4766. <test> <!-- TESTED -->
  4767. <description>copyFromLocal: Test for Namenode's path - copying non existent file</description>
  4768. <test-commands>
  4769. <command>-fs NAMENODE -copyFromLocal /user/wrongdata NAMENODE/file</command>
  4770. </test-commands>
  4771. <cleanup-commands>
  4772. <command>-fs NAMENODE -rm -r NAMENODE/*</command>
  4773. </cleanup-commands>
  4774. <comparators>
  4775. <comparator>
  4776. <type>TokenComparator</type>
  4777. <expected-output>copyFromLocal: `/user/wrongdata': No such file or directory</expected-output>
  4778. </comparator>
  4779. </comparators>
  4780. </test>
  4781. <test> <!-- TESTED -->
  4782. <description>copyFromLocal: Test for Namenode's path - copying local file into an already existing destination</description>
  4783. <test-commands>
  4784. <command>-fs NAMENODE -mkdir NAMENODE/user/</command>
  4785. <command>-fs NAMENODE -touchz NAMENODE/user/file0</command>
  4786. <command>-fs NAMENODE -copyFromLocal CLITEST_DATA/data15bytes NAMENODE/user/file0</command>
  4787. </test-commands>
  4788. <cleanup-commands>
  4789. <command>-fs NAMENODE -rm -r NAMENODE/user</command>
  4790. </cleanup-commands>
  4791. <comparators>
  4792. <comparator>
  4793. <type>RegexpComparator</type>
  4794. <expected-output>copyFromLocal: `hdfs://\w+[-.a-z0-9]*:[0-9]+/user/file0': File exists</expected-output>
  4795. </comparator>
  4796. </comparators>
  4797. </test>
  4798. <test> <!-- TESTED -->
  4799. <description>copyFromLocal: Test for Namenode's path - copying many local files into an existing file</description>
  4800. <test-commands>
  4801. <command>-fs NAMENODE -touchz NAMENODE/file0</command>
  4802. <command>-fs NAMENODE -copyFromLocal CLITEST_DATA/data15bytes CLITEST_DATA/data30bytes NAMENODE/file0</command>
  4803. </test-commands>
  4804. <cleanup-commands>
  4805. <command>-fs NAMENODE -rm -r NAMENODE/*</command>
  4806. </cleanup-commands>
  4807. <comparators>
  4808. <comparator>
  4809. <type>RegexpComparator</type>
  4810. <expected-output>^copyFromLocal: `hdfs://\w+[-.a-z0-9]*:[0-9]+/file0': Is not a directory</expected-output>
  4811. </comparator>
  4812. </comparators>
  4813. </test>
  4814. <test> <!-- TESTED -->
  4815. <description>copyFromLocal: Test for Namenode's path - copying many local files into a non existent directory</description>
  4816. <test-commands>
  4817. <command>-fs NAMENODE -copyFromLocal CLITEST_DATA/data15bytes CLITEST_DATA/data30bytes NAMENODE/wrongdir</command>
  4818. </test-commands>
  4819. <cleanup-commands>
  4820. <command>-fs NAMENODE -rm -r NAMENODE/*</command>
  4821. </cleanup-commands>
  4822. <comparators>
  4823. <comparator>
  4824. <type>RegexpComparator</type>
  4825. <expected-output>^copyFromLocal: `hdfs://\w+[-.a-z0-9]*:[0-9]+/wrongdir': No such file or directory</expected-output>
  4826. </comparator>
  4827. </comparators>
  4828. </test>
  4829. <!-- Tests for get -->
  4830. <test> <!-- TESTED -->
  4831. <description>get: getting non existent(absolute path)</description>
  4832. <test-commands>
  4833. <command>-fs NAMENODE -get /user/file CLITEST_DATA/file</command>
  4834. </test-commands>
  4835. <cleanup-commands>
  4836. <command>-fs NAMENODE -rm -r /user</command>
  4837. </cleanup-commands>
  4838. <comparators>
  4839. <comparator>
  4840. <type>RegexpComparator</type>
  4841. <expected-output>get: `.*': No such file or directory</expected-output>
  4842. </comparator>
  4843. </comparators>
  4844. </test>
  4845. <test> <!-- TESTED -->
  4846. <description>get: getting non existent file(relative path)</description>
  4847. <test-commands>
  4848. <command>-fs NAMENODE -get file CLITEST_DATA/file</command>
  4849. </test-commands>
  4850. <cleanup-commands>
  4851. <command>-fs NAMENODE -rm -r /user</command>
  4852. </cleanup-commands>
  4853. <comparators>
  4854. <comparator>
  4855. <type>RegexpComparator</type>
  4856. <expected-output>get: `.*': No such file or directory</expected-output>
  4857. </comparator>
  4858. </comparators>
  4859. </test>
  4860. <test> <!-- TESTED -->
  4861. <description>get: Test for hdfs:// path - getting non existent</description>
  4862. <test-commands>
  4863. <command>-fs NAMENODE -get hdfs:///user/file CLITEST_DATA/file</command>
  4864. </test-commands>
  4865. <cleanup-commands>
  4866. <command>-fs NAMENODE -rm -r hdfs:///user</command>
  4867. </cleanup-commands>
  4868. <comparators>
  4869. <comparator>
  4870. <type>RegexpComparator</type>
  4871. <expected-output>get: `.*': No such file or directory</expected-output>
  4872. </comparator>
  4873. </comparators>
  4874. </test>
  4875. <test> <!-- TESTED -->
  4876. <description>get: Test for Namenode's path - getting non existent</description>
  4877. <test-commands>
  4878. <command>-fs NAMENODE -get NAMENODE/user/file CLITEST_DATA/file</command>
  4879. </test-commands>
  4880. <cleanup-commands>
  4881. <command>-fs NAMENODE -rm -r NAMENODE/user</command>
  4882. </cleanup-commands>
  4883. <comparators>
  4884. <comparator>
  4885. <type>RegexpComparator</type>
  4886. <expected-output>get: `.*': No such file or directory</expected-output>
  4887. </comparator>
  4888. </comparators>
  4889. </test>
  4890. <!-- Tests for getmerge -->
  4891. <!-- Manual Testing -->
  4892. <!-- Tests for cat -->
  4893. <test> <!-- TESTED -->
  4894. <description>cat: contents of file(absolute path)</description>
  4895. <test-commands>
  4896. <command>-fs NAMENODE -put CLITEST_DATA/data15bytes /data15bytes</command>
  4897. <command>-fs NAMENODE -cat /data15bytes</command>
  4898. </test-commands>
  4899. <cleanup-commands>
  4900. <command>-fs NAMENODE -rm /data15bytes</command>
  4901. </cleanup-commands>
  4902. <comparators>
  4903. <comparator>
  4904. <type>TokenComparator</type>
  4905. <expected-output>12345678901234</expected-output>
  4906. </comparator>
  4907. </comparators>
  4908. </test>
  4909. <test>
  4910. <description>cat: contents of file(relative path)</description>
  4911. <test-commands>
  4912. <command>-fs NAMENODE -mkdir -p dir</command> <!-- make sure user home dir exists -->
  4913. <command>-fs NAMENODE -touchz test</command>
  4914. <command>-fs NAMENODE -put CLITEST_DATA/data15bytes data15bytes</command>
  4915. <command>-fs NAMENODE -cat data15bytes</command>
  4916. </test-commands>
  4917. <cleanup-commands>
  4918. <command>-fs NAMENODE -rm -r /user</command>
  4919. </cleanup-commands>
  4920. <comparators>
  4921. <comparator>
  4922. <type>TokenComparator</type>
  4923. <expected-output>12345678901234</expected-output>
  4924. </comparator>
  4925. </comparators>
  4926. </test>
  4927. <test> <!-- TESTED -->
  4928. <description>cat: contents of files(absolute path) using globbing</description>
  4929. <test-commands>
  4930. <command>-fs NAMENODE -mkdir /dir0</command>
  4931. <command>-fs NAMENODE -put CLITEST_DATA/data15bytes /dir0/data15bytes</command>
  4932. <command>-fs NAMENODE -put CLITEST_DATA/data30bytes /dir0/data30bytes</command>
  4933. <command>-fs NAMENODE -put CLITEST_DATA/data60bytes /dir0/data60bytes</command>
  4934. <command>-fs NAMENODE -put CLITEST_DATA/data120bytes /dir0/data120bytes</command>
  4935. <command>-fs NAMENODE -cat /dir0/data*</command>
  4936. </test-commands>
  4937. <cleanup-commands>
  4938. <command>-fs NAMENODE -rm -r /dir0</command>
  4939. </cleanup-commands>
  4940. <comparators>
  4941. <comparator>
  4942. <type>RegexpComparator</type>
  4943. <expected-output>12345678901234.*</expected-output>
  4944. </comparator>
  4945. </comparators>
  4946. </test>
  4947. <test> <!-- TESTED-->
  4948. <description>cat: contents of files(relative path) using globbing</description>
  4949. <test-commands>
  4950. <command>-fs NAMENODE -mkdir -p dir0</command>
  4951. <command>-fs NAMENODE -put CLITEST_DATA/data15bytes dir0/data15bytes</command>
  4952. <command>-fs NAMENODE -put CLITEST_DATA/data30bytes dir0/data30bytes</command>
  4953. <command>-fs NAMENODE -put CLITEST_DATA/data60bytes dir0/data60bytes</command>
  4954. <command>-fs NAMENODE -put CLITEST_DATA/data120bytes dir0/data120bytes</command>
  4955. <command>-fs NAMENODE -cat dir0/data*</command>
  4956. </test-commands>
  4957. <cleanup-commands>
  4958. <command>-fs NAMENODE -rm -r /user</command>
  4959. </cleanup-commands>
  4960. <comparators>
  4961. <comparator>
  4962. <type>RegexpComparator</type>
  4963. <expected-output>12345678901234.*</expected-output>
  4964. </comparator>
  4965. </comparators>
  4966. </test>
  4967. <test> <!-- TESTED -->
  4968. <description>cat: contents of files(absolute path) without globbing</description>
  4969. <test-commands>
  4970. <command>-fs NAMENODE -mkdir /dir0</command>
  4971. <command>-fs NAMENODE -put CLITEST_DATA/data15bytes /dir0/data15bytes</command>
  4972. <command>-fs NAMENODE -put CLITEST_DATA/data30bytes /dir0/data30bytes</command>
  4973. <command>-fs NAMENODE -put CLITEST_DATA/data60bytes /dir0/data60bytes</command>
  4974. <command>-fs NAMENODE -put CLITEST_DATA/data120bytes /dir0/data120bytes</command>
  4975. <command>-fs NAMENODE -cat /dir0/data15bytes /dir0/data30bytes /dir0/data60bytes /dir0/data120bytes</command>
  4976. </test-commands>
  4977. <cleanup-commands>
  4978. <command>-fs NAMENODE -rm -r /dir0</command>
  4979. </cleanup-commands>
  4980. <comparators>
  4981. <comparator>
  4982. <type>RegexpComparator</type>
  4983. <expected-output>12345678901234.*</expected-output>
  4984. </comparator>
  4985. </comparators>
  4986. </test>
  4987. <test> <!-- TESTED-->
  4988. <description>cat: contents of files(relative path) without globbing</description>
  4989. <test-commands>
  4990. <command>-fs NAMENODE -mkdir -p dir0</command>
  4991. <command>-fs NAMENODE -put CLITEST_DATA/data15bytes dir0/data15bytes</command>
  4992. <command>-fs NAMENODE -put CLITEST_DATA/data30bytes dir0/data30bytes</command>
  4993. <command>-fs NAMENODE -put CLITEST_DATA/data60bytes dir0/data60bytes</command>
  4994. <command>-fs NAMENODE -put CLITEST_DATA/data120bytes dir0/data120bytes</command>
  4995. <command>-fs NAMENODE -cat dir0/data15bytes dir0/data30bytes dir0/data60bytes dir0/data120bytes</command>
  4996. </test-commands>
  4997. <cleanup-commands>
  4998. <command>-fs NAMENODE -rm -r /user</command>
  4999. </cleanup-commands>
  5000. <comparators>
  5001. <comparator>
  5002. <type>RegexpComparator</type>
  5003. <expected-output>12345678901234.*</expected-output>
  5004. </comparator>
  5005. </comparators>
  5006. </test>
  5007. <test> <!-- TESTED -->
  5008. <description>cat: contents of file(absolute path) that does not exist</description>
  5009. <test-commands>
  5010. <command>-fs NAMENODE -cat /file</command>
  5011. </test-commands>
  5012. <cleanup-commands>
  5013. </cleanup-commands>
  5014. <comparators>
  5015. <comparator>
  5016. <type>RegexpComparator</type>
  5017. <expected-output>^cat: `/file': No such file or directory</expected-output>
  5018. </comparator>
  5019. </comparators>
  5020. </test>
  5021. <test> <!-- TESTED -->
  5022. <description>cat: contents of file(relative path) that does not exist</description>
  5023. <test-commands>
  5024. <command>-fs NAMENODE -cat file</command>
  5025. </test-commands>
  5026. <cleanup-commands>
  5027. </cleanup-commands>
  5028. <comparators>
  5029. <comparator>
  5030. <type>RegexpComparator</type>
  5031. <expected-output>^cat: `file': No such file or directory</expected-output>
  5032. </comparator>
  5033. </comparators>
  5034. </test>
  5035. <test> <!-- TESTED -->
  5036. <description>cat: contents of directory(absolute path)</description>
  5037. <test-commands>
  5038. <command>-fs NAMENODE -mkdir /dir1</command>
  5039. <command>-fs NAMENODE -cat /dir1</command>
  5040. </test-commands>
  5041. <cleanup-commands>
  5042. <command>-fs NAMENODE -rm -r /dir1</command>
  5043. </cleanup-commands>
  5044. <comparators>
  5045. <comparator>
  5046. <type>RegexpComparator</type>
  5047. <expected-output>^cat: `/dir1': Is a directory</expected-output>
  5048. </comparator>
  5049. </comparators>
  5050. </test>
  5051. <test> <!-- TESTED -->
  5052. <description>cat: contents of directory(relative path)</description>
  5053. <test-commands>
  5054. <command>-fs NAMENODE -mkdir -p dir1</command>
  5055. <command>-fs NAMENODE -cat dir1</command>
  5056. </test-commands>
  5057. <cleanup-commands>
  5058. <command>-fs NAMENODE -rm -r dir1</command>
  5059. </cleanup-commands>
  5060. <comparators>
  5061. <comparator>
  5062. <type>RegexpComparator</type>
  5063. <expected-output>^cat: `dir1': Is a directory</expected-output>
  5064. </comparator>
  5065. </comparators>
  5066. </test>
  5067. <test> <!-- TESTED -->
  5068. <description>cat: Test for hdfs:// path - content of file</description>
  5069. <test-commands>
  5070. <command>-fs NAMENODE -put CLITEST_DATA/data15bytes hdfs:///data15bytes</command>
  5071. <command>-fs NAMENODE -cat hdfs:///data15bytes</command>
  5072. </test-commands>
  5073. <cleanup-commands>
  5074. <command>-fs NAMENODE -rm hdfs:///data15bytes</command>
  5075. </cleanup-commands>
  5076. <comparators>
  5077. <comparator>
  5078. <type>TokenComparator</type>
  5079. <expected-output>12345678901234</expected-output>
  5080. </comparator>
  5081. </comparators>
  5082. </test>
  5083. <test> <!-- TESTED -->
  5084. <description>cat: Test for hdfs:// path - contents of files using globbing</description>
  5085. <test-commands>
  5086. <command>-fs NAMENODE -mkdir hdfs:///dir0</command>
  5087. <command>-fs NAMENODE -put CLITEST_DATA/data15bytes hdfs:///dir0/data15bytes</command>
  5088. <command>-fs NAMENODE -put CLITEST_DATA/data30bytes hdfs:///dir0/data30bytes</command>
  5089. <command>-fs NAMENODE -put CLITEST_DATA/data60bytes hdfs:///dir0/data60bytes</command>
  5090. <command>-fs NAMENODE -put CLITEST_DATA/data120bytes hdfs:///dir0/data120bytes</command>
  5091. <command>-fs NAMENODE -cat hdfs:///dir0/data*</command>
  5092. </test-commands>
  5093. <cleanup-commands>
  5094. <command>-fs NAMENODE -rm -r hdfs:///dir0</command>
  5095. </cleanup-commands>
  5096. <comparators>
  5097. <comparator>
  5098. <type>RegexpComparator</type>
  5099. <expected-output>12345678901234.*</expected-output>
  5100. </comparator>
  5101. </comparators>
  5102. </test>
  5103. <test> <!-- TESTED -->
  5104. <description>cat: Test for hdfs:// path - contents of files without globbing</description>
  5105. <test-commands>
  5106. <command>-fs NAMENODE -mkdir hdfs:///dir0</command>
  5107. <command>-fs NAMENODE -put CLITEST_DATA/data15bytes hdfs:///dir0/data15bytes</command>
  5108. <command>-fs NAMENODE -put CLITEST_DATA/data30bytes hdfs:///dir0/data30bytes</command>
  5109. <command>-fs NAMENODE -put CLITEST_DATA/data60bytes hdfs:///dir0/data60bytes</command>
  5110. <command>-fs NAMENODE -put CLITEST_DATA/data120bytes hdfs:///dir0/data120bytes</command>
  5111. <command>-fs NAMENODE -cat hdfs:///dir0/data15bytes hdfs:///dir0/data30bytes hdfs:///dir0/data60bytes hdfs:///dir0/data120bytes</command>
  5112. </test-commands>
  5113. <cleanup-commands>
  5114. <command>-fs NAMENODE -rm -r hdfs:///dir0</command>
  5115. </cleanup-commands>
  5116. <comparators>
  5117. <comparator>
  5118. <type>RegexpComparator</type>
  5119. <expected-output>12345678901234.*</expected-output>
  5120. </comparator>
  5121. </comparators>
  5122. </test>
  5123. <test> <!-- TESTED -->
  5124. <description>cat: Test for hdfs:// path - contents of file that does not exist</description>
  5125. <test-commands>
  5126. <command>-fs NAMENODE -cat hdfs:///file</command>
  5127. </test-commands>
  5128. <cleanup-commands>
  5129. </cleanup-commands>
  5130. <comparators>
  5131. <comparator>
  5132. <type>RegexpComparator</type>
  5133. <expected-output>^cat: `hdfs:///file': No such file or directory</expected-output>
  5134. </comparator>
  5135. </comparators>
  5136. </test>
  5137. <test> <!-- TESTED -->
  5138. <description>cat: Test for hdfs:// path - contents of directory</description>
  5139. <test-commands>
  5140. <command>-fs NAMENODE -mkdir hdfs:///dir1</command>
  5141. <command>-fs NAMENODE -cat hdfs:///dir1</command>
  5142. </test-commands>
  5143. <cleanup-commands>
  5144. <command>-fs NAMENODE -rm -r hdfs:///dir1</command>
  5145. </cleanup-commands>
  5146. <comparators>
  5147. <comparator>
  5148. <type>RegexpComparator</type>
  5149. <expected-output>^cat: `hdfs:///dir1': Is a directory</expected-output>
  5150. </comparator>
  5151. </comparators>
  5152. </test>
  5153. <!-- Tests for cat using Namenode's path -->
  5154. <test> <!-- TESTED -->
  5155. <description>cat: Test for Namenode's path - content of file</description>
  5156. <test-commands>
  5157. <command>-fs NAMENODE -put CLITEST_DATA/data15bytes NAMENODE/data15bytes</command>
  5158. <command>-fs NAMENODE -cat NAMENODE/data15bytes</command>
  5159. </test-commands>
  5160. <cleanup-commands>
  5161. <command>-fs NAMENODE -rm NAMENODE/data15bytes</command>
  5162. </cleanup-commands>
  5163. <comparators>
  5164. <comparator>
  5165. <type>TokenComparator</type>
  5166. <expected-output>12345678901234</expected-output>
  5167. </comparator>
  5168. </comparators>
  5169. </test>
  5170. <test> <!-- TESTED -->
  5171. <description>cat: Test for Namenode's path - contents of files using globbing</description>
  5172. <test-commands>
  5173. <command>-fs NAMENODE -mkdir NAMENODE/dir0</command>
  5174. <command>-fs NAMENODE -put CLITEST_DATA/data15bytes NAMENODE/dir0/data15bytes</command>
  5175. <command>-fs NAMENODE -put CLITEST_DATA/data30bytes NAMENODE/dir0/data30bytes</command>
  5176. <command>-fs NAMENODE -put CLITEST_DATA/data60bytes NAMENODE/dir0/data60bytes</command>
  5177. <command>-fs NAMENODE -put CLITEST_DATA/data120bytes NAMENODE/dir0/data120bytes</command>
  5178. <command>-fs NAMENODE -cat NAMENODE/dir0/data*</command>
  5179. </test-commands>
  5180. <cleanup-commands>
  5181. <command>-fs NAMENODE -rm -r NAMENODE/dir0</command>
  5182. </cleanup-commands>
  5183. <comparators>
  5184. <comparator>
  5185. <type>RegexpComparator</type>
  5186. <expected-output>12345678901234.*</expected-output>
  5187. </comparator>
  5188. </comparators>
  5189. </test>
  5190. <test> <!-- TESTED -->
  5191. <description>cat: Test for Namenode's path - contents of files without globbing</description>
  5192. <test-commands>
  5193. <command>-fs NAMENODE -mkdir NAMENODE/dir0</command>
  5194. <command>-fs NAMENODE -put CLITEST_DATA/data15bytes NAMENODE/dir0/data15bytes</command>
  5195. <command>-fs NAMENODE -put CLITEST_DATA/data30bytes NAMENODE/dir0/data30bytes</command>
  5196. <command>-fs NAMENODE -put CLITEST_DATA/data60bytes NAMENODE/dir0/data60bytes</command>
  5197. <command>-fs NAMENODE -put CLITEST_DATA/data120bytes NAMENODE/dir0/data120bytes</command>
  5198. <command>-fs NAMENODE -cat NAMENODE/dir0/data15bytes NAMENODE/dir0/data30bytes NAMENODE/dir0/data60bytes NAMENODE/dir0/data120bytes</command>
  5199. </test-commands>
  5200. <cleanup-commands>
  5201. <command>-fs NAMENODE -rm -r NAMENODE/dir0</command>
  5202. </cleanup-commands>
  5203. <comparators>
  5204. <comparator>
  5205. <type>RegexpComparator</type>
  5206. <expected-output>12345678901234.*</expected-output>
  5207. </comparator>
  5208. </comparators>
  5209. </test>
  5210. <test> <!-- TESTED -->
  5211. <description>cat: Test for Namenode's path - contents of file that does not exist</description>
  5212. <test-commands>
  5213. <command>-fs NAMENODE -cat NAMENODE/file</command>
  5214. </test-commands>
  5215. <cleanup-commands>
  5216. </cleanup-commands>
  5217. <comparators>
  5218. <comparator>
  5219. <type>RegexpComparator</type>
  5220. <expected-output>^cat: `NAMENODE/file': No such file or directory</expected-output>
  5221. </comparator>
  5222. </comparators>
  5223. </test>
  5224. <test> <!-- TESTED -->
  5225. <description>cat: Test for Namenode's path - contents of directory</description>
  5226. <test-commands>
  5227. <command>-fs NAMENODE -mkdir NAMENODE/dir1</command>
  5228. <command>-fs NAMENODE -cat NAMENODE/dir1</command>
  5229. </test-commands>
  5230. <cleanup-commands>
  5231. <command>-fs NAMENODE -rm -r NAMENODE/dir1</command>
  5232. </cleanup-commands>
  5233. <comparators>
  5234. <comparator>
  5235. <type>RegexpComparator</type>
  5236. <expected-output>^cat: `NAMENODE/dir1': Is a directory</expected-output>
  5237. </comparator>
  5238. </comparators>
  5239. </test>
  5240. <!-- Tests for copyToLocal -->
  5241. <test> <!-- TESTED -->
  5242. <description>copyToLocal: non existent relative path</description>
  5243. <test-commands>
  5244. <command>-fs NAMENODE -copyToLocal file CLITEST_DATA/file</command>
  5245. </test-commands>
  5246. <cleanup-commands>
  5247. <command>-fs NAMENODE -rm -r /user</command>
  5248. </cleanup-commands>
  5249. <comparators>
  5250. <comparator>
  5251. <type>RegexpComparator</type>
  5252. <expected-output>copyToLocal: `.*': No such file or directory</expected-output>
  5253. </comparator>
  5254. </comparators>
  5255. </test>
  5256. <test> <!-- TESTED -->
  5257. <description>copyToLocal: non existent absolute path</description>
  5258. <test-commands>
  5259. <command>-fs NAMENODE -copyToLocal /user/file CLITEST_DATA/file</command>
  5260. </test-commands>
  5261. <cleanup-commands>
  5262. <command>-fs NAMENODE -rm -r /user</command>
  5263. </cleanup-commands>
  5264. <comparators>
  5265. <comparator>
  5266. <type>RegexpComparator</type>
  5267. <expected-output>copyToLocal: `.*': No such file or directory</expected-output>
  5268. </comparator>
  5269. </comparators>
  5270. </test>
  5271. <test> <!-- TESTED -->
  5272. <description>copyToLocal: Test for hdfs:// path - non existent file/directory</description>
  5273. <test-commands>
  5274. <command>-fs NAMENODE -copyToLocal hdfs:///file CLITEST_DATA/file</command>
  5275. </test-commands>
  5276. <cleanup-commands>
  5277. <command>-fs NAMENODE -rm -r hdfs:///*</command>
  5278. </cleanup-commands>
  5279. <comparators>
  5280. <comparator>
  5281. <type>RegexpComparator</type>
  5282. <expected-output>copyToLocal: `.*': No such file or directory</expected-output>
  5283. </comparator>
  5284. </comparators>
  5285. </test>
  5286. <test> <!-- TESTED -->
  5287. <description>copyToLocal: Test for Namenode's path - non existent file/directory</description>
  5288. <test-commands>
  5289. <command>-fs NAMENODE -copyToLocal NAMENODE/file CLITEST_DATA/file</command>
  5290. </test-commands>
  5291. <cleanup-commands>
  5292. <command>-fs NAMENODE -rm -r NAMENODE/*</command>
  5293. </cleanup-commands>
  5294. <comparators>
  5295. <comparator>
  5296. <type>RegexpComparator</type>
  5297. <expected-output>copyToLocal: `.*': No such file or directory</expected-output>
  5298. </comparator>
  5299. </comparators>
  5300. </test>
  5301. <test> <!-- TESTED-->
  5302. <description>checksum: checksum of files(relative path) using globbing</description>
  5303. <test-commands>
  5304. <command>-fs NAMENODE -mkdir -p dir0</command>
  5305. <command>-fs NAMENODE -put CLITEST_DATA/data15bytes dir0/data15bytes</command>
  5306. <command>-fs NAMENODE -put CLITEST_DATA/data30bytes dir0/data30bytes</command>
  5307. <command>-fs NAMENODE -put CLITEST_DATA/data60bytes dir0/data60bytes</command>
  5308. <command>-fs NAMENODE -put CLITEST_DATA/data120bytes dir0/data120bytes</command>
  5309. <command>-fs NAMENODE -checksum dir0/data*</command>
  5310. </test-commands>
  5311. <cleanup-commands>
  5312. <command>-fs NAMENODE -rm -r /user</command>
  5313. </cleanup-commands>
  5314. <comparators>
  5315. <comparator>
  5316. <type>RegexpComparator</type>
  5317. <expected-output>^dir0/data120bytes\tMD5-of-0MD5-of-512CRC32C\t000002000000000000000000a58cdc3c0967fc8cddb7fed5960d06f2</expected-output>
  5318. </comparator>
  5319. <comparator>
  5320. <type>RegexpComparator</type>
  5321. <expected-output>^dir0/data15bytes\tMD5-of-0MD5-of-512CRC32C\t0000020000000000000000007267e9528002723a30939aefc238d665</expected-output>
  5322. </comparator>
  5323. <comparator>
  5324. <type>RegexpComparator</type>
  5325. <expected-output>^dir0/data30bytes\tMD5-of-0MD5-of-512CRC32C\t000002000000000000000000fc09371298117c4943cf089b4bd79c96</expected-output>
  5326. </comparator>
  5327. <comparator>
  5328. <type>RegexpComparator</type>
  5329. <expected-output>^dir0/data60bytes\tMD5-of-0MD5-of-512CRC32C\t000002000000000000000000009476431d851dd7b0a8d057a404d7b9</expected-output>
  5330. </comparator>
  5331. </comparators>
  5332. </test>
  5333. <!-- Tests for moveToLocal -->
  5334. <!-- Not yet implemented -->
  5335. <!-- Tests for mkdir -->
  5336. <test> <!-- TESTED -->
  5337. <description>mkdir: creating directory (absolute path) </description>
  5338. <test-commands>
  5339. <command>-fs NAMENODE -mkdir /dir0</command>
  5340. <command>-fs NAMENODE -du -s /dir0</command>
  5341. </test-commands>
  5342. <cleanup-commands>
  5343. <command>-fs NAMENODE -rm /user</command>
  5344. </cleanup-commands>
  5345. <comparators>
  5346. <comparator>
  5347. <type>RegexpComparator</type>
  5348. <expected-output>^0\s+/dir0</expected-output>
  5349. </comparator>
  5350. </comparators>
  5351. </test>
  5352. <test> <!-- TESTED -->
  5353. <description>mkdir: creating directory (absolute path) </description>
  5354. <test-commands>
  5355. <command>-fs NAMENODE -mkdir /dir0</command>
  5356. <command>-fs NAMENODE -mkdir /dir0/b/</command>
  5357. <command>-fs NAMENODE -du -s /dir0/b</command>
  5358. </test-commands>
  5359. <cleanup-commands>
  5360. <command>-fs NAMENODE -rm /user</command>
  5361. </cleanup-commands>
  5362. <comparators>
  5363. <comparator>
  5364. <type>RegexpComparator</type>
  5365. <expected-output>^0\s+/dir0/b</expected-output>
  5366. </comparator>
  5367. </comparators>
  5368. </test>
  5369. <test> <!-- TESTED -->
  5370. <description>mkdir: creating directory (relative path) </description>
  5371. <test-commands>
  5372. <command>-fs NAMENODE -mkdir -p dir0 </command>
  5373. <command>-fs NAMENODE -du -s dir0</command>
  5374. </test-commands>
  5375. <cleanup-commands>
  5376. <command>-fs NAMENODE -rm /user</command>
  5377. </cleanup-commands>
  5378. <comparators>
  5379. <comparator>
  5380. <type>RegexpComparator</type>
  5381. <expected-output>^0\s+dir0</expected-output>
  5382. </comparator>
  5383. </comparators>
  5384. </test>
  5385. <test> <!-- TESTED -->
  5386. <description>mkdir: creating many directories (absolute path) </description>
  5387. <test-commands>
  5388. <command>-fs NAMENODE -mkdir /dir0 </command>
  5389. <command>-fs NAMENODE -mkdir /dir1 </command>
  5390. <command>-fs NAMENODE -mkdir /dir2 </command>
  5391. <command>-fs NAMENODE -mkdir /dir3 </command>
  5392. <command>-fs NAMENODE -du -s /dir*</command>
  5393. </test-commands>
  5394. <cleanup-commands>
  5395. <command>-fs NAMENODE -rm /dir*</command>
  5396. </cleanup-commands>
  5397. <comparators>
  5398. <comparator>
  5399. <type>RegexpComparator</type>
  5400. <expected-output>^0\s+/dir0</expected-output>
  5401. </comparator>
  5402. <comparator>
  5403. <type>RegexpComparator</type>
  5404. <expected-output>^0\s+/dir1</expected-output>
  5405. </comparator>
  5406. <comparator>
  5407. <type>RegexpComparator</type>
  5408. <expected-output>^0\s+/dir2</expected-output>
  5409. </comparator>
  5410. <comparator>
  5411. <type>RegexpComparator</type>
  5412. <expected-output>^0\s+/dir3</expected-output>
  5413. </comparator>
  5414. </comparators>
  5415. </test>
  5416. <test> <!-- TESTED -->
  5417. <description>mkdir: creating many directories (relative path) </description>
  5418. <test-commands>
  5419. <command>-fs NAMENODE -mkdir -p dir0 </command>
  5420. <command>-fs NAMENODE -mkdir -p dir1 </command>
  5421. <command>-fs NAMENODE -mkdir -p dir2 </command>
  5422. <command>-fs NAMENODE -mkdir -p dir3 </command>
  5423. <command>-fs NAMENODE -du -s dir*</command>
  5424. </test-commands>
  5425. <cleanup-commands>
  5426. <command>-fs NAMENODE -rm /user</command>
  5427. </cleanup-commands>
  5428. <comparators>
  5429. <comparator>
  5430. <type>RegexpComparator</type>
  5431. <expected-output>^0\s+dir0</expected-output>
  5432. </comparator>
  5433. <comparator>
  5434. <type>RegexpComparator</type>
  5435. <expected-output>^0\s+dir1</expected-output>
  5436. </comparator>
  5437. <comparator>
  5438. <type>RegexpComparator</type>
  5439. <expected-output>^0\s+dir2</expected-output>
  5440. </comparator>
  5441. <comparator>
  5442. <type>RegexpComparator</type>
  5443. <expected-output>^0\s+dir3</expected-output>
  5444. </comparator>
  5445. </comparators>
  5446. </test>
  5447. <test> <!-- TESTED -->
  5448. <description>mkdir: creating a directory with the name of an already existing directory</description>
  5449. <test-commands>
  5450. <command>-fs NAMENODE -mkdir /dir0</command>
  5451. <command>-fs NAMENODE -mkdir /dir0</command>
  5452. </test-commands>
  5453. <cleanup-commands>
  5454. <command>-fs NAMENODE -rm -r /dir0</command>
  5455. </cleanup-commands>
  5456. <comparators>
  5457. <comparator>
  5458. <type>TokenComparator</type>
  5459. <expected-output>mkdir: `/dir0': File exists</expected-output>
  5460. </comparator>
  5461. </comparators>
  5462. </test>
  5463. <test> <!-- TESTED -->
  5464. <description>mkdir: creating a directory with the name of an already existing file</description>
  5465. <test-commands>
  5466. <command>-fs NAMENODE -put CLITEST_DATA/data15bytes data15bytes</command>
  5467. <command>-fs NAMENODE -mkdir -p data15bytes</command>
  5468. </test-commands>
  5469. <cleanup-commands>
  5470. <command>-fs NAMENODE -rm -r data15bytes</command>
  5471. </cleanup-commands>
  5472. <comparators>
  5473. <comparator>
  5474. <type>TokenComparator</type>
  5475. <expected-output>mkdir: `data15bytes': Is not a directory</expected-output>
  5476. </comparator>
  5477. </comparators>
  5478. </test>
  5479. <test> <!-- TESTED -->
  5480. <description>mkdir: Test for hdfs:// path - creating directory</description>
  5481. <test-commands>
  5482. <command>-fs NAMENODE -mkdir hdfs:///dir0</command>
  5483. <command>-fs NAMENODE -du -s hdfs:///dir0</command>
  5484. </test-commands>
  5485. <cleanup-commands>
  5486. <command>-fs NAMENODE -rm hdfs:///*</command>
  5487. </cleanup-commands>
  5488. <comparators>
  5489. <comparator>
  5490. <type>RegexpComparator</type>
  5491. <expected-output>^0\s+hdfs:///dir0</expected-output>
  5492. </comparator>
  5493. </comparators>
  5494. </test>
  5495. <test> <!-- TESTED -->
  5496. <description>mkdir: Test for hdfs:// path - creating many directories</description>
  5497. <test-commands>
  5498. <command>-fs NAMENODE -mkdir hdfs:///dir0 hdfs:///dir1 hdfs:///dir2 hdfs:///dir3 </command>
  5499. <command>-fs NAMENODE -du -s hdfs:///dir*</command>
  5500. </test-commands>
  5501. <cleanup-commands>
  5502. <command>-fs NAMENODE -rm hdfs:///dir*</command>
  5503. </cleanup-commands>
  5504. <comparators>
  5505. <comparator>
  5506. <type>RegexpComparator</type>
  5507. <expected-output>^0\s+hdfs:///dir0</expected-output>
  5508. </comparator>
  5509. <comparator>
  5510. <type>RegexpComparator</type>
  5511. <expected-output>^0\s+hdfs:///dir1</expected-output>
  5512. </comparator>
  5513. <comparator>
  5514. <type>RegexpComparator</type>
  5515. <expected-output>^0\s+hdfs:///dir2</expected-output>
  5516. </comparator>
  5517. <comparator>
  5518. <type>RegexpComparator</type>
  5519. <expected-output>^0\s+hdfs:///dir3</expected-output>
  5520. </comparator>
  5521. </comparators>
  5522. </test>
  5523. <test> <!-- TESTED -->
  5524. <description>mkdir: Test for hdfs:// path - creating a directory with the name of an already existing directory</description>
  5525. <test-commands>
  5526. <command>-fs NAMENODE -mkdir hdfs:///dir0</command>
  5527. <command>-fs NAMENODE -mkdir hdfs:///dir0</command>
  5528. </test-commands>
  5529. <cleanup-commands>
  5530. <command>-fs NAMENODE -rm -r hdfs:///dir0</command>
  5531. </cleanup-commands>
  5532. <comparators>
  5533. <comparator>
  5534. <type>TokenComparator</type>
  5535. <expected-output>mkdir: `hdfs:///dir0': File exists</expected-output>
  5536. </comparator>
  5537. </comparators>
  5538. </test>
  5539. <test> <!-- TESTED -->
  5540. <description>mkdir: Test for hdfs:// path - creating a directory with the name of an already existing file</description>
  5541. <test-commands>
  5542. <command>-fs NAMENODE -put CLITEST_DATA/data15bytes hdfs:///data15bytes</command>
  5543. <command>-fs NAMENODE -mkdir hdfs:///data15bytes</command>
  5544. </test-commands>
  5545. <cleanup-commands>
  5546. <command>-fs NAMENODE -rm -r hdfs:///data15bytes</command>
  5547. </cleanup-commands>
  5548. <comparators>
  5549. <comparator>
  5550. <type>TokenComparator</type>
  5551. <expected-output>mkdir: `hdfs:///data15bytes': Is not a directory</expected-output>
  5552. </comparator>
  5553. </comparators>
  5554. </test>
  5555. <test> <!-- TESTED -->
  5556. <description>mkdir: Test for Namenode's path - creating directory</description>
  5557. <test-commands>
  5558. <command>-fs NAMENODE -mkdir NAMENODE/dir0</command>
  5559. <command>-fs NAMENODE -du -s NAMENODE/dir0</command>
  5560. </test-commands>
  5561. <cleanup-commands>
  5562. <command>-fs NAMENODE -rm NAMENODE/*</command>
  5563. </cleanup-commands>
  5564. <comparators>
  5565. <comparator>
  5566. <type>RegexpComparator</type>
  5567. <expected-output>^0\s+NAMENODE/dir0</expected-output>
  5568. </comparator>
  5569. </comparators>
  5570. </test>
  5571. <test> <!-- TESTED -->
  5572. <description>mkdir: Test for Namenode's path - creating many directories</description>
  5573. <test-commands>
  5574. <command>-fs NAMENODE -mkdir NAMENODE/dir0 NAMENODE/dir1 NAMENODE/dir2 NAMENODE/dir3</command>
  5575. <command>-fs NAMENODE -du -s NAMENODE/dir*</command>
  5576. </test-commands>
  5577. <cleanup-commands>
  5578. <command>-fs NAMENODE -rm NAMENODE/dir*</command>
  5579. </cleanup-commands>
  5580. <comparators>
  5581. <comparator>
  5582. <type>RegexpComparator</type>
  5583. <expected-output>^0\s+NAMENODE/dir0</expected-output>
  5584. </comparator>
  5585. <comparator>
  5586. <type>RegexpComparator</type>
  5587. <expected-output>^0\s+NAMENODE/dir1</expected-output>
  5588. </comparator>
  5589. <comparator>
  5590. <type>RegexpComparator</type>
  5591. <expected-output>^0\s+NAMENODE/dir2</expected-output>
  5592. </comparator>
  5593. <comparator>
  5594. <type>RegexpComparator</type>
  5595. <expected-output>^0\s+NAMENODE/dir3</expected-output>
  5596. </comparator>
  5597. </comparators>
  5598. </test>
  5599. <test> <!-- TESTED -->
  5600. <description>mkdir: Test for NAMENODE path - creating a directory with the name of an already existing directory</description>
  5601. <test-commands>
  5602. <command>-fs NAMENODE -mkdir NAMENODE/dir0</command>
  5603. <command>-fs NAMENODE -mkdir NAMENODE/dir0</command>
  5604. </test-commands>
  5605. <cleanup-commands>
  5606. <command>-fs NAMENODE -rm -r NAMENODE/dir0</command>
  5607. </cleanup-commands>
  5608. <comparators>
  5609. <comparator>
  5610. <type>RegexpComparator</type>
  5611. <expected-output>mkdir: `hdfs://\w+[-.a-z0-9]*:[0-9]+/dir0': File exists</expected-output>
  5612. </comparator>
  5613. </comparators>
  5614. </test>
  5615. <test> <!-- TESTED -->
  5616. <description>mkdir: Test for Namenode's path - creating a directory with the name of an already existing file</description>
  5617. <test-commands>
  5618. <command>-fs NAMENODE -put CLITEST_DATA/data15bytes NAMENODE/data15bytes</command>
  5619. <command>-fs NAMENODE -mkdir NAMENODE/data15bytes</command>
  5620. </test-commands>
  5621. <cleanup-commands>
  5622. <command>-fs NAMENODE -rm -r NAMENODE/data15bytes</command>
  5623. </cleanup-commands>
  5624. <comparators>
  5625. <comparator>
  5626. <type>RegexpComparator</type>
  5627. <expected-output>mkdir: `hdfs://\w+[-.a-z0-9]*:[0-9]+/data15bytes': Is not a directory</expected-output>
  5628. </comparator>
  5629. </comparators>
  5630. </test>
  5631. <test> <!-- TESTED -->
  5632. <description>mkdir: Test create of directory with no parent and no -p fails</description>
  5633. <test-commands>
  5634. <command>-fs NAMENODE -rm -r -f dir0</command>
  5635. <command>-fs NAMENODE -mkdir dir0/dir1</command>
  5636. </test-commands>
  5637. <cleanup-commands>
  5638. <command>-fs NAMENODE -rm -r dir0</command>
  5639. </cleanup-commands>
  5640. <comparators>
  5641. <comparator>
  5642. <type>RegexpComparator</type>
  5643. <expected-output>mkdir: `dir0/dir1': No such file or directory</expected-output>
  5644. </comparator>
  5645. </comparators>
  5646. </test>
  5647. <test> <!-- TESTED -->
  5648. <description>mkdir: Test recreate of existing directory fails</description>
  5649. <test-commands>
  5650. <command>-fs NAMENODE -rm -r -f dir0</command>
  5651. <command>-fs NAMENODE -mkdir -p dir0/dir1</command>
  5652. <command>-fs NAMENODE -mkdir dir0/dir1</command>
  5653. </test-commands>
  5654. <cleanup-commands>
  5655. <command>-fs NAMENODE -rm -r dir0</command>
  5656. </cleanup-commands>
  5657. <comparators>
  5658. <comparator>
  5659. <type>RegexpComparator</type>
  5660. <expected-output>mkdir: `dir0/dir1': File exists</expected-output>
  5661. </comparator>
  5662. </comparators>
  5663. </test>
  5664. <test> <!-- TESTED -->
  5665. <description>mkdir: Test recreate of existing directory with -p succeeds</description>
  5666. <test-commands>
  5667. <command>-fs NAMENODE -rm -r -f dir0</command>
  5668. <command>-fs NAMENODE -mkdir -p dir0/dir1</command>
  5669. <command>-fs NAMENODE -mkdir -p dir0/dir1</command>
  5670. </test-commands>
  5671. <cleanup-commands>
  5672. <command>-fs NAMENODE -rm -r dir0</command>
  5673. </cleanup-commands>
  5674. <comparators>
  5675. <comparator>
  5676. <type>ExactComparator</type>
  5677. <expected-output></expected-output>
  5678. </comparator>
  5679. </comparators>
  5680. </test>
  5681. <!--Tests for setrep-->
  5682. <test> <!-- TESTED -->
  5683. <description>setrep: existent file (absolute path)</description>
  5684. <test-commands>
  5685. <command>-fs NAMENODE -mkdir /dir0</command>
  5686. <command>-fs NAMENODE -touchz /dir0/file0</command>
  5687. <command>-fs NAMENODE -setrep 2 /dir0/file0</command>
  5688. </test-commands>
  5689. <cleanup-commands>
  5690. <command>-fs NAMENODE -rm -r /user</command>
  5691. </cleanup-commands>
  5692. <comparators>
  5693. <comparator>
  5694. <type>RegexpComparator</type>
  5695. <expected-output>^Replication 2 set: /dir0/file0</expected-output>
  5696. </comparator>
  5697. </comparators>
  5698. </test>
  5699. <test> <!-- TESTED -->
  5700. <description>setrep: existent file (relative path)</description>
  5701. <test-commands>
  5702. <command>-fs NAMENODE -mkdir -p dir</command> <!-- make sure user home dir exists -->
  5703. <command>-fs NAMENODE -touchz file0</command>
  5704. <command>-fs NAMENODE -setrep 2 file0</command>
  5705. </test-commands>
  5706. <cleanup-commands>
  5707. <command>-fs NAMENODE -rm -r /user</command>
  5708. </cleanup-commands>
  5709. <comparators>
  5710. <comparator>
  5711. <type>RegexpComparator</type>
  5712. <expected-output>^Replication 2 set: file0</expected-output>
  5713. </comparator>
  5714. </comparators>
  5715. </test>
  5716. <test> <!-- TESTED -->
  5717. <description>setrep: existent directory (absolute path)</description>
  5718. <test-commands>
  5719. <command>-fs NAMENODE -mkdir /dir0</command>
  5720. <command>-fs NAMENODE -touchz /dir0/file0</command>
  5721. <command>-fs NAMENODE -touchz /dir0/file1</command>
  5722. <command>-fs NAMENODE -setrep 2 /dir0</command>
  5723. </test-commands>
  5724. <cleanup-commands>
  5725. <command>-fs NAMENODE -rm -r /user</command>
  5726. </cleanup-commands>
  5727. <comparators>
  5728. <comparator>
  5729. <type>RegexpComparator</type>
  5730. <expected-output>^Replication 2 set: /dir0/file0</expected-output>
  5731. </comparator>
  5732. <comparator>
  5733. <type>RegexpComparator</type>
  5734. <expected-output>^Replication 2 set: /dir0/file1</expected-output>
  5735. </comparator>
  5736. </comparators>
  5737. </test>
  5738. <test> <!-- TESTED -->
  5739. <description>setrep: existent directory (relative path)</description>
  5740. <test-commands>
  5741. <command>-fs NAMENODE -mkdir -p dir0</command>
  5742. <command>-fs NAMENODE -touchz dir0/file0</command>
  5743. <command>-fs NAMENODE -touchz dir0/file1</command>
  5744. <command>-fs NAMENODE -setrep 2 dir0</command>
  5745. </test-commands>
  5746. <cleanup-commands>
  5747. <command>-fs NAMENODE -rm -r /user</command>
  5748. </cleanup-commands>
  5749. <comparators>
  5750. <comparator>
  5751. <type>RegexpComparator</type>
  5752. <expected-output>^Replication 2 set: dir0/file0</expected-output>
  5753. </comparator>
  5754. <comparator>
  5755. <type>RegexpComparator</type>
  5756. <expected-output>^Replication 2 set: dir0/file1</expected-output>
  5757. </comparator>
  5758. </comparators>
  5759. </test>
  5760. <test> <!-- TESTED -->
  5761. <description>setrep: -R ignored for existing file</description>
  5762. <test-commands>
  5763. <command>-fs NAMENODE -mkdir -p dir0</command>
  5764. <command>-fs NAMENODE -touchz dir0/file0</command>
  5765. <command>-fs NAMENODE -setrep -R 2 dir0/file0</command>
  5766. </test-commands>
  5767. <cleanup-commands>
  5768. <command>-fs NAMENODE -rm -r /user</command>
  5769. </cleanup-commands>
  5770. <comparators>
  5771. <comparator>
  5772. <type>RegexpComparator</type>
  5773. <expected-output>^Replication 2 set: dir0/file0</expected-output>
  5774. </comparator>
  5775. </comparators>
  5776. </test>
  5777. <test> <!-- TESTED -->
  5778. <description>setrep: non existent file (absolute path)</description>
  5779. <test-commands>
  5780. <command>-fs NAMENODE -setrep 2 /dir0/file</command>
  5781. </test-commands>
  5782. <cleanup-commands>
  5783. <command>-fs NAMENODE -rm -r /user</command>
  5784. </cleanup-commands>
  5785. <comparators>
  5786. <comparator>
  5787. <type>RegexpComparator</type>
  5788. <expected-output>^setrep: `/dir0/file': No such file or directory</expected-output>
  5789. </comparator>
  5790. </comparators>
  5791. </test>
  5792. <test> <!-- TESTED -->
  5793. <description>setrep: non existent file (relative path)</description>
  5794. <test-commands>
  5795. <command>-fs NAMENODE -setrep 2 file0</command>
  5796. </test-commands>
  5797. <cleanup-commands>
  5798. <command>-fs NAMENODE -rm -r /user</command>
  5799. </cleanup-commands>
  5800. <comparators>
  5801. <comparator>
  5802. <type>RegexpComparator</type>
  5803. <expected-output>^setrep: `file0': No such file or directory</expected-output>
  5804. </comparator>
  5805. </comparators>
  5806. </test>
  5807. <test> <!-- TESTED -->
  5808. <description>setrep: Test for hdfs:// path - existent file</description>
  5809. <test-commands>
  5810. <command>-fs NAMENODE -mkdir hdfs:///dir0/</command>
  5811. <command>-fs NAMENODE -touchz hdfs:///dir0/file0</command>
  5812. <command>-fs NAMENODE -setrep 2 hdfs:///dir0/file0</command>
  5813. </test-commands>
  5814. <cleanup-commands>
  5815. <command>-fs NAMENODE -rm -r hdfs:///*</command>
  5816. </cleanup-commands>
  5817. <comparators>
  5818. <comparator>
  5819. <type>RegexpComparator</type>
  5820. <expected-output>^Replication 2 set: hdfs:///dir0/file0</expected-output>
  5821. </comparator>
  5822. </comparators>
  5823. </test>
  5824. <test> <!-- TESTED -->
  5825. <description>setrep: Test for hdfs:// path - existent directory</description>
  5826. <test-commands>
  5827. <command>-fs NAMENODE -mkdir hdfs:///dir0/</command>
  5828. <command>-fs NAMENODE -touchz hdfs:///dir0/file0</command>
  5829. <command>-fs NAMENODE -touchz hdfs:///dir0/file1</command>
  5830. <command>-fs NAMENODE -setrep 2 hdfs:///dir0</command>
  5831. </test-commands>
  5832. <cleanup-commands>
  5833. <command>-fs NAMENODE -rm -r hdfs:///*</command>
  5834. </cleanup-commands>
  5835. <comparators>
  5836. <comparator>
  5837. <type>RegexpComparator</type>
  5838. <expected-output>^Replication 2 set: hdfs:///dir0/file0</expected-output>
  5839. </comparator>
  5840. <comparator>
  5841. <type>RegexpComparator</type>
  5842. <expected-output>^Replication 2 set: hdfs:///dir0/file1</expected-output>
  5843. </comparator>
  5844. </comparators>
  5845. </test>
  5846. <test> <!-- TESTED -->
  5847. <description>setrep: Test for hdfs:// path - non existent file</description>
  5848. <test-commands>
  5849. <command>-fs NAMENODE -mkdir hdfs:///dir0/</command>
  5850. <command>-fs NAMENODE -setrep 2 hdfs:///dir0/file</command>
  5851. </test-commands>
  5852. <cleanup-commands>
  5853. <command>-fs NAMENODE -rm -r hdfs:///*</command>
  5854. </cleanup-commands>
  5855. <comparators>
  5856. <comparator>
  5857. <type>RegexpComparator</type>
  5858. <expected-output>^setrep: `hdfs:///dir0/file': No such file or directory</expected-output>
  5859. </comparator>
  5860. </comparators>
  5861. </test>
  5862. <test> <!-- TESTED -->
  5863. <description>setrep: Test for Namenode's path - existent file</description>
  5864. <test-commands>
  5865. <command>-fs NAMENODE -mkdir NAMENODE/dir0/</command>
  5866. <command>-fs NAMENODE -touchz NAMENODE/dir0/file0</command>
  5867. <command>-fs NAMENODE -setrep 2 NAMENODE/dir0/file0</command>
  5868. </test-commands>
  5869. <cleanup-commands>
  5870. <command>-fs NAMENODE -rm -r NAMENODE/*</command>
  5871. </cleanup-commands>
  5872. <comparators>
  5873. <comparator>
  5874. <type>RegexpComparator</type>
  5875. <expected-output>^Replication 2 set: NAMENODE/dir0/file0</expected-output>
  5876. </comparator>
  5877. </comparators>
  5878. </test>
  5879. <test> <!-- TESTED -->
  5880. <description>setrep: Test for Namenode's path - existent directory</description>
  5881. <test-commands>
  5882. <command>-fs NAMENODE -mkdir -p NAMENODE/dir0</command>
  5883. <command>-fs NAMENODE -touchz NAMENODE/dir0/file0</command>
  5884. <command>-fs NAMENODE -touchz NAMENODE/dir0/file1</command>
  5885. <command>-fs NAMENODE -setrep 2 NAMENODE/dir0</command>
  5886. </test-commands>
  5887. <cleanup-commands>
  5888. <command>-fs NAMENODE -rm -r NAMENODE/*</command>
  5889. </cleanup-commands>
  5890. <comparators>
  5891. <comparator>
  5892. <type>RegexpComparator</type>
  5893. <expected-output>^Replication 2 set: NAMENODE/dir0/file0</expected-output>
  5894. </comparator>
  5895. <comparator>
  5896. <type>RegexpComparator</type>
  5897. <expected-output>^Replication 2 set: NAMENODE/dir0/file1</expected-output>
  5898. </comparator>
  5899. </comparators>
  5900. </test>
  5901. <test> <!-- TESTED -->
  5902. <description>setrep: Test for Namenode's path - non existent file</description>
  5903. <test-commands>
  5904. <command>-fs NAMENODE -setrep 2 NAMENODE/dir0/file</command>
  5905. </test-commands>
  5906. <cleanup-commands>
  5907. <command>-fs NAMENODE -rm -r NAMENODE/*</command>
  5908. </cleanup-commands>
  5909. <comparators>
  5910. <comparator>
  5911. <type>RegexpComparator</type>
  5912. <expected-output>^setrep: `hdfs://\w+[-.a-z0-9]*:[0-9]+/dir0/file': No such file or directory</expected-output>
  5913. </comparator>
  5914. </comparators>
  5915. </test>
  5916. <!-- Tests for touchz-->
  5917. <test> <!-- TESTED -->
  5918. <description>touchz: touching file (absolute path) </description>
  5919. <test-commands>
  5920. <command>-fs NAMENODE -mkdir /user</command>
  5921. <command>-fs NAMENODE -touchz /user/file0</command>
  5922. <command>-fs NAMENODE -du /user/file0</command>
  5923. </test-commands>
  5924. <cleanup-commands>
  5925. <command>-fs NAMENODE -rm /user</command>
  5926. </cleanup-commands>
  5927. <comparators>
  5928. <comparator>
  5929. <type>RegexpComparator</type>
  5930. <expected-output>^0\s+/user/file0</expected-output>
  5931. </comparator>
  5932. </comparators>
  5933. </test>
  5934. <test> <!-- TESTED -->
  5935. <description>touchz: touching file in non-existent directory </description>
  5936. <test-commands>
  5937. <command>-fs NAMENODE -touchz file0 </command>
  5938. </test-commands>
  5939. <cleanup-commands>
  5940. </cleanup-commands>
  5941. <comparators>
  5942. <comparator>
  5943. <type>RegexpComparator</type>
  5944. <expected-output>touchz: `file0': No such file or directory</expected-output>
  5945. </comparator>
  5946. </comparators>
  5947. </test>
  5948. <test> <!-- TESTED -->
  5949. <description>touchz: touching file(relative path) </description>
  5950. <test-commands>
  5951. <command>-fs NAMENODE -mkdir -p dir</command> <!-- make sure user home dir exists -->
  5952. <command>-fs NAMENODE -touchz file0 </command>
  5953. <command>-fs NAMENODE -du file0</command>
  5954. </test-commands>
  5955. <cleanup-commands>
  5956. <command>-fs NAMENODE -rm /user</command>
  5957. </cleanup-commands>
  5958. <comparators>
  5959. <comparator>
  5960. <type>RegexpComparator</type>
  5961. <expected-output>^0\s+file0</expected-output>
  5962. </comparator>
  5963. </comparators>
  5964. </test>
  5965. <test> <!-- TESTED -->
  5966. <description>touchz: touching many files </description>
  5967. <test-commands>
  5968. <command>-fs NAMENODE -mkdir -p dir</command> <!-- make sure user home dir exists -->
  5969. <command>-fs NAMENODE -touchz file0 file1 file2</command>
  5970. <command>-fs NAMENODE -du file*</command>
  5971. </test-commands>
  5972. <cleanup-commands>
  5973. <command>-fs NAMENODE -rm /user</command>
  5974. </cleanup-commands>
  5975. <comparators>
  5976. <comparator>
  5977. <type>RegexpComparator</type>
  5978. <expected-output>^0( |\t)*file0</expected-output>
  5979. <expected-output>^0( |\t)*file1</expected-output>
  5980. <expected-output>^0( |\t)*file2</expected-output>
  5981. </comparator>
  5982. </comparators>
  5983. </test>
  5984. <test> <!-- TESTED -->
  5985. <description>touchz: touching already existing file </description>
  5986. <test-commands>
  5987. <command>-fs NAMENODE -mkdir -p dir</command> <!-- make sure user home dir exists -->
  5988. <command>-fs NAMENODE -put CLITEST_DATA/data15bytes data15bytes</command>
  5989. <command>-fs NAMENODE -touchz data15bytes</command>
  5990. </test-commands>
  5991. <cleanup-commands>
  5992. <command>-fs NAMENODE -rm data15bytes</command>
  5993. </cleanup-commands>
  5994. <comparators>
  5995. <comparator>
  5996. <type>TokenComparator</type>
  5997. <expected-output>touchz: `data15bytes': Not a zero-length file</expected-output>
  5998. </comparator>
  5999. </comparators>
  6000. </test>
  6001. <test> <!-- TESTED -->
  6002. <description>touchz: Test for hdfs:// path - touching file</description>
  6003. <test-commands>
  6004. <command>-fs NAMENODE -mkdir -p hdfs:///user/</command>
  6005. <command>-fs NAMENODE -touchz hdfs:///user/file0</command>
  6006. <command>-fs NAMENODE -du hdfs:///user/file0</command>
  6007. </test-commands>
  6008. <cleanup-commands>
  6009. <command>-fs NAMENODE -rm hdfs:///user</command>
  6010. </cleanup-commands>
  6011. <comparators>
  6012. <comparator>
  6013. <type>RegexpComparator</type>
  6014. <expected-output>^0\s+hdfs:///user/file0</expected-output>
  6015. </comparator>
  6016. </comparators>
  6017. </test>
  6018. <test> <!-- TESTED -->
  6019. <description>touchz: Test for hdfs:// path - touching many files </description>
  6020. <test-commands>
  6021. <command>-fs NAMENODE -touchz hdfs:///file0 hdfs:///file1 hdfs:///file2</command>
  6022. <command>-fs NAMENODE -du hdfs:///file*</command>
  6023. </test-commands>
  6024. <cleanup-commands>
  6025. <command>-fs NAMENODE -rm hdfs:///user</command>
  6026. </cleanup-commands>
  6027. <comparators>
  6028. <comparator>
  6029. <type>RegexpComparator</type>
  6030. <expected-output>^0( |\t)*hdfs:///file0</expected-output>
  6031. <expected-output>^0( |\t)*hdfs:///file1</expected-output>
  6032. <expected-output>^0( |\t)*hdfs:///file2</expected-output>
  6033. </comparator>
  6034. </comparators>
  6035. </test>
  6036. <test> <!-- TESTED -->
  6037. <description>touchz: Test for hdfs:// path - touching already existing file </description>
  6038. <test-commands>
  6039. <command>-fs NAMENODE -put CLITEST_DATA/data15bytes hdfs:///data15bytes</command>
  6040. <command>-fs NAMENODE -touchz hdfs:///data15bytes</command>
  6041. </test-commands>
  6042. <cleanup-commands>
  6043. <command>-fs NAMENODE -rm hdfs:///data15bytes</command>
  6044. </cleanup-commands>
  6045. <comparators>
  6046. <comparator>
  6047. <type>TokenComparator</type>
  6048. <expected-output>touchz: `hdfs:///data15bytes': Not a zero-length file</expected-output>
  6049. </comparator>
  6050. </comparators>
  6051. </test>
  6052. <test> <!-- TESTED -->
  6053. <description>touchz: Test for Namenode's path - touching file</description>
  6054. <test-commands>
  6055. <command>-fs NAMENODE -touchz NAMENODE/user/file0</command>
  6056. <command>-fs NAMENODE -du NAMENODE/user/file0</command>
  6057. </test-commands>
  6058. <cleanup-commands>
  6059. <command>-fs NAMENODE -rm NAMENODE/user</command>
  6060. </cleanup-commands>
  6061. <comparators>
  6062. <comparator>
  6063. <type>RegexpComparator</type>
  6064. <expected-output>^0\s+NAMENODE/user/file0</expected-output>
  6065. </comparator>
  6066. </comparators>
  6067. </test>
  6068. <test> <!-- TESTED -->
  6069. <description>touchz: Test for Namenode path - touching many files </description>
  6070. <test-commands>
  6071. <command>-fs NAMENODE -touchz NAMENODE/file0 NAMENODE/file1 NAMENODE/file2</command>
  6072. <command>-fs NAMENODE -du NAMENODE/file*</command>
  6073. </test-commands>
  6074. <cleanup-commands>
  6075. <command>-fs NAMENODE -rm NAMENODE/user</command>
  6076. </cleanup-commands>
  6077. <comparators>
  6078. <comparator>
  6079. <type>RegexpComparator</type>
  6080. <expected-output>^0\s+hdfs://\w+[-.a-z0-9]*:[0-9]+/file0</expected-output>
  6081. <expected-output>^0\s+hdfs://\w+[-.a-z0-9]*:[0-9]+/file1</expected-output>
  6082. <expected-output>^0\s+hdfs://\w+[-.a-z0-9]*:[0-9]+/file2</expected-output>
  6083. </comparator>
  6084. </comparators>
  6085. </test>
  6086. <test> <!-- TESTED -->
  6087. <description>touchz: Test for Namenode's path - touching already existing file </description>
  6088. <test-commands>
  6089. <command>-fs NAMENODE -put CLITEST_DATA/data15bytes NAMENODE/data15bytes</command>
  6090. <command>-fs NAMENODE -touchz NAMENODE/data15bytes</command>
  6091. </test-commands>
  6092. <cleanup-commands>
  6093. <command>-fs NAMENODE -rm NAMENODE/data15bytes</command>
  6094. </cleanup-commands>
  6095. <comparators>
  6096. <comparator>
  6097. <type>RegexpComparator</type>
  6098. <expected-output>touchz: `hdfs://\w+[-.a-z0-9]*:[0-9]+/data15bytes': Not a zero-length file</expected-output>
  6099. </comparator>
  6100. </comparators>
  6101. </test>
  6102. <!--Tests for test-->
  6103. <test> <!-- TESTED -->
  6104. <description>test: non existent file (absolute path)</description>
  6105. <test-commands>
  6106. <command>-fs NAMENODE -test -z /dir0/file</command>
  6107. </test-commands>
  6108. <cleanup-commands>
  6109. <command>-fs NAMENODE -rm -r /user</command>
  6110. </cleanup-commands>
  6111. <comparators>
  6112. <comparator>
  6113. <type>ExactComparator</type>
  6114. <expected-output></expected-output>
  6115. </comparator>
  6116. </comparators>
  6117. </test>
  6118. <test> <!-- TESTED -->
  6119. <description>test: non existent file (relative path)</description>
  6120. <test-commands>
  6121. <command>-fs NAMENODE -test -z file</command>
  6122. </test-commands>
  6123. <cleanup-commands>
  6124. <command>-fs NAMENODE -rm -r /user</command>
  6125. </cleanup-commands>
  6126. <comparators>
  6127. <comparator>
  6128. <type>ExactComparator</type>
  6129. <expected-output></expected-output>
  6130. </comparator>
  6131. </comparators>
  6132. </test>
  6133. <test> <!-- TESTED -->
  6134. <description>test: non existent directory (absolute path)</description>
  6135. <test-commands>
  6136. <command>-fs NAMENODE -test -d /dir</command>
  6137. </test-commands>
  6138. <cleanup-commands>
  6139. <command>-fs NAMENODE -rm -r /user</command>
  6140. </cleanup-commands>
  6141. <comparators>
  6142. <comparator>
  6143. <type>ExactComparator</type>
  6144. <expected-output></expected-output>
  6145. </comparator>
  6146. </comparators>
  6147. </test>
  6148. <test> <!-- TESTED -->
  6149. <description>test: non existent directory (relative path)</description>
  6150. <test-commands>
  6151. <command>-fs NAMENODE -test -d dir0</command>
  6152. </test-commands>
  6153. <cleanup-commands>
  6154. <command>-fs NAMENODE -rm -r /user</command>
  6155. </cleanup-commands>
  6156. <comparators>
  6157. <comparator>
  6158. <type>ExactComparator</type>
  6159. <expected-output></expected-output>
  6160. </comparator>
  6161. </comparators>
  6162. </test>
  6163. <test> <!-- TESTED -->
  6164. <description>test: Test for hdfs:// path - non existent file</description>
  6165. <test-commands>
  6166. <command>-fs NAMENODE -test -z hdfs:///dir0/file</command>
  6167. </test-commands>
  6168. <cleanup-commands>
  6169. <command>-fs NAMENODE -rm -r hdfs:///dir0</command>
  6170. </cleanup-commands>
  6171. <comparators>
  6172. <comparator>
  6173. <type>ExactComparator</type>
  6174. <expected-output></expected-output>
  6175. </comparator>
  6176. </comparators>
  6177. </test>
  6178. <test> <!-- TESTED -->
  6179. <description>test: Test for hdfs:// path - non existent directory</description>
  6180. <test-commands>
  6181. <command>-fs NAMENODE -test -d hdfs:///dir</command>
  6182. </test-commands>
  6183. <cleanup-commands>
  6184. <command>-fs NAMENODE -rm -r hdfs:///dir</command>
  6185. </cleanup-commands>
  6186. <comparators>
  6187. <comparator>
  6188. <type>ExactComparator</type>
  6189. <expected-output></expected-output>
  6190. </comparator>
  6191. </comparators>
  6192. </test>
  6193. <test> <!-- TESTED -->
  6194. <description>test: Test for Namenode's path - non existent file</description>
  6195. <test-commands>
  6196. <command>-fs NAMENODE -test -z NAMENODE/dir0/file</command>
  6197. </test-commands>
  6198. <cleanup-commands>
  6199. <command>-fs NAMENODE -rm -r NAMENODE/dir0</command>
  6200. </cleanup-commands>
  6201. <comparators>
  6202. <comparator>
  6203. <type>ExactComparator</type>
  6204. <expected-output></expected-output>
  6205. </comparator>
  6206. </comparators>
  6207. </test>
  6208. <test> <!-- TESTED -->
  6209. <description>test: Test for Namenode's path - non existent directory</description>
  6210. <test-commands>
  6211. <command>-fs NAMENODE -test -d NAMENODE/dir</command>
  6212. </test-commands>
  6213. <cleanup-commands>
  6214. <command>-fs NAMENODE -rm -r NAMENODE/dir</command>
  6215. </cleanup-commands>
  6216. <comparators>
  6217. <comparator>
  6218. <type>ExactComparator</type>
  6219. <expected-output></expected-output>
  6220. </comparator>
  6221. </comparators>
  6222. </test>
  6223. <!--Tests for stat -->
  6224. <test> <!-- TESTED -->
  6225. <description>stat: statistics about file(absolute path)</description>
  6226. <test-commands>
  6227. <command>-fs NAMENODE -put CLITEST_DATA/data60bytes /data60bytes</command>
  6228. <command>-fs NAMENODE -stat "%n-%b" /data60bytes</command>
  6229. </test-commands>
  6230. <cleanup-commands>
  6231. <command>-fs NAMENODE -rm -r /data60bytes</command>
  6232. </cleanup-commands>
  6233. <comparators>
  6234. <comparator>
  6235. <type>TokenComparator</type>
  6236. <expected-output>data60bytes-60</expected-output>
  6237. </comparator>
  6238. </comparators>
  6239. </test>
  6240. <test> <!-- TESTED -->
  6241. <description>stat: statistics about file(relative path)</description>
  6242. <test-commands>
  6243. <command>-fs NAMENODE -mkdir -p dir</command> <!-- make sure user home dir exists -->
  6244. <command>-fs NAMENODE -touchz test</command>
  6245. <command>-fs NAMENODE -put CLITEST_DATA/data60bytes data60bytes</command>
  6246. <command>-fs NAMENODE -stat "%n-%b" data60bytes</command>
  6247. </test-commands>
  6248. <cleanup-commands>
  6249. <command>-fs NAMENODE -rm -r /user</command>
  6250. </cleanup-commands>
  6251. <comparators>
  6252. <comparator>
  6253. <type>TokenComparator</type>
  6254. <expected-output>data60bytes-60</expected-output>
  6255. </comparator>
  6256. </comparators>
  6257. </test>
  6258. <test> <!-- TESTED -->
  6259. <description>stat: statistics about directory(absolute path)</description>
  6260. <test-commands>
  6261. <command>-fs NAMENODE -mkdir /dirtest</command>
  6262. <command>-fs NAMENODE -stat "%n-%b-%o" /dirtest</command>
  6263. </test-commands>
  6264. <cleanup-commands>
  6265. <command>-fs NAMENODE -rm -r /dirtest</command>
  6266. </cleanup-commands>
  6267. <comparators>
  6268. <comparator>
  6269. <type>TokenComparator</type>
  6270. <expected-output>dirtest-0-0</expected-output>
  6271. </comparator>
  6272. </comparators>
  6273. </test>
  6274. <test> <!-- TESTED -->
  6275. <description>stat: statistics about directory(relative path)</description>
  6276. <test-commands>
  6277. <command>-fs NAMENODE -mkdir -p dirtest</command>
  6278. <command>-fs NAMENODE -stat "%n-%b-%o" dirtest</command>
  6279. </test-commands>
  6280. <cleanup-commands>
  6281. <command>-fs NAMENODE -rm -r /user</command>
  6282. </cleanup-commands>
  6283. <comparators>
  6284. <comparator>
  6285. <type>TokenComparator</type>
  6286. <expected-output>dirtest-0-0</expected-output>
  6287. </comparator>
  6288. </comparators>
  6289. </test>
  6290. <test> <!-- TESTED -->
  6291. <description>stat: statistics about files (absolute path) using globbing</description>
  6292. <test-commands>
  6293. <command>-fs NAMENODE -mkdir /dir0</command>
  6294. <command>-fs NAMENODE -put CLITEST_DATA/data15bytes /dir0/data15bytes</command>
  6295. <command>-fs NAMENODE -put CLITEST_DATA/data30bytes /dir0/data30bytes</command>
  6296. <command>-fs NAMENODE -put CLITEST_DATA/data60bytes /dir0/data60bytes</command>
  6297. <command>-fs NAMENODE -put CLITEST_DATA/data120bytes /dir0/data120bytes</command>
  6298. <command>-fs NAMENODE -mkdir /dir0/datadir</command>
  6299. <command>-fs NAMENODE -stat "%n-%b" /dir0/data*</command>
  6300. </test-commands>
  6301. <cleanup-commands>
  6302. <command>-fs NAMENODE -rm -r /dir0</command>
  6303. </cleanup-commands>
  6304. <comparators>
  6305. <comparator>
  6306. <type>TokenComparator</type>
  6307. <expected-output>data15bytes-15</expected-output>
  6308. </comparator>
  6309. <comparator>
  6310. <type>TokenComparator</type>
  6311. <expected-output>data30bytes-30</expected-output>
  6312. </comparator>
  6313. <comparator>
  6314. <type>TokenComparator</type>
  6315. <expected-output>data60bytes-60</expected-output>
  6316. </comparator>
  6317. <comparator>
  6318. <type>TokenComparator</type>
  6319. <expected-output>data120bytes-120</expected-output>
  6320. </comparator>
  6321. <comparator>
  6322. <type>TokenComparator</type>
  6323. <expected-output>datadir-0</expected-output>
  6324. </comparator>
  6325. </comparators>
  6326. </test>
  6327. <test> <!-- TESTED -->
  6328. <description>stat: statistics about files (relative path) using globbing</description>
  6329. <test-commands>
  6330. <command>-fs NAMENODE -mkdir -p dir</command> <!-- make sure user home dir exists -->
  6331. <command>-fs NAMENODE -touchz test</command>
  6332. <command>-fs NAMENODE -put CLITEST_DATA/data15bytes data15bytes</command>
  6333. <command>-fs NAMENODE -put CLITEST_DATA/data30bytes data30bytes</command>
  6334. <command>-fs NAMENODE -put CLITEST_DATA/data60bytes data60bytes</command>
  6335. <command>-fs NAMENODE -put CLITEST_DATA/data120bytes data120bytes</command>
  6336. <command>-fs NAMENODE -mkdir -p datadir</command>
  6337. <command>-fs NAMENODE -stat "%n-%b" data*</command>
  6338. </test-commands>
  6339. <cleanup-commands>
  6340. <command>-fs NAMENODE -rm -r /user</command>
  6341. </cleanup-commands>
  6342. <comparators>
  6343. <comparator>
  6344. <type>TokenComparator</type>
  6345. <expected-output>data15bytes-15</expected-output>
  6346. </comparator>
  6347. <comparator>
  6348. <type>TokenComparator</type>
  6349. <expected-output>data30bytes-30</expected-output>
  6350. </comparator>
  6351. <comparator>
  6352. <type>TokenComparator</type>
  6353. <expected-output>data60bytes-60</expected-output>
  6354. </comparator>
  6355. <comparator>
  6356. <type>TokenComparator</type>
  6357. <expected-output>data120bytes-120</expected-output>
  6358. </comparator>
  6359. <comparator>
  6360. <type>TokenComparator</type>
  6361. <expected-output>datadir-0</expected-output>
  6362. </comparator>
  6363. </comparators>
  6364. </test>
  6365. <test> <!-- TESTED -->
  6366. <description>stat: statistics about file or directory(absolute path) that does not exist</description>
  6367. <test-commands>
  6368. <command>-fs NAMENODE -stat /file</command>
  6369. </test-commands>
  6370. <cleanup-commands>
  6371. </cleanup-commands>
  6372. <comparators>
  6373. <comparator>
  6374. <type>RegexpComparator</type>
  6375. <expected-output>^stat: `/file': No such file or directory</expected-output>
  6376. </comparator>
  6377. </comparators>
  6378. </test>
  6379. <test> <!-- TESTED -->
  6380. <description>stat: statistics about file or directory(relative path) that does not exist </description>
  6381. <test-commands>
  6382. <command>-fs NAMENODE -stat file1</command>
  6383. </test-commands>
  6384. <cleanup-commands>
  6385. </cleanup-commands>
  6386. <comparators>
  6387. <comparator>
  6388. <type>RegexpComparator</type>
  6389. <expected-output>^stat: `file1': No such file or directory</expected-output>
  6390. </comparator>
  6391. </comparators>
  6392. </test>
  6393. <test> <!-- TESTED -->
  6394. <description>stat: Test for hdfs:// path - statistics about file</description>
  6395. <test-commands>
  6396. <command>-fs NAMENODE -put CLITEST_DATA/data60bytes hdfs:///data60bytes</command>
  6397. <command>-fs NAMENODE -stat "%n-%b" hdfs:///data60bytes</command>
  6398. </test-commands>
  6399. <cleanup-commands>
  6400. <command>-fs NAMENODE -rm -r hdfs:///data60bytes</command>
  6401. </cleanup-commands>
  6402. <comparators>
  6403. <comparator>
  6404. <type>TokenComparator</type>
  6405. <expected-output>data60bytes-60</expected-output>
  6406. </comparator>
  6407. </comparators>
  6408. </test>
  6409. <test> <!-- TESTED -->
  6410. <description>stat: Test for hdfs:// path - statistics about directory</description>
  6411. <test-commands>
  6412. <command>-fs NAMENODE -mkdir hdfs:///dirtest</command>
  6413. <command>-fs NAMENODE -stat "%n-%b-%o" hdfs:///dirtest</command>
  6414. </test-commands>
  6415. <cleanup-commands>
  6416. <command>-fs NAMENODE -rm -r hdfs:///dirtest</command>
  6417. </cleanup-commands>
  6418. <comparators>
  6419. <comparator>
  6420. <type>TokenComparator</type>
  6421. <expected-output>dirtest-0-0</expected-output>
  6422. </comparator>
  6423. </comparators>
  6424. </test>
  6425. <test> <!-- TESTED -->
  6426. <description>stat: Test for hdfs:// path - statistics about files using globbing</description>
  6427. <test-commands>
  6428. <command>-fs NAMENODE -mkdir /dir0</command>
  6429. <command>-fs NAMENODE -put CLITEST_DATA/data15bytes hdfs:///dir0/data15bytes</command>
  6430. <command>-fs NAMENODE -put CLITEST_DATA/data30bytes hdfs:///dir0/data30bytes</command>
  6431. <command>-fs NAMENODE -put CLITEST_DATA/data60bytes hdfs:///dir0/data60bytes</command>
  6432. <command>-fs NAMENODE -put CLITEST_DATA/data120bytes hdfs:///dir0/data120bytes</command>
  6433. <command>-fs NAMENODE -mkdir -p hdfs:///dir0/datadir</command>
  6434. <command>-fs NAMENODE -stat "%n-%b" hdfs:///dir0/data*</command>
  6435. </test-commands>
  6436. <cleanup-commands>
  6437. <command>-fs NAMENODE -rm -r hdfs:///dir0</command>
  6438. </cleanup-commands>
  6439. <comparators>
  6440. <comparator>
  6441. <type>TokenComparator</type>
  6442. <expected-output>data15bytes-15</expected-output>
  6443. </comparator>
  6444. <comparator>
  6445. <type>TokenComparator</type>
  6446. <expected-output>data30bytes-30</expected-output>
  6447. </comparator>
  6448. <comparator>
  6449. <type>TokenComparator</type>
  6450. <expected-output>data60bytes-60</expected-output>
  6451. </comparator>
  6452. <comparator>
  6453. <type>TokenComparator</type>
  6454. <expected-output>data120bytes-120</expected-output>
  6455. </comparator>
  6456. <comparator>
  6457. <type>TokenComparator</type>
  6458. <expected-output>datadir-0</expected-output>
  6459. </comparator>
  6460. </comparators>
  6461. </test>
  6462. <test> <!-- TESTED -->
  6463. <description>stat: Test for hdfs:// path - statistics about file or directory that does not exist</description>
  6464. <test-commands>
  6465. <command>-fs NAMENODE -stat hdfs:///file</command>
  6466. </test-commands>
  6467. <cleanup-commands>
  6468. </cleanup-commands>
  6469. <comparators>
  6470. <comparator>
  6471. <type>RegexpComparator</type>
  6472. <expected-output>^stat: `hdfs:///file': No such file or directory</expected-output>
  6473. </comparator>
  6474. </comparators>
  6475. </test>
  6476. <test> <!-- TESTED -->
  6477. <description>stat: Test for Namenode's path - statistics about file</description>
  6478. <test-commands>
  6479. <command>-fs NAMENODE -put CLITEST_DATA/data60bytes NAMENODE/data60bytes</command>
  6480. <command>-fs NAMENODE -stat "%n-%b" NAMENODE/data60bytes</command>
  6481. </test-commands>
  6482. <cleanup-commands>
  6483. <command>-fs NAMENODE -rm -r NAMENODE/data60bytes</command>
  6484. </cleanup-commands>
  6485. <comparators>
  6486. <comparator>
  6487. <type>TokenComparator</type>
  6488. <expected-output>data60bytes-60</expected-output>
  6489. </comparator>
  6490. </comparators>
  6491. </test>
  6492. <test> <!-- TESTED -->
  6493. <description>stat: Test for Namenode's path - statistics about directory</description>
  6494. <test-commands>
  6495. <command>-fs NAMENODE -mkdir NAMENODE/dirtest</command>
  6496. <command>-fs NAMENODE -stat "%n-%b-%o" NAMENODE/dirtest</command>
  6497. </test-commands>
  6498. <cleanup-commands>
  6499. <command>-fs NAMENODE -rm -r NAMENODE/dirtest</command>
  6500. </cleanup-commands>
  6501. <comparators>
  6502. <comparator>
  6503. <type>TokenComparator</type>
  6504. <expected-output>dirtest-0-0</expected-output>
  6505. </comparator>
  6506. </comparators>
  6507. </test>
  6508. <test> <!-- TESTED -->
  6509. <description>stat: Test for Namenode's path - statistics about files using globbing</description>
  6510. <test-commands>
  6511. <command>-fs NAMENODE -mkdir /dir0</command>
  6512. <command>-fs NAMENODE -put CLITEST_DATA/data15bytes NAMENODE/dir0/data15bytes</command>
  6513. <command>-fs NAMENODE -put CLITEST_DATA/data30bytes NAMENODE/dir0/data30bytes</command>
  6514. <command>-fs NAMENODE -put CLITEST_DATA/data60bytes NAMENODE/dir0/data60bytes</command>
  6515. <command>-fs NAMENODE -put CLITEST_DATA/data120bytes NAMENODE/dir0/data120bytes</command>
  6516. <command>-fs NAMENODE -mkdir -p NAMENODE/dir0/datadir</command>
  6517. <command>-fs NAMENODE -stat "%n-%b" NAMENODE/dir0/data*</command>
  6518. </test-commands>
  6519. <cleanup-commands>
  6520. <command>-fs NAMENODE -rm -r NAMENODE/dir0</command>
  6521. </cleanup-commands>
  6522. <comparators>
  6523. <comparator>
  6524. <type>TokenComparator</type>
  6525. <expected-output>data15bytes-15</expected-output>
  6526. </comparator>
  6527. <comparator>
  6528. <type>TokenComparator</type>
  6529. <expected-output>data30bytes-30</expected-output>
  6530. </comparator>
  6531. <comparator>
  6532. <type>TokenComparator</type>
  6533. <expected-output>data60bytes-60</expected-output>
  6534. </comparator>
  6535. <comparator>
  6536. <type>TokenComparator</type>
  6537. <expected-output>data120bytes-120</expected-output>
  6538. </comparator>
  6539. <comparator>
  6540. <type>TokenComparator</type>
  6541. <expected-output>datadir-0</expected-output>
  6542. </comparator>
  6543. </comparators>
  6544. </test>
  6545. <test> <!-- TESTED -->
  6546. <description>stat: Test for Namenode's path - statistics about file or directory that does not exist</description>
  6547. <test-commands>
  6548. <command>-fs NAMENODE -stat NAMENODE/file</command>
  6549. </test-commands>
  6550. <cleanup-commands>
  6551. </cleanup-commands>
  6552. <comparators>
  6553. <comparator>
  6554. <type>RegexpComparator</type>
  6555. <expected-output>^stat: `hdfs://\w+[-.a-z0-9]*:[0-9]+/file': No such file or directory</expected-output>
  6556. </comparator>
  6557. </comparators>
  6558. </test>
  6559. <!-- Tests for tail -->
  6560. <test> <!-- TESTED -->
  6561. <description>tail: contents of file(absolute path)</description>
  6562. <test-commands>
  6563. <command>-fs NAMENODE -put CLITEST_DATA/data15bytes /data15bytes</command>
  6564. <command>-fs NAMENODE -tail /data15bytes</command>
  6565. </test-commands>
  6566. <cleanup-commands>
  6567. <command>-fs NAMENODE -rm /user</command>
  6568. </cleanup-commands>
  6569. <comparators>
  6570. <comparator>
  6571. <type>TokenComparator</type>
  6572. <expected-output>12345678901234</expected-output>
  6573. </comparator>
  6574. </comparators>
  6575. </test>
  6576. <test> <!--TESTED-->
  6577. <description>tail: contents of file(relative path)</description>
  6578. <test-commands>
  6579. <command>-fs NAMENODE -mkdir -p dir</command> <!-- make sure user home dir exists -->
  6580. <command>-fs NAMENODE -touchz test</command>
  6581. <command>-fs NAMENODE -put CLITEST_DATA/data15bytes data15bytes</command>
  6582. <command>-fs NAMENODE -tail data15bytes</command>
  6583. </test-commands>
  6584. <cleanup-commands>
  6585. <command>-fs NAMENODE -rm -r /user</command>
  6586. </cleanup-commands>
  6587. <comparators>
  6588. <comparator>
  6589. <type>TokenComparator</type>
  6590. <expected-output>12345678901234</expected-output>
  6591. </comparator>
  6592. </comparators>
  6593. </test>
  6594. <test> <!-- TESTED -->
  6595. <description>tail: contents of files(absolute path) using globbing</description>
  6596. <test-commands>
  6597. <command>-fs NAMENODE -touchz /file1</command>
  6598. <command>-fs NAMENODE -touchz /file2</command>
  6599. <command>-fs NAMENODE -touchz /file3</command>
  6600. <command>-fs NAMENODE -touchz /file4</command>
  6601. <command>-fs NAMENODE -tail /file*</command>
  6602. </test-commands>
  6603. <cleanup-commands>
  6604. <command>-fs NAMENODE -rm -r /user</command>
  6605. </cleanup-commands>
  6606. <comparators>
  6607. <comparator>
  6608. <type>RegexpComparator</type>
  6609. <expected-output>^tail: `/file\*': No such file or directory</expected-output>
  6610. </comparator>
  6611. </comparators>
  6612. </test>
  6613. <test> <!-- TESTED -->
  6614. <description>tail: contents of files(relative path) using globbing</description>
  6615. <test-commands>
  6616. <command>-fs NAMENODE -touchz file1</command>
  6617. <command>-fs NAMENODE -touchz file2</command>
  6618. <command>-fs NAMENODE -touchz file3</command>
  6619. <command>-fs NAMENODE -touchz file4</command>
  6620. <command>-fs NAMENODE -tail file*</command>
  6621. </test-commands>
  6622. <cleanup-commands>
  6623. <command>-fs NAMENODE -rm -r /user</command>
  6624. </cleanup-commands>
  6625. <comparators>
  6626. <comparator>
  6627. <type>RegexpComparator</type>
  6628. <expected-output>^tail: `file\*': No such file or directory</expected-output>
  6629. </comparator>
  6630. </comparators>
  6631. </test>
  6632. <test> <!-- TESTED -->
  6633. <description>tail: contents of file(absolute path) that does not exist</description>
  6634. <test-commands>
  6635. <command>-fs NAMENODE -tail /file</command>
  6636. </test-commands>
  6637. <cleanup-commands>
  6638. </cleanup-commands>
  6639. <comparators>
  6640. <comparator>
  6641. <type>RegexpComparator</type>
  6642. <expected-output>^tail: `/file': No such file or directory</expected-output>
  6643. </comparator>
  6644. </comparators>
  6645. </test>
  6646. <test> <!-- TESTED -->
  6647. <description>tail: contents of file(relative path) that does not exist</description>
  6648. <test-commands>
  6649. <command>-fs NAMENODE -tail file1</command>
  6650. </test-commands>
  6651. <cleanup-commands>
  6652. </cleanup-commands>
  6653. <comparators>
  6654. <comparator>
  6655. <type>RegexpComparator</type>
  6656. <expected-output>^tail: `file1': No such file or directory</expected-output>
  6657. </comparator>
  6658. </comparators>
  6659. </test>
  6660. <test> <!-- TESTED -->
  6661. <description>tail: contents of directory(absolute path) </description>
  6662. <test-commands>
  6663. <command>-fs NAMENODE -mkdir /dir1</command>
  6664. <command>-fs NAMENODE -tail /dir1</command>
  6665. </test-commands>
  6666. <cleanup-commands>
  6667. <command>-fs NAMENODE -rm -r /dir1</command>
  6668. </cleanup-commands>
  6669. <comparators>
  6670. <comparator>
  6671. <type>RegexpComparator</type>
  6672. <expected-output>^tail: `/dir1': Is a directory</expected-output>
  6673. </comparator>
  6674. </comparators>
  6675. </test>
  6676. <test> <!-- TESTED -->
  6677. <description>tail: contents of directory(relative path)</description>
  6678. <test-commands>
  6679. <command>-fs NAMENODE -mkdir -p dir1</command>
  6680. <command>-fs NAMENODE -tail dir1</command>
  6681. </test-commands>
  6682. <cleanup-commands>
  6683. <command>-fs NAMENODE -rm -r dir1</command>
  6684. </cleanup-commands>
  6685. <comparators>
  6686. <comparator>
  6687. <type>RegexpComparator</type>
  6688. <expected-output>^tail: `dir1': Is a directory</expected-output>
  6689. </comparator>
  6690. </comparators>
  6691. </test>
  6692. <test> <!-- TESTED -->
  6693. <description>tail: Test for hdfs:// path - contents of file</description>
  6694. <test-commands>
  6695. <command>-fs NAMENODE -put CLITEST_DATA/data15bytes hdfs:///data15bytes</command>
  6696. <command>-fs NAMENODE -tail hdfs:///data15bytes</command>
  6697. </test-commands>
  6698. <cleanup-commands>
  6699. <command>-fs NAMENODE -rm hdfs:///*</command>
  6700. </cleanup-commands>
  6701. <comparators>
  6702. <comparator>
  6703. <type>TokenComparator</type>
  6704. <expected-output>12345678901234</expected-output>
  6705. </comparator>
  6706. </comparators>
  6707. </test>
  6708. <test> <!-- TESTED -->
  6709. <description>tail: Test for hdfs:// path - contents of files using globbing</description>
  6710. <test-commands>
  6711. <command>-fs NAMENODE -touchz hdfs:///file1</command>
  6712. <command>-fs NAMENODE -touchz hdfs:///file2</command>
  6713. <command>-fs NAMENODE -touchz hdfs:///file3</command>
  6714. <command>-fs NAMENODE -touchz hdfs:///file4</command>
  6715. <command>-fs NAMENODE -tail hdfs:///file*</command>
  6716. </test-commands>
  6717. <cleanup-commands>
  6718. <command>-fs NAMENODE -rm -r hdfs:///*</command>
  6719. </cleanup-commands>
  6720. <comparators>
  6721. <comparator>
  6722. <type>RegexpComparator</type>
  6723. <expected-output>^tail: `hdfs:///file\*': No such file or directory</expected-output>
  6724. </comparator>
  6725. </comparators>
  6726. </test>
  6727. <test> <!-- TESTED -->
  6728. <description>tail: Test for hdfs:// path - contents of file that does not exist</description>
  6729. <test-commands>
  6730. <command>-fs NAMENODE -tail hdfs:///file</command>
  6731. </test-commands>
  6732. <cleanup-commands>
  6733. </cleanup-commands>
  6734. <comparators>
  6735. <comparator>
  6736. <type>RegexpComparator</type>
  6737. <expected-output>^tail: `hdfs:///file': No such file or directory</expected-output>
  6738. </comparator>
  6739. </comparators>
  6740. </test>
  6741. <test> <!-- TESTED -->
  6742. <description>tail: Test for hdfs:// path - contents of directory</description>
  6743. <test-commands>
  6744. <command>-fs NAMENODE -mkdir hdfs:///dir1</command>
  6745. <command>-fs NAMENODE -tail hdfs:///dir1</command>
  6746. </test-commands>
  6747. <cleanup-commands>
  6748. <command>-fs NAMENODE -rm -r hdfs:///dir1</command>
  6749. </cleanup-commands>
  6750. <comparators>
  6751. <comparator>
  6752. <type>RegexpComparator</type>
  6753. <expected-output>^tail: `hdfs:///dir1': Is a directory</expected-output>
  6754. </comparator>
  6755. </comparators>
  6756. </test>
  6757. <test> <!-- TESTED -->
  6758. <description>tail: Test for Namenode's path - contents of file</description>
  6759. <test-commands>
  6760. <command>-fs NAMENODE -put CLITEST_DATA/data15bytes NAMENODE/data15bytes</command>
  6761. <command>-fs NAMENODE -tail NAMENODE/data15bytes</command>
  6762. </test-commands>
  6763. <cleanup-commands>
  6764. <command>-fs NAMENODE -rm NAMENODE/*</command>
  6765. </cleanup-commands>
  6766. <comparators>
  6767. <comparator>
  6768. <type>TokenComparator</type>
  6769. <expected-output>12345678901234</expected-output>
  6770. </comparator>
  6771. </comparators>
  6772. </test>
  6773. <test> <!-- TESTED -->
  6774. <description>tail: Test for Namenode's path - contents of files using globbing</description>
  6775. <test-commands>
  6776. <command>-fs NAMENODE -touchz NAMENODE/file1</command>
  6777. <command>-fs NAMENODE -touchz NAMENODE/file2</command>
  6778. <command>-fs NAMENODE -touchz NAMENODE/file3</command>
  6779. <command>-fs NAMENODE -touchz NAMENODE/file4</command>
  6780. <command>-fs NAMENODE -tail NAMENODE/file*</command>
  6781. </test-commands>
  6782. <cleanup-commands>
  6783. <command>-fs NAMENODE -rm -r NAMENODE/*</command>
  6784. </cleanup-commands>
  6785. <comparators>
  6786. <comparator>
  6787. <type>RegexpComparator</type>
  6788. <expected-output>^tail: `hdfs://\w+[-.a-z0-9]*:[0-9]+/file\*': No such file or directory</expected-output>
  6789. </comparator>
  6790. </comparators>
  6791. </test>
  6792. <test> <!-- TESTED -->
  6793. <description>tail: Test for Namenode's path - contents of file that does not exist</description>
  6794. <test-commands>
  6795. <command>-fs NAMENODE -tail NAMENODE/file</command>
  6796. </test-commands>
  6797. <cleanup-commands>
  6798. </cleanup-commands>
  6799. <comparators>
  6800. <comparator>
  6801. <type>RegexpComparator</type>
  6802. <expected-output>^tail: `hdfs://\w+[-.a-z0-9]*:[0-9]+/file': No such file or directory</expected-output>
  6803. </comparator>
  6804. </comparators>
  6805. </test>
  6806. <test> <!-- TESTED -->
  6807. <description>tail: Test for Namenode's path - contents of directory</description>
  6808. <test-commands>
  6809. <command>-fs NAMENODE -mkdir NAMENODE/dir1</command>
  6810. <command>-fs NAMENODE -tail NAMENODE/dir1</command>
  6811. </test-commands>
  6812. <cleanup-commands>
  6813. <command>-fs NAMENODE -rm -r NAMENODE/dir1</command>
  6814. </cleanup-commands>
  6815. <comparators>
  6816. <comparator>
  6817. <type>RegexpComparator</type>
  6818. <expected-output>^tail: `hdfs://\w+[-.a-z0-9]*:[0-9]+/dir1': Is a directory</expected-output>
  6819. </comparator>
  6820. </comparators>
  6821. </test>
  6822. <!-- Tests for count -->
  6823. <test> <!-- TESTED -->
  6824. <description>count: file using absolute path</description>
  6825. <test-commands>
  6826. <command>-fs NAMENODE -touchz /file1</command>
  6827. <command>-fs NAMENODE -count /file1</command>
  6828. </test-commands>
  6829. <cleanup-commands>
  6830. <command>-fs NAMENODE -rm /file1</command>
  6831. </cleanup-commands>
  6832. <comparators>
  6833. <comparator>
  6834. <type>RegexpComparator</type>
  6835. <expected-output>( |\t)*0( |\t)*1( |\t)*0 /file1</expected-output>
  6836. </comparator>
  6837. </comparators>
  6838. </test>
  6839. <test> <!-- TESTED -->
  6840. <description>count: file using relative path</description>
  6841. <test-commands>
  6842. <command>-fs NAMENODE -mkdir -p dir</command> <!-- make sure user home dir exists -->
  6843. <command>-fs NAMENODE -touchz file1</command>
  6844. <command>-fs NAMENODE -count file1</command>
  6845. </test-commands>
  6846. <cleanup-commands>
  6847. <command>-fs NAMENODE -rm file1</command>
  6848. </cleanup-commands>
  6849. <comparators>
  6850. <comparator>
  6851. <type>RegexpComparator</type>
  6852. <expected-output>( |\t)*0( |\t)*1( |\t)*0 file1</expected-output>
  6853. </comparator>
  6854. </comparators>
  6855. </test>
  6856. <test> <!-- TESTED -->
  6857. <description>count: directory using absolute path</description>
  6858. <test-commands>
  6859. <command>-fs NAMENODE -mkdir /dir1</command>
  6860. <command>-fs NAMENODE -count /dir1</command>
  6861. </test-commands>
  6862. <cleanup-commands>
  6863. <command>-fs NAMENODE -rm -r /dir1</command>
  6864. </cleanup-commands>
  6865. <comparators>
  6866. <comparator>
  6867. <type>RegexpComparator</type>
  6868. <expected-output>( |\t)*1( |\t)*0( |\t)*0 /dir1</expected-output>
  6869. </comparator>
  6870. </comparators>
  6871. </test>
  6872. <test> <!-- TESTED -->
  6873. <description>count: directory using relative path</description>
  6874. <test-commands>
  6875. <command>-fs NAMENODE -mkdir -p dir1</command>
  6876. <command>-fs NAMENODE -count dir1</command>
  6877. </test-commands>
  6878. <cleanup-commands>
  6879. <command>-fs NAMENODE -rm -r dir1</command>
  6880. </cleanup-commands>
  6881. <comparators>
  6882. <comparator>
  6883. <type>RegexpComparator</type>
  6884. <expected-output>( |\t)*1( |\t)*0( |\t)*0 dir1</expected-output>
  6885. </comparator>
  6886. </comparators>
  6887. </test>
  6888. <test> <!-- TESTED -->
  6889. <description>count: absolute path to file/directory that does not exist</description>
  6890. <test-commands>
  6891. <command>-fs NAMENODE -count /file1 </command>
  6892. </test-commands>
  6893. <cleanup-commands>
  6894. </cleanup-commands>
  6895. <comparators>
  6896. <comparator>
  6897. <type>TokenComparator</type>
  6898. <expected-output>count: `/file1': No such file or directory</expected-output>
  6899. </comparator>
  6900. </comparators>
  6901. </test>
  6902. <test> <!-- TESTED -->
  6903. <description>count: relative path to file/directory that does not exist</description>
  6904. <test-commands>
  6905. <command>-fs NAMENODE -count file1</command>
  6906. </test-commands>
  6907. <cleanup-commands>
  6908. </cleanup-commands>
  6909. <comparators>
  6910. <comparator>
  6911. <type>TokenComparator</type>
  6912. <expected-output>count: `file1': No such file or directory</expected-output>
  6913. </comparator>
  6914. </comparators>
  6915. </test>
  6916. <test> <!-- TESTED -->
  6917. <description>count: absolute path to multiple files using globbing</description>
  6918. <test-commands>
  6919. <command>-fs NAMENODE -touchz /file1</command>
  6920. <command>-fs NAMENODE -touchz /file2</command>
  6921. <command>-fs NAMENODE -touchz /file3</command>
  6922. <command>-fs NAMENODE -touchz /file4</command>
  6923. <command>-fs NAMENODE -count /file*</command>
  6924. </test-commands>
  6925. <cleanup-commands>
  6926. <command>-fs NAMENODE -rm -r /file*</command>
  6927. </cleanup-commands>
  6928. <comparators>
  6929. <comparator>
  6930. <type>RegexpComparator</type>
  6931. <expected-output>( |\t)*0( |\t)*1( |\t)*0 /file1</expected-output>
  6932. </comparator>
  6933. <comparator>
  6934. <type>RegexpComparator</type>
  6935. <expected-output>( |\t)*0( |\t)*1( |\t)*0 /file2</expected-output>
  6936. </comparator>
  6937. <comparator>
  6938. <type>RegexpComparator</type>
  6939. <expected-output>( |\t)*0( |\t)*1( |\t)*0 /file3</expected-output>
  6940. </comparator>
  6941. <comparator>
  6942. <type>RegexpComparator</type>
  6943. <expected-output>( |\t)*0( |\t)*1( |\t)*0 /file4</expected-output>
  6944. </comparator>
  6945. </comparators>
  6946. </test>
  6947. <test> <!-- TESTED -->
  6948. <description>count: relative path to multiple files using globbing</description>
  6949. <test-commands>
  6950. <command>-fs NAMENODE -touchz file1</command>
  6951. <command>-fs NAMENODE -touchz file2</command>
  6952. <command>-fs NAMENODE -touchz file3</command>
  6953. <command>-fs NAMENODE -touchz file4</command>
  6954. <command>-fs NAMENODE -count file*</command>
  6955. </test-commands>
  6956. <cleanup-commands>
  6957. <command>-fs NAMENODE -rm -r /user</command>
  6958. </cleanup-commands>
  6959. <comparators>
  6960. <comparator>
  6961. <type>RegexpComparator</type>
  6962. <expected-output>( |\t)*0( |\t)*1( |\t)*0 file1</expected-output>
  6963. </comparator>
  6964. <comparator>
  6965. <type>RegexpComparator</type>
  6966. <expected-output>( |\t)*0( |\t)*1( |\t)*0 file2</expected-output>
  6967. </comparator>
  6968. <comparator>
  6969. <type>RegexpComparator</type>
  6970. <expected-output>( |\t)*0( |\t)*1( |\t)*0 file3</expected-output>
  6971. </comparator>
  6972. <comparator>
  6973. <type>RegexpComparator</type>
  6974. <expected-output>( |\t)*0( |\t)*1( |\t)*0 file4</expected-output>
  6975. </comparator>
  6976. </comparators>
  6977. </test>
  6978. <test> <!-- TESTED -->
  6979. <description>count: absolute path to multiple files without globbing</description>
  6980. <test-commands>
  6981. <command>-fs NAMENODE -touchz /file1</command>
  6982. <command>-fs NAMENODE -touchz /file2</command>
  6983. <command>-fs NAMENODE -touchz /file3</command>
  6984. <command>-fs NAMENODE -touchz /file4</command>
  6985. <command>-fs NAMENODE -count /file1 /file2 /file3 /file4</command>
  6986. </test-commands>
  6987. <cleanup-commands>
  6988. <command>-fs NAMENODE -rm -r /file*</command>
  6989. </cleanup-commands>
  6990. <comparators>
  6991. <comparator>
  6992. <type>RegexpComparator</type>
  6993. <expected-output>( |\t)*0( |\t)*1( |\t)*0 /file1</expected-output>
  6994. </comparator>
  6995. <comparator>
  6996. <type>RegexpComparator</type>
  6997. <expected-output>( |\t)*0( |\t)*1( |\t)*0 /file2</expected-output>
  6998. </comparator>
  6999. <comparator>
  7000. <type>RegexpComparator</type>
  7001. <expected-output>( |\t)*0( |\t)*1( |\t)*0 /file3</expected-output>
  7002. </comparator>
  7003. <comparator>
  7004. <type>RegexpComparator</type>
  7005. <expected-output>( |\t)*0( |\t)*1( |\t)*0 /file4</expected-output>
  7006. </comparator>
  7007. </comparators>
  7008. </test>
  7009. <test> <!-- TESTED -->
  7010. <description>count: relative path to multiple files without globbing</description>
  7011. <test-commands>
  7012. <command>-fs NAMENODE -mkdir -p dir</command> <!-- make sure user home dir exists -->
  7013. <command>-fs NAMENODE -touchz file1</command>
  7014. <command>-fs NAMENODE -touchz file2</command>
  7015. <command>-fs NAMENODE -touchz file3</command>
  7016. <command>-fs NAMENODE -touchz file4</command>
  7017. <command>-fs NAMENODE -count file1 file2 file3 file4</command>
  7018. </test-commands>
  7019. <cleanup-commands>
  7020. <command>-fs NAMENODE -rm -r /user</command>
  7021. </cleanup-commands>
  7022. <comparators>
  7023. <comparator>
  7024. <type>RegexpComparator</type>
  7025. <expected-output>( |\t)*0( |\t)*1( |\t)*0 file1</expected-output>
  7026. </comparator>
  7027. <comparator>
  7028. <type>RegexpComparator</type>
  7029. <expected-output>( |\t)*0( |\t)*1( |\t)*0 file2</expected-output>
  7030. </comparator>
  7031. <comparator>
  7032. <type>RegexpComparator</type>
  7033. <expected-output>( |\t)*0( |\t)*1( |\t)*0 file3</expected-output>
  7034. </comparator>
  7035. <comparator>
  7036. <type>RegexpComparator</type>
  7037. <expected-output>( |\t)*0( |\t)*1( |\t)*0 file4</expected-output>
  7038. </comparator>
  7039. </comparators>
  7040. </test>
  7041. <test> <!-- TESTED -->
  7042. <description>count: absolute path to multiple directories using globbing</description>
  7043. <test-commands>
  7044. <command>-fs NAMENODE -mkdir /dir1</command>
  7045. <command>-fs NAMENODE -mkdir /dir2</command>
  7046. <command>-fs NAMENODE -mkdir /dir3</command>
  7047. <command>-fs NAMENODE -mkdir /dir4</command>
  7048. <command>-fs NAMENODE -count /dir* </command>
  7049. </test-commands>
  7050. <cleanup-commands>
  7051. <command>-fs NAMENODE -rm -r /dir*</command>
  7052. </cleanup-commands>
  7053. <comparators>
  7054. <comparator>
  7055. <type>RegexpComparator</type>
  7056. <expected-output>( |\t)*1( |\t)*0( |\t)*0 /dir1</expected-output>
  7057. </comparator>
  7058. <comparator>
  7059. <type>RegexpComparator</type>
  7060. <expected-output>( |\t)*1( |\t)*0( |\t)*0 /dir2</expected-output>
  7061. </comparator>
  7062. <comparator>
  7063. <type>RegexpComparator</type>
  7064. <expected-output>( |\t)*1( |\t)*0( |\t)*0 /dir3</expected-output>
  7065. </comparator>
  7066. <comparator>
  7067. <type>RegexpComparator</type>
  7068. <expected-output>( |\t)*1( |\t)*0( |\t)*0 /dir4</expected-output>
  7069. </comparator>
  7070. </comparators>
  7071. </test>
  7072. <test> <!-- TESTED -->
  7073. <description>count: relative path to multiple directories using globbing</description>
  7074. <test-commands>
  7075. <command>-fs NAMENODE -mkdir -p dir1</command>
  7076. <command>-fs NAMENODE -mkdir -p dir2</command>
  7077. <command>-fs NAMENODE -mkdir -p dir3</command>
  7078. <command>-fs NAMENODE -mkdir -p dir4</command>
  7079. <command>-fs NAMENODE -count dir* </command>
  7080. </test-commands>
  7081. <cleanup-commands>
  7082. <command>-fs NAMENODE -rm -r /user</command>
  7083. </cleanup-commands>
  7084. <comparators>
  7085. <comparator>
  7086. <type>RegexpComparator</type>
  7087. <expected-output>( |\t)*1( |\t)*0( |\t)*0 dir1</expected-output>
  7088. </comparator>
  7089. <comparator>
  7090. <type>RegexpComparator</type>
  7091. <expected-output>( |\t)*1( |\t)*0( |\t)*0 dir2</expected-output>
  7092. </comparator>
  7093. <comparator>
  7094. <type>RegexpComparator</type>
  7095. <expected-output>( |\t)*1( |\t)*0( |\t)*0 dir3</expected-output>
  7096. </comparator>
  7097. <comparator>
  7098. <type>RegexpComparator</type>
  7099. <expected-output>( |\t)*1( |\t)*0( |\t)*0 dir4</expected-output>
  7100. </comparator>
  7101. </comparators>
  7102. </test>
  7103. <test> <!-- TESTED -->
  7104. <description>count: absolute path to multiple directories without globbing</description>
  7105. <test-commands>
  7106. <command>-fs NAMENODE -mkdir /dir1</command>
  7107. <command>-fs NAMENODE -mkdir /dir2</command>
  7108. <command>-fs NAMENODE -mkdir /dir3</command>
  7109. <command>-fs NAMENODE -mkdir /dir4</command>
  7110. <command>-fs NAMENODE -count /dir1 /dir2 /dir3 /dir4 </command>
  7111. </test-commands>
  7112. <cleanup-commands>
  7113. <command>-fs NAMENODE -rm -r /dir*</command>
  7114. </cleanup-commands>
  7115. <comparators>
  7116. <comparator>
  7117. <type>RegexpComparator</type>
  7118. <expected-output>( |\t)*1( |\t)*0( |\t)*0 /dir1</expected-output>
  7119. </comparator>
  7120. <comparator>
  7121. <type>RegexpComparator</type>
  7122. <expected-output>( |\t)*1( |\t)*0( |\t)*0 /dir2</expected-output>
  7123. </comparator>
  7124. <comparator>
  7125. <type>RegexpComparator</type>
  7126. <expected-output>( |\t)*1( |\t)*0( |\t)*0 /dir3</expected-output>
  7127. </comparator>
  7128. <comparator>
  7129. <type>RegexpComparator</type>
  7130. <expected-output>( |\t)*1( |\t)*0( |\t)*0 /dir4</expected-output>
  7131. </comparator>
  7132. </comparators>
  7133. </test>
  7134. <test> <!-- TESTED -->
  7135. <description>count: relative path to multiple directories without globbing</description>
  7136. <test-commands>
  7137. <command>-fs NAMENODE -mkdir -p dir1</command>
  7138. <command>-fs NAMENODE -mkdir -p dir2</command>
  7139. <command>-fs NAMENODE -mkdir -p dir3</command>
  7140. <command>-fs NAMENODE -mkdir -p dir4</command>
  7141. <command>-fs NAMENODE -count dir1 dir2 dir3 dir4 </command>
  7142. </test-commands>
  7143. <cleanup-commands>
  7144. <command>-fs NAMENODE -rm -r /user</command>
  7145. </cleanup-commands>
  7146. <comparators>
  7147. <comparator>
  7148. <type>RegexpComparator</type>
  7149. <expected-output>( |\t)*1( |\t)*0( |\t)*0 dir1</expected-output>
  7150. </comparator>
  7151. <comparator>
  7152. <type>RegexpComparator</type>
  7153. <expected-output>( |\t)*1( |\t)*0( |\t)*0 dir2</expected-output>
  7154. </comparator>
  7155. <comparator>
  7156. <type>RegexpComparator</type>
  7157. <expected-output>( |\t)*1( |\t)*0( |\t)*0 dir3</expected-output>
  7158. </comparator>
  7159. <comparator>
  7160. <type>RegexpComparator</type>
  7161. <expected-output>( |\t)*1( |\t)*0( |\t)*0 dir4</expected-output>
  7162. </comparator>
  7163. </comparators>
  7164. </test>
  7165. <test> <!-- TESTED -->
  7166. <description>count: file using absolute path with -q option</description>
  7167. <test-commands>
  7168. <command>-fs NAMENODE -touchz /file1</command>
  7169. <command>-fs NAMENODE -count -q /file1</command>
  7170. </test-commands>
  7171. <cleanup-commands>
  7172. <command>-fs NAMENODE -rm /file1</command>
  7173. </cleanup-commands>
  7174. <comparators>
  7175. <comparator>
  7176. <type>RegexpComparator</type>
  7177. <expected-output>( |\t)*none( |\t)*inf( |\t)*none( |\t)*inf( |\t)*0( |\t)*1( |\t)*0 /file1</expected-output>
  7178. </comparator>
  7179. </comparators>
  7180. </test>
  7181. <test> <!-- TESTED -->
  7182. <description>count: file using relative path with -q option</description>
  7183. <test-commands>
  7184. <command>-fs NAMENODE -mkdir -p dir</command> <!-- make sure user home dir exists -->
  7185. <command>-fs NAMENODE -touchz file1</command>
  7186. <command>-fs NAMENODE -count -q file1</command>
  7187. </test-commands>
  7188. <cleanup-commands>
  7189. <command>-fs NAMENODE -rm file1</command>
  7190. </cleanup-commands>
  7191. <comparators>
  7192. <comparator>
  7193. <type>RegexpComparator</type>
  7194. <expected-output>( |\t)*none( |\t)*inf( |\t)*none( |\t)*inf( |\t)*0( |\t)*1( |\t)*0 file1</expected-output>
  7195. </comparator>
  7196. </comparators>
  7197. </test>
  7198. <test> <!-- TESTED -->
  7199. <description>count: directory using absolute path with -q option</description>
  7200. <test-commands>
  7201. <command>-fs NAMENODE -mkdir /dir1</command>
  7202. <dfs-admin-command>-fs NAMENODE -setQuota 10 /dir1 </dfs-admin-command>
  7203. <dfs-admin-command>-fs NAMENODE -setSpaceQuota 1m /dir1 </dfs-admin-command>
  7204. <command>-fs NAMENODE -count -q /dir1</command>
  7205. </test-commands>
  7206. <cleanup-commands>
  7207. <command>-fs NAMENODE -rm -r /dir1</command>
  7208. </cleanup-commands>
  7209. <comparators>
  7210. <comparator>
  7211. <type>RegexpComparator</type>
  7212. <expected-output>( |\t)*10( |\t)*9( |\t)*1048576( |\t)*1048576( |\t)*1( |\t)*0( |\t)*0 /dir1</expected-output>
  7213. </comparator>
  7214. </comparators>
  7215. </test>
  7216. <test> <!-- TESTED -->
  7217. <description>count: directory using relative path with -q option</description>
  7218. <test-commands>
  7219. <command>-fs NAMENODE -mkdir -p dir1</command>
  7220. <dfs-admin-command>-fs NAMENODE -setQuota 10 dir1 </dfs-admin-command>
  7221. <dfs-admin-command>-fs NAMENODE -setSpaceQuota 1m dir1 </dfs-admin-command>
  7222. <command>-fs NAMENODE -count -q dir1</command>
  7223. </test-commands>
  7224. <cleanup-commands>
  7225. <command>-fs NAMENODE -rm -r dir1</command>
  7226. </cleanup-commands>
  7227. <comparators>
  7228. <comparator>
  7229. <type>RegexpComparator</type>
  7230. <expected-output>( |\t)*10( |\t)*9( |\t)*1048576( |\t)*1048576( |\t)*1( |\t)*0( |\t)*0 dir1</expected-output>
  7231. </comparator>
  7232. </comparators>
  7233. </test>
  7234. <test> <!-- TESTED -->
  7235. <description>count: absolute path to file/directory that does not exist with -q option</description>
  7236. <test-commands>
  7237. <command>-fs NAMENODE -count -q /file1 </command>
  7238. </test-commands>
  7239. <cleanup-commands>
  7240. </cleanup-commands>
  7241. <comparators>
  7242. <comparator>
  7243. <type>TokenComparator</type>
  7244. <expected-output>count: `/file1': No such file or directory</expected-output>
  7245. </comparator>
  7246. </comparators>
  7247. </test>
  7248. <test> <!-- TESTED -->
  7249. <description>count: relative path to file/directory that does not exist with -q option</description>
  7250. <test-commands>
  7251. <command>-fs NAMENODE -count -q file1</command>
  7252. </test-commands>
  7253. <cleanup-commands>
  7254. </cleanup-commands>
  7255. <comparators>
  7256. <comparator>
  7257. <type>TokenComparator</type>
  7258. <expected-output>count: `file1': No such file or directory</expected-output>
  7259. </comparator>
  7260. </comparators>
  7261. </test>
  7262. <test> <!-- TESTED -->
  7263. <description>count: absolute path to multiple files using globbing with -q option</description>
  7264. <test-commands>
  7265. <command>-fs NAMENODE -touchz /file1</command>
  7266. <command>-fs NAMENODE -touchz /file2</command>
  7267. <command>-fs NAMENODE -touchz /file3</command>
  7268. <command>-fs NAMENODE -touchz /file4</command>
  7269. <command>-fs NAMENODE -count -q /file*</command>
  7270. </test-commands>
  7271. <cleanup-commands>
  7272. <command>-fs NAMENODE -rm -r /file*</command>
  7273. </cleanup-commands>
  7274. <comparators>
  7275. <comparator>
  7276. <type>RegexpComparator</type>
  7277. <expected-output>( |\t)*none( |\t)*inf( |\t)*none( |\t)*inf( |\t)*0( |\t)*1( |\t)*0 /file1</expected-output>
  7278. </comparator>
  7279. <comparator>
  7280. <type>RegexpComparator</type>
  7281. <expected-output>( |\t)*none( |\t)*inf( |\t)*none( |\t)*inf( |\t)*0( |\t)*1( |\t)*0 /file2</expected-output>
  7282. </comparator>
  7283. <comparator>
  7284. <type>RegexpComparator</type>
  7285. <expected-output>( |\t)*none( |\t)*inf( |\t)*none( |\t)*inf( |\t)*0( |\t)*1( |\t)*0 /file3</expected-output>
  7286. </comparator>
  7287. <comparator>
  7288. <type>RegexpComparator</type>
  7289. <expected-output>( |\t)*none( |\t)*inf( |\t)*none( |\t)*inf( |\t)*0( |\t)*1( |\t)*0 /file4</expected-output>
  7290. </comparator>
  7291. </comparators>
  7292. </test>
  7293. <test> <!-- TESTED -->
  7294. <description>count: relative path to multiple files using globbing with -q option</description>
  7295. <test-commands>
  7296. <command>-fs NAMENODE -touchz file1</command>
  7297. <command>-fs NAMENODE -touchz file2</command>
  7298. <command>-fs NAMENODE -touchz file3</command>
  7299. <command>-fs NAMENODE -touchz file4</command>
  7300. <command>-fs NAMENODE -count -q file*</command>
  7301. </test-commands>
  7302. <cleanup-commands>
  7303. <command>-fs NAMENODE -rm -r /user</command>
  7304. </cleanup-commands>
  7305. <comparators>
  7306. <comparator>
  7307. <type>RegexpComparator</type>
  7308. <expected-output>( |\t)*none( |\t)*inf( |\t)*none( |\t)*inf( |\t)*0( |\t)*1( |\t)*0 file1</expected-output>
  7309. </comparator>
  7310. <comparator>
  7311. <type>RegexpComparator</type>
  7312. <expected-output>( |\t)*none( |\t)*inf( |\t)*none( |\t)*inf( |\t)*0( |\t)*1( |\t)*0 file2</expected-output>
  7313. </comparator>
  7314. <comparator>
  7315. <type>RegexpComparator</type>
  7316. <expected-output>( |\t)*none( |\t)*inf( |\t)*none( |\t)*inf( |\t)*0( |\t)*1( |\t)*0 file3</expected-output>
  7317. </comparator>
  7318. <comparator>
  7319. <type>RegexpComparator</type>
  7320. <expected-output>( |\t)*none( |\t)*inf( |\t)*none( |\t)*inf( |\t)*0( |\t)*1( |\t)*0 file4</expected-output>
  7321. </comparator>
  7322. </comparators>
  7323. </test>
  7324. <test> <!-- TESTED -->
  7325. <description>count: absolute path to multiple files without globbing with -q option</description>
  7326. <test-commands>
  7327. <command>-fs NAMENODE -touchz /file1</command>
  7328. <command>-fs NAMENODE -touchz /file2</command>
  7329. <command>-fs NAMENODE -touchz /file3</command>
  7330. <command>-fs NAMENODE -touchz /file4</command>
  7331. <command>-fs NAMENODE -count -q /file1 /file2 /file3 /file4</command>
  7332. </test-commands>
  7333. <cleanup-commands>
  7334. <command>-fs NAMENODE -rm -r /file*</command>
  7335. </cleanup-commands>
  7336. <comparators>
  7337. <comparator>
  7338. <type>RegexpComparator</type>
  7339. <expected-output>( |\t)*none( |\t)*inf( |\t)*none( |\t)*inf( |\t)*0( |\t)*1( |\t)*0 /file1</expected-output>
  7340. </comparator>
  7341. <comparator>
  7342. <type>RegexpComparator</type>
  7343. <expected-output>( |\t)*none( |\t)*inf( |\t)*none( |\t)*inf( |\t)*0( |\t)*1( |\t)*0 /file2</expected-output>
  7344. </comparator>
  7345. <comparator>
  7346. <type>RegexpComparator</type>
  7347. <expected-output>( |\t)*none( |\t)*inf( |\t)*none( |\t)*inf( |\t)*0( |\t)*1( |\t)*0 /file3</expected-output>
  7348. </comparator>
  7349. <comparator>
  7350. <type>RegexpComparator</type>
  7351. <expected-output>( |\t)*none( |\t)*inf( |\t)*none( |\t)*inf( |\t)*0( |\t)*1( |\t)*0 /file4</expected-output>
  7352. </comparator>
  7353. </comparators>
  7354. </test>
  7355. <test> <!-- TESTED -->
  7356. <description>count: relative path to multiple files without globbing with -q option</description>
  7357. <test-commands>
  7358. <command>-fs NAMENODE -mkdir -p dir</command> <!-- make sure user home dir exists -->
  7359. <command>-fs NAMENODE -touchz file1</command>
  7360. <command>-fs NAMENODE -touchz file2</command>
  7361. <command>-fs NAMENODE -touchz file3</command>
  7362. <command>-fs NAMENODE -touchz file4</command>
  7363. <command>-fs NAMENODE -count -q file1 file2 file3 file4</command>
  7364. </test-commands>
  7365. <cleanup-commands>
  7366. <command>-fs NAMENODE -rm -r /user</command>
  7367. </cleanup-commands>
  7368. <comparators>
  7369. <comparator>
  7370. <type>RegexpComparator</type>
  7371. <expected-output>( |\t)*none( |\t)*inf( |\t)*none( |\t)*inf( |\t)*0( |\t)*1( |\t)*0 file1</expected-output>
  7372. </comparator>
  7373. <comparator>
  7374. <type>RegexpComparator</type>
  7375. <expected-output>( |\t)*none( |\t)*inf( |\t)*none( |\t)*inf( |\t)*0( |\t)*1( |\t)*0 file2</expected-output>
  7376. </comparator>
  7377. <comparator>
  7378. <type>RegexpComparator</type>
  7379. <expected-output>( |\t)*none( |\t)*inf( |\t)*none( |\t)*inf( |\t)*0( |\t)*1( |\t)*0 file3</expected-output>
  7380. </comparator>
  7381. <comparator>
  7382. <type>RegexpComparator</type>
  7383. <expected-output>( |\t)*none( |\t)*inf( |\t)*none( |\t)*inf( |\t)*0( |\t)*1( |\t)*0 file4</expected-output>
  7384. </comparator>
  7385. </comparators>
  7386. </test>
  7387. <test> <!-- TESTED -->
  7388. <description>count: absolute path to multiple directories using globbing with -q option</description>
  7389. <test-commands>
  7390. <command>-fs NAMENODE -mkdir /dir1</command>
  7391. <command>-fs NAMENODE -mkdir /dir2</command>
  7392. <command>-fs NAMENODE -mkdir /dir3</command>
  7393. <command>-fs NAMENODE -mkdir /dir4</command>
  7394. <dfs-admin-command>-fs NAMENODE -setQuota 10 /dir1 </dfs-admin-command>
  7395. <dfs-admin-command>-fs NAMENODE -setSpaceQuota 1m /dir1 </dfs-admin-command>
  7396. <dfs-admin-command>-fs NAMENODE -setQuota 10 /dir2 </dfs-admin-command>
  7397. <dfs-admin-command>-fs NAMENODE -setSpaceQuota 1m /dir2 </dfs-admin-command>
  7398. <dfs-admin-command>-fs NAMENODE -setQuota 10 /dir3 </dfs-admin-command>
  7399. <dfs-admin-command>-fs NAMENODE -setSpaceQuota 1m /dir3 </dfs-admin-command>
  7400. <dfs-admin-command>-fs NAMENODE -setQuota 10 /dir4 </dfs-admin-command>
  7401. <dfs-admin-command>-fs NAMENODE -setSpaceQuota 1m /dir4 </dfs-admin-command>
  7402. <command>-fs NAMENODE -count -q /dir* </command>
  7403. </test-commands>
  7404. <cleanup-commands>
  7405. <command>-fs NAMENODE -rm -r /dir*</command>
  7406. </cleanup-commands>
  7407. <comparators>
  7408. <comparator>
  7409. <type>RegexpComparator</type>
  7410. <expected-output>( |\t)*10( |\t)*9( |\t)*1048576( |\t)*1048576( |\t)*1( |\t)*0( |\t)*0 /dir1</expected-output>
  7411. </comparator>
  7412. <comparator>
  7413. <type>RegexpComparator</type>
  7414. <expected-output>( |\t)*10( |\t)*9( |\t)*1048576( |\t)*1048576( |\t)*1( |\t)*0( |\t)*0 /dir2</expected-output>
  7415. </comparator>
  7416. <comparator>
  7417. <type>RegexpComparator</type>
  7418. <expected-output>( |\t)*10( |\t)*9( |\t)*1048576( |\t)*1048576( |\t)*1( |\t)*0( |\t)*0 /dir3</expected-output>
  7419. </comparator>
  7420. <comparator>
  7421. <type>RegexpComparator</type>
  7422. <expected-output>( |\t)*10( |\t)*9( |\t)*1048576( |\t)*1048576( |\t)*1( |\t)*0( |\t)*0 /dir4</expected-output>
  7423. </comparator>
  7424. </comparators>
  7425. </test>
  7426. <test> <!-- TESTED -->
  7427. <description>count: relative path to multiple directories using globbing with -q option</description>
  7428. <test-commands>
  7429. <command>-fs NAMENODE -mkdir -p dir1</command>
  7430. <command>-fs NAMENODE -mkdir -p dir2</command>
  7431. <command>-fs NAMENODE -mkdir -p dir3</command>
  7432. <command>-fs NAMENODE -mkdir -p dir4</command>
  7433. <dfs-admin-command>-fs NAMENODE -setQuota 10 dir1 </dfs-admin-command>
  7434. <dfs-admin-command>-fs NAMENODE -setSpaceQuota 1m dir1 </dfs-admin-command>
  7435. <dfs-admin-command>-fs NAMENODE -setQuota 10 dir2 </dfs-admin-command>
  7436. <dfs-admin-command>-fs NAMENODE -setSpaceQuota 1m dir2 </dfs-admin-command>
  7437. <dfs-admin-command>-fs NAMENODE -setQuota 10 dir3 </dfs-admin-command>
  7438. <dfs-admin-command>-fs NAMENODE -setSpaceQuota 1m dir3 </dfs-admin-command>
  7439. <dfs-admin-command>-fs NAMENODE -setQuota 10 dir4 </dfs-admin-command>
  7440. <dfs-admin-command>-fs NAMENODE -setSpaceQuota 1m dir4 </dfs-admin-command>
  7441. <command>-fs NAMENODE -count -q dir* </command>
  7442. </test-commands>
  7443. <cleanup-commands>
  7444. <command>-fs NAMENODE -rm -r /user</command>
  7445. </cleanup-commands>
  7446. <comparators>
  7447. <comparator>
  7448. <type>RegexpComparator</type>
  7449. <expected-output>( |\t)*10( |\t)*9( |\t)*1048576( |\t)*1048576( |\t)*1( |\t)*0( |\t)*0 dir1</expected-output>
  7450. </comparator>
  7451. <comparator>
  7452. <type>RegexpComparator</type>
  7453. <expected-output>( |\t)*10( |\t)*9( |\t)*1048576( |\t)*1048576( |\t)*1( |\t)*0( |\t)*0 dir2</expected-output>
  7454. </comparator>
  7455. <comparator>
  7456. <type>RegexpComparator</type>
  7457. <expected-output>( |\t)*10( |\t)*9( |\t)*1048576( |\t)*1048576( |\t)*1( |\t)*0( |\t)*0 dir3</expected-output>
  7458. </comparator>
  7459. <comparator>
  7460. <type>RegexpComparator</type>
  7461. <expected-output>( |\t)*10( |\t)*9( |\t)*1048576( |\t)*1048576( |\t)*1( |\t)*0( |\t)*0 dir4</expected-output>
  7462. </comparator>
  7463. </comparators>
  7464. </test>
  7465. <test> <!-- TESTED -->
  7466. <description>count: absolute path to multiple directories without globbing with -q option</description>
  7467. <test-commands>
  7468. <command>-fs NAMENODE -mkdir /dir1</command>
  7469. <command>-fs NAMENODE -mkdir /dir2</command>
  7470. <command>-fs NAMENODE -mkdir /dir3</command>
  7471. <command>-fs NAMENODE -mkdir /dir4</command>
  7472. <dfs-admin-command>-fs NAMENODE -setQuota 10 /dir1 </dfs-admin-command>
  7473. <dfs-admin-command>-fs NAMENODE -setSpaceQuota 1m /dir1 </dfs-admin-command>
  7474. <dfs-admin-command>-fs NAMENODE -setQuota 10 /dir2 </dfs-admin-command>
  7475. <dfs-admin-command>-fs NAMENODE -setSpaceQuota 1m /dir2 </dfs-admin-command>
  7476. <dfs-admin-command>-fs NAMENODE -setQuota 10 /dir3 </dfs-admin-command>
  7477. <dfs-admin-command>-fs NAMENODE -setSpaceQuota 1m /dir3 </dfs-admin-command>
  7478. <dfs-admin-command>-fs NAMENODE -setQuota 10 /dir4 </dfs-admin-command>
  7479. <dfs-admin-command>-fs NAMENODE -setSpaceQuota 1m /dir4 </dfs-admin-command>
  7480. <command>-fs NAMENODE -count -q /dir1 /dir2 /dir3 /dir4 </command>
  7481. </test-commands>
  7482. <cleanup-commands>
  7483. <command>-fs NAMENODE -rm -r /dir*</command>
  7484. </cleanup-commands>
  7485. <comparators>
  7486. <comparator>
  7487. <type>RegexpComparator</type>
  7488. <expected-output>( |\t)*10( |\t)*9( |\t)*1048576( |\t)*1048576( |\t)*1( |\t)*0( |\t)*0 /dir1</expected-output>
  7489. </comparator>
  7490. <comparator>
  7491. <type>RegexpComparator</type>
  7492. <expected-output>( |\t)*10( |\t)*9( |\t)*1048576( |\t)*1048576( |\t)*1( |\t)*0( |\t)*0 /dir2</expected-output>
  7493. </comparator>
  7494. <comparator>
  7495. <type>RegexpComparator</type>
  7496. <expected-output>( |\t)*10( |\t)*9( |\t)*1048576( |\t)*1048576( |\t)*1( |\t)*0( |\t)*0 /dir3</expected-output>
  7497. </comparator>
  7498. <comparator>
  7499. <type>RegexpComparator</type>
  7500. <expected-output>( |\t)*10( |\t)*9( |\t)*1048576( |\t)*1048576( |\t)*1( |\t)*0( |\t)*0 /dir4</expected-output>
  7501. </comparator>
  7502. </comparators>
  7503. </test>
  7504. <test> <!-- TESTED -->
  7505. <description>count: relative path to multiple directories without globbing with -q option</description>
  7506. <test-commands>
  7507. <command>-fs NAMENODE -mkdir -p dir1</command>
  7508. <command>-fs NAMENODE -mkdir -p dir2</command>
  7509. <command>-fs NAMENODE -mkdir -p dir3</command>
  7510. <command>-fs NAMENODE -mkdir -p dir4</command>
  7511. <dfs-admin-command>-fs NAMENODE -setQuota 10 dir1 </dfs-admin-command>
  7512. <dfs-admin-command>-fs NAMENODE -setSpaceQuota 1m dir1 </dfs-admin-command>
  7513. <dfs-admin-command>-fs NAMENODE -setQuota 10 dir2 </dfs-admin-command>
  7514. <dfs-admin-command>-fs NAMENODE -setSpaceQuota 1m dir2 </dfs-admin-command>
  7515. <dfs-admin-command>-fs NAMENODE -setQuota 10 dir3 </dfs-admin-command>
  7516. <dfs-admin-command>-fs NAMENODE -setSpaceQuota 1m dir3 </dfs-admin-command>
  7517. <dfs-admin-command>-fs NAMENODE -setQuota 10 dir4 </dfs-admin-command>
  7518. <dfs-admin-command>-fs NAMENODE -setSpaceQuota 1m dir4 </dfs-admin-command>
  7519. <command>-fs NAMENODE -count -q dir1 dir2 dir3 dir4 </command>
  7520. </test-commands>
  7521. <cleanup-commands>
  7522. <command>-fs NAMENODE -rm -r /user</command>
  7523. </cleanup-commands>
  7524. <comparators>
  7525. <comparator>
  7526. <type>RegexpComparator</type>
  7527. <expected-output>( |\t)*10( |\t)*9( |\t)*1048576( |\t)*1048576( |\t)*1( |\t)*0( |\t)*0 dir1</expected-output>
  7528. </comparator>
  7529. <comparator>
  7530. <type>RegexpComparator</type>
  7531. <expected-output>( |\t)*10( |\t)*9( |\t)*1048576( |\t)*1048576( |\t)*1( |\t)*0( |\t)*0 dir2</expected-output>
  7532. </comparator>
  7533. <comparator>
  7534. <type>RegexpComparator</type>
  7535. <expected-output>( |\t)*10( |\t)*9( |\t)*1048576( |\t)*1048576( |\t)*1( |\t)*0( |\t)*0 dir3</expected-output>
  7536. </comparator>
  7537. <comparator>
  7538. <type>RegexpComparator</type>
  7539. <expected-output>( |\t)*10( |\t)*9( |\t)*1048576( |\t)*1048576( |\t)*1( |\t)*0( |\t)*0 dir4</expected-output>
  7540. </comparator>
  7541. </comparators>
  7542. </test>
  7543. <test> <!-- TESTED -->
  7544. <description>count: Test for file using hdfs:// path</description>
  7545. <test-commands>
  7546. <command>-fs NAMENODE -touchz hdfs:///file1</command>
  7547. <command>-fs NAMENODE -count hdfs:///file1</command>
  7548. </test-commands>
  7549. <cleanup-commands>
  7550. <command>-fs NAMENODE -rm hdfs:///file1</command>
  7551. </cleanup-commands>
  7552. <comparators>
  7553. <comparator>
  7554. <type>RegexpComparator</type>
  7555. <expected-output>( |\t)*0( |\t)*1( |\t)*0 hdfs:///file1</expected-output>
  7556. </comparator>
  7557. </comparators>
  7558. </test>
  7559. <test> <!-- TESTED -->
  7560. <description>count: Test for directory using hdfs:// path</description>
  7561. <test-commands>
  7562. <command>-fs NAMENODE -mkdir hdfs:///dir1</command>
  7563. <command>-fs NAMENODE -count hdfs:///dir1</command>
  7564. </test-commands>
  7565. <cleanup-commands>
  7566. <command>-fs NAMENODE -rm -r hdfs:///dir1</command>
  7567. </cleanup-commands>
  7568. <comparators>
  7569. <comparator>
  7570. <type>RegexpComparator</type>
  7571. <expected-output>( |\t)*1( |\t)*0( |\t)*0 hdfs:///dir1</expected-output>
  7572. </comparator>
  7573. </comparators>
  7574. </test>
  7575. <test> <!-- TESTED -->
  7576. <description>count: Test for hdfs:// path - file/directory that does not exist</description>
  7577. <test-commands>
  7578. <command>-fs NAMENODE -count hdfs:///file1 </command>
  7579. </test-commands>
  7580. <cleanup-commands>
  7581. </cleanup-commands>
  7582. <comparators>
  7583. <comparator>
  7584. <type>TokenComparator</type>
  7585. <expected-output>count: `hdfs:///file1': No such file or directory</expected-output>
  7586. </comparator>
  7587. </comparators>
  7588. </test>
  7589. <test> <!-- TESTED -->
  7590. <description>count: Test for hdfs:// path - multiple files using globbing</description>
  7591. <test-commands>
  7592. <command>-fs NAMENODE -touchz hdfs:///file1</command>
  7593. <command>-fs NAMENODE -touchz hdfs:///file2</command>
  7594. <command>-fs NAMENODE -touchz hdfs:///file3</command>
  7595. <command>-fs NAMENODE -touchz hdfs:///file4</command>
  7596. <command>-fs NAMENODE -count hdfs:///file*</command>
  7597. </test-commands>
  7598. <cleanup-commands>
  7599. <command>-fs NAMENODE -rm -r hdfs:///file*</command>
  7600. </cleanup-commands>
  7601. <comparators>
  7602. <comparator>
  7603. <type>RegexpComparator</type>
  7604. <expected-output>( |\t)*0( |\t)*1( |\t)*0 hdfs:///file1</expected-output>
  7605. </comparator>
  7606. <comparator>
  7607. <type>RegexpComparator</type>
  7608. <expected-output>( |\t)*0( |\t)*1( |\t)*0 hdfs:///file2</expected-output>
  7609. </comparator>
  7610. <comparator>
  7611. <type>RegexpComparator</type>
  7612. <expected-output>( |\t)*0( |\t)*1( |\t)*0 hdfs:///file3</expected-output>
  7613. </comparator>
  7614. <comparator>
  7615. <type>RegexpComparator</type>
  7616. <expected-output>( |\t)*0( |\t)*1( |\t)*0 hdfs:///file4</expected-output>
  7617. </comparator>
  7618. </comparators>
  7619. </test>
  7620. <test> <!-- TESTED -->
  7621. <description>count: Test for hdfs:// path - multiple files without globbing</description>
  7622. <test-commands>
  7623. <command>-fs NAMENODE -touchz hdfs:///file1</command>
  7624. <command>-fs NAMENODE -touchz hdfs:///file2</command>
  7625. <command>-fs NAMENODE -touchz hdfs:///file3</command>
  7626. <command>-fs NAMENODE -touchz hdfs:///file4</command>
  7627. <command>-fs NAMENODE -count hdfs:///file1 hdfs:///file2 hdfs:///file3 hdfs:///file4</command>
  7628. </test-commands>
  7629. <cleanup-commands>
  7630. <command>-fs NAMENODE -rm -r hdfs:///file*</command>
  7631. </cleanup-commands>
  7632. <comparators>
  7633. <comparator>
  7634. <type>RegexpComparator</type>
  7635. <expected-output>( |\t)*0( |\t)*1( |\t)*0 hdfs:///file1</expected-output>
  7636. </comparator>
  7637. <comparator>
  7638. <type>RegexpComparator</type>
  7639. <expected-output>( |\t)*0( |\t)*1( |\t)*0 hdfs:///file2</expected-output>
  7640. </comparator>
  7641. <comparator>
  7642. <type>RegexpComparator</type>
  7643. <expected-output>( |\t)*0( |\t)*1( |\t)*0 hdfs:///file3</expected-output>
  7644. </comparator>
  7645. <comparator>
  7646. <type>RegexpComparator</type>
  7647. <expected-output>( |\t)*0( |\t)*1( |\t)*0 hdfs:///file4</expected-output>
  7648. </comparator>
  7649. </comparators>
  7650. </test>
  7651. <test> <!-- TESTED -->
  7652. <description>count: Test for hdfs:// path - multiple directories using globbing</description>
  7653. <test-commands>
  7654. <command>-fs NAMENODE -mkdir hdfs:///dir1</command>
  7655. <command>-fs NAMENODE -mkdir hdfs:///dir2</command>
  7656. <command>-fs NAMENODE -mkdir hdfs:///dir3</command>
  7657. <command>-fs NAMENODE -mkdir hdfs:///dir4</command>
  7658. <command>-fs NAMENODE -count hdfs:///dir* </command>
  7659. </test-commands>
  7660. <cleanup-commands>
  7661. <command>-fs NAMENODE -rm -r hdfs:///dir*</command>
  7662. </cleanup-commands>
  7663. <comparators>
  7664. <comparator>
  7665. <type>RegexpComparator</type>
  7666. <expected-output>( |\t)*1( |\t)*0( |\t)*0 hdfs:///dir1</expected-output>
  7667. </comparator>
  7668. <comparator>
  7669. <type>RegexpComparator</type>
  7670. <expected-output>( |\t)*1( |\t)*0( |\t)*0 hdfs:///dir2</expected-output>
  7671. </comparator>
  7672. <comparator>
  7673. <type>RegexpComparator</type>
  7674. <expected-output>( |\t)*1( |\t)*0( |\t)*0 hdfs:///dir3</expected-output>
  7675. </comparator>
  7676. <comparator>
  7677. <type>RegexpComparator</type>
  7678. <expected-output>( |\t)*1( |\t)*0( |\t)*0 hdfs:///dir4</expected-output>
  7679. </comparator>
  7680. </comparators>
  7681. </test>
  7682. <test> <!-- TESTED -->
  7683. <description>count: Test for hdfs:// path - multiple directories without globbing</description>
  7684. <test-commands>
  7685. <command>-fs NAMENODE -mkdir hdfs:///dir1</command>
  7686. <command>-fs NAMENODE -mkdir hdfs:///dir2</command>
  7687. <command>-fs NAMENODE -mkdir hdfs:///dir3</command>
  7688. <command>-fs NAMENODE -mkdir hdfs:///dir4</command>
  7689. <command>-fs NAMENODE -count hdfs:///dir1 hdfs:///dir2 hdfs:///dir3 hdfs:///dir4 </command>
  7690. </test-commands>
  7691. <cleanup-commands>
  7692. <command>-fs NAMENODE -rm -r hdfs:///dir*</command>
  7693. </cleanup-commands>
  7694. <comparators>
  7695. <comparator>
  7696. <type>RegexpComparator</type>
  7697. <expected-output>( |\t)*1( |\t)*0( |\t)*0 hdfs:///dir1</expected-output>
  7698. </comparator>
  7699. <comparator>
  7700. <type>RegexpComparator</type>
  7701. <expected-output>( |\t)*1( |\t)*0( |\t)*0 hdfs:///dir2</expected-output>
  7702. </comparator>
  7703. <comparator>
  7704. <type>RegexpComparator</type>
  7705. <expected-output>( |\t)*1( |\t)*0( |\t)*0 hdfs:///dir3</expected-output>
  7706. </comparator>
  7707. <comparator>
  7708. <type>RegexpComparator</type>
  7709. <expected-output>( |\t)*1( |\t)*0( |\t)*0 hdfs:///dir4</expected-output>
  7710. </comparator>
  7711. </comparators>
  7712. </test>
  7713. <test> <!-- TESTED -->
  7714. <description>count: Test for file using hdfs:// path with -q option</description>
  7715. <test-commands>
  7716. <command>-fs NAMENODE -touchz hdfs:///file1</command>
  7717. <command>-fs NAMENODE -count -q hdfs:///file1</command>
  7718. </test-commands>
  7719. <cleanup-commands>
  7720. <command>-fs NAMENODE -rm hdfs:///file1</command>
  7721. </cleanup-commands>
  7722. <comparators>
  7723. <comparator>
  7724. <type>RegexpComparator</type>
  7725. <expected-output>( |\t)*none( |\t)*inf( |\t)*none( |\t)*inf( |\t)*0( |\t)*1( |\t)*0 hdfs:///file1</expected-output>
  7726. </comparator>
  7727. </comparators>
  7728. </test>
  7729. <test> <!-- TESTED -->
  7730. <description>count: Test for directory using hdfs:// path with -q option</description>
  7731. <test-commands>
  7732. <command>-fs NAMENODE -mkdir hdfs:///dir1</command>
  7733. <dfs-admin-command>-fs NAMENODE -setQuota 10 hdfs:///dir1 </dfs-admin-command>
  7734. <dfs-admin-command>-fs NAMENODE -setSpaceQuota 1m hdfs:///dir1 </dfs-admin-command>
  7735. <command>-fs NAMENODE -count -q hdfs:///dir1</command>
  7736. </test-commands>
  7737. <cleanup-commands>
  7738. <command>-fs NAMENODE -rm -r hdfs:///dir1</command>
  7739. </cleanup-commands>
  7740. <comparators>
  7741. <comparator>
  7742. <type>RegexpComparator</type>
  7743. <expected-output>( |\t)*10( |\t)*9( |\t)*1048576( |\t)*1048576( |\t)*1( |\t)*0( |\t)*0 hdfs:///dir1</expected-output>
  7744. </comparator>
  7745. </comparators>
  7746. </test>
  7747. <test> <!-- TESTED -->
  7748. <description>count: Test for hdfs:// path - file/directory that does not exist with -q option</description>
  7749. <test-commands>
  7750. <command>-fs NAMENODE -count -q hdfs:///file1 </command>
  7751. </test-commands>
  7752. <cleanup-commands>
  7753. </cleanup-commands>
  7754. <comparators>
  7755. <comparator>
  7756. <type>TokenComparator</type>
  7757. <expected-output>count: `hdfs:///file1': No such file or directory</expected-output>
  7758. </comparator>
  7759. </comparators>
  7760. </test>
  7761. <test> <!-- TESTED -->
  7762. <description>count: Test for hdfs:// path - multiple files using globbing with -q option</description>
  7763. <test-commands>
  7764. <command>-fs NAMENODE -touchz hdfs:///file1</command>
  7765. <command>-fs NAMENODE -touchz hdfs:///file2</command>
  7766. <command>-fs NAMENODE -touchz hdfs:///file3</command>
  7767. <command>-fs NAMENODE -touchz hdfs:///file4</command>
  7768. <command>-fs NAMENODE -count -q hdfs:///file*</command>
  7769. </test-commands>
  7770. <cleanup-commands>
  7771. <command>-fs NAMENODE -rm -r hdfs:///file*</command>
  7772. </cleanup-commands>
  7773. <comparators>
  7774. <comparator>
  7775. <type>RegexpComparator</type>
  7776. <expected-output>( |\t)*none( |\t)*inf( |\t)*none( |\t)*inf( |\t)*0( |\t)*1( |\t)*0 hdfs:///file1</expected-output>
  7777. </comparator>
  7778. <comparator>
  7779. <type>RegexpComparator</type>
  7780. <expected-output>( |\t)*none( |\t)*inf( |\t)*none( |\t)*inf( |\t)*0( |\t)*1( |\t)*0 hdfs:///file2</expected-output>
  7781. </comparator>
  7782. <comparator>
  7783. <type>RegexpComparator</type>
  7784. <expected-output>( |\t)*none( |\t)*inf( |\t)*none( |\t)*inf( |\t)*0( |\t)*1( |\t)*0 hdfs:///file3</expected-output>
  7785. </comparator>
  7786. <comparator>
  7787. <type>RegexpComparator</type>
  7788. <expected-output>( |\t)*none( |\t)*inf( |\t)*none( |\t)*inf( |\t)*0( |\t)*1( |\t)*0 hdfs:///file4</expected-output>
  7789. </comparator>
  7790. </comparators>
  7791. </test>
  7792. <test> <!-- TESTED -->
  7793. <description>count: Test for hdfs:// path - multiple files without globbing with -q option</description>
  7794. <test-commands>
  7795. <command>-fs NAMENODE -touchz hdfs:///file1</command>
  7796. <command>-fs NAMENODE -touchz hdfs:///file2</command>
  7797. <command>-fs NAMENODE -touchz hdfs:///file3</command>
  7798. <command>-fs NAMENODE -touchz hdfs:///file4</command>
  7799. <command>-fs NAMENODE -count -q hdfs:///file1 hdfs:///file2 hdfs:///file3 hdfs:///file4</command>
  7800. </test-commands>
  7801. <cleanup-commands>
  7802. <command>-fs NAMENODE -rm -r hdfs:///file*</command>
  7803. </cleanup-commands>
  7804. <comparators>
  7805. <comparator>
  7806. <type>RegexpComparator</type>
  7807. <expected-output>( |\t)*none( |\t)*inf( |\t)*none( |\t)*inf( |\t)*0( |\t)*1( |\t)*0 hdfs:///file1</expected-output>
  7808. </comparator>
  7809. <comparator>
  7810. <type>RegexpComparator</type>
  7811. <expected-output>( |\t)*none( |\t)*inf( |\t)*none( |\t)*inf( |\t)*0( |\t)*1( |\t)*0 hdfs:///file2</expected-output>
  7812. </comparator>
  7813. <comparator>
  7814. <type>RegexpComparator</type>
  7815. <expected-output>( |\t)*none( |\t)*inf( |\t)*none( |\t)*inf( |\t)*0( |\t)*1( |\t)*0 hdfs:///file3</expected-output>
  7816. </comparator>
  7817. <comparator>
  7818. <type>RegexpComparator</type>
  7819. <expected-output>( |\t)*none( |\t)*inf( |\t)*none( |\t)*inf( |\t)*0( |\t)*1( |\t)*0 hdfs:///file4</expected-output>
  7820. </comparator>
  7821. </comparators>
  7822. </test>
  7823. <test> <!-- TESTED -->
  7824. <description>count: Test for hdfs:// path - multiple directories using globbing with -q option</description>
  7825. <test-commands>
  7826. <command>-fs NAMENODE -mkdir hdfs:///dir1</command>
  7827. <command>-fs NAMENODE -mkdir hdfs:///dir2</command>
  7828. <command>-fs NAMENODE -mkdir hdfs:///dir3</command>
  7829. <command>-fs NAMENODE -mkdir hdfs:///dir4</command>
  7830. <dfs-admin-command>-fs NAMENODE -setQuota 10 hdfs:///dir1 </dfs-admin-command>
  7831. <dfs-admin-command>-fs NAMENODE -setSpaceQuota 1m hdfs:///dir1 </dfs-admin-command>
  7832. <dfs-admin-command>-fs NAMENODE -setQuota 10 hdfs:///dir2 </dfs-admin-command>
  7833. <dfs-admin-command>-fs NAMENODE -setSpaceQuota 1m hdfs:///dir2 </dfs-admin-command>
  7834. <dfs-admin-command>-fs NAMENODE -setQuota 10 hdfs:///dir3 </dfs-admin-command>
  7835. <dfs-admin-command>-fs NAMENODE -setSpaceQuota 1m hdfs:///dir3 </dfs-admin-command>
  7836. <dfs-admin-command>-fs NAMENODE -setQuota 10 hdfs:///dir4 </dfs-admin-command>
  7837. <dfs-admin-command>-fs NAMENODE -setSpaceQuota 1m hdfs:///dir4 </dfs-admin-command>
  7838. <command>-fs NAMENODE -count -q hdfs:///dir* </command>
  7839. </test-commands>
  7840. <cleanup-commands>
  7841. <command>-fs NAMENODE -rm -r hdfs:///dir*</command>
  7842. </cleanup-commands>
  7843. <comparators>
  7844. <comparator>
  7845. <type>RegexpComparator</type>
  7846. <expected-output>( |\t)*10( |\t)*9( |\t)*1048576( |\t)*1048576( |\t)*1( |\t)*0( |\t)*0 hdfs:///dir1</expected-output>
  7847. </comparator>
  7848. <comparator>
  7849. <type>RegexpComparator</type>
  7850. <expected-output>( |\t)*10( |\t)*9( |\t)*1048576( |\t)*1048576( |\t)*1( |\t)*0( |\t)*0 hdfs:///dir2</expected-output>
  7851. </comparator>
  7852. <comparator>
  7853. <type>RegexpComparator</type>
  7854. <expected-output>( |\t)*10( |\t)*9( |\t)*1048576( |\t)*1048576( |\t)*1( |\t)*0( |\t)*0 hdfs:///dir3</expected-output>
  7855. </comparator>
  7856. <comparator>
  7857. <type>RegexpComparator</type>
  7858. <expected-output>( |\t)*10( |\t)*9( |\t)*1048576( |\t)*1048576( |\t)*1( |\t)*0( |\t)*0 hdfs:///dir4</expected-output>
  7859. </comparator>
  7860. </comparators>
  7861. </test>
  7862. <test> <!-- TESTED -->
  7863. <description>count: Test for hdfs:// path - multiple directories without globbing with -q option</description>
  7864. <test-commands>
  7865. <command>-fs NAMENODE -mkdir hdfs:///dir1</command>
  7866. <command>-fs NAMENODE -mkdir hdfs:///dir2</command>
  7867. <command>-fs NAMENODE -mkdir hdfs:///dir3</command>
  7868. <command>-fs NAMENODE -mkdir hdfs:///dir4</command>
  7869. <dfs-admin-command>-fs NAMENODE -setQuota 10 hdfs:///dir1 </dfs-admin-command>
  7870. <dfs-admin-command>-fs NAMENODE -setSpaceQuota 1m hdfs:///dir1 </dfs-admin-command>
  7871. <dfs-admin-command>-fs NAMENODE -setQuota 10 hdfs:///dir2 </dfs-admin-command>
  7872. <dfs-admin-command>-fs NAMENODE -setSpaceQuota 1m hdfs:///dir2 </dfs-admin-command>
  7873. <dfs-admin-command>-fs NAMENODE -setQuota 10 hdfs:///dir3 </dfs-admin-command>
  7874. <dfs-admin-command>-fs NAMENODE -setSpaceQuota 1m hdfs:///dir3 </dfs-admin-command>
  7875. <dfs-admin-command>-fs NAMENODE -setQuota 10 hdfs:///dir4 </dfs-admin-command>
  7876. <dfs-admin-command>-fs NAMENODE -setSpaceQuota 1m hdfs:///dir4 </dfs-admin-command>
  7877. <command>-fs NAMENODE -count -q hdfs:///dir1 hdfs:///dir2 hdfs:///dir3 hdfs:///dir4 </command>
  7878. </test-commands>
  7879. <cleanup-commands>
  7880. <command>-fs NAMENODE -rm -r /dir*</command>
  7881. </cleanup-commands>
  7882. <comparators>
  7883. <comparator>
  7884. <type>RegexpComparator</type>
  7885. <expected-output>( |\t)*10( |\t)*9( |\t)*1048576( |\t)*1048576( |\t)*1( |\t)*0( |\t)*0 hdfs:///dir1</expected-output>
  7886. </comparator>
  7887. <comparator>
  7888. <type>RegexpComparator</type>
  7889. <expected-output>( |\t)*10( |\t)*9( |\t)*1048576( |\t)*1048576( |\t)*1( |\t)*0( |\t)*0 hdfs:///dir2</expected-output>
  7890. </comparator>
  7891. <comparator>
  7892. <type>RegexpComparator</type>
  7893. <expected-output>( |\t)*10( |\t)*9( |\t)*1048576( |\t)*1048576( |\t)*1( |\t)*0( |\t)*0 hdfs:///dir3</expected-output>
  7894. </comparator>
  7895. <comparator>
  7896. <type>RegexpComparator</type>
  7897. <expected-output>( |\t)*10( |\t)*9( |\t)*1048576( |\t)*1048576( |\t)*1( |\t)*0( |\t)*0 hdfs:///dir4</expected-output>
  7898. </comparator>
  7899. </comparators>
  7900. </test>
  7901. <test> <!-- TESTED -->
  7902. <description>count: Test for file using Namenode's path</description>
  7903. <test-commands>
  7904. <command>-fs NAMENODE -touchz NAMENODE/file1</command>
  7905. <command>-fs NAMENODE -count NAMENODE/file1</command>
  7906. </test-commands>
  7907. <cleanup-commands>
  7908. <command>-fs NAMENODE -rm NAMENODE/file1</command>
  7909. </cleanup-commands>
  7910. <comparators>
  7911. <comparator>
  7912. <type>RegexpComparator</type>
  7913. <expected-output>( |\t)*0( |\t)*1( |\t)*0 NAMENODE/file1</expected-output>
  7914. </comparator>
  7915. </comparators>
  7916. </test>
  7917. <test> <!-- TESTED -->
  7918. <description>count: Test for directory using Namenode's path</description>
  7919. <test-commands>
  7920. <command>-fs NAMENODE -mkdir NAMENODE/dir1</command>
  7921. <command>-fs NAMENODE -count NAMENODE/dir1</command>
  7922. </test-commands>
  7923. <cleanup-commands>
  7924. <command>-fs NAMENODE -rm -r NAMENODE/dir1</command>
  7925. </cleanup-commands>
  7926. <comparators>
  7927. <comparator>
  7928. <type>RegexpComparator</type>
  7929. <expected-output>( |\t)*1( |\t)*0( |\t)*0 NAMENODE/dir1</expected-output>
  7930. </comparator>
  7931. </comparators>
  7932. </test>
  7933. <test> <!-- TESTED -->
  7934. <description>count: Test for Namenode's path - file/directory that does not exist</description>
  7935. <test-commands>
  7936. <command>-fs NAMENODE -count NAMENODE/file1 </command>
  7937. </test-commands>
  7938. <cleanup-commands>
  7939. </cleanup-commands>
  7940. <comparators>
  7941. <comparator>
  7942. <type>RegexpComparator</type>
  7943. <expected-output>count: `NAMENODE/file1': No such file or directory</expected-output>
  7944. </comparator>
  7945. </comparators>
  7946. </test>
  7947. <test> <!-- TESTED -->
  7948. <description>count: Test for Namenode's path - multiple files using globbing</description>
  7949. <test-commands>
  7950. <command>-fs NAMENODE -touchz NAMENODE/file1</command>
  7951. <command>-fs NAMENODE -touchz NAMENODE/file2</command>
  7952. <command>-fs NAMENODE -touchz NAMENODE/file3</command>
  7953. <command>-fs NAMENODE -touchz NAMENODE/file4</command>
  7954. <command>-fs NAMENODE -count NAMENODE/file*</command>
  7955. </test-commands>
  7956. <cleanup-commands>
  7957. <command>-fs NAMENODE -rm -r NAMENODE/file*</command>
  7958. </cleanup-commands>
  7959. <comparators>
  7960. <comparator>
  7961. <type>RegexpComparator</type>
  7962. <expected-output>( |\t)*0( |\t)*1( |\t)*0 NAMENODE/file1</expected-output>
  7963. </comparator>
  7964. <comparator>
  7965. <type>RegexpComparator</type>
  7966. <expected-output>( |\t)*0( |\t)*1( |\t)*0 NAMENODE/file2</expected-output>
  7967. </comparator>
  7968. <comparator>
  7969. <type>RegexpComparator</type>
  7970. <expected-output>( |\t)*0( |\t)*1( |\t)*0 NAMENODE/file3</expected-output>
  7971. </comparator>
  7972. <comparator>
  7973. <type>RegexpComparator</type>
  7974. <expected-output>( |\t)*0( |\t)*1( |\t)*0 NAMENODE/file4</expected-output>
  7975. </comparator>
  7976. </comparators>
  7977. </test>
  7978. <test> <!-- TESTED -->
  7979. <description>count: Test for Namenode's path - multiple files without globbing</description>
  7980. <test-commands>
  7981. <command>-fs NAMENODE -touchz NAMENODE/file1</command>
  7982. <command>-fs NAMENODE -touchz NAMENODE/file2</command>
  7983. <command>-fs NAMENODE -touchz NAMENODE/file3</command>
  7984. <command>-fs NAMENODE -touchz NAMENODE/file4</command>
  7985. <command>-fs NAMENODE -count NAMENODE/file1 NAMENODE/file2 NAMENODE/file3 NAMENODE/file4</command>
  7986. </test-commands>
  7987. <cleanup-commands>
  7988. <command>-fs NAMENODE -rm -r NAMENODE/file*</command>
  7989. </cleanup-commands>
  7990. <comparators>
  7991. <comparator>
  7992. <type>RegexpComparator</type>
  7993. <expected-output>( |\t)*0( |\t)*1( |\t)*0 NAMENODE/file1</expected-output>
  7994. </comparator>
  7995. <comparator>
  7996. <type>RegexpComparator</type>
  7997. <expected-output>( |\t)*0( |\t)*1( |\t)*0 NAMENODE/file2</expected-output>
  7998. </comparator>
  7999. <comparator>
  8000. <type>RegexpComparator</type>
  8001. <expected-output>( |\t)*0( |\t)*1( |\t)*0 NAMENODE/file3</expected-output>
  8002. </comparator>
  8003. <comparator>
  8004. <type>RegexpComparator</type>
  8005. <expected-output>( |\t)*0( |\t)*1( |\t)*0 NAMENODE/file4</expected-output>
  8006. </comparator>
  8007. </comparators>
  8008. </test>
  8009. <test> <!-- TESTED -->
  8010. <description>count: Test for Namenode's path - multiple directories using globbing</description>
  8011. <test-commands>
  8012. <command>-fs NAMENODE -mkdir NAMENODE/dir1</command>
  8013. <command>-fs NAMENODE -mkdir NAMENODE/dir2</command>
  8014. <command>-fs NAMENODE -mkdir NAMENODE/dir3</command>
  8015. <command>-fs NAMENODE -mkdir NAMENODE/dir4</command>
  8016. <command>-fs NAMENODE -count NAMENODE/dir* </command>
  8017. </test-commands>
  8018. <cleanup-commands>
  8019. <command>-fs NAMENODE -rm -r NAMENODE/dir*</command>
  8020. </cleanup-commands>
  8021. <comparators>
  8022. <comparator>
  8023. <type>RegexpComparator</type>
  8024. <expected-output>( |\t)*1( |\t)*0( |\t)*0 NAMENODE/dir1</expected-output>
  8025. </comparator>
  8026. <comparator>
  8027. <type>RegexpComparator</type>
  8028. <expected-output>( |\t)*1( |\t)*0( |\t)*0 NAMENODE/dir2</expected-output>
  8029. </comparator>
  8030. <comparator>
  8031. <type>RegexpComparator</type>
  8032. <expected-output>( |\t)*1( |\t)*0( |\t)*0 NAMENODE/dir3</expected-output>
  8033. </comparator>
  8034. <comparator>
  8035. <type>RegexpComparator</type>
  8036. <expected-output>( |\t)*1( |\t)*0( |\t)*0 NAMENODE/dir4</expected-output>
  8037. </comparator>
  8038. </comparators>
  8039. </test>
  8040. <test> <!-- TESTED -->
  8041. <description>count: Test for Namenode's path - multiple directories without globbing</description>
  8042. <test-commands>
  8043. <command>-fs NAMENODE -mkdir NAMENODE/dir1</command>
  8044. <command>-fs NAMENODE -mkdir NAMENODE/dir2</command>
  8045. <command>-fs NAMENODE -mkdir NAMENODE/dir3</command>
  8046. <command>-fs NAMENODE -mkdir NAMENODE/dir4</command>
  8047. <command>-fs NAMENODE -count NAMENODE/dir1 NAMENODE/dir2 NAMENODE/dir3 NAMENODE/dir4 </command>
  8048. </test-commands>
  8049. <cleanup-commands>
  8050. <command>-fs NAMENODE -rm -r NAMENODE/dir*</command>
  8051. </cleanup-commands>
  8052. <comparators>
  8053. <comparator>
  8054. <type>RegexpComparator</type>
  8055. <expected-output>( |\t)*1( |\t)*0( |\t)*0 NAMENODE/dir1</expected-output>
  8056. </comparator>
  8057. <comparator>
  8058. <type>RegexpComparator</type>
  8059. <expected-output>( |\t)*1( |\t)*0( |\t)*0 NAMENODE/dir2</expected-output>
  8060. </comparator>
  8061. <comparator>
  8062. <type>RegexpComparator</type>
  8063. <expected-output>( |\t)*1( |\t)*0( |\t)*0 NAMENODE/dir3</expected-output>
  8064. </comparator>
  8065. <comparator>
  8066. <type>RegexpComparator</type>
  8067. <expected-output>( |\t)*1( |\t)*0( |\t)*0 NAMENODE/dir4</expected-output>
  8068. </comparator>
  8069. </comparators>
  8070. </test>
  8071. <test> <!-- TESTED -->
  8072. <description>count: Test for file using Namenode's path with -q option</description>
  8073. <test-commands>
  8074. <command>-fs NAMENODE -touchz NAMENODE/file1</command>
  8075. <command>-fs NAMENODE -count -q NAMENODE/file1</command>
  8076. </test-commands>
  8077. <cleanup-commands>
  8078. <command>-fs NAMENODE -rm NAMENODE/file1</command>
  8079. </cleanup-commands>
  8080. <comparators>
  8081. <comparator>
  8082. <type>RegexpComparator</type>
  8083. <expected-output>( |\t)*none( |\t)*inf( |\t)*none( |\t)*inf( |\t)*0( |\t)*1( |\t)*0 NAMENODE/file1</expected-output>
  8084. </comparator>
  8085. </comparators>
  8086. </test>
  8087. <test> <!-- TESTED -->
  8088. <description>count: Test for directory using Namenode's path with -q option</description>
  8089. <test-commands>
  8090. <command>-fs NAMENODE -mkdir NAMENODE/dir1</command>
  8091. <dfs-admin-command>-fs NAMENODE -setQuota 10 NAMENODE/dir1 </dfs-admin-command>
  8092. <dfs-admin-command>-fs NAMENODE -setSpaceQuota 1m NAMENODE/dir1 </dfs-admin-command>
  8093. <command>-fs NAMENODE -count -q NAMENODE/dir1</command>
  8094. </test-commands>
  8095. <cleanup-commands>
  8096. <command>-fs NAMENODE -rm -r NAMENODE/dir1</command>
  8097. </cleanup-commands>
  8098. <comparators>
  8099. <comparator>
  8100. <type>RegexpComparator</type>
  8101. <expected-output>( |\t)*10( |\t)*9( |\t)*1048576( |\t)*1048576( |\t)*1( |\t)*0( |\t)*0 NAMENODE/dir1</expected-output>
  8102. </comparator>
  8103. </comparators>
  8104. </test>
  8105. <test> <!-- TESTED -->
  8106. <description>count: Test for Namenode's path - file/directory that does not exist with -q option</description>
  8107. <test-commands>
  8108. <command>-fs NAMENODE -count -q NAMENODE/file1 </command>
  8109. </test-commands>
  8110. <cleanup-commands>
  8111. </cleanup-commands>
  8112. <comparators>
  8113. <comparator>
  8114. <type>RegexpComparator</type>
  8115. <expected-output>count: `NAMENODE/file1': No such file or directory</expected-output>
  8116. </comparator>
  8117. </comparators>
  8118. </test>
  8119. <test> <!-- TESTED -->
  8120. <description>count: Test for Namenode's path - multiple files using globbing with -q option</description>
  8121. <test-commands>
  8122. <command>-fs NAMENODE -touchz NAMENODE/file1</command>
  8123. <command>-fs NAMENODE -touchz NAMENODE/file2</command>
  8124. <command>-fs NAMENODE -touchz NAMENODE/file3</command>
  8125. <command>-fs NAMENODE -touchz NAMENODE/file4</command>
  8126. <command>-fs NAMENODE -count -q NAMENODE/file*</command>
  8127. </test-commands>
  8128. <cleanup-commands>
  8129. <command>-fs NAMENODE -rm -r NAMENODE/file*</command>
  8130. </cleanup-commands>
  8131. <comparators>
  8132. <comparator>
  8133. <type>RegexpComparator</type>
  8134. <expected-output>( |\t)*none( |\t)*inf( |\t)*none( |\t)*inf( |\t)*0( |\t)*1( |\t)*0 NAMENODE/file1</expected-output>
  8135. </comparator>
  8136. <comparator>
  8137. <type>RegexpComparator</type>
  8138. <expected-output>( |\t)*none( |\t)*inf( |\t)*none( |\t)*inf( |\t)*0( |\t)*1( |\t)*0 NAMENODE/file2</expected-output>
  8139. </comparator>
  8140. <comparator>
  8141. <type>RegexpComparator</type>
  8142. <expected-output>( |\t)*none( |\t)*inf( |\t)*none( |\t)*inf( |\t)*0( |\t)*1( |\t)*0 NAMENODE/file3</expected-output>
  8143. </comparator>
  8144. <comparator>
  8145. <type>RegexpComparator</type>
  8146. <expected-output>( |\t)*none( |\t)*inf( |\t)*none( |\t)*inf( |\t)*0( |\t)*1( |\t)*0 NAMENODE/file4</expected-output>
  8147. </comparator>
  8148. </comparators>
  8149. </test>
  8150. <test> <!-- TESTED -->
  8151. <description>count: Test for Namenode's path - multiple files without globbing with -q option</description>
  8152. <test-commands>
  8153. <command>-fs NAMENODE -touchz NAMENODE/file1</command>
  8154. <command>-fs NAMENODE -touchz NAMENODE/file2</command>
  8155. <command>-fs NAMENODE -touchz NAMENODE/file3</command>
  8156. <command>-fs NAMENODE -touchz NAMENODE/file4</command>
  8157. <command>-fs NAMENODE -count -q NAMENODE/file1 NAMENODE/file2 NAMENODE/file3 NAMENODE/file4</command>
  8158. </test-commands>
  8159. <cleanup-commands>
  8160. <command>-fs NAMENODE -rm -r NAMENODE/file*</command>
  8161. </cleanup-commands>
  8162. <comparators>
  8163. <comparator>
  8164. <type>RegexpComparator</type>
  8165. <expected-output>( |\t)*none( |\t)*inf( |\t)*none( |\t)*inf( |\t)*0( |\t)*1( |\t)*0 NAMENODE/file1</expected-output>
  8166. </comparator>
  8167. <comparator>
  8168. <type>RegexpComparator</type>
  8169. <expected-output>( |\t)*none( |\t)*inf( |\t)*none( |\t)*inf( |\t)*0( |\t)*1( |\t)*0 NAMENODE/file2</expected-output>
  8170. </comparator>
  8171. <comparator>
  8172. <type>RegexpComparator</type>
  8173. <expected-output>( |\t)*none( |\t)*inf( |\t)*none( |\t)*inf( |\t)*0( |\t)*1( |\t)*0 NAMENODE/file3</expected-output>
  8174. </comparator>
  8175. <comparator>
  8176. <type>RegexpComparator</type>
  8177. <expected-output>( |\t)*none( |\t)*inf( |\t)*none( |\t)*inf( |\t)*0( |\t)*1( |\t)*0 NAMENODE/file4</expected-output>
  8178. </comparator>
  8179. </comparators>
  8180. </test>
  8181. <test> <!-- TESTED -->
  8182. <description>count: Test for Namenode's path - multiple directories using globbing with -q option</description>
  8183. <test-commands>
  8184. <command>-fs NAMENODE -mkdir NAMENODE/dir1</command>
  8185. <command>-fs NAMENODE -mkdir NAMENODE/dir2</command>
  8186. <command>-fs NAMENODE -mkdir NAMENODE/dir3</command>
  8187. <command>-fs NAMENODE -mkdir NAMENODE/dir4</command>
  8188. <dfs-admin-command>-fs NAMENODE -setQuota 10 NAMENODE/dir1 </dfs-admin-command>
  8189. <dfs-admin-command>-fs NAMENODE -setSpaceQuota 1m NAMENODE/dir1 </dfs-admin-command>
  8190. <dfs-admin-command>-fs NAMENODE -setQuota 10 NAMENODE/dir2 </dfs-admin-command>
  8191. <dfs-admin-command>-fs NAMENODE -setSpaceQuota 1m NAMENODE/dir2 </dfs-admin-command>
  8192. <dfs-admin-command>-fs NAMENODE -setQuota 10 NAMENODE/dir3 </dfs-admin-command>
  8193. <dfs-admin-command>-fs NAMENODE -setSpaceQuota 1m NAMENODE/dir3 </dfs-admin-command>
  8194. <dfs-admin-command>-fs NAMENODE -setQuota 10 NAMENODE/dir4 </dfs-admin-command>
  8195. <dfs-admin-command>-fs NAMENODE -setSpaceQuota 1m NAMENODE/dir4 </dfs-admin-command>
  8196. <command>-fs NAMENODE -count -q NAMENODE/dir* </command>
  8197. </test-commands>
  8198. <cleanup-commands>
  8199. <command>-fs NAMENODE -rm -r NAMENODE/dir*</command>
  8200. </cleanup-commands>
  8201. <comparators>
  8202. <comparator>
  8203. <type>RegexpComparator</type>
  8204. <expected-output>( |\t)*10( |\t)*9( |\t)*1048576( |\t)*1048576( |\t)*1( |\t)*0( |\t)*0 NAMENODE/dir1</expected-output>
  8205. </comparator>
  8206. <comparator>
  8207. <type>RegexpComparator</type>
  8208. <expected-output>( |\t)*10( |\t)*9( |\t)*1048576( |\t)*1048576( |\t)*1( |\t)*0( |\t)*0 NAMENODE/dir2</expected-output>
  8209. </comparator>
  8210. <comparator>
  8211. <type>RegexpComparator</type>
  8212. <expected-output>( |\t)*10( |\t)*9( |\t)*1048576( |\t)*1048576( |\t)*1( |\t)*0( |\t)*0 NAMENODE/dir3</expected-output>
  8213. </comparator>
  8214. <comparator>
  8215. <type>RegexpComparator</type>
  8216. <expected-output>( |\t)*10( |\t)*9( |\t)*1048576( |\t)*1048576( |\t)*1( |\t)*0( |\t)*0 NAMENODE/dir4</expected-output>
  8217. </comparator>
  8218. </comparators>
  8219. </test>
  8220. <test> <!-- TESTED -->
  8221. <description>count: Test for Namenode's path - multiple directories without globbing with -q option</description>
  8222. <test-commands>
  8223. <command>-fs NAMENODE -mkdir NAMENODE/dir1</command>
  8224. <command>-fs NAMENODE -mkdir NAMENODE/dir2</command>
  8225. <command>-fs NAMENODE -mkdir NAMENODE/dir3</command>
  8226. <command>-fs NAMENODE -mkdir NAMENODE/dir4</command>
  8227. <dfs-admin-command>-fs NAMENODE -setQuota 10 NAMENODE/dir1 </dfs-admin-command>
  8228. <dfs-admin-command>-fs NAMENODE -setSpaceQuota 1m NAMENODE/dir1 </dfs-admin-command>
  8229. <dfs-admin-command>-fs NAMENODE -setQuota 10 NAMENODE/dir2 </dfs-admin-command>
  8230. <dfs-admin-command>-fs NAMENODE -setSpaceQuota 1m NAMENODE/dir2 </dfs-admin-command>
  8231. <dfs-admin-command>-fs NAMENODE -setQuota 10 NAMENODE/dir3 </dfs-admin-command>
  8232. <dfs-admin-command>-fs NAMENODE -setSpaceQuota 1m NAMENODE/dir3 </dfs-admin-command>
  8233. <dfs-admin-command>-fs NAMENODE -setQuota 10 NAMENODE/dir4 </dfs-admin-command>
  8234. <dfs-admin-command>-fs NAMENODE -setSpaceQuota 1m NAMENODE/dir4 </dfs-admin-command>
  8235. <command>-fs NAMENODE -count -q NAMENODE/dir1 NAMENODE/dir2 NAMENODE/dir3 NAMENODE/dir4 </command>
  8236. </test-commands>
  8237. <cleanup-commands>
  8238. <command>-fs NAMENODE -rm -r NAMENODE/dir*</command>
  8239. </cleanup-commands>
  8240. <comparators>
  8241. <comparator>
  8242. <type>RegexpComparator</type>
  8243. <expected-output>( |\t)*10( |\t)*9( |\t)*1048576( |\t)*1048576( |\t)*1( |\t)*0( |\t)*0 NAMENODE/dir1</expected-output>
  8244. </comparator>
  8245. <comparator>
  8246. <type>RegexpComparator</type>
  8247. <expected-output>( |\t)*10( |\t)*9( |\t)*1048576( |\t)*1048576( |\t)*1( |\t)*0( |\t)*0 NAMENODE/dir2</expected-output>
  8248. </comparator>
  8249. <comparator>
  8250. <type>RegexpComparator</type>
  8251. <expected-output>( |\t)*10( |\t)*9( |\t)*1048576( |\t)*1048576( |\t)*1( |\t)*0( |\t)*0 NAMENODE/dir3</expected-output>
  8252. </comparator>
  8253. <comparator>
  8254. <type>RegexpComparator</type>
  8255. <expected-output>( |\t)*10( |\t)*9( |\t)*1048576( |\t)*1048576( |\t)*1( |\t)*0( |\t)*0 NAMENODE/dir4</expected-output>
  8256. </comparator>
  8257. </comparators>
  8258. </test>
  8259. <test> <!-- TESTED -->
  8260. <description>count: file using -h option</description>
  8261. <test-commands>
  8262. <command>-fs NAMENODE -mkdir -p dir</command> <!-- make sure user home dir exists -->
  8263. <command>-fs NAMENODE -put CLITEST_DATA/data15bytes file1</command>
  8264. <command>-fs NAMENODE -put CLITEST_DATA/data1k file2</command>
  8265. <command>-fs NAMENODE -count -h file1 file2</command>
  8266. </test-commands>
  8267. <cleanup-commands>
  8268. <command>-fs NAMENODE -rm file1 file2</command>
  8269. </cleanup-commands>
  8270. <comparators>
  8271. <comparator>
  8272. <type>RegexpComparator</type>
  8273. <expected-output>( |\t)*0( |\t)*1( |\t)*15 file1</expected-output>
  8274. </comparator>
  8275. </comparators>
  8276. <comparators>
  8277. <comparator>
  8278. <type>RegexpComparator</type>
  8279. <expected-output>( |\t)*0( |\t)*1( |\t)*1\.0 K file2</expected-output>
  8280. </comparator>
  8281. </comparators>
  8282. </test>
  8283. <test> <!-- TESTED -->
  8284. <description>count: directory using -q and -h options</description>
  8285. <test-commands>
  8286. <command>-fs NAMENODE -mkdir /dir1</command>
  8287. <dfs-admin-command>-fs NAMENODE -setQuota 10 /dir1 </dfs-admin-command>
  8288. <dfs-admin-command>-fs NAMENODE -setSpaceQuota 1m /dir1 </dfs-admin-command>
  8289. <command>-fs NAMENODE -count -q -h /dir1</command>
  8290. </test-commands>
  8291. <cleanup-commands>
  8292. <command>-fs NAMENODE -rm -r /dir1</command>
  8293. </cleanup-commands>
  8294. <comparators>
  8295. <comparator>
  8296. <type>RegexpComparator</type>
  8297. <expected-output>( |\t)*10( |\t)*9( |\t)*1 M( |\t)*1 M( |\t)*1( |\t)*0( |\t)*0 /dir1</expected-output>
  8298. </comparator>
  8299. </comparators>
  8300. </test>
  8301. <!-- Tests for chmod -->
  8302. <test> <!-- TESTED -->
  8303. <description>chmod: change permission(octal mode) of file in absolute path</description>
  8304. <test-commands>
  8305. <command>-fs NAMENODE -touchz /file1</command>
  8306. <command>-fs NAMENODE -chmod 777 /file1</command>
  8307. <command>-fs NAMENODE -ls /file1</command>
  8308. </test-commands>
  8309. <cleanup-commands>
  8310. <command>-fs NAMENODE -rm /file1</command>
  8311. </cleanup-commands>
  8312. <comparators>
  8313. <comparator>
  8314. <type>RegexpComparator</type>
  8315. <expected-output>^-rwxrwxrwx( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/file1</expected-output>
  8316. </comparator>
  8317. </comparators>
  8318. </test>
  8319. <test> <!-- TESTED -->
  8320. <description>chmod: change permission(octal mode) of file in relative path</description>
  8321. <test-commands>
  8322. <command>-fs NAMENODE -mkdir -p dir</command> <!-- make sure user home dir exists -->
  8323. <command>-fs NAMENODE -touchz file1</command>
  8324. <command>-fs NAMENODE -chmod 666 file1</command>
  8325. <command>-fs NAMENODE -ls file1</command>
  8326. </test-commands>
  8327. <cleanup-commands>
  8328. <command>-fs NAMENODE -rm file1</command>
  8329. </cleanup-commands>
  8330. <comparators>
  8331. <comparator>
  8332. <type>RegexpComparator</type>
  8333. <expected-output>^-rw-rw-rw-( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*file1</expected-output>
  8334. </comparator>
  8335. </comparators>
  8336. </test>
  8337. <test> <!-- TESTED -->
  8338. <description>chmod: change permission(octal mode) of directory in absolute path</description>
  8339. <test-commands>
  8340. <command>-fs NAMENODE -mkdir /dir0</command>
  8341. <command>-fs NAMENODE -mkdir /dir0/dir1</command>
  8342. <command>-fs NAMENODE -touchz /dir0/file0</command>
  8343. <command>-fs NAMENODE -touchz /dir0/dir1/file1</command>
  8344. <command>-fs NAMENODE -touchz /dir0/dir1/file2</command>
  8345. <command>-fs NAMENODE -chmod 777 /dir0/dir1</command>
  8346. <command>-fs NAMENODE -ls -R /dir0</command>
  8347. </test-commands>
  8348. <cleanup-commands>
  8349. <command>-fs NAMENODE -rm -r /dir0</command>
  8350. </cleanup-commands>
  8351. <comparators>
  8352. <comparator>
  8353. <type>RegexpComparator</type>
  8354. <expected-output>^drwxrwxrwx( )*-( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1</expected-output>
  8355. </comparator>
  8356. <comparator>
  8357. <type>RegexpComparator</type>
  8358. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1/file1</expected-output>
  8359. </comparator>
  8360. <comparator>
  8361. <type>RegexpComparator</type>
  8362. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1/file2</expected-output>
  8363. </comparator>
  8364. <comparator>
  8365. <type>RegexpComparator</type>
  8366. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/file0</expected-output>
  8367. </comparator>
  8368. </comparators>
  8369. </test>
  8370. <test> <!-- TESTED -->
  8371. <description>chmod: change permission(octal mode) of directory in relative path</description>
  8372. <test-commands>
  8373. <command>-fs NAMENODE -mkdir -p dir0</command>
  8374. <command>-fs NAMENODE -mkdir -p dir0/dir1</command>
  8375. <command>-fs NAMENODE -touchz dir0/file0</command>
  8376. <command>-fs NAMENODE -touchz dir0/dir1/file1</command>
  8377. <command>-fs NAMENODE -touchz dir0/dir1/file2</command>
  8378. <command>-fs NAMENODE -chmod 777 dir0/dir1</command>
  8379. <command>-fs NAMENODE -ls -R dir0</command>
  8380. </test-commands>
  8381. <cleanup-commands>
  8382. <command>-fs NAMENODE -rm -r dir0</command>
  8383. </cleanup-commands>
  8384. <comparators>
  8385. <comparator>
  8386. <type>RegexpComparator</type>
  8387. <expected-output>^drwxrwxrwx( )*-( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/dir1</expected-output>
  8388. </comparator>
  8389. <comparator>
  8390. <type>RegexpComparator</type>
  8391. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/dir1/file1</expected-output>
  8392. </comparator>
  8393. <comparator>
  8394. <type>RegexpComparator</type>
  8395. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/dir1/file2</expected-output>
  8396. </comparator>
  8397. <comparator>
  8398. <type>RegexpComparator</type>
  8399. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/file0</expected-output>
  8400. </comparator>
  8401. </comparators>
  8402. </test>
  8403. <test> <!-- TESTED -->
  8404. <description>chmod: change permission(normal mode) of file in absolute path</description>
  8405. <test-commands>
  8406. <command>-fs NAMENODE -touchz /file1</command>
  8407. <command>-fs NAMENODE -chmod a+rw /file1</command>
  8408. <command>-fs NAMENODE -ls /file1</command>
  8409. </test-commands>
  8410. <cleanup-commands>
  8411. <command>-fs NAMENODE -rm /file1</command>
  8412. </cleanup-commands>
  8413. <comparators>
  8414. <comparator>
  8415. <type>RegexpComparator</type>
  8416. <expected-output>^-rw-rw-rw-( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/file1</expected-output>
  8417. </comparator>
  8418. </comparators>
  8419. </test>
  8420. <test> <!-- TESTED -->
  8421. <description>chmod: change permission(normal mode) of file in relative path</description>
  8422. <test-commands>
  8423. <command>-fs NAMENODE -touchz file1</command>
  8424. <command>-fs NAMENODE -chmod a+rw file1</command>
  8425. <command>-fs NAMENODE -ls file1</command>
  8426. </test-commands>
  8427. <cleanup-commands>
  8428. <command>-fs NAMENODE -rm file1</command>
  8429. </cleanup-commands>
  8430. <comparators>
  8431. <comparator>
  8432. <type>RegexpComparator</type>
  8433. <expected-output>^-rw-rw-rw-( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*file1</expected-output>
  8434. </comparator>
  8435. </comparators>
  8436. </test>
  8437. <test> <!-- TESTED -->
  8438. <description>chmod: change permission(normal mode) of directory in absolute path</description>
  8439. <test-commands>
  8440. <command>-fs NAMENODE -mkdir /dir0</command>
  8441. <command>-fs NAMENODE -mkdir /dir0/dir1</command>
  8442. <command>-fs NAMENODE -touchz /dir0/file0</command>
  8443. <command>-fs NAMENODE -touchz /dir0/dir1/file1</command>
  8444. <command>-fs NAMENODE -touchz /dir0/dir1/file2</command>
  8445. <command>-fs NAMENODE -chmod a+rwx /dir0/dir1</command>
  8446. <command>-fs NAMENODE -ls -R /dir0</command>
  8447. </test-commands>
  8448. <cleanup-commands>
  8449. <command>-fs NAMENODE -rm -r /dir0</command>
  8450. </cleanup-commands>
  8451. <comparators>
  8452. <comparator>
  8453. <type>RegexpComparator</type>
  8454. <expected-output>^drwxrwxrwx( )*-( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1</expected-output>
  8455. </comparator>
  8456. <comparator>
  8457. <type>RegexpComparator</type>
  8458. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1/file1</expected-output>
  8459. </comparator>
  8460. <comparator>
  8461. <type>RegexpComparator</type>
  8462. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1/file2</expected-output>
  8463. </comparator>
  8464. <comparator>
  8465. <type>RegexpComparator</type>
  8466. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/file0</expected-output>
  8467. </comparator>
  8468. </comparators>
  8469. </test>
  8470. <test> <!-- TESTED -->
  8471. <description>chmod: change permission(normal mode) of directory in relative path</description>
  8472. <test-commands>
  8473. <command>-fs NAMENODE -mkdir -p dir0</command>
  8474. <command>-fs NAMENODE -mkdir -p dir0/dir1</command>
  8475. <command>-fs NAMENODE -touchz dir0/file0</command>
  8476. <command>-fs NAMENODE -touchz dir0/dir1/file1</command>
  8477. <command>-fs NAMENODE -touchz dir0/dir1/file2</command>
  8478. <command>-fs NAMENODE -chmod a+rwx dir0/dir1</command>
  8479. <command>-fs NAMENODE -ls -R dir0</command>
  8480. </test-commands>
  8481. <cleanup-commands>
  8482. <command>-fs NAMENODE -rm -r dir0</command>
  8483. </cleanup-commands>
  8484. <comparators>
  8485. <comparator>
  8486. <type>RegexpComparator</type>
  8487. <expected-output>^drwxrwxrwx( )*-( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/dir1</expected-output>
  8488. </comparator>
  8489. <comparator>
  8490. <type>RegexpComparator</type>
  8491. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/dir1/file1</expected-output>
  8492. </comparator>
  8493. <comparator>
  8494. <type>RegexpComparator</type>
  8495. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/dir1/file2</expected-output>
  8496. </comparator>
  8497. <comparator>
  8498. <type>RegexpComparator</type>
  8499. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/file0</expected-output>
  8500. </comparator>
  8501. </comparators>
  8502. </test>
  8503. <test> <!-- TESTED -->
  8504. <description>chmod: change permission(octal mode) of directory in absolute path recursively </description>
  8505. <test-commands>
  8506. <command>-fs NAMENODE -mkdir /dir0</command>
  8507. <command>-fs NAMENODE -mkdir /dir0/dir1</command>
  8508. <command>-fs NAMENODE -touchz /dir0/file0</command>
  8509. <command>-fs NAMENODE -touchz /dir0/dir1/file1</command>
  8510. <command>-fs NAMENODE -touchz /dir0/dir1/file2</command>
  8511. <command>-fs NAMENODE -chmod -R 777 /dir0/dir1</command>
  8512. <command>-fs NAMENODE -ls -R /dir0</command>
  8513. </test-commands>
  8514. <cleanup-commands>
  8515. <command>-fs NAMENODE -rm -r /dir0</command>
  8516. </cleanup-commands>
  8517. <comparators>
  8518. <comparator>
  8519. <type>RegexpComparator</type>
  8520. <expected-output>^drwxrwxrwx( )*-( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1</expected-output>
  8521. </comparator>
  8522. <comparator>
  8523. <type>RegexpComparator</type>
  8524. <expected-output>^-rwxrwxrwx( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1/file1</expected-output>
  8525. </comparator>
  8526. <comparator>
  8527. <type>RegexpComparator</type>
  8528. <expected-output>^-rwxrwxrwx( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1/file2</expected-output>
  8529. </comparator>
  8530. <comparator>
  8531. <type>RegexpComparator</type>
  8532. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/file0</expected-output>
  8533. </comparator>
  8534. </comparators>
  8535. </test>
  8536. <test> <!-- TESTED -->
  8537. <description>chmod: change permission(octal mode) of directory in relative path recursively</description>
  8538. <test-commands>
  8539. <command>-fs NAMENODE -mkdir -p dir0</command>
  8540. <command>-fs NAMENODE -mkdir -p dir0/dir1</command>
  8541. <command>-fs NAMENODE -touchz dir0/file0</command>
  8542. <command>-fs NAMENODE -touchz dir0/dir1/file1</command>
  8543. <command>-fs NAMENODE -touchz dir0/dir1/file2</command>
  8544. <command>-fs NAMENODE -chmod -R 777 dir0/dir1</command>
  8545. <command>-fs NAMENODE -ls -R dir0</command>
  8546. </test-commands>
  8547. <cleanup-commands>
  8548. <command>-fs NAMENODE -rm -r dir0</command>
  8549. </cleanup-commands>
  8550. <comparators>
  8551. <comparator>
  8552. <type>RegexpComparator</type>
  8553. <expected-output>^drwxrwxrwx( )*-( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/dir1</expected-output>
  8554. </comparator>
  8555. <comparator>
  8556. <type>RegexpComparator</type>
  8557. <expected-output>^-rwxrwxrwx( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/dir1/file1</expected-output>
  8558. </comparator>
  8559. <comparator>
  8560. <type>RegexpComparator</type>
  8561. <expected-output>^-rwxrwxrwx( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/dir1/file2</expected-output>
  8562. </comparator>
  8563. <comparator>
  8564. <type>RegexpComparator</type>
  8565. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/file0</expected-output>
  8566. </comparator>
  8567. </comparators>
  8568. </test>
  8569. <test> <!-- TESTED -->
  8570. <description>chmod: change permission(normal mode) of directory in absolute path recursively</description>
  8571. <test-commands>
  8572. <command>-fs NAMENODE -mkdir /dir0</command>
  8573. <command>-fs NAMENODE -mkdir /dir0/dir1</command>
  8574. <command>-fs NAMENODE -touchz /dir0/file0</command>
  8575. <command>-fs NAMENODE -touchz /dir0/dir1/file1</command>
  8576. <command>-fs NAMENODE -touchz /dir0/dir1/file2</command>
  8577. <command>-fs NAMENODE -chmod -R a+rwx /dir0/dir1</command>
  8578. <command>-fs NAMENODE -ls -R /dir0</command>
  8579. </test-commands>
  8580. <cleanup-commands>
  8581. <command>-fs NAMENODE -rm -r /dir0</command>
  8582. </cleanup-commands>
  8583. <comparators>
  8584. <comparator>
  8585. <type>RegexpComparator</type>
  8586. <expected-output>^drwxrwxrwx( )*-( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1</expected-output>
  8587. </comparator>
  8588. <comparator>
  8589. <type>RegexpComparator</type>
  8590. <expected-output>^-rwxrwxrwx( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1/file1</expected-output>
  8591. </comparator>
  8592. <comparator>
  8593. <type>RegexpComparator</type>
  8594. <expected-output>^-rwxrwxrwx( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1/file2</expected-output>
  8595. </comparator>
  8596. <comparator>
  8597. <type>RegexpComparator</type>
  8598. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/file0</expected-output>
  8599. </comparator>
  8600. </comparators>
  8601. </test>
  8602. <test> <!-- TESTED -->
  8603. <description>chmod: change permission(normal mode) of directory in relative path recursively</description>
  8604. <test-commands>
  8605. <command>-fs NAMENODE -mkdir -p dir0</command>
  8606. <command>-fs NAMENODE -mkdir -p dir0/dir1</command>
  8607. <command>-fs NAMENODE -touchz dir0/file0</command>
  8608. <command>-fs NAMENODE -touchz dir0/dir1/file1</command>
  8609. <command>-fs NAMENODE -touchz dir0/dir1/file2</command>
  8610. <command>-fs NAMENODE -chmod -R a+rwx dir0/dir1</command>
  8611. <command>-fs NAMENODE -ls -R dir0</command>
  8612. </test-commands>
  8613. <cleanup-commands>
  8614. <command>-fs NAMENODE -rm -r dir0</command>
  8615. </cleanup-commands>
  8616. <comparators>
  8617. <comparator>
  8618. <type>RegexpComparator</type>
  8619. <expected-output>^drwxrwxrwx( )*-( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/dir1</expected-output>
  8620. </comparator>
  8621. <comparator>
  8622. <type>RegexpComparator</type>
  8623. <expected-output>^-rwxrwxrwx( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/dir1/file1</expected-output>
  8624. </comparator>
  8625. <comparator>
  8626. <type>RegexpComparator</type>
  8627. <expected-output>^-rwxrwxrwx( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/dir1/file2</expected-output>
  8628. </comparator>
  8629. <comparator>
  8630. <type>RegexpComparator</type>
  8631. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/file0</expected-output>
  8632. </comparator>
  8633. </comparators>
  8634. </test>
  8635. <test> <!-- TESTED -->
  8636. <description>chmod: change permission(octal mode) of non existent file in absolute path</description>
  8637. <test-commands>
  8638. <command>-fs NAMENODE -chmod 777 /file1</command>
  8639. </test-commands>
  8640. <cleanup-commands>
  8641. <command>-fs NAMENODE -rm /file1</command>
  8642. </cleanup-commands>
  8643. <comparators>
  8644. <comparator>
  8645. <type>RegexpComparator</type>
  8646. <expected-output>^chmod: `/file1': No such file or directory</expected-output>
  8647. </comparator>
  8648. </comparators>
  8649. </test>
  8650. <test> <!-- TESTED -->
  8651. <description>chmod: change permission(octal mode) of non existent file in relative path</description>
  8652. <test-commands>
  8653. <command>-fs NAMENODE -chmod 666 file1</command>
  8654. </test-commands>
  8655. <cleanup-commands>
  8656. <command>-fs NAMENODE -rm file1</command>
  8657. </cleanup-commands>
  8658. <comparators>
  8659. <comparator>
  8660. <type>RegexpComparator</type>
  8661. <expected-output>^chmod: `file1': No such file or directory</expected-output>
  8662. </comparator>
  8663. </comparators>
  8664. </test>
  8665. <test> <!-- TESTED -->
  8666. <description>chmod: change permission(normal mode) of non existent file in absolute path</description>
  8667. <test-commands>
  8668. <command>-fs NAMENODE -chmod a+rw /file1</command>
  8669. </test-commands>
  8670. <cleanup-commands>
  8671. <command>-fs NAMENODE -rm /file1</command>
  8672. </cleanup-commands>
  8673. <comparators>
  8674. <comparator>
  8675. <type>RegexpComparator</type>
  8676. <expected-output>^chmod: `/file1': No such file or directory</expected-output>
  8677. </comparator>
  8678. </comparators>
  8679. </test>
  8680. <test> <!-- TESTED -->
  8681. <description>chmod: change permission(normal mode) of non existent file in relative path</description>
  8682. <test-commands>
  8683. <command>-fs NAMENODE -chmod a+rw file1</command>
  8684. </test-commands>
  8685. <cleanup-commands>
  8686. <command>-fs NAMENODE -rm file1</command>
  8687. </cleanup-commands>
  8688. <comparators>
  8689. <comparator>
  8690. <type>RegexpComparator</type>
  8691. <expected-output>^chmod: `file1': No such file or directory</expected-output>
  8692. </comparator>
  8693. </comparators>
  8694. </test>
  8695. <test> <!-- TESTED -->
  8696. <description>chmod: change permission(octal mode) of multiple files in absolute path using globbing</description>
  8697. <test-commands>
  8698. <command>-fs NAMENODE -touchz /file1</command>
  8699. <command>-fs NAMENODE -touchz /file2</command>
  8700. <command>-fs NAMENODE -touchz /file3</command>
  8701. <command>-fs NAMENODE -touchz /file4</command>
  8702. <command>-fs NAMENODE -chmod 777 /file* </command>
  8703. <command>-fs NAMENODE -ls -R /file*</command>
  8704. </test-commands>
  8705. <cleanup-commands>
  8706. <command>-fs NAMENODE -rm /file*</command>
  8707. </cleanup-commands>
  8708. <comparators>
  8709. <comparator>
  8710. <type>RegexpComparator</type>
  8711. <expected-output>^-rwxrwxrwx( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/file1</expected-output>
  8712. </comparator>
  8713. <comparator>
  8714. <type>RegexpComparator</type>
  8715. <expected-output>^-rwxrwxrwx( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/file2</expected-output>
  8716. </comparator>
  8717. <comparator>
  8718. <type>RegexpComparator</type>
  8719. <expected-output>^-rwxrwxrwx( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/file3</expected-output>
  8720. </comparator>
  8721. <comparator>
  8722. <type>RegexpComparator</type>
  8723. <expected-output>^-rwxrwxrwx( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/file4</expected-output>
  8724. </comparator>
  8725. </comparators>
  8726. </test>
  8727. <test> <!-- TESTED -->
  8728. <description>chmod: change permission(octal mode) of multiple files in relative path using globbing</description>
  8729. <test-commands>
  8730. <command>-fs NAMENODE -touchz file1</command>
  8731. <command>-fs NAMENODE -touchz file2</command>
  8732. <command>-fs NAMENODE -touchz file3</command>
  8733. <command>-fs NAMENODE -touchz file4</command>
  8734. <command>-fs NAMENODE -chmod 777 file* </command>
  8735. <command>-fs NAMENODE -ls -R file*</command>
  8736. </test-commands>
  8737. <cleanup-commands>
  8738. <command>-fs NAMENODE -rm file*</command>
  8739. </cleanup-commands>
  8740. <comparators>
  8741. <comparator>
  8742. <type>RegexpComparator</type>
  8743. <expected-output>^-rwxrwxrwx( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*file1</expected-output>
  8744. </comparator>
  8745. <comparator>
  8746. <type>RegexpComparator</type>
  8747. <expected-output>^-rwxrwxrwx( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*file2</expected-output>
  8748. </comparator>
  8749. <comparator>
  8750. <type>RegexpComparator</type>
  8751. <expected-output>^-rwxrwxrwx( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*file3</expected-output>
  8752. </comparator>
  8753. <comparator>
  8754. <type>RegexpComparator</type>
  8755. <expected-output>^-rwxrwxrwx( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*file4</expected-output>
  8756. </comparator>
  8757. </comparators>
  8758. </test>
  8759. <test> <!-- TESTED -->
  8760. <description>chmod: change permission(octal mode) of multiple directories in absolute path using globbing</description>
  8761. <test-commands>
  8762. <command>-fs NAMENODE -mkdir /dir0</command>
  8763. <command>-fs NAMENODE -mkdir /dir0/dir1</command>
  8764. <command>-fs NAMENODE -touchz /dir0/file0</command>
  8765. <command>-fs NAMENODE -touchz /dir0/dir1/file1</command>
  8766. <command>-fs NAMENODE -touchz /dir0/dir1/file2</command>
  8767. <command>-fs NAMENODE -mkdir /dir2</command>
  8768. <command>-fs NAMENODE -mkdir /dir2/dir1</command>
  8769. <command>-fs NAMENODE -touchz /dir2/file0</command>
  8770. <command>-fs NAMENODE -touchz /dir2/dir1/file1</command>
  8771. <command>-fs NAMENODE -touchz /dir2/dir1/file2</command>
  8772. <command>-fs NAMENODE -chmod 777 /dir*</command>
  8773. <command>-fs NAMENODE -ls -R /dir*</command>
  8774. </test-commands>
  8775. <cleanup-commands>
  8776. <command>-fs NAMENODE -rm -r /dir*</command>
  8777. </cleanup-commands>
  8778. <comparators>
  8779. <comparator>
  8780. <type>RegexpComparator</type>
  8781. <expected-output>^drwxr-xr-x( )*-( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1</expected-output>
  8782. </comparator>
  8783. <comparator>
  8784. <type>RegexpComparator</type>
  8785. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1/file1</expected-output>
  8786. </comparator>
  8787. <comparator>
  8788. <type>RegexpComparator</type>
  8789. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1/file2</expected-output>
  8790. </comparator>
  8791. <comparator>
  8792. <type>RegexpComparator</type>
  8793. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/file0</expected-output>
  8794. </comparator>
  8795. <comparator>
  8796. <type>RegexpComparator</type>
  8797. <expected-output>^drwxr-xr-x( )*-( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir2/dir1</expected-output>
  8798. </comparator>
  8799. <comparator>
  8800. <type>RegexpComparator</type>
  8801. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir2/dir1/file1</expected-output>
  8802. </comparator>
  8803. <comparator>
  8804. <type>RegexpComparator</type>
  8805. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir2/dir1/file2</expected-output>
  8806. </comparator>
  8807. <comparator>
  8808. <type>RegexpComparator</type>
  8809. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir2/file0</expected-output>
  8810. </comparator>
  8811. </comparators>
  8812. </test>
  8813. <test> <!-- TESTED -->
  8814. <description>chmod: change permission(octal mode) of multiple directories in relative path using globbing</description>
  8815. <test-commands>
  8816. <command>-fs NAMENODE -mkdir -p dir0</command>
  8817. <command>-fs NAMENODE -mkdir -p dir0/dir1</command>
  8818. <command>-fs NAMENODE -touchz dir0/file0</command>
  8819. <command>-fs NAMENODE -touchz dir0/dir1/file1</command>
  8820. <command>-fs NAMENODE -touchz dir0/dir1/file2</command>
  8821. <command>-fs NAMENODE -mkdir -p dir2</command>
  8822. <command>-fs NAMENODE -mkdir -p dir2/dir1</command>
  8823. <command>-fs NAMENODE -touchz dir2/file0</command>
  8824. <command>-fs NAMENODE -touchz dir2/dir1/file1</command>
  8825. <command>-fs NAMENODE -touchz dir2/dir1/file2</command>
  8826. <command>-fs NAMENODE -chmod 777 dir*</command>
  8827. <command>-fs NAMENODE -ls -R dir*</command>
  8828. </test-commands>
  8829. <cleanup-commands>
  8830. <command>-fs NAMENODE -rm -r dir*</command>
  8831. </cleanup-commands>
  8832. <comparators>
  8833. <comparator>
  8834. <type>RegexpComparator</type>
  8835. <expected-output>^drwxr-xr-x( )*-( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/dir1</expected-output>
  8836. </comparator>
  8837. <comparator>
  8838. <type>RegexpComparator</type>
  8839. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/dir1/file1</expected-output>
  8840. </comparator>
  8841. <comparator>
  8842. <type>RegexpComparator</type>
  8843. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/dir1/file2</expected-output>
  8844. </comparator>
  8845. <comparator>
  8846. <type>RegexpComparator</type>
  8847. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/file0</expected-output>
  8848. </comparator>
  8849. <comparator>
  8850. <type>RegexpComparator</type>
  8851. <expected-output>^drwxr-xr-x( )*-( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir2/dir1</expected-output>
  8852. </comparator>
  8853. <comparator>
  8854. <type>RegexpComparator</type>
  8855. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir2/dir1/file1</expected-output>
  8856. </comparator>
  8857. <comparator>
  8858. <type>RegexpComparator</type>
  8859. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir2/dir1/file2</expected-output>
  8860. </comparator>
  8861. <comparator>
  8862. <type>RegexpComparator</type>
  8863. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir2/file0</expected-output>
  8864. </comparator>
  8865. </comparators>
  8866. </test>
  8867. <test> <!-- TESTED -->
  8868. <description>chmod: change permission(octal mode) of multiple files in absolute path without globbing</description>
  8869. <test-commands>
  8870. <command>-fs NAMENODE -touchz /file1</command>
  8871. <command>-fs NAMENODE -touchz /file2</command>
  8872. <command>-fs NAMENODE -touchz /file3</command>
  8873. <command>-fs NAMENODE -touchz /file4</command>
  8874. <command>-fs NAMENODE -chmod 777 /file1 /file2 /file3 /file4 </command>
  8875. <command>-fs NAMENODE -ls -R /file*</command>
  8876. </test-commands>
  8877. <cleanup-commands>
  8878. <command>-fs NAMENODE -rm /file*</command>
  8879. </cleanup-commands>
  8880. <comparators>
  8881. <comparator>
  8882. <type>RegexpComparator</type>
  8883. <expected-output>^-rwxrwxrwx( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/file1</expected-output>
  8884. </comparator>
  8885. <comparator>
  8886. <type>RegexpComparator</type>
  8887. <expected-output>^-rwxrwxrwx( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/file2</expected-output>
  8888. </comparator>
  8889. <comparator>
  8890. <type>RegexpComparator</type>
  8891. <expected-output>^-rwxrwxrwx( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/file3</expected-output>
  8892. </comparator>
  8893. <comparator>
  8894. <type>RegexpComparator</type>
  8895. <expected-output>^-rwxrwxrwx( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/file4</expected-output>
  8896. </comparator>
  8897. </comparators>
  8898. </test>
  8899. <test> <!-- TESTED -->
  8900. <description>chmod: change permission(octal mode) of multiple files in relative path without globbing</description>
  8901. <test-commands>
  8902. <command>-fs NAMENODE -touchz file1</command>
  8903. <command>-fs NAMENODE -touchz file2</command>
  8904. <command>-fs NAMENODE -touchz file3</command>
  8905. <command>-fs NAMENODE -touchz file4</command>
  8906. <command>-fs NAMENODE -chmod 777 file1 file2 file3 file4 </command>
  8907. <command>-fs NAMENODE -ls -R file*</command>
  8908. </test-commands>
  8909. <cleanup-commands>
  8910. <command>-fs NAMENODE -rm file*</command>
  8911. </cleanup-commands>
  8912. <comparators>
  8913. <comparator>
  8914. <type>RegexpComparator</type>
  8915. <expected-output>^-rwxrwxrwx( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*file1</expected-output>
  8916. </comparator>
  8917. <comparator>
  8918. <type>RegexpComparator</type>
  8919. <expected-output>^-rwxrwxrwx( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*file2</expected-output>
  8920. </comparator>
  8921. <comparator>
  8922. <type>RegexpComparator</type>
  8923. <expected-output>^-rwxrwxrwx( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*file3</expected-output>
  8924. </comparator>
  8925. <comparator>
  8926. <type>RegexpComparator</type>
  8927. <expected-output>^-rwxrwxrwx( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*file4</expected-output>
  8928. </comparator>
  8929. </comparators>
  8930. </test>
  8931. <test> <!-- TESTED -->
  8932. <description>chmod: change permission(octal mode) of multiple directories in absolute path without globbing</description>
  8933. <test-commands>
  8934. <command>-fs NAMENODE -mkdir /dir0</command>
  8935. <command>-fs NAMENODE -mkdir /dir0/dir1</command>
  8936. <command>-fs NAMENODE -touchz /dir0/file0</command>
  8937. <command>-fs NAMENODE -touchz /dir0/dir1/file1</command>
  8938. <command>-fs NAMENODE -touchz /dir0/dir1/file2</command>
  8939. <command>-fs NAMENODE -mkdir /dir2</command>
  8940. <command>-fs NAMENODE -mkdir /dir2/dir1</command>
  8941. <command>-fs NAMENODE -touchz /dir2/file0</command>
  8942. <command>-fs NAMENODE -touchz /dir2/dir1/file1</command>
  8943. <command>-fs NAMENODE -touchz /dir2/dir1/file2</command>
  8944. <command>-fs NAMENODE -chmod 777 /dir0 /dir2</command>
  8945. <command>-fs NAMENODE -ls -R /dir*</command>
  8946. </test-commands>
  8947. <cleanup-commands>
  8948. <command>-fs NAMENODE -rm -r /dir*</command>
  8949. </cleanup-commands>
  8950. <comparators>
  8951. <comparator>
  8952. <type>RegexpComparator</type>
  8953. <expected-output>^drwxr-xr-x( )*-( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1</expected-output>
  8954. </comparator>
  8955. <comparator>
  8956. <type>RegexpComparator</type>
  8957. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1/file1</expected-output>
  8958. </comparator>
  8959. <comparator>
  8960. <type>RegexpComparator</type>
  8961. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1/file2</expected-output>
  8962. </comparator>
  8963. <comparator>
  8964. <type>RegexpComparator</type>
  8965. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/file0</expected-output>
  8966. </comparator>
  8967. <comparator>
  8968. <type>RegexpComparator</type>
  8969. <expected-output>^drwxr-xr-x( )*-( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir2/dir1</expected-output>
  8970. </comparator>
  8971. <comparator>
  8972. <type>RegexpComparator</type>
  8973. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir2/dir1/file1</expected-output>
  8974. </comparator>
  8975. <comparator>
  8976. <type>RegexpComparator</type>
  8977. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir2/dir1/file2</expected-output>
  8978. </comparator>
  8979. <comparator>
  8980. <type>RegexpComparator</type>
  8981. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir2/file0</expected-output>
  8982. </comparator>
  8983. </comparators>
  8984. </test>
  8985. <test> <!-- TESTED -->
  8986. <description>chmod: change permission(octal mode) of multiple directories in relative path without globbing</description>
  8987. <test-commands>
  8988. <command>-fs NAMENODE -mkdir -p dir0</command>
  8989. <command>-fs NAMENODE -mkdir -p dir0/dir1</command>
  8990. <command>-fs NAMENODE -touchz dir0/file0</command>
  8991. <command>-fs NAMENODE -touchz dir0/dir1/file1</command>
  8992. <command>-fs NAMENODE -touchz dir0/dir1/file2</command>
  8993. <command>-fs NAMENODE -mkdir -p dir2</command>
  8994. <command>-fs NAMENODE -mkdir -p dir2/dir1</command>
  8995. <command>-fs NAMENODE -touchz dir2/file0</command>
  8996. <command>-fs NAMENODE -touchz dir2/dir1/file1</command>
  8997. <command>-fs NAMENODE -touchz dir2/dir1/file2</command>
  8998. <command>-fs NAMENODE -chmod 777 dir0 dir2</command>
  8999. <command>-fs NAMENODE -ls -R dir*</command>
  9000. </test-commands>
  9001. <cleanup-commands>
  9002. <command>-fs NAMENODE -rm -r dir*</command>
  9003. </cleanup-commands>
  9004. <comparators>
  9005. <comparator>
  9006. <type>RegexpComparator</type>
  9007. <expected-output>^drwxr-xr-x( )*-( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/dir1</expected-output>
  9008. </comparator>
  9009. <comparator>
  9010. <type>RegexpComparator</type>
  9011. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/dir1/file1</expected-output>
  9012. </comparator>
  9013. <comparator>
  9014. <type>RegexpComparator</type>
  9015. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/dir1/file2</expected-output>
  9016. </comparator>
  9017. <comparator>
  9018. <type>RegexpComparator</type>
  9019. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/file0</expected-output>
  9020. </comparator>
  9021. <comparator>
  9022. <type>RegexpComparator</type>
  9023. <expected-output>^drwxr-xr-x( )*-( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir2/dir1</expected-output>
  9024. </comparator>
  9025. <comparator>
  9026. <type>RegexpComparator</type>
  9027. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir2/dir1/file1</expected-output>
  9028. </comparator>
  9029. <comparator>
  9030. <type>RegexpComparator</type>
  9031. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir2/dir1/file2</expected-output>
  9032. </comparator>
  9033. <comparator>
  9034. <type>RegexpComparator</type>
  9035. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir2/file0</expected-output>
  9036. </comparator>
  9037. </comparators>
  9038. </test>
  9039. <test> <!-- TESTED -->
  9040. <description>chmod: change permission(normal mode) of multiple files in absolute path using globbing</description>
  9041. <test-commands>
  9042. <command>-fs NAMENODE -touchz /file1</command>
  9043. <command>-fs NAMENODE -touchz /file2</command>
  9044. <command>-fs NAMENODE -touchz /file3</command>
  9045. <command>-fs NAMENODE -touchz /file4</command>
  9046. <command>-fs NAMENODE -chmod a+rw /file* </command>
  9047. <command>-fs NAMENODE -ls -R /file*</command>
  9048. </test-commands>
  9049. <cleanup-commands>
  9050. <command>-fs NAMENODE -rm /file*</command>
  9051. </cleanup-commands>
  9052. <comparators>
  9053. <comparator>
  9054. <type>RegexpComparator</type>
  9055. <expected-output>^-rw-rw-rw-( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/file1</expected-output>
  9056. </comparator>
  9057. <comparator>
  9058. <type>RegexpComparator</type>
  9059. <expected-output>^-rw-rw-rw-( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/file2</expected-output>
  9060. </comparator>
  9061. <comparator>
  9062. <type>RegexpComparator</type>
  9063. <expected-output>^-rw-rw-rw-( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/file3</expected-output>
  9064. </comparator>
  9065. <comparator>
  9066. <type>RegexpComparator</type>
  9067. <expected-output>^-rw-rw-rw-( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/file4</expected-output>
  9068. </comparator>
  9069. </comparators>
  9070. </test>
  9071. <test> <!-- TESTED -->
  9072. <description>chmod: change permission(normal mode) of multiple files in relative path using globbing</description>
  9073. <test-commands>
  9074. <command>-fs NAMENODE -touchz file1</command>
  9075. <command>-fs NAMENODE -touchz file2</command>
  9076. <command>-fs NAMENODE -touchz file3</command>
  9077. <command>-fs NAMENODE -touchz file4</command>
  9078. <command>-fs NAMENODE -chmod a+rw file* </command>
  9079. <command>-fs NAMENODE -ls -R file*</command>
  9080. </test-commands>
  9081. <cleanup-commands>
  9082. <command>-fs NAMENODE -rm file*</command>
  9083. </cleanup-commands>
  9084. <comparators>
  9085. <comparator>
  9086. <type>RegexpComparator</type>
  9087. <expected-output>^-rw-rw-rw-( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*file1</expected-output>
  9088. </comparator>
  9089. <comparator>
  9090. <type>RegexpComparator</type>
  9091. <expected-output>^-rw-rw-rw-( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*file2</expected-output>
  9092. </comparator>
  9093. <comparator>
  9094. <type>RegexpComparator</type>
  9095. <expected-output>^-rw-rw-rw-( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*file3</expected-output>
  9096. </comparator>
  9097. <comparator>
  9098. <type>RegexpComparator</type>
  9099. <expected-output>^-rw-rw-rw-( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*file4</expected-output>
  9100. </comparator>
  9101. </comparators>
  9102. </test>
  9103. <test> <!-- TESTED -->
  9104. <description>chmod: change permission(normal mode) of multiple directories in absolute path using globbing</description>
  9105. <test-commands>
  9106. <command>-fs NAMENODE -mkdir /dir0</command>
  9107. <command>-fs NAMENODE -mkdir /dir0/dir1</command>
  9108. <command>-fs NAMENODE -touchz /dir0/file0</command>
  9109. <command>-fs NAMENODE -touchz /dir0/dir1/file1</command>
  9110. <command>-fs NAMENODE -touchz /dir0/dir1/file2</command>
  9111. <command>-fs NAMENODE -mkdir /dir2</command>
  9112. <command>-fs NAMENODE -mkdir /dir2/dir1</command>
  9113. <command>-fs NAMENODE -touchz /dir2/file0</command>
  9114. <command>-fs NAMENODE -touchz /dir2/dir1/file1</command>
  9115. <command>-fs NAMENODE -touchz /dir2/dir1/file2</command>
  9116. <command>-fs NAMENODE -chmod a+rwx /dir*</command>
  9117. <command>-fs NAMENODE -ls -R /dir*</command>
  9118. </test-commands>
  9119. <cleanup-commands>
  9120. <command>-fs NAMENODE -rm -r /dir*</command>
  9121. </cleanup-commands>
  9122. <comparators>
  9123. <comparator>
  9124. <type>RegexpComparator</type>
  9125. <expected-output>^drwxr-xr-x( )*-( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1</expected-output>
  9126. </comparator>
  9127. <comparator>
  9128. <type>RegexpComparator</type>
  9129. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1/file1</expected-output>
  9130. </comparator>
  9131. <comparator>
  9132. <type>RegexpComparator</type>
  9133. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1/file2</expected-output>
  9134. </comparator>
  9135. <comparator>
  9136. <type>RegexpComparator</type>
  9137. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/file0</expected-output>
  9138. </comparator>
  9139. <comparator>
  9140. <type>RegexpComparator</type>
  9141. <expected-output>^drwxr-xr-x( )*-( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir2/dir1</expected-output>
  9142. </comparator>
  9143. <comparator>
  9144. <type>RegexpComparator</type>
  9145. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir2/dir1/file1</expected-output>
  9146. </comparator>
  9147. <comparator>
  9148. <type>RegexpComparator</type>
  9149. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir2/dir1/file2</expected-output>
  9150. </comparator>
  9151. <comparator>
  9152. <type>RegexpComparator</type>
  9153. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir2/file0</expected-output>
  9154. </comparator>
  9155. </comparators>
  9156. </test>
  9157. <test> <!-- TESTED -->
  9158. <description>chmod: change permission(normal mode) of multiple directories in relative path using globbing</description>
  9159. <test-commands>
  9160. <command>-fs NAMENODE -mkdir -p dir0</command>
  9161. <command>-fs NAMENODE -mkdir -p dir0/dir1</command>
  9162. <command>-fs NAMENODE -touchz dir0/file0</command>
  9163. <command>-fs NAMENODE -touchz dir0/dir1/file1</command>
  9164. <command>-fs NAMENODE -touchz dir0/dir1/file2</command>
  9165. <command>-fs NAMENODE -mkdir -p dir2</command>
  9166. <command>-fs NAMENODE -mkdir -p dir2/dir1</command>
  9167. <command>-fs NAMENODE -touchz dir2/file0</command>
  9168. <command>-fs NAMENODE -touchz dir2/dir1/file1</command>
  9169. <command>-fs NAMENODE -touchz dir2/dir1/file2</command>
  9170. <command>-fs NAMENODE -chmod a+rwx dir*</command>
  9171. <command>-fs NAMENODE -ls -R dir*</command>
  9172. </test-commands>
  9173. <cleanup-commands>
  9174. <command>-fs NAMENODE -rm -r dir*</command>
  9175. </cleanup-commands>
  9176. <comparators>
  9177. <comparator>
  9178. <type>RegexpComparator</type>
  9179. <expected-output>^drwxr-xr-x( )*-( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/dir1</expected-output>
  9180. </comparator>
  9181. <comparator>
  9182. <type>RegexpComparator</type>
  9183. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/dir1/file1</expected-output>
  9184. </comparator>
  9185. <comparator>
  9186. <type>RegexpComparator</type>
  9187. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/dir1/file2</expected-output>
  9188. </comparator>
  9189. <comparator>
  9190. <type>RegexpComparator</type>
  9191. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/file0</expected-output>
  9192. </comparator>
  9193. <comparator>
  9194. <type>RegexpComparator</type>
  9195. <expected-output>^drwxr-xr-x( )*-( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir2/dir1</expected-output>
  9196. </comparator>
  9197. <comparator>
  9198. <type>RegexpComparator</type>
  9199. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir2/dir1/file1</expected-output>
  9200. </comparator>
  9201. <comparator>
  9202. <type>RegexpComparator</type>
  9203. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir2/dir1/file2</expected-output>
  9204. </comparator>
  9205. <comparator>
  9206. <type>RegexpComparator</type>
  9207. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir2/file0</expected-output>
  9208. </comparator>
  9209. </comparators>
  9210. </test>
  9211. <test> <!-- TESTED -->
  9212. <description>chmod: change permission(normal mode) of multiple files in absolute path without globbing</description>
  9213. <test-commands>
  9214. <command>-fs NAMENODE -touchz /file1</command>
  9215. <command>-fs NAMENODE -touchz /file2</command>
  9216. <command>-fs NAMENODE -touchz /file3</command>
  9217. <command>-fs NAMENODE -touchz /file4</command>
  9218. <command>-fs NAMENODE -chmod a+rw /file1 /file2 /file3 /file4 </command>
  9219. <command>-fs NAMENODE -ls -R /file*</command>
  9220. </test-commands>
  9221. <cleanup-commands>
  9222. <command>-fs NAMENODE -rm /file*</command>
  9223. </cleanup-commands>
  9224. <comparators>
  9225. <comparator>
  9226. <type>RegexpComparator</type>
  9227. <expected-output>^-rw-rw-rw-( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/file1</expected-output>
  9228. </comparator>
  9229. <comparator>
  9230. <type>RegexpComparator</type>
  9231. <expected-output>^-rw-rw-rw-( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/file2</expected-output>
  9232. </comparator>
  9233. <comparator>
  9234. <type>RegexpComparator</type>
  9235. <expected-output>^-rw-rw-rw-( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/file3</expected-output>
  9236. </comparator>
  9237. <comparator>
  9238. <type>RegexpComparator</type>
  9239. <expected-output>^-rw-rw-rw-( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/file4</expected-output>
  9240. </comparator>
  9241. </comparators>
  9242. </test>
  9243. <test> <!-- TESTED -->
  9244. <description>chmod: change permission(normal mode) of multiple files in relative path without globbing</description>
  9245. <test-commands>
  9246. <command>-fs NAMENODE -touchz file1</command>
  9247. <command>-fs NAMENODE -touchz file2</command>
  9248. <command>-fs NAMENODE -touchz file3</command>
  9249. <command>-fs NAMENODE -touchz file4</command>
  9250. <command>-fs NAMENODE -chmod a+rw file1 file2 file3 file4 </command>
  9251. <command>-fs NAMENODE -ls -R file*</command>
  9252. </test-commands>
  9253. <cleanup-commands>
  9254. <command>-fs NAMENODE -rm file*</command>
  9255. </cleanup-commands>
  9256. <comparators>
  9257. <comparator>
  9258. <type>RegexpComparator</type>
  9259. <expected-output>^-rw-rw-rw-( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*file1</expected-output>
  9260. </comparator>
  9261. <comparator>
  9262. <type>RegexpComparator</type>
  9263. <expected-output>^-rw-rw-rw-( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*file2</expected-output>
  9264. </comparator>
  9265. <comparator>
  9266. <type>RegexpComparator</type>
  9267. <expected-output>^-rw-rw-rw-( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*file3</expected-output>
  9268. </comparator>
  9269. <comparator>
  9270. <type>RegexpComparator</type>
  9271. <expected-output>^-rw-rw-rw-( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*file4</expected-output>
  9272. </comparator>
  9273. </comparators>
  9274. </test>
  9275. <test> <!-- TESTED -->
  9276. <description>chmod: change permission(normal mode) of multiple directories in absolute path without globbing</description>
  9277. <test-commands>
  9278. <command>-fs NAMENODE -mkdir /dir0</command>
  9279. <command>-fs NAMENODE -mkdir /dir0/dir1</command>
  9280. <command>-fs NAMENODE -touchz /dir0/file0</command>
  9281. <command>-fs NAMENODE -touchz /dir0/dir1/file1</command>
  9282. <command>-fs NAMENODE -touchz /dir0/dir1/file2</command>
  9283. <command>-fs NAMENODE -mkdir /dir2</command>
  9284. <command>-fs NAMENODE -mkdir /dir2/dir1</command>
  9285. <command>-fs NAMENODE -touchz /dir2/file0</command>
  9286. <command>-fs NAMENODE -touchz /dir2/dir1/file1</command>
  9287. <command>-fs NAMENODE -touchz /dir2/dir1/file2</command>
  9288. <command>-fs NAMENODE -chmod a+rwx /dir0 /dir2</command>
  9289. <command>-fs NAMENODE -ls -R /dir*</command>
  9290. </test-commands>
  9291. <cleanup-commands>
  9292. <command>-fs NAMENODE -rm -r /dir*</command>
  9293. </cleanup-commands>
  9294. <comparators>
  9295. <comparator>
  9296. <type>RegexpComparator</type>
  9297. <expected-output>^drwxr-xr-x( )*-( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1</expected-output>
  9298. </comparator>
  9299. <comparator>
  9300. <type>RegexpComparator</type>
  9301. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1/file1</expected-output>
  9302. </comparator>
  9303. <comparator>
  9304. <type>RegexpComparator</type>
  9305. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1/file2</expected-output>
  9306. </comparator>
  9307. <comparator>
  9308. <type>RegexpComparator</type>
  9309. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/file0</expected-output>
  9310. </comparator>
  9311. <comparator>
  9312. <type>RegexpComparator</type>
  9313. <expected-output>^drwxr-xr-x( )*-( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir2/dir1</expected-output>
  9314. </comparator>
  9315. <comparator>
  9316. <type>RegexpComparator</type>
  9317. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir2/dir1/file1</expected-output>
  9318. </comparator>
  9319. <comparator>
  9320. <type>RegexpComparator</type>
  9321. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir2/dir1/file2</expected-output>
  9322. </comparator>
  9323. <comparator>
  9324. <type>RegexpComparator</type>
  9325. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir2/file0</expected-output>
  9326. </comparator>
  9327. </comparators>
  9328. </test>
  9329. <test> <!-- TESTED -->
  9330. <description>chmod: change permission(normal mode) of multiple directories in relative path without globbing</description>
  9331. <test-commands>
  9332. <command>-fs NAMENODE -mkdir -p dir0</command>
  9333. <command>-fs NAMENODE -mkdir -p dir0/dir1</command>
  9334. <command>-fs NAMENODE -touchz dir0/file0</command>
  9335. <command>-fs NAMENODE -touchz dir0/dir1/file1</command>
  9336. <command>-fs NAMENODE -touchz dir0/dir1/file2</command>
  9337. <command>-fs NAMENODE -mkdir -p dir2</command>
  9338. <command>-fs NAMENODE -mkdir -p dir2/dir1</command>
  9339. <command>-fs NAMENODE -touchz dir2/file0</command>
  9340. <command>-fs NAMENODE -touchz dir2/dir1/file1</command>
  9341. <command>-fs NAMENODE -touchz dir2/dir1/file2</command>
  9342. <command>-fs NAMENODE -chmod a+rwx dir0 dir2</command>
  9343. <command>-fs NAMENODE -ls -R dir*</command>
  9344. </test-commands>
  9345. <cleanup-commands>
  9346. <command>-fs NAMENODE -rm -r dir*</command>
  9347. </cleanup-commands>
  9348. <comparators>
  9349. <comparator>
  9350. <type>RegexpComparator</type>
  9351. <expected-output>^drwxr-xr-x( )*-( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/dir1</expected-output>
  9352. </comparator>
  9353. <comparator>
  9354. <type>RegexpComparator</type>
  9355. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/dir1/file1</expected-output>
  9356. </comparator>
  9357. <comparator>
  9358. <type>RegexpComparator</type>
  9359. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/dir1/file2</expected-output>
  9360. </comparator>
  9361. <comparator>
  9362. <type>RegexpComparator</type>
  9363. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/file0</expected-output>
  9364. </comparator>
  9365. <comparator>
  9366. <type>RegexpComparator</type>
  9367. <expected-output>^drwxr-xr-x( )*-( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir2/dir1</expected-output>
  9368. </comparator>
  9369. <comparator>
  9370. <type>RegexpComparator</type>
  9371. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir2/dir1/file1</expected-output>
  9372. </comparator>
  9373. <comparator>
  9374. <type>RegexpComparator</type>
  9375. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir2/dir1/file2</expected-output>
  9376. </comparator>
  9377. <comparator>
  9378. <type>RegexpComparator</type>
  9379. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir2/file0</expected-output>
  9380. </comparator>
  9381. </comparators>
  9382. </test>
  9383. <test> <!-- TESTED -->
  9384. <description>chmod: change permission(octal mode) of multiple directories in absolute path recursively using globbing</description>
  9385. <test-commands>
  9386. <command>-fs NAMENODE -mkdir /dir0</command>
  9387. <command>-fs NAMENODE -mkdir /dir0/dir1</command>
  9388. <command>-fs NAMENODE -touchz /dir0/file0</command>
  9389. <command>-fs NAMENODE -touchz /dir0/dir1/file1</command>
  9390. <command>-fs NAMENODE -touchz /dir0/dir1/file2</command>
  9391. <command>-fs NAMENODE -mkdir /dir2</command>
  9392. <command>-fs NAMENODE -mkdir /dir2/dir1</command>
  9393. <command>-fs NAMENODE -touchz /dir2/file0</command>
  9394. <command>-fs NAMENODE -touchz /dir2/dir1/file1</command>
  9395. <command>-fs NAMENODE -touchz /dir2/dir1/file2</command>
  9396. <command>-fs NAMENODE -chmod -R 777 /dir*</command>
  9397. <command>-fs NAMENODE -ls -R /dir*</command>
  9398. </test-commands>
  9399. <cleanup-commands>
  9400. <command>-fs NAMENODE -rm -r /dir*</command>
  9401. </cleanup-commands>
  9402. <comparators>
  9403. <comparator>
  9404. <type>RegexpComparator</type>
  9405. <expected-output>^drwxrwxrwx( )*-( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1</expected-output>
  9406. </comparator>
  9407. <comparator>
  9408. <type>RegexpComparator</type>
  9409. <expected-output>^-rwxrwxrwx( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1/file1</expected-output>
  9410. </comparator>
  9411. <comparator>
  9412. <type>RegexpComparator</type>
  9413. <expected-output>^-rwxrwxrwx( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1/file2</expected-output>
  9414. </comparator>
  9415. <comparator>
  9416. <type>RegexpComparator</type>
  9417. <expected-output>^-rwxrwxrwx( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/file0</expected-output>
  9418. </comparator>
  9419. <comparator>
  9420. <type>RegexpComparator</type>
  9421. <expected-output>^drwxrwxrwx( )*-( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir2/dir1</expected-output>
  9422. </comparator>
  9423. <comparator>
  9424. <type>RegexpComparator</type>
  9425. <expected-output>^-rwxrwxrwx( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir2/dir1/file1</expected-output>
  9426. </comparator>
  9427. <comparator>
  9428. <type>RegexpComparator</type>
  9429. <expected-output>^-rwxrwxrwx( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir2/dir1/file2</expected-output>
  9430. </comparator>
  9431. <comparator>
  9432. <type>RegexpComparator</type>
  9433. <expected-output>^-rwxrwxrwx( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir2/file0</expected-output>
  9434. </comparator>
  9435. </comparators>
  9436. </test>
  9437. <test> <!-- TESTED -->
  9438. <description>chmod: change permission(octal mode) of multiple directories in relative path recursively using globbing</description>
  9439. <test-commands>
  9440. <command>-fs NAMENODE -mkdir -p dir0</command>
  9441. <command>-fs NAMENODE -mkdir -p dir0/dir1</command>
  9442. <command>-fs NAMENODE -touchz dir0/file0</command>
  9443. <command>-fs NAMENODE -touchz dir0/dir1/file1</command>
  9444. <command>-fs NAMENODE -touchz dir0/dir1/file2</command>
  9445. <command>-fs NAMENODE -mkdir -p dir2</command>
  9446. <command>-fs NAMENODE -mkdir -p dir2/dir1</command>
  9447. <command>-fs NAMENODE -touchz dir2/file0</command>
  9448. <command>-fs NAMENODE -touchz dir2/dir1/file1</command>
  9449. <command>-fs NAMENODE -touchz dir2/dir1/file2</command>
  9450. <command>-fs NAMENODE -chmod -R 777 dir*</command>
  9451. <command>-fs NAMENODE -ls -R dir*</command>
  9452. </test-commands>
  9453. <cleanup-commands>
  9454. <command>-fs NAMENODE -rm -r dir*</command>
  9455. </cleanup-commands>
  9456. <comparators>
  9457. <comparator>
  9458. <type>RegexpComparator</type>
  9459. <expected-output>^drwxrwxrwx( )*-( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/dir1</expected-output>
  9460. </comparator>
  9461. <comparator>
  9462. <type>RegexpComparator</type>
  9463. <expected-output>^-rwxrwxrwx( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/dir1/file1</expected-output>
  9464. </comparator>
  9465. <comparator>
  9466. <type>RegexpComparator</type>
  9467. <expected-output>^-rwxrwxrwx( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/dir1/file2</expected-output>
  9468. </comparator>
  9469. <comparator>
  9470. <type>RegexpComparator</type>
  9471. <expected-output>^-rwxrwxrwx( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/file0</expected-output>
  9472. </comparator>
  9473. <comparator>
  9474. <type>RegexpComparator</type>
  9475. <expected-output>^drwxrwxrwx( )*-( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir2/dir1</expected-output>
  9476. </comparator>
  9477. <comparator>
  9478. <type>RegexpComparator</type>
  9479. <expected-output>^-rwxrwxrwx( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir2/dir1/file1</expected-output>
  9480. </comparator>
  9481. <comparator>
  9482. <type>RegexpComparator</type>
  9483. <expected-output>^-rwxrwxrwx( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir2/dir1/file2</expected-output>
  9484. </comparator>
  9485. <comparator>
  9486. <type>RegexpComparator</type>
  9487. <expected-output>^-rwxrwxrwx( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir2/file0</expected-output>
  9488. </comparator>
  9489. </comparators>
  9490. </test>
  9491. <test> <!-- TESTED -->
  9492. <description>chmod: change permission(octal mode) of multiple directories in absolute path recursively without globbing</description>
  9493. <test-commands>
  9494. <command>-fs NAMENODE -mkdir /dir0</command>
  9495. <command>-fs NAMENODE -mkdir /dir0/dir1</command>
  9496. <command>-fs NAMENODE -touchz /dir0/file0</command>
  9497. <command>-fs NAMENODE -touchz /dir0/dir1/file1</command>
  9498. <command>-fs NAMENODE -touchz /dir0/dir1/file2</command>
  9499. <command>-fs NAMENODE -mkdir /dir2</command>
  9500. <command>-fs NAMENODE -mkdir /dir2/dir1</command>
  9501. <command>-fs NAMENODE -touchz /dir2/file0</command>
  9502. <command>-fs NAMENODE -touchz /dir2/dir1/file1</command>
  9503. <command>-fs NAMENODE -touchz /dir2/dir1/file2</command>
  9504. <command>-fs NAMENODE -chmod -R 777 /dir0 /dir2</command>
  9505. <command>-fs NAMENODE -ls -R /dir*</command>
  9506. </test-commands>
  9507. <cleanup-commands>
  9508. <command>-fs NAMENODE -rm -r /dir*</command>
  9509. </cleanup-commands>
  9510. <comparators>
  9511. <comparator>
  9512. <type>RegexpComparator</type>
  9513. <expected-output>^drwxrwxrwx( )*-( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1</expected-output>
  9514. </comparator>
  9515. <comparator>
  9516. <type>RegexpComparator</type>
  9517. <expected-output>^-rwxrwxrwx( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1/file1</expected-output>
  9518. </comparator>
  9519. <comparator>
  9520. <type>RegexpComparator</type>
  9521. <expected-output>^-rwxrwxrwx( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1/file2</expected-output>
  9522. </comparator>
  9523. <comparator>
  9524. <type>RegexpComparator</type>
  9525. <expected-output>^-rwxrwxrwx( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/file0</expected-output>
  9526. </comparator>
  9527. <comparator>
  9528. <type>RegexpComparator</type>
  9529. <expected-output>^drwxrwxrwx( )*-( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir2/dir1</expected-output>
  9530. </comparator>
  9531. <comparator>
  9532. <type>RegexpComparator</type>
  9533. <expected-output>^-rwxrwxrwx( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir2/dir1/file1</expected-output>
  9534. </comparator>
  9535. <comparator>
  9536. <type>RegexpComparator</type>
  9537. <expected-output>^-rwxrwxrwx( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir2/dir1/file2</expected-output>
  9538. </comparator>
  9539. <comparator>
  9540. <type>RegexpComparator</type>
  9541. <expected-output>^-rwxrwxrwx( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir2/file0</expected-output>
  9542. </comparator>
  9543. </comparators>
  9544. </test>
  9545. <test> <!-- TESTED -->
  9546. <description>chmod: change permission(octal mode) of multiple directories in relative path recursively without globbing</description>
  9547. <test-commands>
  9548. <command>-fs NAMENODE -mkdir -p dir0</command>
  9549. <command>-fs NAMENODE -mkdir -p dir0/dir1</command>
  9550. <command>-fs NAMENODE -touchz dir0/file0</command>
  9551. <command>-fs NAMENODE -touchz dir0/dir1/file1</command>
  9552. <command>-fs NAMENODE -touchz dir0/dir1/file2</command>
  9553. <command>-fs NAMENODE -mkdir -p dir2</command>
  9554. <command>-fs NAMENODE -mkdir -p dir2/dir1</command>
  9555. <command>-fs NAMENODE -touchz dir2/file0</command>
  9556. <command>-fs NAMENODE -touchz dir2/dir1/file1</command>
  9557. <command>-fs NAMENODE -touchz dir2/dir1/file2</command>
  9558. <command>-fs NAMENODE -chmod -R 777 dir0 dir2</command>
  9559. <command>-fs NAMENODE -ls -R dir*</command>
  9560. </test-commands>
  9561. <cleanup-commands>
  9562. <command>-fs NAMENODE -rm -r dir*</command>
  9563. </cleanup-commands>
  9564. <comparators>
  9565. <comparator>
  9566. <type>RegexpComparator</type>
  9567. <expected-output>^drwxrwxrwx( )*-( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/dir1</expected-output>
  9568. </comparator>
  9569. <comparator>
  9570. <type>RegexpComparator</type>
  9571. <expected-output>^-rwxrwxrwx( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/dir1/file1</expected-output>
  9572. </comparator>
  9573. <comparator>
  9574. <type>RegexpComparator</type>
  9575. <expected-output>^-rwxrwxrwx( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/dir1/file2</expected-output>
  9576. </comparator>
  9577. <comparator>
  9578. <type>RegexpComparator</type>
  9579. <expected-output>^-rwxrwxrwx( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/file0</expected-output>
  9580. </comparator>
  9581. <comparator>
  9582. <type>RegexpComparator</type>
  9583. <expected-output>^drwxrwxrwx( )*-( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir2/dir1</expected-output>
  9584. </comparator>
  9585. <comparator>
  9586. <type>RegexpComparator</type>
  9587. <expected-output>^-rwxrwxrwx( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir2/dir1/file1</expected-output>
  9588. </comparator>
  9589. <comparator>
  9590. <type>RegexpComparator</type>
  9591. <expected-output>^-rwxrwxrwx( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir2/dir1/file2</expected-output>
  9592. </comparator>
  9593. <comparator>
  9594. <type>RegexpComparator</type>
  9595. <expected-output>^-rwxrwxrwx( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir2/file0</expected-output>
  9596. </comparator>
  9597. </comparators>
  9598. </test>
  9599. <test> <!-- TESTED -->
  9600. <description>chmod: change permission(normal mode) of multiple directories in absolute path recursively using globbing</description>
  9601. <test-commands>
  9602. <command>-fs NAMENODE -mkdir /dir0</command>
  9603. <command>-fs NAMENODE -mkdir /dir0/dir1</command>
  9604. <command>-fs NAMENODE -touchz /dir0/file0</command>
  9605. <command>-fs NAMENODE -touchz /dir0/dir1/file1</command>
  9606. <command>-fs NAMENODE -touchz /dir0/dir1/file2</command>
  9607. <command>-fs NAMENODE -mkdir /dir2</command>
  9608. <command>-fs NAMENODE -mkdir /dir2/dir1</command>
  9609. <command>-fs NAMENODE -touchz /dir2/file0</command>
  9610. <command>-fs NAMENODE -touchz /dir2/dir1/file1</command>
  9611. <command>-fs NAMENODE -touchz /dir2/dir1/file2</command>
  9612. <command>-fs NAMENODE -chmod -R a+rwx /dir*</command>
  9613. <command>-fs NAMENODE -ls -R /dir*</command>
  9614. </test-commands>
  9615. <cleanup-commands>
  9616. <command>-fs NAMENODE -rm -r /dir*</command>
  9617. </cleanup-commands>
  9618. <comparators>
  9619. <comparator>
  9620. <type>RegexpComparator</type>
  9621. <expected-output>^drwxrwxrwx( )*-( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1</expected-output>
  9622. </comparator>
  9623. <comparator>
  9624. <type>RegexpComparator</type>
  9625. <expected-output>^-rwxrwxrwx( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1/file1</expected-output>
  9626. </comparator>
  9627. <comparator>
  9628. <type>RegexpComparator</type>
  9629. <expected-output>^-rwxrwxrwx( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1/file2</expected-output>
  9630. </comparator>
  9631. <comparator>
  9632. <type>RegexpComparator</type>
  9633. <expected-output>^-rwxrwxrwx( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/file0</expected-output>
  9634. </comparator>
  9635. <comparator>
  9636. <type>RegexpComparator</type>
  9637. <expected-output>^drwxrwxrwx( )*-( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir2/dir1</expected-output>
  9638. </comparator>
  9639. <comparator>
  9640. <type>RegexpComparator</type>
  9641. <expected-output>^-rwxrwxrwx( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir2/dir1/file1</expected-output>
  9642. </comparator>
  9643. <comparator>
  9644. <type>RegexpComparator</type>
  9645. <expected-output>^-rwxrwxrwx( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir2/dir1/file2</expected-output>
  9646. </comparator>
  9647. <comparator>
  9648. <type>RegexpComparator</type>
  9649. <expected-output>^-rwxrwxrwx( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir2/file0</expected-output>
  9650. </comparator>
  9651. </comparators>
  9652. </test>
  9653. <test> <!-- TESTED -->
  9654. <description>chmod: change permission(normal mode) of multiple directories in relative path recursively using globbing</description>
  9655. <test-commands>
  9656. <command>-fs NAMENODE -mkdir -p dir0</command>
  9657. <command>-fs NAMENODE -mkdir -p dir0/dir1</command>
  9658. <command>-fs NAMENODE -touchz dir0/file0</command>
  9659. <command>-fs NAMENODE -touchz dir0/dir1/file1</command>
  9660. <command>-fs NAMENODE -touchz dir0/dir1/file2</command>
  9661. <command>-fs NAMENODE -mkdir -p dir2</command>
  9662. <command>-fs NAMENODE -mkdir -p dir2/dir1</command>
  9663. <command>-fs NAMENODE -touchz dir2/file0</command>
  9664. <command>-fs NAMENODE -touchz dir2/dir1/file1</command>
  9665. <command>-fs NAMENODE -touchz dir2/dir1/file2</command>
  9666. <command>-fs NAMENODE -chmod -R a+rwx dir*</command>
  9667. <command>-fs NAMENODE -ls -R dir*</command>
  9668. </test-commands>
  9669. <cleanup-commands>
  9670. <command>-fs NAMENODE -rm -r dir*</command>
  9671. </cleanup-commands>
  9672. <comparators>
  9673. <comparator>
  9674. <type>RegexpComparator</type>
  9675. <expected-output>^drwxrwxrwx( )*-( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/dir1</expected-output>
  9676. </comparator>
  9677. <comparator>
  9678. <type>RegexpComparator</type>
  9679. <expected-output>^-rwxrwxrwx( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/dir1/file1</expected-output>
  9680. </comparator>
  9681. <comparator>
  9682. <type>RegexpComparator</type>
  9683. <expected-output>^-rwxrwxrwx( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/dir1/file2</expected-output>
  9684. </comparator>
  9685. <comparator>
  9686. <type>RegexpComparator</type>
  9687. <expected-output>^-rwxrwxrwx( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/file0</expected-output>
  9688. </comparator>
  9689. <comparator>
  9690. <type>RegexpComparator</type>
  9691. <expected-output>^drwxrwxrwx( )*-( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir2/dir1</expected-output>
  9692. </comparator>
  9693. <comparator>
  9694. <type>RegexpComparator</type>
  9695. <expected-output>^-rwxrwxrwx( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir2/dir1/file1</expected-output>
  9696. </comparator>
  9697. <comparator>
  9698. <type>RegexpComparator</type>
  9699. <expected-output>^-rwxrwxrwx( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir2/dir1/file2</expected-output>
  9700. </comparator>
  9701. <comparator>
  9702. <type>RegexpComparator</type>
  9703. <expected-output>^-rwxrwxrwx( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir2/file0</expected-output>
  9704. </comparator>
  9705. </comparators>
  9706. </test>
  9707. <test> <!-- TESTED -->
  9708. <description>chmod: change permission(normal mode) of multiple directories in absolute path recursively without globbing</description>
  9709. <test-commands>
  9710. <command>-fs NAMENODE -mkdir /dir0</command>
  9711. <command>-fs NAMENODE -mkdir /dir0/dir1</command>
  9712. <command>-fs NAMENODE -touchz /dir0/file0</command>
  9713. <command>-fs NAMENODE -touchz /dir0/dir1/file1</command>
  9714. <command>-fs NAMENODE -touchz /dir0/dir1/file2</command>
  9715. <command>-fs NAMENODE -mkdir /dir2</command>
  9716. <command>-fs NAMENODE -mkdir /dir2/dir1</command>
  9717. <command>-fs NAMENODE -touchz /dir2/file0</command>
  9718. <command>-fs NAMENODE -touchz /dir2/dir1/file1</command>
  9719. <command>-fs NAMENODE -touchz /dir2/dir1/file2</command>
  9720. <command>-fs NAMENODE -chmod -R a+rwx /dir0 /dir2</command>
  9721. <command>-fs NAMENODE -ls -R /dir*</command>
  9722. </test-commands>
  9723. <cleanup-commands>
  9724. <command>-fs NAMENODE -rm -r /dir*</command>
  9725. </cleanup-commands>
  9726. <comparators>
  9727. <comparator>
  9728. <type>RegexpComparator</type>
  9729. <expected-output>^drwxrwxrwx( )*-( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1</expected-output>
  9730. </comparator>
  9731. <comparator>
  9732. <type>RegexpComparator</type>
  9733. <expected-output>^-rwxrwxrwx( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1/file1</expected-output>
  9734. </comparator>
  9735. <comparator>
  9736. <type>RegexpComparator</type>
  9737. <expected-output>^-rwxrwxrwx( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1/file2</expected-output>
  9738. </comparator>
  9739. <comparator>
  9740. <type>RegexpComparator</type>
  9741. <expected-output>^-rwxrwxrwx( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/file0</expected-output>
  9742. </comparator>
  9743. <comparator>
  9744. <type>RegexpComparator</type>
  9745. <expected-output>^drwxrwxrwx( )*-( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir2/dir1</expected-output>
  9746. </comparator>
  9747. <comparator>
  9748. <type>RegexpComparator</type>
  9749. <expected-output>^-rwxrwxrwx( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir2/dir1/file1</expected-output>
  9750. </comparator>
  9751. <comparator>
  9752. <type>RegexpComparator</type>
  9753. <expected-output>^-rwxrwxrwx( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir2/dir1/file2</expected-output>
  9754. </comparator>
  9755. <comparator>
  9756. <type>RegexpComparator</type>
  9757. <expected-output>^-rwxrwxrwx( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir2/file0</expected-output>
  9758. </comparator>
  9759. </comparators>
  9760. </test>
  9761. <test> <!-- TESTED -->
  9762. <description>chmod: change permission(normal mode) of multiple directories in relative path recursively without globbing</description>
  9763. <test-commands>
  9764. <command>-fs NAMENODE -mkdir -p dir0</command>
  9765. <command>-fs NAMENODE -mkdir -p dir0/dir1</command>
  9766. <command>-fs NAMENODE -touchz dir0/file0</command>
  9767. <command>-fs NAMENODE -touchz dir0/dir1/file1</command>
  9768. <command>-fs NAMENODE -touchz dir0/dir1/file2</command>
  9769. <command>-fs NAMENODE -mkdir -p dir2</command>
  9770. <command>-fs NAMENODE -mkdir -p dir2/dir1</command>
  9771. <command>-fs NAMENODE -touchz dir2/file0</command>
  9772. <command>-fs NAMENODE -touchz dir2/dir1/file1</command>
  9773. <command>-fs NAMENODE -touchz dir2/dir1/file2</command>
  9774. <command>-fs NAMENODE -chmod -R a+rwx dir0 dir2</command>
  9775. <command>-fs NAMENODE -ls -R dir*</command>
  9776. </test-commands>
  9777. <cleanup-commands>
  9778. <command>-fs NAMENODE -rm -r dir*</command>
  9779. </cleanup-commands>
  9780. <comparators>
  9781. <comparator>
  9782. <type>RegexpComparator</type>
  9783. <expected-output>^drwxrwxrwx( )*-( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/dir1</expected-output>
  9784. </comparator>
  9785. <comparator>
  9786. <type>RegexpComparator</type>
  9787. <expected-output>^-rwxrwxrwx( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/dir1/file1</expected-output>
  9788. </comparator>
  9789. <comparator>
  9790. <type>RegexpComparator</type>
  9791. <expected-output>^-rwxrwxrwx( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/dir1/file2</expected-output>
  9792. </comparator>
  9793. <comparator>
  9794. <type>RegexpComparator</type>
  9795. <expected-output>^-rwxrwxrwx( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/file0</expected-output>
  9796. </comparator>
  9797. <comparator>
  9798. <type>RegexpComparator</type>
  9799. <expected-output>^drwxrwxrwx( )*-( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir2/dir1</expected-output>
  9800. </comparator>
  9801. <comparator>
  9802. <type>RegexpComparator</type>
  9803. <expected-output>^-rwxrwxrwx( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir2/dir1/file1</expected-output>
  9804. </comparator>
  9805. <comparator>
  9806. <type>RegexpComparator</type>
  9807. <expected-output>^-rwxrwxrwx( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir2/dir1/file2</expected-output>
  9808. </comparator>
  9809. <comparator>
  9810. <type>RegexpComparator</type>
  9811. <expected-output>^-rwxrwxrwx( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir2/file0</expected-output>
  9812. </comparator>
  9813. </comparators>
  9814. </test>
  9815. <test> <!-- TESTED -->
  9816. <description>chmod: invalid value in octal mode of file in absolute path</description>
  9817. <test-commands>
  9818. <command>-fs NAMENODE -touchz /file1</command>
  9819. <command>-fs NAMENODE -chmod 999 /file1</command>
  9820. </test-commands>
  9821. <cleanup-commands>
  9822. <command>-fs NAMENODE -rm /file1</command>
  9823. </cleanup-commands>
  9824. <comparators>
  9825. <comparator>
  9826. <type>RegexpComparator</type>
  9827. <expected-output>^-chmod: chmod : mode '999' does not match the expected pattern.</expected-output>
  9828. </comparator>
  9829. </comparators>
  9830. </test>
  9831. <test> <!-- TESTED -->
  9832. <description>chmod: invalid value in octal mode of file in relative path</description>
  9833. <test-commands>
  9834. <command>-fs NAMENODE -touchz file1</command>
  9835. <command>-fs NAMENODE -chmod 999 file1</command>
  9836. </test-commands>
  9837. <cleanup-commands>
  9838. <command>-fs NAMENODE -rm file1</command>
  9839. </cleanup-commands>
  9840. <comparators>
  9841. <comparator>
  9842. <type>RegexpComparator</type>
  9843. <expected-output>^-chmod: chmod : mode '999' does not match the expected pattern.</expected-output>
  9844. </comparator>
  9845. </comparators>
  9846. </test>
  9847. <test> <!-- TESTED -->
  9848. <description>chmod: invalid value in normal mode of file in absolute path</description>
  9849. <test-commands>
  9850. <command>-fs NAMENODE -touchz /file1</command>
  9851. <command>-fs NAMENODE -chmod r+def /file1</command>
  9852. </test-commands>
  9853. <cleanup-commands>
  9854. <command>-fs NAMENODE -rm /file1</command>
  9855. </cleanup-commands>
  9856. <comparators>
  9857. <comparator>
  9858. <type>RegexpComparator</type>
  9859. <expected-output>^-chmod: chmod : mode \'r\+def\' does not match the expected pattern.</expected-output>
  9860. </comparator>
  9861. </comparators>
  9862. </test>
  9863. <test> <!-- TESTED -->
  9864. <description>chmod: invalid value in normal mode of file in relative path</description>
  9865. <test-commands>
  9866. <command>-fs NAMENODE -touchz file1</command>
  9867. <command>-fs NAMENODE -chmod r+def file1</command>
  9868. </test-commands>
  9869. <cleanup-commands>
  9870. <command>-fs NAMENODE -rm file1</command>
  9871. </cleanup-commands>
  9872. <comparators>
  9873. <comparator>
  9874. <type>RegexpComparator</type>
  9875. <expected-output>^-chmod: chmod : mode \'r\+def\' does not match the expected pattern.</expected-output>
  9876. </comparator>
  9877. </comparators>
  9878. </test>
  9879. <test> <!-- TESTED -->
  9880. <description>chmod: change permission(octal mode) of file in hdfs:// path</description>
  9881. <test-commands>
  9882. <command>-fs NAMENODE -touchz hdfs:///file1</command>
  9883. <command>-fs NAMENODE -chmod 777 hdfs:///file1</command>
  9884. <command>-fs NAMENODE -ls hdfs:///file1</command>
  9885. </test-commands>
  9886. <cleanup-commands>
  9887. <command>-fs NAMENODE -rm hdfs:///file1</command>
  9888. </cleanup-commands>
  9889. <comparators>
  9890. <comparator>
  9891. <type>RegexpComparator</type>
  9892. <expected-output>^-rwxrwxrwx( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///file1</expected-output>
  9893. </comparator>
  9894. </comparators>
  9895. </test>
  9896. <test> <!-- TESTED -->
  9897. <description>chmod: change permission(octal mode) of directory in hdfs:// path</description>
  9898. <test-commands>
  9899. <command>-fs NAMENODE -mkdir hdfs:///dir0</command>
  9900. <command>-fs NAMENODE -mkdir hdfs:///dir0/dir1</command>
  9901. <command>-fs NAMENODE -touchz hdfs:///dir0/file0</command>
  9902. <command>-fs NAMENODE -touchz hdfs:///dir0/dir1/file1</command>
  9903. <command>-fs NAMENODE -touchz hdfs:///dir0/dir1/file2</command>
  9904. <command>-fs NAMENODE -chmod 777 hdfs:///dir0/dir1</command>
  9905. <command>-fs NAMENODE -ls -R hdfs:///dir0</command>
  9906. </test-commands>
  9907. <cleanup-commands>
  9908. <command>-fs NAMENODE -rm -r hdfs:///dir0</command>
  9909. </cleanup-commands>
  9910. <comparators>
  9911. <comparator>
  9912. <type>RegexpComparator</type>
  9913. <expected-output>^drwxrwxrwx( )*-( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir0/dir1</expected-output>
  9914. </comparator>
  9915. <comparator>
  9916. <type>RegexpComparator</type>
  9917. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir0/dir1/file1</expected-output>
  9918. </comparator>
  9919. <comparator>
  9920. <type>RegexpComparator</type>
  9921. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir0/dir1/file2</expected-output>
  9922. </comparator>
  9923. <comparator>
  9924. <type>RegexpComparator</type>
  9925. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir0/file0</expected-output>
  9926. </comparator>
  9927. </comparators>
  9928. </test>
  9929. <test> <!-- TESTED -->
  9930. <description>chmod: change permission(normal mode) of file in hdfs:// path</description>
  9931. <test-commands>
  9932. <command>-fs NAMENODE -touchz hdfs:///file1</command>
  9933. <command>-fs NAMENODE -chmod a+rw hdfs:///file1</command>
  9934. <command>-fs NAMENODE -ls hdfs:///file1</command>
  9935. </test-commands>
  9936. <cleanup-commands>
  9937. <command>-fs NAMENODE -rm hdfs:///file1</command>
  9938. </cleanup-commands>
  9939. <comparators>
  9940. <comparator>
  9941. <type>RegexpComparator</type>
  9942. <expected-output>^-rw-rw-rw-( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///file1</expected-output>
  9943. </comparator>
  9944. </comparators>
  9945. </test>
  9946. <test> <!-- TESTED -->
  9947. <description>chmod: change permission(normal mode) of directory in hdfs:// path</description>
  9948. <test-commands>
  9949. <command>-fs NAMENODE -mkdir hdfs:///dir0</command>
  9950. <command>-fs NAMENODE -mkdir hdfs:///dir0/dir1</command>
  9951. <command>-fs NAMENODE -touchz hdfs:///dir0/file0</command>
  9952. <command>-fs NAMENODE -touchz hdfs:///dir0/dir1/file1</command>
  9953. <command>-fs NAMENODE -touchz hdfs:///dir0/dir1/file2</command>
  9954. <command>-fs NAMENODE -chmod a+rwx hdfs:///dir0/dir1</command>
  9955. <command>-fs NAMENODE -ls -R hdfs:///dir0</command>
  9956. </test-commands>
  9957. <cleanup-commands>
  9958. <command>-fs NAMENODE -rm -r hdfs:///dir0</command>
  9959. </cleanup-commands>
  9960. <comparators>
  9961. <comparator>
  9962. <type>RegexpComparator</type>
  9963. <expected-output>^drwxrwxrwx( )*-( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir0/dir1</expected-output>
  9964. </comparator>
  9965. <comparator>
  9966. <type>RegexpComparator</type>
  9967. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir0/dir1/file1</expected-output>
  9968. </comparator>
  9969. <comparator>
  9970. <type>RegexpComparator</type>
  9971. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir0/dir1/file2</expected-output>
  9972. </comparator>
  9973. <comparator>
  9974. <type>RegexpComparator</type>
  9975. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir0/file0</expected-output>
  9976. </comparator>
  9977. </comparators>
  9978. </test>
  9979. <test> <!-- TESTED -->
  9980. <description>chmod: change permission(octal mode) of directory in hdfs:// path recursively </description>
  9981. <test-commands>
  9982. <command>-fs NAMENODE -mkdir hdfs:///dir0</command>
  9983. <command>-fs NAMENODE -mkdir hdfs:///dir0/dir1</command>
  9984. <command>-fs NAMENODE -touchz hdfs:///dir0/file0</command>
  9985. <command>-fs NAMENODE -touchz hdfs:///dir0/dir1/file1</command>
  9986. <command>-fs NAMENODE -touchz hdfs:///dir0/dir1/file2</command>
  9987. <command>-fs NAMENODE -chmod -R 777 hdfs:///dir0/dir1</command>
  9988. <command>-fs NAMENODE -ls -R hdfs:///dir0</command>
  9989. </test-commands>
  9990. <cleanup-commands>
  9991. <command>-fs NAMENODE -rm -r hdfs:///dir0</command>
  9992. </cleanup-commands>
  9993. <comparators>
  9994. <comparator>
  9995. <type>RegexpComparator</type>
  9996. <expected-output>^drwxrwxrwx( )*-( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir0/dir1</expected-output>
  9997. </comparator>
  9998. <comparator>
  9999. <type>RegexpComparator</type>
  10000. <expected-output>^-rwxrwxrwx( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir0/dir1/file1</expected-output>
  10001. </comparator>
  10002. <comparator>
  10003. <type>RegexpComparator</type>
  10004. <expected-output>^-rwxrwxrwx( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir0/dir1/file2</expected-output>
  10005. </comparator>
  10006. <comparator>
  10007. <type>RegexpComparator</type>
  10008. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir0/file0</expected-output>
  10009. </comparator>
  10010. </comparators>
  10011. </test>
  10012. <test> <!-- TESTED -->
  10013. <description>chmod: change permission(normal mode) of directory in hdfs:// path recursively</description>
  10014. <test-commands>
  10015. <command>-fs NAMENODE -mkdir hdfs:///dir0</command>
  10016. <command>-fs NAMENODE -mkdir hdfs:///dir0/dir1</command>
  10017. <command>-fs NAMENODE -touchz hdfs:///dir0/file0</command>
  10018. <command>-fs NAMENODE -touchz hdfs:///dir0/dir1/file1</command>
  10019. <command>-fs NAMENODE -touchz hdfs:///dir0/dir1/file2</command>
  10020. <command>-fs NAMENODE -chmod -R a+rwx hdfs:///dir0/dir1</command>
  10021. <command>-fs NAMENODE -ls -R hdfs:///dir0</command>
  10022. </test-commands>
  10023. <cleanup-commands>
  10024. <command>-fs NAMENODE -rm -r hdfs:///dir0</command>
  10025. </cleanup-commands>
  10026. <comparators>
  10027. <comparator>
  10028. <type>RegexpComparator</type>
  10029. <expected-output>^drwxrwxrwx( )*-( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir0/dir1</expected-output>
  10030. </comparator>
  10031. <comparator>
  10032. <type>RegexpComparator</type>
  10033. <expected-output>^-rwxrwxrwx( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir0/dir1/file1</expected-output>
  10034. </comparator>
  10035. <comparator>
  10036. <type>RegexpComparator</type>
  10037. <expected-output>^-rwxrwxrwx( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir0/dir1/file2</expected-output>
  10038. </comparator>
  10039. <comparator>
  10040. <type>RegexpComparator</type>
  10041. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir0/file0</expected-output>
  10042. </comparator>
  10043. </comparators>
  10044. </test>
  10045. <test> <!-- TESTED -->
  10046. <description>chmod: change permission(octal mode) of non existent file in hdfs:// path</description>
  10047. <test-commands>
  10048. <command>-fs NAMENODE -chmod 777 hdfs:///file1</command>
  10049. </test-commands>
  10050. <cleanup-commands>
  10051. <command>-fs NAMENODE -rm hdfs:///file1</command>
  10052. </cleanup-commands>
  10053. <comparators>
  10054. <comparator>
  10055. <type>RegexpComparator</type>
  10056. <expected-output>^chmod: `hdfs:///file1': No such file or directory</expected-output>
  10057. </comparator>
  10058. </comparators>
  10059. </test>
  10060. <test> <!-- TESTED -->
  10061. <description>chmod: change permission(normal mode) of non existent file in hdfs:// path</description>
  10062. <test-commands>
  10063. <command>-fs NAMENODE -chmod a+rw hdfs:///file1</command>
  10064. </test-commands>
  10065. <cleanup-commands>
  10066. <command>-fs NAMENODE -rm hdfs:///file1</command>
  10067. </cleanup-commands>
  10068. <comparators>
  10069. <comparator>
  10070. <type>RegexpComparator</type>
  10071. <expected-output>^chmod: `hdfs:///file1': No such file or directory</expected-output>
  10072. </comparator>
  10073. </comparators>
  10074. </test>
  10075. <test> <!-- TESTED -->
  10076. <description>chmod: change permission(octal mode) of multiple files in hdfs:// path using globbing</description>
  10077. <test-commands>
  10078. <command>-fs NAMENODE -touchz hdfs:///file1</command>
  10079. <command>-fs NAMENODE -touchz hdfs:///file2</command>
  10080. <command>-fs NAMENODE -touchz hdfs:///file3</command>
  10081. <command>-fs NAMENODE -touchz hdfs:///file4</command>
  10082. <command>-fs NAMENODE -chmod 777 hdfs:///file* </command>
  10083. <command>-fs NAMENODE -ls -R hdfs:///file*</command>
  10084. </test-commands>
  10085. <cleanup-commands>
  10086. <command>-fs NAMENODE -rm hdfs:///file*</command>
  10087. </cleanup-commands>
  10088. <comparators>
  10089. <comparator>
  10090. <type>RegexpComparator</type>
  10091. <expected-output>^-rwxrwxrwx( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///file1</expected-output>
  10092. </comparator>
  10093. <comparator>
  10094. <type>RegexpComparator</type>
  10095. <expected-output>^-rwxrwxrwx( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///file2</expected-output>
  10096. </comparator>
  10097. <comparator>
  10098. <type>RegexpComparator</type>
  10099. <expected-output>^-rwxrwxrwx( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///file3</expected-output>
  10100. </comparator>
  10101. <comparator>
  10102. <type>RegexpComparator</type>
  10103. <expected-output>^-rwxrwxrwx( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///file4</expected-output>
  10104. </comparator>
  10105. </comparators>
  10106. </test>
  10107. <test> <!-- TESTED -->
  10108. <description>chmod: change permission(octal mode) of multiple directories in hdfs:// path using globbing</description>
  10109. <test-commands>
  10110. <command>-fs NAMENODE -mkdir hdfs:///dir0</command>
  10111. <command>-fs NAMENODE -mkdir hdfs:///dir0/dir1</command>
  10112. <command>-fs NAMENODE -touchz hdfs:///dir0/file0</command>
  10113. <command>-fs NAMENODE -touchz hdfs:///dir0/dir1/file1</command>
  10114. <command>-fs NAMENODE -touchz hdfs:///dir0/dir1/file2</command>
  10115. <command>-fs NAMENODE -mkdir hdfs:///dir2</command>
  10116. <command>-fs NAMENODE -mkdir hdfs:///dir2/dir1</command>
  10117. <command>-fs NAMENODE -touchz hdfs:///dir2/file0</command>
  10118. <command>-fs NAMENODE -touchz hdfs:///dir2/dir1/file1</command>
  10119. <command>-fs NAMENODE -touchz hdfs:///dir2/dir1/file2</command>
  10120. <command>-fs NAMENODE -chmod 777 hdfs:///dir*</command>
  10121. <command>-fs NAMENODE -ls -R hdfs:///dir*</command>
  10122. </test-commands>
  10123. <cleanup-commands>
  10124. <command>-fs NAMENODE -rm -r hdfs:///dir*</command>
  10125. </cleanup-commands>
  10126. <comparators>
  10127. <comparator>
  10128. <type>RegexpComparator</type>
  10129. <expected-output>^drwxr-xr-x( )*-( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir0/dir1</expected-output>
  10130. </comparator>
  10131. <comparator>
  10132. <type>RegexpComparator</type>
  10133. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir0/dir1/file1</expected-output>
  10134. </comparator>
  10135. <comparator>
  10136. <type>RegexpComparator</type>
  10137. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir0/dir1/file2</expected-output>
  10138. </comparator>
  10139. <comparator>
  10140. <type>RegexpComparator</type>
  10141. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir0/file0</expected-output>
  10142. </comparator>
  10143. <comparator>
  10144. <type>RegexpComparator</type>
  10145. <expected-output>^drwxr-xr-x( )*-( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir2/dir1</expected-output>
  10146. </comparator>
  10147. <comparator>
  10148. <type>RegexpComparator</type>
  10149. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir2/dir1/file1</expected-output>
  10150. </comparator>
  10151. <comparator>
  10152. <type>RegexpComparator</type>
  10153. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir2/dir1/file2</expected-output>
  10154. </comparator>
  10155. <comparator>
  10156. <type>RegexpComparator</type>
  10157. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir2/file0</expected-output>
  10158. </comparator>
  10159. </comparators>
  10160. </test>
  10161. <test> <!-- TESTED -->
  10162. <description>chmod: change permission(octal mode) of multiple files in hdfs:// path without globbing</description>
  10163. <test-commands>
  10164. <command>-fs NAMENODE -touchz hdfs:///file1</command>
  10165. <command>-fs NAMENODE -touchz hdfs:///file2</command>
  10166. <command>-fs NAMENODE -touchz hdfs:///file3</command>
  10167. <command>-fs NAMENODE -touchz hdfs:///file4</command>
  10168. <command>-fs NAMENODE -chmod 777 hdfs:///file1 hdfs:///file2 hdfs:///file3 hdfs:///file4 </command>
  10169. <command>-fs NAMENODE -ls -R hdfs:///file*</command>
  10170. </test-commands>
  10171. <cleanup-commands>
  10172. <command>-fs NAMENODE -rm hdfs:///file*</command>
  10173. </cleanup-commands>
  10174. <comparators>
  10175. <comparator>
  10176. <type>RegexpComparator</type>
  10177. <expected-output>^-rwxrwxrwx( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///file1</expected-output>
  10178. </comparator>
  10179. <comparator>
  10180. <type>RegexpComparator</type>
  10181. <expected-output>^-rwxrwxrwx( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///file2</expected-output>
  10182. </comparator>
  10183. <comparator>
  10184. <type>RegexpComparator</type>
  10185. <expected-output>^-rwxrwxrwx( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///file3</expected-output>
  10186. </comparator>
  10187. <comparator>
  10188. <type>RegexpComparator</type>
  10189. <expected-output>^-rwxrwxrwx( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///file4</expected-output>
  10190. </comparator>
  10191. </comparators>
  10192. </test>
  10193. <test> <!-- TESTED -->
  10194. <description>chmod: change permission(octal mode) of multiple directories in hdfs:// path without globbing</description>
  10195. <test-commands>
  10196. <command>-fs NAMENODE -mkdir hdfs:///dir0</command>
  10197. <command>-fs NAMENODE -mkdir hdfs:///dir0/dir1</command>
  10198. <command>-fs NAMENODE -touchz hdfs:///dir0/file0</command>
  10199. <command>-fs NAMENODE -touchz hdfs:///dir0/dir1/file1</command>
  10200. <command>-fs NAMENODE -touchz hdfs:///dir0/dir1/file2</command>
  10201. <command>-fs NAMENODE -mkdir hdfs:///dir2</command>
  10202. <command>-fs NAMENODE -mkdir hdfs:///dir2/dir1</command>
  10203. <command>-fs NAMENODE -touchz hdfs:///dir2/file0</command>
  10204. <command>-fs NAMENODE -touchz hdfs:///dir2/dir1/file1</command>
  10205. <command>-fs NAMENODE -touchz hdfs:///dir2/dir1/file2</command>
  10206. <command>-fs NAMENODE -chmod 777 hdfs:///dir0 hdfs:///dir2</command>
  10207. <command>-fs NAMENODE -ls -R hdfs:///dir*</command>
  10208. </test-commands>
  10209. <cleanup-commands>
  10210. <command>-fs NAMENODE -rm -r hdfs:///dir*</command>
  10211. </cleanup-commands>
  10212. <comparators>
  10213. <comparator>
  10214. <type>RegexpComparator</type>
  10215. <expected-output>^drwxr-xr-x( )*-( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir0/dir1</expected-output>
  10216. </comparator>
  10217. <comparator>
  10218. <type>RegexpComparator</type>
  10219. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir0/dir1/file1</expected-output>
  10220. </comparator>
  10221. <comparator>
  10222. <type>RegexpComparator</type>
  10223. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir0/dir1/file2</expected-output>
  10224. </comparator>
  10225. <comparator>
  10226. <type>RegexpComparator</type>
  10227. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir0/file0</expected-output>
  10228. </comparator>
  10229. <comparator>
  10230. <type>RegexpComparator</type>
  10231. <expected-output>^drwxr-xr-x( )*-( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir2/dir1</expected-output>
  10232. </comparator>
  10233. <comparator>
  10234. <type>RegexpComparator</type>
  10235. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir2/dir1/file1</expected-output>
  10236. </comparator>
  10237. <comparator>
  10238. <type>RegexpComparator</type>
  10239. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir2/dir1/file2</expected-output>
  10240. </comparator>
  10241. <comparator>
  10242. <type>RegexpComparator</type>
  10243. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir2/file0</expected-output>
  10244. </comparator>
  10245. </comparators>
  10246. </test>
  10247. <test> <!-- TESTED -->
  10248. <description>chmod: change permission(normal mode) of multiple files in hdfs:// path using globbing</description>
  10249. <test-commands>
  10250. <command>-fs NAMENODE -touchz hdfs:///file1</command>
  10251. <command>-fs NAMENODE -touchz hdfs:///file2</command>
  10252. <command>-fs NAMENODE -touchz hdfs:///file3</command>
  10253. <command>-fs NAMENODE -touchz hdfs:///file4</command>
  10254. <command>-fs NAMENODE -chmod a+rw hdfs:///file* </command>
  10255. <command>-fs NAMENODE -ls -R hdfs:///file*</command>
  10256. </test-commands>
  10257. <cleanup-commands>
  10258. <command>-fs NAMENODE -rm hdfs:///file*</command>
  10259. </cleanup-commands>
  10260. <comparators>
  10261. <comparator>
  10262. <type>RegexpComparator</type>
  10263. <expected-output>^-rw-rw-rw-( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///file1</expected-output>
  10264. </comparator>
  10265. <comparator>
  10266. <type>RegexpComparator</type>
  10267. <expected-output>^-rw-rw-rw-( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///file2</expected-output>
  10268. </comparator>
  10269. <comparator>
  10270. <type>RegexpComparator</type>
  10271. <expected-output>^-rw-rw-rw-( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///file3</expected-output>
  10272. </comparator>
  10273. <comparator>
  10274. <type>RegexpComparator</type>
  10275. <expected-output>^-rw-rw-rw-( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///file4</expected-output>
  10276. </comparator>
  10277. </comparators>
  10278. </test>
  10279. <test> <!-- TESTED -->
  10280. <description>chmod: change permission(normal mode) of multiple directories in hdfs:// path using globbing</description>
  10281. <test-commands>
  10282. <command>-fs NAMENODE -mkdir hdfs:///dir0</command>
  10283. <command>-fs NAMENODE -mkdir hdfs:///dir0/dir1</command>
  10284. <command>-fs NAMENODE -touchz hdfs:///dir0/file0</command>
  10285. <command>-fs NAMENODE -touchz hdfs:///dir0/dir1/file1</command>
  10286. <command>-fs NAMENODE -touchz hdfs:///dir0/dir1/file2</command>
  10287. <command>-fs NAMENODE -mkdir hdfs:///dir2</command>
  10288. <command>-fs NAMENODE -mkdir hdfs:///dir2/dir1</command>
  10289. <command>-fs NAMENODE -touchz hdfs:///dir2/file0</command>
  10290. <command>-fs NAMENODE -touchz hdfs:///dir2/dir1/file1</command>
  10291. <command>-fs NAMENODE -touchz hdfs:///dir2/dir1/file2</command>
  10292. <command>-fs NAMENODE -chmod a+rwx hdfs:///dir*</command>
  10293. <command>-fs NAMENODE -ls -R hdfs:///dir*</command>
  10294. </test-commands>
  10295. <cleanup-commands>
  10296. <command>-fs NAMENODE -rm -r hdfs:///dir*</command>
  10297. </cleanup-commands>
  10298. <comparators>
  10299. <comparator>
  10300. <type>RegexpComparator</type>
  10301. <expected-output>^drwxr-xr-x( )*-( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir0/dir1</expected-output>
  10302. </comparator>
  10303. <comparator>
  10304. <type>RegexpComparator</type>
  10305. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir0/dir1/file1</expected-output>
  10306. </comparator>
  10307. <comparator>
  10308. <type>RegexpComparator</type>
  10309. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir0/dir1/file2</expected-output>
  10310. </comparator>
  10311. <comparator>
  10312. <type>RegexpComparator</type>
  10313. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir0/file0</expected-output>
  10314. </comparator>
  10315. <comparator>
  10316. <type>RegexpComparator</type>
  10317. <expected-output>^drwxr-xr-x( )*-( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir2/dir1</expected-output>
  10318. </comparator>
  10319. <comparator>
  10320. <type>RegexpComparator</type>
  10321. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir2/dir1/file1</expected-output>
  10322. </comparator>
  10323. <comparator>
  10324. <type>RegexpComparator</type>
  10325. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir2/dir1/file2</expected-output>
  10326. </comparator>
  10327. <comparator>
  10328. <type>RegexpComparator</type>
  10329. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir2/file0</expected-output>
  10330. </comparator>
  10331. </comparators>
  10332. </test>
  10333. <test> <!-- TESTED -->
  10334. <description>chmod: change permission(normal mode) of multiple files in hdfs:// path without globbing</description>
  10335. <test-commands>
  10336. <command>-fs NAMENODE -touchz hdfs:///file1</command>
  10337. <command>-fs NAMENODE -touchz hdfs:///file2</command>
  10338. <command>-fs NAMENODE -touchz hdfs:///file3</command>
  10339. <command>-fs NAMENODE -touchz hdfs:///file4</command>
  10340. <command>-fs NAMENODE -chmod a+rw hdfs:///file1 hdfs:///file2 hdfs:///file3 hdfs:///file4 </command>
  10341. <command>-fs NAMENODE -ls -R hdfs:///file*</command>
  10342. </test-commands>
  10343. <cleanup-commands>
  10344. <command>-fs NAMENODE -rm hdfs:///file*</command>
  10345. </cleanup-commands>
  10346. <comparators>
  10347. <comparator>
  10348. <type>RegexpComparator</type>
  10349. <expected-output>^-rw-rw-rw-( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///file1</expected-output>
  10350. </comparator>
  10351. <comparator>
  10352. <type>RegexpComparator</type>
  10353. <expected-output>^-rw-rw-rw-( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///file2</expected-output>
  10354. </comparator>
  10355. <comparator>
  10356. <type>RegexpComparator</type>
  10357. <expected-output>^-rw-rw-rw-( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///file3</expected-output>
  10358. </comparator>
  10359. <comparator>
  10360. <type>RegexpComparator</type>
  10361. <expected-output>^-rw-rw-rw-( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///file4</expected-output>
  10362. </comparator>
  10363. </comparators>
  10364. </test>
  10365. <test> <!-- TESTED -->
  10366. <description>chmod: change permission(normal mode) of multiple directories in hdfs:// path without globbing</description>
  10367. <test-commands>
  10368. <command>-fs NAMENODE -mkdir hdfs:///dir0</command>
  10369. <command>-fs NAMENODE -mkdir hdfs:///dir0/dir1</command>
  10370. <command>-fs NAMENODE -touchz hdfs:///dir0/file0</command>
  10371. <command>-fs NAMENODE -touchz hdfs:///dir0/dir1/file1</command>
  10372. <command>-fs NAMENODE -touchz hdfs:///dir0/dir1/file2</command>
  10373. <command>-fs NAMENODE -mkdir hdfs:///dir2</command>
  10374. <command>-fs NAMENODE -mkdir hdfs:///dir2/dir1</command>
  10375. <command>-fs NAMENODE -touchz hdfs:///dir2/file0</command>
  10376. <command>-fs NAMENODE -touchz hdfs:///dir2/dir1/file1</command>
  10377. <command>-fs NAMENODE -touchz hdfs:///dir2/dir1/file2</command>
  10378. <command>-fs NAMENODE -chmod a+rwx hdfs:///dir0 hdfs:///dir2</command>
  10379. <command>-fs NAMENODE -ls -R hdfs:///dir*</command>
  10380. </test-commands>
  10381. <cleanup-commands>
  10382. <command>-fs NAMENODE -rm -r hdfs:///dir*</command>
  10383. </cleanup-commands>
  10384. <comparators>
  10385. <comparator>
  10386. <type>RegexpComparator</type>
  10387. <expected-output>^drwxr-xr-x( )*-( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir0/dir1</expected-output>
  10388. </comparator>
  10389. <comparator>
  10390. <type>RegexpComparator</type>
  10391. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir0/dir1/file1</expected-output>
  10392. </comparator>
  10393. <comparator>
  10394. <type>RegexpComparator</type>
  10395. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir0/dir1/file2</expected-output>
  10396. </comparator>
  10397. <comparator>
  10398. <type>RegexpComparator</type>
  10399. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir0/file0</expected-output>
  10400. </comparator>
  10401. <comparator>
  10402. <type>RegexpComparator</type>
  10403. <expected-output>^drwxr-xr-x( )*-( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir2/dir1</expected-output>
  10404. </comparator>
  10405. <comparator>
  10406. <type>RegexpComparator</type>
  10407. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir2/dir1/file1</expected-output>
  10408. </comparator>
  10409. <comparator>
  10410. <type>RegexpComparator</type>
  10411. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir2/dir1/file2</expected-output>
  10412. </comparator>
  10413. <comparator>
  10414. <type>RegexpComparator</type>
  10415. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir2/file0</expected-output>
  10416. </comparator>
  10417. </comparators>
  10418. </test>
  10419. <test> <!-- TESTED -->
  10420. <description>chmod: change permission(octal mode) of multiple directories in hdfs:// path recursively using globbing</description>
  10421. <test-commands>
  10422. <command>-fs NAMENODE -mkdir hdfs:///dir0</command>
  10423. <command>-fs NAMENODE -mkdir hdfs:///dir0/dir1</command>
  10424. <command>-fs NAMENODE -touchz hdfs:///dir0/file0</command>
  10425. <command>-fs NAMENODE -touchz hdfs:///dir0/dir1/file1</command>
  10426. <command>-fs NAMENODE -touchz hdfs:///dir0/dir1/file2</command>
  10427. <command>-fs NAMENODE -mkdir hdfs:///dir2</command>
  10428. <command>-fs NAMENODE -mkdir hdfs:///dir2/dir1</command>
  10429. <command>-fs NAMENODE -touchz hdfs:///dir2/file0</command>
  10430. <command>-fs NAMENODE -touchz hdfs:///dir2/dir1/file1</command>
  10431. <command>-fs NAMENODE -touchz hdfs:///dir2/dir1/file2</command>
  10432. <command>-fs NAMENODE -chmod -R 777 hdfs:///dir*</command>
  10433. <command>-fs NAMENODE -ls -R hdfs:///dir*</command>
  10434. </test-commands>
  10435. <cleanup-commands>
  10436. <command>-fs NAMENODE -rm -r hdfs:///dir*</command>
  10437. </cleanup-commands>
  10438. <comparators>
  10439. <comparator>
  10440. <type>RegexpComparator</type>
  10441. <expected-output>^drwxrwxrwx( )*-( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir0/dir1</expected-output>
  10442. </comparator>
  10443. <comparator>
  10444. <type>RegexpComparator</type>
  10445. <expected-output>^-rwxrwxrwx( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir0/dir1/file1</expected-output>
  10446. </comparator>
  10447. <comparator>
  10448. <type>RegexpComparator</type>
  10449. <expected-output>^-rwxrwxrwx( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir0/dir1/file2</expected-output>
  10450. </comparator>
  10451. <comparator>
  10452. <type>RegexpComparator</type>
  10453. <expected-output>^-rwxrwxrwx( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir0/file0</expected-output>
  10454. </comparator>
  10455. <comparator>
  10456. <type>RegexpComparator</type>
  10457. <expected-output>^drwxrwxrwx( )*-( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir2/dir1</expected-output>
  10458. </comparator>
  10459. <comparator>
  10460. <type>RegexpComparator</type>
  10461. <expected-output>^-rwxrwxrwx( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir2/dir1/file1</expected-output>
  10462. </comparator>
  10463. <comparator>
  10464. <type>RegexpComparator</type>
  10465. <expected-output>^-rwxrwxrwx( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir2/dir1/file2</expected-output>
  10466. </comparator>
  10467. <comparator>
  10468. <type>RegexpComparator</type>
  10469. <expected-output>^-rwxrwxrwx( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir2/file0</expected-output>
  10470. </comparator>
  10471. </comparators>
  10472. </test>
  10473. <test> <!-- TESTED -->
  10474. <description>chmod: change permission(octal mode) of multiple directories in hdfs:// path recursively without globbing</description>
  10475. <test-commands>
  10476. <command>-fs NAMENODE -mkdir hdfs:///dir0</command>
  10477. <command>-fs NAMENODE -mkdir hdfs:///dir0/dir1</command>
  10478. <command>-fs NAMENODE -touchz hdfs:///dir0/file0</command>
  10479. <command>-fs NAMENODE -touchz hdfs:///dir0/dir1/file1</command>
  10480. <command>-fs NAMENODE -touchz hdfs:///dir0/dir1/file2</command>
  10481. <command>-fs NAMENODE -mkdir hdfs:///dir2</command>
  10482. <command>-fs NAMENODE -mkdir hdfs:///dir2/dir1</command>
  10483. <command>-fs NAMENODE -touchz hdfs:///dir2/file0</command>
  10484. <command>-fs NAMENODE -touchz hdfs:///dir2/dir1/file1</command>
  10485. <command>-fs NAMENODE -touchz hdfs:///dir2/dir1/file2</command>
  10486. <command>-fs NAMENODE -chmod -R 777 hdfs:///dir0 hdfs:///dir2</command>
  10487. <command>-fs NAMENODE -ls -R hdfs:///dir*</command>
  10488. </test-commands>
  10489. <cleanup-commands>
  10490. <command>-fs NAMENODE -rm -r hdfs:///dir*</command>
  10491. </cleanup-commands>
  10492. <comparators>
  10493. <comparator>
  10494. <type>RegexpComparator</type>
  10495. <expected-output>^drwxrwxrwx( )*-( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir0/dir1</expected-output>
  10496. </comparator>
  10497. <comparator>
  10498. <type>RegexpComparator</type>
  10499. <expected-output>^-rwxrwxrwx( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir0/dir1/file1</expected-output>
  10500. </comparator>
  10501. <comparator>
  10502. <type>RegexpComparator</type>
  10503. <expected-output>^-rwxrwxrwx( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir0/dir1/file2</expected-output>
  10504. </comparator>
  10505. <comparator>
  10506. <type>RegexpComparator</type>
  10507. <expected-output>^-rwxrwxrwx( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir0/file0</expected-output>
  10508. </comparator>
  10509. <comparator>
  10510. <type>RegexpComparator</type>
  10511. <expected-output>^drwxrwxrwx( )*-( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir2/dir1</expected-output>
  10512. </comparator>
  10513. <comparator>
  10514. <type>RegexpComparator</type>
  10515. <expected-output>^-rwxrwxrwx( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir2/dir1/file1</expected-output>
  10516. </comparator>
  10517. <comparator>
  10518. <type>RegexpComparator</type>
  10519. <expected-output>^-rwxrwxrwx( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir2/dir1/file2</expected-output>
  10520. </comparator>
  10521. <comparator>
  10522. <type>RegexpComparator</type>
  10523. <expected-output>^-rwxrwxrwx( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir2/file0</expected-output>
  10524. </comparator>
  10525. </comparators>
  10526. </test>
  10527. <test> <!-- TESTED -->
  10528. <description>chmod: change permission(normal mode) of multiple directories in hdfs:// path recursively using globbing</description>
  10529. <test-commands>
  10530. <command>-fs NAMENODE -mkdir hdfs:///dir0</command>
  10531. <command>-fs NAMENODE -mkdir hdfs:///dir0/dir1</command>
  10532. <command>-fs NAMENODE -touchz hdfs:///dir0/file0</command>
  10533. <command>-fs NAMENODE -touchz hdfs:///dir0/dir1/file1</command>
  10534. <command>-fs NAMENODE -touchz hdfs:///dir0/dir1/file2</command>
  10535. <command>-fs NAMENODE -mkdir hdfs:///dir2</command>
  10536. <command>-fs NAMENODE -mkdir hdfs:///dir2/dir1</command>
  10537. <command>-fs NAMENODE -touchz hdfs:///dir2/file0</command>
  10538. <command>-fs NAMENODE -touchz hdfs:///dir2/dir1/file1</command>
  10539. <command>-fs NAMENODE -touchz hdfs:///dir2/dir1/file2</command>
  10540. <command>-fs NAMENODE -chmod -R a+rwx hdfs:///dir*</command>
  10541. <command>-fs NAMENODE -ls -R hdfs:///dir*</command>
  10542. </test-commands>
  10543. <cleanup-commands>
  10544. <command>-fs NAMENODE -rm -r hdfs:///dir*</command>
  10545. </cleanup-commands>
  10546. <comparators>
  10547. <comparator>
  10548. <type>RegexpComparator</type>
  10549. <expected-output>^drwxrwxrwx( )*-( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir0/dir1</expected-output>
  10550. </comparator>
  10551. <comparator>
  10552. <type>RegexpComparator</type>
  10553. <expected-output>^-rwxrwxrwx( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir0/dir1/file1</expected-output>
  10554. </comparator>
  10555. <comparator>
  10556. <type>RegexpComparator</type>
  10557. <expected-output>^-rwxrwxrwx( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir0/dir1/file2</expected-output>
  10558. </comparator>
  10559. <comparator>
  10560. <type>RegexpComparator</type>
  10561. <expected-output>^-rwxrwxrwx( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir0/file0</expected-output>
  10562. </comparator>
  10563. <comparator>
  10564. <type>RegexpComparator</type>
  10565. <expected-output>^drwxrwxrwx( )*-( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir2/dir1</expected-output>
  10566. </comparator>
  10567. <comparator>
  10568. <type>RegexpComparator</type>
  10569. <expected-output>^-rwxrwxrwx( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir2/dir1/file1</expected-output>
  10570. </comparator>
  10571. <comparator>
  10572. <type>RegexpComparator</type>
  10573. <expected-output>^-rwxrwxrwx( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir2/dir1/file2</expected-output>
  10574. </comparator>
  10575. <comparator>
  10576. <type>RegexpComparator</type>
  10577. <expected-output>^-rwxrwxrwx( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir2/file0</expected-output>
  10578. </comparator>
  10579. </comparators>
  10580. </test>
  10581. <test> <!-- TESTED -->
  10582. <description>chmod: change permission(normal mode) of multiple directories in hdfs:// path recursively without globbing</description>
  10583. <test-commands>
  10584. <command>-fs NAMENODE -mkdir hdfs:///dir0</command>
  10585. <command>-fs NAMENODE -mkdir hdfs:///dir0/dir1</command>
  10586. <command>-fs NAMENODE -touchz hdfs:///dir0/file0</command>
  10587. <command>-fs NAMENODE -touchz hdfs:///dir0/dir1/file1</command>
  10588. <command>-fs NAMENODE -touchz hdfs:///dir0/dir1/file2</command>
  10589. <command>-fs NAMENODE -mkdir hdfs:///dir2</command>
  10590. <command>-fs NAMENODE -mkdir hdfs:///dir2/dir1</command>
  10591. <command>-fs NAMENODE -touchz hdfs:///dir2/file0</command>
  10592. <command>-fs NAMENODE -touchz hdfs:///dir2/dir1/file1</command>
  10593. <command>-fs NAMENODE -touchz hdfs:///dir2/dir1/file2</command>
  10594. <command>-fs NAMENODE -chmod -R a+rwx hdfs:///dir0 hdfs:///dir2</command>
  10595. <command>-fs NAMENODE -ls -R hdfs:///dir*</command>
  10596. </test-commands>
  10597. <cleanup-commands>
  10598. <command>-fs NAMENODE -rm -r hdfs:///dir*</command>
  10599. </cleanup-commands>
  10600. <comparators>
  10601. <comparator>
  10602. <type>RegexpComparator</type>
  10603. <expected-output>^drwxrwxrwx( )*-( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir0/dir1</expected-output>
  10604. </comparator>
  10605. <comparator>
  10606. <type>RegexpComparator</type>
  10607. <expected-output>^-rwxrwxrwx( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir0/dir1/file1</expected-output>
  10608. </comparator>
  10609. <comparator>
  10610. <type>RegexpComparator</type>
  10611. <expected-output>^-rwxrwxrwx( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir0/dir1/file2</expected-output>
  10612. </comparator>
  10613. <comparator>
  10614. <type>RegexpComparator</type>
  10615. <expected-output>^-rwxrwxrwx( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir0/file0</expected-output>
  10616. </comparator>
  10617. <comparator>
  10618. <type>RegexpComparator</type>
  10619. <expected-output>^drwxrwxrwx( )*-( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir2/dir1</expected-output>
  10620. </comparator>
  10621. <comparator>
  10622. <type>RegexpComparator</type>
  10623. <expected-output>^-rwxrwxrwx( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir2/dir1/file1</expected-output>
  10624. </comparator>
  10625. <comparator>
  10626. <type>RegexpComparator</type>
  10627. <expected-output>^-rwxrwxrwx( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir2/dir1/file2</expected-output>
  10628. </comparator>
  10629. <comparator>
  10630. <type>RegexpComparator</type>
  10631. <expected-output>^-rwxrwxrwx( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir2/file0</expected-output>
  10632. </comparator>
  10633. </comparators>
  10634. </test>
  10635. <test> <!-- TESTED -->
  10636. <description>chmod: invalid value in octal mode of file in hdfs:// path</description>
  10637. <test-commands>
  10638. <command>-fs NAMENODE -touchz hdfs:///file1</command>
  10639. <command>-fs NAMENODE -chmod 999 hdfs:///file1</command>
  10640. </test-commands>
  10641. <cleanup-commands>
  10642. <command>-fs NAMENODE -rm hdfs:///file1</command>
  10643. </cleanup-commands>
  10644. <comparators>
  10645. <comparator>
  10646. <type>RegexpComparator</type>
  10647. <expected-output>^-chmod: chmod : mode '999' does not match the expected pattern.</expected-output>
  10648. </comparator>
  10649. </comparators>
  10650. </test>
  10651. <test> <!-- TESTED -->
  10652. <description>chmod: invalid value in normal mode of file in hdfs:// path</description>
  10653. <test-commands>
  10654. <command>-fs NAMENODE -touchz hdfs:///file1</command>
  10655. <command>-fs NAMENODE -chmod rdef hdfs:///file1</command>
  10656. </test-commands>
  10657. <cleanup-commands>
  10658. <command>-fs NAMENODE -rm hdfs:///file1</command>
  10659. </cleanup-commands>
  10660. <comparators>
  10661. <comparator>
  10662. <type>RegexpComparator</type>
  10663. <expected-output>^-chmod: chmod : mode \'rdef\' does not match the expected pattern.</expected-output>
  10664. </comparator>
  10665. </comparators>
  10666. </test>
  10667. <!-- Tests for chmod -->
  10668. <test> <!-- TESTED -->
  10669. <description>chmod: change permission(octal mode) of file in Namenode's path</description>
  10670. <test-commands>
  10671. <command>-fs NAMENODE -touchz NAMENODE/file1</command>
  10672. <command>-fs NAMENODE -chmod 777 NAMENODE/file1</command>
  10673. <command>-fs NAMENODE -ls NAMENODE/file1</command>
  10674. </test-commands>
  10675. <cleanup-commands>
  10676. <command>-fs NAMENODE -rm NAMENODE/file1</command>
  10677. </cleanup-commands>
  10678. <comparators>
  10679. <comparator>
  10680. <type>RegexpComparator</type>
  10681. <expected-output>^-rwxrwxrwx( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/file1</expected-output>
  10682. </comparator>
  10683. </comparators>
  10684. </test>
  10685. <test> <!-- TESTED -->
  10686. <description>chmod: change permission(octal mode) of directory in Namenode's path</description>
  10687. <test-commands>
  10688. <command>-fs NAMENODE -mkdir NAMENODE/dir0</command>
  10689. <command>-fs NAMENODE -mkdir NAMENODE/dir0/dir1</command>
  10690. <command>-fs NAMENODE -touchz NAMENODE/dir0/file0</command>
  10691. <command>-fs NAMENODE -touchz NAMENODE/dir0/dir1/file1</command>
  10692. <command>-fs NAMENODE -touchz NAMENODE/dir0/dir1/file2</command>
  10693. <command>-fs NAMENODE -chmod 777 NAMENODE/dir0/dir1</command>
  10694. <command>-fs NAMENODE -ls -R NAMENODE/dir0</command>
  10695. </test-commands>
  10696. <cleanup-commands>
  10697. <command>-fs NAMENODE -rm -r NAMENODE/dir0</command>
  10698. </cleanup-commands>
  10699. <comparators>
  10700. <comparator>
  10701. <type>RegexpComparator</type>
  10702. <expected-output>^drwxrwxrwx( )*-( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir0/dir1</expected-output>
  10703. </comparator>
  10704. <comparator>
  10705. <type>RegexpComparator</type>
  10706. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir0/dir1/file1</expected-output>
  10707. </comparator>
  10708. <comparator>
  10709. <type>RegexpComparator</type>
  10710. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir0/dir1/file2</expected-output>
  10711. </comparator>
  10712. <comparator>
  10713. <type>RegexpComparator</type>
  10714. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir0/file0</expected-output>
  10715. </comparator>
  10716. </comparators>
  10717. </test>
  10718. <test> <!-- TESTED -->
  10719. <description>chmod: change permission(normal mode) of file in Namenode's path</description>
  10720. <test-commands>
  10721. <command>-fs NAMENODE -touchz NAMENODE/file1</command>
  10722. <command>-fs NAMENODE -chmod a+rw NAMENODE/file1</command>
  10723. <command>-fs NAMENODE -ls NAMENODE/file1</command>
  10724. </test-commands>
  10725. <cleanup-commands>
  10726. <command>-fs NAMENODE -rm NAMENODE/file1</command>
  10727. </cleanup-commands>
  10728. <comparators>
  10729. <comparator>
  10730. <type>RegexpComparator</type>
  10731. <expected-output>^-rw-rw-rw-( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/file1</expected-output>
  10732. </comparator>
  10733. </comparators>
  10734. </test>
  10735. <test> <!-- TESTED -->
  10736. <description>chmod: change permission(normal mode) of directory in Namenode's path</description>
  10737. <test-commands>
  10738. <command>-fs NAMENODE -mkdir NAMENODE/dir0</command>
  10739. <command>-fs NAMENODE -mkdir NAMENODE/dir0/dir1</command>
  10740. <command>-fs NAMENODE -touchz NAMENODE/dir0/file0</command>
  10741. <command>-fs NAMENODE -touchz NAMENODE/dir0/dir1/file1</command>
  10742. <command>-fs NAMENODE -touchz NAMENODE/dir0/dir1/file2</command>
  10743. <command>-fs NAMENODE -chmod a+rwx NAMENODE/dir0/dir1</command>
  10744. <command>-fs NAMENODE -ls -R NAMENODE/dir0</command>
  10745. </test-commands>
  10746. <cleanup-commands>
  10747. <command>-fs NAMENODE -rm -r NAMENODE/dir0</command>
  10748. </cleanup-commands>
  10749. <comparators>
  10750. <comparator>
  10751. <type>RegexpComparator</type>
  10752. <expected-output>^drwxrwxrwx( )*-( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir0/dir1</expected-output>
  10753. </comparator>
  10754. <comparator>
  10755. <type>RegexpComparator</type>
  10756. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir0/dir1/file1</expected-output>
  10757. </comparator>
  10758. <comparator>
  10759. <type>RegexpComparator</type>
  10760. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir0/dir1/file2</expected-output>
  10761. </comparator>
  10762. <comparator>
  10763. <type>RegexpComparator</type>
  10764. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir0/file0</expected-output>
  10765. </comparator>
  10766. </comparators>
  10767. </test>
  10768. <test> <!-- TESTED -->
  10769. <description>chmod: change permission(octal mode) of directory in Namenode's path recursively </description>
  10770. <test-commands>
  10771. <command>-fs NAMENODE -mkdir NAMENODE/dir0</command>
  10772. <command>-fs NAMENODE -mkdir NAMENODE/dir0/dir1</command>
  10773. <command>-fs NAMENODE -touchz NAMENODE/dir0/file0</command>
  10774. <command>-fs NAMENODE -touchz NAMENODE/dir0/dir1/file1</command>
  10775. <command>-fs NAMENODE -touchz NAMENODE/dir0/dir1/file2</command>
  10776. <command>-fs NAMENODE -chmod -R 777 NAMENODE/dir0/dir1</command>
  10777. <command>-fs NAMENODE -ls -R NAMENODE/dir0</command>
  10778. </test-commands>
  10779. <cleanup-commands>
  10780. <command>-fs NAMENODE -rm -r NAMENODE/dir0</command>
  10781. </cleanup-commands>
  10782. <comparators>
  10783. <comparator>
  10784. <type>RegexpComparator</type>
  10785. <expected-output>^drwxrwxrwx( )*-( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir0/dir1</expected-output>
  10786. </comparator>
  10787. <comparator>
  10788. <type>RegexpComparator</type>
  10789. <expected-output>^-rwxrwxrwx( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir0/dir1/file1</expected-output>
  10790. </comparator>
  10791. <comparator>
  10792. <type>RegexpComparator</type>
  10793. <expected-output>^-rwxrwxrwx( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir0/dir1/file2</expected-output>
  10794. </comparator>
  10795. <comparator>
  10796. <type>RegexpComparator</type>
  10797. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir0/file0</expected-output>
  10798. </comparator>
  10799. </comparators>
  10800. </test>
  10801. <test> <!-- TESTED -->
  10802. <description>chmod: change permission(normal mode) of directory in Namenode's path recursively</description>
  10803. <test-commands>
  10804. <command>-fs NAMENODE -mkdir NAMENODE/dir0</command>
  10805. <command>-fs NAMENODE -mkdir NAMENODE/dir0/dir1</command>
  10806. <command>-fs NAMENODE -touchz NAMENODE/dir0/file0</command>
  10807. <command>-fs NAMENODE -touchz NAMENODE/dir0/dir1/file1</command>
  10808. <command>-fs NAMENODE -touchz NAMENODE/dir0/dir1/file2</command>
  10809. <command>-fs NAMENODE -chmod -R a+rwx NAMENODE/dir0/dir1</command>
  10810. <command>-fs NAMENODE -ls -R NAMENODE/dir0</command>
  10811. </test-commands>
  10812. <cleanup-commands>
  10813. <command>-fs NAMENODE -rm -r NAMENODE/dir0</command>
  10814. </cleanup-commands>
  10815. <comparators>
  10816. <comparator>
  10817. <type>RegexpComparator</type>
  10818. <expected-output>^drwxrwxrwx( )*-( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir0/dir1</expected-output>
  10819. </comparator>
  10820. <comparator>
  10821. <type>RegexpComparator</type>
  10822. <expected-output>^-rwxrwxrwx( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir0/dir1/file1</expected-output>
  10823. </comparator>
  10824. <comparator>
  10825. <type>RegexpComparator</type>
  10826. <expected-output>^-rwxrwxrwx( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir0/dir1/file2</expected-output>
  10827. </comparator>
  10828. <comparator>
  10829. <type>RegexpComparator</type>
  10830. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir0/file0</expected-output>
  10831. </comparator>
  10832. </comparators>
  10833. </test>
  10834. <test> <!-- TESTED -->
  10835. <description>chmod: change permission(octal mode) of non existent file in Namenode's path</description>
  10836. <test-commands>
  10837. <command>-fs NAMENODE -chmod 777 NAMENODE/file1</command>
  10838. </test-commands>
  10839. <cleanup-commands>
  10840. <command>-fs NAMENODE -rm NAMENODE/file1</command>
  10841. </cleanup-commands>
  10842. <comparators>
  10843. <comparator>
  10844. <type>RegexpComparator</type>
  10845. <expected-output>^chmod: `NAMENODE/file1': No such file or directory</expected-output>
  10846. </comparator>
  10847. </comparators>
  10848. </test>
  10849. <test> <!-- TESTED -->
  10850. <description>chmod: change permission(normal mode) of non existent file in Namenode's path</description>
  10851. <test-commands>
  10852. <command>-fs NAMENODE -chmod a+rw NAMENODE/file1</command>
  10853. </test-commands>
  10854. <cleanup-commands>
  10855. <command>-fs NAMENODE -rm NAMENODE/file1</command>
  10856. </cleanup-commands>
  10857. <comparators>
  10858. <comparator>
  10859. <type>RegexpComparator</type>
  10860. <expected-output>^chmod: `NAMENODE/file1': No such file or directory</expected-output>
  10861. </comparator>
  10862. </comparators>
  10863. </test>
  10864. <test> <!-- TESTED -->
  10865. <description>chmod: change permission(octal mode) of multiple files in Namenode's path using globbing</description>
  10866. <test-commands>
  10867. <command>-fs NAMENODE -touchz NAMENODE/file1</command>
  10868. <command>-fs NAMENODE -touchz NAMENODE/file2</command>
  10869. <command>-fs NAMENODE -touchz NAMENODE/file3</command>
  10870. <command>-fs NAMENODE -touchz NAMENODE/file4</command>
  10871. <command>-fs NAMENODE -chmod 777 NAMENODE/file* </command>
  10872. <command>-fs NAMENODE -ls -R NAMENODE/file*</command>
  10873. </test-commands>
  10874. <cleanup-commands>
  10875. <command>-fs NAMENODE -rm NAMENODE/file*</command>
  10876. </cleanup-commands>
  10877. <comparators>
  10878. <comparator>
  10879. <type>RegexpComparator</type>
  10880. <expected-output>^-rwxrwxrwx( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/file1</expected-output>
  10881. </comparator>
  10882. <comparator>
  10883. <type>RegexpComparator</type>
  10884. <expected-output>^-rwxrwxrwx( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/file2</expected-output>
  10885. </comparator>
  10886. <comparator>
  10887. <type>RegexpComparator</type>
  10888. <expected-output>^-rwxrwxrwx( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/file3</expected-output>
  10889. </comparator>
  10890. <comparator>
  10891. <type>RegexpComparator</type>
  10892. <expected-output>^-rwxrwxrwx( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/file4</expected-output>
  10893. </comparator>
  10894. </comparators>
  10895. </test>
  10896. <test> <!-- TESTED -->
  10897. <description>chmod: change permission(octal mode) of multiple directories in Namenode's path using globbing</description>
  10898. <test-commands>
  10899. <command>-fs NAMENODE -mkdir NAMENODE/dir0</command>
  10900. <command>-fs NAMENODE -mkdir NAMENODE/dir0/dir1</command>
  10901. <command>-fs NAMENODE -touchz NAMENODE/dir0/file0</command>
  10902. <command>-fs NAMENODE -touchz NAMENODE/dir0/dir1/file1</command>
  10903. <command>-fs NAMENODE -touchz NAMENODE/dir0/dir1/file2</command>
  10904. <command>-fs NAMENODE -mkdir NAMENODE/dir2</command>
  10905. <command>-fs NAMENODE -mkdir NAMENODE/dir2/dir1</command>
  10906. <command>-fs NAMENODE -touchz NAMENODE/dir2/file0</command>
  10907. <command>-fs NAMENODE -touchz NAMENODE/dir2/dir1/file1</command>
  10908. <command>-fs NAMENODE -touchz NAMENODE/dir2/dir1/file2</command>
  10909. <command>-fs NAMENODE -chmod 777 NAMENODE/dir*</command>
  10910. <command>-fs NAMENODE -ls -R NAMENODE/dir*</command>
  10911. </test-commands>
  10912. <cleanup-commands>
  10913. <command>-fs NAMENODE -rm -r NAMENODE/dir*</command>
  10914. </cleanup-commands>
  10915. <comparators>
  10916. <comparator>
  10917. <type>RegexpComparator</type>
  10918. <expected-output>^drwxr-xr-x( )*-( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir0/dir1</expected-output>
  10919. </comparator>
  10920. <comparator>
  10921. <type>RegexpComparator</type>
  10922. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir0/dir1/file1</expected-output>
  10923. </comparator>
  10924. <comparator>
  10925. <type>RegexpComparator</type>
  10926. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir0/dir1/file2</expected-output>
  10927. </comparator>
  10928. <comparator>
  10929. <type>RegexpComparator</type>
  10930. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir0/file0</expected-output>
  10931. </comparator>
  10932. <comparator>
  10933. <type>RegexpComparator</type>
  10934. <expected-output>^drwxr-xr-x( )*-( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir2/dir1</expected-output>
  10935. </comparator>
  10936. <comparator>
  10937. <type>RegexpComparator</type>
  10938. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir2/dir1/file1</expected-output>
  10939. </comparator>
  10940. <comparator>
  10941. <type>RegexpComparator</type>
  10942. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir2/dir1/file2</expected-output>
  10943. </comparator>
  10944. <comparator>
  10945. <type>RegexpComparator</type>
  10946. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir2/file0</expected-output>
  10947. </comparator>
  10948. </comparators>
  10949. </test>
  10950. <test> <!-- TESTED -->
  10951. <description>chmod: change permission(octal mode) of multiple files in Namenode's path without globbing</description>
  10952. <test-commands>
  10953. <command>-fs NAMENODE -touchz NAMENODE/file1</command>
  10954. <command>-fs NAMENODE -touchz NAMENODE/file2</command>
  10955. <command>-fs NAMENODE -touchz NAMENODE/file3</command>
  10956. <command>-fs NAMENODE -touchz NAMENODE/file4</command>
  10957. <command>-fs NAMENODE -chmod 777 NAMENODE/file1 NAMENODE/file2 NAMENODE/file3 NAMENODE/file4 </command>
  10958. <command>-fs NAMENODE -ls -R NAMENODE/file*</command>
  10959. </test-commands>
  10960. <cleanup-commands>
  10961. <command>-fs NAMENODE -rm NAMENODE/file*</command>
  10962. </cleanup-commands>
  10963. <comparators>
  10964. <comparator>
  10965. <type>RegexpComparator</type>
  10966. <expected-output>^-rwxrwxrwx( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/file1</expected-output>
  10967. </comparator>
  10968. <comparator>
  10969. <type>RegexpComparator</type>
  10970. <expected-output>^-rwxrwxrwx( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/file2</expected-output>
  10971. </comparator>
  10972. <comparator>
  10973. <type>RegexpComparator</type>
  10974. <expected-output>^-rwxrwxrwx( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/file3</expected-output>
  10975. </comparator>
  10976. <comparator>
  10977. <type>RegexpComparator</type>
  10978. <expected-output>^-rwxrwxrwx( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/file4</expected-output>
  10979. </comparator>
  10980. </comparators>
  10981. </test>
  10982. <test> <!-- TESTED -->
  10983. <description>chmod: change permission(octal mode) of multiple directories in Namenode's path without globbing</description>
  10984. <test-commands>
  10985. <command>-fs NAMENODE -mkdir NAMENODE/dir0</command>
  10986. <command>-fs NAMENODE -mkdir NAMENODE/dir0/dir1</command>
  10987. <command>-fs NAMENODE -touchz NAMENODE/dir0/file0</command>
  10988. <command>-fs NAMENODE -touchz NAMENODE/dir0/dir1/file1</command>
  10989. <command>-fs NAMENODE -touchz NAMENODE/dir0/dir1/file2</command>
  10990. <command>-fs NAMENODE -mkdir NAMENODE/dir2</command>
  10991. <command>-fs NAMENODE -mkdir NAMENODE/dir2/dir1</command>
  10992. <command>-fs NAMENODE -touchz NAMENODE/dir2/file0</command>
  10993. <command>-fs NAMENODE -touchz NAMENODE/dir2/dir1/file1</command>
  10994. <command>-fs NAMENODE -touchz NAMENODE/dir2/dir1/file2</command>
  10995. <command>-fs NAMENODE -chmod 777 NAMENODE/dir0 NAMENODE/dir2</command>
  10996. <command>-fs NAMENODE -ls -R NAMENODE/dir*</command>
  10997. </test-commands>
  10998. <cleanup-commands>
  10999. <command>-fs NAMENODE -rm -r NAMENODE/dir*</command>
  11000. </cleanup-commands>
  11001. <comparators>
  11002. <comparator>
  11003. <type>RegexpComparator</type>
  11004. <expected-output>^drwxr-xr-x( )*-( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir0/dir1</expected-output>
  11005. </comparator>
  11006. <comparator>
  11007. <type>RegexpComparator</type>
  11008. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir0/dir1/file1</expected-output>
  11009. </comparator>
  11010. <comparator>
  11011. <type>RegexpComparator</type>
  11012. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir0/dir1/file2</expected-output>
  11013. </comparator>
  11014. <comparator>
  11015. <type>RegexpComparator</type>
  11016. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir0/file0</expected-output>
  11017. </comparator>
  11018. <comparator>
  11019. <type>RegexpComparator</type>
  11020. <expected-output>^drwxr-xr-x( )*-( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir2/dir1</expected-output>
  11021. </comparator>
  11022. <comparator>
  11023. <type>RegexpComparator</type>
  11024. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir2/dir1/file1</expected-output>
  11025. </comparator>
  11026. <comparator>
  11027. <type>RegexpComparator</type>
  11028. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir2/dir1/file2</expected-output>
  11029. </comparator>
  11030. <comparator>
  11031. <type>RegexpComparator</type>
  11032. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir2/file0</expected-output>
  11033. </comparator>
  11034. </comparators>
  11035. </test>
  11036. <test> <!-- TESTED -->
  11037. <description>chmod: change permission(normal mode) of multiple files in Namenode's path using globbing</description>
  11038. <test-commands>
  11039. <command>-fs NAMENODE -touchz NAMENODE/file1</command>
  11040. <command>-fs NAMENODE -touchz NAMENODE/file2</command>
  11041. <command>-fs NAMENODE -touchz NAMENODE/file3</command>
  11042. <command>-fs NAMENODE -touchz NAMENODE/file4</command>
  11043. <command>-fs NAMENODE -chmod a+rw NAMENODE/file* </command>
  11044. <command>-fs NAMENODE -ls -R NAMENODE/file*</command>
  11045. </test-commands>
  11046. <cleanup-commands>
  11047. <command>-fs NAMENODE -rm NAMENODE/file*</command>
  11048. </cleanup-commands>
  11049. <comparators>
  11050. <comparator>
  11051. <type>RegexpComparator</type>
  11052. <expected-output>^-rw-rw-rw-( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/file1</expected-output>
  11053. </comparator>
  11054. <comparator>
  11055. <type>RegexpComparator</type>
  11056. <expected-output>^-rw-rw-rw-( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/file2</expected-output>
  11057. </comparator>
  11058. <comparator>
  11059. <type>RegexpComparator</type>
  11060. <expected-output>^-rw-rw-rw-( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/file3</expected-output>
  11061. </comparator>
  11062. <comparator>
  11063. <type>RegexpComparator</type>
  11064. <expected-output>^-rw-rw-rw-( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/file4</expected-output>
  11065. </comparator>
  11066. </comparators>
  11067. </test>
  11068. <test> <!-- TESTED -->
  11069. <description>chmod: change permission(normal mode) of multiple directories in Namenode's path using globbing</description>
  11070. <test-commands>
  11071. <command>-fs NAMENODE -mkdir NAMENODE/dir0</command>
  11072. <command>-fs NAMENODE -mkdir NAMENODE/dir0/dir1</command>
  11073. <command>-fs NAMENODE -touchz NAMENODE/dir0/file0</command>
  11074. <command>-fs NAMENODE -touchz NAMENODE/dir0/dir1/file1</command>
  11075. <command>-fs NAMENODE -touchz NAMENODE/dir0/dir1/file2</command>
  11076. <command>-fs NAMENODE -mkdir NAMENODE/dir2</command>
  11077. <command>-fs NAMENODE -mkdir NAMENODE/dir2/dir1</command>
  11078. <command>-fs NAMENODE -touchz NAMENODE/dir2/file0</command>
  11079. <command>-fs NAMENODE -touchz NAMENODE/dir2/dir1/file1</command>
  11080. <command>-fs NAMENODE -touchz NAMENODE/dir2/dir1/file2</command>
  11081. <command>-fs NAMENODE -chmod a+rwx NAMENODE/dir*</command>
  11082. <command>-fs NAMENODE -ls -R NAMENODE/dir*</command>
  11083. </test-commands>
  11084. <cleanup-commands>
  11085. <command>-fs NAMENODE -rm -r NAMENODE/dir*</command>
  11086. </cleanup-commands>
  11087. <comparators>
  11088. <comparator>
  11089. <type>RegexpComparator</type>
  11090. <expected-output>^drwxr-xr-x( )*-( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir0/dir1</expected-output>
  11091. </comparator>
  11092. <comparator>
  11093. <type>RegexpComparator</type>
  11094. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir0/dir1/file1</expected-output>
  11095. </comparator>
  11096. <comparator>
  11097. <type>RegexpComparator</type>
  11098. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir0/dir1/file2</expected-output>
  11099. </comparator>
  11100. <comparator>
  11101. <type>RegexpComparator</type>
  11102. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir0/file0</expected-output>
  11103. </comparator>
  11104. <comparator>
  11105. <type>RegexpComparator</type>
  11106. <expected-output>^drwxr-xr-x( )*-( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir2/dir1</expected-output>
  11107. </comparator>
  11108. <comparator>
  11109. <type>RegexpComparator</type>
  11110. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir2/dir1/file1</expected-output>
  11111. </comparator>
  11112. <comparator>
  11113. <type>RegexpComparator</type>
  11114. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir2/dir1/file2</expected-output>
  11115. </comparator>
  11116. <comparator>
  11117. <type>RegexpComparator</type>
  11118. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir2/file0</expected-output>
  11119. </comparator>
  11120. </comparators>
  11121. </test>
  11122. <test> <!-- TESTED -->
  11123. <description>chmod: change permission(normal mode) of multiple files in Namenode's path without globbing</description>
  11124. <test-commands>
  11125. <command>-fs NAMENODE -touchz NAMENODE/file1</command>
  11126. <command>-fs NAMENODE -touchz NAMENODE/file2</command>
  11127. <command>-fs NAMENODE -touchz NAMENODE/file3</command>
  11128. <command>-fs NAMENODE -touchz NAMENODE/file4</command>
  11129. <command>-fs NAMENODE -chmod a+rw NAMENODE/file1 NAMENODE/file2 NAMENODE/file3 NAMENODE/file4 </command>
  11130. <command>-fs NAMENODE -ls -R NAMENODE/file*</command>
  11131. </test-commands>
  11132. <cleanup-commands>
  11133. <command>-fs NAMENODE -rm NAMENODE/file*</command>
  11134. </cleanup-commands>
  11135. <comparators>
  11136. <comparator>
  11137. <type>RegexpComparator</type>
  11138. <expected-output>^-rw-rw-rw-( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/file1</expected-output>
  11139. </comparator>
  11140. <comparator>
  11141. <type>RegexpComparator</type>
  11142. <expected-output>^-rw-rw-rw-( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/file2</expected-output>
  11143. </comparator>
  11144. <comparator>
  11145. <type>RegexpComparator</type>
  11146. <expected-output>^-rw-rw-rw-( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/file3</expected-output>
  11147. </comparator>
  11148. <comparator>
  11149. <type>RegexpComparator</type>
  11150. <expected-output>^-rw-rw-rw-( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/file4</expected-output>
  11151. </comparator>
  11152. </comparators>
  11153. </test>
  11154. <test> <!-- TESTED -->
  11155. <description>chmod: change permission(normal mode) of multiple directories in Namenode's path without globbing</description>
  11156. <test-commands>
  11157. <command>-fs NAMENODE -mkdir NAMENODE/dir0</command>
  11158. <command>-fs NAMENODE -mkdir NAMENODE/dir0/dir1</command>
  11159. <command>-fs NAMENODE -touchz NAMENODE/dir0/file0</command>
  11160. <command>-fs NAMENODE -touchz NAMENODE/dir0/dir1/file1</command>
  11161. <command>-fs NAMENODE -touchz NAMENODE/dir0/dir1/file2</command>
  11162. <command>-fs NAMENODE -mkdir NAMENODE/dir2</command>
  11163. <command>-fs NAMENODE -mkdir NAMENODE/dir2/dir1</command>
  11164. <command>-fs NAMENODE -touchz NAMENODE/dir2/file0</command>
  11165. <command>-fs NAMENODE -touchz NAMENODE/dir2/dir1/file1</command>
  11166. <command>-fs NAMENODE -touchz NAMENODE/dir2/dir1/file2</command>
  11167. <command>-fs NAMENODE -chmod a+rwx NAMENODE/dir0 NAMENODE/dir2</command>
  11168. <command>-fs NAMENODE -ls -R NAMENODE/dir*</command>
  11169. </test-commands>
  11170. <cleanup-commands>
  11171. <command>-fs NAMENODE -rm -r NAMENODE/dir*</command>
  11172. </cleanup-commands>
  11173. <comparators>
  11174. <comparator>
  11175. <type>RegexpComparator</type>
  11176. <expected-output>^drwxr-xr-x( )*-( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir0/dir1</expected-output>
  11177. </comparator>
  11178. <comparator>
  11179. <type>RegexpComparator</type>
  11180. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir0/dir1/file1</expected-output>
  11181. </comparator>
  11182. <comparator>
  11183. <type>RegexpComparator</type>
  11184. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir0/dir1/file2</expected-output>
  11185. </comparator>
  11186. <comparator>
  11187. <type>RegexpComparator</type>
  11188. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir0/file0</expected-output>
  11189. </comparator>
  11190. <comparator>
  11191. <type>RegexpComparator</type>
  11192. <expected-output>^drwxr-xr-x( )*-( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir2/dir1</expected-output>
  11193. </comparator>
  11194. <comparator>
  11195. <type>RegexpComparator</type>
  11196. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir2/dir1/file1</expected-output>
  11197. </comparator>
  11198. <comparator>
  11199. <type>RegexpComparator</type>
  11200. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir2/dir1/file2</expected-output>
  11201. </comparator>
  11202. <comparator>
  11203. <type>RegexpComparator</type>
  11204. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir2/file0</expected-output>
  11205. </comparator>
  11206. </comparators>
  11207. </test>
  11208. <test> <!-- TESTED -->
  11209. <description>chmod: change permission(octal mode) of multiple directories in Namenode's path recursively using globbing</description>
  11210. <test-commands>
  11211. <command>-fs NAMENODE -mkdir NAMENODE/dir0</command>
  11212. <command>-fs NAMENODE -mkdir NAMENODE/dir0/dir1</command>
  11213. <command>-fs NAMENODE -touchz NAMENODE/dir0/file0</command>
  11214. <command>-fs NAMENODE -touchz NAMENODE/dir0/dir1/file1</command>
  11215. <command>-fs NAMENODE -touchz NAMENODE/dir0/dir1/file2</command>
  11216. <command>-fs NAMENODE -mkdir NAMENODE/dir2</command>
  11217. <command>-fs NAMENODE -mkdir NAMENODE/dir2/dir1</command>
  11218. <command>-fs NAMENODE -touchz NAMENODE/dir2/file0</command>
  11219. <command>-fs NAMENODE -touchz NAMENODE/dir2/dir1/file1</command>
  11220. <command>-fs NAMENODE -touchz NAMENODE/dir2/dir1/file2</command>
  11221. <command>-fs NAMENODE -chmod -R 777 NAMENODE/dir*</command>
  11222. <command>-fs NAMENODE -ls -R NAMENODE/dir*</command>
  11223. </test-commands>
  11224. <cleanup-commands>
  11225. <command>-fs NAMENODE -rm -r NAMENODE/dir*</command>
  11226. </cleanup-commands>
  11227. <comparators>
  11228. <comparator>
  11229. <type>RegexpComparator</type>
  11230. <expected-output>^drwxrwxrwx( )*-( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir0/dir1</expected-output>
  11231. </comparator>
  11232. <comparator>
  11233. <type>RegexpComparator</type>
  11234. <expected-output>^-rwxrwxrwx( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir0/dir1/file1</expected-output>
  11235. </comparator>
  11236. <comparator>
  11237. <type>RegexpComparator</type>
  11238. <expected-output>^-rwxrwxrwx( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir0/dir1/file2</expected-output>
  11239. </comparator>
  11240. <comparator>
  11241. <type>RegexpComparator</type>
  11242. <expected-output>^-rwxrwxrwx( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir0/file0</expected-output>
  11243. </comparator>
  11244. <comparator>
  11245. <type>RegexpComparator</type>
  11246. <expected-output>^drwxrwxrwx( )*-( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir2/dir1</expected-output>
  11247. </comparator>
  11248. <comparator>
  11249. <type>RegexpComparator</type>
  11250. <expected-output>^-rwxrwxrwx( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir2/dir1/file1</expected-output>
  11251. </comparator>
  11252. <comparator>
  11253. <type>RegexpComparator</type>
  11254. <expected-output>^-rwxrwxrwx( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir2/dir1/file2</expected-output>
  11255. </comparator>
  11256. <comparator>
  11257. <type>RegexpComparator</type>
  11258. <expected-output>^-rwxrwxrwx( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir2/file0</expected-output>
  11259. </comparator>
  11260. </comparators>
  11261. </test>
  11262. <test> <!-- TESTED -->
  11263. <description>chmod: change permission(octal mode) of multiple directories in Namenode's path recursively without globbing</description>
  11264. <test-commands>
  11265. <command>-fs NAMENODE -mkdir NAMENODE/dir0</command>
  11266. <command>-fs NAMENODE -mkdir NAMENODE/dir0/dir1</command>
  11267. <command>-fs NAMENODE -touchz NAMENODE/dir0/file0</command>
  11268. <command>-fs NAMENODE -touchz NAMENODE/dir0/dir1/file1</command>
  11269. <command>-fs NAMENODE -touchz NAMENODE/dir0/dir1/file2</command>
  11270. <command>-fs NAMENODE -mkdir NAMENODE/dir2</command>
  11271. <command>-fs NAMENODE -mkdir NAMENODE/dir2/dir1</command>
  11272. <command>-fs NAMENODE -touchz NAMENODE/dir2/file0</command>
  11273. <command>-fs NAMENODE -touchz NAMENODE/dir2/dir1/file1</command>
  11274. <command>-fs NAMENODE -touchz NAMENODE/dir2/dir1/file2</command>
  11275. <command>-fs NAMENODE -chmod -R 777 NAMENODE/dir0 NAMENODE/dir2</command>
  11276. <command>-fs NAMENODE -ls -R NAMENODE/dir*</command>
  11277. </test-commands>
  11278. <cleanup-commands>
  11279. <command>-fs NAMENODE -rm -r NAMENODE/dir*</command>
  11280. </cleanup-commands>
  11281. <comparators>
  11282. <comparator>
  11283. <type>RegexpComparator</type>
  11284. <expected-output>^drwxrwxrwx( )*-( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir0/dir1</expected-output>
  11285. </comparator>
  11286. <comparator>
  11287. <type>RegexpComparator</type>
  11288. <expected-output>^-rwxrwxrwx( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir0/dir1/file1</expected-output>
  11289. </comparator>
  11290. <comparator>
  11291. <type>RegexpComparator</type>
  11292. <expected-output>^-rwxrwxrwx( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir0/dir1/file2</expected-output>
  11293. </comparator>
  11294. <comparator>
  11295. <type>RegexpComparator</type>
  11296. <expected-output>^-rwxrwxrwx( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir0/file0</expected-output>
  11297. </comparator>
  11298. <comparator>
  11299. <type>RegexpComparator</type>
  11300. <expected-output>^drwxrwxrwx( )*-( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir2/dir1</expected-output>
  11301. </comparator>
  11302. <comparator>
  11303. <type>RegexpComparator</type>
  11304. <expected-output>^-rwxrwxrwx( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir2/dir1/file1</expected-output>
  11305. </comparator>
  11306. <comparator>
  11307. <type>RegexpComparator</type>
  11308. <expected-output>^-rwxrwxrwx( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir2/dir1/file2</expected-output>
  11309. </comparator>
  11310. <comparator>
  11311. <type>RegexpComparator</type>
  11312. <expected-output>^-rwxrwxrwx( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir2/file0</expected-output>
  11313. </comparator>
  11314. </comparators>
  11315. </test>
  11316. <test> <!-- TESTED -->
  11317. <description>chmod: change permission(normal mode) of multiple directories in Namenode's path recursively using globbing</description>
  11318. <test-commands>
  11319. <command>-fs NAMENODE -mkdir NAMENODE/dir0</command>
  11320. <command>-fs NAMENODE -mkdir NAMENODE/dir0/dir1</command>
  11321. <command>-fs NAMENODE -touchz NAMENODE/dir0/file0</command>
  11322. <command>-fs NAMENODE -touchz NAMENODE/dir0/dir1/file1</command>
  11323. <command>-fs NAMENODE -touchz NAMENODE/dir0/dir1/file2</command>
  11324. <command>-fs NAMENODE -mkdir NAMENODE/dir2</command>
  11325. <command>-fs NAMENODE -mkdir NAMENODE/dir2/dir1</command>
  11326. <command>-fs NAMENODE -touchz NAMENODE/dir2/file0</command>
  11327. <command>-fs NAMENODE -touchz NAMENODE/dir2/dir1/file1</command>
  11328. <command>-fs NAMENODE -touchz NAMENODE/dir2/dir1/file2</command>
  11329. <command>-fs NAMENODE -chmod -R a+rwx NAMENODE/dir*</command>
  11330. <command>-fs NAMENODE -ls -R NAMENODE/dir*</command>
  11331. </test-commands>
  11332. <cleanup-commands>
  11333. <command>-fs NAMENODE -rm -r NAMENODE/dir*</command>
  11334. </cleanup-commands>
  11335. <comparators>
  11336. <comparator>
  11337. <type>RegexpComparator</type>
  11338. <expected-output>^drwxrwxrwx( )*-( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir0/dir1</expected-output>
  11339. </comparator>
  11340. <comparator>
  11341. <type>RegexpComparator</type>
  11342. <expected-output>^-rwxrwxrwx( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir0/dir1/file1</expected-output>
  11343. </comparator>
  11344. <comparator>
  11345. <type>RegexpComparator</type>
  11346. <expected-output>^-rwxrwxrwx( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir0/dir1/file2</expected-output>
  11347. </comparator>
  11348. <comparator>
  11349. <type>RegexpComparator</type>
  11350. <expected-output>^-rwxrwxrwx( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir0/file0</expected-output>
  11351. </comparator>
  11352. <comparator>
  11353. <type>RegexpComparator</type>
  11354. <expected-output>^drwxrwxrwx( )*-( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir2/dir1</expected-output>
  11355. </comparator>
  11356. <comparator>
  11357. <type>RegexpComparator</type>
  11358. <expected-output>^-rwxrwxrwx( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir2/dir1/file1</expected-output>
  11359. </comparator>
  11360. <comparator>
  11361. <type>RegexpComparator</type>
  11362. <expected-output>^-rwxrwxrwx( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir2/dir1/file2</expected-output>
  11363. </comparator>
  11364. <comparator>
  11365. <type>RegexpComparator</type>
  11366. <expected-output>^-rwxrwxrwx( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir2/file0</expected-output>
  11367. </comparator>
  11368. </comparators>
  11369. </test>
  11370. <test> <!-- TESTED -->
  11371. <description>chmod: change permission(normal mode) of multiple directories in Namenode's path recursively without globbing</description>
  11372. <test-commands>
  11373. <command>-fs NAMENODE -mkdir NAMENODE/dir0</command>
  11374. <command>-fs NAMENODE -mkdir NAMENODE/dir0/dir1</command>
  11375. <command>-fs NAMENODE -touchz NAMENODE/dir0/file0</command>
  11376. <command>-fs NAMENODE -touchz NAMENODE/dir0/dir1/file1</command>
  11377. <command>-fs NAMENODE -touchz NAMENODE/dir0/dir1/file2</command>
  11378. <command>-fs NAMENODE -mkdir NAMENODE/dir2</command>
  11379. <command>-fs NAMENODE -mkdir NAMENODE/dir2/dir1</command>
  11380. <command>-fs NAMENODE -touchz NAMENODE/dir2/file0</command>
  11381. <command>-fs NAMENODE -touchz NAMENODE/dir2/dir1/file1</command>
  11382. <command>-fs NAMENODE -touchz NAMENODE/dir2/dir1/file2</command>
  11383. <command>-fs NAMENODE -chmod -R a+rwx NAMENODE/dir0 NAMENODE/dir2</command>
  11384. <command>-fs NAMENODE -ls -R NAMENODE/dir*</command>
  11385. </test-commands>
  11386. <cleanup-commands>
  11387. <command>-fs NAMENODE -rm -r NAMENODE/dir*</command>
  11388. </cleanup-commands>
  11389. <comparators>
  11390. <comparator>
  11391. <type>RegexpComparator</type>
  11392. <expected-output>^drwxrwxrwx( )*-( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir0/dir1</expected-output>
  11393. </comparator>
  11394. <comparator>
  11395. <type>RegexpComparator</type>
  11396. <expected-output>^-rwxrwxrwx( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir0/dir1/file1</expected-output>
  11397. </comparator>
  11398. <comparator>
  11399. <type>RegexpComparator</type>
  11400. <expected-output>^-rwxrwxrwx( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir0/dir1/file2</expected-output>
  11401. </comparator>
  11402. <comparator>
  11403. <type>RegexpComparator</type>
  11404. <expected-output>^-rwxrwxrwx( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir0/file0</expected-output>
  11405. </comparator>
  11406. <comparator>
  11407. <type>RegexpComparator</type>
  11408. <expected-output>^drwxrwxrwx( )*-( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir2/dir1</expected-output>
  11409. </comparator>
  11410. <comparator>
  11411. <type>RegexpComparator</type>
  11412. <expected-output>^-rwxrwxrwx( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir2/dir1/file1</expected-output>
  11413. </comparator>
  11414. <comparator>
  11415. <type>RegexpComparator</type>
  11416. <expected-output>^-rwxrwxrwx( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir2/dir1/file2</expected-output>
  11417. </comparator>
  11418. <comparator>
  11419. <type>RegexpComparator</type>
  11420. <expected-output>^-rwxrwxrwx( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir2/file0</expected-output>
  11421. </comparator>
  11422. </comparators>
  11423. </test>
  11424. <test> <!-- TESTED -->
  11425. <description>chmod: invalid value in octal mode of file in Namenode's path</description>
  11426. <test-commands>
  11427. <command>-fs NAMENODE -touchz NAMENODE/file1</command>
  11428. <command>-fs NAMENODE -chmod 999 NAMENODE/file1</command>
  11429. </test-commands>
  11430. <cleanup-commands>
  11431. <command>-fs NAMENODE -rm NAMENODE/file1</command>
  11432. </cleanup-commands>
  11433. <comparators>
  11434. <comparator>
  11435. <type>RegexpComparator</type>
  11436. <expected-output>^-chmod: chmod : mode '999' does not match the expected pattern.</expected-output>
  11437. </comparator>
  11438. </comparators>
  11439. </test>
  11440. <test> <!-- TESTED -->
  11441. <description>chmod: invalid value in normal mode of file in Namenode's path</description>
  11442. <test-commands>
  11443. <command>-fs NAMENODE -touchz NAMENODE/file1</command>
  11444. <command>-fs NAMENODE -chmod rdef NAMENODE/file1</command>
  11445. </test-commands>
  11446. <cleanup-commands>
  11447. <command>-fs NAMENODE -rm NAMENODE/file1</command>
  11448. </cleanup-commands>
  11449. <comparators>
  11450. <comparator>
  11451. <type>RegexpComparator</type>
  11452. <expected-output>^-chmod: chmod : mode \'rdef\' does not match the expected pattern.</expected-output>
  11453. </comparator>
  11454. </comparators>
  11455. </test>
  11456. <!-- Tests for chown -->
  11457. <test> <!-- TESTED -->
  11458. <description>chown: change ownership of file in hdfs:// path</description>
  11459. <test-commands>
  11460. <command>-fs NAMENODE -touchz hdfs:///file1</command>
  11461. <command>-fs NAMENODE -chown newowner:newgroup hdfs:///file1</command>
  11462. <command>-fs NAMENODE -ls hdfs:///file1</command>
  11463. </test-commands>
  11464. <cleanup-commands>
  11465. <command>-fs NAMENODE -rm hdfs:///file1</command>
  11466. </cleanup-commands>
  11467. <comparators>
  11468. <comparator>
  11469. <type>RegexpComparator</type>
  11470. <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>
  11471. </comparator>
  11472. </comparators>
  11473. </test>
  11474. <test> <!-- TESTED -->
  11475. <description>chown: change ownership of directory in hdfs:// path</description>
  11476. <test-commands>
  11477. <command>-fs NAMENODE -mkdir hdfs:///dir0</command>
  11478. <command>-fs NAMENODE -mkdir hdfs:///dir0/dir1</command>
  11479. <command>-fs NAMENODE -touchz hdfs:///dir0/file0</command>
  11480. <command>-fs NAMENODE -touchz hdfs:///dir0/dir1/file1</command>
  11481. <command>-fs NAMENODE -touchz hdfs:///dir0/dir1/file2</command>
  11482. <command>-fs NAMENODE -chown newowner:newgroup hdfs:///dir0/dir1</command>
  11483. <command>-fs NAMENODE -ls -R hdfs:///dir0</command>
  11484. </test-commands>
  11485. <cleanup-commands>
  11486. <command>-fs NAMENODE -rm -r hdfs:///dir0</command>
  11487. </cleanup-commands>
  11488. <comparators>
  11489. <comparator>
  11490. <type>RegexpComparator</type>
  11491. <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>
  11492. </comparator>
  11493. <comparator>
  11494. <type>RegexpComparator</type>
  11495. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir0/dir1/file1</expected-output>
  11496. </comparator>
  11497. <comparator>
  11498. <type>RegexpComparator</type>
  11499. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir0/dir1/file2</expected-output>
  11500. </comparator>
  11501. <comparator>
  11502. <type>RegexpComparator</type>
  11503. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir0/file0</expected-output>
  11504. </comparator>
  11505. </comparators>
  11506. </test>
  11507. <test> <!-- TESTED -->
  11508. <description>chown: change ownership of directory in hdfs:// path recursively </description>
  11509. <test-commands>
  11510. <command>-fs NAMENODE -mkdir hdfs:///dir0</command>
  11511. <command>-fs NAMENODE -mkdir hdfs:///dir0/dir1</command>
  11512. <command>-fs NAMENODE -touchz hdfs:///dir0/file0</command>
  11513. <command>-fs NAMENODE -touchz hdfs:///dir0/dir1/file1</command>
  11514. <command>-fs NAMENODE -touchz hdfs:///dir0/dir1/file2</command>
  11515. <command>-fs NAMENODE -chown -R newowner:newgroup hdfs:///dir0/dir1</command>
  11516. <command>-fs NAMENODE -ls -R hdfs:///dir0</command>
  11517. </test-commands>
  11518. <cleanup-commands>
  11519. <command>-fs NAMENODE -rm -r hdfs:///dir0</command>
  11520. </cleanup-commands>
  11521. <comparators>
  11522. <comparator>
  11523. <type>RegexpComparator</type>
  11524. <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>
  11525. </comparator>
  11526. <comparator>
  11527. <type>RegexpComparator</type>
  11528. <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>
  11529. </comparator>
  11530. <comparator>
  11531. <type>RegexpComparator</type>
  11532. <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>
  11533. </comparator>
  11534. <comparator>
  11535. <type>RegexpComparator</type>
  11536. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir0/file0</expected-output>
  11537. </comparator>
  11538. </comparators>
  11539. </test>
  11540. <test> <!-- TESTED -->
  11541. <description>chown: change ownership of non existent file in hdfs:// path</description>
  11542. <test-commands>
  11543. <command>-fs NAMENODE -chown newowner:newgroup hdfs:///file1</command>
  11544. </test-commands>
  11545. <cleanup-commands>
  11546. <command>-fs NAMENODE -rm hdfs:///file1</command>
  11547. </cleanup-commands>
  11548. <comparators>
  11549. <comparator>
  11550. <type>RegexpComparator</type>
  11551. <expected-output>^chown: `hdfs:///file1': No such file or directory</expected-output>
  11552. </comparator>
  11553. </comparators>
  11554. </test>
  11555. <test> <!-- TESTED -->
  11556. <description>chown: change ownership of multiple files in hdfs:// path using globbing</description>
  11557. <test-commands>
  11558. <command>-fs NAMENODE -touchz hdfs:///file1</command>
  11559. <command>-fs NAMENODE -touchz hdfs:///file2</command>
  11560. <command>-fs NAMENODE -touchz hdfs:///file3</command>
  11561. <command>-fs NAMENODE -touchz hdfs:///file4</command>
  11562. <command>-fs NAMENODE -chown newowner:newgroup hdfs:///file* </command>
  11563. <command>-fs NAMENODE -ls -R hdfs:///file*</command>
  11564. </test-commands>
  11565. <cleanup-commands>
  11566. <command>-fs NAMENODE -rm hdfs:///file*</command>
  11567. </cleanup-commands>
  11568. <comparators>
  11569. <comparator>
  11570. <type>RegexpComparator</type>
  11571. <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>
  11572. </comparator>
  11573. <comparator>
  11574. <type>RegexpComparator</type>
  11575. <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>
  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,}( )*hdfs:///file3</expected-output>
  11580. </comparator>
  11581. <comparator>
  11582. <type>RegexpComparator</type>
  11583. <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>
  11584. </comparator>
  11585. </comparators>
  11586. </test>
  11587. <test> <!-- TESTED -->
  11588. <description>chown: change ownership of multiple directories in hdfs:// path using globbing</description>
  11589. <test-commands>
  11590. <command>-fs NAMENODE -mkdir hdfs:///dir0</command>
  11591. <command>-fs NAMENODE -mkdir hdfs:///dir0/dir1</command>
  11592. <command>-fs NAMENODE -touchz hdfs:///dir0/file0</command>
  11593. <command>-fs NAMENODE -touchz hdfs:///dir0/dir1/file1</command>
  11594. <command>-fs NAMENODE -touchz hdfs:///dir0/dir1/file2</command>
  11595. <command>-fs NAMENODE -mkdir hdfs:///dir2</command>
  11596. <command>-fs NAMENODE -mkdir hdfs:///dir2/dir1</command>
  11597. <command>-fs NAMENODE -touchz hdfs:///dir2/file0</command>
  11598. <command>-fs NAMENODE -touchz hdfs:///dir2/dir1/file1</command>
  11599. <command>-fs NAMENODE -touchz hdfs:///dir2/dir1/file2</command>
  11600. <command>-fs NAMENODE -chown newowner:newgroup hdfs:///dir*</command>
  11601. <command>-fs NAMENODE -ls -R hdfs:///dir*</command>
  11602. </test-commands>
  11603. <cleanup-commands>
  11604. <command>-fs NAMENODE -rm -r hdfs:///dir*</command>
  11605. </cleanup-commands>
  11606. <comparators>
  11607. <comparator>
  11608. <type>RegexpComparator</type>
  11609. <expected-output>^drwxr-xr-x( )*-( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir0/dir1</expected-output>
  11610. </comparator>
  11611. <comparator>
  11612. <type>RegexpComparator</type>
  11613. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir0/dir1/file1</expected-output>
  11614. </comparator>
  11615. <comparator>
  11616. <type>RegexpComparator</type>
  11617. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir0/dir1/file2</expected-output>
  11618. </comparator>
  11619. <comparator>
  11620. <type>RegexpComparator</type>
  11621. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir0/file0</expected-output>
  11622. </comparator>
  11623. <comparator>
  11624. <type>RegexpComparator</type>
  11625. <expected-output>^drwxr-xr-x( )*-( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir2/dir1</expected-output>
  11626. </comparator>
  11627. <comparator>
  11628. <type>RegexpComparator</type>
  11629. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir2/dir1/file1</expected-output>
  11630. </comparator>
  11631. <comparator>
  11632. <type>RegexpComparator</type>
  11633. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir2/dir1/file2</expected-output>
  11634. </comparator>
  11635. <comparator>
  11636. <type>RegexpComparator</type>
  11637. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir2/file0</expected-output>
  11638. </comparator>
  11639. </comparators>
  11640. </test>
  11641. <test> <!-- TESTED -->
  11642. <description>chown: change ownership of multiple files in hdfs:// path without globbing</description>
  11643. <test-commands>
  11644. <command>-fs NAMENODE -touchz hdfs:///file1</command>
  11645. <command>-fs NAMENODE -touchz hdfs:///file2</command>
  11646. <command>-fs NAMENODE -touchz hdfs:///file3</command>
  11647. <command>-fs NAMENODE -touchz hdfs:///file4</command>
  11648. <command>-fs NAMENODE -chown newowner:newgroup hdfs:///file1 hdfs:///file2 hdfs:///file3 hdfs:///file4 </command>
  11649. <command>-fs NAMENODE -ls -R hdfs:///file*</command>
  11650. </test-commands>
  11651. <cleanup-commands>
  11652. <command>-fs NAMENODE -rm hdfs:///file*</command>
  11653. </cleanup-commands>
  11654. <comparators>
  11655. <comparator>
  11656. <type>RegexpComparator</type>
  11657. <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>
  11658. </comparator>
  11659. <comparator>
  11660. <type>RegexpComparator</type>
  11661. <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>
  11662. </comparator>
  11663. <comparator>
  11664. <type>RegexpComparator</type>
  11665. <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>
  11666. </comparator>
  11667. <comparator>
  11668. <type>RegexpComparator</type>
  11669. <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>
  11670. </comparator>
  11671. </comparators>
  11672. </test>
  11673. <test> <!-- TESTED -->
  11674. <description>chown: change ownership of multiple directories in hdfs:// path without globbing</description>
  11675. <test-commands>
  11676. <command>-fs NAMENODE -mkdir hdfs:///dir0</command>
  11677. <command>-fs NAMENODE -mkdir hdfs:///dir0/dir1</command>
  11678. <command>-fs NAMENODE -touchz hdfs:///dir0/file0</command>
  11679. <command>-fs NAMENODE -touchz hdfs:///dir0/dir1/file1</command>
  11680. <command>-fs NAMENODE -touchz hdfs:///dir0/dir1/file2</command>
  11681. <command>-fs NAMENODE -mkdir hdfs:///dir2</command>
  11682. <command>-fs NAMENODE -mkdir hdfs:///dir2/dir1</command>
  11683. <command>-fs NAMENODE -touchz hdfs:///dir2/file0</command>
  11684. <command>-fs NAMENODE -touchz hdfs:///dir2/dir1/file1</command>
  11685. <command>-fs NAMENODE -touchz hdfs:///dir2/dir1/file2</command>
  11686. <command>-fs NAMENODE -chown newowner:newgroup hdfs:///dir0 hdfs:///dir2</command>
  11687. <command>-fs NAMENODE -ls -R hdfs:///dir*</command>
  11688. </test-commands>
  11689. <cleanup-commands>
  11690. <command>-fs NAMENODE -rm -r hdfs:///dir*</command>
  11691. </cleanup-commands>
  11692. <comparators>
  11693. <comparator>
  11694. <type>RegexpComparator</type>
  11695. <expected-output>^drwxr-xr-x( )*-( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir0/dir1</expected-output>
  11696. </comparator>
  11697. <comparator>
  11698. <type>RegexpComparator</type>
  11699. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir0/dir1/file1</expected-output>
  11700. </comparator>
  11701. <comparator>
  11702. <type>RegexpComparator</type>
  11703. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir0/dir1/file2</expected-output>
  11704. </comparator>
  11705. <comparator>
  11706. <type>RegexpComparator</type>
  11707. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir0/file0</expected-output>
  11708. </comparator>
  11709. <comparator>
  11710. <type>RegexpComparator</type>
  11711. <expected-output>^drwxr-xr-x( )*-( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir2/dir1</expected-output>
  11712. </comparator>
  11713. <comparator>
  11714. <type>RegexpComparator</type>
  11715. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir2/dir1/file1</expected-output>
  11716. </comparator>
  11717. <comparator>
  11718. <type>RegexpComparator</type>
  11719. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir2/dir1/file2</expected-output>
  11720. </comparator>
  11721. <comparator>
  11722. <type>RegexpComparator</type>
  11723. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir2/file0</expected-output>
  11724. </comparator>
  11725. </comparators>
  11726. </test>
  11727. <test> <!-- TESTED -->
  11728. <description>chown: change ownership of multiple directories recursively in hdfs:// path using globbing</description>
  11729. <test-commands>
  11730. <command>-fs NAMENODE -mkdir hdfs:///dir0</command>
  11731. <command>-fs NAMENODE -mkdir hdfs:///dir0/dir1</command>
  11732. <command>-fs NAMENODE -touchz hdfs:///dir0/file0</command>
  11733. <command>-fs NAMENODE -touchz hdfs:///dir0/dir1/file1</command>
  11734. <command>-fs NAMENODE -touchz hdfs:///dir0/dir1/file2</command>
  11735. <command>-fs NAMENODE -mkdir hdfs:///dir2</command>
  11736. <command>-fs NAMENODE -mkdir hdfs:///dir2/dir1</command>
  11737. <command>-fs NAMENODE -touchz hdfs:///dir2/file0</command>
  11738. <command>-fs NAMENODE -touchz hdfs:///dir2/dir1/file1</command>
  11739. <command>-fs NAMENODE -touchz hdfs:///dir2/dir1/file2</command>
  11740. <command>-fs NAMENODE -chown -R newowner:newgroup hdfs:///dir*</command>
  11741. <command>-fs NAMENODE -ls -R hdfs:///dir*</command>
  11742. </test-commands>
  11743. <cleanup-commands>
  11744. <command>-fs NAMENODE -rm -r hdfs:///dir*</command>
  11745. </cleanup-commands>
  11746. <comparators>
  11747. <comparator>
  11748. <type>RegexpComparator</type>
  11749. <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>
  11750. </comparator>
  11751. <comparator>
  11752. <type>RegexpComparator</type>
  11753. <expected-output>^-rw-r--r--( )*1( )*newowner( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir0/dir1/file1</expected-output>
  11754. </comparator>
  11755. <comparator>
  11756. <type>RegexpComparator</type>
  11757. <expected-output>^-rw-r--r--( )*1( )*newowner( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir0/dir1/file2</expected-output>
  11758. </comparator>
  11759. <comparator>
  11760. <type>RegexpComparator</type>
  11761. <expected-output>^-rw-r--r--( )*1( )*newowner( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir0/file0</expected-output>
  11762. </comparator>
  11763. <comparator>
  11764. <type>RegexpComparator</type>
  11765. <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>
  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,}( )*hdfs:///dir2/dir1/file1</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,}( )*hdfs:///dir2/dir1/file2</expected-output>
  11774. </comparator>
  11775. <comparator>
  11776. <type>RegexpComparator</type>
  11777. <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>
  11778. </comparator>
  11779. </comparators>
  11780. </test>
  11781. <test> <!-- TESTED -->
  11782. <description>chown: change ownership of multiple directories recursively in hdfs:// path without globbing</description>
  11783. <test-commands>
  11784. <command>-fs NAMENODE -mkdir hdfs:///dir0</command>
  11785. <command>-fs NAMENODE -mkdir hdfs:///dir0/dir1</command>
  11786. <command>-fs NAMENODE -touchz hdfs:///dir0/file0</command>
  11787. <command>-fs NAMENODE -touchz hdfs:///dir0/dir1/file1</command>
  11788. <command>-fs NAMENODE -touchz hdfs:///dir0/dir1/file2</command>
  11789. <command>-fs NAMENODE -mkdir hdfs:///dir2</command>
  11790. <command>-fs NAMENODE -mkdir hdfs:///dir2/dir1</command>
  11791. <command>-fs NAMENODE -touchz hdfs:///dir2/file0</command>
  11792. <command>-fs NAMENODE -touchz hdfs:///dir2/dir1/file1</command>
  11793. <command>-fs NAMENODE -touchz hdfs:///dir2/dir1/file2</command>
  11794. <command>-fs NAMENODE -chown -R newowner:newgroup hdfs:///dir0 hdfs:///dir2</command>
  11795. <command>-fs NAMENODE -ls -R hdfs:///dir*</command>
  11796. </test-commands>
  11797. <cleanup-commands>
  11798. <command>-fs NAMENODE -rm -r hdfs:///dir*</command>
  11799. </cleanup-commands>
  11800. <comparators>
  11801. <comparator>
  11802. <type>RegexpComparator</type>
  11803. <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>
  11804. </comparator>
  11805. <comparator>
  11806. <type>RegexpComparator</type>
  11807. <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>
  11808. </comparator>
  11809. <comparator>
  11810. <type>RegexpComparator</type>
  11811. <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>
  11812. </comparator>
  11813. <comparator>
  11814. <type>RegexpComparator</type>
  11815. <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>
  11816. </comparator>
  11817. <comparator>
  11818. <type>RegexpComparator</type>
  11819. <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>
  11820. </comparator>
  11821. <comparator>
  11822. <type>RegexpComparator</type>
  11823. <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>
  11824. </comparator>
  11825. <comparator>
  11826. <type>RegexpComparator</type>
  11827. <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>
  11828. </comparator>
  11829. <comparator>
  11830. <type>RegexpComparator</type>
  11831. <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>
  11832. </comparator>
  11833. </comparators>
  11834. </test>
  11835. <test> <!-- TESTED -->
  11836. <description>chown: invalid option for owner of file in hdfs:// path</description>
  11837. <test-commands>
  11838. <command>-fs NAMENODE -touchz hdfs:///file1</command>
  11839. <command>-fs NAMENODE -chown %:newgroup hdfs:///file1</command>
  11840. </test-commands>
  11841. <cleanup-commands>
  11842. <command>-fs NAMENODE -rm hdfs:///file1</command>
  11843. </cleanup-commands>
  11844. <comparators>
  11845. <comparator>
  11846. <type>RegexpComparator</type>
  11847. <expected-output>^-chown: '%:newgroup' does not match expected pattern for \[owner\]\[:group\].</expected-output>
  11848. </comparator>
  11849. </comparators>
  11850. </test>
  11851. <test> <!-- TESTED -->
  11852. <description>chown: invalid option for group of file in hdfs:// path</description>
  11853. <test-commands>
  11854. <command>-fs NAMENODE -touchz hdfs:///file1</command>
  11855. <command>-fs NAMENODE -chown newowner:% hdfs:///file1</command>
  11856. </test-commands>
  11857. <cleanup-commands>
  11858. <command>-fs NAMENODE -rm hdfs:///file1</command>
  11859. </cleanup-commands>
  11860. <comparators>
  11861. <comparator>
  11862. <type>RegexpComparator</type>
  11863. <expected-output>^-chown: 'newowner:%' does not match expected pattern for \[owner\]\[:group\].</expected-output>
  11864. </comparator>
  11865. </comparators>
  11866. </test>
  11867. <!-- Tests for chown -->
  11868. <test> <!-- TESTED -->
  11869. <description>chown: change ownership of file in absolute path</description>
  11870. <test-commands>
  11871. <command>-fs NAMENODE -touchz /file1</command>
  11872. <command>-fs NAMENODE -chown newowner:newgroup /file1</command>
  11873. <command>-fs NAMENODE -ls /file1</command>
  11874. </test-commands>
  11875. <cleanup-commands>
  11876. <command>-fs NAMENODE -rm /file1</command>
  11877. </cleanup-commands>
  11878. <comparators>
  11879. <comparator>
  11880. <type>RegexpComparator</type>
  11881. <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>
  11882. </comparator>
  11883. </comparators>
  11884. </test>
  11885. <test> <!-- TESTED -->
  11886. <description>chown: change ownership of file in relative path</description>
  11887. <test-commands>
  11888. <command>-fs NAMENODE -touchz file1</command>
  11889. <command>-fs NAMENODE -chown newowner:newgroup file1</command>
  11890. <command>-fs NAMENODE -ls file1</command>
  11891. </test-commands>
  11892. <cleanup-commands>
  11893. <command>-fs NAMENODE -rm file1</command>
  11894. </cleanup-commands>
  11895. <comparators>
  11896. <comparator>
  11897. <type>RegexpComparator</type>
  11898. <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>
  11899. </comparator>
  11900. </comparators>
  11901. </test>
  11902. <test> <!-- TESTED -->
  11903. <description>chown: change ownership of directory in absolute path</description>
  11904. <test-commands>
  11905. <command>-fs NAMENODE -mkdir /dir0</command>
  11906. <command>-fs NAMENODE -mkdir /dir0/dir1</command>
  11907. <command>-fs NAMENODE -touchz /dir0/file0</command>
  11908. <command>-fs NAMENODE -touchz /dir0/dir1/file1</command>
  11909. <command>-fs NAMENODE -touchz /dir0/dir1/file2</command>
  11910. <command>-fs NAMENODE -chown newowner:newgroup /dir0/dir1</command>
  11911. <command>-fs NAMENODE -ls -R /dir0</command>
  11912. </test-commands>
  11913. <cleanup-commands>
  11914. <command>-fs NAMENODE -rm -r /dir0</command>
  11915. </cleanup-commands>
  11916. <comparators>
  11917. <comparator>
  11918. <type>RegexpComparator</type>
  11919. <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>
  11920. </comparator>
  11921. <comparator>
  11922. <type>RegexpComparator</type>
  11923. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1/file1</expected-output>
  11924. </comparator>
  11925. <comparator>
  11926. <type>RegexpComparator</type>
  11927. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1/file2</expected-output>
  11928. </comparator>
  11929. <comparator>
  11930. <type>RegexpComparator</type>
  11931. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/file0</expected-output>
  11932. </comparator>
  11933. </comparators>
  11934. </test>
  11935. <test> <!-- TESTED -->
  11936. <description>chown: change ownership of directory in relative path</description>
  11937. <test-commands>
  11938. <command>-fs NAMENODE -mkdir -p dir0</command>
  11939. <command>-fs NAMENODE -mkdir -p dir0/dir1</command>
  11940. <command>-fs NAMENODE -touchz dir0/file0</command>
  11941. <command>-fs NAMENODE -touchz dir0/dir1/file1</command>
  11942. <command>-fs NAMENODE -touchz dir0/dir1/file2</command>
  11943. <command>-fs NAMENODE -chown newowner:newgroup dir0/dir1</command>
  11944. <command>-fs NAMENODE -ls -R dir0</command>
  11945. </test-commands>
  11946. <cleanup-commands>
  11947. <command>-fs NAMENODE -rm -r dir0</command>
  11948. </cleanup-commands>
  11949. <comparators>
  11950. <comparator>
  11951. <type>RegexpComparator</type>
  11952. <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>
  11953. </comparator>
  11954. <comparator>
  11955. <type>RegexpComparator</type>
  11956. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/dir1/file1</expected-output>
  11957. </comparator>
  11958. <comparator>
  11959. <type>RegexpComparator</type>
  11960. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/dir1/file2</expected-output>
  11961. </comparator>
  11962. <comparator>
  11963. <type>RegexpComparator</type>
  11964. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/file0</expected-output>
  11965. </comparator>
  11966. </comparators>
  11967. </test>
  11968. <test> <!-- TESTED -->
  11969. <description>chown: change ownership of directory in absolute path recursively </description>
  11970. <test-commands>
  11971. <command>-fs NAMENODE -mkdir /dir0</command>
  11972. <command>-fs NAMENODE -mkdir /dir0/dir1</command>
  11973. <command>-fs NAMENODE -touchz /dir0/file0</command>
  11974. <command>-fs NAMENODE -touchz /dir0/dir1/file1</command>
  11975. <command>-fs NAMENODE -touchz /dir0/dir1/file2</command>
  11976. <command>-fs NAMENODE -chown -R newowner:newgroup /dir0/dir1</command>
  11977. <command>-fs NAMENODE -ls -R /dir0</command>
  11978. </test-commands>
  11979. <cleanup-commands>
  11980. <command>-fs NAMENODE -rm -r /dir0</command>
  11981. </cleanup-commands>
  11982. <comparators>
  11983. <comparator>
  11984. <type>RegexpComparator</type>
  11985. <expected-output>^drwxr-xr-x( )*-( )*newowner( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1</expected-output>
  11986. </comparator>
  11987. <comparator>
  11988. <type>RegexpComparator</type>
  11989. <expected-output>^-rw-r--r--( )*1( )*newowner( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1/file1</expected-output>
  11990. </comparator>
  11991. <comparator>
  11992. <type>RegexpComparator</type>
  11993. <expected-output>^-rw-r--r--( )*1( )*newowner( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1/file2</expected-output>
  11994. </comparator>
  11995. <comparator>
  11996. <type>RegexpComparator</type>
  11997. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/file0</expected-output>
  11998. </comparator>
  11999. </comparators>
  12000. </test>
  12001. <test> <!-- TESTED -->
  12002. <description>chown: change ownership of directory in relative path recursively </description>
  12003. <test-commands>
  12004. <command>-fs NAMENODE -mkdir -p dir0</command>
  12005. <command>-fs NAMENODE -mkdir -p dir0/dir1</command>
  12006. <command>-fs NAMENODE -touchz dir0/file0</command>
  12007. <command>-fs NAMENODE -touchz dir0/dir1/file1</command>
  12008. <command>-fs NAMENODE -touchz dir0/dir1/file2</command>
  12009. <command>-fs NAMENODE -chown -R newowner:newgroup dir0/dir1</command>
  12010. <command>-fs NAMENODE -ls -R dir0</command>
  12011. </test-commands>
  12012. <cleanup-commands>
  12013. <command>-fs NAMENODE -rm -r dir0</command>
  12014. </cleanup-commands>
  12015. <comparators>
  12016. <comparator>
  12017. <type>RegexpComparator</type>
  12018. <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>
  12019. </comparator>
  12020. <comparator>
  12021. <type>RegexpComparator</type>
  12022. <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>
  12023. </comparator>
  12024. <comparator>
  12025. <type>RegexpComparator</type>
  12026. <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>
  12027. </comparator>
  12028. <comparator>
  12029. <type>RegexpComparator</type>
  12030. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/file0</expected-output>
  12031. </comparator>
  12032. </comparators>
  12033. </test>
  12034. <test> <!-- TESTED -->
  12035. <description>chown: change ownership of non existent file in absolute path</description>
  12036. <test-commands>
  12037. <command>-fs NAMENODE -chown newowner:newgroup /file1</command>
  12038. </test-commands>
  12039. <cleanup-commands>
  12040. <command>-fs NAMENODE -rm /file1</command>
  12041. </cleanup-commands>
  12042. <comparators>
  12043. <comparator>
  12044. <type>RegexpComparator</type>
  12045. <expected-output>^chown: `/file1': No such file or directory</expected-output>
  12046. </comparator>
  12047. </comparators>
  12048. </test>
  12049. <test> <!-- TESTED -->
  12050. <description>chown: change ownership of non existent file in relative path</description>
  12051. <test-commands>
  12052. <command>-fs NAMENODE -chown newowner:newgroup file1</command>
  12053. </test-commands>
  12054. <cleanup-commands>
  12055. <command>-fs NAMENODE -rm file1</command>
  12056. </cleanup-commands>
  12057. <comparators>
  12058. <comparator>
  12059. <type>RegexpComparator</type>
  12060. <expected-output>^chown: `file1': No such file or directory</expected-output>
  12061. </comparator>
  12062. </comparators>
  12063. </test>
  12064. <test> <!-- TESTED -->
  12065. <description>chown: change ownership of multiple files in absolute path using globbing</description>
  12066. <test-commands>
  12067. <command>-fs NAMENODE -touchz /file1</command>
  12068. <command>-fs NAMENODE -touchz /file2</command>
  12069. <command>-fs NAMENODE -touchz /file3</command>
  12070. <command>-fs NAMENODE -touchz /file4</command>
  12071. <command>-fs NAMENODE -chown newowner:newgroup /file* </command>
  12072. <command>-fs NAMENODE -ls -R /file*</command>
  12073. </test-commands>
  12074. <cleanup-commands>
  12075. <command>-fs NAMENODE -rm /file*</command>
  12076. </cleanup-commands>
  12077. <comparators>
  12078. <comparator>
  12079. <type>RegexpComparator</type>
  12080. <expected-output>^-rw-r--r--( )*1( )*newowner( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/file1</expected-output>
  12081. </comparator>
  12082. <comparator>
  12083. <type>RegexpComparator</type>
  12084. <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>
  12085. </comparator>
  12086. <comparator>
  12087. <type>RegexpComparator</type>
  12088. <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>
  12089. </comparator>
  12090. <comparator>
  12091. <type>RegexpComparator</type>
  12092. <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>
  12093. </comparator>
  12094. </comparators>
  12095. </test>
  12096. <test> <!-- TESTED -->
  12097. <description>chown: change ownership of multiple files in relative path using globbing</description>
  12098. <test-commands>
  12099. <command>-fs NAMENODE -touchz file1</command>
  12100. <command>-fs NAMENODE -touchz file2</command>
  12101. <command>-fs NAMENODE -touchz file3</command>
  12102. <command>-fs NAMENODE -touchz file4</command>
  12103. <command>-fs NAMENODE -chown newowner:newgroup file* </command>
  12104. <command>-fs NAMENODE -ls -R file*</command>
  12105. </test-commands>
  12106. <cleanup-commands>
  12107. <command>-fs NAMENODE -rm file*</command>
  12108. </cleanup-commands>
  12109. <comparators>
  12110. <comparator>
  12111. <type>RegexpComparator</type>
  12112. <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>
  12113. </comparator>
  12114. <comparator>
  12115. <type>RegexpComparator</type>
  12116. <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>
  12117. </comparator>
  12118. <comparator>
  12119. <type>RegexpComparator</type>
  12120. <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>
  12121. </comparator>
  12122. <comparator>
  12123. <type>RegexpComparator</type>
  12124. <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>
  12125. </comparator>
  12126. </comparators>
  12127. </test>
  12128. <test> <!-- TESTED -->
  12129. <description>chown: change ownership of multiple directories in absolute path using globbing</description>
  12130. <test-commands>
  12131. <command>-fs NAMENODE -mkdir /dir0</command>
  12132. <command>-fs NAMENODE -mkdir /dir0/dir1</command>
  12133. <command>-fs NAMENODE -touchz /dir0/file0</command>
  12134. <command>-fs NAMENODE -touchz /dir0/dir1/file1</command>
  12135. <command>-fs NAMENODE -touchz /dir0/dir1/file2</command>
  12136. <command>-fs NAMENODE -mkdir /dir2</command>
  12137. <command>-fs NAMENODE -mkdir /dir2/dir1</command>
  12138. <command>-fs NAMENODE -touchz /dir2/file0</command>
  12139. <command>-fs NAMENODE -touchz /dir2/dir1/file1</command>
  12140. <command>-fs NAMENODE -touchz /dir2/dir1/file2</command>
  12141. <command>-fs NAMENODE -chown newowner:newgroup /dir*</command>
  12142. <command>-fs NAMENODE -ls -R /dir*</command>
  12143. </test-commands>
  12144. <cleanup-commands>
  12145. <command>-fs NAMENODE -rm -r /dir*</command>
  12146. </cleanup-commands>
  12147. <comparators>
  12148. <comparator>
  12149. <type>RegexpComparator</type>
  12150. <expected-output>^drwxr-xr-x( )*-( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1</expected-output>
  12151. </comparator>
  12152. <comparator>
  12153. <type>RegexpComparator</type>
  12154. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1/file1</expected-output>
  12155. </comparator>
  12156. <comparator>
  12157. <type>RegexpComparator</type>
  12158. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1/file2</expected-output>
  12159. </comparator>
  12160. <comparator>
  12161. <type>RegexpComparator</type>
  12162. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/file0</expected-output>
  12163. </comparator>
  12164. <comparator>
  12165. <type>RegexpComparator</type>
  12166. <expected-output>^drwxr-xr-x( )*-( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir2/dir1</expected-output>
  12167. </comparator>
  12168. <comparator>
  12169. <type>RegexpComparator</type>
  12170. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir2/dir1/file1</expected-output>
  12171. </comparator>
  12172. <comparator>
  12173. <type>RegexpComparator</type>
  12174. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir2/dir1/file2</expected-output>
  12175. </comparator>
  12176. <comparator>
  12177. <type>RegexpComparator</type>
  12178. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir2/file0</expected-output>
  12179. </comparator>
  12180. </comparators>
  12181. </test>
  12182. <test> <!-- TESTED -->
  12183. <description>chown: change ownership of multiple directories in relative path using globbing</description>
  12184. <test-commands>
  12185. <command>-fs NAMENODE -mkdir -p dir0</command>
  12186. <command>-fs NAMENODE -mkdir -p dir0/dir1</command>
  12187. <command>-fs NAMENODE -touchz dir0/file0</command>
  12188. <command>-fs NAMENODE -touchz dir0/dir1/file1</command>
  12189. <command>-fs NAMENODE -touchz dir0/dir1/file2</command>
  12190. <command>-fs NAMENODE -mkdir -p dir2</command>
  12191. <command>-fs NAMENODE -mkdir -p dir2/dir1</command>
  12192. <command>-fs NAMENODE -touchz dir2/file0</command>
  12193. <command>-fs NAMENODE -touchz dir2/dir1/file1</command>
  12194. <command>-fs NAMENODE -touchz dir2/dir1/file2</command>
  12195. <command>-fs NAMENODE -chown newowner:newgroup dir*</command>
  12196. <command>-fs NAMENODE -ls -R dir*</command>
  12197. </test-commands>
  12198. <cleanup-commands>
  12199. <command>-fs NAMENODE -rm -r dir*</command>
  12200. </cleanup-commands>
  12201. <comparators>
  12202. <comparator>
  12203. <type>RegexpComparator</type>
  12204. <expected-output>^drwxr-xr-x( )*-( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/dir1</expected-output>
  12205. </comparator>
  12206. <comparator>
  12207. <type>RegexpComparator</type>
  12208. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/dir1/file1</expected-output>
  12209. </comparator>
  12210. <comparator>
  12211. <type>RegexpComparator</type>
  12212. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/dir1/file2</expected-output>
  12213. </comparator>
  12214. <comparator>
  12215. <type>RegexpComparator</type>
  12216. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/file0</expected-output>
  12217. </comparator>
  12218. <comparator>
  12219. <type>RegexpComparator</type>
  12220. <expected-output>^drwxr-xr-x( )*-( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir2/dir1</expected-output>
  12221. </comparator>
  12222. <comparator>
  12223. <type>RegexpComparator</type>
  12224. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir2/dir1/file1</expected-output>
  12225. </comparator>
  12226. <comparator>
  12227. <type>RegexpComparator</type>
  12228. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir2/dir1/file2</expected-output>
  12229. </comparator>
  12230. <comparator>
  12231. <type>RegexpComparator</type>
  12232. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir2/file0</expected-output>
  12233. </comparator>
  12234. </comparators>
  12235. </test>
  12236. <test> <!-- TESTED -->
  12237. <description>chown: change ownership of multiple files in absolute path without globbing</description>
  12238. <test-commands>
  12239. <command>-fs NAMENODE -touchz /file1</command>
  12240. <command>-fs NAMENODE -touchz /file2</command>
  12241. <command>-fs NAMENODE -touchz /file3</command>
  12242. <command>-fs NAMENODE -touchz /file4</command>
  12243. <command>-fs NAMENODE -chown newowner:newgroup /file1 /file2 /file3 /file4 </command>
  12244. <command>-fs NAMENODE -ls -R /file*</command>
  12245. </test-commands>
  12246. <cleanup-commands>
  12247. <command>-fs NAMENODE -rm /file*</command>
  12248. </cleanup-commands>
  12249. <comparators>
  12250. <comparator>
  12251. <type>RegexpComparator</type>
  12252. <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>
  12253. </comparator>
  12254. <comparator>
  12255. <type>RegexpComparator</type>
  12256. <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>
  12257. </comparator>
  12258. <comparator>
  12259. <type>RegexpComparator</type>
  12260. <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>
  12261. </comparator>
  12262. <comparator>
  12263. <type>RegexpComparator</type>
  12264. <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>
  12265. </comparator>
  12266. </comparators>
  12267. </test>
  12268. <test> <!-- TESTED -->
  12269. <description>chown: change ownership of multiple files in relative path without globbing</description>
  12270. <test-commands>
  12271. <command>-fs NAMENODE -touchz file1</command>
  12272. <command>-fs NAMENODE -touchz file2</command>
  12273. <command>-fs NAMENODE -touchz file3</command>
  12274. <command>-fs NAMENODE -touchz file4</command>
  12275. <command>-fs NAMENODE -chown newowner:newgroup file1 file2 file3 file4 </command>
  12276. <command>-fs NAMENODE -ls -R file*</command>
  12277. </test-commands>
  12278. <cleanup-commands>
  12279. <command>-fs NAMENODE -rm file*</command>
  12280. </cleanup-commands>
  12281. <comparators>
  12282. <comparator>
  12283. <type>RegexpComparator</type>
  12284. <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>
  12285. </comparator>
  12286. <comparator>
  12287. <type>RegexpComparator</type>
  12288. <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>
  12289. </comparator>
  12290. <comparator>
  12291. <type>RegexpComparator</type>
  12292. <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>
  12293. </comparator>
  12294. <comparator>
  12295. <type>RegexpComparator</type>
  12296. <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>
  12297. </comparator>
  12298. </comparators>
  12299. </test>
  12300. <test> <!-- TESTED -->
  12301. <description>chown: change ownership of multiple directories in absolute path without globbing</description>
  12302. <test-commands>
  12303. <command>-fs NAMENODE -mkdir /dir0</command>
  12304. <command>-fs NAMENODE -mkdir /dir0/dir1</command>
  12305. <command>-fs NAMENODE -touchz /dir0/file0</command>
  12306. <command>-fs NAMENODE -touchz /dir0/dir1/file1</command>
  12307. <command>-fs NAMENODE -touchz /dir0/dir1/file2</command>
  12308. <command>-fs NAMENODE -mkdir /dir2</command>
  12309. <command>-fs NAMENODE -mkdir /dir2/dir1</command>
  12310. <command>-fs NAMENODE -touchz /dir2/file0</command>
  12311. <command>-fs NAMENODE -touchz /dir2/dir1/file1</command>
  12312. <command>-fs NAMENODE -touchz /dir2/dir1/file2</command>
  12313. <command>-fs NAMENODE -chown newowner:newgroup /dir0 /dir2</command>
  12314. <command>-fs NAMENODE -ls -R /dir*</command>
  12315. </test-commands>
  12316. <cleanup-commands>
  12317. <command>-fs NAMENODE -rm -r /dir*</command>
  12318. </cleanup-commands>
  12319. <comparators>
  12320. <comparator>
  12321. <type>RegexpComparator</type>
  12322. <expected-output>^drwxr-xr-x( )*-( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1</expected-output>
  12323. </comparator>
  12324. <comparator>
  12325. <type>RegexpComparator</type>
  12326. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1/file1</expected-output>
  12327. </comparator>
  12328. <comparator>
  12329. <type>RegexpComparator</type>
  12330. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1/file2</expected-output>
  12331. </comparator>
  12332. <comparator>
  12333. <type>RegexpComparator</type>
  12334. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/file0</expected-output>
  12335. </comparator>
  12336. <comparator>
  12337. <type>RegexpComparator</type>
  12338. <expected-output>^drwxr-xr-x( )*-( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir2/dir1</expected-output>
  12339. </comparator>
  12340. <comparator>
  12341. <type>RegexpComparator</type>
  12342. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir2/dir1/file1</expected-output>
  12343. </comparator>
  12344. <comparator>
  12345. <type>RegexpComparator</type>
  12346. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir2/dir1/file2</expected-output>
  12347. </comparator>
  12348. <comparator>
  12349. <type>RegexpComparator</type>
  12350. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir2/file0</expected-output>
  12351. </comparator>
  12352. </comparators>
  12353. </test>
  12354. <test> <!-- TESTED -->
  12355. <description>chown: change ownership of multiple directories in relative path without globbing</description>
  12356. <test-commands>
  12357. <command>-fs NAMENODE -mkdir -p dir0</command>
  12358. <command>-fs NAMENODE -mkdir -p dir0/dir1</command>
  12359. <command>-fs NAMENODE -touchz dir0/file0</command>
  12360. <command>-fs NAMENODE -touchz dir0/dir1/file1</command>
  12361. <command>-fs NAMENODE -touchz dir0/dir1/file2</command>
  12362. <command>-fs NAMENODE -mkdir -p dir2</command>
  12363. <command>-fs NAMENODE -mkdir -p dir2/dir1</command>
  12364. <command>-fs NAMENODE -touchz dir2/file0</command>
  12365. <command>-fs NAMENODE -touchz dir2/dir1/file1</command>
  12366. <command>-fs NAMENODE -touchz dir2/dir1/file2</command>
  12367. <command>-fs NAMENODE -chown newowner:newgroup dir0 dir2</command>
  12368. <command>-fs NAMENODE -ls -R dir*</command>
  12369. </test-commands>
  12370. <cleanup-commands>
  12371. <command>-fs NAMENODE -rm -r dir*</command>
  12372. </cleanup-commands>
  12373. <comparators>
  12374. <comparator>
  12375. <type>RegexpComparator</type>
  12376. <expected-output>^drwxr-xr-x( )*-( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/dir1</expected-output>
  12377. </comparator>
  12378. <comparator>
  12379. <type>RegexpComparator</type>
  12380. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/dir1/file1</expected-output>
  12381. </comparator>
  12382. <comparator>
  12383. <type>RegexpComparator</type>
  12384. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/dir1/file2</expected-output>
  12385. </comparator>
  12386. <comparator>
  12387. <type>RegexpComparator</type>
  12388. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/file0</expected-output>
  12389. </comparator>
  12390. <comparator>
  12391. <type>RegexpComparator</type>
  12392. <expected-output>^drwxr-xr-x( )*-( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir2/dir1</expected-output>
  12393. </comparator>
  12394. <comparator>
  12395. <type>RegexpComparator</type>
  12396. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir2/dir1/file1</expected-output>
  12397. </comparator>
  12398. <comparator>
  12399. <type>RegexpComparator</type>
  12400. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir2/dir1/file2</expected-output>
  12401. </comparator>
  12402. <comparator>
  12403. <type>RegexpComparator</type>
  12404. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir2/file0</expected-output>
  12405. </comparator>
  12406. </comparators>
  12407. </test>
  12408. <test> <!-- TESTED -->
  12409. <description>chown: change ownership of multiple directories recursively in absolute path using globbing</description>
  12410. <test-commands>
  12411. <command>-fs NAMENODE -mkdir /dir0</command>
  12412. <command>-fs NAMENODE -mkdir /dir0/dir1</command>
  12413. <command>-fs NAMENODE -touchz /dir0/file0</command>
  12414. <command>-fs NAMENODE -touchz /dir0/dir1/file1</command>
  12415. <command>-fs NAMENODE -touchz /dir0/dir1/file2</command>
  12416. <command>-fs NAMENODE -mkdir /dir2</command>
  12417. <command>-fs NAMENODE -mkdir /dir2/dir1</command>
  12418. <command>-fs NAMENODE -touchz /dir2/file0</command>
  12419. <command>-fs NAMENODE -touchz /dir2/dir1/file1</command>
  12420. <command>-fs NAMENODE -touchz /dir2/dir1/file2</command>
  12421. <command>-fs NAMENODE -chown -R newowner:newgroup /dir*</command>
  12422. <command>-fs NAMENODE -ls -R /dir*</command>
  12423. </test-commands>
  12424. <cleanup-commands>
  12425. <command>-fs NAMENODE -rm -r /dir*</command>
  12426. </cleanup-commands>
  12427. <comparators>
  12428. <comparator>
  12429. <type>RegexpComparator</type>
  12430. <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>
  12431. </comparator>
  12432. <comparator>
  12433. <type>RegexpComparator</type>
  12434. <expected-output>^-rw-r--r--( )*1( )*newowner( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1/file1</expected-output>
  12435. </comparator>
  12436. <comparator>
  12437. <type>RegexpComparator</type>
  12438. <expected-output>^-rw-r--r--( )*1( )*newowner( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1/file2</expected-output>
  12439. </comparator>
  12440. <comparator>
  12441. <type>RegexpComparator</type>
  12442. <expected-output>^-rw-r--r--( )*1( )*newowner( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/file0</expected-output>
  12443. </comparator>
  12444. <comparator>
  12445. <type>RegexpComparator</type>
  12446. <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>
  12447. </comparator>
  12448. <comparator>
  12449. <type>RegexpComparator</type>
  12450. <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>
  12451. </comparator>
  12452. <comparator>
  12453. <type>RegexpComparator</type>
  12454. <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>
  12455. </comparator>
  12456. <comparator>
  12457. <type>RegexpComparator</type>
  12458. <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>
  12459. </comparator>
  12460. </comparators>
  12461. </test>
  12462. <test> <!-- TESTED -->
  12463. <description>chown: change ownership of multiple directories recursively in relative path using globbing</description>
  12464. <test-commands>
  12465. <command>-fs NAMENODE -mkdir -p dir0</command>
  12466. <command>-fs NAMENODE -mkdir -p dir0/dir1</command>
  12467. <command>-fs NAMENODE -touchz dir0/file0</command>
  12468. <command>-fs NAMENODE -touchz dir0/dir1/file1</command>
  12469. <command>-fs NAMENODE -touchz dir0/dir1/file2</command>
  12470. <command>-fs NAMENODE -mkdir -p dir2</command>
  12471. <command>-fs NAMENODE -mkdir -p dir2/dir1</command>
  12472. <command>-fs NAMENODE -touchz dir2/file0</command>
  12473. <command>-fs NAMENODE -touchz dir2/dir1/file1</command>
  12474. <command>-fs NAMENODE -touchz dir2/dir1/file2</command>
  12475. <command>-fs NAMENODE -chown -R newowner:newgroup dir*</command>
  12476. <command>-fs NAMENODE -ls -R dir*</command>
  12477. </test-commands>
  12478. <cleanup-commands>
  12479. <command>-fs NAMENODE -rm -r dir*</command>
  12480. </cleanup-commands>
  12481. <comparators>
  12482. <comparator>
  12483. <type>RegexpComparator</type>
  12484. <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>
  12485. </comparator>
  12486. <comparator>
  12487. <type>RegexpComparator</type>
  12488. <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>
  12489. </comparator>
  12490. <comparator>
  12491. <type>RegexpComparator</type>
  12492. <expected-output>^-rw-r--r--( )*1( )*newowner( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/dir1/file2</expected-output>
  12493. </comparator>
  12494. <comparator>
  12495. <type>RegexpComparator</type>
  12496. <expected-output>^-rw-r--r--( )*1( )*newowner( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/file0</expected-output>
  12497. </comparator>
  12498. <comparator>
  12499. <type>RegexpComparator</type>
  12500. <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>
  12501. </comparator>
  12502. <comparator>
  12503. <type>RegexpComparator</type>
  12504. <expected-output>^-rw-r--r--( )*1( )*newowner( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir2/dir1/file1</expected-output>
  12505. </comparator>
  12506. <comparator>
  12507. <type>RegexpComparator</type>
  12508. <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>
  12509. </comparator>
  12510. <comparator>
  12511. <type>RegexpComparator</type>
  12512. <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>
  12513. </comparator>
  12514. </comparators>
  12515. </test>
  12516. <test> <!-- TESTED -->
  12517. <description>chown: change ownership of multiple directories recursively in absolute path without globbing</description>
  12518. <test-commands>
  12519. <command>-fs NAMENODE -mkdir /dir0</command>
  12520. <command>-fs NAMENODE -mkdir /dir0/dir1</command>
  12521. <command>-fs NAMENODE -touchz /dir0/file0</command>
  12522. <command>-fs NAMENODE -touchz /dir0/dir1/file1</command>
  12523. <command>-fs NAMENODE -touchz /dir0/dir1/file2</command>
  12524. <command>-fs NAMENODE -mkdir /dir2</command>
  12525. <command>-fs NAMENODE -mkdir /dir2/dir1</command>
  12526. <command>-fs NAMENODE -touchz /dir2/file0</command>
  12527. <command>-fs NAMENODE -touchz /dir2/dir1/file1</command>
  12528. <command>-fs NAMENODE -touchz /dir2/dir1/file2</command>
  12529. <command>-fs NAMENODE -chown -R newowner:newgroup /dir0 /dir2</command>
  12530. <command>-fs NAMENODE -ls -R /dir*</command>
  12531. </test-commands>
  12532. <cleanup-commands>
  12533. <command>-fs NAMENODE -rm -r /dir*</command>
  12534. </cleanup-commands>
  12535. <comparators>
  12536. <comparator>
  12537. <type>RegexpComparator</type>
  12538. <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>
  12539. </comparator>
  12540. <comparator>
  12541. <type>RegexpComparator</type>
  12542. <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>
  12543. </comparator>
  12544. <comparator>
  12545. <type>RegexpComparator</type>
  12546. <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>
  12547. </comparator>
  12548. <comparator>
  12549. <type>RegexpComparator</type>
  12550. <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>
  12551. </comparator>
  12552. <comparator>
  12553. <type>RegexpComparator</type>
  12554. <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>
  12555. </comparator>
  12556. <comparator>
  12557. <type>RegexpComparator</type>
  12558. <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>
  12559. </comparator>
  12560. <comparator>
  12561. <type>RegexpComparator</type>
  12562. <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>
  12563. </comparator>
  12564. <comparator>
  12565. <type>RegexpComparator</type>
  12566. <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>
  12567. </comparator>
  12568. </comparators>
  12569. </test>
  12570. <test> <!-- TESTED -->
  12571. <description>chown: change ownership of multiple directories recursively in relative path without globbing</description>
  12572. <test-commands>
  12573. <command>-fs NAMENODE -mkdir -p dir0</command>
  12574. <command>-fs NAMENODE -mkdir -p dir0/dir1</command>
  12575. <command>-fs NAMENODE -touchz dir0/file0</command>
  12576. <command>-fs NAMENODE -touchz dir0/dir1/file1</command>
  12577. <command>-fs NAMENODE -touchz dir0/dir1/file2</command>
  12578. <command>-fs NAMENODE -mkdir -p dir2</command>
  12579. <command>-fs NAMENODE -mkdir -p dir2/dir1</command>
  12580. <command>-fs NAMENODE -touchz dir2/file0</command>
  12581. <command>-fs NAMENODE -touchz dir2/dir1/file1</command>
  12582. <command>-fs NAMENODE -touchz dir2/dir1/file2</command>
  12583. <command>-fs NAMENODE -chown -R newowner:newgroup dir0 dir2</command>
  12584. <command>-fs NAMENODE -ls -R dir*</command>
  12585. </test-commands>
  12586. <cleanup-commands>
  12587. <command>-fs NAMENODE -rm -r dir*</command>
  12588. </cleanup-commands>
  12589. <comparators>
  12590. <comparator>
  12591. <type>RegexpComparator</type>
  12592. <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>
  12593. </comparator>
  12594. <comparator>
  12595. <type>RegexpComparator</type>
  12596. <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>
  12597. </comparator>
  12598. <comparator>
  12599. <type>RegexpComparator</type>
  12600. <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>
  12601. </comparator>
  12602. <comparator>
  12603. <type>RegexpComparator</type>
  12604. <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>
  12605. </comparator>
  12606. <comparator>
  12607. <type>RegexpComparator</type>
  12608. <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>
  12609. </comparator>
  12610. <comparator>
  12611. <type>RegexpComparator</type>
  12612. <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>
  12613. </comparator>
  12614. <comparator>
  12615. <type>RegexpComparator</type>
  12616. <expected-output>^-rw-r--r--( )*1( )*newowner( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir2/dir1/file2</expected-output>
  12617. </comparator>
  12618. <comparator>
  12619. <type>RegexpComparator</type>
  12620. <expected-output>^-rw-r--r--( )*1( )*newowner( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir2/file0</expected-output>
  12621. </comparator>
  12622. </comparators>
  12623. </test>
  12624. <test> <!-- TESTED -->
  12625. <description>chown: invalid option for owner of file in absolute path</description>
  12626. <test-commands>
  12627. <command>-fs NAMENODE -touchz /file1</command>
  12628. <command>-fs NAMENODE -chown %:newgroup /file1</command>
  12629. </test-commands>
  12630. <cleanup-commands>
  12631. <command>-fs NAMENODE -rm /file1</command>
  12632. </cleanup-commands>
  12633. <comparators>
  12634. <comparator>
  12635. <type>RegexpComparator</type>
  12636. <expected-output>^-chown: '%:newgroup' does not match expected pattern for \[owner\]\[:group\].</expected-output>
  12637. </comparator>
  12638. </comparators>
  12639. </test>
  12640. <test> <!-- TESTED -->
  12641. <description>chown: invalid option for owner of file in relative path</description>
  12642. <test-commands>
  12643. <command>-fs NAMENODE -touchz file1</command>
  12644. <command>-fs NAMENODE -chown %:newgroup file1</command>
  12645. </test-commands>
  12646. <cleanup-commands>
  12647. <command>-fs NAMENODE -rm file1</command>
  12648. </cleanup-commands>
  12649. <comparators>
  12650. <comparator>
  12651. <type>RegexpComparator</type>
  12652. <expected-output>^-chown: '%:newgroup' does not match expected pattern for \[owner\]\[:group\].</expected-output>
  12653. </comparator>
  12654. </comparators>
  12655. </test>
  12656. <test> <!-- TESTED -->
  12657. <description>chown: invalid option for group of file in absolute path</description>
  12658. <test-commands>
  12659. <command>-fs NAMENODE -touchz /file1</command>
  12660. <command>-fs NAMENODE -chown newowner:% /file1</command>
  12661. </test-commands>
  12662. <cleanup-commands>
  12663. <command>-fs NAMENODE -rm /file1</command>
  12664. </cleanup-commands>
  12665. <comparators>
  12666. <comparator>
  12667. <type>RegexpComparator</type>
  12668. <expected-output>^-chown: 'newowner:%' does not match expected pattern for \[owner\]\[:group\].</expected-output>
  12669. </comparator>
  12670. </comparators>
  12671. </test>
  12672. <test> <!-- TESTED -->
  12673. <description>chown: invalid option for group of file in relative path</description>
  12674. <test-commands>
  12675. <command>-fs NAMENODE -touchz file1</command>
  12676. <command>-fs NAMENODE -chown newowner:% file1</command>
  12677. </test-commands>
  12678. <cleanup-commands>
  12679. <command>-fs NAMENODE -rm file1</command>
  12680. </cleanup-commands>
  12681. <comparators>
  12682. <comparator>
  12683. <type>RegexpComparator</type>
  12684. <expected-output>^-chown: 'newowner:%' does not match expected pattern for \[owner\]\[:group\].</expected-output>
  12685. </comparator>
  12686. </comparators>
  12687. </test>
  12688. <test> <!-- TESTED -->
  12689. <description>chown: change ownership of file in Namenode's path</description>
  12690. <test-commands>
  12691. <command>-fs NAMENODE -touchz NAMENODE/file1</command>
  12692. <command>-fs NAMENODE -chown newowner:newgroup NAMENODE/file1</command>
  12693. <command>-fs NAMENODE -ls NAMENODE/file1</command>
  12694. </test-commands>
  12695. <cleanup-commands>
  12696. <command>-fs NAMENODE -rm NAMENODE/file1</command>
  12697. </cleanup-commands>
  12698. <comparators>
  12699. <comparator>
  12700. <type>RegexpComparator</type>
  12701. <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>
  12702. </comparator>
  12703. </comparators>
  12704. </test>
  12705. <test> <!-- TESTED -->
  12706. <description>chown: change ownership of directory in Namenode's path</description>
  12707. <test-commands>
  12708. <command>-fs NAMENODE -mkdir NAMENODE/dir0</command>
  12709. <command>-fs NAMENODE -mkdir NAMENODE/dir0/dir1</command>
  12710. <command>-fs NAMENODE -touchz NAMENODE/dir0/file0</command>
  12711. <command>-fs NAMENODE -touchz NAMENODE/dir0/dir1/file1</command>
  12712. <command>-fs NAMENODE -touchz NAMENODE/dir0/dir1/file2</command>
  12713. <command>-fs NAMENODE -chown newowner:newgroup NAMENODE/dir0/dir1</command>
  12714. <command>-fs NAMENODE -ls -R NAMENODE/dir0</command>
  12715. </test-commands>
  12716. <cleanup-commands>
  12717. <command>-fs NAMENODE -rm -r NAMENODE/dir0</command>
  12718. </cleanup-commands>
  12719. <comparators>
  12720. <comparator>
  12721. <type>RegexpComparator</type>
  12722. <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>
  12723. </comparator>
  12724. <comparator>
  12725. <type>RegexpComparator</type>
  12726. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir0/dir1/file1</expected-output>
  12727. </comparator>
  12728. <comparator>
  12729. <type>RegexpComparator</type>
  12730. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir0/dir1/file2</expected-output>
  12731. </comparator>
  12732. <comparator>
  12733. <type>RegexpComparator</type>
  12734. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir0/file0</expected-output>
  12735. </comparator>
  12736. </comparators>
  12737. </test>
  12738. <test> <!-- TESTED -->
  12739. <description>chown: change ownership of directory in Namenode's path recursively </description>
  12740. <test-commands>
  12741. <command>-fs NAMENODE -mkdir NAMENODE/dir0</command>
  12742. <command>-fs NAMENODE -mkdir NAMENODE/dir0/dir1</command>
  12743. <command>-fs NAMENODE -touchz NAMENODE/dir0/file0</command>
  12744. <command>-fs NAMENODE -touchz NAMENODE/dir0/dir1/file1</command>
  12745. <command>-fs NAMENODE -touchz NAMENODE/dir0/dir1/file2</command>
  12746. <command>-fs NAMENODE -chown -R newowner:newgroup NAMENODE/dir0/dir1</command>
  12747. <command>-fs NAMENODE -ls -R NAMENODE/dir0</command>
  12748. </test-commands>
  12749. <cleanup-commands>
  12750. <command>-fs NAMENODE -rm -r NAMENODE/dir0</command>
  12751. </cleanup-commands>
  12752. <comparators>
  12753. <comparator>
  12754. <type>RegexpComparator</type>
  12755. <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>
  12756. </comparator>
  12757. <comparator>
  12758. <type>RegexpComparator</type>
  12759. <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>
  12760. </comparator>
  12761. <comparator>
  12762. <type>RegexpComparator</type>
  12763. <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>
  12764. </comparator>
  12765. <comparator>
  12766. <type>RegexpComparator</type>
  12767. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir0/file0</expected-output>
  12768. </comparator>
  12769. </comparators>
  12770. </test>
  12771. <test> <!-- TESTED -->
  12772. <description>chown: change ownership of non existent file in Namenode's path</description>
  12773. <test-commands>
  12774. <command>-fs NAMENODE -chown newowner:newgroup NAMENODE/file1</command>
  12775. </test-commands>
  12776. <cleanup-commands>
  12777. <command>-fs NAMENODE -rm NAMENODE/file1</command>
  12778. </cleanup-commands>
  12779. <comparators>
  12780. <comparator>
  12781. <type>RegexpComparator</type>
  12782. <expected-output>^chown: `NAMENODE/file1': No such file or directory</expected-output>
  12783. </comparator>
  12784. </comparators>
  12785. </test>
  12786. <test> <!-- TESTED -->
  12787. <description>chown: change ownership of multiple files in Namenode's path using globbing</description>
  12788. <test-commands>
  12789. <command>-fs NAMENODE -touchz NAMENODE/file1</command>
  12790. <command>-fs NAMENODE -touchz NAMENODE/file2</command>
  12791. <command>-fs NAMENODE -touchz NAMENODE/file3</command>
  12792. <command>-fs NAMENODE -touchz NAMENODE/file4</command>
  12793. <command>-fs NAMENODE -chown newowner:newgroup NAMENODE/file* </command>
  12794. <command>-fs NAMENODE -ls -R NAMENODE/file*</command>
  12795. </test-commands>
  12796. <cleanup-commands>
  12797. <command>-fs NAMENODE -rm NAMENODE/file*</command>
  12798. </cleanup-commands>
  12799. <comparators>
  12800. <comparator>
  12801. <type>RegexpComparator</type>
  12802. <expected-output>^-rw-r--r--( )*1( )*newowner( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/file1</expected-output>
  12803. </comparator>
  12804. <comparator>
  12805. <type>RegexpComparator</type>
  12806. <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>
  12807. </comparator>
  12808. <comparator>
  12809. <type>RegexpComparator</type>
  12810. <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>
  12811. </comparator>
  12812. <comparator>
  12813. <type>RegexpComparator</type>
  12814. <expected-output>^-rw-r--r--( )*1( )*newowner( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/file4</expected-output>
  12815. </comparator>
  12816. </comparators>
  12817. </test>
  12818. <test> <!-- TESTED -->
  12819. <description>chown: change ownership of multiple directories in Namenode's path using globbing</description>
  12820. <test-commands>
  12821. <command>-fs NAMENODE -mkdir NAMENODE/dir0</command>
  12822. <command>-fs NAMENODE -mkdir NAMENODE/dir0/dir1</command>
  12823. <command>-fs NAMENODE -touchz NAMENODE/dir0/file0</command>
  12824. <command>-fs NAMENODE -touchz NAMENODE/dir0/dir1/file1</command>
  12825. <command>-fs NAMENODE -touchz NAMENODE/dir0/dir1/file2</command>
  12826. <command>-fs NAMENODE -mkdir NAMENODE/dir2</command>
  12827. <command>-fs NAMENODE -mkdir NAMENODE/dir2/dir1</command>
  12828. <command>-fs NAMENODE -touchz NAMENODE/dir2/file0</command>
  12829. <command>-fs NAMENODE -touchz NAMENODE/dir2/dir1/file1</command>
  12830. <command>-fs NAMENODE -touchz NAMENODE/dir2/dir1/file2</command>
  12831. <command>-fs NAMENODE -chown newowner:newgroup NAMENODE/dir*</command>
  12832. <command>-fs NAMENODE -ls -R NAMENODE/dir*</command>
  12833. </test-commands>
  12834. <cleanup-commands>
  12835. <command>-fs NAMENODE -rm -r NAMENODE/dir*</command>
  12836. </cleanup-commands>
  12837. <comparators>
  12838. <comparator>
  12839. <type>RegexpComparator</type>
  12840. <expected-output>^drwxr-xr-x( )*-( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir0/dir1</expected-output>
  12841. </comparator>
  12842. <comparator>
  12843. <type>RegexpComparator</type>
  12844. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir0/dir1/file1</expected-output>
  12845. </comparator>
  12846. <comparator>
  12847. <type>RegexpComparator</type>
  12848. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir0/dir1/file2</expected-output>
  12849. </comparator>
  12850. <comparator>
  12851. <type>RegexpComparator</type>
  12852. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir0/file0</expected-output>
  12853. </comparator>
  12854. <comparator>
  12855. <type>RegexpComparator</type>
  12856. <expected-output>^drwxr-xr-x( )*-( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir2/dir1</expected-output>
  12857. </comparator>
  12858. <comparator>
  12859. <type>RegexpComparator</type>
  12860. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir2/dir1/file1</expected-output>
  12861. </comparator>
  12862. <comparator>
  12863. <type>RegexpComparator</type>
  12864. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir2/dir1/file2</expected-output>
  12865. </comparator>
  12866. <comparator>
  12867. <type>RegexpComparator</type>
  12868. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir2/file0</expected-output>
  12869. </comparator>
  12870. </comparators>
  12871. </test>
  12872. <test> <!-- TESTED -->
  12873. <description>chown: change ownership of multiple files in Namenode's path without globbing</description>
  12874. <test-commands>
  12875. <command>-fs NAMENODE -touchz NAMENODE/file1</command>
  12876. <command>-fs NAMENODE -touchz NAMENODE/file2</command>
  12877. <command>-fs NAMENODE -touchz NAMENODE/file3</command>
  12878. <command>-fs NAMENODE -touchz NAMENODE/file4</command>
  12879. <command>-fs NAMENODE -chown newowner:newgroup NAMENODE/file1 NAMENODE/file2 NAMENODE/file3 NAMENODE/file4 </command>
  12880. <command>-fs NAMENODE -ls -R NAMENODE/file*</command>
  12881. </test-commands>
  12882. <cleanup-commands>
  12883. <command>-fs NAMENODE -rm NAMENODE/file*</command>
  12884. </cleanup-commands>
  12885. <comparators>
  12886. <comparator>
  12887. <type>RegexpComparator</type>
  12888. <expected-output>^-rw-r--r--( )*1( )*newowner( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/file1</expected-output>
  12889. </comparator>
  12890. <comparator>
  12891. <type>RegexpComparator</type>
  12892. <expected-output>^-rw-r--r--( )*1( )*newowner( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/file2</expected-output>
  12893. </comparator>
  12894. <comparator>
  12895. <type>RegexpComparator</type>
  12896. <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>
  12897. </comparator>
  12898. <comparator>
  12899. <type>RegexpComparator</type>
  12900. <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>
  12901. </comparator>
  12902. </comparators>
  12903. </test>
  12904. <test> <!-- TESTED -->
  12905. <description>chown: change ownership of multiple directories in Namenode's path without globbing</description>
  12906. <test-commands>
  12907. <command>-fs NAMENODE -mkdir NAMENODE/dir0</command>
  12908. <command>-fs NAMENODE -mkdir NAMENODE/dir0/dir1</command>
  12909. <command>-fs NAMENODE -touchz NAMENODE/dir0/file0</command>
  12910. <command>-fs NAMENODE -touchz NAMENODE/dir0/dir1/file1</command>
  12911. <command>-fs NAMENODE -touchz NAMENODE/dir0/dir1/file2</command>
  12912. <command>-fs NAMENODE -mkdir NAMENODE/dir2</command>
  12913. <command>-fs NAMENODE -mkdir NAMENODE/dir2/dir1</command>
  12914. <command>-fs NAMENODE -touchz NAMENODE/dir2/file0</command>
  12915. <command>-fs NAMENODE -touchz NAMENODE/dir2/dir1/file1</command>
  12916. <command>-fs NAMENODE -touchz NAMENODE/dir2/dir1/file2</command>
  12917. <command>-fs NAMENODE -chown newowner:newgroup NAMENODE/dir0 NAMENODE/dir2</command>
  12918. <command>-fs NAMENODE -ls -R NAMENODE/dir*</command>
  12919. </test-commands>
  12920. <cleanup-commands>
  12921. <command>-fs NAMENODE -rm -r NAMENODE/dir*</command>
  12922. </cleanup-commands>
  12923. <comparators>
  12924. <comparator>
  12925. <type>RegexpComparator</type>
  12926. <expected-output>^drwxr-xr-x( )*-( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir0/dir1</expected-output>
  12927. </comparator>
  12928. <comparator>
  12929. <type>RegexpComparator</type>
  12930. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir0/dir1/file1</expected-output>
  12931. </comparator>
  12932. <comparator>
  12933. <type>RegexpComparator</type>
  12934. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir0/dir1/file2</expected-output>
  12935. </comparator>
  12936. <comparator>
  12937. <type>RegexpComparator</type>
  12938. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir0/file0</expected-output>
  12939. </comparator>
  12940. <comparator>
  12941. <type>RegexpComparator</type>
  12942. <expected-output>^drwxr-xr-x( )*-( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir2/dir1</expected-output>
  12943. </comparator>
  12944. <comparator>
  12945. <type>RegexpComparator</type>
  12946. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir2/dir1/file1</expected-output>
  12947. </comparator>
  12948. <comparator>
  12949. <type>RegexpComparator</type>
  12950. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir2/dir1/file2</expected-output>
  12951. </comparator>
  12952. <comparator>
  12953. <type>RegexpComparator</type>
  12954. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir2/file0</expected-output>
  12955. </comparator>
  12956. </comparators>
  12957. </test>
  12958. <test> <!-- TESTED -->
  12959. <description>chown: change ownership of multiple directories recursively in Namenode's path using globbing</description>
  12960. <test-commands>
  12961. <command>-fs NAMENODE -mkdir NAMENODE/dir0</command>
  12962. <command>-fs NAMENODE -mkdir NAMENODE/dir0/dir1</command>
  12963. <command>-fs NAMENODE -touchz NAMENODE/dir0/file0</command>
  12964. <command>-fs NAMENODE -touchz NAMENODE/dir0/dir1/file1</command>
  12965. <command>-fs NAMENODE -touchz NAMENODE/dir0/dir1/file2</command>
  12966. <command>-fs NAMENODE -mkdir NAMENODE/dir2</command>
  12967. <command>-fs NAMENODE -mkdir NAMENODE/dir2/dir1</command>
  12968. <command>-fs NAMENODE -touchz NAMENODE/dir2/file0</command>
  12969. <command>-fs NAMENODE -touchz NAMENODE/dir2/dir1/file1</command>
  12970. <command>-fs NAMENODE -touchz NAMENODE/dir2/dir1/file2</command>
  12971. <command>-fs NAMENODE -chown -R newowner:newgroup NAMENODE/dir*</command>
  12972. <command>-fs NAMENODE -ls -R NAMENODE/dir*</command>
  12973. </test-commands>
  12974. <cleanup-commands>
  12975. <command>-fs NAMENODE -rm -r NAMENODE/dir*</command>
  12976. </cleanup-commands>
  12977. <comparators>
  12978. <comparator>
  12979. <type>RegexpComparator</type>
  12980. <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>
  12981. </comparator>
  12982. <comparator>
  12983. <type>RegexpComparator</type>
  12984. <expected-output>^-rw-r--r--( )*1( )*newowner( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir0/dir1/file1</expected-output>
  12985. </comparator>
  12986. <comparator>
  12987. <type>RegexpComparator</type>
  12988. <expected-output>^-rw-r--r--( )*1( )*newowner( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir0/dir1/file2</expected-output>
  12989. </comparator>
  12990. <comparator>
  12991. <type>RegexpComparator</type>
  12992. <expected-output>^-rw-r--r--( )*1( )*newowner( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir0/file0</expected-output>
  12993. </comparator>
  12994. <comparator>
  12995. <type>RegexpComparator</type>
  12996. <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>
  12997. </comparator>
  12998. <comparator>
  12999. <type>RegexpComparator</type>
  13000. <expected-output>^-rw-r--r--( )*1( )*newowner( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir2/dir1/file1</expected-output>
  13001. </comparator>
  13002. <comparator>
  13003. <type>RegexpComparator</type>
  13004. <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>
  13005. </comparator>
  13006. <comparator>
  13007. <type>RegexpComparator</type>
  13008. <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>
  13009. </comparator>
  13010. </comparators>
  13011. </test>
  13012. <test> <!-- TESTED -->
  13013. <description>chown: change ownership of multiple directories recursively in Namenode's path without globbing</description>
  13014. <test-commands>
  13015. <command>-fs NAMENODE -mkdir NAMENODE/dir0</command>
  13016. <command>-fs NAMENODE -mkdir NAMENODE/dir0/dir1</command>
  13017. <command>-fs NAMENODE -touchz NAMENODE/dir0/file0</command>
  13018. <command>-fs NAMENODE -touchz NAMENODE/dir0/dir1/file1</command>
  13019. <command>-fs NAMENODE -touchz NAMENODE/dir0/dir1/file2</command>
  13020. <command>-fs NAMENODE -mkdir NAMENODE/dir2</command>
  13021. <command>-fs NAMENODE -mkdir NAMENODE/dir2/dir1</command>
  13022. <command>-fs NAMENODE -touchz NAMENODE/dir2/file0</command>
  13023. <command>-fs NAMENODE -touchz NAMENODE/dir2/dir1/file1</command>
  13024. <command>-fs NAMENODE -touchz NAMENODE/dir2/dir1/file2</command>
  13025. <command>-fs NAMENODE -chown -R newowner:newgroup NAMENODE/dir0 NAMENODE/dir2</command>
  13026. <command>-fs NAMENODE -ls -R NAMENODE/dir*</command>
  13027. </test-commands>
  13028. <cleanup-commands>
  13029. <command>-fs NAMENODE -rm -r NAMENODE/dir*</command>
  13030. </cleanup-commands>
  13031. <comparators>
  13032. <comparator>
  13033. <type>RegexpComparator</type>
  13034. <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>
  13035. </comparator>
  13036. <comparator>
  13037. <type>RegexpComparator</type>
  13038. <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>
  13039. </comparator>
  13040. <comparator>
  13041. <type>RegexpComparator</type>
  13042. <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>
  13043. </comparator>
  13044. <comparator>
  13045. <type>RegexpComparator</type>
  13046. <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>
  13047. </comparator>
  13048. <comparator>
  13049. <type>RegexpComparator</type>
  13050. <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>
  13051. </comparator>
  13052. <comparator>
  13053. <type>RegexpComparator</type>
  13054. <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>
  13055. </comparator>
  13056. <comparator>
  13057. <type>RegexpComparator</type>
  13058. <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>
  13059. </comparator>
  13060. <comparator>
  13061. <type>RegexpComparator</type>
  13062. <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>
  13063. </comparator>
  13064. </comparators>
  13065. </test>
  13066. <test> <!-- TESTED -->
  13067. <description>chown: invalid option for owner of file in Namenode's path</description>
  13068. <test-commands>
  13069. <command>-fs NAMENODE -touchz NAMENODE/file1</command>
  13070. <command>-fs NAMENODE -chown %:newgroup NAMENODE/file1</command>
  13071. </test-commands>
  13072. <cleanup-commands>
  13073. <command>-fs NAMENODE -rm NAMENODE/file1</command>
  13074. </cleanup-commands>
  13075. <comparators>
  13076. <comparator>
  13077. <type>RegexpComparator</type>
  13078. <expected-output>^-chown: '%:newgroup' does not match expected pattern for \[owner\]\[:group\].</expected-output>
  13079. </comparator>
  13080. </comparators>
  13081. </test>
  13082. <test> <!-- TESTED -->
  13083. <description>chown: invalid option for group of file in Namenode's path</description>
  13084. <test-commands>
  13085. <command>-fs NAMENODE -touchz NAMENODE/file1</command>
  13086. <command>-fs NAMENODE -chown newowner:% NAMENODE/file1</command>
  13087. </test-commands>
  13088. <cleanup-commands>
  13089. <command>-fs NAMENODE -rm NAMENODE/file1</command>
  13090. </cleanup-commands>
  13091. <comparators>
  13092. <comparator>
  13093. <type>RegexpComparator</type>
  13094. <expected-output>^-chown: 'newowner:%' does not match expected pattern for \[owner\]\[:group\].</expected-output>
  13095. </comparator>
  13096. </comparators>
  13097. </test>
  13098. <!-- Tests for chgrp -->
  13099. <test> <!-- TESTED -->
  13100. <description>chgrp: change group of file in absolute path</description>
  13101. <test-commands>
  13102. <command>-fs NAMENODE -touchz /file1</command>
  13103. <command>-fs NAMENODE -chgrp newgroup /file1</command>
  13104. <command>-fs NAMENODE -ls /file1</command>
  13105. </test-commands>
  13106. <cleanup-commands>
  13107. <command>-fs NAMENODE -rm /file1</command>
  13108. </cleanup-commands>
  13109. <comparators>
  13110. <comparator>
  13111. <type>RegexpComparator</type>
  13112. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/file1</expected-output>
  13113. </comparator>
  13114. </comparators>
  13115. </test>
  13116. <test> <!-- TESTED -->
  13117. <description>chgrp: change group of file in relative path</description>
  13118. <test-commands>
  13119. <command>-fs NAMENODE -touchz file1</command>
  13120. <command>-fs NAMENODE -chgrp newgroup file1</command>
  13121. <command>-fs NAMENODE -ls file1</command>
  13122. </test-commands>
  13123. <cleanup-commands>
  13124. <command>-fs NAMENODE -rm file1</command>
  13125. </cleanup-commands>
  13126. <comparators>
  13127. <comparator>
  13128. <type>RegexpComparator</type>
  13129. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*file1</expected-output>
  13130. </comparator>
  13131. </comparators>
  13132. </test>
  13133. <test> <!-- TESTED -->
  13134. <description>chgrp: change group of directory in absolute path</description>
  13135. <test-commands>
  13136. <command>-fs NAMENODE -mkdir /dir0</command>
  13137. <command>-fs NAMENODE -mkdir /dir0/dir1</command>
  13138. <command>-fs NAMENODE -touchz /dir0/file0</command>
  13139. <command>-fs NAMENODE -touchz /dir0/dir1/file1</command>
  13140. <command>-fs NAMENODE -touchz /dir0/dir1/file2</command>
  13141. <command>-fs NAMENODE -chgrp newgroup /dir0/dir1</command>
  13142. <command>-fs NAMENODE -ls -R /dir0</command>
  13143. </test-commands>
  13144. <cleanup-commands>
  13145. <command>-fs NAMENODE -rm -r /dir0</command>
  13146. </cleanup-commands>
  13147. <comparators>
  13148. <comparator>
  13149. <type>RegexpComparator</type>
  13150. <expected-output>^drwxr-xr-x( )*-( )*USERNAME( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1</expected-output>
  13151. </comparator>
  13152. <comparator>
  13153. <type>RegexpComparator</type>
  13154. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1/file1</expected-output>
  13155. </comparator>
  13156. <comparator>
  13157. <type>RegexpComparator</type>
  13158. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1/file2</expected-output>
  13159. </comparator>
  13160. <comparator>
  13161. <type>RegexpComparator</type>
  13162. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/file0</expected-output>
  13163. </comparator>
  13164. </comparators>
  13165. </test>
  13166. <test> <!-- TESTED -->
  13167. <description>chgrp: change group of directory in relative path</description>
  13168. <test-commands>
  13169. <command>-fs NAMENODE -mkdir -p dir0</command>
  13170. <command>-fs NAMENODE -mkdir -p dir0/dir1</command>
  13171. <command>-fs NAMENODE -touchz dir0/file0</command>
  13172. <command>-fs NAMENODE -touchz dir0/dir1/file1</command>
  13173. <command>-fs NAMENODE -touchz dir0/dir1/file2</command>
  13174. <command>-fs NAMENODE -chgrp newgroup dir0/dir1</command>
  13175. <command>-fs NAMENODE -ls -R dir0</command>
  13176. </test-commands>
  13177. <cleanup-commands>
  13178. <command>-fs NAMENODE -rm -r dir0</command>
  13179. </cleanup-commands>
  13180. <comparators>
  13181. <comparator>
  13182. <type>RegexpComparator</type>
  13183. <expected-output>^drwxr-xr-x( )*-( )*USERNAME( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/dir1</expected-output>
  13184. </comparator>
  13185. <comparator>
  13186. <type>RegexpComparator</type>
  13187. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/dir1/file1</expected-output>
  13188. </comparator>
  13189. <comparator>
  13190. <type>RegexpComparator</type>
  13191. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/dir1/file2</expected-output>
  13192. </comparator>
  13193. <comparator>
  13194. <type>RegexpComparator</type>
  13195. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/file0</expected-output>
  13196. </comparator>
  13197. </comparators>
  13198. </test>
  13199. <test> <!-- TESTED -->
  13200. <description>chgrp: change group of directory in absolute path recursively </description>
  13201. <test-commands>
  13202. <command>-fs NAMENODE -mkdir /dir0</command>
  13203. <command>-fs NAMENODE -mkdir /dir0/dir1</command>
  13204. <command>-fs NAMENODE -touchz /dir0/file0</command>
  13205. <command>-fs NAMENODE -touchz /dir0/dir1/file1</command>
  13206. <command>-fs NAMENODE -touchz /dir0/dir1/file2</command>
  13207. <command>-fs NAMENODE -chgrp -R newgroup /dir0/dir1</command>
  13208. <command>-fs NAMENODE -ls -R /dir0</command>
  13209. </test-commands>
  13210. <cleanup-commands>
  13211. <command>-fs NAMENODE -rm -r /dir0</command>
  13212. </cleanup-commands>
  13213. <comparators>
  13214. <comparator>
  13215. <type>RegexpComparator</type>
  13216. <expected-output>^drwxr-xr-x( )*-( )*USERNAME( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1</expected-output>
  13217. </comparator>
  13218. <comparator>
  13219. <type>RegexpComparator</type>
  13220. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1/file1</expected-output>
  13221. </comparator>
  13222. <comparator>
  13223. <type>RegexpComparator</type>
  13224. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1/file2</expected-output>
  13225. </comparator>
  13226. <comparator>
  13227. <type>RegexpComparator</type>
  13228. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/file0</expected-output>
  13229. </comparator>
  13230. </comparators>
  13231. </test>
  13232. <test> <!-- TESTED -->
  13233. <description>chgrp: change group of directory in relative path recursively </description>
  13234. <test-commands>
  13235. <command>-fs NAMENODE -mkdir -p dir0</command>
  13236. <command>-fs NAMENODE -mkdir -p dir0/dir1</command>
  13237. <command>-fs NAMENODE -touchz dir0/file0</command>
  13238. <command>-fs NAMENODE -touchz dir0/dir1/file1</command>
  13239. <command>-fs NAMENODE -touchz dir0/dir1/file2</command>
  13240. <command>-fs NAMENODE -chgrp -R newgroup dir0/dir1</command>
  13241. <command>-fs NAMENODE -ls -R dir0</command>
  13242. </test-commands>
  13243. <cleanup-commands>
  13244. <command>-fs NAMENODE -rm -r dir0</command>
  13245. </cleanup-commands>
  13246. <comparators>
  13247. <comparator>
  13248. <type>RegexpComparator</type>
  13249. <expected-output>^drwxr-xr-x( )*-( )*USERNAME( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/dir1</expected-output>
  13250. </comparator>
  13251. <comparator>
  13252. <type>RegexpComparator</type>
  13253. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/dir1/file1</expected-output>
  13254. </comparator>
  13255. <comparator>
  13256. <type>RegexpComparator</type>
  13257. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/dir1/file2</expected-output>
  13258. </comparator>
  13259. <comparator>
  13260. <type>RegexpComparator</type>
  13261. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/file0</expected-output>
  13262. </comparator>
  13263. </comparators>
  13264. </test>
  13265. <test> <!-- TESTED -->
  13266. <description>chgrp: change group of non existent file in absolute path</description>
  13267. <test-commands>
  13268. <command>-fs NAMENODE -chgrp newgroup /file1</command>
  13269. </test-commands>
  13270. <cleanup-commands>
  13271. <command>-fs NAMENODE -rm /file1</command>
  13272. </cleanup-commands>
  13273. <comparators>
  13274. <comparator>
  13275. <type>RegexpComparator</type>
  13276. <expected-output>^chgrp: `/file1': No such file or directory</expected-output>
  13277. </comparator>
  13278. </comparators>
  13279. </test>
  13280. <test> <!-- TESTED -->
  13281. <description>chgrp: change group of non existent file in relative path</description>
  13282. <test-commands>
  13283. <command>-fs NAMENODE -chgrp newgroup file1</command>
  13284. </test-commands>
  13285. <cleanup-commands>
  13286. <command>-fs NAMENODE -rm file1</command>
  13287. </cleanup-commands>
  13288. <comparators>
  13289. <comparator>
  13290. <type>RegexpComparator</type>
  13291. <expected-output>^chgrp: `file1': No such file or directory</expected-output>
  13292. </comparator>
  13293. </comparators>
  13294. </test>
  13295. <test> <!-- TESTED -->
  13296. <description>chgrp: change group of multiple files in absolute path using globbing</description>
  13297. <test-commands>
  13298. <command>-fs NAMENODE -touchz /file1</command>
  13299. <command>-fs NAMENODE -touchz /file2</command>
  13300. <command>-fs NAMENODE -touchz /file3</command>
  13301. <command>-fs NAMENODE -touchz /file4</command>
  13302. <command>-fs NAMENODE -chgrp newgroup /file* </command>
  13303. <command>-fs NAMENODE -ls -R /file*</command>
  13304. </test-commands>
  13305. <cleanup-commands>
  13306. <command>-fs NAMENODE -rm /file*</command>
  13307. </cleanup-commands>
  13308. <comparators>
  13309. <comparator>
  13310. <type>RegexpComparator</type>
  13311. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/file1</expected-output>
  13312. </comparator>
  13313. <comparator>
  13314. <type>RegexpComparator</type>
  13315. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/file2</expected-output>
  13316. </comparator>
  13317. <comparator>
  13318. <type>RegexpComparator</type>
  13319. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/file3</expected-output>
  13320. </comparator>
  13321. <comparator>
  13322. <type>RegexpComparator</type>
  13323. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/file4</expected-output>
  13324. </comparator>
  13325. </comparators>
  13326. </test>
  13327. <test> <!-- TESTED -->
  13328. <description>chgrp: change group of multiple files in relative path using globbing</description>
  13329. <test-commands>
  13330. <command>-fs NAMENODE -touchz file1</command>
  13331. <command>-fs NAMENODE -touchz file2</command>
  13332. <command>-fs NAMENODE -touchz file3</command>
  13333. <command>-fs NAMENODE -touchz file4</command>
  13334. <command>-fs NAMENODE -chgrp newgroup file* </command>
  13335. <command>-fs NAMENODE -ls -R file*</command>
  13336. </test-commands>
  13337. <cleanup-commands>
  13338. <command>-fs NAMENODE -rm file*</command>
  13339. </cleanup-commands>
  13340. <comparators>
  13341. <comparator>
  13342. <type>RegexpComparator</type>
  13343. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*file1</expected-output>
  13344. </comparator>
  13345. <comparator>
  13346. <type>RegexpComparator</type>
  13347. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*file2</expected-output>
  13348. </comparator>
  13349. <comparator>
  13350. <type>RegexpComparator</type>
  13351. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*file3</expected-output>
  13352. </comparator>
  13353. <comparator>
  13354. <type>RegexpComparator</type>
  13355. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*file4</expected-output>
  13356. </comparator>
  13357. </comparators>
  13358. </test>
  13359. <test> <!-- TESTED -->
  13360. <description>chgrp: change group of multiple directories in absolute path using globbing</description>
  13361. <test-commands>
  13362. <command>-fs NAMENODE -mkdir /dir0</command>
  13363. <command>-fs NAMENODE -mkdir /dir0/dir1</command>
  13364. <command>-fs NAMENODE -touchz /dir0/file0</command>
  13365. <command>-fs NAMENODE -touchz /dir0/dir1/file1</command>
  13366. <command>-fs NAMENODE -touchz /dir0/dir1/file2</command>
  13367. <command>-fs NAMENODE -mkdir /dir2</command>
  13368. <command>-fs NAMENODE -mkdir /dir2/dir1</command>
  13369. <command>-fs NAMENODE -touchz /dir2/file0</command>
  13370. <command>-fs NAMENODE -touchz /dir2/dir1/file1</command>
  13371. <command>-fs NAMENODE -touchz /dir2/dir1/file2</command>
  13372. <command>-fs NAMENODE -chgrp newgroup /dir*</command>
  13373. <command>-fs NAMENODE -ls -R /dir*</command>
  13374. </test-commands>
  13375. <cleanup-commands>
  13376. <command>-fs NAMENODE -rm -r /dir*</command>
  13377. </cleanup-commands>
  13378. <comparators>
  13379. <comparator>
  13380. <type>RegexpComparator</type>
  13381. <expected-output>^drwxr-xr-x( )*-( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1</expected-output>
  13382. </comparator>
  13383. <comparator>
  13384. <type>RegexpComparator</type>
  13385. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1/file1</expected-output>
  13386. </comparator>
  13387. <comparator>
  13388. <type>RegexpComparator</type>
  13389. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1/file2</expected-output>
  13390. </comparator>
  13391. <comparator>
  13392. <type>RegexpComparator</type>
  13393. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/file0</expected-output>
  13394. </comparator>
  13395. <comparator>
  13396. <type>RegexpComparator</type>
  13397. <expected-output>^drwxr-xr-x( )*-( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir2/dir1</expected-output>
  13398. </comparator>
  13399. <comparator>
  13400. <type>RegexpComparator</type>
  13401. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir2/dir1/file1</expected-output>
  13402. </comparator>
  13403. <comparator>
  13404. <type>RegexpComparator</type>
  13405. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir2/dir1/file2</expected-output>
  13406. </comparator>
  13407. <comparator>
  13408. <type>RegexpComparator</type>
  13409. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir2/file0</expected-output>
  13410. </comparator>
  13411. </comparators>
  13412. </test>
  13413. <test> <!-- TESTED -->
  13414. <description>chgrp: change group of multiple directories in relative path using globbing</description>
  13415. <test-commands>
  13416. <command>-fs NAMENODE -mkdir -p dir0</command>
  13417. <command>-fs NAMENODE -mkdir -p dir0/dir1</command>
  13418. <command>-fs NAMENODE -touchz dir0/file0</command>
  13419. <command>-fs NAMENODE -touchz dir0/dir1/file1</command>
  13420. <command>-fs NAMENODE -touchz dir0/dir1/file2</command>
  13421. <command>-fs NAMENODE -mkdir -p dir2</command>
  13422. <command>-fs NAMENODE -mkdir -p dir2/dir1</command>
  13423. <command>-fs NAMENODE -touchz dir2/file0</command>
  13424. <command>-fs NAMENODE -touchz dir2/dir1/file1</command>
  13425. <command>-fs NAMENODE -touchz dir2/dir1/file2</command>
  13426. <command>-fs NAMENODE -chgrp newgroup dir*</command>
  13427. <command>-fs NAMENODE -ls -R dir*</command>
  13428. </test-commands>
  13429. <cleanup-commands>
  13430. <command>-fs NAMENODE -rm -r dir*</command>
  13431. </cleanup-commands>
  13432. <comparators>
  13433. <comparator>
  13434. <type>RegexpComparator</type>
  13435. <expected-output>^drwxr-xr-x( )*-( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/dir1</expected-output>
  13436. </comparator>
  13437. <comparator>
  13438. <type>RegexpComparator</type>
  13439. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/dir1/file1</expected-output>
  13440. </comparator>
  13441. <comparator>
  13442. <type>RegexpComparator</type>
  13443. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/dir1/file2</expected-output>
  13444. </comparator>
  13445. <comparator>
  13446. <type>RegexpComparator</type>
  13447. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/file0</expected-output>
  13448. </comparator>
  13449. <comparator>
  13450. <type>RegexpComparator</type>
  13451. <expected-output>^drwxr-xr-x( )*-( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir2/dir1</expected-output>
  13452. </comparator>
  13453. <comparator>
  13454. <type>RegexpComparator</type>
  13455. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir2/dir1/file1</expected-output>
  13456. </comparator>
  13457. <comparator>
  13458. <type>RegexpComparator</type>
  13459. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir2/dir1/file2</expected-output>
  13460. </comparator>
  13461. <comparator>
  13462. <type>RegexpComparator</type>
  13463. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir2/file0</expected-output>
  13464. </comparator>
  13465. </comparators>
  13466. </test>
  13467. <test> <!-- TESTED -->
  13468. <description>chgrp: change of multiple files in absolute path without globbing</description>
  13469. <test-commands>
  13470. <command>-fs NAMENODE -touchz /file1</command>
  13471. <command>-fs NAMENODE -touchz /file2</command>
  13472. <command>-fs NAMENODE -touchz /file3</command>
  13473. <command>-fs NAMENODE -touchz /file4</command>
  13474. <command>-fs NAMENODE -chgrp newgroup /file1 /file2 /file3 /file4 </command>
  13475. <command>-fs NAMENODE -ls -R /file*</command>
  13476. </test-commands>
  13477. <cleanup-commands>
  13478. <command>-fs NAMENODE -rm /file*</command>
  13479. </cleanup-commands>
  13480. <comparators>
  13481. <comparator>
  13482. <type>RegexpComparator</type>
  13483. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/file1</expected-output>
  13484. </comparator>
  13485. <comparator>
  13486. <type>RegexpComparator</type>
  13487. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/file2</expected-output>
  13488. </comparator>
  13489. <comparator>
  13490. <type>RegexpComparator</type>
  13491. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/file3</expected-output>
  13492. </comparator>
  13493. <comparator>
  13494. <type>RegexpComparator</type>
  13495. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/file4</expected-output>
  13496. </comparator>
  13497. </comparators>
  13498. </test>
  13499. <test> <!-- TESTED -->
  13500. <description>chgrp: change group of multiple files in relative path without globbing</description>
  13501. <test-commands>
  13502. <command>-fs NAMENODE -touchz file1</command>
  13503. <command>-fs NAMENODE -touchz file2</command>
  13504. <command>-fs NAMENODE -touchz file3</command>
  13505. <command>-fs NAMENODE -touchz file4</command>
  13506. <command>-fs NAMENODE -chgrp newgroup file1 file2 file3 file4 </command>
  13507. <command>-fs NAMENODE -ls -R file*</command>
  13508. </test-commands>
  13509. <cleanup-commands>
  13510. <command>-fs NAMENODE -rm file*</command>
  13511. </cleanup-commands>
  13512. <comparators>
  13513. <comparator>
  13514. <type>RegexpComparator</type>
  13515. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*file1</expected-output>
  13516. </comparator>
  13517. <comparator>
  13518. <type>RegexpComparator</type>
  13519. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*file2</expected-output>
  13520. </comparator>
  13521. <comparator>
  13522. <type>RegexpComparator</type>
  13523. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*file3</expected-output>
  13524. </comparator>
  13525. <comparator>
  13526. <type>RegexpComparator</type>
  13527. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*file4</expected-output>
  13528. </comparator>
  13529. </comparators>
  13530. </test>
  13531. <test> <!-- TESTED -->
  13532. <description>chgrp: change group of multiple directories in absolute path without globbing</description>
  13533. <test-commands>
  13534. <command>-fs NAMENODE -mkdir /dir0</command>
  13535. <command>-fs NAMENODE -mkdir /dir0/dir1</command>
  13536. <command>-fs NAMENODE -touchz /dir0/file0</command>
  13537. <command>-fs NAMENODE -touchz /dir0/dir1/file1</command>
  13538. <command>-fs NAMENODE -touchz /dir0/dir1/file2</command>
  13539. <command>-fs NAMENODE -mkdir /dir2</command>
  13540. <command>-fs NAMENODE -mkdir /dir2/dir1</command>
  13541. <command>-fs NAMENODE -touchz /dir2/file0</command>
  13542. <command>-fs NAMENODE -touchz /dir2/dir1/file1</command>
  13543. <command>-fs NAMENODE -touchz /dir2/dir1/file2</command>
  13544. <command>-fs NAMENODE -chgrp newgroup /dir0 /dir2</command>
  13545. <command>-fs NAMENODE -ls -R /dir*</command>
  13546. </test-commands>
  13547. <cleanup-commands>
  13548. <command>-fs NAMENODE -rm -r /dir*</command>
  13549. </cleanup-commands>
  13550. <comparators>
  13551. <comparator>
  13552. <type>RegexpComparator</type>
  13553. <expected-output>^drwxr-xr-x( )*-( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1</expected-output>
  13554. </comparator>
  13555. <comparator>
  13556. <type>RegexpComparator</type>
  13557. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1/file1</expected-output>
  13558. </comparator>
  13559. <comparator>
  13560. <type>RegexpComparator</type>
  13561. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1/file2</expected-output>
  13562. </comparator>
  13563. <comparator>
  13564. <type>RegexpComparator</type>
  13565. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/file0</expected-output>
  13566. </comparator>
  13567. <comparator>
  13568. <type>RegexpComparator</type>
  13569. <expected-output>^drwxr-xr-x( )*-( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir2/dir1</expected-output>
  13570. </comparator>
  13571. <comparator>
  13572. <type>RegexpComparator</type>
  13573. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir2/dir1/file1</expected-output>
  13574. </comparator>
  13575. <comparator>
  13576. <type>RegexpComparator</type>
  13577. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir2/dir1/file2</expected-output>
  13578. </comparator>
  13579. <comparator>
  13580. <type>RegexpComparator</type>
  13581. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir2/file0</expected-output>
  13582. </comparator>
  13583. </comparators>
  13584. </test>
  13585. <test> <!-- TESTED -->
  13586. <description>chgrp: change group of multiple directories in relative path without globbing</description>
  13587. <test-commands>
  13588. <command>-fs NAMENODE -mkdir -p dir0</command>
  13589. <command>-fs NAMENODE -mkdir -p dir0/dir1</command>
  13590. <command>-fs NAMENODE -touchz dir0/file0</command>
  13591. <command>-fs NAMENODE -touchz dir0/dir1/file1</command>
  13592. <command>-fs NAMENODE -touchz dir0/dir1/file2</command>
  13593. <command>-fs NAMENODE -mkdir -p dir2</command>
  13594. <command>-fs NAMENODE -mkdir -p dir2/dir1</command>
  13595. <command>-fs NAMENODE -touchz dir2/file0</command>
  13596. <command>-fs NAMENODE -touchz dir2/dir1/file1</command>
  13597. <command>-fs NAMENODE -touchz dir2/dir1/file2</command>
  13598. <command>-fs NAMENODE -chgrp newgroup dir0 dir2</command>
  13599. <command>-fs NAMENODE -ls -R dir*</command>
  13600. </test-commands>
  13601. <cleanup-commands>
  13602. <command>-fs NAMENODE -rm -r dir*</command>
  13603. </cleanup-commands>
  13604. <comparators>
  13605. <comparator>
  13606. <type>RegexpComparator</type>
  13607. <expected-output>^drwxr-xr-x( )*-( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/dir1</expected-output>
  13608. </comparator>
  13609. <comparator>
  13610. <type>RegexpComparator</type>
  13611. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/dir1/file1</expected-output>
  13612. </comparator>
  13613. <comparator>
  13614. <type>RegexpComparator</type>
  13615. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/dir1/file2</expected-output>
  13616. </comparator>
  13617. <comparator>
  13618. <type>RegexpComparator</type>
  13619. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/file0</expected-output>
  13620. </comparator>
  13621. <comparator>
  13622. <type>RegexpComparator</type>
  13623. <expected-output>^drwxr-xr-x( )*-( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir2/dir1</expected-output>
  13624. </comparator>
  13625. <comparator>
  13626. <type>RegexpComparator</type>
  13627. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir2/dir1/file1</expected-output>
  13628. </comparator>
  13629. <comparator>
  13630. <type>RegexpComparator</type>
  13631. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir2/dir1/file2</expected-output>
  13632. </comparator>
  13633. <comparator>
  13634. <type>RegexpComparator</type>
  13635. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir2/file0</expected-output>
  13636. </comparator>
  13637. </comparators>
  13638. </test>
  13639. <test> <!-- TESTED -->
  13640. <description>chgrp: change group of multiple directories recursively in absolute path using globbing</description>
  13641. <test-commands>
  13642. <command>-fs NAMENODE -mkdir /dir0</command>
  13643. <command>-fs NAMENODE -mkdir /dir0/dir1</command>
  13644. <command>-fs NAMENODE -touchz /dir0/file0</command>
  13645. <command>-fs NAMENODE -touchz /dir0/dir1/file1</command>
  13646. <command>-fs NAMENODE -touchz /dir0/dir1/file2</command>
  13647. <command>-fs NAMENODE -mkdir /dir2</command>
  13648. <command>-fs NAMENODE -mkdir /dir2/dir1</command>
  13649. <command>-fs NAMENODE -touchz /dir2/file0</command>
  13650. <command>-fs NAMENODE -touchz /dir2/dir1/file1</command>
  13651. <command>-fs NAMENODE -touchz /dir2/dir1/file2</command>
  13652. <command>-fs NAMENODE -chgrp -R newgroup /dir*</command>
  13653. <command>-fs NAMENODE -ls -R /dir*</command>
  13654. </test-commands>
  13655. <cleanup-commands>
  13656. <command>-fs NAMENODE -rm -r /dir*</command>
  13657. </cleanup-commands>
  13658. <comparators>
  13659. <comparator>
  13660. <type>RegexpComparator</type>
  13661. <expected-output>^drwxr-xr-x( )*-( )*USERNAME( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1</expected-output>
  13662. </comparator>
  13663. <comparator>
  13664. <type>RegexpComparator</type>
  13665. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1/file1</expected-output>
  13666. </comparator>
  13667. <comparator>
  13668. <type>RegexpComparator</type>
  13669. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1/file2</expected-output>
  13670. </comparator>
  13671. <comparator>
  13672. <type>RegexpComparator</type>
  13673. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/file0</expected-output>
  13674. </comparator>
  13675. <comparator>
  13676. <type>RegexpComparator</type>
  13677. <expected-output>^drwxr-xr-x( )*-( )*USERNAME( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir2/dir1</expected-output>
  13678. </comparator>
  13679. <comparator>
  13680. <type>RegexpComparator</type>
  13681. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir2/dir1/file1</expected-output>
  13682. </comparator>
  13683. <comparator>
  13684. <type>RegexpComparator</type>
  13685. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir2/dir1/file2</expected-output>
  13686. </comparator>
  13687. <comparator>
  13688. <type>RegexpComparator</type>
  13689. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir2/file0</expected-output>
  13690. </comparator>
  13691. </comparators>
  13692. </test>
  13693. <test> <!-- TESTED -->
  13694. <description>chgrp: change group of multiple directories recursively in relative path using globbing</description>
  13695. <test-commands>
  13696. <command>-fs NAMENODE -mkdir -p dir0</command>
  13697. <command>-fs NAMENODE -mkdir -p dir0/dir1</command>
  13698. <command>-fs NAMENODE -touchz dir0/file0</command>
  13699. <command>-fs NAMENODE -touchz dir0/dir1/file1</command>
  13700. <command>-fs NAMENODE -touchz dir0/dir1/file2</command>
  13701. <command>-fs NAMENODE -mkdir -p dir2</command>
  13702. <command>-fs NAMENODE -mkdir -p dir2/dir1</command>
  13703. <command>-fs NAMENODE -touchz dir2/file0</command>
  13704. <command>-fs NAMENODE -touchz dir2/dir1/file1</command>
  13705. <command>-fs NAMENODE -touchz dir2/dir1/file2</command>
  13706. <command>-fs NAMENODE -chgrp -R newgroup dir*</command>
  13707. <command>-fs NAMENODE -ls -R dir*</command>
  13708. </test-commands>
  13709. <cleanup-commands>
  13710. <command>-fs NAMENODE -rm -r dir*</command>
  13711. </cleanup-commands>
  13712. <comparators>
  13713. <comparator>
  13714. <type>RegexpComparator</type>
  13715. <expected-output>^drwxr-xr-x( )*-( )*USERNAME( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/dir1</expected-output>
  13716. </comparator>
  13717. <comparator>
  13718. <type>RegexpComparator</type>
  13719. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/dir1/file1</expected-output>
  13720. </comparator>
  13721. <comparator>
  13722. <type>RegexpComparator</type>
  13723. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/dir1/file2</expected-output>
  13724. </comparator>
  13725. <comparator>
  13726. <type>RegexpComparator</type>
  13727. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/file0</expected-output>
  13728. </comparator>
  13729. <comparator>
  13730. <type>RegexpComparator</type>
  13731. <expected-output>^drwxr-xr-x( )*-( )*USERNAME( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir2/dir1</expected-output>
  13732. </comparator>
  13733. <comparator>
  13734. <type>RegexpComparator</type>
  13735. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir2/dir1/file1</expected-output>
  13736. </comparator>
  13737. <comparator>
  13738. <type>RegexpComparator</type>
  13739. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir2/dir1/file2</expected-output>
  13740. </comparator>
  13741. <comparator>
  13742. <type>RegexpComparator</type>
  13743. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir2/file0</expected-output>
  13744. </comparator>
  13745. </comparators>
  13746. </test>
  13747. <test> <!-- TESTED -->
  13748. <description>chgrp: change group of multiple directories recursively in absolute path without globbing</description>
  13749. <test-commands>
  13750. <command>-fs NAMENODE -mkdir /dir0</command>
  13751. <command>-fs NAMENODE -mkdir /dir0/dir1</command>
  13752. <command>-fs NAMENODE -touchz /dir0/file0</command>
  13753. <command>-fs NAMENODE -touchz /dir0/dir1/file1</command>
  13754. <command>-fs NAMENODE -touchz /dir0/dir1/file2</command>
  13755. <command>-fs NAMENODE -mkdir /dir2</command>
  13756. <command>-fs NAMENODE -mkdir /dir2/dir1</command>
  13757. <command>-fs NAMENODE -touchz /dir2/file0</command>
  13758. <command>-fs NAMENODE -touchz /dir2/dir1/file1</command>
  13759. <command>-fs NAMENODE -touchz /dir2/dir1/file2</command>
  13760. <command>-fs NAMENODE -chgrp -R newgroup /dir0 /dir2</command>
  13761. <command>-fs NAMENODE -ls -R /dir*</command>
  13762. </test-commands>
  13763. <cleanup-commands>
  13764. <command>-fs NAMENODE -rm -r /dir*</command>
  13765. </cleanup-commands>
  13766. <comparators>
  13767. <comparator>
  13768. <type>RegexpComparator</type>
  13769. <expected-output>^drwxr-xr-x( )*-( )*USERNAME( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1</expected-output>
  13770. </comparator>
  13771. <comparator>
  13772. <type>RegexpComparator</type>
  13773. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1/file1</expected-output>
  13774. </comparator>
  13775. <comparator>
  13776. <type>RegexpComparator</type>
  13777. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1/file2</expected-output>
  13778. </comparator>
  13779. <comparator>
  13780. <type>RegexpComparator</type>
  13781. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/file0</expected-output>
  13782. </comparator>
  13783. <comparator>
  13784. <type>RegexpComparator</type>
  13785. <expected-output>^drwxr-xr-x( )*-( )*USERNAME( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir2/dir1</expected-output>
  13786. </comparator>
  13787. <comparator>
  13788. <type>RegexpComparator</type>
  13789. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir2/dir1/file1</expected-output>
  13790. </comparator>
  13791. <comparator>
  13792. <type>RegexpComparator</type>
  13793. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir2/dir1/file2</expected-output>
  13794. </comparator>
  13795. <comparator>
  13796. <type>RegexpComparator</type>
  13797. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir2/file0</expected-output>
  13798. </comparator>
  13799. </comparators>
  13800. </test>
  13801. <test> <!-- TESTED -->
  13802. <description>chgrp: change group of multiple directories recursively in relative path without globbing</description>
  13803. <test-commands>
  13804. <command>-fs NAMENODE -mkdir -p dir0</command>
  13805. <command>-fs NAMENODE -mkdir -p dir0/dir1</command>
  13806. <command>-fs NAMENODE -touchz dir0/file0</command>
  13807. <command>-fs NAMENODE -touchz dir0/dir1/file1</command>
  13808. <command>-fs NAMENODE -touchz dir0/dir1/file2</command>
  13809. <command>-fs NAMENODE -mkdir -p dir2</command>
  13810. <command>-fs NAMENODE -mkdir -p dir2/dir1</command>
  13811. <command>-fs NAMENODE -touchz dir2/file0</command>
  13812. <command>-fs NAMENODE -touchz dir2/dir1/file1</command>
  13813. <command>-fs NAMENODE -touchz dir2/dir1/file2</command>
  13814. <command>-fs NAMENODE -chgrp -R newgroup dir0 dir2</command>
  13815. <command>-fs NAMENODE -ls -R dir*</command>
  13816. </test-commands>
  13817. <cleanup-commands>
  13818. <command>-fs NAMENODE -rm -r dir*</command>
  13819. </cleanup-commands>
  13820. <comparators>
  13821. <comparator>
  13822. <type>RegexpComparator</type>
  13823. <expected-output>^drwxr-xr-x( )*-( )*USERNAME( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/dir1</expected-output>
  13824. </comparator>
  13825. <comparator>
  13826. <type>RegexpComparator</type>
  13827. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/dir1/file1</expected-output>
  13828. </comparator>
  13829. <comparator>
  13830. <type>RegexpComparator</type>
  13831. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/dir1/file2</expected-output>
  13832. </comparator>
  13833. <comparator>
  13834. <type>RegexpComparator</type>
  13835. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/file0</expected-output>
  13836. </comparator>
  13837. <comparator>
  13838. <type>RegexpComparator</type>
  13839. <expected-output>^drwxr-xr-x( )*-( )*USERNAME( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir2/dir1</expected-output>
  13840. </comparator>
  13841. <comparator>
  13842. <type>RegexpComparator</type>
  13843. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir2/dir1/file1</expected-output>
  13844. </comparator>
  13845. <comparator>
  13846. <type>RegexpComparator</type>
  13847. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir2/dir1/file2</expected-output>
  13848. </comparator>
  13849. <comparator>
  13850. <type>RegexpComparator</type>
  13851. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir2/file0</expected-output>
  13852. </comparator>
  13853. </comparators>
  13854. </test>
  13855. <test> <!-- TESTED -->
  13856. <description>chgrp: invalid option for group of file in absolute path</description>
  13857. <test-commands>
  13858. <command>-fs NAMENODE -touchz /file1</command>
  13859. <command>-fs NAMENODE -chgrp % /file1</command>
  13860. </test-commands>
  13861. <cleanup-commands>
  13862. <command>-fs NAMENODE -rm /file1</command>
  13863. </cleanup-commands>
  13864. <comparators>
  13865. <comparator>
  13866. <type>RegexpComparator</type>
  13867. <expected-output>^-chgrp: '%' does not match expected pattern for group</expected-output>
  13868. </comparator>
  13869. </comparators>
  13870. </test>
  13871. <test> <!-- TESTED -->
  13872. <description>chgrp: invalid option for group of file in relative path</description>
  13873. <test-commands>
  13874. <command>-fs NAMENODE -touchz file1</command>
  13875. <command>-fs NAMENODE -chgrp % file1</command>
  13876. </test-commands>
  13877. <cleanup-commands>
  13878. <command>-fs NAMENODE -rm file1</command>
  13879. </cleanup-commands>
  13880. <comparators>
  13881. <comparator>
  13882. <type>RegexpComparator</type>
  13883. <expected-output>^-chgrp: '%' does not match expected pattern for group</expected-output>
  13884. </comparator>
  13885. </comparators>
  13886. </test>
  13887. <test> <!-- TESTED -->
  13888. <description>chgrp: change group of file in hdfs:// path</description>
  13889. <test-commands>
  13890. <command>-fs NAMENODE -touchz hdfs:///file1</command>
  13891. <command>-fs NAMENODE -chgrp newgroup hdfs:///file1</command>
  13892. <command>-fs NAMENODE -ls hdfs:///file1</command>
  13893. </test-commands>
  13894. <cleanup-commands>
  13895. <command>-fs NAMENODE -rm hdfs:///file1</command>
  13896. </cleanup-commands>
  13897. <comparators>
  13898. <comparator>
  13899. <type>RegexpComparator</type>
  13900. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///file1</expected-output>
  13901. </comparator>
  13902. </comparators>
  13903. </test>
  13904. <test> <!-- TESTED -->
  13905. <description>chgrp: change group of directory in hdfs:// path</description>
  13906. <test-commands>
  13907. <command>-fs NAMENODE -mkdir hdfs:///dir0</command>
  13908. <command>-fs NAMENODE -mkdir hdfs:///dir0/dir1</command>
  13909. <command>-fs NAMENODE -touchz hdfs:///dir0/file0</command>
  13910. <command>-fs NAMENODE -touchz hdfs:///dir0/dir1/file1</command>
  13911. <command>-fs NAMENODE -touchz hdfs:///dir0/dir1/file2</command>
  13912. <command>-fs NAMENODE -chgrp newgroup hdfs:///dir0/dir1</command>
  13913. <command>-fs NAMENODE -ls -R hdfs:///dir0</command>
  13914. </test-commands>
  13915. <cleanup-commands>
  13916. <command>-fs NAMENODE -rm -r hdfs:///dir0</command>
  13917. </cleanup-commands>
  13918. <comparators>
  13919. <comparator>
  13920. <type>RegexpComparator</type>
  13921. <expected-output>^drwxr-xr-x( )*-( )*USERNAME( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir0/dir1</expected-output>
  13922. </comparator>
  13923. <comparator>
  13924. <type>RegexpComparator</type>
  13925. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir0/dir1/file1</expected-output>
  13926. </comparator>
  13927. <comparator>
  13928. <type>RegexpComparator</type>
  13929. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir0/dir1/file2</expected-output>
  13930. </comparator>
  13931. <comparator>
  13932. <type>RegexpComparator</type>
  13933. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir0/file0</expected-output>
  13934. </comparator>
  13935. </comparators>
  13936. </test>
  13937. <test> <!-- TESTED -->
  13938. <description>chgrp: change group of directory in hdfs:// path recursively </description>
  13939. <test-commands>
  13940. <command>-fs NAMENODE -mkdir hdfs:///dir0</command>
  13941. <command>-fs NAMENODE -mkdir hdfs:///dir0/dir1</command>
  13942. <command>-fs NAMENODE -touchz hdfs:///dir0/file0</command>
  13943. <command>-fs NAMENODE -touchz hdfs:///dir0/dir1/file1</command>
  13944. <command>-fs NAMENODE -touchz hdfs:///dir0/dir1/file2</command>
  13945. <command>-fs NAMENODE -chgrp -R newgroup hdfs:///dir0/dir1</command>
  13946. <command>-fs NAMENODE -ls -R hdfs:///dir0</command>
  13947. </test-commands>
  13948. <cleanup-commands>
  13949. <command>-fs NAMENODE -rm -r hdfs:///dir0</command>
  13950. </cleanup-commands>
  13951. <comparators>
  13952. <comparator>
  13953. <type>RegexpComparator</type>
  13954. <expected-output>^drwxr-xr-x( )*-( )*USERNAME( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir0/dir1</expected-output>
  13955. </comparator>
  13956. <comparator>
  13957. <type>RegexpComparator</type>
  13958. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir0/dir1/file1</expected-output>
  13959. </comparator>
  13960. <comparator>
  13961. <type>RegexpComparator</type>
  13962. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir0/dir1/file2</expected-output>
  13963. </comparator>
  13964. <comparator>
  13965. <type>RegexpComparator</type>
  13966. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir0/file0</expected-output>
  13967. </comparator>
  13968. </comparators>
  13969. </test>
  13970. <test> <!-- TESTED -->
  13971. <description>chgrp: change group of non existent file in hdfs:// path</description>
  13972. <test-commands>
  13973. <command>-fs NAMENODE -chgrp newgroup hdfs:///file1</command>
  13974. </test-commands>
  13975. <cleanup-commands>
  13976. <command>-fs NAMENODE -rm hdfs:///file1</command>
  13977. </cleanup-commands>
  13978. <comparators>
  13979. <comparator>
  13980. <type>RegexpComparator</type>
  13981. <expected-output>^chgrp: `hdfs:///file1': No such file or directory</expected-output>
  13982. </comparator>
  13983. </comparators>
  13984. </test>
  13985. <test> <!-- TESTED -->
  13986. <description>chgrp: change group of multiple files in hdfs:// path using globbing</description>
  13987. <test-commands>
  13988. <command>-fs NAMENODE -touchz hdfs:///file1</command>
  13989. <command>-fs NAMENODE -touchz hdfs:///file2</command>
  13990. <command>-fs NAMENODE -touchz hdfs:///file3</command>
  13991. <command>-fs NAMENODE -touchz hdfs:///file4</command>
  13992. <command>-fs NAMENODE -chgrp newgroup hdfs:///file* </command>
  13993. <command>-fs NAMENODE -ls -R hdfs:///file*</command>
  13994. </test-commands>
  13995. <cleanup-commands>
  13996. <command>-fs NAMENODE -rm hdfs:///file*</command>
  13997. </cleanup-commands>
  13998. <comparators>
  13999. <comparator>
  14000. <type>RegexpComparator</type>
  14001. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///file1</expected-output>
  14002. </comparator>
  14003. <comparator>
  14004. <type>RegexpComparator</type>
  14005. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///file2</expected-output>
  14006. </comparator>
  14007. <comparator>
  14008. <type>RegexpComparator</type>
  14009. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///file3</expected-output>
  14010. </comparator>
  14011. <comparator>
  14012. <type>RegexpComparator</type>
  14013. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///file4</expected-output>
  14014. </comparator>
  14015. </comparators>
  14016. </test>
  14017. <test> <!-- TESTED -->
  14018. <description>chgrp: change group of multiple directories in hdfs:// path using globbing</description>
  14019. <test-commands>
  14020. <command>-fs NAMENODE -mkdir hdfs:///dir0</command>
  14021. <command>-fs NAMENODE -mkdir hdfs:///dir0/dir1</command>
  14022. <command>-fs NAMENODE -touchz hdfs:///dir0/file0</command>
  14023. <command>-fs NAMENODE -touchz hdfs:///dir0/dir1/file1</command>
  14024. <command>-fs NAMENODE -touchz hdfs:///dir0/dir1/file2</command>
  14025. <command>-fs NAMENODE -mkdir hdfs:///dir2</command>
  14026. <command>-fs NAMENODE -mkdir hdfs:///dir2/dir1</command>
  14027. <command>-fs NAMENODE -touchz hdfs:///dir2/file0</command>
  14028. <command>-fs NAMENODE -touchz hdfs:///dir2/dir1/file1</command>
  14029. <command>-fs NAMENODE -touchz hdfs:///dir2/dir1/file2</command>
  14030. <command>-fs NAMENODE -chgrp newgroup hdfs:///dir*</command>
  14031. <command>-fs NAMENODE -ls -R hdfs:///dir*</command>
  14032. </test-commands>
  14033. <cleanup-commands>
  14034. <command>-fs NAMENODE -rm -r hdfs:///dir*</command>
  14035. </cleanup-commands>
  14036. <comparators>
  14037. <comparator>
  14038. <type>RegexpComparator</type>
  14039. <expected-output>^drwxr-xr-x( )*-( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir0/dir1</expected-output>
  14040. </comparator>
  14041. <comparator>
  14042. <type>RegexpComparator</type>
  14043. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir0/dir1/file1</expected-output>
  14044. </comparator>
  14045. <comparator>
  14046. <type>RegexpComparator</type>
  14047. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir0/dir1/file2</expected-output>
  14048. </comparator>
  14049. <comparator>
  14050. <type>RegexpComparator</type>
  14051. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir0/file0</expected-output>
  14052. </comparator>
  14053. <comparator>
  14054. <type>RegexpComparator</type>
  14055. <expected-output>^drwxr-xr-x( )*-( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir2/dir1</expected-output>
  14056. </comparator>
  14057. <comparator>
  14058. <type>RegexpComparator</type>
  14059. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir2/dir1/file1</expected-output>
  14060. </comparator>
  14061. <comparator>
  14062. <type>RegexpComparator</type>
  14063. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir2/dir1/file2</expected-output>
  14064. </comparator>
  14065. <comparator>
  14066. <type>RegexpComparator</type>
  14067. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir2/file0</expected-output>
  14068. </comparator>
  14069. </comparators>
  14070. </test>
  14071. <test> <!-- TESTED -->
  14072. <description>chgrp: change of multiple files in hdfs:// path without globbing</description>
  14073. <test-commands>
  14074. <command>-fs NAMENODE -touchz hdfs:///file1</command>
  14075. <command>-fs NAMENODE -touchz hdfs:///file2</command>
  14076. <command>-fs NAMENODE -touchz hdfs:///file3</command>
  14077. <command>-fs NAMENODE -touchz hdfs:///file4</command>
  14078. <command>-fs NAMENODE -chgrp newgroup hdfs:///file1 hdfs:///file2 hdfs:///file3 hdfs:///file4 </command>
  14079. <command>-fs NAMENODE -ls -R hdfs:///file*</command>
  14080. </test-commands>
  14081. <cleanup-commands>
  14082. <command>-fs NAMENODE -rm hdfs:///file*</command>
  14083. </cleanup-commands>
  14084. <comparators>
  14085. <comparator>
  14086. <type>RegexpComparator</type>
  14087. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///file1</expected-output>
  14088. </comparator>
  14089. <comparator>
  14090. <type>RegexpComparator</type>
  14091. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///file2</expected-output>
  14092. </comparator>
  14093. <comparator>
  14094. <type>RegexpComparator</type>
  14095. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///file3</expected-output>
  14096. </comparator>
  14097. <comparator>
  14098. <type>RegexpComparator</type>
  14099. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///file4</expected-output>
  14100. </comparator>
  14101. </comparators>
  14102. </test>
  14103. <test> <!-- TESTED -->
  14104. <description>chgrp: change group of multiple directories in hdfs:// path without globbing</description>
  14105. <test-commands>
  14106. <command>-fs NAMENODE -mkdir hdfs:///dir0</command>
  14107. <command>-fs NAMENODE -mkdir hdfs:///dir0/dir1</command>
  14108. <command>-fs NAMENODE -touchz hdfs:///dir0/file0</command>
  14109. <command>-fs NAMENODE -touchz hdfs:///dir0/dir1/file1</command>
  14110. <command>-fs NAMENODE -touchz hdfs:///dir0/dir1/file2</command>
  14111. <command>-fs NAMENODE -mkdir hdfs:///dir2</command>
  14112. <command>-fs NAMENODE -mkdir hdfs:///dir2/dir1</command>
  14113. <command>-fs NAMENODE -touchz hdfs:///dir2/file0</command>
  14114. <command>-fs NAMENODE -touchz hdfs:///dir2/dir1/file1</command>
  14115. <command>-fs NAMENODE -touchz hdfs:///dir2/dir1/file2</command>
  14116. <command>-fs NAMENODE -chgrp newgroup hdfs:///dir0 hdfs:///dir2</command>
  14117. <command>-fs NAMENODE -ls -R hdfs:///dir*</command>
  14118. </test-commands>
  14119. <cleanup-commands>
  14120. <command>-fs NAMENODE -rm -r hdfs:///dir*</command>
  14121. </cleanup-commands>
  14122. <comparators>
  14123. <comparator>
  14124. <type>RegexpComparator</type>
  14125. <expected-output>^drwxr-xr-x( )*-( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir0/dir1</expected-output>
  14126. </comparator>
  14127. <comparator>
  14128. <type>RegexpComparator</type>
  14129. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir0/dir1/file1</expected-output>
  14130. </comparator>
  14131. <comparator>
  14132. <type>RegexpComparator</type>
  14133. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir0/dir1/file2</expected-output>
  14134. </comparator>
  14135. <comparator>
  14136. <type>RegexpComparator</type>
  14137. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir0/file0</expected-output>
  14138. </comparator>
  14139. <comparator>
  14140. <type>RegexpComparator</type>
  14141. <expected-output>^drwxr-xr-x( )*-( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir2/dir1</expected-output>
  14142. </comparator>
  14143. <comparator>
  14144. <type>RegexpComparator</type>
  14145. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir2/dir1/file1</expected-output>
  14146. </comparator>
  14147. <comparator>
  14148. <type>RegexpComparator</type>
  14149. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir2/dir1/file2</expected-output>
  14150. </comparator>
  14151. <comparator>
  14152. <type>RegexpComparator</type>
  14153. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir2/file0</expected-output>
  14154. </comparator>
  14155. </comparators>
  14156. </test>
  14157. <test> <!-- TESTED -->
  14158. <description>chgrp: change group of multiple directories recursively in hdfs:// path using globbing</description>
  14159. <test-commands>
  14160. <command>-fs NAMENODE -mkdir hdfs:///dir0</command>
  14161. <command>-fs NAMENODE -mkdir hdfs:///dir0/dir1</command>
  14162. <command>-fs NAMENODE -touchz hdfs:///dir0/file0</command>
  14163. <command>-fs NAMENODE -touchz hdfs:///dir0/dir1/file1</command>
  14164. <command>-fs NAMENODE -touchz hdfs:///dir0/dir1/file2</command>
  14165. <command>-fs NAMENODE -mkdir hdfs:///dir2</command>
  14166. <command>-fs NAMENODE -mkdir hdfs:///dir2/dir1</command>
  14167. <command>-fs NAMENODE -touchz hdfs:///dir2/file0</command>
  14168. <command>-fs NAMENODE -touchz hdfs:///dir2/dir1/file1</command>
  14169. <command>-fs NAMENODE -touchz hdfs:///dir2/dir1/file2</command>
  14170. <command>-fs NAMENODE -chgrp -R newgroup hdfs:///dir*</command>
  14171. <command>-fs NAMENODE -ls -R hdfs:///dir*</command>
  14172. </test-commands>
  14173. <cleanup-commands>
  14174. <command>-fs NAMENODE -rm -r hdfs:///dir*</command>
  14175. </cleanup-commands>
  14176. <comparators>
  14177. <comparator>
  14178. <type>RegexpComparator</type>
  14179. <expected-output>^drwxr-xr-x( )*-( )*USERNAME( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir0/dir1</expected-output>
  14180. </comparator>
  14181. <comparator>
  14182. <type>RegexpComparator</type>
  14183. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir0/dir1/file1</expected-output>
  14184. </comparator>
  14185. <comparator>
  14186. <type>RegexpComparator</type>
  14187. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir0/dir1/file2</expected-output>
  14188. </comparator>
  14189. <comparator>
  14190. <type>RegexpComparator</type>
  14191. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir0/file0</expected-output>
  14192. </comparator>
  14193. <comparator>
  14194. <type>RegexpComparator</type>
  14195. <expected-output>^drwxr-xr-x( )*-( )*USERNAME( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir2/dir1</expected-output>
  14196. </comparator>
  14197. <comparator>
  14198. <type>RegexpComparator</type>
  14199. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir2/dir1/file1</expected-output>
  14200. </comparator>
  14201. <comparator>
  14202. <type>RegexpComparator</type>
  14203. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir2/dir1/file2</expected-output>
  14204. </comparator>
  14205. <comparator>
  14206. <type>RegexpComparator</type>
  14207. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir2/file0</expected-output>
  14208. </comparator>
  14209. </comparators>
  14210. </test>
  14211. <test> <!-- TESTED -->
  14212. <description>chgrp: change group of multiple directories recursively in hdfs:// path without globbing</description>
  14213. <test-commands>
  14214. <command>-fs NAMENODE -mkdir hdfs:///dir0</command>
  14215. <command>-fs NAMENODE -mkdir hdfs:///dir0/dir1</command>
  14216. <command>-fs NAMENODE -touchz hdfs:///dir0/file0</command>
  14217. <command>-fs NAMENODE -touchz hdfs:///dir0/dir1/file1</command>
  14218. <command>-fs NAMENODE -touchz hdfs:///dir0/dir1/file2</command>
  14219. <command>-fs NAMENODE -mkdir hdfs:///dir2</command>
  14220. <command>-fs NAMENODE -mkdir hdfs:///dir2/dir1</command>
  14221. <command>-fs NAMENODE -touchz hdfs:///dir2/file0</command>
  14222. <command>-fs NAMENODE -touchz hdfs:///dir2/dir1/file1</command>
  14223. <command>-fs NAMENODE -touchz hdfs:///dir2/dir1/file2</command>
  14224. <command>-fs NAMENODE -chgrp -R newgroup hdfs:///dir0 hdfs:///dir2</command>
  14225. <command>-fs NAMENODE -ls -R hdfs:///dir*</command>
  14226. </test-commands>
  14227. <cleanup-commands>
  14228. <command>-fs NAMENODE -rm -r hdfs:///dir*</command>
  14229. </cleanup-commands>
  14230. <comparators>
  14231. <comparator>
  14232. <type>RegexpComparator</type>
  14233. <expected-output>^drwxr-xr-x( )*-( )*USERNAME( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir0/dir1</expected-output>
  14234. </comparator>
  14235. <comparator>
  14236. <type>RegexpComparator</type>
  14237. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir0/dir1/file1</expected-output>
  14238. </comparator>
  14239. <comparator>
  14240. <type>RegexpComparator</type>
  14241. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir0/dir1/file2</expected-output>
  14242. </comparator>
  14243. <comparator>
  14244. <type>RegexpComparator</type>
  14245. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir0/file0</expected-output>
  14246. </comparator>
  14247. <comparator>
  14248. <type>RegexpComparator</type>
  14249. <expected-output>^drwxr-xr-x( )*-( )*USERNAME( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir2/dir1</expected-output>
  14250. </comparator>
  14251. <comparator>
  14252. <type>RegexpComparator</type>
  14253. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir2/dir1/file1</expected-output>
  14254. </comparator>
  14255. <comparator>
  14256. <type>RegexpComparator</type>
  14257. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir2/dir1/file2</expected-output>
  14258. </comparator>
  14259. <comparator>
  14260. <type>RegexpComparator</type>
  14261. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir2/file0</expected-output>
  14262. </comparator>
  14263. </comparators>
  14264. </test>
  14265. <test> <!-- TESTED -->
  14266. <description>chgrp: invalid option for group of file in hdfs:// path</description>
  14267. <test-commands>
  14268. <command>-fs NAMENODE -touchz hdfs:///file1</command>
  14269. <command>-fs NAMENODE -chgrp % hdfs:///file1</command>
  14270. </test-commands>
  14271. <cleanup-commands>
  14272. <command>-fs NAMENODE -rm hdfs:///file1</command>
  14273. </cleanup-commands>
  14274. <comparators>
  14275. <comparator>
  14276. <type>RegexpComparator</type>
  14277. <expected-output>^-chgrp: '%' does not match expected pattern for group</expected-output>
  14278. </comparator>
  14279. </comparators>
  14280. </test>
  14281. <!-- Tests for chgrp -->
  14282. <test> <!-- TESTED -->
  14283. <description>chgrp: change group of file in Namenode's path</description>
  14284. <test-commands>
  14285. <command>-fs NAMENODE -touchz NAMENODE/file1</command>
  14286. <command>-fs NAMENODE -chgrp newgroup NAMENODE/file1</command>
  14287. <command>-fs NAMENODE -ls NAMENODE/file1</command>
  14288. </test-commands>
  14289. <cleanup-commands>
  14290. <command>-fs NAMENODE -rm NAMENODE/file1</command>
  14291. </cleanup-commands>
  14292. <comparators>
  14293. <comparator>
  14294. <type>RegexpComparator</type>
  14295. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/file1</expected-output>
  14296. </comparator>
  14297. </comparators>
  14298. </test>
  14299. <test> <!-- TESTED -->
  14300. <description>chgrp: change group of directory in Namenode's path</description>
  14301. <test-commands>
  14302. <command>-fs NAMENODE -mkdir NAMENODE/dir0</command>
  14303. <command>-fs NAMENODE -mkdir NAMENODE/dir0/dir1</command>
  14304. <command>-fs NAMENODE -touchz NAMENODE/dir0/file0</command>
  14305. <command>-fs NAMENODE -touchz NAMENODE/dir0/dir1/file1</command>
  14306. <command>-fs NAMENODE -touchz NAMENODE/dir0/dir1/file2</command>
  14307. <command>-fs NAMENODE -chgrp newgroup NAMENODE/dir0/dir1</command>
  14308. <command>-fs NAMENODE -ls -R NAMENODE/dir0</command>
  14309. </test-commands>
  14310. <cleanup-commands>
  14311. <command>-fs NAMENODE -rm -r NAMENODE/dir0</command>
  14312. </cleanup-commands>
  14313. <comparators>
  14314. <comparator>
  14315. <type>RegexpComparator</type>
  14316. <expected-output>^drwxr-xr-x( )*-( )*USERNAME( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir0/dir1</expected-output>
  14317. </comparator>
  14318. <comparator>
  14319. <type>RegexpComparator</type>
  14320. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir0/dir1/file1</expected-output>
  14321. </comparator>
  14322. <comparator>
  14323. <type>RegexpComparator</type>
  14324. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir0/dir1/file2</expected-output>
  14325. </comparator>
  14326. <comparator>
  14327. <type>RegexpComparator</type>
  14328. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir0/file0</expected-output>
  14329. </comparator>
  14330. </comparators>
  14331. </test>
  14332. <test> <!-- TESTED -->
  14333. <description>chgrp: change group of directory in Namenode's path recursively </description>
  14334. <test-commands>
  14335. <command>-fs NAMENODE -mkdir NAMENODE/dir0</command>
  14336. <command>-fs NAMENODE -mkdir NAMENODE/dir0/dir1</command>
  14337. <command>-fs NAMENODE -touchz NAMENODE/dir0/file0</command>
  14338. <command>-fs NAMENODE -touchz NAMENODE/dir0/dir1/file1</command>
  14339. <command>-fs NAMENODE -touchz NAMENODE/dir0/dir1/file2</command>
  14340. <command>-fs NAMENODE -chgrp -R newgroup NAMENODE/dir0/dir1</command>
  14341. <command>-fs NAMENODE -ls -R NAMENODE/dir0</command>
  14342. </test-commands>
  14343. <cleanup-commands>
  14344. <command>-fs NAMENODE -rm -r NAMENODE/dir0</command>
  14345. </cleanup-commands>
  14346. <comparators>
  14347. <comparator>
  14348. <type>RegexpComparator</type>
  14349. <expected-output>^drwxr-xr-x( )*-( )*USERNAME( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir0/dir1</expected-output>
  14350. </comparator>
  14351. <comparator>
  14352. <type>RegexpComparator</type>
  14353. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir0/dir1/file1</expected-output>
  14354. </comparator>
  14355. <comparator>
  14356. <type>RegexpComparator</type>
  14357. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir0/dir1/file2</expected-output>
  14358. </comparator>
  14359. <comparator>
  14360. <type>RegexpComparator</type>
  14361. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir0/file0</expected-output>
  14362. </comparator>
  14363. </comparators>
  14364. </test>
  14365. <test> <!-- TESTED -->
  14366. <description>chgrp: change group of non existent file in Namenode's path</description>
  14367. <test-commands>
  14368. <command>-fs NAMENODE -chgrp newgroup NAMENODE/file1</command>
  14369. </test-commands>
  14370. <cleanup-commands>
  14371. <command>-fs NAMENODE -rm NAMENODE/file1</command>
  14372. </cleanup-commands>
  14373. <comparators>
  14374. <comparator>
  14375. <type>RegexpComparator</type>
  14376. <expected-output>^chgrp: `NAMENODE/file1': No such file or directory</expected-output>
  14377. </comparator>
  14378. </comparators>
  14379. </test>
  14380. <test> <!-- TESTED -->
  14381. <description>chgrp: change group of multiple files in Namenode's path using globbing</description>
  14382. <test-commands>
  14383. <command>-fs NAMENODE -touchz NAMENODE/file1</command>
  14384. <command>-fs NAMENODE -touchz NAMENODE/file2</command>
  14385. <command>-fs NAMENODE -touchz NAMENODE/file3</command>
  14386. <command>-fs NAMENODE -touchz NAMENODE/file4</command>
  14387. <command>-fs NAMENODE -chgrp newgroup NAMENODE/file* </command>
  14388. <command>-fs NAMENODE -ls -R NAMENODE/file*</command>
  14389. </test-commands>
  14390. <cleanup-commands>
  14391. <command>-fs NAMENODE -rm NAMENODE/file*</command>
  14392. </cleanup-commands>
  14393. <comparators>
  14394. <comparator>
  14395. <type>RegexpComparator</type>
  14396. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/file1</expected-output>
  14397. </comparator>
  14398. <comparator>
  14399. <type>RegexpComparator</type>
  14400. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/file2</expected-output>
  14401. </comparator>
  14402. <comparator>
  14403. <type>RegexpComparator</type>
  14404. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/file3</expected-output>
  14405. </comparator>
  14406. <comparator>
  14407. <type>RegexpComparator</type>
  14408. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/file4</expected-output>
  14409. </comparator>
  14410. </comparators>
  14411. </test>
  14412. <test> <!-- TESTED -->
  14413. <description>chgrp: change group of multiple directories in Namenode's path using globbing</description>
  14414. <test-commands>
  14415. <command>-fs NAMENODE -mkdir NAMENODE/dir0</command>
  14416. <command>-fs NAMENODE -mkdir NAMENODE/dir0/dir1</command>
  14417. <command>-fs NAMENODE -touchz NAMENODE/dir0/file0</command>
  14418. <command>-fs NAMENODE -touchz NAMENODE/dir0/dir1/file1</command>
  14419. <command>-fs NAMENODE -touchz NAMENODE/dir0/dir1/file2</command>
  14420. <command>-fs NAMENODE -mkdir NAMENODE/dir2</command>
  14421. <command>-fs NAMENODE -mkdir NAMENODE/dir2/dir1</command>
  14422. <command>-fs NAMENODE -touchz NAMENODE/dir2/file0</command>
  14423. <command>-fs NAMENODE -touchz NAMENODE/dir2/dir1/file1</command>
  14424. <command>-fs NAMENODE -touchz NAMENODE/dir2/dir1/file2</command>
  14425. <command>-fs NAMENODE -chgrp newgroup NAMENODE/dir*</command>
  14426. <command>-fs NAMENODE -ls -R NAMENODE/dir*</command>
  14427. </test-commands>
  14428. <cleanup-commands>
  14429. <command>-fs NAMENODE -rm -r NAMENODE/dir*</command>
  14430. </cleanup-commands>
  14431. <comparators>
  14432. <comparator>
  14433. <type>RegexpComparator</type>
  14434. <expected-output>^drwxr-xr-x( )*-( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir0/dir1</expected-output>
  14435. </comparator>
  14436. <comparator>
  14437. <type>RegexpComparator</type>
  14438. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir0/dir1/file1</expected-output>
  14439. </comparator>
  14440. <comparator>
  14441. <type>RegexpComparator</type>
  14442. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir0/dir1/file2</expected-output>
  14443. </comparator>
  14444. <comparator>
  14445. <type>RegexpComparator</type>
  14446. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir0/file0</expected-output>
  14447. </comparator>
  14448. <comparator>
  14449. <type>RegexpComparator</type>
  14450. <expected-output>^drwxr-xr-x( )*-( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir2/dir1</expected-output>
  14451. </comparator>
  14452. <comparator>
  14453. <type>RegexpComparator</type>
  14454. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir2/dir1/file1</expected-output>
  14455. </comparator>
  14456. <comparator>
  14457. <type>RegexpComparator</type>
  14458. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir2/dir1/file2</expected-output>
  14459. </comparator>
  14460. <comparator>
  14461. <type>RegexpComparator</type>
  14462. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir2/file0</expected-output>
  14463. </comparator>
  14464. </comparators>
  14465. </test>
  14466. <test> <!-- TESTED -->
  14467. <description>chgrp: change of multiple files in Namenode's path without globbing</description>
  14468. <test-commands>
  14469. <command>-fs NAMENODE -touchz NAMENODE/file1</command>
  14470. <command>-fs NAMENODE -touchz NAMENODE/file2</command>
  14471. <command>-fs NAMENODE -touchz NAMENODE/file3</command>
  14472. <command>-fs NAMENODE -touchz NAMENODE/file4</command>
  14473. <command>-fs NAMENODE -chgrp newgroup NAMENODE/file1 NAMENODE/file2 NAMENODE/file3 NAMENODE/file4 </command>
  14474. <command>-fs NAMENODE -ls -R NAMENODE/file*</command>
  14475. </test-commands>
  14476. <cleanup-commands>
  14477. <command>-fs NAMENODE -rm NAMENODE/file*</command>
  14478. </cleanup-commands>
  14479. <comparators>
  14480. <comparator>
  14481. <type>RegexpComparator</type>
  14482. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/file1</expected-output>
  14483. </comparator>
  14484. <comparator>
  14485. <type>RegexpComparator</type>
  14486. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/file2</expected-output>
  14487. </comparator>
  14488. <comparator>
  14489. <type>RegexpComparator</type>
  14490. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/file3</expected-output>
  14491. </comparator>
  14492. <comparator>
  14493. <type>RegexpComparator</type>
  14494. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/file4</expected-output>
  14495. </comparator>
  14496. </comparators>
  14497. </test>
  14498. <test> <!-- TESTED -->
  14499. <description>chgrp: change group of multiple directories in Namenode's path without globbing</description>
  14500. <test-commands>
  14501. <command>-fs NAMENODE -mkdir NAMENODE/dir0</command>
  14502. <command>-fs NAMENODE -mkdir NAMENODE/dir0/dir1</command>
  14503. <command>-fs NAMENODE -touchz NAMENODE/dir0/file0</command>
  14504. <command>-fs NAMENODE -touchz NAMENODE/dir0/dir1/file1</command>
  14505. <command>-fs NAMENODE -touchz NAMENODE/dir0/dir1/file2</command>
  14506. <command>-fs NAMENODE -mkdir NAMENODE/dir2</command>
  14507. <command>-fs NAMENODE -mkdir NAMENODE/dir2/dir1</command>
  14508. <command>-fs NAMENODE -touchz NAMENODE/dir2/file0</command>
  14509. <command>-fs NAMENODE -touchz NAMENODE/dir2/dir1/file1</command>
  14510. <command>-fs NAMENODE -touchz NAMENODE/dir2/dir1/file2</command>
  14511. <command>-fs NAMENODE -chgrp newgroup NAMENODE/dir0 NAMENODE/dir2</command>
  14512. <command>-fs NAMENODE -ls -R NAMENODE/dir*</command>
  14513. </test-commands>
  14514. <cleanup-commands>
  14515. <command>-fs NAMENODE -rm -r NAMENODE/dir*</command>
  14516. </cleanup-commands>
  14517. <comparators>
  14518. <comparator>
  14519. <type>RegexpComparator</type>
  14520. <expected-output>^drwxr-xr-x( )*-( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir0/dir1</expected-output>
  14521. </comparator>
  14522. <comparator>
  14523. <type>RegexpComparator</type>
  14524. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir0/dir1/file1</expected-output>
  14525. </comparator>
  14526. <comparator>
  14527. <type>RegexpComparator</type>
  14528. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir0/dir1/file2</expected-output>
  14529. </comparator>
  14530. <comparator>
  14531. <type>RegexpComparator</type>
  14532. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir0/file0</expected-output>
  14533. </comparator>
  14534. <comparator>
  14535. <type>RegexpComparator</type>
  14536. <expected-output>^drwxr-xr-x( )*-( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir2/dir1</expected-output>
  14537. </comparator>
  14538. <comparator>
  14539. <type>RegexpComparator</type>
  14540. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir2/dir1/file1</expected-output>
  14541. </comparator>
  14542. <comparator>
  14543. <type>RegexpComparator</type>
  14544. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir2/dir1/file2</expected-output>
  14545. </comparator>
  14546. <comparator>
  14547. <type>RegexpComparator</type>
  14548. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir2/file0</expected-output>
  14549. </comparator>
  14550. </comparators>
  14551. </test>
  14552. <test> <!-- TESTED -->
  14553. <description>chgrp: change group of multiple directories recursively in Namenode's path using globbing</description>
  14554. <test-commands>
  14555. <command>-fs NAMENODE -mkdir NAMENODE/dir0</command>
  14556. <command>-fs NAMENODE -mkdir NAMENODE/dir0/dir1</command>
  14557. <command>-fs NAMENODE -touchz NAMENODE/dir0/file0</command>
  14558. <command>-fs NAMENODE -touchz NAMENODE/dir0/dir1/file1</command>
  14559. <command>-fs NAMENODE -touchz NAMENODE/dir0/dir1/file2</command>
  14560. <command>-fs NAMENODE -mkdir NAMENODE/dir2</command>
  14561. <command>-fs NAMENODE -mkdir NAMENODE/dir2/dir1</command>
  14562. <command>-fs NAMENODE -touchz NAMENODE/dir2/file0</command>
  14563. <command>-fs NAMENODE -touchz NAMENODE/dir2/dir1/file1</command>
  14564. <command>-fs NAMENODE -touchz NAMENODE/dir2/dir1/file2</command>
  14565. <command>-fs NAMENODE -chgrp -R newgroup NAMENODE/dir*</command>
  14566. <command>-fs NAMENODE -ls -R NAMENODE/dir*</command>
  14567. </test-commands>
  14568. <cleanup-commands>
  14569. <command>-fs NAMENODE -rm -r NAMENODE/dir*</command>
  14570. </cleanup-commands>
  14571. <comparators>
  14572. <comparator>
  14573. <type>RegexpComparator</type>
  14574. <expected-output>^drwxr-xr-x( )*-( )*USERNAME( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir0/dir1</expected-output>
  14575. </comparator>
  14576. <comparator>
  14577. <type>RegexpComparator</type>
  14578. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir0/dir1/file1</expected-output>
  14579. </comparator>
  14580. <comparator>
  14581. <type>RegexpComparator</type>
  14582. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir0/dir1/file2</expected-output>
  14583. </comparator>
  14584. <comparator>
  14585. <type>RegexpComparator</type>
  14586. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir0/file0</expected-output>
  14587. </comparator>
  14588. <comparator>
  14589. <type>RegexpComparator</type>
  14590. <expected-output>^drwxr-xr-x( )*-( )*USERNAME( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir2/dir1</expected-output>
  14591. </comparator>
  14592. <comparator>
  14593. <type>RegexpComparator</type>
  14594. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir2/dir1/file1</expected-output>
  14595. </comparator>
  14596. <comparator>
  14597. <type>RegexpComparator</type>
  14598. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir2/dir1/file2</expected-output>
  14599. </comparator>
  14600. <comparator>
  14601. <type>RegexpComparator</type>
  14602. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir2/file0</expected-output>
  14603. </comparator>
  14604. </comparators>
  14605. </test>
  14606. <test> <!-- TESTED -->
  14607. <description>chgrp: change group of multiple directories recursively in Namenode's path without globbing</description>
  14608. <test-commands>
  14609. <command>-fs NAMENODE -mkdir NAMENODE/dir0</command>
  14610. <command>-fs NAMENODE -mkdir NAMENODE/dir0/dir1</command>
  14611. <command>-fs NAMENODE -touchz NAMENODE/dir0/file0</command>
  14612. <command>-fs NAMENODE -touchz NAMENODE/dir0/dir1/file1</command>
  14613. <command>-fs NAMENODE -touchz NAMENODE/dir0/dir1/file2</command>
  14614. <command>-fs NAMENODE -mkdir NAMENODE/dir2</command>
  14615. <command>-fs NAMENODE -mkdir NAMENODE/dir2/dir1</command>
  14616. <command>-fs NAMENODE -touchz NAMENODE/dir2/file0</command>
  14617. <command>-fs NAMENODE -touchz NAMENODE/dir2/dir1/file1</command>
  14618. <command>-fs NAMENODE -touchz NAMENODE/dir2/dir1/file2</command>
  14619. <command>-fs NAMENODE -chgrp -R newgroup NAMENODE/dir0 NAMENODE/dir2</command>
  14620. <command>-fs NAMENODE -ls -R NAMENODE/dir*</command>
  14621. </test-commands>
  14622. <cleanup-commands>
  14623. <command>-fs NAMENODE -rm -r NAMENODE/dir*</command>
  14624. </cleanup-commands>
  14625. <comparators>
  14626. <comparator>
  14627. <type>RegexpComparator</type>
  14628. <expected-output>^drwxr-xr-x( )*-( )*USERNAME( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir0/dir1</expected-output>
  14629. </comparator>
  14630. <comparator>
  14631. <type>RegexpComparator</type>
  14632. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir0/dir1/file1</expected-output>
  14633. </comparator>
  14634. <comparator>
  14635. <type>RegexpComparator</type>
  14636. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir0/dir1/file2</expected-output>
  14637. </comparator>
  14638. <comparator>
  14639. <type>RegexpComparator</type>
  14640. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir0/file0</expected-output>
  14641. </comparator>
  14642. <comparator>
  14643. <type>RegexpComparator</type>
  14644. <expected-output>^drwxr-xr-x( )*-( )*USERNAME( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir2/dir1</expected-output>
  14645. </comparator>
  14646. <comparator>
  14647. <type>RegexpComparator</type>
  14648. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir2/dir1/file1</expected-output>
  14649. </comparator>
  14650. <comparator>
  14651. <type>RegexpComparator</type>
  14652. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir2/dir1/file2</expected-output>
  14653. </comparator>
  14654. <comparator>
  14655. <type>RegexpComparator</type>
  14656. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir2/file0</expected-output>
  14657. </comparator>
  14658. </comparators>
  14659. </test>
  14660. <test> <!-- TESTED -->
  14661. <description>chgrp: invalid option for group of file in Namenode's path</description>
  14662. <test-commands>
  14663. <command>-fs NAMENODE -touchz NAMENODE/file1</command>
  14664. <command>-fs NAMENODE -chgrp % NAMENODE/file1</command>
  14665. </test-commands>
  14666. <cleanup-commands>
  14667. <command>-fs NAMENODE -rm NAMENODE/file1</command>
  14668. </cleanup-commands>
  14669. <comparators>
  14670. <comparator>
  14671. <type>RegexpComparator</type>
  14672. <expected-output>^-chgrp: '%' does not match expected pattern for group</expected-output>
  14673. </comparator>
  14674. </comparators>
  14675. </test>
  14676. <test> <!--Tested -->
  14677. <description>help: help for dfsadmin report</description>
  14678. <test-commands>
  14679. <dfs-admin-command>-fs NAMENODE -help report</dfs-admin-command>
  14680. </test-commands>
  14681. <cleanup-commands>
  14682. </cleanup-commands>
  14683. <comparators>
  14684. <comparator>
  14685. <type>RegexpComparator</type>
  14686. <expected-output>^-report \[-live\] \[-dead\] \[-decommissioning\]:(.)*</expected-output>
  14687. </comparator>
  14688. <comparator>
  14689. <type>RegexpComparator</type>
  14690. <expected-output>^[ \t]*Reports basic filesystem information and statistics.( )*</expected-output>
  14691. </comparator>
  14692. </comparators>
  14693. </test>
  14694. <test> <!--Tested -->
  14695. <description>help: help for dfsadmin safemode</description>
  14696. <test-commands>
  14697. <dfs-admin-command>-fs NAMENODE -help safemode</dfs-admin-command>
  14698. </test-commands>
  14699. <cleanup-commands>
  14700. </cleanup-commands>
  14701. <comparators>
  14702. <comparator>
  14703. <type>RegexpComparator</type>
  14704. <expected-output>^-safemode &lt;enter\|leave\|get\|wait&gt;:( |\t)*Safe mode maintenance command.( )*</expected-output>
  14705. </comparator>
  14706. <comparator>
  14707. <type>RegexpComparator</type>
  14708. <expected-output>^( |\t)*Safe mode is a Namenode state in which it( )*</expected-output>
  14709. </comparator>
  14710. <comparator>
  14711. <type>RegexpComparator</type>
  14712. <expected-output>^( |\t)*1.( )*does not accept changes to the name space \(read-only\)( )*</expected-output>
  14713. </comparator>
  14714. <comparator>
  14715. <type>RegexpComparator</type>
  14716. <expected-output>^( |\t)*2.( )*does not replicate or delete blocks.( )*</expected-output>
  14717. </comparator>
  14718. <comparator>
  14719. <type>RegexpComparator</type>
  14720. <expected-output>^( |\t)*Safe mode is entered automatically at Namenode startup, and( )*</expected-output>
  14721. </comparator>
  14722. <comparator>
  14723. <type>RegexpComparator</type>
  14724. <expected-output>^( |\t)*leaves safe mode automatically when the configured minimum( )*</expected-output>
  14725. </comparator>
  14726. <comparator>
  14727. <type>RegexpComparator</type>
  14728. <expected-output>^( |\t)*percentage of blocks satisfies the minimum replication( )*</expected-output>
  14729. </comparator>
  14730. <comparator>
  14731. <type>RegexpComparator</type>
  14732. <expected-output>^( |\t)*condition. Safe mode can also be entered manually, but then( )*</expected-output>
  14733. </comparator>
  14734. <comparator>
  14735. <type>RegexpComparator</type>
  14736. <expected-output>^( |\t)*it can only be turned off manually as well.( )*</expected-output>
  14737. </comparator>
  14738. </comparators>
  14739. </test>
  14740. <test> <!--Tested -->
  14741. <description>help: help for dfsadmin refreshNodes</description>
  14742. <test-commands>
  14743. <dfs-admin-command>-fs NAMENODE -help refreshNodes</dfs-admin-command>
  14744. </test-commands>
  14745. <cleanup-commands>
  14746. </cleanup-commands>
  14747. <comparators>
  14748. <comparator>
  14749. <type>RegexpComparator</type>
  14750. <expected-output>^-refreshNodes:( |\t)*Updates the namenode with the set of datanodes allowed to connect to the namenode.( )*</expected-output>
  14751. </comparator>
  14752. <comparator>
  14753. <type>RegexpComparator</type>
  14754. <expected-output>^( |\t)*Namenode re-reads datanode hostnames from the file defined by( )*</expected-output>
  14755. </comparator>
  14756. <comparator>
  14757. <type>RegexpComparator</type>
  14758. <expected-output>^( |\t)*dfs.hosts, dfs.hosts.exclude configuration parameters.( )*</expected-output>
  14759. </comparator>
  14760. <comparator>
  14761. <type>RegexpComparator</type>
  14762. <expected-output>^( |\t)*Hosts defined in dfs.hosts are the datanodes that are part of( )*</expected-output>
  14763. </comparator>
  14764. <comparator>
  14765. <type>RegexpComparator</type>
  14766. <expected-output>^( |\t)*the cluster. If there are entries in dfs.hosts, only the hosts( )*</expected-output>
  14767. </comparator>
  14768. <comparator>
  14769. <type>RegexpComparator</type>
  14770. <expected-output>^( |\t)*in it are allowed to register with the namenode.( )*</expected-output>
  14771. </comparator>
  14772. <comparator>
  14773. <type>RegexpComparator</type>
  14774. <expected-output>^( |\t)*Entries in dfs.hosts.exclude are datanodes that need to be( )*</expected-output>
  14775. </comparator>
  14776. <comparator>
  14777. <type>RegexpComparator</type>
  14778. <expected-output>^( |\t)*decommissioned. Datanodes complete decommissioning when ( )*</expected-output>
  14779. </comparator>
  14780. <comparator>
  14781. <type>RegexpComparator</type>
  14782. <expected-output>^( |\t)*all the replicas from them are replicated to other datanodes.( )*</expected-output>
  14783. </comparator>
  14784. <comparator>
  14785. <type>RegexpComparator</type>
  14786. <expected-output>^( |\t)*Decommissioned nodes are not automatically shutdown and( )*</expected-output>
  14787. </comparator>
  14788. <comparator>
  14789. <type>RegexpComparator</type>
  14790. <expected-output>^( |\t)*are not chosen for writing new replicas.( )*</expected-output>
  14791. </comparator>
  14792. </comparators>
  14793. </test>
  14794. <test> <!--Tested -->
  14795. <description>help: help for dfsadmin finalizeUpgrade</description>
  14796. <test-commands>
  14797. <dfs-admin-command>-fs NAMENODE -help finalizeUpgrade</dfs-admin-command>
  14798. </test-commands>
  14799. <cleanup-commands>
  14800. </cleanup-commands>
  14801. <comparators>
  14802. <comparator>
  14803. <type>RegexpComparator</type>
  14804. <expected-output>^-finalizeUpgrade:( )*Finalize upgrade of HDFS.( )*</expected-output>
  14805. </comparator>
  14806. <comparator>
  14807. <type>RegexpComparator</type>
  14808. <expected-output>^( |\t)*Datanodes delete their previous version working directories,( )*</expected-output>
  14809. </comparator>
  14810. <comparator>
  14811. <type>RegexpComparator</type>
  14812. <expected-output>^( |\t)*followed by Namenode doing the same.( )*</expected-output>
  14813. </comparator>
  14814. <comparator>
  14815. <type>RegexpComparator</type>
  14816. <expected-output>^( |\t)*This completes the upgrade process.( )*</expected-output>
  14817. </comparator>
  14818. </comparators>
  14819. </test>
  14820. <test> <!--Tested -->
  14821. <description>help: help for dfsadmin metasave</description>
  14822. <test-commands>
  14823. <dfs-admin-command>-fs NAMENODE -help metasave</dfs-admin-command>
  14824. </test-commands>
  14825. <cleanup-commands>
  14826. </cleanup-commands>
  14827. <comparators>
  14828. <comparator>
  14829. <type>RegexpComparator</type>
  14830. <expected-output>^-metasave &lt;filename&gt;:( |\t)*Save Namenode's primary data structures( )*</expected-output>
  14831. </comparator>
  14832. <comparator>
  14833. <type>RegexpComparator</type>
  14834. <expected-output>^( |\t)*to &lt;filename&gt; in the directory specified by hadoop.log.dir property.( )*</expected-output>
  14835. </comparator>
  14836. <comparator>
  14837. <type>RegexpComparator</type>
  14838. <expected-output>^( |\t)*&lt;filename&gt; will contain one line for each of the following( )*</expected-output>
  14839. </comparator>
  14840. <comparator>
  14841. <type>RegexpComparator</type>
  14842. <expected-output>^( |\t)*1. Datanodes heart beating with Namenode( )*</expected-output>
  14843. </comparator>
  14844. <comparator>
  14845. <type>RegexpComparator</type>
  14846. <expected-output>^( |\t)*2. Blocks waiting to be replicated( )*</expected-output>
  14847. </comparator>
  14848. <comparator>
  14849. <type>RegexpComparator</type>
  14850. <expected-output>^( |\t)*3. Blocks currrently being replicated( )*</expected-output>
  14851. </comparator>
  14852. <comparator>
  14853. <type>RegexpComparator</type>
  14854. <expected-output>^( |\t)*4. Blocks waiting to be deleted( )*</expected-output>
  14855. </comparator>
  14856. </comparators>
  14857. </test>
  14858. <test> <!--Tested -->
  14859. <description>help: help for dfsadmin setQuota</description>
  14860. <test-commands>
  14861. <dfs-admin-command>-fs NAMENODE -help setQuota</dfs-admin-command>
  14862. </test-commands>
  14863. <cleanup-commands>
  14864. </cleanup-commands>
  14865. <comparators>
  14866. <comparator>
  14867. <type>RegexpComparator</type>
  14868. <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>
  14869. </comparator>
  14870. <comparator>
  14871. <type>RegexpComparator</type>
  14872. <expected-output>^( |\t)*The directory quota is a long integer that puts a hard limit( )*</expected-output>
  14873. </comparator>
  14874. <comparator>
  14875. <type>RegexpComparator</type>
  14876. <expected-output>^( |\t)*on the number of names in the directory tree( )*</expected-output>
  14877. </comparator>
  14878. <comparator>
  14879. <type>RegexpComparator</type>
  14880. <expected-output>^( |\t)*For each directory, attempt to set the quota. An error will be reported if( )*</expected-output>
  14881. </comparator>
  14882. <comparator>
  14883. <type>RegexpComparator</type>
  14884. <expected-output>^( |\t)*1. N is not a positive integer, or( )*</expected-output>
  14885. </comparator>
  14886. <comparator>
  14887. <type>RegexpComparator</type>
  14888. <expected-output>^( |\t)*2. User is not an administrator, or( )*</expected-output>
  14889. </comparator>
  14890. <comparator>
  14891. <type>RegexpComparator</type>
  14892. <expected-output>^( |\t)*3. The directory does not exist or is a file.( )*</expected-output>
  14893. </comparator>
  14894. </comparators>
  14895. </test>
  14896. <test> <!--Tested -->
  14897. <description>help: help for dfsadmin clrQuota</description>
  14898. <test-commands>
  14899. <dfs-admin-command>-fs NAMENODE -help clrQuota</dfs-admin-command>
  14900. </test-commands>
  14901. <cleanup-commands>
  14902. </cleanup-commands>
  14903. <comparators>
  14904. <comparator>
  14905. <type>RegexpComparator</type>
  14906. <expected-output>^-clrQuota &lt;dirname&gt;...&lt;dirname&gt;: Clear the quota for each directory &lt;dirName&gt;.( )*</expected-output>
  14907. </comparator>
  14908. <comparator>
  14909. <type>RegexpComparator</type>
  14910. <expected-output>^( |\t)*For each directory, attempt to clear the quota. An error will be reported if( )*</expected-output>
  14911. </comparator>
  14912. <comparator>
  14913. <type>RegexpComparator</type>
  14914. <expected-output>^( |\t)*1. the directory does not exist or is a file, or( )*</expected-output>
  14915. </comparator>
  14916. <comparator>
  14917. <type>RegexpComparator</type>
  14918. <expected-output>^( |\t)*2. user is not an administrator.( )*</expected-output>
  14919. </comparator>
  14920. <comparator>
  14921. <type>RegexpComparator</type>
  14922. <expected-output>^( |\t)*It does not fault if the directory has no quota.( )*</expected-output>
  14923. </comparator>
  14924. </comparators>
  14925. </test>
  14926. <test> <!--Tested -->
  14927. <description>help: help for dfsadmin setSpaceQuota</description>
  14928. <test-commands>
  14929. <dfs-admin-command>-fs NAMENODE -help setSpaceQuota</dfs-admin-command>
  14930. </test-commands>
  14931. <cleanup-commands>
  14932. </cleanup-commands>
  14933. <comparators>
  14934. <comparator>
  14935. <type>RegexpComparator</type>
  14936. <expected-output>^-setSpaceQuota &lt;quota&gt; \[-storageType &lt;storagetype&gt;\] &lt;dirname&gt;...&lt;dirname&gt;: Set the space quota &lt;quota&gt; for each directory &lt;dirName&gt;.( )*</expected-output>
  14937. </comparator>
  14938. <comparator>
  14939. <type>RegexpComparator</type>
  14940. <expected-output>^( |\t)*The space quota is a long integer that puts a hard limit( )*</expected-output>
  14941. </comparator>
  14942. <comparator>
  14943. <type>RegexpComparator</type>
  14944. <expected-output>^( |\t)*on the total size of all the files under the directory tree.( )*</expected-output>
  14945. </comparator>
  14946. <comparator>
  14947. <type>RegexpComparator</type>
  14948. <expected-output>^( |\t)*2. user is not an administrator, or( )*</expected-output>
  14949. </comparator>
  14950. <comparator>
  14951. <type>RegexpComparator</type>
  14952. <expected-output>^( |\t)*3. the directory does not exist or is a file.( )*</expected-output>
  14953. </comparator>
  14954. <comparator>
  14955. <type>RegexpComparator</type>
  14956. <expected-output>^( |\t)*The storage type specific quota is set when -storageType option is specified.( )*</expected-output>
  14957. </comparator>
  14958. </comparators>
  14959. </test>
  14960. <test> <!--Tested -->
  14961. <description>help: help for dfsadmin clrSpaceQuota</description>
  14962. <test-commands>
  14963. <dfs-admin-command>-fs NAMENODE -help clrSpaceQuota</dfs-admin-command>
  14964. </test-commands>
  14965. <cleanup-commands>
  14966. </cleanup-commands>
  14967. <comparators>
  14968. <comparator>
  14969. <type>RegexpComparator</type>
  14970. <expected-output>^-clrSpaceQuota \[-storageType &lt;storagetype&gt;\] &lt;dirname&gt;...&lt;dirname&gt;: Clear the space quota for each directory &lt;dirName&gt;.( )*</expected-output>
  14971. </comparator>
  14972. <comparator>
  14973. <type>RegexpComparator</type>
  14974. <expected-output>^( |\t)*For each directory, attempt to clear the quota. An error will be reported if( )*</expected-output>
  14975. </comparator>
  14976. <comparator>
  14977. <type>RegexpComparator</type>
  14978. <expected-output>^( |\t)*1. the directory does not exist or is a file, or( )*</expected-output>
  14979. </comparator>
  14980. <comparator>
  14981. <type>RegexpComparator</type>
  14982. <expected-output>^( |\t)*2. user is not an administrator.( )*</expected-output>
  14983. </comparator>
  14984. <comparator>
  14985. <type>RegexpComparator</type>
  14986. <expected-output>^( |\t)*It does not fault if the directory has no quota.( )*</expected-output>
  14987. </comparator>
  14988. <comparator>
  14989. <type>RegexpComparator</type>
  14990. <expected-output>^( |\t)*The storage type specific quota is cleared when -storageType option is specified.( )*</expected-output>
  14991. </comparator>
  14992. </comparators>
  14993. </test>
  14994. <test> <!--Tested -->
  14995. <description>help: help for dfsadmin refreshServiceAcl</description>
  14996. <test-commands>
  14997. <dfs-admin-command>-fs NAMENODE -help refreshServiceAcl</dfs-admin-command>
  14998. </test-commands>
  14999. <cleanup-commands>
  15000. </cleanup-commands>
  15001. <comparators>
  15002. <comparator>
  15003. <type>RegexpComparator</type>
  15004. <expected-output>^-refreshServiceAcl: Reload the service-level authorization policy file( )*</expected-output>
  15005. </comparator>
  15006. <comparator>
  15007. <type>RegexpComparator</type>
  15008. <expected-output>^( |\t)*Namenode will reload the authorization policy file.( )*</expected-output>
  15009. </comparator>
  15010. </comparators>
  15011. </test>
  15012. <test> <!--Tested -->
  15013. <description>help: help for dfsadmin help</description>
  15014. <test-commands>
  15015. <dfs-admin-command>-fs NAMENODE -help help</dfs-admin-command>
  15016. </test-commands>
  15017. <cleanup-commands>
  15018. </cleanup-commands>
  15019. <comparators>
  15020. <comparator>
  15021. <type>RegexpComparator</type>
  15022. <expected-output>^-help \[cmd\]:( |\t)*Displays help for the given command or all commands if none( )*</expected-output>
  15023. </comparator>
  15024. <comparator>
  15025. <type>RegexpComparator</type>
  15026. <expected-output>^( |\t)*is specified.( )*</expected-output>
  15027. </comparator>
  15028. </comparators>
  15029. </test>
  15030. <test> <!--Tested -->
  15031. <description>verifying error messages for quota commands - setting quota on a file</description>
  15032. <test-commands>
  15033. <command>-fs NAMENODE -mkdir /test </command>
  15034. <command>-fs NAMENODE -touchz /test/file1 </command>
  15035. <dfs-admin-command>-fs NAMENODE -setQuota 1 /test/file1 </dfs-admin-command>
  15036. </test-commands>
  15037. <cleanup-commands>
  15038. <dfs-admin-command>-fs NAMENODE -setQuota 5 /test </dfs-admin-command>
  15039. <!-- Same directory will be used in the next test -->
  15040. </cleanup-commands>
  15041. <comparators>
  15042. <comparator>
  15043. <type>SubstringComparator</type>
  15044. <expected-output>setQuota: `/test/file1': Is not a directory</expected-output>
  15045. </comparator>
  15046. </comparators>
  15047. </test>
  15048. <test> <!--Tested -->
  15049. <description>verifying error messages for quota commands - setting quota on non-existing file</description>
  15050. <test-commands>
  15051. <dfs-admin-command>-fs NAMENODE -setSpaceQuota 1g /test1 </dfs-admin-command>
  15052. </test-commands>
  15053. <cleanup-commands>
  15054. <!-- Same directory will be used in the next test -->
  15055. </cleanup-commands>
  15056. <comparators>
  15057. <comparator>
  15058. <type>SubstringComparator</type>
  15059. <expected-output>setSpaceQuota: Directory does not exist: /test1</expected-output>
  15060. </comparator>
  15061. </comparators>
  15062. </test>
  15063. <test> <!--Tested -->
  15064. <description>verifying error messages for quota commands - exceeding quota</description>
  15065. <test-commands>
  15066. <dfs-admin-command>-fs NAMENODE -setQuota 3 /test </dfs-admin-command>
  15067. <command>-fs NAMENODE -touchz /test/file0 </command>
  15068. <command>-fs NAMENODE -mkdir /test/test1 </command>
  15069. </test-commands>
  15070. <cleanup-commands>
  15071. <!-- Same directory(/test) will be used in the next test -->
  15072. </cleanup-commands>
  15073. <comparators>
  15074. <comparator>
  15075. <type>SubstringComparator</type>
  15076. <expected-output>The NameSpace quota (directories and files) of directory /test is exceeded</expected-output>
  15077. </comparator>
  15078. </comparators>
  15079. </test>
  15080. <test> <!--Tested -->
  15081. <description>verifying error messages for quota commands - setting not valid quota</description>
  15082. <test-commands>
  15083. <dfs-admin-command>-fs NAMENODE -setQuota 0 /test </dfs-admin-command>
  15084. </test-commands>
  15085. <cleanup-commands>
  15086. <!-- Same directory will be used in the next test -->
  15087. </cleanup-commands>
  15088. <comparators>
  15089. <comparator>
  15090. <type>SubstringComparator</type>
  15091. <expected-output>Invalid values for quota : 0</expected-output>
  15092. </comparator>
  15093. </comparators>
  15094. </test>
  15095. <test> <!--Tested -->
  15096. <description>verifying error messages for quota commands - setting not valid space quota</description>
  15097. <test-commands>
  15098. <dfs-admin-command>-fs NAMENODE -setSpaceQuota a5 /test </dfs-admin-command>
  15099. </test-commands>
  15100. <cleanup-commands>
  15101. <!-- Same directory will be used in the next test -->
  15102. </cleanup-commands>
  15103. <comparators>
  15104. <comparator>
  15105. <type>SubstringComparator</type>
  15106. <expected-output>setSpaceQuota: "a5" is not a valid value for a quota.</expected-output>
  15107. </comparator>
  15108. </comparators>
  15109. </test>
  15110. <test> <!--Tested -->
  15111. <description>verifying error messages for quota commands - clearQuota on non existing file</description>
  15112. <test-commands>
  15113. <dfs-admin-command>-fs NAMENODE -clrQuota /test1 </dfs-admin-command>
  15114. </test-commands>
  15115. <cleanup-commands>
  15116. <command>-fs NAMENODE -rm -r /test </command>
  15117. </cleanup-commands>
  15118. <comparators>
  15119. <comparator>
  15120. <type>SubstringComparator</type>
  15121. <expected-output>clrQuota: Directory does not exist: /test1</expected-output>
  15122. </comparator>
  15123. </comparators>
  15124. </test>
  15125. <test> <!--Tested -->
  15126. <description>verifying error messages for quota commands - using globing</description>
  15127. <test-commands>
  15128. <command>-fs NAMENODE -mkdir /dir1</command>
  15129. <command>-fs NAMENODE -mkdir /dir2</command>
  15130. <command>-fs NAMENODE -mkdir /dir3</command>
  15131. <dfs-admin-command>-fs NAMENODE -setSpaceQuota 1k /dir* </dfs-admin-command>
  15132. <command>-fs NAMENODE -put CLITEST_DATA/data15bytes /dir1/</command>
  15133. </test-commands>
  15134. <cleanup-commands>
  15135. <command>-fs NAMENODE -rm -r /dir* </command>
  15136. </cleanup-commands>
  15137. <comparators>
  15138. <comparator>
  15139. <type>RegexpComparator</type>
  15140. <expected-output>put: The DiskSpace quota of /dir1 is exceeded: quota = 1024 B = 1 KB but diskspace consumed = [0-9]+ B = [0-9.]+ [KMG]B*</expected-output>
  15141. </comparator>
  15142. </comparators>
  15143. </test>
  15144. <test> <!--Tested -->
  15145. <description>verifying error messages for quota commands - setting quota using globing</description>
  15146. <test-commands>
  15147. <command>-fs NAMENODE -mkdir /dir1</command>
  15148. <command>-fs NAMENODE -mkdir /dir2</command>
  15149. <command>-fs NAMENODE -mkdir /dir3</command>
  15150. <dfs-admin-command>-fs NAMENODE -setQuota 1 /dir* </dfs-admin-command>
  15151. <command>-fs NAMENODE -mkdir /dir1/dir4</command>
  15152. </test-commands>
  15153. <cleanup-commands>
  15154. <command>-fs NAMENODE -rm -r /dir* </command>
  15155. </cleanup-commands>
  15156. <comparators>
  15157. <comparator>
  15158. <type>SubstringComparator</type>
  15159. <expected-output>mkdir: The NameSpace quota (directories and files) of directory /dir1 is exceeded: quota=1 file count=2</expected-output>
  15160. </comparator>
  15161. </comparators>
  15162. </test>
  15163. <test> <!--Tested -->
  15164. <description>refreshServiceAcl: refreshing security authorization policy for namenode</description>
  15165. <test-commands>
  15166. <dfs-admin-command>-fs NAMENODE -refreshServiceAcl </dfs-admin-command>
  15167. </test-commands>
  15168. <cleanup-commands>
  15169. <!-- No cleanup -->
  15170. </cleanup-commands>
  15171. <comparators>
  15172. <comparator>
  15173. <type>RegexpComparator</type>
  15174. <expected-output>Refresh service acl successful(\n)*</expected-output>
  15175. </comparator>
  15176. </comparators>
  15177. </test><!--
  15178. <test> Tested
  15179. <description>refreshServiceAcl: verifying error message while refreshing security authorization policy for namenode</description>
  15180. <test-commands>
  15181. hadoop-policy.xml for tests has
  15182. security.refresh.policy.protocol.acl = ${user.name}
  15183. <dfs-admin-command>-fs NAMENODE -Dhadoop.job.ugi=blah,blah -refreshServiceAcl </dfs-admin-command>
  15184. </test-commands>
  15185. <cleanup-commands>
  15186. No cleanup
  15187. </cleanup-commands>
  15188. <comparators>
  15189. <comparator>
  15190. <type>SubstringComparator</type>
  15191. <expected-output>access denied</expected-output>
  15192. </comparator>
  15193. </comparators>
  15194. </test>
  15195. --><!-- Test for safemode -->
  15196. <test> <!-- TESTED -->
  15197. <description>safemode: Test for enter - Namenode is not in safemode</description>
  15198. <test-commands>
  15199. <dfs-admin-command>-fs NAMENODE -safemode enter</dfs-admin-command>
  15200. </test-commands>
  15201. <cleanup-commands>
  15202. <dfs-admin-command>-fs NAMENODE -safemode leave</dfs-admin-command>
  15203. </cleanup-commands>
  15204. <comparators>
  15205. <comparator>
  15206. <type>TokenComparator</type>
  15207. <expected-output>Safe mode is ON</expected-output>
  15208. </comparator>
  15209. </comparators>
  15210. </test>
  15211. <test> <!-- TESTED -->
  15212. <description>safemode: Test for enter - Namenode is already in safemode</description>
  15213. <test-commands>
  15214. <dfs-admin-command>-fs NAMENODE -safemode enter</dfs-admin-command>
  15215. <dfs-admin-command>-fs NAMENODE -safemode enter</dfs-admin-command>
  15216. </test-commands>
  15217. <cleanup-commands>
  15218. <dfs-admin-command>-fs NAMENODE -safemode leave</dfs-admin-command>
  15219. </cleanup-commands>
  15220. <comparators>
  15221. <comparator>
  15222. <type>TokenComparator</type>
  15223. <expected-output>Safe mode is ON</expected-output>
  15224. </comparator>
  15225. </comparators>
  15226. </test>
  15227. <test> <!-- TESTED -->
  15228. <description>safemode: Test for leave - Namenode is already in safemode</description>
  15229. <test-commands>
  15230. <dfs-admin-command>-fs NAMENODE -safemode enter</dfs-admin-command>
  15231. <dfs-admin-command>-fs NAMENODE -safemode leave</dfs-admin-command>
  15232. </test-commands>
  15233. <cleanup-commands>
  15234. <!-- No cleanup -->
  15235. </cleanup-commands>
  15236. <comparators>
  15237. <comparator>
  15238. <type>TokenComparator</type>
  15239. <expected-output>Safe mode is OFF</expected-output>
  15240. </comparator>
  15241. </comparators>
  15242. </test>
  15243. <test> <!-- TESTED -->
  15244. <description>safemode: Test for leave - Namenode is not in safemode</description>
  15245. <test-commands>
  15246. <dfs-admin-command>-fs NAMENODE -safemode leave</dfs-admin-command>
  15247. </test-commands>
  15248. <cleanup-commands>
  15249. <!-- No cleanup -->
  15250. </cleanup-commands>
  15251. <comparators>
  15252. <comparator>
  15253. <type>TokenComparator</type>
  15254. <expected-output>Safe mode is OFF</expected-output>
  15255. </comparator>
  15256. </comparators>
  15257. </test>
  15258. <test> <!-- TESTED -->
  15259. <description>safemode: Test for get - Namenode is not in safemode</description>
  15260. <test-commands>
  15261. <dfs-admin-command>-fs NAMENODE -safemode leave</dfs-admin-command>
  15262. <dfs-admin-command>-fs NAMENODE -safemode get</dfs-admin-command>
  15263. </test-commands>
  15264. <cleanup-commands>
  15265. <!-- No cleanup -->
  15266. </cleanup-commands>
  15267. <comparators>
  15268. <comparator>
  15269. <type>TokenComparator</type>
  15270. <expected-output>Safe mode is OFF</expected-output>
  15271. </comparator>
  15272. </comparators>
  15273. </test>
  15274. <test> <!-- TESTED -->
  15275. <description>safemode:Test for get - Namenode is already in safemode</description>
  15276. <test-commands>
  15277. <dfs-admin-command>-fs NAMENODE -safemode enter</dfs-admin-command>
  15278. <dfs-admin-command>-fs NAMENODE -safemode get</dfs-admin-command>
  15279. </test-commands>
  15280. <cleanup-commands>
  15281. <dfs-admin-command>-fs NAMENODE -safemode leave</dfs-admin-command>
  15282. </cleanup-commands>
  15283. <comparators>
  15284. <comparator>
  15285. <type>TokenComparator</type>
  15286. <expected-output>Safe mode is ON</expected-output>
  15287. </comparator>
  15288. </comparators>
  15289. </test>
  15290. <test> <!-- TESTED -->
  15291. <description>safemode: Test for wait - Namenode is not in safemode</description>
  15292. <test-commands>
  15293. <dfs-admin-command>-fs NAMENODE -safemode leave</dfs-admin-command>
  15294. <dfs-admin-command>-fs NAMENODE -safemode wait</dfs-admin-command>
  15295. </test-commands>
  15296. <cleanup-commands>
  15297. <!-- No cleanup -->
  15298. </cleanup-commands>
  15299. <comparators>
  15300. <comparator>
  15301. <type>TokenComparator</type>
  15302. <expected-output>Safe mode is OFF</expected-output>
  15303. </comparator>
  15304. </comparators>
  15305. </test>
  15306. <test> <!-- TESTED -->
  15307. <description>safemode: Test for wait - Namenode is already in safemode</description>
  15308. <test-commands>
  15309. <dfs-admin-command>-fs NAMENODE -safemode enter</dfs-admin-command>
  15310. <dfs-admin-command>-fs NAMENODE -safemode wait &amp;</dfs-admin-command>
  15311. <dfs-admin-command>-fs NAMENODE -safemode leave</dfs-admin-command>
  15312. </test-commands>
  15313. <cleanup-commands>
  15314. <!-- No cleanup -->
  15315. </cleanup-commands>
  15316. <comparators>
  15317. <comparator>
  15318. <type>TokenComparator</type>
  15319. <expected-output>Safe mode is OFF</expected-output>
  15320. </comparator>
  15321. </comparators>
  15322. </test>
  15323. <!-- Test for report -->
  15324. <test> <!-- TESTED -->
  15325. <description>report: Displays the report about the Datanodes</description>
  15326. <test-commands>
  15327. <dfs-admin-command>-fs NAMENODE -report</dfs-admin-command>
  15328. </test-commands>
  15329. <cleanup-commands>
  15330. <!-- no cleanup cmd -->
  15331. </cleanup-commands>
  15332. <comparators>
  15333. <comparator>
  15334. <type>RegexpComparator</type>
  15335. <expected-output>Configured Capacity: [0-9]+ \([0-9]+\.[0-9]+ [BKMGT]+\)</expected-output>
  15336. </comparator>
  15337. <comparator>
  15338. <type>RegexpComparator</type>
  15339. <expected-output>Present Capacity: [0-9]+ \([0-9\.]+ [BKMGT]+\)</expected-output>
  15340. </comparator>
  15341. <comparator>
  15342. <type>RegexpComparator</type>
  15343. <expected-output>DFS Remaining: [0-9]+ \([0-9\.]+ [BKMGT]+\)</expected-output>
  15344. </comparator>
  15345. <comparator>
  15346. <type>RegexpComparator</type>
  15347. <expected-output>DFS Used: [0-9]+ \([0-9\.]+ [BKMGT]+\)</expected-output>
  15348. </comparator>
  15349. <comparator>
  15350. <type>RegexpComparator</type>
  15351. <expected-output>DFS Used\%: [0-9\.]+%</expected-output>
  15352. </comparator>
  15353. <comparator>
  15354. <type>RegexpComparator</type>
  15355. <expected-output>Live datanodes \([0-9]+\):</expected-output>
  15356. </comparator>
  15357. <comparator>
  15358. <type>RegexpComparator</type>
  15359. <expected-output>Name: [0-9\.:]+ \([-.a-zA-z0-9\.]+\)</expected-output>
  15360. </comparator>
  15361. <comparator>
  15362. <type>RegexpComparator</type>
  15363. <expected-output>Hostname: [-.a-zA-z0-9\.]+</expected-output>
  15364. </comparator>
  15365. <comparator>
  15366. <type>RegexpComparator</type>
  15367. <expected-output>Decommission Status : [a-zA-Z]+</expected-output>
  15368. </comparator>
  15369. <comparator>
  15370. <type>RegexpComparator</type>
  15371. <expected-output>Non DFS Used: [0-9]+ \([0-9\.]+ [BKMGT]+\)</expected-output>
  15372. </comparator>
  15373. <comparator>
  15374. <type>RegexpComparator</type>
  15375. <expected-output>DFS Remaining%: [0-9\.]+%</expected-output>
  15376. </comparator>
  15377. <comparator>
  15378. <type>RegexpComparator</type>
  15379. <expected-output>Last contact: [a-zA-Z]+ [a-zA-Z]+ [0-9]+ [0-9:]+ [A-Z\-\+\:0-9]+ [0-9]+</expected-output>
  15380. </comparator>
  15381. <comparator>
  15382. <type>TokenComparator</type>
  15383. <expected-output>Live datanodes</expected-output>
  15384. </comparator>
  15385. </comparators>
  15386. </test>
  15387. <!-- Test for saveNamespace -->
  15388. <test> <!-- TESTED -->
  15389. <description>saveNamespace: to save the namespace when safemode is ON</description>
  15390. <test-commands>
  15391. <dfs-admin-command>-fs NAMENODE -safemode enter</dfs-admin-command>
  15392. <dfs-admin-command>-fs NAMENODE -saveNamespace</dfs-admin-command>
  15393. </test-commands>
  15394. <cleanup-commands>
  15395. <dfs-admin-command>-fs NAMENODE -safemode leave</dfs-admin-command>
  15396. </cleanup-commands>
  15397. <comparators>
  15398. <comparator>
  15399. <type>RegexpComparator</type>
  15400. <expected-output>Save namespace successful(\n)*</expected-output>
  15401. </comparator>
  15402. </comparators>
  15403. </test>
  15404. <test> <!-- TESTED -->
  15405. <description>saveNamespace: to save the namespace when safemode is OFF</description>
  15406. <test-commands>
  15407. <dfs-admin-command>-fs NAMENODE -safemode leave</dfs-admin-command>
  15408. <dfs-admin-command>-fs NAMENODE -saveNamespace</dfs-admin-command>
  15409. </test-commands>
  15410. <cleanup-commands>
  15411. <dfs-admin-command>-fs NAMENODE -safemode leave</dfs-admin-command>
  15412. </cleanup-commands>
  15413. <comparators>
  15414. <comparator>
  15415. <type>TokenComparator</type>
  15416. <expected-output>saveNamespace: Safe mode should be turned ON in order to create namespace image.</expected-output>
  15417. </comparator>
  15418. </comparators>
  15419. </test>
  15420. <!-- Test for rollEdits -->
  15421. <test> <!-- TESTED -->
  15422. <description>rollEdits: test rollEdits admin command</description>
  15423. <test-commands>
  15424. <dfs-admin-command>-fs NAMENODE -rollEdits</dfs-admin-command>
  15425. </test-commands>
  15426. <cleanup-commands>
  15427. <!-- no cleanup -->
  15428. </cleanup-commands>
  15429. <comparators>
  15430. <comparator>
  15431. <type>RegexpComparator</type>
  15432. <expected-output>New segment starts at txid \d+</expected-output>
  15433. </comparator>
  15434. </comparators>
  15435. </test>
  15436. <!-- Test for refreshNodes -->
  15437. <test> <!-- TESTED -->
  15438. <description>refreshNodes: to refresh the nodes</description>
  15439. <test-commands>
  15440. <dfs-admin-command>-fs NAMENODE -refreshNodes</dfs-admin-command>
  15441. <dfs-admin-command>-fs NAMENODE -report</dfs-admin-command>
  15442. </test-commands>
  15443. <cleanup-commands>
  15444. <!-- no cleanup -->
  15445. </cleanup-commands>
  15446. <comparators>
  15447. <comparator>
  15448. <type>RegexpComparator</type>
  15449. <expected-output>Configured Capacity: [0-9]+ \([0-9]+\.[0-9]+ [BKMGT]+\)</expected-output>
  15450. </comparator>
  15451. <comparator>
  15452. <type>RegexpComparator</type>
  15453. <expected-output>Present Capacity: [0-9]+ \([0-9\.]+ [BKMGT]+\)</expected-output>
  15454. </comparator>
  15455. <comparator>
  15456. <type>RegexpComparator</type>
  15457. <expected-output>DFS Remaining: [0-9]+ \([0-9\.]+ [BKMGT]+\)</expected-output>
  15458. </comparator>
  15459. <comparator>
  15460. <type>RegexpComparator</type>
  15461. <expected-output>DFS Used: [0-9]+ \([0-9\.]+ [BKMGT]+\)</expected-output>
  15462. </comparator>
  15463. <comparator>
  15464. <type>RegexpComparator</type>
  15465. <expected-output>DFS Used\%: [0-9\.]+%</expected-output>
  15466. </comparator>
  15467. <comparator>
  15468. <type>RegexpComparator</type>
  15469. <expected-output>Name: [0-9\.:]+ \([-.a-zA-z0-9\.]+\)</expected-output>
  15470. </comparator>
  15471. <comparator>
  15472. <type>RegexpComparator</type>
  15473. <expected-output>Hostname: [-.a-zA-z0-9\.]+</expected-output>
  15474. </comparator>
  15475. <comparator>
  15476. <type>RegexpComparator</type>
  15477. <expected-output>Decommission Status : [a-zA-Z]+</expected-output>
  15478. </comparator>
  15479. <comparator>
  15480. <type>RegexpComparator</type>
  15481. <expected-output>Non DFS Used: [0-9]+ \([0-9\.]+ [BKMGT]+\)</expected-output>
  15482. </comparator>
  15483. <comparator>
  15484. <type>RegexpComparator</type>
  15485. <expected-output>DFS Remaining%: [0-9\.]+%</expected-output>
  15486. </comparator>
  15487. <comparator>
  15488. <type>RegexpComparator</type>
  15489. <expected-output>Last contact: [a-zA-Z]+ [a-zA-Z]+ [0-9]+ [0-9:]+ [A-Z\-\+\:0-9]+ [0-9]+</expected-output>
  15490. </comparator>
  15491. <comparator>
  15492. <type>TokenComparator</type>
  15493. <expected-output>Live datanodes</expected-output>
  15494. </comparator>
  15495. </comparators>
  15496. </test>
  15497. <!-- Test for metasave -->
  15498. <test> <!-- TESTED -->
  15499. <description>metasave: to save metadata</description>
  15500. <test-commands>
  15501. <dfs-admin-command>-fs NAMENODE -metasave metafile</dfs-admin-command>
  15502. </test-commands>
  15503. <cleanup-commands>
  15504. <!-- No cleanup -->
  15505. </cleanup-commands>
  15506. <comparators>
  15507. <comparator>
  15508. <type>RegexpComparator</type>
  15509. <expected-output>Created metasave file metafile in the log directory of namenode hdfs:\/\/[-.a-zA-Z0-9\.:]+</expected-output>
  15510. </comparator>
  15511. </comparators>
  15512. </test>
  15513. <!-- Test for clrSpacequota -->
  15514. <test> <!-- TESTED -->
  15515. <description>clrSpaceQuota: Namenode is already in safemode</description>
  15516. <test-commands>
  15517. <command>-fs NAMENODE -mkdir test</command>
  15518. <dfs-admin-command>-fs NAMENODE -setSpaceQuota 15 test</dfs-admin-command>
  15519. <dfs-admin-command>-fs NAMENODE -clrSpaceQuota test</dfs-admin-command>
  15520. </test-commands>
  15521. <cleanup-commands>
  15522. <command>-fs NAMENODE -rm -r test</command>
  15523. </cleanup-commands>
  15524. <comparators>
  15525. <comparator>
  15526. <type>ExactComparator</type>
  15527. <expected-output></expected-output>
  15528. </comparator>
  15529. </comparators>
  15530. </test>
  15531. <test> <!-- Tested -->
  15532. <description>printTopology: verifying that the topology map is what we expect</description>
  15533. <test-commands>
  15534. <dfs-admin-command>-fs NAMENODE -printTopology</dfs-admin-command>
  15535. </test-commands>
  15536. <cleanup-commands>
  15537. <!-- No cleanup -->
  15538. </cleanup-commands>
  15539. <comparators>
  15540. <!-- miniDFS cluster started in CLITestHelper is set to match this output -->
  15541. <comparator>
  15542. <type>RegexpAcrossOutputComparator</type>
  15543. <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>
  15544. </comparator>
  15545. <comparator>
  15546. <type>RegexpAcrossOutputComparator</type>
  15547. <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>
  15548. </comparator>
  15549. <comparator>
  15550. <type>RegexpAcrossOutputComparator</type>
  15551. <expected-output>Rack: \/rack3\s*127\.0\.0\.1:\d+\s\([-.a-zA-Z0-9]+\)</expected-output>
  15552. </comparator>
  15553. <comparator>
  15554. <type>RegexpAcrossOutputComparator</type>
  15555. <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>
  15556. </comparator>
  15557. </comparators>
  15558. </test>
  15559. <!-- DFS tests -->
  15560. <test>
  15561. <description>appendToFile</description>
  15562. <test-commands>
  15563. <command>-fs NAMENODE -mkdir -p /user/USERNAME/dir1</command>
  15564. <command>-fs NAMENODE -touchz /user/USERNAME/dir1/file0</command>
  15565. <command>-fs NAMENODE -appendToFile CLITEST_DATA/data15bytes /user/USERNAME/dir1/file0</command>
  15566. <command>-fs NAMENODE -cat /user/USERNAME/dir1/file0</command>
  15567. </test-commands>
  15568. <cleanup-commands>
  15569. <command>-fs NAMENODE -rm -r /user/USERNAME</command>
  15570. </cleanup-commands>
  15571. <comparators>
  15572. <comparator>
  15573. <type>RegexpComparator</type>
  15574. <expected-output>12345678901234</expected-output>
  15575. </comparator>
  15576. </comparators>
  15577. </test>
  15578. <test>
  15579. <description>text</description>
  15580. <test-commands>
  15581. <command>-fs NAMENODE -mkdir -p /user/USERNAME/dir1</command>
  15582. <command>-fs NAMENODE -put CLITEST_DATA/data15bytes /user/USERNAME/dir1/file0</command>
  15583. <command>-fs NAMENODE -text /user/USERNAME/dir1/file0</command>
  15584. </test-commands>
  15585. <cleanup-commands>
  15586. <command>-fs NAMENODE -rm -r /user/USERNAME/dir1</command>
  15587. </cleanup-commands>
  15588. <comparators>
  15589. <comparator>
  15590. <type>RegexpComparator</type>
  15591. <expected-output>12345678901234</expected-output>
  15592. </comparator>
  15593. </comparators>
  15594. </test>
  15595. <test>
  15596. <description>rmdir</description>
  15597. <test-commands>
  15598. <command>-fs NAMENODE -mkdir -p /user/USERNAME/dir1</command>
  15599. <command>-fs NAMENODE -rmdir /user/USERNAME/dir1</command>
  15600. <command>-fs NAMENODE -ls /user/USERNAME/</command>
  15601. </test-commands>
  15602. <cleanup-commands>
  15603. <command>-fs NAMENODE -rm -r /user/USERNAME</command>
  15604. </cleanup-commands>
  15605. <comparators>
  15606. <comparator>
  15607. <type>ExactComparator</type>
  15608. <expected-output></expected-output>
  15609. </comparator>
  15610. </comparators>
  15611. </test>
  15612. <test>
  15613. <description>rmdir with ignore-fail-on-non-empty</description>
  15614. <test-commands>
  15615. <command>-fs NAMENODE -mkdir -p /user/USERNAME/dir1</command>
  15616. <command>-fs NAMENODE -put CLITEST_DATA/data15bytes /user/USERNAME/dir1/file0</command>
  15617. <command>-fs NAMENODE -rmdir --ignore-fail-on-non-empty /user/USERNAME/dir1</command>
  15618. <command>-fs NAMENODE -ls /user/USERNAME/</command>
  15619. </test-commands>
  15620. <cleanup-commands>
  15621. <command>-fs NAMENODE -rm -r /user/USERNAME</command>
  15622. </cleanup-commands>
  15623. <comparators>
  15624. <comparator>
  15625. <type>RegexpComparator</type>
  15626. <expected-output>Found 1 items</expected-output>
  15627. </comparator>
  15628. <comparator>
  15629. <type>RegexpComparator</type>
  15630. <expected-output>^drwxr-xr-x( )*-( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/user/USERNAME/dir1</expected-output>
  15631. </comparator>
  15632. </comparators>
  15633. </test>
  15634. <test>
  15635. <description>df</description>
  15636. <test-commands>
  15637. <command>-fs NAMENODE -mkdir -p /user/USERNAME/dir1</command>
  15638. <command>-fs NAMENODE -put CLITEST_DATA/data15bytes /user/USERNAME/dir1/file0</command>
  15639. <command>-fs NAMENODE -df /user/USERNAME</command>
  15640. </test-commands>
  15641. <cleanup-commands>
  15642. <command>-fs NAMENODE -rm -r /user/USERNAME</command>
  15643. </cleanup-commands>
  15644. <comparators>
  15645. <comparator>
  15646. <type>RegexpComparator</type>
  15647. <expected-output>Filesystem( )*Size( )*Used( )*Available( )*Use%.*</expected-output>
  15648. </comparator>
  15649. </comparators>
  15650. </test>
  15651. <test>
  15652. <description>expunge</description>
  15653. <test-commands>
  15654. <command>-fs NAMENODE -expunge</command>
  15655. </test-commands>
  15656. <cleanup-commands>
  15657. <command></command>
  15658. </cleanup-commands>
  15659. <comparators>
  15660. <comparator>
  15661. <type>ExactComparator</type>
  15662. <expected-output></expected-output>
  15663. </comparator>
  15664. </comparators>
  15665. </test>
  15666. <test>
  15667. <description>getmerge</description>
  15668. <test-commands>
  15669. <command>-fs NAMENODE -mkdir -p /user/USERNAME/dir1</command>
  15670. <command>-fs NAMENODE -copyFromLocal CLITEST_DATA/data15bytes /user/USERNAME/dir1</command>
  15671. <command>-fs NAMENODE -copyFromLocal CLITEST_DATA/data30bytes /user/USERNAME/dir1</command>
  15672. <command>-fs NAMENODE -getmerge /user/USERNAME/dir1 CLITEST_DATA/file</command>
  15673. <command>-cat CLITEST_DATA/file</command>
  15674. </test-commands>
  15675. <cleanup-commands>
  15676. <command>-fs NAMENODE -rm -r /user/USERNAME</command>
  15677. <command>rm data</command>
  15678. </cleanup-commands>
  15679. <comparators>
  15680. <comparator>
  15681. <type>RegexpComparator</type>
  15682. <expected-output>12345678901234.*</expected-output>
  15683. </comparator>
  15684. </comparators>
  15685. </test>
  15686. <!-- Tests for snapshots -->
  15687. <test>
  15688. <description>allowSnapshot</description>
  15689. <test-commands>
  15690. <command>-fs NAMENODE -mkdir -p /user/USERNAME/dir1</command>
  15691. <dfs-admin-command>-fs NAMENODE -allowSnapshot /user/USERNAME/dir1</dfs-admin-command>
  15692. </test-commands>
  15693. <cleanup-commands>
  15694. <dfs-admin-command>-fs NAMENODE -disallowSnapshot /user/USERNAME/dir1</dfs-admin-command>
  15695. <command>-fs NAMENODE -rm -r /user/USERNAME</command>
  15696. </cleanup-commands>
  15697. <comparators>
  15698. <comparator>
  15699. <type>RegexpComparator</type>
  15700. <expected-output>Allowing snaphot on /user/USERNAME/dir1 succeeded</expected-output>
  15701. </comparator>
  15702. </comparators>
  15703. </test>
  15704. <test>
  15705. <description>disallowSnapshot</description>
  15706. <test-commands>
  15707. <command>-fs NAMENODE -mkdir -p /user/USERNAME/dir1</command>
  15708. <dfs-admin-command>-fs NAMENODE -allowSnapshot /user/USERNAME/dir1</dfs-admin-command>
  15709. <dfs-admin-command>-fs NAMENODE -disallowSnapshot /user/USERNAME/dir1</dfs-admin-command>
  15710. </test-commands>
  15711. <cleanup-commands>
  15712. <command>-fs NAMENODE -rm -r /user/USERNAME</command>
  15713. </cleanup-commands>
  15714. <comparators>
  15715. <comparator>
  15716. <type>RegexpComparator</type>
  15717. <expected-output>Disallowing snaphot on /user/USERNAME/dir1 succeeded</expected-output>
  15718. </comparator>
  15719. </comparators>
  15720. </test>
  15721. <test>
  15722. <description>createSnapshot</description>
  15723. <test-commands>
  15724. <command>-fs NAMENODE -mkdir -p /user/USERNAME/dir1</command>
  15725. <dfs-admin-command>-fs NAMENODE -allowSnapshot /user/USERNAME/dir1</dfs-admin-command>
  15726. <command>-fs NAMENODE -createSnapshot /user/USERNAME/dir1 snapshot1</command>
  15727. </test-commands>
  15728. <cleanup-commands>
  15729. <command>-fs NAMENODE -deleteSnapshot /user/USERNAME/dir1 snapshot1</command>
  15730. <dfs-admin-command>-fs NAMENODE -disallowSnapshot /user/USERNAME/dir1</dfs-admin-command>
  15731. <command>-fs NAMENODE -rm -r /user/USERNAME</command>
  15732. </cleanup-commands>
  15733. <comparators>
  15734. <comparator>
  15735. <type>RegexpComparator</type>
  15736. <expected-output>Created snapshot /user/USERNAME/dir1/.snapshot/snapshot1</expected-output>
  15737. </comparator>
  15738. </comparators>
  15739. </test>
  15740. <test>
  15741. <description>renameSnapshot</description>
  15742. <test-commands>
  15743. <command>-fs NAMENODE -mkdir -p /user/USERNAME/dir1</command>
  15744. <dfs-admin-command>-fs NAMENODE -allowSnapshot /user/USERNAME/dir1</dfs-admin-command>
  15745. <command>-fs NAMENODE -createSnapshot /user/USERNAME/dir1 snapshot1</command>
  15746. <command>-fs NAMENODE -renameSnapshot /user/USERNAME/dir1 snapshot1 snapshot2</command>
  15747. <command>-fs NAMENODE -ls /user/USERNAME/dir1/.snapshot</command>
  15748. </test-commands>
  15749. <cleanup-commands>
  15750. <command>-fs NAMENODE -deleteSnapshot /user/USERNAME/dir1 snapshot2</command>
  15751. <dfs-admin-command>-fs NAMENODE -disallowSnapshot /user/USERNAME/dir1</dfs-admin-command>
  15752. <command>-fs NAMENODE -rm -r /user/USERNAME</command>
  15753. </cleanup-commands>
  15754. <comparators>
  15755. <comparator>
  15756. <type>RegexpComparator</type>
  15757. <expected-output>Found 1 items</expected-output>
  15758. </comparator>
  15759. <comparator>
  15760. <type>RegexpComparator</type>
  15761. <expected-output>^drwxr-xr-x( )*-( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/user/USERNAME/dir1/.snapshot/snapshot2</expected-output>
  15762. </comparator>
  15763. </comparators>
  15764. </test>
  15765. <test>
  15766. <description>deleteSnapshot</description>
  15767. <test-commands>
  15768. <command>-fs NAMENODE -mkdir -p /user/USERNAME/dir1</command>
  15769. <dfs-admin-command>-fs NAMENODE -allowSnapshot /user/USERNAME/dir1</dfs-admin-command>
  15770. <command>-fs NAMENODE -createSnapshot /user/USERNAME/dir1 snapshot1</command>
  15771. <command>-fs NAMENODE -deleteSnapshot /user/USERNAME/dir1 snapshot1</command>
  15772. <command>-fs NAMENODE -ls /user/USERNAME/dir1/.snapshot</command>
  15773. </test-commands>
  15774. <cleanup-commands>
  15775. <dfs-admin-command>-fs NAMENODE -disallowSnapshot /user/USERNAME/dir1</dfs-admin-command>
  15776. <command>-fs NAMENODE -rm -r /user/USERNAME</command>
  15777. </cleanup-commands>
  15778. <comparators>
  15779. <comparator>
  15780. <type>ExactComparator</type>
  15781. <expected-output></expected-output>
  15782. </comparator>
  15783. </comparators>
  15784. </test>
  15785. <!-- DFSadmin tests -->
  15786. <test>
  15787. <description>refreshUserToGroupsMappings</description>
  15788. <test-commands>
  15789. <dfs-admin-command>-fs NAMENODE -refreshUserToGroupsMappings</dfs-admin-command>
  15790. </test-commands>
  15791. <cleanup-commands>
  15792. <command></command>
  15793. </cleanup-commands>
  15794. <comparators>
  15795. <comparator>
  15796. <type>RegexpComparator</type>
  15797. <expected-output>Refresh user to groups mapping successful(\n)*</expected-output>
  15798. </comparator>
  15799. </comparators>
  15800. </test>
  15801. <test>
  15802. <description>refreshSuperUserGroupsConfiguration</description>
  15803. <test-commands>
  15804. <dfs-admin-command>-fs NAMENODE -refreshSuperUserGroupsConfiguration</dfs-admin-command>
  15805. </test-commands>
  15806. <cleanup-commands>
  15807. <command></command>
  15808. </cleanup-commands>
  15809. <comparators>
  15810. <comparator>
  15811. <type>RegexpComparator</type>
  15812. <expected-output>Refresh super user groups configuration successful(\n)*</expected-output>
  15813. </comparator>
  15814. </comparators>
  15815. </test>
  15816. <test>
  15817. <description>setQuota</description>
  15818. <test-commands>
  15819. <command>-fs NAMENODE -mkdir -p /user/USERNAME/dir1</command>
  15820. <dfs-admin-command>-fs NAMENODE -setQuota 3 /user/USERNAME/dir1</dfs-admin-command>
  15821. <command>-fs NAMENODE -count -q /user/USERNAME/dir1</command>
  15822. </test-commands>
  15823. <cleanup-commands>
  15824. <command>-fs NAMENODE -rm -r /user/USERNAME</command>
  15825. </cleanup-commands>
  15826. <comparators>
  15827. <comparator>
  15828. <type>RegexpComparator</type>
  15829. <expected-output>( )*3.*/user/USERNAME/dir1</expected-output>
  15830. </comparator>
  15831. </comparators>
  15832. </test>
  15833. <test>
  15834. <description>clrQuota</description>
  15835. <test-commands>
  15836. <command>-fs NAMENODE -mkdir -p /user/USERNAME/dir1</command>
  15837. <dfs-admin-command>-fs NAMENODE -setQuota 3 /user/USERNAME/dir1</dfs-admin-command>
  15838. <dfs-admin-command>-fs NAMENODE -clrQuota /user/USERNAME/dir1</dfs-admin-command>
  15839. <command>-fs NAMENODE -count -q /user/USERNAME/dir1</command>
  15840. </test-commands>
  15841. <cleanup-commands>
  15842. <command>-fs NAMENODE -rm -r /user/USERNAME</command>
  15843. </cleanup-commands>
  15844. <comparators>
  15845. <comparator>
  15846. <type>RegexpComparator</type>
  15847. <expected-output>( )*none.*/user/USERNAME/dir1</expected-output>
  15848. </comparator>
  15849. </comparators>
  15850. </test>
  15851. <test>
  15852. <description>setSpaceQuota</description>
  15853. <test-commands>
  15854. <command>-fs NAMENODE -mkdir -p /user/USERNAME/dir1</command>
  15855. <dfs-admin-command>-fs NAMENODE -setSpaceQuota 1G /user/USERNAME/dir1</dfs-admin-command>
  15856. </test-commands>
  15857. <cleanup-commands>
  15858. <command>-fs NAMENODE -rm -r /user/USERNAME/dir1</command>
  15859. </cleanup-commands>
  15860. <comparators>
  15861. <comparator>
  15862. <type>ExactComparator</type>
  15863. <expected-output></expected-output>
  15864. </comparator>
  15865. </comparators>
  15866. </test>
  15867. <test>
  15868. <description>setBalancerBandwidth</description>
  15869. <test-commands>
  15870. <dfs-admin-command>-fs NAMENODE -setBalancerBandwidth 104857600</dfs-admin-command>
  15871. </test-commands>
  15872. <cleanup-commands>
  15873. <command></command>
  15874. </cleanup-commands>
  15875. <comparators>
  15876. <comparator>
  15877. <type>RegexpComparator</type>
  15878. <expected-output>Balancer bandwidth is set to 104857600(\n)*</expected-output>
  15879. </comparator>
  15880. </comparators>
  15881. </test>
  15882. <test>
  15883. <description>finalizeUpgrade</description>
  15884. <test-commands>
  15885. <dfs-admin-command>-fs NAMENODE -finalizeUpgrade</dfs-admin-command>
  15886. </test-commands>
  15887. <cleanup-commands>
  15888. <command></command>
  15889. </cleanup-commands>
  15890. <comparators>
  15891. <comparator>
  15892. <type>SubstringComparator</type>
  15893. <expected-output>Finalize upgrade successful</expected-output>
  15894. </comparator>
  15895. </comparators>
  15896. </test>
  15897. <!-- Tests for moveFromLocal -->
  15898. <test> <!-- TESTED -->
  15899. <description>moveFromLocal: moving non existent file(absolute path)</description>
  15900. <test-commands>
  15901. <command>-fs NAMENODE -mkdir -p /user/USERNAME/dir</command>
  15902. <command>-fs NAMENODE -moveFromLocal /user/wrongdata /user/USERNAME/dir</command>
  15903. </test-commands>
  15904. <cleanup-commands>
  15905. <command>-fs NAMENODE -rm -r /user/USERNAME</command>
  15906. </cleanup-commands>
  15907. <comparators>
  15908. <comparator>
  15909. <type>TokenComparator</type>
  15910. <expected-output>moveFromLocal: `/user/wrongdata': No such file or directory</expected-output>
  15911. </comparator>
  15912. </comparators>
  15913. </test>
  15914. <test> <!-- TESTED -->
  15915. <description>moveFromLocal: moving non existent file(relative path)</description>
  15916. <test-commands>
  15917. <command>-fs NAMENODE -mkdir -p /user/USERNAME/dir</command> <!-- make sure user home dir exists -->
  15918. <command>-fs NAMENODE -moveFromLocal wrongdata /user/USERNAME/dir</command>
  15919. </test-commands>
  15920. <cleanup-commands>
  15921. <command>-fs NAMENODE -rm -r /user/USERNAME</command>
  15922. </cleanup-commands>
  15923. <comparators>
  15924. <comparator>
  15925. <type>TokenComparator</type>
  15926. <expected-output>moveFromLocal: `wrongdata': No such file or directory</expected-output>
  15927. </comparator>
  15928. </comparators>
  15929. </test>
  15930. <test> <!-- TESTED -->
  15931. <description>moveFromLocal: moving many files into an existing file</description>
  15932. <test-commands>
  15933. <command>-fs NAMENODE -cp CLITEST_DATA/data15bytes data15bytes</command>
  15934. <command>-fs NAMENODE -cp CLITEST_DATA/data30bytes data30bytes</command>
  15935. <command>-fs NAMENODE -mkdir -p /user/USERNAME/dir</command>
  15936. <command>-fs NAMENODE -touchz /user/USERNAME/dir/file0</command>
  15937. <command>-fs NAMENODE -moveFromLocal data15bytes data30bytes /user/USERNAME/dir/file0</command>
  15938. </test-commands>
  15939. <cleanup-commands>
  15940. <command>-fs NAMENODE -rm -r /user/USERNAME</command>
  15941. </cleanup-commands>
  15942. <comparators>
  15943. <comparator>
  15944. <type>RegexpComparator</type>
  15945. <expected-output>moveFromLocal: `/user/USERNAME/dir/file0': Is not a directory</expected-output>
  15946. </comparator>
  15947. </comparators>
  15948. </test>
  15949. <test> <!-- TESTED -->
  15950. <description>moveFromLocal: moving many files into a non existent directory</description>
  15951. <test-commands>
  15952. <command>-fs NAMENODE -cp CLITEST_DATA/data15bytes data15bytes</command>
  15953. <command>-fs NAMENODE -cp CLITEST_DATA/data30bytes data30bytes</command>
  15954. <command>-fs NAMENODE -moveFromLocal data15bytes data30bytes /user/USERNAME/dir/wrongdir</command>
  15955. </test-commands>
  15956. <cleanup-commands>
  15957. <command>-fs NAMENODE -rm -r /user/USERNAME</command>
  15958. </cleanup-commands>
  15959. <comparators>
  15960. <comparator>
  15961. <type>RegexpComparator</type>
  15962. <expected-output>^moveFromLocal: `/user/USERNAME/dir/wrongdir': No such file or directory</expected-output>
  15963. </comparator>
  15964. </comparators>
  15965. </test>
  15966. <test> <!-- TESTED -->
  15967. <description>moveFromLocal: Test for hdfs:// path - moving non existent file</description>
  15968. <test-commands>
  15969. <command>-fs NAMENODE -mkdir -p /user/USERNAME/dir</command>
  15970. <command>-fs NAMENODE -moveFromLocal /user/wrongdata hdfs:///user/USERNAME/dir/file</command>
  15971. </test-commands>
  15972. <cleanup-commands>
  15973. <command>-fs NAMENODE -rm -r hdfs:///*</command>
  15974. </cleanup-commands>
  15975. <comparators>
  15976. <comparator>
  15977. <type>TokenComparator</type>
  15978. <expected-output>moveFromLocal: `/user/wrongdata': No such file or directory</expected-output>
  15979. </comparator>
  15980. </comparators>
  15981. </test>
  15982. <test> <!-- TESTED -->
  15983. <description>moveFromLocal: Test for hdfs:// path - moving many files into an existing file</description>
  15984. <test-commands>
  15985. <command>-fs NAMENODE -cp CLITEST_DATA/data15bytes data15bytes</command>
  15986. <command>-fs NAMENODE -cp CLITEST_DATA/data30bytes data30bytes</command>
  15987. <command>-fs NAMENODE -mkdir -p /user/USERNAME/dir</command>
  15988. <command>-fs NAMENODE -touchz hdfs:///user/USERNAME/dir/file</command>
  15989. <command>-fs NAMENODE -moveFromLocal data15bytes data30bytes hdfs:///user/USERNAME/dir/file</command>
  15990. </test-commands>
  15991. <cleanup-commands>
  15992. <command>-fs NAMENODE -rm -r hdfs:///*</command>
  15993. </cleanup-commands>
  15994. <comparators>
  15995. <comparator>
  15996. <type>RegexpComparator</type>
  15997. <expected-output>moveFromLocal: `hdfs:///user/USERNAME/dir/file': Is not a directory</expected-output>
  15998. </comparator>
  15999. </comparators>
  16000. </test>
  16001. <test> <!-- TESTED -->
  16002. <description>moveFromLocal: Test for hdfs:// path - moving many files into a non existent directory</description>
  16003. <test-commands>
  16004. <command>-fs NAMENODE -cp CLITEST_DATA/data15bytes data15bytes</command>
  16005. <command>-fs NAMENODE -cp CLITEST_DATA/data30bytes data30bytes</command>
  16006. <command>-fs NAMENODE -moveFromLocal data15bytes data30bytes hdfs:///user/USERNAME/dir/wrongdir</command>
  16007. </test-commands>
  16008. <cleanup-commands>
  16009. <command>-fs NAMENODE -rm -r hdfs:///*</command>
  16010. </cleanup-commands>
  16011. <comparators>
  16012. <comparator>
  16013. <type>RegexpComparator</type>
  16014. <expected-output>moveFromLocal: `hdfs:///user/USERNAME/dir/wrongdir': No such file or directory</expected-output>
  16015. </comparator>
  16016. </comparators>
  16017. </test>
  16018. <test> <!-- TESTED -->
  16019. <description>moveFromLocal: Test for Namenode's path - moving non existent file</description>
  16020. <test-commands>
  16021. <command>-fs NAMENODE -mkdir -p NAMENODE/user/USERNAME/dir</command>
  16022. <command>-fs NAMENODE -moveFromLocal /user/wrongdata NAMENODE/user/USERNAME/dir</command>
  16023. </test-commands>
  16024. <cleanup-commands>
  16025. <command>-fs NAMENODE -rm -r NAMENODE/*</command>
  16026. </cleanup-commands>
  16027. <comparators>
  16028. <comparator>
  16029. <type>TokenComparator</type>
  16030. <expected-output>moveFromLocal: `/user/wrongdata': No such file or directory</expected-output>
  16031. </comparator>
  16032. </comparators>
  16033. </test>
  16034. <test> <!-- TESTED -->
  16035. <description>moveFromLocal: Test for Namenode's path - moving many files into an existing file</description>
  16036. <test-commands>
  16037. <command>-fs NAMENODE -mkdir -p NAMENODE/user/USERNAME/dir</command>
  16038. <command>-fs NAMENODE -touchz NAMENODE/user/USERNAME/dir/file0</command>
  16039. <command>-fs NAMENODE -cp CLITEST_DATA/data15bytes data15bytes</command>
  16040. <command>-fs NAMENODE -cp CLITEST_DATA/data30bytes data30bytes</command>
  16041. <command>-fs NAMENODE -moveFromLocal data15bytes data30bytes NAMENODE/user/USERNAME/dir/file0</command>
  16042. </test-commands>
  16043. <cleanup-commands>
  16044. <command>-fs NAMENODE -rm -r NAMENODE/*</command>
  16045. </cleanup-commands>
  16046. <comparators>
  16047. <comparator>
  16048. <type>RegexpComparator</type>
  16049. <expected-output>moveFromLocal: `hdfs://\w+[-.a-z0-9]*:[0-9]+/user/USERNAME/dir/file0': Is not a directory</expected-output>
  16050. </comparator>
  16051. </comparators>
  16052. </test>
  16053. <test> <!-- TESTED -->
  16054. <description>moveFromLocal: Test for Namenode's path - moving many files into a non existent directory</description>
  16055. <test-commands>
  16056. <command>-fs NAMENODE -mkdir -p NAMENODE/user/USERNAME</command>
  16057. <command>-fs NAMENODE -touchz NAMENODE/user/USERNAME/dir/file0</command>
  16058. <command>-fs NAMENODE -cp CLITEST_DATA/data15bytes data15bytes</command>
  16059. <command>-fs NAMENODE -cp CLITEST_DATA/data30bytes data30bytes</command>
  16060. <command>-fs NAMENODE -moveFromLocal data15bytes data30bytes NAMENODE/user/USERNAME/wrongdir</command>
  16061. </test-commands>
  16062. <cleanup-commands>
  16063. <command>-fs NAMENODE -rm -r NAMENODE/*</command>
  16064. </cleanup-commands>
  16065. <comparators>
  16066. <comparator>
  16067. <type>RegexpComparator</type>
  16068. <expected-output>moveFromLocal: `hdfs://\w+[-.a-z0-9]*:[0-9]+/user/USERNAME/wrongdir': No such file or directory</expected-output>
  16069. </comparator>
  16070. </comparators>
  16071. </test>
  16072. <test> <!--Tested -->
  16073. <description>Verifying chmod operation is not permitted in safemode</description>
  16074. <test-commands>
  16075. <command>-fs NAMENODE -mkdir /test </command>
  16076. <command>-fs NAMENODE -touchz /test/file1 </command>
  16077. <dfs-admin-command>-fs NAMENODE -safemode enter </dfs-admin-command>
  16078. <command>-fs NAMENODE -chmod 777 /test/file1 </command>
  16079. </test-commands>
  16080. <cleanup-commands>
  16081. <dfs-admin-command>-fs NAMENODE -safemode leave </dfs-admin-command>
  16082. <dfs-admin-command>-fs NAMENODE -rm -r /test </dfs-admin-command>
  16083. </cleanup-commands>
  16084. <comparators>
  16085. <comparator>
  16086. <type>SubstringComparator</type>
  16087. <expected-output>Cannot set permission for /test/file1. Name node is in safe mode.</expected-output>
  16088. </comparator>
  16089. </comparators>
  16090. </test>
  16091. <test> <!--Tested -->
  16092. <description>Verifying chown operation is not permitted in safemode</description>
  16093. <test-commands>
  16094. <command>-fs NAMENODE -mkdir /test </command>
  16095. <command>-fs NAMENODE -touchz /test/file1 </command>
  16096. <dfs-admin-command>-fs NAMENODE -safemode enter </dfs-admin-command>
  16097. <command>-fs NAMENODE -chown newgroup /test/file1 </command>
  16098. </test-commands>
  16099. <cleanup-commands>
  16100. <dfs-admin-command>-fs NAMENODE -safemode leave </dfs-admin-command>
  16101. <dfs-admin-command>-fs NAMENODE -rm -r /test </dfs-admin-command>
  16102. </cleanup-commands>
  16103. <comparators>
  16104. <comparator>
  16105. <type>SubstringComparator</type>
  16106. <expected-output>Cannot set owner for /test/file1. Name node is in safe mode.</expected-output>
  16107. </comparator>
  16108. </comparators>
  16109. </test>
  16110. <test> <!--Tested -->
  16111. <description>Verifying chgrp operation is not permitted in safemode</description>
  16112. <test-commands>
  16113. <command>-fs NAMENODE -mkdir /test </command>
  16114. <command>-fs NAMENODE -touchz /test/file1 </command>
  16115. <dfs-admin-command>-fs NAMENODE -safemode enter </dfs-admin-command>
  16116. <command>-fs NAMENODE -chgrp newgroup /test/file1 </command>
  16117. </test-commands>
  16118. <cleanup-commands>
  16119. <dfs-admin-command>-fs NAMENODE -safemode leave </dfs-admin-command>
  16120. <dfs-admin-command>-fs NAMENODE -rm -r /test </dfs-admin-command>
  16121. </cleanup-commands>
  16122. <comparators>
  16123. <comparator>
  16124. <type>SubstringComparator</type>
  16125. <expected-output>Cannot set owner for /test/file1. Name node is in safe mode.</expected-output>
  16126. </comparator>
  16127. </comparators>
  16128. </test>
  16129. <test> <!--Tested -->
  16130. <description>Verifying setQuota operation is not permitted in safemode</description>
  16131. <test-commands>
  16132. <command>-fs NAMENODE -mkdir /test </command>
  16133. <dfs-admin-command>-fs NAMENODE -safemode enter </dfs-admin-command>
  16134. <dfs-admin-command>-fs NAMENODE -setQuota 100 /test </dfs-admin-command>
  16135. </test-commands>
  16136. <cleanup-commands>
  16137. <dfs-admin-command>-fs NAMENODE -safemode leave </dfs-admin-command>
  16138. <dfs-admin-command>-fs NAMENODE -rm -r /test </dfs-admin-command>
  16139. </cleanup-commands>
  16140. <comparators>
  16141. <comparator>
  16142. <type>SubstringComparator</type>
  16143. <expected-output>setQuota: Cannot set quota on /test. Name node is in safe mode.</expected-output>
  16144. </comparator>
  16145. </comparators>
  16146. </test>
  16147. <test> <!--Tested -->
  16148. <description>Verifying clrQuota operation is not permitted in safemode</description>
  16149. <test-commands>
  16150. <command>-fs NAMENODE -mkdir /test </command>
  16151. <dfs-admin-command>-fs NAMENODE -safemode enter </dfs-admin-command>
  16152. <dfs-admin-command>-fs NAMENODE -clrQuota /test </dfs-admin-command>
  16153. </test-commands>
  16154. <cleanup-commands>
  16155. <dfs-admin-command>-fs NAMENODE -safemode leave </dfs-admin-command>
  16156. <dfs-admin-command>-fs NAMENODE -rm -r /test </dfs-admin-command>
  16157. </cleanup-commands>
  16158. <comparators>
  16159. <comparator>
  16160. <type>SubstringComparator</type>
  16161. <expected-output>clrQuota: Cannot set quota on /test. Name node is in safe mode.</expected-output>
  16162. </comparator>
  16163. </comparators>
  16164. </test>
  16165. <test> <!--Tested -->
  16166. <description>Verifying setSpaceQuota operation is not permitted in safemode</description>
  16167. <test-commands>
  16168. <command>-fs NAMENODE -mkdir /test </command>
  16169. <dfs-admin-command>-fs NAMENODE -safemode enter </dfs-admin-command>
  16170. <dfs-admin-command>-fs NAMENODE -setSpaceQuota 100 /test </dfs-admin-command>
  16171. </test-commands>
  16172. <cleanup-commands>
  16173. <dfs-admin-command>-fs NAMENODE -safemode leave </dfs-admin-command>
  16174. <dfs-admin-command>-fs NAMENODE -rm -r /test </dfs-admin-command>
  16175. </cleanup-commands>
  16176. <comparators>
  16177. <comparator>
  16178. <type>SubstringComparator</type>
  16179. <expected-output>setSpaceQuota: Cannot set quota on /test. Name node is in safe mode.</expected-output>
  16180. </comparator>
  16181. </comparators>
  16182. </test>
  16183. <test> <!--Tested -->
  16184. <description>Verifying clrSpaceQuota operation is not permitted in safemode</description>
  16185. <test-commands>
  16186. <command>-fs NAMENODE -mkdir /test </command>
  16187. <dfs-admin-command>-fs NAMENODE -safemode enter </dfs-admin-command>
  16188. <dfs-admin-command>-fs NAMENODE -clrSpaceQuota /test </dfs-admin-command>
  16189. </test-commands>
  16190. <cleanup-commands>
  16191. <dfs-admin-command>-fs NAMENODE -safemode leave </dfs-admin-command>
  16192. <dfs-admin-command>-fs NAMENODE -rm -r /test </dfs-admin-command>
  16193. </cleanup-commands>
  16194. <comparators>
  16195. <comparator>
  16196. <type>SubstringComparator</type>
  16197. <expected-output>clrSpaceQuota: Cannot set quota on /test. Name node is in safe mode.</expected-output>
  16198. </comparator>
  16199. </comparators>
  16200. </test>
  16201. <!-- Tests for find -->
  16202. <test> <!-- TESTED -->
  16203. <description>find: default expression</description>
  16204. <test-commands>
  16205. <command>-fs NAMENODE -mkdir /donotfind</command>
  16206. <command>-fs NAMENODE -mkdir donotfind</command>
  16207. <command>-fs NAMENODE -mkdir /findtest</command>
  16208. <command>-fs NAMENODE -mkdir /findtest/item1</command>
  16209. <command>-fs NAMENODE -mkdir /findtest/item1/item1a</command>
  16210. <command>-fs NAMENODE -touchz /findtest/item1/item1a/item1aa</command>
  16211. <command>-fs NAMENODE -put CLITEST_DATA/data60bytes /findtest/item1/item1b</command>
  16212. <command>-fs NAMENODE -put CLITEST_DATA/data60bytes /findtest/item2</command>
  16213. <command>-fs NAMENODE -mkdir /findtest/item3</command>
  16214. <command>-fs NAMENODE -mkdir /findtest/item4</command>
  16215. <command>-fs NAMENODE -mkdir /findtest/item4/item4a</command>
  16216. <command>-fs NAMENODE -put CLITEST_DATA/data120bytes /findtest/item4/item4b</command>
  16217. <command>-fs NAMENODE -put CLITEST_DATA/data1k /findtest/item5</command>
  16218. <command>-fs NAMENODE -find /findtest</command>
  16219. </test-commands>
  16220. <cleanup-commands>
  16221. <command>-fs NAMENODE -rm -r /donotfind</command>
  16222. <command>-fs NAMENODE -rm -r donotfind</command>
  16223. <command>-fs NAMENODE -rm -r /findtest</command>
  16224. </cleanup-commands>
  16225. <comparators>
  16226. <comparator>
  16227. <type>RegexpAcrossOutputComparator</type>
  16228. <expected-output>^/findtest
  16229. /findtest/item1
  16230. /findtest/item1/item1a
  16231. /findtest/item1/item1a/item1aa
  16232. /findtest/item1/item1b
  16233. /findtest/item2
  16234. /findtest/item3
  16235. /findtest/item4
  16236. /findtest/item4/item4a
  16237. /findtest/item4/item4b
  16238. /findtest/item5
  16239. $</expected-output>
  16240. </comparator>
  16241. </comparators>
  16242. </test>
  16243. <test> <!-- TESTED -->
  16244. <description>find: -print </description>
  16245. <test-commands>
  16246. <command>-fs NAMENODE -mkdir /donotfind</command>
  16247. <command>-fs NAMENODE -mkdir donotfind</command>
  16248. <command>-fs NAMENODE -mkdir /findtest</command>
  16249. <command>-fs NAMENODE -mkdir /findtest/item1</command>
  16250. <command>-fs NAMENODE -mkdir /findtest/item1/item1a</command>
  16251. <command>-fs NAMENODE -touchz /findtest/item1/item1a/item1aa</command>
  16252. <command>-fs NAMENODE -put CLITEST_DATA/data60bytes /findtest/item1/item1b</command>
  16253. <command>-fs NAMENODE -put CLITEST_DATA/data60bytes /findtest/item2</command>
  16254. <command>-fs NAMENODE -mkdir /findtest/item3</command>
  16255. <command>-fs NAMENODE -mkdir /findtest/item4</command>
  16256. <command>-fs NAMENODE -mkdir /findtest/item4/item4a</command>
  16257. <command>-fs NAMENODE -put CLITEST_DATA/data120bytes /findtest/item4/item4b</command>
  16258. <command>-fs NAMENODE -put CLITEST_DATA/data1k /findtest/item5</command>
  16259. <command>-fs NAMENODE -find /findtest -print</command>
  16260. </test-commands>
  16261. <cleanup-commands>
  16262. <command>-fs NAMENODE -rm -r /donotfind</command>
  16263. <command>-fs NAMENODE -rm -r donotfind</command>
  16264. <command>-fs NAMENODE -rm -r /findtest</command>
  16265. </cleanup-commands>
  16266. <comparators>
  16267. <comparator>
  16268. <type>RegexpAcrossOutputComparator</type>
  16269. <expected-output>^/findtest
  16270. /findtest/item1
  16271. /findtest/item1/item1a
  16272. /findtest/item1/item1a/item1aa
  16273. /findtest/item1/item1b
  16274. /findtest/item2
  16275. /findtest/item3
  16276. /findtest/item4
  16277. /findtest/item4/item4a
  16278. /findtest/item4/item4b
  16279. /findtest/item5
  16280. $</expected-output>
  16281. </comparator>
  16282. </comparators>
  16283. </test>
  16284. <test> <!-- TESTED -->
  16285. <description>find: -print (relative path) </description>
  16286. <test-commands>
  16287. <command>-fs NAMENODE -mkdir /donotfind</command>
  16288. <command>-fs NAMENODE -mkdir -p donotfind</command>
  16289. <command>-fs NAMENODE -mkdir -p findtest</command>
  16290. <command>-fs NAMENODE -mkdir -p findtest/item1</command>
  16291. <command>-fs NAMENODE -mkdir -p findtest/item1/item1a</command>
  16292. <command>-fs NAMENODE -touchz findtest/item1/item1a/item1aa</command>
  16293. <command>-fs NAMENODE -put CLITEST_DATA/data60bytes findtest/item1/item1b</command>
  16294. <command>-fs NAMENODE -put CLITEST_DATA/data60bytes findtest/item2</command>
  16295. <command>-fs NAMENODE -mkdir -p findtest/item3</command>
  16296. <command>-fs NAMENODE -mkdir -p findtest/item4</command>
  16297. <command>-fs NAMENODE -mkdir -p findtest/item4/item4a</command>
  16298. <command>-fs NAMENODE -put CLITEST_DATA/data120bytes findtest/item4/item4b</command>
  16299. <command>-fs NAMENODE -put CLITEST_DATA/data1k findtest/item5</command>
  16300. <command>-fs NAMENODE -find findtest -print</command>
  16301. </test-commands>
  16302. <cleanup-commands>
  16303. <command>-fs NAMENODE -rm -r /donotfind</command>
  16304. <command>-fs NAMENODE -rm -r donotfind</command>
  16305. <command>-fs NAMENODE -rm -r findtest</command>
  16306. </cleanup-commands>
  16307. <comparators>
  16308. <comparator>
  16309. <type>RegexpAcrossOutputComparator</type>
  16310. <expected-output>^findtest
  16311. findtest/item1
  16312. findtest/item1/item1a
  16313. findtest/item1/item1a/item1aa
  16314. findtest/item1/item1b
  16315. findtest/item2
  16316. findtest/item3
  16317. findtest/item4
  16318. findtest/item4/item4a
  16319. findtest/item4/item4b
  16320. findtest/item5
  16321. $</expected-output>
  16322. </comparator>
  16323. </comparators>
  16324. </test>
  16325. <test> <!-- TESTED -->
  16326. <description>find: -print (cwd) </description>
  16327. <test-commands>
  16328. <command>-fs NAMENODE -mkdir /donotfind</command>
  16329. <command>-fs NAMENODE -mkdir findtest</command>
  16330. <command>-fs NAMENODE -mkdir findtest/item1</command>
  16331. <command>-fs NAMENODE -mkdir findtest/item1/item1a</command>
  16332. <command>-fs NAMENODE -touchz findtest/item1/item1a/item1aa</command>
  16333. <command>-fs NAMENODE -put CLITEST_DATA/data60bytes findtest/item1/item1b</command>
  16334. <command>-fs NAMENODE -put CLITEST_DATA/data60bytes findtest/item2</command>
  16335. <command>-fs NAMENODE -mkdir findtest/item3</command>
  16336. <command>-fs NAMENODE -mkdir findtest/item4</command>
  16337. <command>-fs NAMENODE -mkdir findtest/item4/item4a</command>
  16338. <command>-fs NAMENODE -put CLITEST_DATA/data120bytes findtest/item4/item4b</command>
  16339. <command>-fs NAMENODE -put CLITEST_DATA/data1k findtest/item5</command>
  16340. <command>-fs NAMENODE -find -print</command>
  16341. </test-commands>
  16342. <cleanup-commands>
  16343. <command>-fs NAMENODE -rm -r findtest</command>
  16344. <command>-fs NAMENODE -rm -r /donotfind</command>
  16345. </cleanup-commands>
  16346. <comparators>
  16347. <comparator>
  16348. <type>RegexpAcrossOutputComparator</type>
  16349. <expected-output>^.
  16350. findtest
  16351. findtest/item1
  16352. findtest/item1/item1a
  16353. findtest/item1/item1a/item1aa
  16354. findtest/item1/item1b
  16355. findtest/item2
  16356. findtest/item3
  16357. findtest/item4
  16358. findtest/item4/item4a
  16359. findtest/item4/item4b
  16360. findtest/item5
  16361. $</expected-output>
  16362. </comparator>
  16363. </comparators>
  16364. </test>
  16365. <test> <!-- TESTED -->
  16366. <description>find: -name </description>
  16367. <test-commands>
  16368. <command>-fs NAMENODE -mkdir /findtest</command>
  16369. <command>-fs NAMENODE -mkdir /findtest/item1</command>
  16370. <command>-fs NAMENODE -mkdir /findtest/item1/item1a</command>
  16371. <command>-fs NAMENODE -touchz /findtest/item1/item1a/item1aa</command>
  16372. <command>-fs NAMENODE -put CLITEST_DATA/data60bytes /findtest/item1/item1b</command>
  16373. <command>-fs NAMENODE -put CLITEST_DATA/data60bytes /findtest/item2</command>
  16374. <command>-fs NAMENODE -mkdir /findtest/item3</command>
  16375. <command>-fs NAMENODE -mkdir /findtest/item4</command>
  16376. <command>-fs NAMENODE -mkdir /findtest/item4/item4a</command>
  16377. <command>-fs NAMENODE -put CLITEST_DATA/data120bytes /findtest/item4/item4b</command>
  16378. <command>-fs NAMENODE -put CLITEST_DATA/data1k /findtest/item5</command>
  16379. <command>-fs NAMENODE -find /findtest -name item*a</command>
  16380. </test-commands>
  16381. <cleanup-commands>
  16382. <command>-fs NAMENODE -rm -r /findtest</command>
  16383. </cleanup-commands>
  16384. <comparators>
  16385. <comparator>
  16386. <type>RegexpAcrossOutputComparator</type>
  16387. <expected-output>^/findtest/item1/item1a
  16388. /findtest/item1/item1a/item1aa
  16389. /findtest/item4/item4a
  16390. $</expected-output>
  16391. </comparator>
  16392. </comparators>
  16393. </test>
  16394. <test> <!-- TESTED -->
  16395. <description>find: -iname </description>
  16396. <test-commands>
  16397. <command>-fs NAMENODE -mkdir /findtest</command>
  16398. <command>-fs NAMENODE -mkdir /findtest/item1</command>
  16399. <command>-fs NAMENODE -mkdir /findtest/item1/item1a</command>
  16400. <command>-fs NAMENODE -touchz /findtest/item1/item1a/item1aa</command>
  16401. <command>-fs NAMENODE -put CLITEST_DATA/data60bytes /findtest/item1/item1b</command>
  16402. <command>-fs NAMENODE -put CLITEST_DATA/data60bytes /findtest/item2</command>
  16403. <command>-fs NAMENODE -mkdir /findtest/item3</command>
  16404. <command>-fs NAMENODE -mkdir /findtest/item4</command>
  16405. <command>-fs NAMENODE -mkdir /findtest/item4/item4a</command>
  16406. <command>-fs NAMENODE -put CLITEST_DATA/data120bytes /findtest/item4/item4b</command>
  16407. <command>-fs NAMENODE -put CLITEST_DATA/data1k /findtest/item5</command>
  16408. <command>-fs NAMENODE -find /findtest -iname ITEM*a</command>
  16409. </test-commands>
  16410. <cleanup-commands>
  16411. <command>-fs NAMENODE -rm -r /findtest</command>
  16412. </cleanup-commands>
  16413. <comparators>
  16414. <comparator>
  16415. <type>RegexpAcrossOutputComparator</type>
  16416. <expected-output>^/findtest/item1/item1a
  16417. /findtest/item1/item1a/item1aa
  16418. /findtest/item4/item4a
  16419. $</expected-output>
  16420. </comparator>
  16421. </comparators>
  16422. </test>
  16423. <test> <!-- TESTED -->
  16424. <description>truncate to 5 bytes after waiting for block recovery to complete</description>
  16425. <test-commands>
  16426. <command>-fs NAMENODE -mkdir -p /user/USERNAME/dir0</command>
  16427. <command>-fs NAMENODE -put CLITEST_DATA/data120bytes /user/USERNAME/dir0</command>
  16428. <command>-fs NAMENODE -truncate -w 5 /user/USERNAME/dir0/data120bytes</command>
  16429. <command>-fs NAMENODE -cat /user/USERNAME/dir0/data120bytes</command>
  16430. </test-commands>
  16431. <cleanup-commands>
  16432. <command>-fs NAMENODE -rm -r /user/USERNAME/dir0</command>
  16433. </cleanup-commands>
  16434. <comparators>
  16435. <comparator>
  16436. <type>RegexpComparator</type>
  16437. <expected-output>12345</expected-output>
  16438. </comparator>
  16439. </comparators>
  16440. </test>
  16441. <test> <!-- TESTED -->
  16442. <description>truncate to greater length than length of file</description>
  16443. <test-commands>
  16444. <command>-fs NAMENODE -mkdir /user/USERNAME/dir0</command>
  16445. <command>-fs NAMENODE -put CLITEST_DATA/data15bytes /user/USERNAME/dir0</command>
  16446. <command>-fs NAMENODE -truncate -w 50 /user/USERNAME/dir0/data15bytes</command>
  16447. <command>-fs NAMENODE -cat /user/USERNAME/dir0/data15bytes</command>
  16448. </test-commands>
  16449. <cleanup-commands>
  16450. <command>-fs NAMENODE -rm -r /user/USERNAME/dir0</command>
  16451. </cleanup-commands>
  16452. <comparators>
  16453. <comparator>
  16454. <type>RegexpComparator</type>
  16455. <expected-output>12345678901234</expected-output>
  16456. </comparator>
  16457. </comparators>
  16458. </test>
  16459. </tests>
  16460. </configuration>