testHDFSConf.xml 773 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734883489349034913492349334943495349634973498349935003501350235033504350535063507350835093510351135123513351435153516351735183519352035213522352335243525352635273528352935303531353235333534353535363537353835393540354135423543354435453546354735483549355035513552355335543555355635573558355935603561356235633564356535663567356835693570357135723573357435753576357735783579358035813582358335843585358635873588358935903591359235933594359535963597359835993600360136023603360436053606360736083609361036113612361336143615361636173618361936203621362236233624362536263627362836293630363136323633363436353636363736383639364036413642364336443645364636473648364936503651365236533654365536563657365836593660366136623663366436653666366736683669367036713672367336743675367636773678367936803681368236833684368536863687368836893690369136923693369436953696369736983699370037013702370337043705370637073708370937103711371237133714371537163717371837193720372137223723372437253726372737283729373037313732373337343735373637373738373937403741374237433744374537463747374837493750375137523753375437553756375737583759376037613762376337643765376637673768376937703771377237733774377537763777377837793780378137823783378437853786378737883789379037913792379337943795379637973798379938003801380238033804380538063807380838093810381138123813381438153816381738183819382038213822382338243825382638273828382938303831383238333834383538363837383838393840384138423843384438453846384738483849385038513852385338543855385638573858385938603861386238633864386538663867386838693870387138723873387438753876387738783879388038813882388338843885388638873888388938903891389238933894389538963897389838993900390139023903390439053906390739083909391039113912391339143915391639173918391939203921392239233924392539263927392839293930393139323933393439353936393739383939394039413942394339443945394639473948394939503951395239533954395539563957395839593960396139623963396439653966396739683969397039713972397339743975397639773978397939803981398239833984398539863987398839893990399139923993399439953996399739983999400040014002400340044005400640074008400940104011401240134014401540164017401840194020402140224023402440254026402740284029403040314032403340344035403640374038403940404041404240434044404540464047404840494050405140524053405440554056405740584059406040614062406340644065406640674068406940704071407240734074407540764077407840794080408140824083408440854086408740884089409040914092409340944095409640974098409941004101410241034104410541064107410841094110411141124113411441154116411741184119412041214122412341244125412641274128412941304131413241334134413541364137413841394140414141424143414441454146414741484149415041514152415341544155415641574158415941604161416241634164416541664167416841694170417141724173417441754176417741784179418041814182418341844185418641874188418941904191419241934194419541964197419841994200420142024203420442054206420742084209421042114212421342144215421642174218421942204221422242234224422542264227422842294230423142324233423442354236423742384239424042414242424342444245424642474248424942504251425242534254425542564257425842594260426142624263426442654266426742684269427042714272427342744275427642774278427942804281428242834284428542864287428842894290429142924293429442954296429742984299430043014302430343044305430643074308430943104311431243134314431543164317431843194320432143224323432443254326432743284329433043314332433343344335433643374338433943404341434243434344434543464347434843494350435143524353435443554356435743584359436043614362436343644365436643674368436943704371437243734374437543764377437843794380438143824383438443854386438743884389439043914392439343944395439643974398439944004401440244034404440544064407440844094410441144124413441444154416441744184419442044214422442344244425442644274428442944304431443244334434443544364437443844394440444144424443444444454446444744484449445044514452445344544455445644574458445944604461446244634464446544664467446844694470447144724473447444754476447744784479448044814482448344844485448644874488448944904491449244934494449544964497449844994500450145024503450445054506450745084509451045114512451345144515451645174518451945204521452245234524452545264527452845294530453145324533453445354536453745384539454045414542454345444545454645474548454945504551455245534554455545564557455845594560456145624563456445654566456745684569457045714572457345744575457645774578457945804581458245834584458545864587458845894590459145924593459445954596459745984599460046014602460346044605460646074608460946104611461246134614461546164617461846194620462146224623462446254626462746284629463046314632463346344635463646374638463946404641464246434644464546464647464846494650465146524653465446554656465746584659466046614662466346644665466646674668466946704671467246734674467546764677467846794680468146824683468446854686468746884689469046914692469346944695469646974698469947004701470247034704470547064707470847094710471147124713471447154716471747184719472047214722472347244725472647274728472947304731473247334734473547364737473847394740474147424743474447454746474747484749475047514752475347544755475647574758475947604761476247634764476547664767476847694770477147724773477447754776477747784779478047814782478347844785478647874788478947904791479247934794479547964797479847994800480148024803480448054806480748084809481048114812481348144815481648174818481948204821482248234824482548264827482848294830483148324833483448354836483748384839484048414842484348444845484648474848484948504851485248534854485548564857485848594860486148624863486448654866486748684869487048714872487348744875487648774878487948804881488248834884488548864887488848894890489148924893489448954896489748984899490049014902490349044905490649074908490949104911491249134914491549164917491849194920492149224923492449254926492749284929493049314932493349344935493649374938493949404941494249434944494549464947494849494950495149524953495449554956495749584959496049614962496349644965496649674968496949704971497249734974497549764977497849794980498149824983498449854986498749884989499049914992499349944995499649974998499950005001500250035004500550065007500850095010501150125013501450155016501750185019502050215022502350245025502650275028502950305031503250335034503550365037503850395040504150425043504450455046504750485049505050515052505350545055505650575058505950605061506250635064506550665067506850695070507150725073507450755076507750785079508050815082508350845085508650875088508950905091509250935094509550965097509850995100510151025103510451055106510751085109511051115112511351145115511651175118511951205121512251235124512551265127512851295130513151325133513451355136513751385139514051415142514351445145514651475148514951505151515251535154515551565157515851595160516151625163516451655166516751685169517051715172517351745175517651775178517951805181518251835184518551865187518851895190519151925193519451955196519751985199520052015202520352045205520652075208520952105211521252135214521552165217521852195220522152225223522452255226522752285229523052315232523352345235523652375238523952405241524252435244524552465247524852495250525152525253525452555256525752585259526052615262526352645265526652675268526952705271527252735274527552765277527852795280528152825283528452855286528752885289529052915292529352945295529652975298529953005301530253035304530553065307530853095310531153125313531453155316531753185319532053215322532353245325532653275328532953305331533253335334533553365337533853395340534153425343534453455346534753485349535053515352535353545355535653575358535953605361536253635364536553665367536853695370537153725373537453755376537753785379538053815382538353845385538653875388538953905391539253935394539553965397539853995400540154025403540454055406540754085409541054115412541354145415541654175418541954205421542254235424542554265427542854295430543154325433543454355436543754385439544054415442544354445445544654475448544954505451545254535454545554565457545854595460546154625463546454655466546754685469547054715472547354745475547654775478547954805481548254835484548554865487548854895490549154925493549454955496549754985499550055015502550355045505550655075508550955105511551255135514551555165517551855195520552155225523552455255526552755285529553055315532553355345535553655375538553955405541554255435544554555465547554855495550555155525553555455555556555755585559556055615562556355645565556655675568556955705571557255735574557555765577557855795580558155825583558455855586558755885589559055915592559355945595559655975598559956005601560256035604560556065607560856095610561156125613561456155616561756185619562056215622562356245625562656275628562956305631563256335634563556365637563856395640564156425643564456455646564756485649565056515652565356545655565656575658565956605661566256635664566556665667566856695670567156725673567456755676567756785679568056815682568356845685568656875688568956905691569256935694569556965697569856995700570157025703570457055706570757085709571057115712571357145715571657175718571957205721572257235724572557265727572857295730573157325733573457355736573757385739574057415742574357445745574657475748574957505751575257535754575557565757575857595760576157625763576457655766576757685769577057715772577357745775577657775778577957805781578257835784578557865787578857895790579157925793579457955796579757985799580058015802580358045805580658075808580958105811581258135814581558165817581858195820582158225823582458255826582758285829583058315832583358345835583658375838583958405841584258435844584558465847584858495850585158525853585458555856585758585859586058615862586358645865586658675868586958705871587258735874587558765877587858795880588158825883588458855886588758885889589058915892589358945895589658975898589959005901590259035904590559065907590859095910591159125913591459155916591759185919592059215922592359245925592659275928592959305931593259335934593559365937593859395940594159425943594459455946594759485949595059515952595359545955595659575958595959605961596259635964596559665967596859695970597159725973597459755976597759785979598059815982598359845985598659875988598959905991599259935994599559965997599859996000600160026003600460056006600760086009601060116012601360146015601660176018601960206021602260236024602560266027602860296030603160326033603460356036603760386039604060416042604360446045604660476048604960506051605260536054605560566057605860596060606160626063606460656066606760686069607060716072607360746075607660776078607960806081608260836084608560866087608860896090609160926093609460956096609760986099610061016102610361046105610661076108610961106111611261136114611561166117611861196120612161226123612461256126612761286129613061316132613361346135613661376138613961406141614261436144614561466147614861496150615161526153615461556156615761586159616061616162616361646165616661676168616961706171617261736174617561766177617861796180618161826183618461856186618761886189619061916192619361946195619661976198619962006201620262036204620562066207620862096210621162126213621462156216621762186219622062216222622362246225622662276228622962306231623262336234623562366237623862396240624162426243624462456246624762486249625062516252625362546255625662576258625962606261626262636264626562666267626862696270627162726273627462756276627762786279628062816282628362846285628662876288628962906291629262936294629562966297629862996300630163026303630463056306630763086309631063116312631363146315631663176318631963206321632263236324632563266327632863296330633163326333633463356336633763386339634063416342634363446345634663476348634963506351635263536354635563566357635863596360636163626363636463656366636763686369637063716372637363746375637663776378637963806381638263836384638563866387638863896390639163926393639463956396639763986399640064016402640364046405640664076408640964106411641264136414641564166417641864196420642164226423642464256426642764286429643064316432643364346435643664376438643964406441644264436444644564466447644864496450645164526453645464556456645764586459646064616462646364646465646664676468646964706471647264736474647564766477647864796480648164826483648464856486648764886489649064916492649364946495649664976498649965006501650265036504650565066507650865096510651165126513651465156516651765186519652065216522652365246525652665276528652965306531653265336534653565366537653865396540654165426543654465456546654765486549655065516552655365546555655665576558655965606561656265636564656565666567656865696570657165726573657465756576657765786579658065816582658365846585658665876588658965906591659265936594659565966597659865996600660166026603660466056606660766086609661066116612661366146615661666176618661966206621662266236624662566266627662866296630663166326633663466356636663766386639664066416642664366446645664666476648664966506651665266536654665566566657665866596660666166626663666466656666666766686669667066716672667366746675667666776678667966806681668266836684668566866687668866896690669166926693669466956696669766986699670067016702670367046705670667076708670967106711671267136714671567166717671867196720672167226723672467256726672767286729673067316732673367346735673667376738673967406741674267436744674567466747674867496750675167526753675467556756675767586759676067616762676367646765676667676768676967706771677267736774677567766777677867796780678167826783678467856786678767886789679067916792679367946795679667976798679968006801680268036804680568066807680868096810681168126813681468156816681768186819682068216822682368246825682668276828682968306831683268336834683568366837683868396840684168426843684468456846684768486849685068516852685368546855685668576858685968606861686268636864686568666867686868696870687168726873687468756876687768786879688068816882688368846885688668876888688968906891689268936894689568966897689868996900690169026903690469056906690769086909691069116912691369146915691669176918691969206921692269236924692569266927692869296930693169326933693469356936693769386939694069416942694369446945694669476948694969506951695269536954695569566957695869596960696169626963696469656966696769686969697069716972697369746975697669776978697969806981698269836984698569866987698869896990699169926993699469956996699769986999700070017002700370047005700670077008700970107011701270137014701570167017701870197020702170227023702470257026702770287029703070317032703370347035703670377038703970407041704270437044704570467047704870497050705170527053705470557056705770587059706070617062706370647065706670677068706970707071707270737074707570767077707870797080708170827083708470857086708770887089709070917092709370947095709670977098709971007101710271037104710571067107710871097110711171127113711471157116711771187119712071217122712371247125712671277128712971307131713271337134713571367137713871397140714171427143714471457146714771487149715071517152715371547155715671577158715971607161716271637164716571667167716871697170717171727173717471757176717771787179718071817182718371847185718671877188718971907191719271937194719571967197719871997200720172027203720472057206720772087209721072117212721372147215721672177218721972207221722272237224722572267227722872297230723172327233723472357236723772387239724072417242724372447245724672477248724972507251725272537254725572567257725872597260726172627263726472657266726772687269727072717272727372747275727672777278727972807281728272837284728572867287728872897290729172927293729472957296729772987299730073017302730373047305730673077308730973107311731273137314731573167317731873197320732173227323732473257326732773287329733073317332733373347335733673377338733973407341734273437344734573467347734873497350735173527353735473557356735773587359736073617362736373647365736673677368736973707371737273737374737573767377737873797380738173827383738473857386738773887389739073917392739373947395739673977398739974007401740274037404740574067407740874097410741174127413741474157416741774187419742074217422742374247425742674277428742974307431743274337434743574367437743874397440744174427443744474457446744774487449745074517452745374547455745674577458745974607461746274637464746574667467746874697470747174727473747474757476747774787479748074817482748374847485748674877488748974907491749274937494749574967497749874997500750175027503750475057506750775087509751075117512751375147515751675177518751975207521752275237524752575267527752875297530753175327533753475357536753775387539754075417542754375447545754675477548754975507551755275537554755575567557755875597560756175627563756475657566756775687569757075717572757375747575757675777578757975807581758275837584758575867587758875897590759175927593759475957596759775987599760076017602760376047605760676077608760976107611761276137614761576167617761876197620762176227623762476257626762776287629763076317632763376347635763676377638763976407641764276437644764576467647764876497650765176527653765476557656765776587659766076617662766376647665766676677668766976707671767276737674767576767677767876797680768176827683768476857686768776887689769076917692769376947695769676977698769977007701770277037704770577067707770877097710771177127713771477157716771777187719772077217722772377247725772677277728772977307731773277337734773577367737773877397740774177427743774477457746774777487749775077517752775377547755775677577758775977607761776277637764776577667767776877697770777177727773777477757776777777787779778077817782778377847785778677877788778977907791779277937794779577967797779877997800780178027803780478057806780778087809781078117812781378147815781678177818781978207821782278237824782578267827782878297830783178327833783478357836783778387839784078417842784378447845784678477848784978507851785278537854785578567857785878597860786178627863786478657866786778687869787078717872787378747875787678777878787978807881788278837884788578867887788878897890789178927893789478957896789778987899790079017902790379047905790679077908790979107911791279137914791579167917791879197920792179227923792479257926792779287929793079317932793379347935793679377938793979407941794279437944794579467947794879497950795179527953795479557956795779587959796079617962796379647965796679677968796979707971797279737974797579767977797879797980798179827983798479857986798779887989799079917992799379947995799679977998799980008001800280038004800580068007800880098010801180128013801480158016801780188019802080218022802380248025802680278028802980308031803280338034803580368037803880398040804180428043804480458046804780488049805080518052805380548055805680578058805980608061806280638064806580668067806880698070807180728073807480758076807780788079808080818082808380848085808680878088808980908091809280938094809580968097809880998100810181028103810481058106810781088109811081118112811381148115811681178118811981208121812281238124812581268127812881298130813181328133813481358136813781388139814081418142814381448145814681478148814981508151815281538154815581568157815881598160816181628163816481658166816781688169817081718172817381748175817681778178817981808181818281838184818581868187818881898190819181928193819481958196819781988199820082018202820382048205820682078208820982108211821282138214821582168217821882198220822182228223822482258226822782288229823082318232823382348235823682378238823982408241824282438244824582468247824882498250825182528253825482558256825782588259826082618262826382648265826682678268826982708271827282738274827582768277827882798280828182828283828482858286828782888289829082918292829382948295829682978298829983008301830283038304830583068307830883098310831183128313831483158316831783188319832083218322832383248325832683278328832983308331833283338334833583368337833883398340834183428343834483458346834783488349835083518352835383548355835683578358835983608361836283638364836583668367836883698370837183728373837483758376837783788379838083818382838383848385838683878388838983908391839283938394839583968397839883998400840184028403840484058406840784088409841084118412841384148415841684178418841984208421842284238424842584268427842884298430843184328433843484358436843784388439844084418442844384448445844684478448844984508451845284538454845584568457845884598460846184628463846484658466846784688469847084718472847384748475847684778478847984808481848284838484848584868487848884898490849184928493849484958496849784988499850085018502850385048505850685078508850985108511851285138514851585168517851885198520852185228523852485258526852785288529853085318532853385348535853685378538853985408541854285438544854585468547854885498550855185528553855485558556855785588559856085618562856385648565856685678568856985708571857285738574857585768577857885798580858185828583858485858586858785888589859085918592859385948595859685978598859986008601860286038604860586068607860886098610861186128613861486158616861786188619862086218622862386248625862686278628862986308631863286338634863586368637863886398640864186428643864486458646864786488649865086518652865386548655865686578658865986608661866286638664866586668667866886698670867186728673867486758676867786788679868086818682868386848685868686878688868986908691869286938694869586968697869886998700870187028703870487058706870787088709871087118712871387148715871687178718871987208721872287238724872587268727872887298730873187328733873487358736873787388739874087418742874387448745874687478748874987508751875287538754875587568757875887598760876187628763876487658766876787688769877087718772877387748775877687778778877987808781878287838784878587868787878887898790879187928793879487958796879787988799880088018802880388048805880688078808880988108811881288138814881588168817881888198820882188228823882488258826882788288829883088318832883388348835883688378838883988408841884288438844884588468847884888498850885188528853885488558856885788588859886088618862886388648865886688678868886988708871887288738874887588768877887888798880888188828883888488858886888788888889889088918892889388948895889688978898889989008901890289038904890589068907890889098910891189128913891489158916891789188919892089218922892389248925892689278928892989308931893289338934893589368937893889398940894189428943894489458946894789488949895089518952895389548955895689578958895989608961896289638964896589668967896889698970897189728973897489758976897789788979898089818982898389848985898689878988898989908991899289938994899589968997899889999000900190029003900490059006900790089009901090119012901390149015901690179018901990209021902290239024902590269027902890299030903190329033903490359036903790389039904090419042904390449045904690479048904990509051905290539054905590569057905890599060906190629063906490659066906790689069907090719072907390749075907690779078907990809081908290839084908590869087908890899090909190929093909490959096909790989099910091019102910391049105910691079108910991109111911291139114911591169117911891199120912191229123912491259126912791289129913091319132913391349135913691379138913991409141914291439144914591469147914891499150915191529153915491559156915791589159916091619162916391649165916691679168916991709171917291739174917591769177917891799180918191829183918491859186918791889189919091919192919391949195919691979198919992009201920292039204920592069207920892099210921192129213921492159216921792189219922092219222922392249225922692279228922992309231923292339234923592369237923892399240924192429243924492459246924792489249925092519252925392549255925692579258925992609261926292639264926592669267926892699270927192729273927492759276927792789279928092819282928392849285928692879288928992909291929292939294929592969297929892999300930193029303930493059306930793089309931093119312931393149315931693179318931993209321932293239324932593269327932893299330933193329333933493359336933793389339934093419342934393449345934693479348934993509351935293539354935593569357935893599360936193629363936493659366936793689369937093719372937393749375937693779378937993809381938293839384938593869387938893899390939193929393939493959396939793989399940094019402940394049405940694079408940994109411941294139414941594169417941894199420942194229423942494259426942794289429943094319432943394349435943694379438943994409441944294439444944594469447944894499450945194529453945494559456945794589459946094619462946394649465946694679468946994709471947294739474947594769477947894799480948194829483948494859486948794889489949094919492949394949495949694979498949995009501950295039504950595069507950895099510951195129513951495159516951795189519952095219522952395249525952695279528952995309531953295339534953595369537953895399540954195429543954495459546954795489549955095519552955395549555955695579558955995609561956295639564956595669567956895699570957195729573957495759576957795789579958095819582958395849585958695879588958995909591959295939594959595969597959895999600960196029603960496059606960796089609961096119612961396149615961696179618961996209621962296239624962596269627962896299630963196329633963496359636963796389639964096419642964396449645964696479648964996509651965296539654965596569657965896599660966196629663966496659666966796689669967096719672967396749675967696779678967996809681968296839684968596869687968896899690969196929693969496959696969796989699970097019702970397049705970697079708970997109711971297139714971597169717971897199720972197229723972497259726972797289729973097319732973397349735973697379738973997409741974297439744974597469747974897499750975197529753975497559756975797589759976097619762976397649765976697679768976997709771977297739774977597769777977897799780978197829783978497859786978797889789979097919792979397949795979697979798979998009801980298039804980598069807980898099810981198129813981498159816981798189819982098219822982398249825982698279828982998309831983298339834983598369837983898399840984198429843984498459846984798489849985098519852985398549855985698579858985998609861986298639864986598669867986898699870987198729873987498759876987798789879988098819882988398849885988698879888988998909891989298939894989598969897989898999900990199029903990499059906990799089909991099119912991399149915991699179918991999209921992299239924992599269927992899299930993199329933993499359936993799389939994099419942994399449945994699479948994999509951995299539954995599569957995899599960996199629963996499659966996799689969997099719972997399749975997699779978997999809981998299839984998599869987998899899990999199929993999499959996999799989999100001000110002100031000410005100061000710008100091001010011100121001310014100151001610017100181001910020100211002210023100241002510026100271002810029100301003110032100331003410035100361003710038100391004010041100421004310044100451004610047100481004910050100511005210053100541005510056100571005810059100601006110062100631006410065100661006710068100691007010071100721007310074100751007610077100781007910080100811008210083100841008510086100871008810089100901009110092100931009410095100961009710098100991010010101101021010310104101051010610107101081010910110101111011210113101141011510116101171011810119101201012110122101231012410125101261012710128101291013010131101321013310134101351013610137101381013910140101411014210143101441014510146101471014810149101501015110152101531015410155101561015710158101591016010161101621016310164101651016610167101681016910170101711017210173101741017510176101771017810179101801018110182101831018410185101861018710188101891019010191101921019310194101951019610197101981019910200102011020210203102041020510206102071020810209102101021110212102131021410215102161021710218102191022010221102221022310224102251022610227102281022910230102311023210233102341023510236102371023810239102401024110242102431024410245102461024710248102491025010251102521025310254102551025610257102581025910260102611026210263102641026510266102671026810269102701027110272102731027410275102761027710278102791028010281102821028310284102851028610287102881028910290102911029210293102941029510296102971029810299103001030110302103031030410305103061030710308103091031010311103121031310314103151031610317103181031910320103211032210323103241032510326103271032810329103301033110332103331033410335103361033710338103391034010341103421034310344103451034610347103481034910350103511035210353103541035510356103571035810359103601036110362103631036410365103661036710368103691037010371103721037310374103751037610377103781037910380103811038210383103841038510386103871038810389103901039110392103931039410395103961039710398103991040010401104021040310404104051040610407104081040910410104111041210413104141041510416104171041810419104201042110422104231042410425104261042710428104291043010431104321043310434104351043610437104381043910440104411044210443104441044510446104471044810449104501045110452104531045410455104561045710458104591046010461104621046310464104651046610467104681046910470104711047210473104741047510476104771047810479104801048110482104831048410485104861048710488104891049010491104921049310494104951049610497104981049910500105011050210503105041050510506105071050810509105101051110512105131051410515105161051710518105191052010521105221052310524105251052610527105281052910530105311053210533105341053510536105371053810539105401054110542105431054410545105461054710548105491055010551105521055310554105551055610557105581055910560105611056210563105641056510566105671056810569105701057110572105731057410575105761057710578105791058010581105821058310584105851058610587105881058910590105911059210593105941059510596105971059810599106001060110602106031060410605106061060710608106091061010611106121061310614106151061610617106181061910620106211062210623106241062510626106271062810629106301063110632106331063410635106361063710638106391064010641106421064310644106451064610647106481064910650106511065210653106541065510656106571065810659106601066110662106631066410665106661066710668106691067010671106721067310674106751067610677106781067910680106811068210683106841068510686106871068810689106901069110692106931069410695106961069710698106991070010701107021070310704107051070610707107081070910710107111071210713107141071510716107171071810719107201072110722107231072410725107261072710728107291073010731107321073310734107351073610737107381073910740107411074210743107441074510746107471074810749107501075110752107531075410755107561075710758107591076010761107621076310764107651076610767107681076910770107711077210773107741077510776107771077810779107801078110782107831078410785107861078710788107891079010791107921079310794107951079610797107981079910800108011080210803108041080510806108071080810809108101081110812108131081410815108161081710818108191082010821108221082310824108251082610827108281082910830108311083210833108341083510836108371083810839108401084110842108431084410845108461084710848108491085010851108521085310854108551085610857108581085910860108611086210863108641086510866108671086810869108701087110872108731087410875108761087710878108791088010881108821088310884108851088610887108881088910890108911089210893108941089510896108971089810899109001090110902109031090410905109061090710908109091091010911109121091310914109151091610917109181091910920109211092210923109241092510926109271092810929109301093110932109331093410935109361093710938109391094010941109421094310944109451094610947109481094910950109511095210953109541095510956109571095810959109601096110962109631096410965109661096710968109691097010971109721097310974109751097610977109781097910980109811098210983109841098510986109871098810989109901099110992109931099410995109961099710998109991100011001110021100311004110051100611007110081100911010110111101211013110141101511016110171101811019110201102111022110231102411025110261102711028110291103011031110321103311034110351103611037110381103911040110411104211043110441104511046110471104811049110501105111052110531105411055110561105711058110591106011061110621106311064110651106611067110681106911070110711107211073110741107511076110771107811079110801108111082110831108411085110861108711088110891109011091110921109311094110951109611097110981109911100111011110211103111041110511106111071110811109111101111111112111131111411115111161111711118111191112011121111221112311124111251112611127111281112911130111311113211133111341113511136111371113811139111401114111142111431114411145111461114711148111491115011151111521115311154111551115611157111581115911160111611116211163111641116511166111671116811169111701117111172111731117411175111761117711178111791118011181111821118311184111851118611187111881118911190111911119211193111941119511196111971119811199112001120111202112031120411205112061120711208112091121011211112121121311214112151121611217112181121911220112211122211223112241122511226112271122811229112301123111232112331123411235112361123711238112391124011241112421124311244112451124611247112481124911250112511125211253112541125511256112571125811259112601126111262112631126411265112661126711268112691127011271112721127311274112751127611277112781127911280112811128211283112841128511286112871128811289112901129111292112931129411295112961129711298112991130011301113021130311304113051130611307113081130911310113111131211313113141131511316113171131811319113201132111322113231132411325113261132711328113291133011331113321133311334113351133611337113381133911340113411134211343113441134511346113471134811349113501135111352113531135411355113561135711358113591136011361113621136311364113651136611367113681136911370113711137211373113741137511376113771137811379113801138111382113831138411385113861138711388113891139011391113921139311394113951139611397113981139911400114011140211403114041140511406114071140811409114101141111412114131141411415114161141711418114191142011421114221142311424114251142611427114281142911430114311143211433114341143511436114371143811439114401144111442114431144411445114461144711448114491145011451114521145311454114551145611457114581145911460114611146211463114641146511466114671146811469114701147111472114731147411475114761147711478114791148011481114821148311484114851148611487114881148911490114911149211493114941149511496114971149811499115001150111502115031150411505115061150711508115091151011511115121151311514115151151611517115181151911520115211152211523115241152511526115271152811529115301153111532115331153411535115361153711538115391154011541115421154311544115451154611547115481154911550115511155211553115541155511556115571155811559115601156111562115631156411565115661156711568115691157011571115721157311574115751157611577115781157911580115811158211583115841158511586115871158811589115901159111592115931159411595115961159711598115991160011601116021160311604116051160611607116081160911610116111161211613116141161511616116171161811619116201162111622116231162411625116261162711628116291163011631116321163311634116351163611637116381163911640116411164211643116441164511646116471164811649116501165111652116531165411655116561165711658116591166011661116621166311664116651166611667116681166911670116711167211673116741167511676116771167811679116801168111682116831168411685116861168711688116891169011691116921169311694116951169611697116981169911700117011170211703117041170511706117071170811709117101171111712117131171411715117161171711718117191172011721117221172311724117251172611727117281172911730117311173211733117341173511736117371173811739117401174111742117431174411745117461174711748117491175011751117521175311754117551175611757117581175911760117611176211763117641176511766117671176811769117701177111772117731177411775117761177711778117791178011781117821178311784117851178611787117881178911790117911179211793117941179511796117971179811799118001180111802118031180411805118061180711808118091181011811118121181311814118151181611817118181181911820118211182211823118241182511826118271182811829118301183111832118331183411835118361183711838118391184011841118421184311844118451184611847118481184911850118511185211853118541185511856118571185811859118601186111862118631186411865118661186711868118691187011871118721187311874118751187611877118781187911880118811188211883118841188511886118871188811889118901189111892118931189411895118961189711898118991190011901119021190311904119051190611907119081190911910119111191211913119141191511916119171191811919119201192111922119231192411925119261192711928119291193011931119321193311934119351193611937119381193911940119411194211943119441194511946119471194811949119501195111952119531195411955119561195711958119591196011961119621196311964119651196611967119681196911970119711197211973119741197511976119771197811979119801198111982119831198411985119861198711988119891199011991119921199311994119951199611997119981199912000120011200212003120041200512006120071200812009120101201112012120131201412015120161201712018120191202012021120221202312024120251202612027120281202912030120311203212033120341203512036120371203812039120401204112042120431204412045120461204712048120491205012051120521205312054120551205612057120581205912060120611206212063120641206512066120671206812069120701207112072120731207412075120761207712078120791208012081120821208312084120851208612087120881208912090120911209212093120941209512096120971209812099121001210112102121031210412105121061210712108121091211012111121121211312114121151211612117121181211912120121211212212123121241212512126121271212812129121301213112132121331213412135121361213712138121391214012141121421214312144121451214612147121481214912150121511215212153121541215512156121571215812159121601216112162121631216412165121661216712168121691217012171121721217312174121751217612177121781217912180121811218212183121841218512186121871218812189121901219112192121931219412195121961219712198121991220012201122021220312204122051220612207122081220912210122111221212213122141221512216122171221812219122201222112222122231222412225122261222712228122291223012231122321223312234122351223612237122381223912240122411224212243122441224512246122471224812249122501225112252122531225412255122561225712258122591226012261122621226312264122651226612267122681226912270122711227212273122741227512276122771227812279122801228112282122831228412285122861228712288122891229012291122921229312294122951229612297122981229912300123011230212303123041230512306123071230812309123101231112312123131231412315123161231712318123191232012321123221232312324123251232612327123281232912330123311233212333123341233512336123371233812339123401234112342123431234412345123461234712348123491235012351123521235312354123551235612357123581235912360123611236212363123641236512366123671236812369123701237112372123731237412375123761237712378123791238012381123821238312384123851238612387123881238912390123911239212393123941239512396123971239812399124001240112402124031240412405124061240712408124091241012411124121241312414124151241612417124181241912420124211242212423124241242512426124271242812429124301243112432124331243412435124361243712438124391244012441124421244312444124451244612447124481244912450124511245212453124541245512456124571245812459124601246112462124631246412465124661246712468124691247012471124721247312474124751247612477124781247912480124811248212483124841248512486124871248812489124901249112492124931249412495124961249712498124991250012501125021250312504125051250612507125081250912510125111251212513125141251512516125171251812519125201252112522125231252412525125261252712528125291253012531125321253312534125351253612537125381253912540125411254212543125441254512546125471254812549125501255112552125531255412555125561255712558125591256012561125621256312564125651256612567125681256912570125711257212573125741257512576125771257812579125801258112582125831258412585125861258712588125891259012591125921259312594125951259612597125981259912600126011260212603126041260512606126071260812609126101261112612126131261412615126161261712618126191262012621126221262312624126251262612627126281262912630126311263212633126341263512636126371263812639126401264112642126431264412645126461264712648126491265012651126521265312654126551265612657126581265912660126611266212663126641266512666126671266812669126701267112672126731267412675126761267712678126791268012681126821268312684126851268612687126881268912690126911269212693126941269512696126971269812699127001270112702127031270412705127061270712708127091271012711127121271312714127151271612717127181271912720127211272212723127241272512726127271272812729127301273112732127331273412735127361273712738127391274012741127421274312744127451274612747127481274912750127511275212753127541275512756127571275812759127601276112762127631276412765127661276712768127691277012771127721277312774127751277612777127781277912780127811278212783127841278512786127871278812789127901279112792127931279412795127961279712798127991280012801128021280312804128051280612807128081280912810128111281212813128141281512816128171281812819128201282112822128231282412825128261282712828128291283012831128321283312834128351283612837128381283912840128411284212843128441284512846128471284812849128501285112852128531285412855128561285712858128591286012861128621286312864128651286612867128681286912870128711287212873128741287512876128771287812879128801288112882128831288412885128861288712888128891289012891128921289312894128951289612897128981289912900129011290212903129041290512906129071290812909129101291112912129131291412915129161291712918129191292012921129221292312924129251292612927129281292912930129311293212933129341293512936129371293812939129401294112942129431294412945129461294712948129491295012951129521295312954129551295612957129581295912960129611296212963129641296512966129671296812969129701297112972129731297412975129761297712978129791298012981129821298312984129851298612987129881298912990129911299212993129941299512996129971299812999130001300113002130031300413005130061300713008130091301013011130121301313014130151301613017130181301913020130211302213023130241302513026130271302813029130301303113032130331303413035130361303713038130391304013041130421304313044130451304613047130481304913050130511305213053130541305513056130571305813059130601306113062130631306413065130661306713068130691307013071130721307313074130751307613077130781307913080130811308213083130841308513086130871308813089130901309113092130931309413095130961309713098130991310013101131021310313104131051310613107131081310913110131111311213113131141311513116131171311813119131201312113122131231312413125131261312713128131291313013131131321313313134131351313613137131381313913140131411314213143131441314513146131471314813149131501315113152131531315413155131561315713158131591316013161131621316313164131651316613167131681316913170131711317213173131741317513176131771317813179131801318113182131831318413185131861318713188131891319013191131921319313194131951319613197131981319913200132011320213203132041320513206132071320813209132101321113212132131321413215132161321713218132191322013221132221322313224132251322613227132281322913230132311323213233132341323513236132371323813239132401324113242132431324413245132461324713248132491325013251132521325313254132551325613257132581325913260132611326213263132641326513266132671326813269132701327113272132731327413275132761327713278132791328013281132821328313284132851328613287132881328913290132911329213293132941329513296132971329813299133001330113302133031330413305133061330713308133091331013311133121331313314133151331613317133181331913320133211332213323133241332513326133271332813329133301333113332133331333413335133361333713338133391334013341133421334313344133451334613347133481334913350133511335213353133541335513356133571335813359133601336113362133631336413365133661336713368133691337013371133721337313374133751337613377133781337913380133811338213383133841338513386133871338813389133901339113392133931339413395133961339713398133991340013401134021340313404134051340613407134081340913410134111341213413134141341513416134171341813419134201342113422134231342413425134261342713428134291343013431134321343313434134351343613437134381343913440134411344213443134441344513446134471344813449134501345113452134531345413455134561345713458134591346013461134621346313464134651346613467134681346913470134711347213473134741347513476134771347813479134801348113482134831348413485134861348713488134891349013491134921349313494134951349613497134981349913500135011350213503135041350513506135071350813509135101351113512135131351413515135161351713518135191352013521135221352313524135251352613527135281352913530135311353213533135341353513536135371353813539135401354113542135431354413545135461354713548135491355013551135521355313554135551355613557135581355913560135611356213563135641356513566135671356813569135701357113572135731357413575135761357713578135791358013581135821358313584135851358613587135881358913590135911359213593135941359513596135971359813599136001360113602136031360413605136061360713608136091361013611136121361313614136151361613617136181361913620136211362213623136241362513626136271362813629136301363113632136331363413635136361363713638136391364013641136421364313644136451364613647136481364913650136511365213653136541365513656136571365813659136601366113662136631366413665136661366713668136691367013671136721367313674136751367613677136781367913680136811368213683136841368513686136871368813689136901369113692136931369413695136961369713698136991370013701137021370313704137051370613707137081370913710137111371213713137141371513716137171371813719137201372113722137231372413725137261372713728137291373013731137321373313734137351373613737137381373913740137411374213743137441374513746137471374813749137501375113752137531375413755137561375713758137591376013761137621376313764137651376613767137681376913770137711377213773137741377513776137771377813779137801378113782137831378413785137861378713788137891379013791137921379313794137951379613797137981379913800138011380213803138041380513806138071380813809138101381113812138131381413815138161381713818138191382013821138221382313824138251382613827138281382913830138311383213833138341383513836138371383813839138401384113842138431384413845138461384713848138491385013851138521385313854138551385613857138581385913860138611386213863138641386513866138671386813869138701387113872138731387413875138761387713878138791388013881138821388313884138851388613887138881388913890138911389213893138941389513896138971389813899139001390113902139031390413905139061390713908139091391013911139121391313914139151391613917139181391913920139211392213923139241392513926139271392813929139301393113932139331393413935139361393713938139391394013941139421394313944139451394613947139481394913950139511395213953139541395513956139571395813959139601396113962139631396413965139661396713968139691397013971139721397313974139751397613977139781397913980139811398213983139841398513986139871398813989139901399113992139931399413995139961399713998139991400014001140021400314004140051400614007140081400914010140111401214013140141401514016140171401814019140201402114022140231402414025140261402714028140291403014031140321403314034140351403614037140381403914040140411404214043140441404514046140471404814049140501405114052140531405414055140561405714058140591406014061140621406314064140651406614067140681406914070140711407214073140741407514076140771407814079140801408114082140831408414085140861408714088140891409014091140921409314094140951409614097140981409914100141011410214103141041410514106141071410814109141101411114112141131411414115141161411714118141191412014121141221412314124141251412614127141281412914130141311413214133141341413514136141371413814139141401414114142141431414414145141461414714148141491415014151141521415314154141551415614157141581415914160141611416214163141641416514166141671416814169141701417114172141731417414175141761417714178141791418014181141821418314184141851418614187141881418914190141911419214193141941419514196141971419814199142001420114202142031420414205142061420714208142091421014211142121421314214142151421614217142181421914220142211422214223142241422514226142271422814229142301423114232142331423414235142361423714238142391424014241142421424314244142451424614247142481424914250142511425214253142541425514256142571425814259142601426114262142631426414265142661426714268142691427014271142721427314274142751427614277142781427914280142811428214283142841428514286142871428814289142901429114292142931429414295142961429714298142991430014301143021430314304143051430614307143081430914310143111431214313143141431514316143171431814319143201432114322143231432414325143261432714328143291433014331143321433314334143351433614337143381433914340143411434214343143441434514346143471434814349143501435114352143531435414355143561435714358143591436014361143621436314364143651436614367143681436914370143711437214373143741437514376143771437814379143801438114382143831438414385143861438714388143891439014391143921439314394143951439614397143981439914400144011440214403144041440514406144071440814409144101441114412144131441414415144161441714418144191442014421144221442314424144251442614427144281442914430144311443214433144341443514436144371443814439144401444114442144431444414445144461444714448144491445014451144521445314454144551445614457144581445914460144611446214463144641446514466144671446814469144701447114472144731447414475144761447714478144791448014481144821448314484144851448614487144881448914490144911449214493144941449514496144971449814499145001450114502145031450414505145061450714508145091451014511145121451314514145151451614517145181451914520145211452214523145241452514526145271452814529145301453114532145331453414535145361453714538145391454014541145421454314544145451454614547145481454914550145511455214553145541455514556145571455814559145601456114562145631456414565145661456714568145691457014571145721457314574145751457614577145781457914580145811458214583145841458514586145871458814589145901459114592145931459414595145961459714598145991460014601146021460314604146051460614607146081460914610146111461214613146141461514616146171461814619146201462114622146231462414625146261462714628146291463014631146321463314634146351463614637146381463914640146411464214643146441464514646146471464814649146501465114652146531465414655146561465714658146591466014661146621466314664146651466614667146681466914670146711467214673146741467514676146771467814679146801468114682146831468414685146861468714688146891469014691146921469314694146951469614697146981469914700147011470214703147041470514706147071470814709147101471114712147131471414715147161471714718147191472014721147221472314724147251472614727147281472914730147311473214733147341473514736147371473814739147401474114742147431474414745147461474714748147491475014751147521475314754147551475614757147581475914760147611476214763147641476514766147671476814769147701477114772147731477414775147761477714778147791478014781147821478314784147851478614787147881478914790147911479214793147941479514796147971479814799148001480114802148031480414805148061480714808148091481014811148121481314814148151481614817148181481914820148211482214823148241482514826148271482814829148301483114832148331483414835148361483714838148391484014841148421484314844148451484614847148481484914850148511485214853148541485514856148571485814859148601486114862148631486414865148661486714868148691487014871148721487314874148751487614877148781487914880148811488214883148841488514886148871488814889148901489114892148931489414895148961489714898148991490014901149021490314904149051490614907149081490914910149111491214913149141491514916149171491814919149201492114922149231492414925149261492714928149291493014931149321493314934149351493614937149381493914940149411494214943149441494514946149471494814949149501495114952149531495414955149561495714958149591496014961149621496314964149651496614967149681496914970149711497214973149741497514976149771497814979149801498114982149831498414985149861498714988149891499014991149921499314994149951499614997149981499915000150011500215003150041500515006150071500815009150101501115012150131501415015150161501715018150191502015021150221502315024150251502615027150281502915030150311503215033150341503515036150371503815039150401504115042150431504415045150461504715048150491505015051150521505315054150551505615057150581505915060150611506215063150641506515066150671506815069150701507115072150731507415075150761507715078150791508015081150821508315084150851508615087150881508915090150911509215093150941509515096150971509815099151001510115102151031510415105151061510715108151091511015111151121511315114151151511615117151181511915120151211512215123151241512515126151271512815129151301513115132151331513415135151361513715138151391514015141151421514315144151451514615147151481514915150151511515215153151541515515156151571515815159151601516115162151631516415165151661516715168151691517015171151721517315174151751517615177151781517915180151811518215183151841518515186151871518815189151901519115192151931519415195151961519715198151991520015201152021520315204152051520615207152081520915210152111521215213152141521515216152171521815219152201522115222152231522415225152261522715228152291523015231152321523315234152351523615237152381523915240152411524215243152441524515246152471524815249152501525115252152531525415255152561525715258152591526015261152621526315264152651526615267152681526915270152711527215273152741527515276152771527815279152801528115282152831528415285152861528715288152891529015291152921529315294152951529615297152981529915300153011530215303153041530515306153071530815309153101531115312153131531415315153161531715318153191532015321153221532315324153251532615327153281532915330153311533215333153341533515336153371533815339153401534115342153431534415345153461534715348153491535015351153521535315354153551535615357153581535915360153611536215363153641536515366153671536815369153701537115372153731537415375153761537715378153791538015381153821538315384153851538615387153881538915390153911539215393153941539515396153971539815399154001540115402154031540415405154061540715408154091541015411154121541315414154151541615417154181541915420154211542215423154241542515426154271542815429154301543115432154331543415435154361543715438154391544015441154421544315444154451544615447154481544915450154511545215453154541545515456154571545815459154601546115462154631546415465154661546715468154691547015471154721547315474154751547615477154781547915480154811548215483154841548515486154871548815489154901549115492154931549415495154961549715498154991550015501155021550315504155051550615507155081550915510155111551215513155141551515516155171551815519155201552115522155231552415525155261552715528155291553015531155321553315534155351553615537155381553915540155411554215543155441554515546155471554815549155501555115552155531555415555155561555715558155591556015561155621556315564155651556615567155681556915570155711557215573155741557515576155771557815579155801558115582155831558415585155861558715588155891559015591155921559315594155951559615597155981559915600156011560215603156041560515606156071560815609156101561115612156131561415615156161561715618156191562015621156221562315624156251562615627156281562915630156311563215633156341563515636156371563815639156401564115642156431564415645156461564715648156491565015651156521565315654156551565615657156581565915660156611566215663156641566515666156671566815669156701567115672156731567415675156761567715678156791568015681156821568315684156851568615687156881568915690156911569215693156941569515696156971569815699157001570115702157031570415705157061570715708157091571015711157121571315714157151571615717157181571915720157211572215723157241572515726157271572815729157301573115732157331573415735157361573715738157391574015741157421574315744157451574615747157481574915750157511575215753157541575515756157571575815759157601576115762157631576415765157661576715768157691577015771157721577315774157751577615777157781577915780157811578215783157841578515786157871578815789157901579115792157931579415795157961579715798157991580015801158021580315804158051580615807158081580915810158111581215813158141581515816158171581815819158201582115822158231582415825158261582715828158291583015831158321583315834158351583615837158381583915840158411584215843158441584515846158471584815849158501585115852158531585415855158561585715858158591586015861158621586315864158651586615867158681586915870158711587215873158741587515876158771587815879158801588115882158831588415885158861588715888158891589015891158921589315894158951589615897158981589915900159011590215903159041590515906159071590815909159101591115912159131591415915159161591715918159191592015921159221592315924159251592615927159281592915930159311593215933159341593515936159371593815939159401594115942159431594415945159461594715948159491595015951159521595315954159551595615957159581595915960159611596215963159641596515966159671596815969159701597115972159731597415975159761597715978159791598015981159821598315984159851598615987159881598915990159911599215993159941599515996159971599815999160001600116002160031600416005160061600716008160091601016011160121601316014160151601616017160181601916020160211602216023160241602516026160271602816029160301603116032160331603416035160361603716038160391604016041160421604316044160451604616047160481604916050160511605216053160541605516056160571605816059160601606116062160631606416065160661606716068160691607016071160721607316074160751607616077160781607916080160811608216083160841608516086160871608816089160901609116092160931609416095160961609716098160991610016101161021610316104161051610616107161081610916110161111611216113161141611516116161171611816119161201612116122161231612416125161261612716128161291613016131161321613316134161351613616137161381613916140161411614216143161441614516146161471614816149161501615116152161531615416155161561615716158161591616016161161621616316164161651616616167161681616916170161711617216173161741617516176161771617816179161801618116182161831618416185161861618716188161891619016191161921619316194161951619616197161981619916200162011620216203162041620516206162071620816209162101621116212162131621416215162161621716218162191622016221162221622316224162251622616227162281622916230162311623216233162341623516236162371623816239162401624116242162431624416245162461624716248162491625016251162521625316254162551625616257162581625916260162611626216263162641626516266162671626816269162701627116272162731627416275162761627716278162791628016281162821628316284162851628616287162881628916290162911629216293162941629516296162971629816299163001630116302163031630416305163061630716308163091631016311163121631316314163151631616317163181631916320163211632216323163241632516326163271632816329163301633116332163331633416335163361633716338163391634016341163421634316344163451634616347163481634916350163511635216353163541635516356163571635816359163601636116362163631636416365163661636716368163691637016371163721637316374163751637616377163781637916380163811638216383163841638516386163871638816389163901639116392163931639416395163961639716398163991640016401164021640316404164051640616407164081640916410164111641216413164141641516416164171641816419164201642116422164231642416425164261642716428164291643016431164321643316434164351643616437164381643916440164411644216443164441644516446164471644816449164501645116452164531645416455164561645716458164591646016461164621646316464164651646616467164681646916470164711647216473164741647516476164771647816479164801648116482164831648416485164861648716488164891649016491164921649316494164951649616497164981649916500165011650216503165041650516506165071650816509165101651116512165131651416515165161651716518165191652016521165221652316524165251652616527165281652916530165311653216533165341653516536165371653816539165401654116542165431654416545165461654716548165491655016551165521655316554165551655616557165581655916560165611656216563165641656516566165671656816569165701657116572165731657416575165761657716578165791658016581165821658316584165851658616587165881658916590165911659216593165941659516596165971659816599166001660116602166031660416605166061660716608166091661016611166121661316614166151661616617166181661916620166211662216623166241662516626166271662816629166301663116632166331663416635166361663716638166391664016641166421664316644166451664616647166481664916650166511665216653166541665516656166571665816659166601666116662166631666416665166661666716668166691667016671166721667316674166751667616677166781667916680166811668216683166841668516686166871668816689166901669116692166931669416695166961669716698166991670016701167021670316704167051670616707167081670916710167111671216713167141671516716167171671816719167201672116722167231672416725167261672716728167291673016731167321673316734167351673616737167381673916740167411674216743167441674516746167471674816749167501675116752167531675416755167561675716758167591676016761167621676316764167651676616767167681676916770167711677216773167741677516776167771677816779167801678116782167831678416785167861678716788167891679016791167921679316794167951679616797167981679916800168011680216803168041680516806168071680816809168101681116812168131681416815168161681716818168191682016821168221682316824168251682616827168281682916830168311683216833168341683516836168371683816839168401684116842168431684416845168461684716848168491685016851168521685316854168551685616857168581685916860168611686216863168641686516866168671686816869168701687116872168731687416875168761687716878168791688016881168821688316884168851688616887168881688916890168911689216893168941689516896168971689816899169001690116902169031690416905169061690716908169091691016911169121691316914169151691616917169181691916920169211692216923169241692516926169271692816929169301693116932169331693416935169361693716938169391694016941169421694316944169451694616947169481694916950169511695216953169541695516956169571695816959169601696116962169631696416965169661696716968169691697016971169721697316974169751697616977169781697916980169811698216983169841698516986169871698816989169901699116992169931699416995169961699716998169991700017001170021700317004170051700617007170081700917010170111701217013170141701517016170171701817019170201702117022170231702417025170261702717028170291703017031170321703317034170351703617037170381703917040170411704217043170441704517046170471704817049170501705117052170531705417055170561705717058170591706017061170621706317064170651706617067170681706917070170711707217073170741707517076170771707817079170801708117082170831708417085170861708717088170891709017091170921709317094170951709617097170981709917100171011710217103171041710517106171071710817109171101711117112171131711417115171161711717118171191712017121171221712317124171251712617127171281712917130171311713217133171341713517136171371713817139171401714117142171431714417145171461714717148171491715017151171521715317154171551715617157171581715917160171611716217163171641716517166171671716817169171701717117172171731717417175171761717717178171791718017181171821718317184171851718617187171881718917190171911719217193171941719517196
  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>setSpaceQuota -storageType: directory with quota by storage type</description>
  7218. <test-commands>
  7219. <command>-fs NAMENODE -mkdir /ttt</command>
  7220. <dfs-admin-command>-fs NAMENODE -setSpaceQuota 1m -storageType DISK /ttt </dfs-admin-command>
  7221. <command>-fs NAMENODE -count -q -t DISK /ttt</command>
  7222. </test-commands>
  7223. <cleanup-commands>
  7224. <command>-fs NAMENODE -rm -r /ttt</command>
  7225. </cleanup-commands>
  7226. <comparators>
  7227. <comparator>
  7228. <type>RegexpComparator</type>
  7229. <expected-output>( |\t)*1048576( |\t)*1048576 /ttt</expected-output>
  7230. </comparator>
  7231. </comparators>
  7232. </test>
  7233. <test> <!-- TESTED -->
  7234. <description>clrSpaceQuota -storageType: directory quota by storage type</description>
  7235. <test-commands>
  7236. <command>-fs NAMENODE -mkdir /ttt</command>
  7237. <dfs-admin-command>-fs NAMENODE -setSpaceQuota 1m -storageType DISK /ttt </dfs-admin-command>
  7238. <command>-fs NAMENODE -count -q -t DISK /ttt</command>
  7239. <dfs-admin-command>-fs NAMENODE -clrSpaceQuota -storageType DISK /ttt </dfs-admin-command>
  7240. <command>-fs NAMENODE -count -q -t DISK /ttt</command>
  7241. </test-commands>
  7242. <cleanup-commands>
  7243. <command>-fs NAMENODE -rm -r /ttt</command>
  7244. </cleanup-commands>
  7245. <comparators>
  7246. <comparator>
  7247. <type>RegexpComparator</type>
  7248. <expected-output>( |\t)*none( |\t)*inf /ttt</expected-output>
  7249. </comparator>
  7250. </comparators>
  7251. </test>
  7252. <test> <!-- TESTED -->
  7253. <description>count: directory using relative path with -q option</description>
  7254. <test-commands>
  7255. <command>-fs NAMENODE -mkdir -p dir1</command>
  7256. <dfs-admin-command>-fs NAMENODE -setQuota 10 dir1 </dfs-admin-command>
  7257. <dfs-admin-command>-fs NAMENODE -setSpaceQuota 1m dir1 </dfs-admin-command>
  7258. <command>-fs NAMENODE -count -q dir1</command>
  7259. </test-commands>
  7260. <cleanup-commands>
  7261. <command>-fs NAMENODE -rm -r dir1</command>
  7262. </cleanup-commands>
  7263. <comparators>
  7264. <comparator>
  7265. <type>RegexpComparator</type>
  7266. <expected-output>( |\t)*10( |\t)*9( |\t)*1048576( |\t)*1048576( |\t)*1( |\t)*0( |\t)*0 dir1</expected-output>
  7267. </comparator>
  7268. </comparators>
  7269. </test>
  7270. <test> <!-- TESTED -->
  7271. <description>count: absolute path to file/directory that does not exist with -q option</description>
  7272. <test-commands>
  7273. <command>-fs NAMENODE -count -q /file1 </command>
  7274. </test-commands>
  7275. <cleanup-commands>
  7276. </cleanup-commands>
  7277. <comparators>
  7278. <comparator>
  7279. <type>TokenComparator</type>
  7280. <expected-output>count: `/file1': No such file or directory</expected-output>
  7281. </comparator>
  7282. </comparators>
  7283. </test>
  7284. <test> <!-- TESTED -->
  7285. <description>count: relative path to file/directory that does not exist with -q option</description>
  7286. <test-commands>
  7287. <command>-fs NAMENODE -count -q file1</command>
  7288. </test-commands>
  7289. <cleanup-commands>
  7290. </cleanup-commands>
  7291. <comparators>
  7292. <comparator>
  7293. <type>TokenComparator</type>
  7294. <expected-output>count: `file1': No such file or directory</expected-output>
  7295. </comparator>
  7296. </comparators>
  7297. </test>
  7298. <test> <!-- TESTED -->
  7299. <description>count: absolute path to multiple files using globbing with -q option</description>
  7300. <test-commands>
  7301. <command>-fs NAMENODE -touchz /file1</command>
  7302. <command>-fs NAMENODE -touchz /file2</command>
  7303. <command>-fs NAMENODE -touchz /file3</command>
  7304. <command>-fs NAMENODE -touchz /file4</command>
  7305. <command>-fs NAMENODE -count -q /file*</command>
  7306. </test-commands>
  7307. <cleanup-commands>
  7308. <command>-fs NAMENODE -rm -r /file*</command>
  7309. </cleanup-commands>
  7310. <comparators>
  7311. <comparator>
  7312. <type>RegexpComparator</type>
  7313. <expected-output>( |\t)*none( |\t)*inf( |\t)*none( |\t)*inf( |\t)*0( |\t)*1( |\t)*0 /file1</expected-output>
  7314. </comparator>
  7315. <comparator>
  7316. <type>RegexpComparator</type>
  7317. <expected-output>( |\t)*none( |\t)*inf( |\t)*none( |\t)*inf( |\t)*0( |\t)*1( |\t)*0 /file2</expected-output>
  7318. </comparator>
  7319. <comparator>
  7320. <type>RegexpComparator</type>
  7321. <expected-output>( |\t)*none( |\t)*inf( |\t)*none( |\t)*inf( |\t)*0( |\t)*1( |\t)*0 /file3</expected-output>
  7322. </comparator>
  7323. <comparator>
  7324. <type>RegexpComparator</type>
  7325. <expected-output>( |\t)*none( |\t)*inf( |\t)*none( |\t)*inf( |\t)*0( |\t)*1( |\t)*0 /file4</expected-output>
  7326. </comparator>
  7327. </comparators>
  7328. </test>
  7329. <test> <!-- TESTED -->
  7330. <description>count: relative path to multiple files using globbing with -q option</description>
  7331. <test-commands>
  7332. <command>-fs NAMENODE -touchz file1</command>
  7333. <command>-fs NAMENODE -touchz file2</command>
  7334. <command>-fs NAMENODE -touchz file3</command>
  7335. <command>-fs NAMENODE -touchz file4</command>
  7336. <command>-fs NAMENODE -count -q file*</command>
  7337. </test-commands>
  7338. <cleanup-commands>
  7339. <command>-fs NAMENODE -rm -r /user</command>
  7340. </cleanup-commands>
  7341. <comparators>
  7342. <comparator>
  7343. <type>RegexpComparator</type>
  7344. <expected-output>( |\t)*none( |\t)*inf( |\t)*none( |\t)*inf( |\t)*0( |\t)*1( |\t)*0 file1</expected-output>
  7345. </comparator>
  7346. <comparator>
  7347. <type>RegexpComparator</type>
  7348. <expected-output>( |\t)*none( |\t)*inf( |\t)*none( |\t)*inf( |\t)*0( |\t)*1( |\t)*0 file2</expected-output>
  7349. </comparator>
  7350. <comparator>
  7351. <type>RegexpComparator</type>
  7352. <expected-output>( |\t)*none( |\t)*inf( |\t)*none( |\t)*inf( |\t)*0( |\t)*1( |\t)*0 file3</expected-output>
  7353. </comparator>
  7354. <comparator>
  7355. <type>RegexpComparator</type>
  7356. <expected-output>( |\t)*none( |\t)*inf( |\t)*none( |\t)*inf( |\t)*0( |\t)*1( |\t)*0 file4</expected-output>
  7357. </comparator>
  7358. </comparators>
  7359. </test>
  7360. <test> <!-- TESTED -->
  7361. <description>count: absolute path to multiple files without globbing with -q option</description>
  7362. <test-commands>
  7363. <command>-fs NAMENODE -touchz /file1</command>
  7364. <command>-fs NAMENODE -touchz /file2</command>
  7365. <command>-fs NAMENODE -touchz /file3</command>
  7366. <command>-fs NAMENODE -touchz /file4</command>
  7367. <command>-fs NAMENODE -count -q /file1 /file2 /file3 /file4</command>
  7368. </test-commands>
  7369. <cleanup-commands>
  7370. <command>-fs NAMENODE -rm -r /file*</command>
  7371. </cleanup-commands>
  7372. <comparators>
  7373. <comparator>
  7374. <type>RegexpComparator</type>
  7375. <expected-output>( |\t)*none( |\t)*inf( |\t)*none( |\t)*inf( |\t)*0( |\t)*1( |\t)*0 /file1</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 /file2</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 /file3</expected-output>
  7384. </comparator>
  7385. <comparator>
  7386. <type>RegexpComparator</type>
  7387. <expected-output>( |\t)*none( |\t)*inf( |\t)*none( |\t)*inf( |\t)*0( |\t)*1( |\t)*0 /file4</expected-output>
  7388. </comparator>
  7389. </comparators>
  7390. </test>
  7391. <test> <!-- TESTED -->
  7392. <description>count: relative path to multiple files without globbing with -q option</description>
  7393. <test-commands>
  7394. <command>-fs NAMENODE -mkdir -p dir</command> <!-- make sure user home dir exists -->
  7395. <command>-fs NAMENODE -touchz file1</command>
  7396. <command>-fs NAMENODE -touchz file2</command>
  7397. <command>-fs NAMENODE -touchz file3</command>
  7398. <command>-fs NAMENODE -touchz file4</command>
  7399. <command>-fs NAMENODE -count -q file1 file2 file3 file4</command>
  7400. </test-commands>
  7401. <cleanup-commands>
  7402. <command>-fs NAMENODE -rm -r /user</command>
  7403. </cleanup-commands>
  7404. <comparators>
  7405. <comparator>
  7406. <type>RegexpComparator</type>
  7407. <expected-output>( |\t)*none( |\t)*inf( |\t)*none( |\t)*inf( |\t)*0( |\t)*1( |\t)*0 file1</expected-output>
  7408. </comparator>
  7409. <comparator>
  7410. <type>RegexpComparator</type>
  7411. <expected-output>( |\t)*none( |\t)*inf( |\t)*none( |\t)*inf( |\t)*0( |\t)*1( |\t)*0 file2</expected-output>
  7412. </comparator>
  7413. <comparator>
  7414. <type>RegexpComparator</type>
  7415. <expected-output>( |\t)*none( |\t)*inf( |\t)*none( |\t)*inf( |\t)*0( |\t)*1( |\t)*0 file3</expected-output>
  7416. </comparator>
  7417. <comparator>
  7418. <type>RegexpComparator</type>
  7419. <expected-output>( |\t)*none( |\t)*inf( |\t)*none( |\t)*inf( |\t)*0( |\t)*1( |\t)*0 file4</expected-output>
  7420. </comparator>
  7421. </comparators>
  7422. </test>
  7423. <test> <!-- TESTED -->
  7424. <description>count: absolute path to multiple directories using globbing with -q option</description>
  7425. <test-commands>
  7426. <command>-fs NAMENODE -mkdir /dir1</command>
  7427. <command>-fs NAMENODE -mkdir /dir2</command>
  7428. <command>-fs NAMENODE -mkdir /dir3</command>
  7429. <command>-fs NAMENODE -mkdir /dir4</command>
  7430. <dfs-admin-command>-fs NAMENODE -setQuota 10 /dir1 </dfs-admin-command>
  7431. <dfs-admin-command>-fs NAMENODE -setSpaceQuota 1m /dir1 </dfs-admin-command>
  7432. <dfs-admin-command>-fs NAMENODE -setQuota 10 /dir2 </dfs-admin-command>
  7433. <dfs-admin-command>-fs NAMENODE -setSpaceQuota 1m /dir2 </dfs-admin-command>
  7434. <dfs-admin-command>-fs NAMENODE -setQuota 10 /dir3 </dfs-admin-command>
  7435. <dfs-admin-command>-fs NAMENODE -setSpaceQuota 1m /dir3 </dfs-admin-command>
  7436. <dfs-admin-command>-fs NAMENODE -setQuota 10 /dir4 </dfs-admin-command>
  7437. <dfs-admin-command>-fs NAMENODE -setSpaceQuota 1m /dir4 </dfs-admin-command>
  7438. <command>-fs NAMENODE -count -q /dir* </command>
  7439. </test-commands>
  7440. <cleanup-commands>
  7441. <command>-fs NAMENODE -rm -r /dir*</command>
  7442. </cleanup-commands>
  7443. <comparators>
  7444. <comparator>
  7445. <type>RegexpComparator</type>
  7446. <expected-output>( |\t)*10( |\t)*9( |\t)*1048576( |\t)*1048576( |\t)*1( |\t)*0( |\t)*0 /dir1</expected-output>
  7447. </comparator>
  7448. <comparator>
  7449. <type>RegexpComparator</type>
  7450. <expected-output>( |\t)*10( |\t)*9( |\t)*1048576( |\t)*1048576( |\t)*1( |\t)*0( |\t)*0 /dir2</expected-output>
  7451. </comparator>
  7452. <comparator>
  7453. <type>RegexpComparator</type>
  7454. <expected-output>( |\t)*10( |\t)*9( |\t)*1048576( |\t)*1048576( |\t)*1( |\t)*0( |\t)*0 /dir3</expected-output>
  7455. </comparator>
  7456. <comparator>
  7457. <type>RegexpComparator</type>
  7458. <expected-output>( |\t)*10( |\t)*9( |\t)*1048576( |\t)*1048576( |\t)*1( |\t)*0( |\t)*0 /dir4</expected-output>
  7459. </comparator>
  7460. </comparators>
  7461. </test>
  7462. <test> <!-- TESTED -->
  7463. <description>count: relative path to multiple directories using globbing with -q option</description>
  7464. <test-commands>
  7465. <command>-fs NAMENODE -mkdir -p dir1</command>
  7466. <command>-fs NAMENODE -mkdir -p dir2</command>
  7467. <command>-fs NAMENODE -mkdir -p dir3</command>
  7468. <command>-fs NAMENODE -mkdir -p dir4</command>
  7469. <dfs-admin-command>-fs NAMENODE -setQuota 10 dir1 </dfs-admin-command>
  7470. <dfs-admin-command>-fs NAMENODE -setSpaceQuota 1m dir1 </dfs-admin-command>
  7471. <dfs-admin-command>-fs NAMENODE -setQuota 10 dir2 </dfs-admin-command>
  7472. <dfs-admin-command>-fs NAMENODE -setSpaceQuota 1m dir2 </dfs-admin-command>
  7473. <dfs-admin-command>-fs NAMENODE -setQuota 10 dir3 </dfs-admin-command>
  7474. <dfs-admin-command>-fs NAMENODE -setSpaceQuota 1m dir3 </dfs-admin-command>
  7475. <dfs-admin-command>-fs NAMENODE -setQuota 10 dir4 </dfs-admin-command>
  7476. <dfs-admin-command>-fs NAMENODE -setSpaceQuota 1m dir4 </dfs-admin-command>
  7477. <command>-fs NAMENODE -count -q dir* </command>
  7478. </test-commands>
  7479. <cleanup-commands>
  7480. <command>-fs NAMENODE -rm -r /user</command>
  7481. </cleanup-commands>
  7482. <comparators>
  7483. <comparator>
  7484. <type>RegexpComparator</type>
  7485. <expected-output>( |\t)*10( |\t)*9( |\t)*1048576( |\t)*1048576( |\t)*1( |\t)*0( |\t)*0 dir1</expected-output>
  7486. </comparator>
  7487. <comparator>
  7488. <type>RegexpComparator</type>
  7489. <expected-output>( |\t)*10( |\t)*9( |\t)*1048576( |\t)*1048576( |\t)*1( |\t)*0( |\t)*0 dir2</expected-output>
  7490. </comparator>
  7491. <comparator>
  7492. <type>RegexpComparator</type>
  7493. <expected-output>( |\t)*10( |\t)*9( |\t)*1048576( |\t)*1048576( |\t)*1( |\t)*0( |\t)*0 dir3</expected-output>
  7494. </comparator>
  7495. <comparator>
  7496. <type>RegexpComparator</type>
  7497. <expected-output>( |\t)*10( |\t)*9( |\t)*1048576( |\t)*1048576( |\t)*1( |\t)*0( |\t)*0 dir4</expected-output>
  7498. </comparator>
  7499. </comparators>
  7500. </test>
  7501. <test> <!-- TESTED -->
  7502. <description>count: absolute path to multiple directories without globbing with -q option</description>
  7503. <test-commands>
  7504. <command>-fs NAMENODE -mkdir /dir1</command>
  7505. <command>-fs NAMENODE -mkdir /dir2</command>
  7506. <command>-fs NAMENODE -mkdir /dir3</command>
  7507. <command>-fs NAMENODE -mkdir /dir4</command>
  7508. <dfs-admin-command>-fs NAMENODE -setQuota 10 /dir1 </dfs-admin-command>
  7509. <dfs-admin-command>-fs NAMENODE -setSpaceQuota 1m /dir1 </dfs-admin-command>
  7510. <dfs-admin-command>-fs NAMENODE -setQuota 10 /dir2 </dfs-admin-command>
  7511. <dfs-admin-command>-fs NAMENODE -setSpaceQuota 1m /dir2 </dfs-admin-command>
  7512. <dfs-admin-command>-fs NAMENODE -setQuota 10 /dir3 </dfs-admin-command>
  7513. <dfs-admin-command>-fs NAMENODE -setSpaceQuota 1m /dir3 </dfs-admin-command>
  7514. <dfs-admin-command>-fs NAMENODE -setQuota 10 /dir4 </dfs-admin-command>
  7515. <dfs-admin-command>-fs NAMENODE -setSpaceQuota 1m /dir4 </dfs-admin-command>
  7516. <command>-fs NAMENODE -count -q /dir1 /dir2 /dir3 /dir4 </command>
  7517. </test-commands>
  7518. <cleanup-commands>
  7519. <command>-fs NAMENODE -rm -r /dir*</command>
  7520. </cleanup-commands>
  7521. <comparators>
  7522. <comparator>
  7523. <type>RegexpComparator</type>
  7524. <expected-output>( |\t)*10( |\t)*9( |\t)*1048576( |\t)*1048576( |\t)*1( |\t)*0( |\t)*0 /dir1</expected-output>
  7525. </comparator>
  7526. <comparator>
  7527. <type>RegexpComparator</type>
  7528. <expected-output>( |\t)*10( |\t)*9( |\t)*1048576( |\t)*1048576( |\t)*1( |\t)*0( |\t)*0 /dir2</expected-output>
  7529. </comparator>
  7530. <comparator>
  7531. <type>RegexpComparator</type>
  7532. <expected-output>( |\t)*10( |\t)*9( |\t)*1048576( |\t)*1048576( |\t)*1( |\t)*0( |\t)*0 /dir3</expected-output>
  7533. </comparator>
  7534. <comparator>
  7535. <type>RegexpComparator</type>
  7536. <expected-output>( |\t)*10( |\t)*9( |\t)*1048576( |\t)*1048576( |\t)*1( |\t)*0( |\t)*0 /dir4</expected-output>
  7537. </comparator>
  7538. </comparators>
  7539. </test>
  7540. <test> <!-- TESTED -->
  7541. <description>count: relative path to multiple directories without globbing with -q option</description>
  7542. <test-commands>
  7543. <command>-fs NAMENODE -mkdir -p dir1</command>
  7544. <command>-fs NAMENODE -mkdir -p dir2</command>
  7545. <command>-fs NAMENODE -mkdir -p dir3</command>
  7546. <command>-fs NAMENODE -mkdir -p dir4</command>
  7547. <dfs-admin-command>-fs NAMENODE -setQuota 10 dir1 </dfs-admin-command>
  7548. <dfs-admin-command>-fs NAMENODE -setSpaceQuota 1m dir1 </dfs-admin-command>
  7549. <dfs-admin-command>-fs NAMENODE -setQuota 10 dir2 </dfs-admin-command>
  7550. <dfs-admin-command>-fs NAMENODE -setSpaceQuota 1m dir2 </dfs-admin-command>
  7551. <dfs-admin-command>-fs NAMENODE -setQuota 10 dir3 </dfs-admin-command>
  7552. <dfs-admin-command>-fs NAMENODE -setSpaceQuota 1m dir3 </dfs-admin-command>
  7553. <dfs-admin-command>-fs NAMENODE -setQuota 10 dir4 </dfs-admin-command>
  7554. <dfs-admin-command>-fs NAMENODE -setSpaceQuota 1m dir4 </dfs-admin-command>
  7555. <command>-fs NAMENODE -count -q dir1 dir2 dir3 dir4 </command>
  7556. </test-commands>
  7557. <cleanup-commands>
  7558. <command>-fs NAMENODE -rm -r /user</command>
  7559. </cleanup-commands>
  7560. <comparators>
  7561. <comparator>
  7562. <type>RegexpComparator</type>
  7563. <expected-output>( |\t)*10( |\t)*9( |\t)*1048576( |\t)*1048576( |\t)*1( |\t)*0( |\t)*0 dir1</expected-output>
  7564. </comparator>
  7565. <comparator>
  7566. <type>RegexpComparator</type>
  7567. <expected-output>( |\t)*10( |\t)*9( |\t)*1048576( |\t)*1048576( |\t)*1( |\t)*0( |\t)*0 dir2</expected-output>
  7568. </comparator>
  7569. <comparator>
  7570. <type>RegexpComparator</type>
  7571. <expected-output>( |\t)*10( |\t)*9( |\t)*1048576( |\t)*1048576( |\t)*1( |\t)*0( |\t)*0 dir3</expected-output>
  7572. </comparator>
  7573. <comparator>
  7574. <type>RegexpComparator</type>
  7575. <expected-output>( |\t)*10( |\t)*9( |\t)*1048576( |\t)*1048576( |\t)*1( |\t)*0( |\t)*0 dir4</expected-output>
  7576. </comparator>
  7577. </comparators>
  7578. </test>
  7579. <test> <!-- TESTED -->
  7580. <description>count: Test for file using hdfs:// path</description>
  7581. <test-commands>
  7582. <command>-fs NAMENODE -touchz hdfs:///file1</command>
  7583. <command>-fs NAMENODE -count hdfs:///file1</command>
  7584. </test-commands>
  7585. <cleanup-commands>
  7586. <command>-fs NAMENODE -rm hdfs:///file1</command>
  7587. </cleanup-commands>
  7588. <comparators>
  7589. <comparator>
  7590. <type>RegexpComparator</type>
  7591. <expected-output>( |\t)*0( |\t)*1( |\t)*0 hdfs:///file1</expected-output>
  7592. </comparator>
  7593. </comparators>
  7594. </test>
  7595. <test> <!-- TESTED -->
  7596. <description>count: Test for directory using hdfs:// path</description>
  7597. <test-commands>
  7598. <command>-fs NAMENODE -mkdir hdfs:///dir1</command>
  7599. <command>-fs NAMENODE -count hdfs:///dir1</command>
  7600. </test-commands>
  7601. <cleanup-commands>
  7602. <command>-fs NAMENODE -rm -r hdfs:///dir1</command>
  7603. </cleanup-commands>
  7604. <comparators>
  7605. <comparator>
  7606. <type>RegexpComparator</type>
  7607. <expected-output>( |\t)*1( |\t)*0( |\t)*0 hdfs:///dir1</expected-output>
  7608. </comparator>
  7609. </comparators>
  7610. </test>
  7611. <test> <!-- TESTED -->
  7612. <description>count: Test for hdfs:// path - file/directory that does not exist</description>
  7613. <test-commands>
  7614. <command>-fs NAMENODE -count hdfs:///file1 </command>
  7615. </test-commands>
  7616. <cleanup-commands>
  7617. </cleanup-commands>
  7618. <comparators>
  7619. <comparator>
  7620. <type>TokenComparator</type>
  7621. <expected-output>count: `hdfs:///file1': No such file or directory</expected-output>
  7622. </comparator>
  7623. </comparators>
  7624. </test>
  7625. <test> <!-- TESTED -->
  7626. <description>count: Test for hdfs:// path - multiple files using globbing</description>
  7627. <test-commands>
  7628. <command>-fs NAMENODE -touchz hdfs:///file1</command>
  7629. <command>-fs NAMENODE -touchz hdfs:///file2</command>
  7630. <command>-fs NAMENODE -touchz hdfs:///file3</command>
  7631. <command>-fs NAMENODE -touchz hdfs:///file4</command>
  7632. <command>-fs NAMENODE -count hdfs:///file*</command>
  7633. </test-commands>
  7634. <cleanup-commands>
  7635. <command>-fs NAMENODE -rm -r hdfs:///file*</command>
  7636. </cleanup-commands>
  7637. <comparators>
  7638. <comparator>
  7639. <type>RegexpComparator</type>
  7640. <expected-output>( |\t)*0( |\t)*1( |\t)*0 hdfs:///file1</expected-output>
  7641. </comparator>
  7642. <comparator>
  7643. <type>RegexpComparator</type>
  7644. <expected-output>( |\t)*0( |\t)*1( |\t)*0 hdfs:///file2</expected-output>
  7645. </comparator>
  7646. <comparator>
  7647. <type>RegexpComparator</type>
  7648. <expected-output>( |\t)*0( |\t)*1( |\t)*0 hdfs:///file3</expected-output>
  7649. </comparator>
  7650. <comparator>
  7651. <type>RegexpComparator</type>
  7652. <expected-output>( |\t)*0( |\t)*1( |\t)*0 hdfs:///file4</expected-output>
  7653. </comparator>
  7654. </comparators>
  7655. </test>
  7656. <test> <!-- TESTED -->
  7657. <description>count: Test for hdfs:// path - multiple files without globbing</description>
  7658. <test-commands>
  7659. <command>-fs NAMENODE -touchz hdfs:///file1</command>
  7660. <command>-fs NAMENODE -touchz hdfs:///file2</command>
  7661. <command>-fs NAMENODE -touchz hdfs:///file3</command>
  7662. <command>-fs NAMENODE -touchz hdfs:///file4</command>
  7663. <command>-fs NAMENODE -count hdfs:///file1 hdfs:///file2 hdfs:///file3 hdfs:///file4</command>
  7664. </test-commands>
  7665. <cleanup-commands>
  7666. <command>-fs NAMENODE -rm -r hdfs:///file*</command>
  7667. </cleanup-commands>
  7668. <comparators>
  7669. <comparator>
  7670. <type>RegexpComparator</type>
  7671. <expected-output>( |\t)*0( |\t)*1( |\t)*0 hdfs:///file1</expected-output>
  7672. </comparator>
  7673. <comparator>
  7674. <type>RegexpComparator</type>
  7675. <expected-output>( |\t)*0( |\t)*1( |\t)*0 hdfs:///file2</expected-output>
  7676. </comparator>
  7677. <comparator>
  7678. <type>RegexpComparator</type>
  7679. <expected-output>( |\t)*0( |\t)*1( |\t)*0 hdfs:///file3</expected-output>
  7680. </comparator>
  7681. <comparator>
  7682. <type>RegexpComparator</type>
  7683. <expected-output>( |\t)*0( |\t)*1( |\t)*0 hdfs:///file4</expected-output>
  7684. </comparator>
  7685. </comparators>
  7686. </test>
  7687. <test> <!-- TESTED -->
  7688. <description>count: Test for hdfs:// path - multiple directories using globbing</description>
  7689. <test-commands>
  7690. <command>-fs NAMENODE -mkdir hdfs:///dir1</command>
  7691. <command>-fs NAMENODE -mkdir hdfs:///dir2</command>
  7692. <command>-fs NAMENODE -mkdir hdfs:///dir3</command>
  7693. <command>-fs NAMENODE -mkdir hdfs:///dir4</command>
  7694. <command>-fs NAMENODE -count hdfs:///dir* </command>
  7695. </test-commands>
  7696. <cleanup-commands>
  7697. <command>-fs NAMENODE -rm -r hdfs:///dir*</command>
  7698. </cleanup-commands>
  7699. <comparators>
  7700. <comparator>
  7701. <type>RegexpComparator</type>
  7702. <expected-output>( |\t)*1( |\t)*0( |\t)*0 hdfs:///dir1</expected-output>
  7703. </comparator>
  7704. <comparator>
  7705. <type>RegexpComparator</type>
  7706. <expected-output>( |\t)*1( |\t)*0( |\t)*0 hdfs:///dir2</expected-output>
  7707. </comparator>
  7708. <comparator>
  7709. <type>RegexpComparator</type>
  7710. <expected-output>( |\t)*1( |\t)*0( |\t)*0 hdfs:///dir3</expected-output>
  7711. </comparator>
  7712. <comparator>
  7713. <type>RegexpComparator</type>
  7714. <expected-output>( |\t)*1( |\t)*0( |\t)*0 hdfs:///dir4</expected-output>
  7715. </comparator>
  7716. </comparators>
  7717. </test>
  7718. <test> <!-- TESTED -->
  7719. <description>count: Test for hdfs:// path - multiple directories without globbing</description>
  7720. <test-commands>
  7721. <command>-fs NAMENODE -mkdir hdfs:///dir1</command>
  7722. <command>-fs NAMENODE -mkdir hdfs:///dir2</command>
  7723. <command>-fs NAMENODE -mkdir hdfs:///dir3</command>
  7724. <command>-fs NAMENODE -mkdir hdfs:///dir4</command>
  7725. <command>-fs NAMENODE -count hdfs:///dir1 hdfs:///dir2 hdfs:///dir3 hdfs:///dir4 </command>
  7726. </test-commands>
  7727. <cleanup-commands>
  7728. <command>-fs NAMENODE -rm -r hdfs:///dir*</command>
  7729. </cleanup-commands>
  7730. <comparators>
  7731. <comparator>
  7732. <type>RegexpComparator</type>
  7733. <expected-output>( |\t)*1( |\t)*0( |\t)*0 hdfs:///dir1</expected-output>
  7734. </comparator>
  7735. <comparator>
  7736. <type>RegexpComparator</type>
  7737. <expected-output>( |\t)*1( |\t)*0( |\t)*0 hdfs:///dir2</expected-output>
  7738. </comparator>
  7739. <comparator>
  7740. <type>RegexpComparator</type>
  7741. <expected-output>( |\t)*1( |\t)*0( |\t)*0 hdfs:///dir3</expected-output>
  7742. </comparator>
  7743. <comparator>
  7744. <type>RegexpComparator</type>
  7745. <expected-output>( |\t)*1( |\t)*0( |\t)*0 hdfs:///dir4</expected-output>
  7746. </comparator>
  7747. </comparators>
  7748. </test>
  7749. <test> <!-- TESTED -->
  7750. <description>count: Test for file using hdfs:// path with -q option</description>
  7751. <test-commands>
  7752. <command>-fs NAMENODE -touchz hdfs:///file1</command>
  7753. <command>-fs NAMENODE -count -q hdfs:///file1</command>
  7754. </test-commands>
  7755. <cleanup-commands>
  7756. <command>-fs NAMENODE -rm hdfs:///file1</command>
  7757. </cleanup-commands>
  7758. <comparators>
  7759. <comparator>
  7760. <type>RegexpComparator</type>
  7761. <expected-output>( |\t)*none( |\t)*inf( |\t)*none( |\t)*inf( |\t)*0( |\t)*1( |\t)*0 hdfs:///file1</expected-output>
  7762. </comparator>
  7763. </comparators>
  7764. </test>
  7765. <test> <!-- TESTED -->
  7766. <description>count: Test for directory using hdfs:// path with -q option</description>
  7767. <test-commands>
  7768. <command>-fs NAMENODE -mkdir hdfs:///dir1</command>
  7769. <dfs-admin-command>-fs NAMENODE -setQuota 10 hdfs:///dir1 </dfs-admin-command>
  7770. <dfs-admin-command>-fs NAMENODE -setSpaceQuota 1m hdfs:///dir1 </dfs-admin-command>
  7771. <command>-fs NAMENODE -count -q hdfs:///dir1</command>
  7772. </test-commands>
  7773. <cleanup-commands>
  7774. <command>-fs NAMENODE -rm -r hdfs:///dir1</command>
  7775. </cleanup-commands>
  7776. <comparators>
  7777. <comparator>
  7778. <type>RegexpComparator</type>
  7779. <expected-output>( |\t)*10( |\t)*9( |\t)*1048576( |\t)*1048576( |\t)*1( |\t)*0( |\t)*0 hdfs:///dir1</expected-output>
  7780. </comparator>
  7781. </comparators>
  7782. </test>
  7783. <test> <!-- TESTED -->
  7784. <description>count: Test for hdfs:// path - file/directory that does not exist with -q option</description>
  7785. <test-commands>
  7786. <command>-fs NAMENODE -count -q hdfs:///file1 </command>
  7787. </test-commands>
  7788. <cleanup-commands>
  7789. </cleanup-commands>
  7790. <comparators>
  7791. <comparator>
  7792. <type>TokenComparator</type>
  7793. <expected-output>count: `hdfs:///file1': No such file or directory</expected-output>
  7794. </comparator>
  7795. </comparators>
  7796. </test>
  7797. <test> <!-- TESTED -->
  7798. <description>count: Test for hdfs:// path - multiple files using globbing with -q option</description>
  7799. <test-commands>
  7800. <command>-fs NAMENODE -touchz hdfs:///file1</command>
  7801. <command>-fs NAMENODE -touchz hdfs:///file2</command>
  7802. <command>-fs NAMENODE -touchz hdfs:///file3</command>
  7803. <command>-fs NAMENODE -touchz hdfs:///file4</command>
  7804. <command>-fs NAMENODE -count -q hdfs:///file*</command>
  7805. </test-commands>
  7806. <cleanup-commands>
  7807. <command>-fs NAMENODE -rm -r hdfs:///file*</command>
  7808. </cleanup-commands>
  7809. <comparators>
  7810. <comparator>
  7811. <type>RegexpComparator</type>
  7812. <expected-output>( |\t)*none( |\t)*inf( |\t)*none( |\t)*inf( |\t)*0( |\t)*1( |\t)*0 hdfs:///file1</expected-output>
  7813. </comparator>
  7814. <comparator>
  7815. <type>RegexpComparator</type>
  7816. <expected-output>( |\t)*none( |\t)*inf( |\t)*none( |\t)*inf( |\t)*0( |\t)*1( |\t)*0 hdfs:///file2</expected-output>
  7817. </comparator>
  7818. <comparator>
  7819. <type>RegexpComparator</type>
  7820. <expected-output>( |\t)*none( |\t)*inf( |\t)*none( |\t)*inf( |\t)*0( |\t)*1( |\t)*0 hdfs:///file3</expected-output>
  7821. </comparator>
  7822. <comparator>
  7823. <type>RegexpComparator</type>
  7824. <expected-output>( |\t)*none( |\t)*inf( |\t)*none( |\t)*inf( |\t)*0( |\t)*1( |\t)*0 hdfs:///file4</expected-output>
  7825. </comparator>
  7826. </comparators>
  7827. </test>
  7828. <test> <!-- TESTED -->
  7829. <description>count: Test for hdfs:// path - multiple files without globbing with -q option</description>
  7830. <test-commands>
  7831. <command>-fs NAMENODE -touchz hdfs:///file1</command>
  7832. <command>-fs NAMENODE -touchz hdfs:///file2</command>
  7833. <command>-fs NAMENODE -touchz hdfs:///file3</command>
  7834. <command>-fs NAMENODE -touchz hdfs:///file4</command>
  7835. <command>-fs NAMENODE -count -q hdfs:///file1 hdfs:///file2 hdfs:///file3 hdfs:///file4</command>
  7836. </test-commands>
  7837. <cleanup-commands>
  7838. <command>-fs NAMENODE -rm -r hdfs:///file*</command>
  7839. </cleanup-commands>
  7840. <comparators>
  7841. <comparator>
  7842. <type>RegexpComparator</type>
  7843. <expected-output>( |\t)*none( |\t)*inf( |\t)*none( |\t)*inf( |\t)*0( |\t)*1( |\t)*0 hdfs:///file1</expected-output>
  7844. </comparator>
  7845. <comparator>
  7846. <type>RegexpComparator</type>
  7847. <expected-output>( |\t)*none( |\t)*inf( |\t)*none( |\t)*inf( |\t)*0( |\t)*1( |\t)*0 hdfs:///file2</expected-output>
  7848. </comparator>
  7849. <comparator>
  7850. <type>RegexpComparator</type>
  7851. <expected-output>( |\t)*none( |\t)*inf( |\t)*none( |\t)*inf( |\t)*0( |\t)*1( |\t)*0 hdfs:///file3</expected-output>
  7852. </comparator>
  7853. <comparator>
  7854. <type>RegexpComparator</type>
  7855. <expected-output>( |\t)*none( |\t)*inf( |\t)*none( |\t)*inf( |\t)*0( |\t)*1( |\t)*0 hdfs:///file4</expected-output>
  7856. </comparator>
  7857. </comparators>
  7858. </test>
  7859. <test> <!-- TESTED -->
  7860. <description>count: Test for hdfs:// path - multiple directories using globbing with -q option</description>
  7861. <test-commands>
  7862. <command>-fs NAMENODE -mkdir hdfs:///dir1</command>
  7863. <command>-fs NAMENODE -mkdir hdfs:///dir2</command>
  7864. <command>-fs NAMENODE -mkdir hdfs:///dir3</command>
  7865. <command>-fs NAMENODE -mkdir hdfs:///dir4</command>
  7866. <dfs-admin-command>-fs NAMENODE -setQuota 10 hdfs:///dir1 </dfs-admin-command>
  7867. <dfs-admin-command>-fs NAMENODE -setSpaceQuota 1m hdfs:///dir1 </dfs-admin-command>
  7868. <dfs-admin-command>-fs NAMENODE -setQuota 10 hdfs:///dir2 </dfs-admin-command>
  7869. <dfs-admin-command>-fs NAMENODE -setSpaceQuota 1m hdfs:///dir2 </dfs-admin-command>
  7870. <dfs-admin-command>-fs NAMENODE -setQuota 10 hdfs:///dir3 </dfs-admin-command>
  7871. <dfs-admin-command>-fs NAMENODE -setSpaceQuota 1m hdfs:///dir3 </dfs-admin-command>
  7872. <dfs-admin-command>-fs NAMENODE -setQuota 10 hdfs:///dir4 </dfs-admin-command>
  7873. <dfs-admin-command>-fs NAMENODE -setSpaceQuota 1m hdfs:///dir4 </dfs-admin-command>
  7874. <command>-fs NAMENODE -count -q hdfs:///dir* </command>
  7875. </test-commands>
  7876. <cleanup-commands>
  7877. <command>-fs NAMENODE -rm -r hdfs:///dir*</command>
  7878. </cleanup-commands>
  7879. <comparators>
  7880. <comparator>
  7881. <type>RegexpComparator</type>
  7882. <expected-output>( |\t)*10( |\t)*9( |\t)*1048576( |\t)*1048576( |\t)*1( |\t)*0( |\t)*0 hdfs:///dir1</expected-output>
  7883. </comparator>
  7884. <comparator>
  7885. <type>RegexpComparator</type>
  7886. <expected-output>( |\t)*10( |\t)*9( |\t)*1048576( |\t)*1048576( |\t)*1( |\t)*0( |\t)*0 hdfs:///dir2</expected-output>
  7887. </comparator>
  7888. <comparator>
  7889. <type>RegexpComparator</type>
  7890. <expected-output>( |\t)*10( |\t)*9( |\t)*1048576( |\t)*1048576( |\t)*1( |\t)*0( |\t)*0 hdfs:///dir3</expected-output>
  7891. </comparator>
  7892. <comparator>
  7893. <type>RegexpComparator</type>
  7894. <expected-output>( |\t)*10( |\t)*9( |\t)*1048576( |\t)*1048576( |\t)*1( |\t)*0( |\t)*0 hdfs:///dir4</expected-output>
  7895. </comparator>
  7896. </comparators>
  7897. </test>
  7898. <test> <!-- TESTED -->
  7899. <description>count: Test for hdfs:// path - multiple directories without globbing with -q option</description>
  7900. <test-commands>
  7901. <command>-fs NAMENODE -mkdir hdfs:///dir1</command>
  7902. <command>-fs NAMENODE -mkdir hdfs:///dir2</command>
  7903. <command>-fs NAMENODE -mkdir hdfs:///dir3</command>
  7904. <command>-fs NAMENODE -mkdir hdfs:///dir4</command>
  7905. <dfs-admin-command>-fs NAMENODE -setQuota 10 hdfs:///dir1 </dfs-admin-command>
  7906. <dfs-admin-command>-fs NAMENODE -setSpaceQuota 1m hdfs:///dir1 </dfs-admin-command>
  7907. <dfs-admin-command>-fs NAMENODE -setQuota 10 hdfs:///dir2 </dfs-admin-command>
  7908. <dfs-admin-command>-fs NAMENODE -setSpaceQuota 1m hdfs:///dir2 </dfs-admin-command>
  7909. <dfs-admin-command>-fs NAMENODE -setQuota 10 hdfs:///dir3 </dfs-admin-command>
  7910. <dfs-admin-command>-fs NAMENODE -setSpaceQuota 1m hdfs:///dir3 </dfs-admin-command>
  7911. <dfs-admin-command>-fs NAMENODE -setQuota 10 hdfs:///dir4 </dfs-admin-command>
  7912. <dfs-admin-command>-fs NAMENODE -setSpaceQuota 1m hdfs:///dir4 </dfs-admin-command>
  7913. <command>-fs NAMENODE -count -q hdfs:///dir1 hdfs:///dir2 hdfs:///dir3 hdfs:///dir4 </command>
  7914. </test-commands>
  7915. <cleanup-commands>
  7916. <command>-fs NAMENODE -rm -r /dir*</command>
  7917. </cleanup-commands>
  7918. <comparators>
  7919. <comparator>
  7920. <type>RegexpComparator</type>
  7921. <expected-output>( |\t)*10( |\t)*9( |\t)*1048576( |\t)*1048576( |\t)*1( |\t)*0( |\t)*0 hdfs:///dir1</expected-output>
  7922. </comparator>
  7923. <comparator>
  7924. <type>RegexpComparator</type>
  7925. <expected-output>( |\t)*10( |\t)*9( |\t)*1048576( |\t)*1048576( |\t)*1( |\t)*0( |\t)*0 hdfs:///dir2</expected-output>
  7926. </comparator>
  7927. <comparator>
  7928. <type>RegexpComparator</type>
  7929. <expected-output>( |\t)*10( |\t)*9( |\t)*1048576( |\t)*1048576( |\t)*1( |\t)*0( |\t)*0 hdfs:///dir3</expected-output>
  7930. </comparator>
  7931. <comparator>
  7932. <type>RegexpComparator</type>
  7933. <expected-output>( |\t)*10( |\t)*9( |\t)*1048576( |\t)*1048576( |\t)*1( |\t)*0( |\t)*0 hdfs:///dir4</expected-output>
  7934. </comparator>
  7935. </comparators>
  7936. </test>
  7937. <test> <!-- TESTED -->
  7938. <description>count: Test for file using Namenode's path</description>
  7939. <test-commands>
  7940. <command>-fs NAMENODE -touchz NAMENODE/file1</command>
  7941. <command>-fs NAMENODE -count NAMENODE/file1</command>
  7942. </test-commands>
  7943. <cleanup-commands>
  7944. <command>-fs NAMENODE -rm NAMENODE/file1</command>
  7945. </cleanup-commands>
  7946. <comparators>
  7947. <comparator>
  7948. <type>RegexpComparator</type>
  7949. <expected-output>( |\t)*0( |\t)*1( |\t)*0 NAMENODE/file1</expected-output>
  7950. </comparator>
  7951. </comparators>
  7952. </test>
  7953. <test> <!-- TESTED -->
  7954. <description>count: Test for directory using Namenode's path</description>
  7955. <test-commands>
  7956. <command>-fs NAMENODE -mkdir NAMENODE/dir1</command>
  7957. <command>-fs NAMENODE -count NAMENODE/dir1</command>
  7958. </test-commands>
  7959. <cleanup-commands>
  7960. <command>-fs NAMENODE -rm -r NAMENODE/dir1</command>
  7961. </cleanup-commands>
  7962. <comparators>
  7963. <comparator>
  7964. <type>RegexpComparator</type>
  7965. <expected-output>( |\t)*1( |\t)*0( |\t)*0 NAMENODE/dir1</expected-output>
  7966. </comparator>
  7967. </comparators>
  7968. </test>
  7969. <test> <!-- TESTED -->
  7970. <description>count: Test for Namenode's path - file/directory that does not exist</description>
  7971. <test-commands>
  7972. <command>-fs NAMENODE -count NAMENODE/file1 </command>
  7973. </test-commands>
  7974. <cleanup-commands>
  7975. </cleanup-commands>
  7976. <comparators>
  7977. <comparator>
  7978. <type>RegexpComparator</type>
  7979. <expected-output>count: `NAMENODE/file1': No such file or directory</expected-output>
  7980. </comparator>
  7981. </comparators>
  7982. </test>
  7983. <test> <!-- TESTED -->
  7984. <description>count: Test for Namenode's path - multiple files using globbing</description>
  7985. <test-commands>
  7986. <command>-fs NAMENODE -touchz NAMENODE/file1</command>
  7987. <command>-fs NAMENODE -touchz NAMENODE/file2</command>
  7988. <command>-fs NAMENODE -touchz NAMENODE/file3</command>
  7989. <command>-fs NAMENODE -touchz NAMENODE/file4</command>
  7990. <command>-fs NAMENODE -count NAMENODE/file*</command>
  7991. </test-commands>
  7992. <cleanup-commands>
  7993. <command>-fs NAMENODE -rm -r NAMENODE/file*</command>
  7994. </cleanup-commands>
  7995. <comparators>
  7996. <comparator>
  7997. <type>RegexpComparator</type>
  7998. <expected-output>( |\t)*0( |\t)*1( |\t)*0 NAMENODE/file1</expected-output>
  7999. </comparator>
  8000. <comparator>
  8001. <type>RegexpComparator</type>
  8002. <expected-output>( |\t)*0( |\t)*1( |\t)*0 NAMENODE/file2</expected-output>
  8003. </comparator>
  8004. <comparator>
  8005. <type>RegexpComparator</type>
  8006. <expected-output>( |\t)*0( |\t)*1( |\t)*0 NAMENODE/file3</expected-output>
  8007. </comparator>
  8008. <comparator>
  8009. <type>RegexpComparator</type>
  8010. <expected-output>( |\t)*0( |\t)*1( |\t)*0 NAMENODE/file4</expected-output>
  8011. </comparator>
  8012. </comparators>
  8013. </test>
  8014. <test> <!-- TESTED -->
  8015. <description>count: Test for Namenode's path - multiple files without globbing</description>
  8016. <test-commands>
  8017. <command>-fs NAMENODE -touchz NAMENODE/file1</command>
  8018. <command>-fs NAMENODE -touchz NAMENODE/file2</command>
  8019. <command>-fs NAMENODE -touchz NAMENODE/file3</command>
  8020. <command>-fs NAMENODE -touchz NAMENODE/file4</command>
  8021. <command>-fs NAMENODE -count NAMENODE/file1 NAMENODE/file2 NAMENODE/file3 NAMENODE/file4</command>
  8022. </test-commands>
  8023. <cleanup-commands>
  8024. <command>-fs NAMENODE -rm -r NAMENODE/file*</command>
  8025. </cleanup-commands>
  8026. <comparators>
  8027. <comparator>
  8028. <type>RegexpComparator</type>
  8029. <expected-output>( |\t)*0( |\t)*1( |\t)*0 NAMENODE/file1</expected-output>
  8030. </comparator>
  8031. <comparator>
  8032. <type>RegexpComparator</type>
  8033. <expected-output>( |\t)*0( |\t)*1( |\t)*0 NAMENODE/file2</expected-output>
  8034. </comparator>
  8035. <comparator>
  8036. <type>RegexpComparator</type>
  8037. <expected-output>( |\t)*0( |\t)*1( |\t)*0 NAMENODE/file3</expected-output>
  8038. </comparator>
  8039. <comparator>
  8040. <type>RegexpComparator</type>
  8041. <expected-output>( |\t)*0( |\t)*1( |\t)*0 NAMENODE/file4</expected-output>
  8042. </comparator>
  8043. </comparators>
  8044. </test>
  8045. <test> <!-- TESTED -->
  8046. <description>count: Test for Namenode's path - multiple directories using globbing</description>
  8047. <test-commands>
  8048. <command>-fs NAMENODE -mkdir NAMENODE/dir1</command>
  8049. <command>-fs NAMENODE -mkdir NAMENODE/dir2</command>
  8050. <command>-fs NAMENODE -mkdir NAMENODE/dir3</command>
  8051. <command>-fs NAMENODE -mkdir NAMENODE/dir4</command>
  8052. <command>-fs NAMENODE -count NAMENODE/dir* </command>
  8053. </test-commands>
  8054. <cleanup-commands>
  8055. <command>-fs NAMENODE -rm -r NAMENODE/dir*</command>
  8056. </cleanup-commands>
  8057. <comparators>
  8058. <comparator>
  8059. <type>RegexpComparator</type>
  8060. <expected-output>( |\t)*1( |\t)*0( |\t)*0 NAMENODE/dir1</expected-output>
  8061. </comparator>
  8062. <comparator>
  8063. <type>RegexpComparator</type>
  8064. <expected-output>( |\t)*1( |\t)*0( |\t)*0 NAMENODE/dir2</expected-output>
  8065. </comparator>
  8066. <comparator>
  8067. <type>RegexpComparator</type>
  8068. <expected-output>( |\t)*1( |\t)*0( |\t)*0 NAMENODE/dir3</expected-output>
  8069. </comparator>
  8070. <comparator>
  8071. <type>RegexpComparator</type>
  8072. <expected-output>( |\t)*1( |\t)*0( |\t)*0 NAMENODE/dir4</expected-output>
  8073. </comparator>
  8074. </comparators>
  8075. </test>
  8076. <test> <!-- TESTED -->
  8077. <description>count: Test for Namenode's path - multiple directories without globbing</description>
  8078. <test-commands>
  8079. <command>-fs NAMENODE -mkdir NAMENODE/dir1</command>
  8080. <command>-fs NAMENODE -mkdir NAMENODE/dir2</command>
  8081. <command>-fs NAMENODE -mkdir NAMENODE/dir3</command>
  8082. <command>-fs NAMENODE -mkdir NAMENODE/dir4</command>
  8083. <command>-fs NAMENODE -count NAMENODE/dir1 NAMENODE/dir2 NAMENODE/dir3 NAMENODE/dir4 </command>
  8084. </test-commands>
  8085. <cleanup-commands>
  8086. <command>-fs NAMENODE -rm -r NAMENODE/dir*</command>
  8087. </cleanup-commands>
  8088. <comparators>
  8089. <comparator>
  8090. <type>RegexpComparator</type>
  8091. <expected-output>( |\t)*1( |\t)*0( |\t)*0 NAMENODE/dir1</expected-output>
  8092. </comparator>
  8093. <comparator>
  8094. <type>RegexpComparator</type>
  8095. <expected-output>( |\t)*1( |\t)*0( |\t)*0 NAMENODE/dir2</expected-output>
  8096. </comparator>
  8097. <comparator>
  8098. <type>RegexpComparator</type>
  8099. <expected-output>( |\t)*1( |\t)*0( |\t)*0 NAMENODE/dir3</expected-output>
  8100. </comparator>
  8101. <comparator>
  8102. <type>RegexpComparator</type>
  8103. <expected-output>( |\t)*1( |\t)*0( |\t)*0 NAMENODE/dir4</expected-output>
  8104. </comparator>
  8105. </comparators>
  8106. </test>
  8107. <test> <!-- TESTED -->
  8108. <description>count: Test for file using Namenode's path with -q option</description>
  8109. <test-commands>
  8110. <command>-fs NAMENODE -touchz NAMENODE/file1</command>
  8111. <command>-fs NAMENODE -count -q NAMENODE/file1</command>
  8112. </test-commands>
  8113. <cleanup-commands>
  8114. <command>-fs NAMENODE -rm NAMENODE/file1</command>
  8115. </cleanup-commands>
  8116. <comparators>
  8117. <comparator>
  8118. <type>RegexpComparator</type>
  8119. <expected-output>( |\t)*none( |\t)*inf( |\t)*none( |\t)*inf( |\t)*0( |\t)*1( |\t)*0 NAMENODE/file1</expected-output>
  8120. </comparator>
  8121. </comparators>
  8122. </test>
  8123. <test> <!-- TESTED -->
  8124. <description>count: Test for directory using Namenode's path with -q option</description>
  8125. <test-commands>
  8126. <command>-fs NAMENODE -mkdir NAMENODE/dir1</command>
  8127. <dfs-admin-command>-fs NAMENODE -setQuota 10 NAMENODE/dir1 </dfs-admin-command>
  8128. <dfs-admin-command>-fs NAMENODE -setSpaceQuota 1m NAMENODE/dir1 </dfs-admin-command>
  8129. <command>-fs NAMENODE -count -q NAMENODE/dir1</command>
  8130. </test-commands>
  8131. <cleanup-commands>
  8132. <command>-fs NAMENODE -rm -r NAMENODE/dir1</command>
  8133. </cleanup-commands>
  8134. <comparators>
  8135. <comparator>
  8136. <type>RegexpComparator</type>
  8137. <expected-output>( |\t)*10( |\t)*9( |\t)*1048576( |\t)*1048576( |\t)*1( |\t)*0( |\t)*0 NAMENODE/dir1</expected-output>
  8138. </comparator>
  8139. </comparators>
  8140. </test>
  8141. <test> <!-- TESTED -->
  8142. <description>count: Test for Namenode's path - file/directory that does not exist with -q option</description>
  8143. <test-commands>
  8144. <command>-fs NAMENODE -count -q NAMENODE/file1 </command>
  8145. </test-commands>
  8146. <cleanup-commands>
  8147. </cleanup-commands>
  8148. <comparators>
  8149. <comparator>
  8150. <type>RegexpComparator</type>
  8151. <expected-output>count: `NAMENODE/file1': No such file or directory</expected-output>
  8152. </comparator>
  8153. </comparators>
  8154. </test>
  8155. <test> <!-- TESTED -->
  8156. <description>count: Test for Namenode's path - multiple files using globbing with -q option</description>
  8157. <test-commands>
  8158. <command>-fs NAMENODE -touchz NAMENODE/file1</command>
  8159. <command>-fs NAMENODE -touchz NAMENODE/file2</command>
  8160. <command>-fs NAMENODE -touchz NAMENODE/file3</command>
  8161. <command>-fs NAMENODE -touchz NAMENODE/file4</command>
  8162. <command>-fs NAMENODE -count -q NAMENODE/file*</command>
  8163. </test-commands>
  8164. <cleanup-commands>
  8165. <command>-fs NAMENODE -rm -r NAMENODE/file*</command>
  8166. </cleanup-commands>
  8167. <comparators>
  8168. <comparator>
  8169. <type>RegexpComparator</type>
  8170. <expected-output>( |\t)*none( |\t)*inf( |\t)*none( |\t)*inf( |\t)*0( |\t)*1( |\t)*0 NAMENODE/file1</expected-output>
  8171. </comparator>
  8172. <comparator>
  8173. <type>RegexpComparator</type>
  8174. <expected-output>( |\t)*none( |\t)*inf( |\t)*none( |\t)*inf( |\t)*0( |\t)*1( |\t)*0 NAMENODE/file2</expected-output>
  8175. </comparator>
  8176. <comparator>
  8177. <type>RegexpComparator</type>
  8178. <expected-output>( |\t)*none( |\t)*inf( |\t)*none( |\t)*inf( |\t)*0( |\t)*1( |\t)*0 NAMENODE/file3</expected-output>
  8179. </comparator>
  8180. <comparator>
  8181. <type>RegexpComparator</type>
  8182. <expected-output>( |\t)*none( |\t)*inf( |\t)*none( |\t)*inf( |\t)*0( |\t)*1( |\t)*0 NAMENODE/file4</expected-output>
  8183. </comparator>
  8184. </comparators>
  8185. </test>
  8186. <test> <!-- TESTED -->
  8187. <description>count: Test for Namenode's path - multiple files without globbing with -q option</description>
  8188. <test-commands>
  8189. <command>-fs NAMENODE -touchz NAMENODE/file1</command>
  8190. <command>-fs NAMENODE -touchz NAMENODE/file2</command>
  8191. <command>-fs NAMENODE -touchz NAMENODE/file3</command>
  8192. <command>-fs NAMENODE -touchz NAMENODE/file4</command>
  8193. <command>-fs NAMENODE -count -q NAMENODE/file1 NAMENODE/file2 NAMENODE/file3 NAMENODE/file4</command>
  8194. </test-commands>
  8195. <cleanup-commands>
  8196. <command>-fs NAMENODE -rm -r NAMENODE/file*</command>
  8197. </cleanup-commands>
  8198. <comparators>
  8199. <comparator>
  8200. <type>RegexpComparator</type>
  8201. <expected-output>( |\t)*none( |\t)*inf( |\t)*none( |\t)*inf( |\t)*0( |\t)*1( |\t)*0 NAMENODE/file1</expected-output>
  8202. </comparator>
  8203. <comparator>
  8204. <type>RegexpComparator</type>
  8205. <expected-output>( |\t)*none( |\t)*inf( |\t)*none( |\t)*inf( |\t)*0( |\t)*1( |\t)*0 NAMENODE/file2</expected-output>
  8206. </comparator>
  8207. <comparator>
  8208. <type>RegexpComparator</type>
  8209. <expected-output>( |\t)*none( |\t)*inf( |\t)*none( |\t)*inf( |\t)*0( |\t)*1( |\t)*0 NAMENODE/file3</expected-output>
  8210. </comparator>
  8211. <comparator>
  8212. <type>RegexpComparator</type>
  8213. <expected-output>( |\t)*none( |\t)*inf( |\t)*none( |\t)*inf( |\t)*0( |\t)*1( |\t)*0 NAMENODE/file4</expected-output>
  8214. </comparator>
  8215. </comparators>
  8216. </test>
  8217. <test> <!-- TESTED -->
  8218. <description>count: Test for Namenode's path - multiple directories using globbing with -q option</description>
  8219. <test-commands>
  8220. <command>-fs NAMENODE -mkdir NAMENODE/dir1</command>
  8221. <command>-fs NAMENODE -mkdir NAMENODE/dir2</command>
  8222. <command>-fs NAMENODE -mkdir NAMENODE/dir3</command>
  8223. <command>-fs NAMENODE -mkdir NAMENODE/dir4</command>
  8224. <dfs-admin-command>-fs NAMENODE -setQuota 10 NAMENODE/dir1 </dfs-admin-command>
  8225. <dfs-admin-command>-fs NAMENODE -setSpaceQuota 1m NAMENODE/dir1 </dfs-admin-command>
  8226. <dfs-admin-command>-fs NAMENODE -setQuota 10 NAMENODE/dir2 </dfs-admin-command>
  8227. <dfs-admin-command>-fs NAMENODE -setSpaceQuota 1m NAMENODE/dir2 </dfs-admin-command>
  8228. <dfs-admin-command>-fs NAMENODE -setQuota 10 NAMENODE/dir3 </dfs-admin-command>
  8229. <dfs-admin-command>-fs NAMENODE -setSpaceQuota 1m NAMENODE/dir3 </dfs-admin-command>
  8230. <dfs-admin-command>-fs NAMENODE -setQuota 10 NAMENODE/dir4 </dfs-admin-command>
  8231. <dfs-admin-command>-fs NAMENODE -setSpaceQuota 1m NAMENODE/dir4 </dfs-admin-command>
  8232. <command>-fs NAMENODE -count -q NAMENODE/dir* </command>
  8233. </test-commands>
  8234. <cleanup-commands>
  8235. <command>-fs NAMENODE -rm -r NAMENODE/dir*</command>
  8236. </cleanup-commands>
  8237. <comparators>
  8238. <comparator>
  8239. <type>RegexpComparator</type>
  8240. <expected-output>( |\t)*10( |\t)*9( |\t)*1048576( |\t)*1048576( |\t)*1( |\t)*0( |\t)*0 NAMENODE/dir1</expected-output>
  8241. </comparator>
  8242. <comparator>
  8243. <type>RegexpComparator</type>
  8244. <expected-output>( |\t)*10( |\t)*9( |\t)*1048576( |\t)*1048576( |\t)*1( |\t)*0( |\t)*0 NAMENODE/dir2</expected-output>
  8245. </comparator>
  8246. <comparator>
  8247. <type>RegexpComparator</type>
  8248. <expected-output>( |\t)*10( |\t)*9( |\t)*1048576( |\t)*1048576( |\t)*1( |\t)*0( |\t)*0 NAMENODE/dir3</expected-output>
  8249. </comparator>
  8250. <comparator>
  8251. <type>RegexpComparator</type>
  8252. <expected-output>( |\t)*10( |\t)*9( |\t)*1048576( |\t)*1048576( |\t)*1( |\t)*0( |\t)*0 NAMENODE/dir4</expected-output>
  8253. </comparator>
  8254. </comparators>
  8255. </test>
  8256. <test> <!-- TESTED -->
  8257. <description>count: Test for Namenode's path - multiple directories without globbing with -q option</description>
  8258. <test-commands>
  8259. <command>-fs NAMENODE -mkdir NAMENODE/dir1</command>
  8260. <command>-fs NAMENODE -mkdir NAMENODE/dir2</command>
  8261. <command>-fs NAMENODE -mkdir NAMENODE/dir3</command>
  8262. <command>-fs NAMENODE -mkdir NAMENODE/dir4</command>
  8263. <dfs-admin-command>-fs NAMENODE -setQuota 10 NAMENODE/dir1 </dfs-admin-command>
  8264. <dfs-admin-command>-fs NAMENODE -setSpaceQuota 1m NAMENODE/dir1 </dfs-admin-command>
  8265. <dfs-admin-command>-fs NAMENODE -setQuota 10 NAMENODE/dir2 </dfs-admin-command>
  8266. <dfs-admin-command>-fs NAMENODE -setSpaceQuota 1m NAMENODE/dir2 </dfs-admin-command>
  8267. <dfs-admin-command>-fs NAMENODE -setQuota 10 NAMENODE/dir3 </dfs-admin-command>
  8268. <dfs-admin-command>-fs NAMENODE -setSpaceQuota 1m NAMENODE/dir3 </dfs-admin-command>
  8269. <dfs-admin-command>-fs NAMENODE -setQuota 10 NAMENODE/dir4 </dfs-admin-command>
  8270. <dfs-admin-command>-fs NAMENODE -setSpaceQuota 1m NAMENODE/dir4 </dfs-admin-command>
  8271. <command>-fs NAMENODE -count -q NAMENODE/dir1 NAMENODE/dir2 NAMENODE/dir3 NAMENODE/dir4 </command>
  8272. </test-commands>
  8273. <cleanup-commands>
  8274. <command>-fs NAMENODE -rm -r NAMENODE/dir*</command>
  8275. </cleanup-commands>
  8276. <comparators>
  8277. <comparator>
  8278. <type>RegexpComparator</type>
  8279. <expected-output>( |\t)*10( |\t)*9( |\t)*1048576( |\t)*1048576( |\t)*1( |\t)*0( |\t)*0 NAMENODE/dir1</expected-output>
  8280. </comparator>
  8281. <comparator>
  8282. <type>RegexpComparator</type>
  8283. <expected-output>( |\t)*10( |\t)*9( |\t)*1048576( |\t)*1048576( |\t)*1( |\t)*0( |\t)*0 NAMENODE/dir2</expected-output>
  8284. </comparator>
  8285. <comparator>
  8286. <type>RegexpComparator</type>
  8287. <expected-output>( |\t)*10( |\t)*9( |\t)*1048576( |\t)*1048576( |\t)*1( |\t)*0( |\t)*0 NAMENODE/dir3</expected-output>
  8288. </comparator>
  8289. <comparator>
  8290. <type>RegexpComparator</type>
  8291. <expected-output>( |\t)*10( |\t)*9( |\t)*1048576( |\t)*1048576( |\t)*1( |\t)*0( |\t)*0 NAMENODE/dir4</expected-output>
  8292. </comparator>
  8293. </comparators>
  8294. </test>
  8295. <test> <!-- TESTED -->
  8296. <description>count: file using -h option</description>
  8297. <test-commands>
  8298. <command>-fs NAMENODE -mkdir -p dir</command> <!-- make sure user home dir exists -->
  8299. <command>-fs NAMENODE -put CLITEST_DATA/data15bytes file1</command>
  8300. <command>-fs NAMENODE -put CLITEST_DATA/data1k file2</command>
  8301. <command>-fs NAMENODE -count -h file1 file2</command>
  8302. </test-commands>
  8303. <cleanup-commands>
  8304. <command>-fs NAMENODE -rm file1 file2</command>
  8305. </cleanup-commands>
  8306. <comparators>
  8307. <comparator>
  8308. <type>RegexpComparator</type>
  8309. <expected-output>( |\t)*0( |\t)*1( |\t)*15 file1</expected-output>
  8310. </comparator>
  8311. </comparators>
  8312. <comparators>
  8313. <comparator>
  8314. <type>RegexpComparator</type>
  8315. <expected-output>( |\t)*0( |\t)*1( |\t)*1\.0 K file2</expected-output>
  8316. </comparator>
  8317. </comparators>
  8318. </test>
  8319. <test> <!-- TESTED -->
  8320. <description>count: directory using -q and -h options</description>
  8321. <test-commands>
  8322. <command>-fs NAMENODE -mkdir /dir1</command>
  8323. <dfs-admin-command>-fs NAMENODE -setQuota 10 /dir1 </dfs-admin-command>
  8324. <dfs-admin-command>-fs NAMENODE -setSpaceQuota 1m /dir1 </dfs-admin-command>
  8325. <command>-fs NAMENODE -count -q -h /dir1</command>
  8326. </test-commands>
  8327. <cleanup-commands>
  8328. <command>-fs NAMENODE -rm -r /dir1</command>
  8329. </cleanup-commands>
  8330. <comparators>
  8331. <comparator>
  8332. <type>RegexpComparator</type>
  8333. <expected-output>( |\t)*10( |\t)*9( |\t)*1 M( |\t)*1 M( |\t)*1( |\t)*0( |\t)*0 /dir1</expected-output>
  8334. </comparator>
  8335. </comparators>
  8336. </test>
  8337. <test> <!-- TESTED -->
  8338. <description>count: file using absolute path showing header record</description>
  8339. <test-commands>
  8340. <command>-fs NAMENODE -touchz /file1</command>
  8341. <command>-fs NAMENODE -count -v /file1</command>
  8342. </test-commands>
  8343. <cleanup-commands>
  8344. <command>-fs NAMENODE -rm /file1</command>
  8345. </cleanup-commands>
  8346. <comparators>
  8347. <comparator>
  8348. <type>RegexpComparator</type>
  8349. <expected-output>( |\t)*DIR_COUNT FILE_COUNT CONTENT_SIZE PATHNAME</expected-output>
  8350. </comparator>
  8351. <comparator>
  8352. <type>RegexpComparator</type>
  8353. <expected-output>( |\t)*0( |\t)*1( |\t)*0 /file1</expected-output>
  8354. </comparator>
  8355. </comparators>
  8356. </test>
  8357. <test> <!-- TESTED -->
  8358. <description>count: file using absolute path with -q option and showing header record</description>
  8359. <test-commands>
  8360. <command>-fs NAMENODE -touchz /file1</command>
  8361. <command>-fs NAMENODE -count -q -v /file1</command>
  8362. </test-commands>
  8363. <cleanup-commands>
  8364. <command>-fs NAMENODE -rm /file1</command>
  8365. </cleanup-commands>
  8366. <comparators>
  8367. <comparator>
  8368. <type>RegexpComparator</type>
  8369. <expected-output>( |\t)*QUOTA REM_QUOTA SPACE_QUOTA REM_SPACE_QUOTA DIR_COUNT FILE_COUNT CONTENT_SIZE PATHNAME</expected-output>
  8370. </comparator>
  8371. <comparator>
  8372. <type>RegexpComparator</type>
  8373. <expected-output>( |\t)*none( |\t)*inf( |\t)*none( |\t)*inf( |\t)*0( |\t)*1( |\t)*0 /file1</expected-output>
  8374. </comparator>
  8375. </comparators>
  8376. </test>
  8377. <!-- Tests for chmod -->
  8378. <test> <!-- TESTED -->
  8379. <description>chmod: change permission(octal mode) of file in absolute path</description>
  8380. <test-commands>
  8381. <command>-fs NAMENODE -touchz /file1</command>
  8382. <command>-fs NAMENODE -chmod 777 /file1</command>
  8383. <command>-fs NAMENODE -ls /file1</command>
  8384. </test-commands>
  8385. <cleanup-commands>
  8386. <command>-fs NAMENODE -rm /file1</command>
  8387. </cleanup-commands>
  8388. <comparators>
  8389. <comparator>
  8390. <type>RegexpComparator</type>
  8391. <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>
  8392. </comparator>
  8393. </comparators>
  8394. </test>
  8395. <test> <!-- TESTED -->
  8396. <description>chmod: change permission(octal mode) of file in relative path</description>
  8397. <test-commands>
  8398. <command>-fs NAMENODE -mkdir -p dir</command> <!-- make sure user home dir exists -->
  8399. <command>-fs NAMENODE -touchz file1</command>
  8400. <command>-fs NAMENODE -chmod 666 file1</command>
  8401. <command>-fs NAMENODE -ls file1</command>
  8402. </test-commands>
  8403. <cleanup-commands>
  8404. <command>-fs NAMENODE -rm file1</command>
  8405. </cleanup-commands>
  8406. <comparators>
  8407. <comparator>
  8408. <type>RegexpComparator</type>
  8409. <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>
  8410. </comparator>
  8411. </comparators>
  8412. </test>
  8413. <test> <!-- TESTED -->
  8414. <description>chmod: change permission(octal mode) of directory in absolute path</description>
  8415. <test-commands>
  8416. <command>-fs NAMENODE -mkdir /dir0</command>
  8417. <command>-fs NAMENODE -mkdir /dir0/dir1</command>
  8418. <command>-fs NAMENODE -touchz /dir0/file0</command>
  8419. <command>-fs NAMENODE -touchz /dir0/dir1/file1</command>
  8420. <command>-fs NAMENODE -touchz /dir0/dir1/file2</command>
  8421. <command>-fs NAMENODE -chmod 777 /dir0/dir1</command>
  8422. <command>-fs NAMENODE -ls -R /dir0</command>
  8423. </test-commands>
  8424. <cleanup-commands>
  8425. <command>-fs NAMENODE -rm -r /dir0</command>
  8426. </cleanup-commands>
  8427. <comparators>
  8428. <comparator>
  8429. <type>RegexpComparator</type>
  8430. <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>
  8431. </comparator>
  8432. <comparator>
  8433. <type>RegexpComparator</type>
  8434. <expected-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>
  8435. </comparator>
  8436. <comparator>
  8437. <type>RegexpComparator</type>
  8438. <expected-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>
  8439. </comparator>
  8440. <comparator>
  8441. <type>RegexpComparator</type>
  8442. <expected-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>
  8443. </comparator>
  8444. </comparators>
  8445. </test>
  8446. <test> <!-- TESTED -->
  8447. <description>chmod: change permission(octal mode) of directory in relative path</description>
  8448. <test-commands>
  8449. <command>-fs NAMENODE -mkdir -p dir0</command>
  8450. <command>-fs NAMENODE -mkdir -p dir0/dir1</command>
  8451. <command>-fs NAMENODE -touchz dir0/file0</command>
  8452. <command>-fs NAMENODE -touchz dir0/dir1/file1</command>
  8453. <command>-fs NAMENODE -touchz dir0/dir1/file2</command>
  8454. <command>-fs NAMENODE -chmod 777 dir0/dir1</command>
  8455. <command>-fs NAMENODE -ls -R dir0</command>
  8456. </test-commands>
  8457. <cleanup-commands>
  8458. <command>-fs NAMENODE -rm -r dir0</command>
  8459. </cleanup-commands>
  8460. <comparators>
  8461. <comparator>
  8462. <type>RegexpComparator</type>
  8463. <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>
  8464. </comparator>
  8465. <comparator>
  8466. <type>RegexpComparator</type>
  8467. <expected-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>
  8468. </comparator>
  8469. <comparator>
  8470. <type>RegexpComparator</type>
  8471. <expected-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>
  8472. </comparator>
  8473. <comparator>
  8474. <type>RegexpComparator</type>
  8475. <expected-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>
  8476. </comparator>
  8477. </comparators>
  8478. </test>
  8479. <test> <!-- TESTED -->
  8480. <description>chmod: change permission(normal mode) of file in absolute path</description>
  8481. <test-commands>
  8482. <command>-fs NAMENODE -touchz /file1</command>
  8483. <command>-fs NAMENODE -chmod a+rw /file1</command>
  8484. <command>-fs NAMENODE -ls /file1</command>
  8485. </test-commands>
  8486. <cleanup-commands>
  8487. <command>-fs NAMENODE -rm /file1</command>
  8488. </cleanup-commands>
  8489. <comparators>
  8490. <comparator>
  8491. <type>RegexpComparator</type>
  8492. <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>
  8493. </comparator>
  8494. </comparators>
  8495. </test>
  8496. <test> <!-- TESTED -->
  8497. <description>chmod: change permission(normal mode) of file in relative path</description>
  8498. <test-commands>
  8499. <command>-fs NAMENODE -touchz file1</command>
  8500. <command>-fs NAMENODE -chmod a+rw file1</command>
  8501. <command>-fs NAMENODE -ls file1</command>
  8502. </test-commands>
  8503. <cleanup-commands>
  8504. <command>-fs NAMENODE -rm file1</command>
  8505. </cleanup-commands>
  8506. <comparators>
  8507. <comparator>
  8508. <type>RegexpComparator</type>
  8509. <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>
  8510. </comparator>
  8511. </comparators>
  8512. </test>
  8513. <test> <!-- TESTED -->
  8514. <description>chmod: change permission(normal mode) of directory in absolute path</description>
  8515. <test-commands>
  8516. <command>-fs NAMENODE -mkdir /dir0</command>
  8517. <command>-fs NAMENODE -mkdir /dir0/dir1</command>
  8518. <command>-fs NAMENODE -touchz /dir0/file0</command>
  8519. <command>-fs NAMENODE -touchz /dir0/dir1/file1</command>
  8520. <command>-fs NAMENODE -touchz /dir0/dir1/file2</command>
  8521. <command>-fs NAMENODE -chmod a+rwx /dir0/dir1</command>
  8522. <command>-fs NAMENODE -ls -R /dir0</command>
  8523. </test-commands>
  8524. <cleanup-commands>
  8525. <command>-fs NAMENODE -rm -r /dir0</command>
  8526. </cleanup-commands>
  8527. <comparators>
  8528. <comparator>
  8529. <type>RegexpComparator</type>
  8530. <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>
  8531. </comparator>
  8532. <comparator>
  8533. <type>RegexpComparator</type>
  8534. <expected-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>
  8535. </comparator>
  8536. <comparator>
  8537. <type>RegexpComparator</type>
  8538. <expected-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>
  8539. </comparator>
  8540. <comparator>
  8541. <type>RegexpComparator</type>
  8542. <expected-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>
  8543. </comparator>
  8544. </comparators>
  8545. </test>
  8546. <test> <!-- TESTED -->
  8547. <description>chmod: change permission(normal mode) of directory in relative path</description>
  8548. <test-commands>
  8549. <command>-fs NAMENODE -mkdir -p dir0</command>
  8550. <command>-fs NAMENODE -mkdir -p dir0/dir1</command>
  8551. <command>-fs NAMENODE -touchz dir0/file0</command>
  8552. <command>-fs NAMENODE -touchz dir0/dir1/file1</command>
  8553. <command>-fs NAMENODE -touchz dir0/dir1/file2</command>
  8554. <command>-fs NAMENODE -chmod a+rwx dir0/dir1</command>
  8555. <command>-fs NAMENODE -ls -R dir0</command>
  8556. </test-commands>
  8557. <cleanup-commands>
  8558. <command>-fs NAMENODE -rm -r dir0</command>
  8559. </cleanup-commands>
  8560. <comparators>
  8561. <comparator>
  8562. <type>RegexpComparator</type>
  8563. <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>
  8564. </comparator>
  8565. <comparator>
  8566. <type>RegexpComparator</type>
  8567. <expected-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>
  8568. </comparator>
  8569. <comparator>
  8570. <type>RegexpComparator</type>
  8571. <expected-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>
  8572. </comparator>
  8573. <comparator>
  8574. <type>RegexpComparator</type>
  8575. <expected-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>
  8576. </comparator>
  8577. </comparators>
  8578. </test>
  8579. <test> <!-- TESTED -->
  8580. <description>chmod: change permission(octal mode) of directory in absolute path recursively </description>
  8581. <test-commands>
  8582. <command>-fs NAMENODE -mkdir /dir0</command>
  8583. <command>-fs NAMENODE -mkdir /dir0/dir1</command>
  8584. <command>-fs NAMENODE -touchz /dir0/file0</command>
  8585. <command>-fs NAMENODE -touchz /dir0/dir1/file1</command>
  8586. <command>-fs NAMENODE -touchz /dir0/dir1/file2</command>
  8587. <command>-fs NAMENODE -chmod -R 777 /dir0/dir1</command>
  8588. <command>-fs NAMENODE -ls -R /dir0</command>
  8589. </test-commands>
  8590. <cleanup-commands>
  8591. <command>-fs NAMENODE -rm -r /dir0</command>
  8592. </cleanup-commands>
  8593. <comparators>
  8594. <comparator>
  8595. <type>RegexpComparator</type>
  8596. <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>
  8597. </comparator>
  8598. <comparator>
  8599. <type>RegexpComparator</type>
  8600. <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>
  8601. </comparator>
  8602. <comparator>
  8603. <type>RegexpComparator</type>
  8604. <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>
  8605. </comparator>
  8606. <comparator>
  8607. <type>RegexpComparator</type>
  8608. <expected-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>
  8609. </comparator>
  8610. </comparators>
  8611. </test>
  8612. <test> <!-- TESTED -->
  8613. <description>chmod: change permission(octal mode) of directory in relative path recursively</description>
  8614. <test-commands>
  8615. <command>-fs NAMENODE -mkdir -p dir0</command>
  8616. <command>-fs NAMENODE -mkdir -p dir0/dir1</command>
  8617. <command>-fs NAMENODE -touchz dir0/file0</command>
  8618. <command>-fs NAMENODE -touchz dir0/dir1/file1</command>
  8619. <command>-fs NAMENODE -touchz dir0/dir1/file2</command>
  8620. <command>-fs NAMENODE -chmod -R 777 dir0/dir1</command>
  8621. <command>-fs NAMENODE -ls -R dir0</command>
  8622. </test-commands>
  8623. <cleanup-commands>
  8624. <command>-fs NAMENODE -rm -r dir0</command>
  8625. </cleanup-commands>
  8626. <comparators>
  8627. <comparator>
  8628. <type>RegexpComparator</type>
  8629. <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>
  8630. </comparator>
  8631. <comparator>
  8632. <type>RegexpComparator</type>
  8633. <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>
  8634. </comparator>
  8635. <comparator>
  8636. <type>RegexpComparator</type>
  8637. <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>
  8638. </comparator>
  8639. <comparator>
  8640. <type>RegexpComparator</type>
  8641. <expected-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>
  8642. </comparator>
  8643. </comparators>
  8644. </test>
  8645. <test> <!-- TESTED -->
  8646. <description>chmod: change permission(normal mode) of directory in absolute path recursively</description>
  8647. <test-commands>
  8648. <command>-fs NAMENODE -mkdir /dir0</command>
  8649. <command>-fs NAMENODE -mkdir /dir0/dir1</command>
  8650. <command>-fs NAMENODE -touchz /dir0/file0</command>
  8651. <command>-fs NAMENODE -touchz /dir0/dir1/file1</command>
  8652. <command>-fs NAMENODE -touchz /dir0/dir1/file2</command>
  8653. <command>-fs NAMENODE -chmod -R a+rwx /dir0/dir1</command>
  8654. <command>-fs NAMENODE -ls -R /dir0</command>
  8655. </test-commands>
  8656. <cleanup-commands>
  8657. <command>-fs NAMENODE -rm -r /dir0</command>
  8658. </cleanup-commands>
  8659. <comparators>
  8660. <comparator>
  8661. <type>RegexpComparator</type>
  8662. <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>
  8663. </comparator>
  8664. <comparator>
  8665. <type>RegexpComparator</type>
  8666. <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>
  8667. </comparator>
  8668. <comparator>
  8669. <type>RegexpComparator</type>
  8670. <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>
  8671. </comparator>
  8672. <comparator>
  8673. <type>RegexpComparator</type>
  8674. <expected-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>
  8675. </comparator>
  8676. </comparators>
  8677. </test>
  8678. <test> <!-- TESTED -->
  8679. <description>chmod: change permission(normal mode) of directory in relative path recursively</description>
  8680. <test-commands>
  8681. <command>-fs NAMENODE -mkdir -p dir0</command>
  8682. <command>-fs NAMENODE -mkdir -p dir0/dir1</command>
  8683. <command>-fs NAMENODE -touchz dir0/file0</command>
  8684. <command>-fs NAMENODE -touchz dir0/dir1/file1</command>
  8685. <command>-fs NAMENODE -touchz dir0/dir1/file2</command>
  8686. <command>-fs NAMENODE -chmod -R a+rwx dir0/dir1</command>
  8687. <command>-fs NAMENODE -ls -R dir0</command>
  8688. </test-commands>
  8689. <cleanup-commands>
  8690. <command>-fs NAMENODE -rm -r dir0</command>
  8691. </cleanup-commands>
  8692. <comparators>
  8693. <comparator>
  8694. <type>RegexpComparator</type>
  8695. <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>
  8696. </comparator>
  8697. <comparator>
  8698. <type>RegexpComparator</type>
  8699. <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>
  8700. </comparator>
  8701. <comparator>
  8702. <type>RegexpComparator</type>
  8703. <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>
  8704. </comparator>
  8705. <comparator>
  8706. <type>RegexpComparator</type>
  8707. <expected-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>
  8708. </comparator>
  8709. </comparators>
  8710. </test>
  8711. <test> <!-- TESTED -->
  8712. <description>chmod: change permission(octal mode) of non existent file in absolute path</description>
  8713. <test-commands>
  8714. <command>-fs NAMENODE -chmod 777 /file1</command>
  8715. </test-commands>
  8716. <cleanup-commands>
  8717. <command>-fs NAMENODE -rm /file1</command>
  8718. </cleanup-commands>
  8719. <comparators>
  8720. <comparator>
  8721. <type>RegexpComparator</type>
  8722. <expected-output>^chmod: `/file1': No such file or directory</expected-output>
  8723. </comparator>
  8724. </comparators>
  8725. </test>
  8726. <test> <!-- TESTED -->
  8727. <description>chmod: change permission(octal mode) of non existent file in relative path</description>
  8728. <test-commands>
  8729. <command>-fs NAMENODE -chmod 666 file1</command>
  8730. </test-commands>
  8731. <cleanup-commands>
  8732. <command>-fs NAMENODE -rm file1</command>
  8733. </cleanup-commands>
  8734. <comparators>
  8735. <comparator>
  8736. <type>RegexpComparator</type>
  8737. <expected-output>^chmod: `file1': No such file or directory</expected-output>
  8738. </comparator>
  8739. </comparators>
  8740. </test>
  8741. <test> <!-- TESTED -->
  8742. <description>chmod: change permission(normal mode) of non existent file in absolute path</description>
  8743. <test-commands>
  8744. <command>-fs NAMENODE -chmod a+rw /file1</command>
  8745. </test-commands>
  8746. <cleanup-commands>
  8747. <command>-fs NAMENODE -rm /file1</command>
  8748. </cleanup-commands>
  8749. <comparators>
  8750. <comparator>
  8751. <type>RegexpComparator</type>
  8752. <expected-output>^chmod: `/file1': No such file or directory</expected-output>
  8753. </comparator>
  8754. </comparators>
  8755. </test>
  8756. <test> <!-- TESTED -->
  8757. <description>chmod: change permission(normal mode) of non existent file in relative path</description>
  8758. <test-commands>
  8759. <command>-fs NAMENODE -chmod a+rw file1</command>
  8760. </test-commands>
  8761. <cleanup-commands>
  8762. <command>-fs NAMENODE -rm file1</command>
  8763. </cleanup-commands>
  8764. <comparators>
  8765. <comparator>
  8766. <type>RegexpComparator</type>
  8767. <expected-output>^chmod: `file1': No such file or directory</expected-output>
  8768. </comparator>
  8769. </comparators>
  8770. </test>
  8771. <test> <!-- TESTED -->
  8772. <description>chmod: change permission(octal mode) of multiple files in absolute path using globbing</description>
  8773. <test-commands>
  8774. <command>-fs NAMENODE -touchz /file1</command>
  8775. <command>-fs NAMENODE -touchz /file2</command>
  8776. <command>-fs NAMENODE -touchz /file3</command>
  8777. <command>-fs NAMENODE -touchz /file4</command>
  8778. <command>-fs NAMENODE -chmod 777 /file* </command>
  8779. <command>-fs NAMENODE -ls -R /file*</command>
  8780. </test-commands>
  8781. <cleanup-commands>
  8782. <command>-fs NAMENODE -rm /file*</command>
  8783. </cleanup-commands>
  8784. <comparators>
  8785. <comparator>
  8786. <type>RegexpComparator</type>
  8787. <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>
  8788. </comparator>
  8789. <comparator>
  8790. <type>RegexpComparator</type>
  8791. <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>
  8792. </comparator>
  8793. <comparator>
  8794. <type>RegexpComparator</type>
  8795. <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>
  8796. </comparator>
  8797. <comparator>
  8798. <type>RegexpComparator</type>
  8799. <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>
  8800. </comparator>
  8801. </comparators>
  8802. </test>
  8803. <test> <!-- TESTED -->
  8804. <description>chmod: change permission(octal mode) of multiple files in relative path using globbing</description>
  8805. <test-commands>
  8806. <command>-fs NAMENODE -touchz file1</command>
  8807. <command>-fs NAMENODE -touchz file2</command>
  8808. <command>-fs NAMENODE -touchz file3</command>
  8809. <command>-fs NAMENODE -touchz file4</command>
  8810. <command>-fs NAMENODE -chmod 777 file* </command>
  8811. <command>-fs NAMENODE -ls -R file*</command>
  8812. </test-commands>
  8813. <cleanup-commands>
  8814. <command>-fs NAMENODE -rm file*</command>
  8815. </cleanup-commands>
  8816. <comparators>
  8817. <comparator>
  8818. <type>RegexpComparator</type>
  8819. <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>
  8820. </comparator>
  8821. <comparator>
  8822. <type>RegexpComparator</type>
  8823. <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>
  8824. </comparator>
  8825. <comparator>
  8826. <type>RegexpComparator</type>
  8827. <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>
  8828. </comparator>
  8829. <comparator>
  8830. <type>RegexpComparator</type>
  8831. <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>
  8832. </comparator>
  8833. </comparators>
  8834. </test>
  8835. <test> <!-- TESTED -->
  8836. <description>chmod: change permission(octal mode) of multiple directories in absolute path using globbing</description>
  8837. <test-commands>
  8838. <command>-fs NAMENODE -mkdir /dir0</command>
  8839. <command>-fs NAMENODE -mkdir /dir0/dir1</command>
  8840. <command>-fs NAMENODE -touchz /dir0/file0</command>
  8841. <command>-fs NAMENODE -touchz /dir0/dir1/file1</command>
  8842. <command>-fs NAMENODE -touchz /dir0/dir1/file2</command>
  8843. <command>-fs NAMENODE -mkdir /dir2</command>
  8844. <command>-fs NAMENODE -mkdir /dir2/dir1</command>
  8845. <command>-fs NAMENODE -touchz /dir2/file0</command>
  8846. <command>-fs NAMENODE -touchz /dir2/dir1/file1</command>
  8847. <command>-fs NAMENODE -touchz /dir2/dir1/file2</command>
  8848. <command>-fs NAMENODE -chmod 777 /dir*</command>
  8849. <command>-fs NAMENODE -ls -R /dir*</command>
  8850. </test-commands>
  8851. <cleanup-commands>
  8852. <command>-fs NAMENODE -rm -r /dir*</command>
  8853. </cleanup-commands>
  8854. <comparators>
  8855. <comparator>
  8856. <type>RegexpComparator</type>
  8857. <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>
  8858. </comparator>
  8859. <comparator>
  8860. <type>RegexpComparator</type>
  8861. <expected-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>
  8862. </comparator>
  8863. <comparator>
  8864. <type>RegexpComparator</type>
  8865. <expected-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>
  8866. </comparator>
  8867. <comparator>
  8868. <type>RegexpComparator</type>
  8869. <expected-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>
  8870. </comparator>
  8871. <comparator>
  8872. <type>RegexpComparator</type>
  8873. <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>
  8874. </comparator>
  8875. <comparator>
  8876. <type>RegexpComparator</type>
  8877. <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>
  8878. </comparator>
  8879. <comparator>
  8880. <type>RegexpComparator</type>
  8881. <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>
  8882. </comparator>
  8883. <comparator>
  8884. <type>RegexpComparator</type>
  8885. <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>
  8886. </comparator>
  8887. </comparators>
  8888. </test>
  8889. <test> <!-- TESTED -->
  8890. <description>chmod: change permission(octal mode) of multiple directories in relative path using globbing</description>
  8891. <test-commands>
  8892. <command>-fs NAMENODE -mkdir -p dir0</command>
  8893. <command>-fs NAMENODE -mkdir -p dir0/dir1</command>
  8894. <command>-fs NAMENODE -touchz dir0/file0</command>
  8895. <command>-fs NAMENODE -touchz dir0/dir1/file1</command>
  8896. <command>-fs NAMENODE -touchz dir0/dir1/file2</command>
  8897. <command>-fs NAMENODE -mkdir -p dir2</command>
  8898. <command>-fs NAMENODE -mkdir -p dir2/dir1</command>
  8899. <command>-fs NAMENODE -touchz dir2/file0</command>
  8900. <command>-fs NAMENODE -touchz dir2/dir1/file1</command>
  8901. <command>-fs NAMENODE -touchz dir2/dir1/file2</command>
  8902. <command>-fs NAMENODE -chmod 777 dir*</command>
  8903. <command>-fs NAMENODE -ls -R dir*</command>
  8904. </test-commands>
  8905. <cleanup-commands>
  8906. <command>-fs NAMENODE -rm -r dir*</command>
  8907. </cleanup-commands>
  8908. <comparators>
  8909. <comparator>
  8910. <type>RegexpComparator</type>
  8911. <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>
  8912. </comparator>
  8913. <comparator>
  8914. <type>RegexpComparator</type>
  8915. <expected-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>
  8916. </comparator>
  8917. <comparator>
  8918. <type>RegexpComparator</type>
  8919. <expected-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>
  8920. </comparator>
  8921. <comparator>
  8922. <type>RegexpComparator</type>
  8923. <expected-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>
  8924. </comparator>
  8925. <comparator>
  8926. <type>RegexpComparator</type>
  8927. <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>
  8928. </comparator>
  8929. <comparator>
  8930. <type>RegexpComparator</type>
  8931. <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>
  8932. </comparator>
  8933. <comparator>
  8934. <type>RegexpComparator</type>
  8935. <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>
  8936. </comparator>
  8937. <comparator>
  8938. <type>RegexpComparator</type>
  8939. <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>
  8940. </comparator>
  8941. </comparators>
  8942. </test>
  8943. <test> <!-- TESTED -->
  8944. <description>chmod: change permission(octal mode) of multiple files in absolute path without globbing</description>
  8945. <test-commands>
  8946. <command>-fs NAMENODE -touchz /file1</command>
  8947. <command>-fs NAMENODE -touchz /file2</command>
  8948. <command>-fs NAMENODE -touchz /file3</command>
  8949. <command>-fs NAMENODE -touchz /file4</command>
  8950. <command>-fs NAMENODE -chmod 777 /file1 /file2 /file3 /file4 </command>
  8951. <command>-fs NAMENODE -ls -R /file*</command>
  8952. </test-commands>
  8953. <cleanup-commands>
  8954. <command>-fs NAMENODE -rm /file*</command>
  8955. </cleanup-commands>
  8956. <comparators>
  8957. <comparator>
  8958. <type>RegexpComparator</type>
  8959. <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>
  8960. </comparator>
  8961. <comparator>
  8962. <type>RegexpComparator</type>
  8963. <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>
  8964. </comparator>
  8965. <comparator>
  8966. <type>RegexpComparator</type>
  8967. <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>
  8968. </comparator>
  8969. <comparator>
  8970. <type>RegexpComparator</type>
  8971. <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>
  8972. </comparator>
  8973. </comparators>
  8974. </test>
  8975. <test> <!-- TESTED -->
  8976. <description>chmod: change permission(octal mode) of multiple files in relative path without globbing</description>
  8977. <test-commands>
  8978. <command>-fs NAMENODE -touchz file1</command>
  8979. <command>-fs NAMENODE -touchz file2</command>
  8980. <command>-fs NAMENODE -touchz file3</command>
  8981. <command>-fs NAMENODE -touchz file4</command>
  8982. <command>-fs NAMENODE -chmod 777 file1 file2 file3 file4 </command>
  8983. <command>-fs NAMENODE -ls -R file*</command>
  8984. </test-commands>
  8985. <cleanup-commands>
  8986. <command>-fs NAMENODE -rm file*</command>
  8987. </cleanup-commands>
  8988. <comparators>
  8989. <comparator>
  8990. <type>RegexpComparator</type>
  8991. <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>
  8992. </comparator>
  8993. <comparator>
  8994. <type>RegexpComparator</type>
  8995. <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>
  8996. </comparator>
  8997. <comparator>
  8998. <type>RegexpComparator</type>
  8999. <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>
  9000. </comparator>
  9001. <comparator>
  9002. <type>RegexpComparator</type>
  9003. <expected-output>^-rwxrwxrwx( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*file4</expected-output>
  9004. </comparator>
  9005. </comparators>
  9006. </test>
  9007. <test> <!-- TESTED -->
  9008. <description>chmod: change permission(octal mode) of multiple directories in absolute path without globbing</description>
  9009. <test-commands>
  9010. <command>-fs NAMENODE -mkdir /dir0</command>
  9011. <command>-fs NAMENODE -mkdir /dir0/dir1</command>
  9012. <command>-fs NAMENODE -touchz /dir0/file0</command>
  9013. <command>-fs NAMENODE -touchz /dir0/dir1/file1</command>
  9014. <command>-fs NAMENODE -touchz /dir0/dir1/file2</command>
  9015. <command>-fs NAMENODE -mkdir /dir2</command>
  9016. <command>-fs NAMENODE -mkdir /dir2/dir1</command>
  9017. <command>-fs NAMENODE -touchz /dir2/file0</command>
  9018. <command>-fs NAMENODE -touchz /dir2/dir1/file1</command>
  9019. <command>-fs NAMENODE -touchz /dir2/dir1/file2</command>
  9020. <command>-fs NAMENODE -chmod 777 /dir0 /dir2</command>
  9021. <command>-fs NAMENODE -ls -R /dir*</command>
  9022. </test-commands>
  9023. <cleanup-commands>
  9024. <command>-fs NAMENODE -rm -r /dir*</command>
  9025. </cleanup-commands>
  9026. <comparators>
  9027. <comparator>
  9028. <type>RegexpComparator</type>
  9029. <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>
  9030. </comparator>
  9031. <comparator>
  9032. <type>RegexpComparator</type>
  9033. <expected-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>
  9034. </comparator>
  9035. <comparator>
  9036. <type>RegexpComparator</type>
  9037. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1/file2</expected-output>
  9038. </comparator>
  9039. <comparator>
  9040. <type>RegexpComparator</type>
  9041. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/file0</expected-output>
  9042. </comparator>
  9043. <comparator>
  9044. <type>RegexpComparator</type>
  9045. <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>
  9046. </comparator>
  9047. <comparator>
  9048. <type>RegexpComparator</type>
  9049. <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>
  9050. </comparator>
  9051. <comparator>
  9052. <type>RegexpComparator</type>
  9053. <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>
  9054. </comparator>
  9055. <comparator>
  9056. <type>RegexpComparator</type>
  9057. <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>
  9058. </comparator>
  9059. </comparators>
  9060. </test>
  9061. <test> <!-- TESTED -->
  9062. <description>chmod: change permission(octal mode) of multiple directories in relative path without globbing</description>
  9063. <test-commands>
  9064. <command>-fs NAMENODE -mkdir -p dir0</command>
  9065. <command>-fs NAMENODE -mkdir -p dir0/dir1</command>
  9066. <command>-fs NAMENODE -touchz dir0/file0</command>
  9067. <command>-fs NAMENODE -touchz dir0/dir1/file1</command>
  9068. <command>-fs NAMENODE -touchz dir0/dir1/file2</command>
  9069. <command>-fs NAMENODE -mkdir -p dir2</command>
  9070. <command>-fs NAMENODE -mkdir -p dir2/dir1</command>
  9071. <command>-fs NAMENODE -touchz dir2/file0</command>
  9072. <command>-fs NAMENODE -touchz dir2/dir1/file1</command>
  9073. <command>-fs NAMENODE -touchz dir2/dir1/file2</command>
  9074. <command>-fs NAMENODE -chmod 777 dir0 dir2</command>
  9075. <command>-fs NAMENODE -ls -R dir*</command>
  9076. </test-commands>
  9077. <cleanup-commands>
  9078. <command>-fs NAMENODE -rm -r dir*</command>
  9079. </cleanup-commands>
  9080. <comparators>
  9081. <comparator>
  9082. <type>RegexpComparator</type>
  9083. <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>
  9084. </comparator>
  9085. <comparator>
  9086. <type>RegexpComparator</type>
  9087. <expected-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>
  9088. </comparator>
  9089. <comparator>
  9090. <type>RegexpComparator</type>
  9091. <expected-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>
  9092. </comparator>
  9093. <comparator>
  9094. <type>RegexpComparator</type>
  9095. <expected-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>
  9096. </comparator>
  9097. <comparator>
  9098. <type>RegexpComparator</type>
  9099. <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>
  9100. </comparator>
  9101. <comparator>
  9102. <type>RegexpComparator</type>
  9103. <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>
  9104. </comparator>
  9105. <comparator>
  9106. <type>RegexpComparator</type>
  9107. <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>
  9108. </comparator>
  9109. <comparator>
  9110. <type>RegexpComparator</type>
  9111. <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>
  9112. </comparator>
  9113. </comparators>
  9114. </test>
  9115. <test> <!-- TESTED -->
  9116. <description>chmod: change permission(normal mode) of multiple files in absolute path using globbing</description>
  9117. <test-commands>
  9118. <command>-fs NAMENODE -touchz /file1</command>
  9119. <command>-fs NAMENODE -touchz /file2</command>
  9120. <command>-fs NAMENODE -touchz /file3</command>
  9121. <command>-fs NAMENODE -touchz /file4</command>
  9122. <command>-fs NAMENODE -chmod a+rw /file* </command>
  9123. <command>-fs NAMENODE -ls -R /file*</command>
  9124. </test-commands>
  9125. <cleanup-commands>
  9126. <command>-fs NAMENODE -rm /file*</command>
  9127. </cleanup-commands>
  9128. <comparators>
  9129. <comparator>
  9130. <type>RegexpComparator</type>
  9131. <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>
  9132. </comparator>
  9133. <comparator>
  9134. <type>RegexpComparator</type>
  9135. <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>
  9136. </comparator>
  9137. <comparator>
  9138. <type>RegexpComparator</type>
  9139. <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>
  9140. </comparator>
  9141. <comparator>
  9142. <type>RegexpComparator</type>
  9143. <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>
  9144. </comparator>
  9145. </comparators>
  9146. </test>
  9147. <test> <!-- TESTED -->
  9148. <description>chmod: change permission(normal mode) of multiple files in relative path using globbing</description>
  9149. <test-commands>
  9150. <command>-fs NAMENODE -touchz file1</command>
  9151. <command>-fs NAMENODE -touchz file2</command>
  9152. <command>-fs NAMENODE -touchz file3</command>
  9153. <command>-fs NAMENODE -touchz file4</command>
  9154. <command>-fs NAMENODE -chmod a+rw file* </command>
  9155. <command>-fs NAMENODE -ls -R file*</command>
  9156. </test-commands>
  9157. <cleanup-commands>
  9158. <command>-fs NAMENODE -rm file*</command>
  9159. </cleanup-commands>
  9160. <comparators>
  9161. <comparator>
  9162. <type>RegexpComparator</type>
  9163. <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>
  9164. </comparator>
  9165. <comparator>
  9166. <type>RegexpComparator</type>
  9167. <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>
  9168. </comparator>
  9169. <comparator>
  9170. <type>RegexpComparator</type>
  9171. <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>
  9172. </comparator>
  9173. <comparator>
  9174. <type>RegexpComparator</type>
  9175. <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>
  9176. </comparator>
  9177. </comparators>
  9178. </test>
  9179. <test> <!-- TESTED -->
  9180. <description>chmod: change permission(normal mode) of multiple directories in absolute path using globbing</description>
  9181. <test-commands>
  9182. <command>-fs NAMENODE -mkdir /dir0</command>
  9183. <command>-fs NAMENODE -mkdir /dir0/dir1</command>
  9184. <command>-fs NAMENODE -touchz /dir0/file0</command>
  9185. <command>-fs NAMENODE -touchz /dir0/dir1/file1</command>
  9186. <command>-fs NAMENODE -touchz /dir0/dir1/file2</command>
  9187. <command>-fs NAMENODE -mkdir /dir2</command>
  9188. <command>-fs NAMENODE -mkdir /dir2/dir1</command>
  9189. <command>-fs NAMENODE -touchz /dir2/file0</command>
  9190. <command>-fs NAMENODE -touchz /dir2/dir1/file1</command>
  9191. <command>-fs NAMENODE -touchz /dir2/dir1/file2</command>
  9192. <command>-fs NAMENODE -chmod a+rwx /dir*</command>
  9193. <command>-fs NAMENODE -ls -R /dir*</command>
  9194. </test-commands>
  9195. <cleanup-commands>
  9196. <command>-fs NAMENODE -rm -r /dir*</command>
  9197. </cleanup-commands>
  9198. <comparators>
  9199. <comparator>
  9200. <type>RegexpComparator</type>
  9201. <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>
  9202. </comparator>
  9203. <comparator>
  9204. <type>RegexpComparator</type>
  9205. <expected-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>
  9206. </comparator>
  9207. <comparator>
  9208. <type>RegexpComparator</type>
  9209. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1/file2</expected-output>
  9210. </comparator>
  9211. <comparator>
  9212. <type>RegexpComparator</type>
  9213. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/file0</expected-output>
  9214. </comparator>
  9215. <comparator>
  9216. <type>RegexpComparator</type>
  9217. <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>
  9218. </comparator>
  9219. <comparator>
  9220. <type>RegexpComparator</type>
  9221. <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>
  9222. </comparator>
  9223. <comparator>
  9224. <type>RegexpComparator</type>
  9225. <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>
  9226. </comparator>
  9227. <comparator>
  9228. <type>RegexpComparator</type>
  9229. <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>
  9230. </comparator>
  9231. </comparators>
  9232. </test>
  9233. <test> <!-- TESTED -->
  9234. <description>chmod: change permission(normal mode) of multiple directories in relative path using globbing</description>
  9235. <test-commands>
  9236. <command>-fs NAMENODE -mkdir -p dir0</command>
  9237. <command>-fs NAMENODE -mkdir -p dir0/dir1</command>
  9238. <command>-fs NAMENODE -touchz dir0/file0</command>
  9239. <command>-fs NAMENODE -touchz dir0/dir1/file1</command>
  9240. <command>-fs NAMENODE -touchz dir0/dir1/file2</command>
  9241. <command>-fs NAMENODE -mkdir -p dir2</command>
  9242. <command>-fs NAMENODE -mkdir -p dir2/dir1</command>
  9243. <command>-fs NAMENODE -touchz dir2/file0</command>
  9244. <command>-fs NAMENODE -touchz dir2/dir1/file1</command>
  9245. <command>-fs NAMENODE -touchz dir2/dir1/file2</command>
  9246. <command>-fs NAMENODE -chmod a+rwx dir*</command>
  9247. <command>-fs NAMENODE -ls -R dir*</command>
  9248. </test-commands>
  9249. <cleanup-commands>
  9250. <command>-fs NAMENODE -rm -r dir*</command>
  9251. </cleanup-commands>
  9252. <comparators>
  9253. <comparator>
  9254. <type>RegexpComparator</type>
  9255. <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>
  9256. </comparator>
  9257. <comparator>
  9258. <type>RegexpComparator</type>
  9259. <expected-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>
  9260. </comparator>
  9261. <comparator>
  9262. <type>RegexpComparator</type>
  9263. <expected-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>
  9264. </comparator>
  9265. <comparator>
  9266. <type>RegexpComparator</type>
  9267. <expected-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>
  9268. </comparator>
  9269. <comparator>
  9270. <type>RegexpComparator</type>
  9271. <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>
  9272. </comparator>
  9273. <comparator>
  9274. <type>RegexpComparator</type>
  9275. <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>
  9276. </comparator>
  9277. <comparator>
  9278. <type>RegexpComparator</type>
  9279. <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>
  9280. </comparator>
  9281. <comparator>
  9282. <type>RegexpComparator</type>
  9283. <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>
  9284. </comparator>
  9285. </comparators>
  9286. </test>
  9287. <test> <!-- TESTED -->
  9288. <description>chmod: change permission(normal mode) of multiple files in absolute path without globbing</description>
  9289. <test-commands>
  9290. <command>-fs NAMENODE -touchz /file1</command>
  9291. <command>-fs NAMENODE -touchz /file2</command>
  9292. <command>-fs NAMENODE -touchz /file3</command>
  9293. <command>-fs NAMENODE -touchz /file4</command>
  9294. <command>-fs NAMENODE -chmod a+rw /file1 /file2 /file3 /file4 </command>
  9295. <command>-fs NAMENODE -ls -R /file*</command>
  9296. </test-commands>
  9297. <cleanup-commands>
  9298. <command>-fs NAMENODE -rm /file*</command>
  9299. </cleanup-commands>
  9300. <comparators>
  9301. <comparator>
  9302. <type>RegexpComparator</type>
  9303. <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>
  9304. </comparator>
  9305. <comparator>
  9306. <type>RegexpComparator</type>
  9307. <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>
  9308. </comparator>
  9309. <comparator>
  9310. <type>RegexpComparator</type>
  9311. <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>
  9312. </comparator>
  9313. <comparator>
  9314. <type>RegexpComparator</type>
  9315. <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>
  9316. </comparator>
  9317. </comparators>
  9318. </test>
  9319. <test> <!-- TESTED -->
  9320. <description>chmod: change permission(normal mode) of multiple files in relative path without globbing</description>
  9321. <test-commands>
  9322. <command>-fs NAMENODE -touchz file1</command>
  9323. <command>-fs NAMENODE -touchz file2</command>
  9324. <command>-fs NAMENODE -touchz file3</command>
  9325. <command>-fs NAMENODE -touchz file4</command>
  9326. <command>-fs NAMENODE -chmod a+rw file1 file2 file3 file4 </command>
  9327. <command>-fs NAMENODE -ls -R file*</command>
  9328. </test-commands>
  9329. <cleanup-commands>
  9330. <command>-fs NAMENODE -rm file*</command>
  9331. </cleanup-commands>
  9332. <comparators>
  9333. <comparator>
  9334. <type>RegexpComparator</type>
  9335. <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>
  9336. </comparator>
  9337. <comparator>
  9338. <type>RegexpComparator</type>
  9339. <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>
  9340. </comparator>
  9341. <comparator>
  9342. <type>RegexpComparator</type>
  9343. <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>
  9344. </comparator>
  9345. <comparator>
  9346. <type>RegexpComparator</type>
  9347. <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>
  9348. </comparator>
  9349. </comparators>
  9350. </test>
  9351. <test> <!-- TESTED -->
  9352. <description>chmod: change permission(normal mode) of multiple directories in absolute path without globbing</description>
  9353. <test-commands>
  9354. <command>-fs NAMENODE -mkdir /dir0</command>
  9355. <command>-fs NAMENODE -mkdir /dir0/dir1</command>
  9356. <command>-fs NAMENODE -touchz /dir0/file0</command>
  9357. <command>-fs NAMENODE -touchz /dir0/dir1/file1</command>
  9358. <command>-fs NAMENODE -touchz /dir0/dir1/file2</command>
  9359. <command>-fs NAMENODE -mkdir /dir2</command>
  9360. <command>-fs NAMENODE -mkdir /dir2/dir1</command>
  9361. <command>-fs NAMENODE -touchz /dir2/file0</command>
  9362. <command>-fs NAMENODE -touchz /dir2/dir1/file1</command>
  9363. <command>-fs NAMENODE -touchz /dir2/dir1/file2</command>
  9364. <command>-fs NAMENODE -chmod a+rwx /dir0 /dir2</command>
  9365. <command>-fs NAMENODE -ls -R /dir*</command>
  9366. </test-commands>
  9367. <cleanup-commands>
  9368. <command>-fs NAMENODE -rm -r /dir*</command>
  9369. </cleanup-commands>
  9370. <comparators>
  9371. <comparator>
  9372. <type>RegexpComparator</type>
  9373. <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>
  9374. </comparator>
  9375. <comparator>
  9376. <type>RegexpComparator</type>
  9377. <expected-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>
  9378. </comparator>
  9379. <comparator>
  9380. <type>RegexpComparator</type>
  9381. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1/file2</expected-output>
  9382. </comparator>
  9383. <comparator>
  9384. <type>RegexpComparator</type>
  9385. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/file0</expected-output>
  9386. </comparator>
  9387. <comparator>
  9388. <type>RegexpComparator</type>
  9389. <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>
  9390. </comparator>
  9391. <comparator>
  9392. <type>RegexpComparator</type>
  9393. <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>
  9394. </comparator>
  9395. <comparator>
  9396. <type>RegexpComparator</type>
  9397. <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>
  9398. </comparator>
  9399. <comparator>
  9400. <type>RegexpComparator</type>
  9401. <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>
  9402. </comparator>
  9403. </comparators>
  9404. </test>
  9405. <test> <!-- TESTED -->
  9406. <description>chmod: change permission(normal mode) of multiple directories in relative path without globbing</description>
  9407. <test-commands>
  9408. <command>-fs NAMENODE -mkdir -p dir0</command>
  9409. <command>-fs NAMENODE -mkdir -p dir0/dir1</command>
  9410. <command>-fs NAMENODE -touchz dir0/file0</command>
  9411. <command>-fs NAMENODE -touchz dir0/dir1/file1</command>
  9412. <command>-fs NAMENODE -touchz dir0/dir1/file2</command>
  9413. <command>-fs NAMENODE -mkdir -p dir2</command>
  9414. <command>-fs NAMENODE -mkdir -p dir2/dir1</command>
  9415. <command>-fs NAMENODE -touchz dir2/file0</command>
  9416. <command>-fs NAMENODE -touchz dir2/dir1/file1</command>
  9417. <command>-fs NAMENODE -touchz dir2/dir1/file2</command>
  9418. <command>-fs NAMENODE -chmod a+rwx dir0 dir2</command>
  9419. <command>-fs NAMENODE -ls -R dir*</command>
  9420. </test-commands>
  9421. <cleanup-commands>
  9422. <command>-fs NAMENODE -rm -r dir*</command>
  9423. </cleanup-commands>
  9424. <comparators>
  9425. <comparator>
  9426. <type>RegexpComparator</type>
  9427. <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>
  9428. </comparator>
  9429. <comparator>
  9430. <type>RegexpComparator</type>
  9431. <expected-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>
  9432. </comparator>
  9433. <comparator>
  9434. <type>RegexpComparator</type>
  9435. <expected-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>
  9436. </comparator>
  9437. <comparator>
  9438. <type>RegexpComparator</type>
  9439. <expected-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>
  9440. </comparator>
  9441. <comparator>
  9442. <type>RegexpComparator</type>
  9443. <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>
  9444. </comparator>
  9445. <comparator>
  9446. <type>RegexpComparator</type>
  9447. <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>
  9448. </comparator>
  9449. <comparator>
  9450. <type>RegexpComparator</type>
  9451. <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>
  9452. </comparator>
  9453. <comparator>
  9454. <type>RegexpComparator</type>
  9455. <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>
  9456. </comparator>
  9457. </comparators>
  9458. </test>
  9459. <test> <!-- TESTED -->
  9460. <description>chmod: change permission(octal mode) of multiple directories in absolute path recursively using globbing</description>
  9461. <test-commands>
  9462. <command>-fs NAMENODE -mkdir /dir0</command>
  9463. <command>-fs NAMENODE -mkdir /dir0/dir1</command>
  9464. <command>-fs NAMENODE -touchz /dir0/file0</command>
  9465. <command>-fs NAMENODE -touchz /dir0/dir1/file1</command>
  9466. <command>-fs NAMENODE -touchz /dir0/dir1/file2</command>
  9467. <command>-fs NAMENODE -mkdir /dir2</command>
  9468. <command>-fs NAMENODE -mkdir /dir2/dir1</command>
  9469. <command>-fs NAMENODE -touchz /dir2/file0</command>
  9470. <command>-fs NAMENODE -touchz /dir2/dir1/file1</command>
  9471. <command>-fs NAMENODE -touchz /dir2/dir1/file2</command>
  9472. <command>-fs NAMENODE -chmod -R 777 /dir*</command>
  9473. <command>-fs NAMENODE -ls -R /dir*</command>
  9474. </test-commands>
  9475. <cleanup-commands>
  9476. <command>-fs NAMENODE -rm -r /dir*</command>
  9477. </cleanup-commands>
  9478. <comparators>
  9479. <comparator>
  9480. <type>RegexpComparator</type>
  9481. <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>
  9482. </comparator>
  9483. <comparator>
  9484. <type>RegexpComparator</type>
  9485. <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>
  9486. </comparator>
  9487. <comparator>
  9488. <type>RegexpComparator</type>
  9489. <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>
  9490. </comparator>
  9491. <comparator>
  9492. <type>RegexpComparator</type>
  9493. <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>
  9494. </comparator>
  9495. <comparator>
  9496. <type>RegexpComparator</type>
  9497. <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>
  9498. </comparator>
  9499. <comparator>
  9500. <type>RegexpComparator</type>
  9501. <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>
  9502. </comparator>
  9503. <comparator>
  9504. <type>RegexpComparator</type>
  9505. <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>
  9506. </comparator>
  9507. <comparator>
  9508. <type>RegexpComparator</type>
  9509. <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>
  9510. </comparator>
  9511. </comparators>
  9512. </test>
  9513. <test> <!-- TESTED -->
  9514. <description>chmod: change permission(octal mode) of multiple directories in relative path recursively using globbing</description>
  9515. <test-commands>
  9516. <command>-fs NAMENODE -mkdir -p dir0</command>
  9517. <command>-fs NAMENODE -mkdir -p dir0/dir1</command>
  9518. <command>-fs NAMENODE -touchz dir0/file0</command>
  9519. <command>-fs NAMENODE -touchz dir0/dir1/file1</command>
  9520. <command>-fs NAMENODE -touchz dir0/dir1/file2</command>
  9521. <command>-fs NAMENODE -mkdir -p dir2</command>
  9522. <command>-fs NAMENODE -mkdir -p dir2/dir1</command>
  9523. <command>-fs NAMENODE -touchz dir2/file0</command>
  9524. <command>-fs NAMENODE -touchz dir2/dir1/file1</command>
  9525. <command>-fs NAMENODE -touchz dir2/dir1/file2</command>
  9526. <command>-fs NAMENODE -chmod -R 777 dir*</command>
  9527. <command>-fs NAMENODE -ls -R dir*</command>
  9528. </test-commands>
  9529. <cleanup-commands>
  9530. <command>-fs NAMENODE -rm -r dir*</command>
  9531. </cleanup-commands>
  9532. <comparators>
  9533. <comparator>
  9534. <type>RegexpComparator</type>
  9535. <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>
  9536. </comparator>
  9537. <comparator>
  9538. <type>RegexpComparator</type>
  9539. <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>
  9540. </comparator>
  9541. <comparator>
  9542. <type>RegexpComparator</type>
  9543. <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>
  9544. </comparator>
  9545. <comparator>
  9546. <type>RegexpComparator</type>
  9547. <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>
  9548. </comparator>
  9549. <comparator>
  9550. <type>RegexpComparator</type>
  9551. <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>
  9552. </comparator>
  9553. <comparator>
  9554. <type>RegexpComparator</type>
  9555. <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>
  9556. </comparator>
  9557. <comparator>
  9558. <type>RegexpComparator</type>
  9559. <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>
  9560. </comparator>
  9561. <comparator>
  9562. <type>RegexpComparator</type>
  9563. <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>
  9564. </comparator>
  9565. </comparators>
  9566. </test>
  9567. <test> <!-- TESTED -->
  9568. <description>chmod: change permission(octal mode) of multiple directories in absolute path recursively without globbing</description>
  9569. <test-commands>
  9570. <command>-fs NAMENODE -mkdir /dir0</command>
  9571. <command>-fs NAMENODE -mkdir /dir0/dir1</command>
  9572. <command>-fs NAMENODE -touchz /dir0/file0</command>
  9573. <command>-fs NAMENODE -touchz /dir0/dir1/file1</command>
  9574. <command>-fs NAMENODE -touchz /dir0/dir1/file2</command>
  9575. <command>-fs NAMENODE -mkdir /dir2</command>
  9576. <command>-fs NAMENODE -mkdir /dir2/dir1</command>
  9577. <command>-fs NAMENODE -touchz /dir2/file0</command>
  9578. <command>-fs NAMENODE -touchz /dir2/dir1/file1</command>
  9579. <command>-fs NAMENODE -touchz /dir2/dir1/file2</command>
  9580. <command>-fs NAMENODE -chmod -R 777 /dir0 /dir2</command>
  9581. <command>-fs NAMENODE -ls -R /dir*</command>
  9582. </test-commands>
  9583. <cleanup-commands>
  9584. <command>-fs NAMENODE -rm -r /dir*</command>
  9585. </cleanup-commands>
  9586. <comparators>
  9587. <comparator>
  9588. <type>RegexpComparator</type>
  9589. <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>
  9590. </comparator>
  9591. <comparator>
  9592. <type>RegexpComparator</type>
  9593. <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>
  9594. </comparator>
  9595. <comparator>
  9596. <type>RegexpComparator</type>
  9597. <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>
  9598. </comparator>
  9599. <comparator>
  9600. <type>RegexpComparator</type>
  9601. <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>
  9602. </comparator>
  9603. <comparator>
  9604. <type>RegexpComparator</type>
  9605. <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>
  9606. </comparator>
  9607. <comparator>
  9608. <type>RegexpComparator</type>
  9609. <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>
  9610. </comparator>
  9611. <comparator>
  9612. <type>RegexpComparator</type>
  9613. <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>
  9614. </comparator>
  9615. <comparator>
  9616. <type>RegexpComparator</type>
  9617. <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>
  9618. </comparator>
  9619. </comparators>
  9620. </test>
  9621. <test> <!-- TESTED -->
  9622. <description>chmod: change permission(octal mode) of multiple directories in relative path recursively without globbing</description>
  9623. <test-commands>
  9624. <command>-fs NAMENODE -mkdir -p dir0</command>
  9625. <command>-fs NAMENODE -mkdir -p dir0/dir1</command>
  9626. <command>-fs NAMENODE -touchz dir0/file0</command>
  9627. <command>-fs NAMENODE -touchz dir0/dir1/file1</command>
  9628. <command>-fs NAMENODE -touchz dir0/dir1/file2</command>
  9629. <command>-fs NAMENODE -mkdir -p dir2</command>
  9630. <command>-fs NAMENODE -mkdir -p dir2/dir1</command>
  9631. <command>-fs NAMENODE -touchz dir2/file0</command>
  9632. <command>-fs NAMENODE -touchz dir2/dir1/file1</command>
  9633. <command>-fs NAMENODE -touchz dir2/dir1/file2</command>
  9634. <command>-fs NAMENODE -chmod -R 777 dir0 dir2</command>
  9635. <command>-fs NAMENODE -ls -R dir*</command>
  9636. </test-commands>
  9637. <cleanup-commands>
  9638. <command>-fs NAMENODE -rm -r dir*</command>
  9639. </cleanup-commands>
  9640. <comparators>
  9641. <comparator>
  9642. <type>RegexpComparator</type>
  9643. <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>
  9644. </comparator>
  9645. <comparator>
  9646. <type>RegexpComparator</type>
  9647. <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>
  9648. </comparator>
  9649. <comparator>
  9650. <type>RegexpComparator</type>
  9651. <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>
  9652. </comparator>
  9653. <comparator>
  9654. <type>RegexpComparator</type>
  9655. <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>
  9656. </comparator>
  9657. <comparator>
  9658. <type>RegexpComparator</type>
  9659. <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>
  9660. </comparator>
  9661. <comparator>
  9662. <type>RegexpComparator</type>
  9663. <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>
  9664. </comparator>
  9665. <comparator>
  9666. <type>RegexpComparator</type>
  9667. <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>
  9668. </comparator>
  9669. <comparator>
  9670. <type>RegexpComparator</type>
  9671. <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>
  9672. </comparator>
  9673. </comparators>
  9674. </test>
  9675. <test> <!-- TESTED -->
  9676. <description>chmod: change permission(normal mode) of multiple directories in absolute path recursively using globbing</description>
  9677. <test-commands>
  9678. <command>-fs NAMENODE -mkdir /dir0</command>
  9679. <command>-fs NAMENODE -mkdir /dir0/dir1</command>
  9680. <command>-fs NAMENODE -touchz /dir0/file0</command>
  9681. <command>-fs NAMENODE -touchz /dir0/dir1/file1</command>
  9682. <command>-fs NAMENODE -touchz /dir0/dir1/file2</command>
  9683. <command>-fs NAMENODE -mkdir /dir2</command>
  9684. <command>-fs NAMENODE -mkdir /dir2/dir1</command>
  9685. <command>-fs NAMENODE -touchz /dir2/file0</command>
  9686. <command>-fs NAMENODE -touchz /dir2/dir1/file1</command>
  9687. <command>-fs NAMENODE -touchz /dir2/dir1/file2</command>
  9688. <command>-fs NAMENODE -chmod -R a+rwx /dir*</command>
  9689. <command>-fs NAMENODE -ls -R /dir*</command>
  9690. </test-commands>
  9691. <cleanup-commands>
  9692. <command>-fs NAMENODE -rm -r /dir*</command>
  9693. </cleanup-commands>
  9694. <comparators>
  9695. <comparator>
  9696. <type>RegexpComparator</type>
  9697. <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>
  9698. </comparator>
  9699. <comparator>
  9700. <type>RegexpComparator</type>
  9701. <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>
  9702. </comparator>
  9703. <comparator>
  9704. <type>RegexpComparator</type>
  9705. <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>
  9706. </comparator>
  9707. <comparator>
  9708. <type>RegexpComparator</type>
  9709. <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>
  9710. </comparator>
  9711. <comparator>
  9712. <type>RegexpComparator</type>
  9713. <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>
  9714. </comparator>
  9715. <comparator>
  9716. <type>RegexpComparator</type>
  9717. <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>
  9718. </comparator>
  9719. <comparator>
  9720. <type>RegexpComparator</type>
  9721. <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>
  9722. </comparator>
  9723. <comparator>
  9724. <type>RegexpComparator</type>
  9725. <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>
  9726. </comparator>
  9727. </comparators>
  9728. </test>
  9729. <test> <!-- TESTED -->
  9730. <description>chmod: change permission(normal mode) of multiple directories in relative path recursively using globbing</description>
  9731. <test-commands>
  9732. <command>-fs NAMENODE -mkdir -p dir0</command>
  9733. <command>-fs NAMENODE -mkdir -p dir0/dir1</command>
  9734. <command>-fs NAMENODE -touchz dir0/file0</command>
  9735. <command>-fs NAMENODE -touchz dir0/dir1/file1</command>
  9736. <command>-fs NAMENODE -touchz dir0/dir1/file2</command>
  9737. <command>-fs NAMENODE -mkdir -p dir2</command>
  9738. <command>-fs NAMENODE -mkdir -p dir2/dir1</command>
  9739. <command>-fs NAMENODE -touchz dir2/file0</command>
  9740. <command>-fs NAMENODE -touchz dir2/dir1/file1</command>
  9741. <command>-fs NAMENODE -touchz dir2/dir1/file2</command>
  9742. <command>-fs NAMENODE -chmod -R a+rwx dir*</command>
  9743. <command>-fs NAMENODE -ls -R dir*</command>
  9744. </test-commands>
  9745. <cleanup-commands>
  9746. <command>-fs NAMENODE -rm -r dir*</command>
  9747. </cleanup-commands>
  9748. <comparators>
  9749. <comparator>
  9750. <type>RegexpComparator</type>
  9751. <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>
  9752. </comparator>
  9753. <comparator>
  9754. <type>RegexpComparator</type>
  9755. <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>
  9756. </comparator>
  9757. <comparator>
  9758. <type>RegexpComparator</type>
  9759. <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>
  9760. </comparator>
  9761. <comparator>
  9762. <type>RegexpComparator</type>
  9763. <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>
  9764. </comparator>
  9765. <comparator>
  9766. <type>RegexpComparator</type>
  9767. <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>
  9768. </comparator>
  9769. <comparator>
  9770. <type>RegexpComparator</type>
  9771. <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>
  9772. </comparator>
  9773. <comparator>
  9774. <type>RegexpComparator</type>
  9775. <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>
  9776. </comparator>
  9777. <comparator>
  9778. <type>RegexpComparator</type>
  9779. <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>
  9780. </comparator>
  9781. </comparators>
  9782. </test>
  9783. <test> <!-- TESTED -->
  9784. <description>chmod: change permission(normal mode) of multiple directories in absolute path recursively without globbing</description>
  9785. <test-commands>
  9786. <command>-fs NAMENODE -mkdir /dir0</command>
  9787. <command>-fs NAMENODE -mkdir /dir0/dir1</command>
  9788. <command>-fs NAMENODE -touchz /dir0/file0</command>
  9789. <command>-fs NAMENODE -touchz /dir0/dir1/file1</command>
  9790. <command>-fs NAMENODE -touchz /dir0/dir1/file2</command>
  9791. <command>-fs NAMENODE -mkdir /dir2</command>
  9792. <command>-fs NAMENODE -mkdir /dir2/dir1</command>
  9793. <command>-fs NAMENODE -touchz /dir2/file0</command>
  9794. <command>-fs NAMENODE -touchz /dir2/dir1/file1</command>
  9795. <command>-fs NAMENODE -touchz /dir2/dir1/file2</command>
  9796. <command>-fs NAMENODE -chmod -R a+rwx /dir0 /dir2</command>
  9797. <command>-fs NAMENODE -ls -R /dir*</command>
  9798. </test-commands>
  9799. <cleanup-commands>
  9800. <command>-fs NAMENODE -rm -r /dir*</command>
  9801. </cleanup-commands>
  9802. <comparators>
  9803. <comparator>
  9804. <type>RegexpComparator</type>
  9805. <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>
  9806. </comparator>
  9807. <comparator>
  9808. <type>RegexpComparator</type>
  9809. <expected-output>^-rwxrwxrwx( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1/file1</expected-output>
  9810. </comparator>
  9811. <comparator>
  9812. <type>RegexpComparator</type>
  9813. <expected-output>^-rwxrwxrwx( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1/file2</expected-output>
  9814. </comparator>
  9815. <comparator>
  9816. <type>RegexpComparator</type>
  9817. <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>
  9818. </comparator>
  9819. <comparator>
  9820. <type>RegexpComparator</type>
  9821. <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>
  9822. </comparator>
  9823. <comparator>
  9824. <type>RegexpComparator</type>
  9825. <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>
  9826. </comparator>
  9827. <comparator>
  9828. <type>RegexpComparator</type>
  9829. <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>
  9830. </comparator>
  9831. <comparator>
  9832. <type>RegexpComparator</type>
  9833. <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>
  9834. </comparator>
  9835. </comparators>
  9836. </test>
  9837. <test> <!-- TESTED -->
  9838. <description>chmod: change permission(normal mode) of multiple directories in relative path recursively without globbing</description>
  9839. <test-commands>
  9840. <command>-fs NAMENODE -mkdir -p dir0</command>
  9841. <command>-fs NAMENODE -mkdir -p dir0/dir1</command>
  9842. <command>-fs NAMENODE -touchz dir0/file0</command>
  9843. <command>-fs NAMENODE -touchz dir0/dir1/file1</command>
  9844. <command>-fs NAMENODE -touchz dir0/dir1/file2</command>
  9845. <command>-fs NAMENODE -mkdir -p dir2</command>
  9846. <command>-fs NAMENODE -mkdir -p dir2/dir1</command>
  9847. <command>-fs NAMENODE -touchz dir2/file0</command>
  9848. <command>-fs NAMENODE -touchz dir2/dir1/file1</command>
  9849. <command>-fs NAMENODE -touchz dir2/dir1/file2</command>
  9850. <command>-fs NAMENODE -chmod -R a+rwx dir0 dir2</command>
  9851. <command>-fs NAMENODE -ls -R dir*</command>
  9852. </test-commands>
  9853. <cleanup-commands>
  9854. <command>-fs NAMENODE -rm -r dir*</command>
  9855. </cleanup-commands>
  9856. <comparators>
  9857. <comparator>
  9858. <type>RegexpComparator</type>
  9859. <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>
  9860. </comparator>
  9861. <comparator>
  9862. <type>RegexpComparator</type>
  9863. <expected-output>^-rwxrwxrwx( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/dir1/file1</expected-output>
  9864. </comparator>
  9865. <comparator>
  9866. <type>RegexpComparator</type>
  9867. <expected-output>^-rwxrwxrwx( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/dir1/file2</expected-output>
  9868. </comparator>
  9869. <comparator>
  9870. <type>RegexpComparator</type>
  9871. <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>
  9872. </comparator>
  9873. <comparator>
  9874. <type>RegexpComparator</type>
  9875. <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>
  9876. </comparator>
  9877. <comparator>
  9878. <type>RegexpComparator</type>
  9879. <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>
  9880. </comparator>
  9881. <comparator>
  9882. <type>RegexpComparator</type>
  9883. <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>
  9884. </comparator>
  9885. <comparator>
  9886. <type>RegexpComparator</type>
  9887. <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>
  9888. </comparator>
  9889. </comparators>
  9890. </test>
  9891. <test> <!-- TESTED -->
  9892. <description>chmod: invalid value in octal mode of file in absolute path</description>
  9893. <test-commands>
  9894. <command>-fs NAMENODE -touchz /file1</command>
  9895. <command>-fs NAMENODE -chmod 999 /file1</command>
  9896. </test-commands>
  9897. <cleanup-commands>
  9898. <command>-fs NAMENODE -rm /file1</command>
  9899. </cleanup-commands>
  9900. <comparators>
  9901. <comparator>
  9902. <type>RegexpComparator</type>
  9903. <expected-output>^-chmod: chmod : mode '999' does not match the expected pattern.</expected-output>
  9904. </comparator>
  9905. </comparators>
  9906. </test>
  9907. <test> <!-- TESTED -->
  9908. <description>chmod: invalid value in octal mode of file in relative path</description>
  9909. <test-commands>
  9910. <command>-fs NAMENODE -touchz file1</command>
  9911. <command>-fs NAMENODE -chmod 999 file1</command>
  9912. </test-commands>
  9913. <cleanup-commands>
  9914. <command>-fs NAMENODE -rm file1</command>
  9915. </cleanup-commands>
  9916. <comparators>
  9917. <comparator>
  9918. <type>RegexpComparator</type>
  9919. <expected-output>^-chmod: chmod : mode '999' does not match the expected pattern.</expected-output>
  9920. </comparator>
  9921. </comparators>
  9922. </test>
  9923. <test> <!-- TESTED -->
  9924. <description>chmod: invalid value in normal mode of file in absolute path</description>
  9925. <test-commands>
  9926. <command>-fs NAMENODE -touchz /file1</command>
  9927. <command>-fs NAMENODE -chmod r+def /file1</command>
  9928. </test-commands>
  9929. <cleanup-commands>
  9930. <command>-fs NAMENODE -rm /file1</command>
  9931. </cleanup-commands>
  9932. <comparators>
  9933. <comparator>
  9934. <type>RegexpComparator</type>
  9935. <expected-output>^-chmod: chmod : mode \'r\+def\' does not match the expected pattern.</expected-output>
  9936. </comparator>
  9937. </comparators>
  9938. </test>
  9939. <test> <!-- TESTED -->
  9940. <description>chmod: invalid value in normal mode of file in relative path</description>
  9941. <test-commands>
  9942. <command>-fs NAMENODE -touchz file1</command>
  9943. <command>-fs NAMENODE -chmod r+def file1</command>
  9944. </test-commands>
  9945. <cleanup-commands>
  9946. <command>-fs NAMENODE -rm file1</command>
  9947. </cleanup-commands>
  9948. <comparators>
  9949. <comparator>
  9950. <type>RegexpComparator</type>
  9951. <expected-output>^-chmod: chmod : mode \'r\+def\' does not match the expected pattern.</expected-output>
  9952. </comparator>
  9953. </comparators>
  9954. </test>
  9955. <test> <!-- TESTED -->
  9956. <description>chmod: change permission(octal mode) of file in hdfs:// path</description>
  9957. <test-commands>
  9958. <command>-fs NAMENODE -touchz hdfs:///file1</command>
  9959. <command>-fs NAMENODE -chmod 777 hdfs:///file1</command>
  9960. <command>-fs NAMENODE -ls hdfs:///file1</command>
  9961. </test-commands>
  9962. <cleanup-commands>
  9963. <command>-fs NAMENODE -rm hdfs:///file1</command>
  9964. </cleanup-commands>
  9965. <comparators>
  9966. <comparator>
  9967. <type>RegexpComparator</type>
  9968. <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>
  9969. </comparator>
  9970. </comparators>
  9971. </test>
  9972. <test> <!-- TESTED -->
  9973. <description>chmod: change permission(octal mode) of directory in hdfs:// path</description>
  9974. <test-commands>
  9975. <command>-fs NAMENODE -mkdir hdfs:///dir0</command>
  9976. <command>-fs NAMENODE -mkdir hdfs:///dir0/dir1</command>
  9977. <command>-fs NAMENODE -touchz hdfs:///dir0/file0</command>
  9978. <command>-fs NAMENODE -touchz hdfs:///dir0/dir1/file1</command>
  9979. <command>-fs NAMENODE -touchz hdfs:///dir0/dir1/file2</command>
  9980. <command>-fs NAMENODE -chmod 777 hdfs:///dir0/dir1</command>
  9981. <command>-fs NAMENODE -ls -R hdfs:///dir0</command>
  9982. </test-commands>
  9983. <cleanup-commands>
  9984. <command>-fs NAMENODE -rm -r hdfs:///dir0</command>
  9985. </cleanup-commands>
  9986. <comparators>
  9987. <comparator>
  9988. <type>RegexpComparator</type>
  9989. <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>
  9990. </comparator>
  9991. <comparator>
  9992. <type>RegexpComparator</type>
  9993. <expected-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>
  9994. </comparator>
  9995. <comparator>
  9996. <type>RegexpComparator</type>
  9997. <expected-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>
  9998. </comparator>
  9999. <comparator>
  10000. <type>RegexpComparator</type>
  10001. <expected-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>
  10002. </comparator>
  10003. </comparators>
  10004. </test>
  10005. <test> <!-- TESTED -->
  10006. <description>chmod: change permission(normal mode) of file in hdfs:// path</description>
  10007. <test-commands>
  10008. <command>-fs NAMENODE -touchz hdfs:///file1</command>
  10009. <command>-fs NAMENODE -chmod a+rw hdfs:///file1</command>
  10010. <command>-fs NAMENODE -ls hdfs:///file1</command>
  10011. </test-commands>
  10012. <cleanup-commands>
  10013. <command>-fs NAMENODE -rm hdfs:///file1</command>
  10014. </cleanup-commands>
  10015. <comparators>
  10016. <comparator>
  10017. <type>RegexpComparator</type>
  10018. <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>
  10019. </comparator>
  10020. </comparators>
  10021. </test>
  10022. <test> <!-- TESTED -->
  10023. <description>chmod: change permission(normal mode) of directory in hdfs:// path</description>
  10024. <test-commands>
  10025. <command>-fs NAMENODE -mkdir hdfs:///dir0</command>
  10026. <command>-fs NAMENODE -mkdir hdfs:///dir0/dir1</command>
  10027. <command>-fs NAMENODE -touchz hdfs:///dir0/file0</command>
  10028. <command>-fs NAMENODE -touchz hdfs:///dir0/dir1/file1</command>
  10029. <command>-fs NAMENODE -touchz hdfs:///dir0/dir1/file2</command>
  10030. <command>-fs NAMENODE -chmod a+rwx hdfs:///dir0/dir1</command>
  10031. <command>-fs NAMENODE -ls -R hdfs:///dir0</command>
  10032. </test-commands>
  10033. <cleanup-commands>
  10034. <command>-fs NAMENODE -rm -r hdfs:///dir0</command>
  10035. </cleanup-commands>
  10036. <comparators>
  10037. <comparator>
  10038. <type>RegexpComparator</type>
  10039. <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>
  10040. </comparator>
  10041. <comparator>
  10042. <type>RegexpComparator</type>
  10043. <expected-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>
  10044. </comparator>
  10045. <comparator>
  10046. <type>RegexpComparator</type>
  10047. <expected-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>
  10048. </comparator>
  10049. <comparator>
  10050. <type>RegexpComparator</type>
  10051. <expected-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>
  10052. </comparator>
  10053. </comparators>
  10054. </test>
  10055. <test> <!-- TESTED -->
  10056. <description>chmod: change permission(octal mode) of directory in hdfs:// path recursively </description>
  10057. <test-commands>
  10058. <command>-fs NAMENODE -mkdir hdfs:///dir0</command>
  10059. <command>-fs NAMENODE -mkdir hdfs:///dir0/dir1</command>
  10060. <command>-fs NAMENODE -touchz hdfs:///dir0/file0</command>
  10061. <command>-fs NAMENODE -touchz hdfs:///dir0/dir1/file1</command>
  10062. <command>-fs NAMENODE -touchz hdfs:///dir0/dir1/file2</command>
  10063. <command>-fs NAMENODE -chmod -R 777 hdfs:///dir0/dir1</command>
  10064. <command>-fs NAMENODE -ls -R hdfs:///dir0</command>
  10065. </test-commands>
  10066. <cleanup-commands>
  10067. <command>-fs NAMENODE -rm -r hdfs:///dir0</command>
  10068. </cleanup-commands>
  10069. <comparators>
  10070. <comparator>
  10071. <type>RegexpComparator</type>
  10072. <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>
  10073. </comparator>
  10074. <comparator>
  10075. <type>RegexpComparator</type>
  10076. <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>
  10077. </comparator>
  10078. <comparator>
  10079. <type>RegexpComparator</type>
  10080. <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>
  10081. </comparator>
  10082. <comparator>
  10083. <type>RegexpComparator</type>
  10084. <expected-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>
  10085. </comparator>
  10086. </comparators>
  10087. </test>
  10088. <test> <!-- TESTED -->
  10089. <description>chmod: change permission(normal mode) of directory in hdfs:// path recursively</description>
  10090. <test-commands>
  10091. <command>-fs NAMENODE -mkdir hdfs:///dir0</command>
  10092. <command>-fs NAMENODE -mkdir hdfs:///dir0/dir1</command>
  10093. <command>-fs NAMENODE -touchz hdfs:///dir0/file0</command>
  10094. <command>-fs NAMENODE -touchz hdfs:///dir0/dir1/file1</command>
  10095. <command>-fs NAMENODE -touchz hdfs:///dir0/dir1/file2</command>
  10096. <command>-fs NAMENODE -chmod -R a+rwx hdfs:///dir0/dir1</command>
  10097. <command>-fs NAMENODE -ls -R hdfs:///dir0</command>
  10098. </test-commands>
  10099. <cleanup-commands>
  10100. <command>-fs NAMENODE -rm -r hdfs:///dir0</command>
  10101. </cleanup-commands>
  10102. <comparators>
  10103. <comparator>
  10104. <type>RegexpComparator</type>
  10105. <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>
  10106. </comparator>
  10107. <comparator>
  10108. <type>RegexpComparator</type>
  10109. <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>
  10110. </comparator>
  10111. <comparator>
  10112. <type>RegexpComparator</type>
  10113. <expected-output>^-rwxrwxrwx( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir0/dir1/file2</expected-output>
  10114. </comparator>
  10115. <comparator>
  10116. <type>RegexpComparator</type>
  10117. <expected-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>
  10118. </comparator>
  10119. </comparators>
  10120. </test>
  10121. <test> <!-- TESTED -->
  10122. <description>chmod: change permission(octal mode) of non existent file in hdfs:// path</description>
  10123. <test-commands>
  10124. <command>-fs NAMENODE -chmod 777 hdfs:///file1</command>
  10125. </test-commands>
  10126. <cleanup-commands>
  10127. <command>-fs NAMENODE -rm hdfs:///file1</command>
  10128. </cleanup-commands>
  10129. <comparators>
  10130. <comparator>
  10131. <type>RegexpComparator</type>
  10132. <expected-output>^chmod: `hdfs:///file1': No such file or directory</expected-output>
  10133. </comparator>
  10134. </comparators>
  10135. </test>
  10136. <test> <!-- TESTED -->
  10137. <description>chmod: change permission(normal mode) of non existent file in hdfs:// path</description>
  10138. <test-commands>
  10139. <command>-fs NAMENODE -chmod a+rw hdfs:///file1</command>
  10140. </test-commands>
  10141. <cleanup-commands>
  10142. <command>-fs NAMENODE -rm hdfs:///file1</command>
  10143. </cleanup-commands>
  10144. <comparators>
  10145. <comparator>
  10146. <type>RegexpComparator</type>
  10147. <expected-output>^chmod: `hdfs:///file1': No such file or directory</expected-output>
  10148. </comparator>
  10149. </comparators>
  10150. </test>
  10151. <test> <!-- TESTED -->
  10152. <description>chmod: change permission(octal mode) of multiple files in hdfs:// path using globbing</description>
  10153. <test-commands>
  10154. <command>-fs NAMENODE -touchz hdfs:///file1</command>
  10155. <command>-fs NAMENODE -touchz hdfs:///file2</command>
  10156. <command>-fs NAMENODE -touchz hdfs:///file3</command>
  10157. <command>-fs NAMENODE -touchz hdfs:///file4</command>
  10158. <command>-fs NAMENODE -chmod 777 hdfs:///file* </command>
  10159. <command>-fs NAMENODE -ls -R hdfs:///file*</command>
  10160. </test-commands>
  10161. <cleanup-commands>
  10162. <command>-fs NAMENODE -rm hdfs:///file*</command>
  10163. </cleanup-commands>
  10164. <comparators>
  10165. <comparator>
  10166. <type>RegexpComparator</type>
  10167. <expected-output>^-rwxrwxrwx( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///file1</expected-output>
  10168. </comparator>
  10169. <comparator>
  10170. <type>RegexpComparator</type>
  10171. <expected-output>^-rwxrwxrwx( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///file2</expected-output>
  10172. </comparator>
  10173. <comparator>
  10174. <type>RegexpComparator</type>
  10175. <expected-output>^-rwxrwxrwx( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///file3</expected-output>
  10176. </comparator>
  10177. <comparator>
  10178. <type>RegexpComparator</type>
  10179. <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>
  10180. </comparator>
  10181. </comparators>
  10182. </test>
  10183. <test> <!-- TESTED -->
  10184. <description>chmod: change permission(octal mode) of multiple directories in hdfs:// path using globbing</description>
  10185. <test-commands>
  10186. <command>-fs NAMENODE -mkdir hdfs:///dir0</command>
  10187. <command>-fs NAMENODE -mkdir hdfs:///dir0/dir1</command>
  10188. <command>-fs NAMENODE -touchz hdfs:///dir0/file0</command>
  10189. <command>-fs NAMENODE -touchz hdfs:///dir0/dir1/file1</command>
  10190. <command>-fs NAMENODE -touchz hdfs:///dir0/dir1/file2</command>
  10191. <command>-fs NAMENODE -mkdir hdfs:///dir2</command>
  10192. <command>-fs NAMENODE -mkdir hdfs:///dir2/dir1</command>
  10193. <command>-fs NAMENODE -touchz hdfs:///dir2/file0</command>
  10194. <command>-fs NAMENODE -touchz hdfs:///dir2/dir1/file1</command>
  10195. <command>-fs NAMENODE -touchz hdfs:///dir2/dir1/file2</command>
  10196. <command>-fs NAMENODE -chmod 777 hdfs:///dir*</command>
  10197. <command>-fs NAMENODE -ls -R hdfs:///dir*</command>
  10198. </test-commands>
  10199. <cleanup-commands>
  10200. <command>-fs NAMENODE -rm -r hdfs:///dir*</command>
  10201. </cleanup-commands>
  10202. <comparators>
  10203. <comparator>
  10204. <type>RegexpComparator</type>
  10205. <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>
  10206. </comparator>
  10207. <comparator>
  10208. <type>RegexpComparator</type>
  10209. <expected-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>
  10210. </comparator>
  10211. <comparator>
  10212. <type>RegexpComparator</type>
  10213. <expected-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>
  10214. </comparator>
  10215. <comparator>
  10216. <type>RegexpComparator</type>
  10217. <expected-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>
  10218. </comparator>
  10219. <comparator>
  10220. <type>RegexpComparator</type>
  10221. <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>
  10222. </comparator>
  10223. <comparator>
  10224. <type>RegexpComparator</type>
  10225. <expected-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>
  10226. </comparator>
  10227. <comparator>
  10228. <type>RegexpComparator</type>
  10229. <expected-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>
  10230. </comparator>
  10231. <comparator>
  10232. <type>RegexpComparator</type>
  10233. <expected-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>
  10234. </comparator>
  10235. </comparators>
  10236. </test>
  10237. <test> <!-- TESTED -->
  10238. <description>chmod: change permission(octal mode) of multiple files in hdfs:// path without globbing</description>
  10239. <test-commands>
  10240. <command>-fs NAMENODE -touchz hdfs:///file1</command>
  10241. <command>-fs NAMENODE -touchz hdfs:///file2</command>
  10242. <command>-fs NAMENODE -touchz hdfs:///file3</command>
  10243. <command>-fs NAMENODE -touchz hdfs:///file4</command>
  10244. <command>-fs NAMENODE -chmod 777 hdfs:///file1 hdfs:///file2 hdfs:///file3 hdfs:///file4 </command>
  10245. <command>-fs NAMENODE -ls -R hdfs:///file*</command>
  10246. </test-commands>
  10247. <cleanup-commands>
  10248. <command>-fs NAMENODE -rm hdfs:///file*</command>
  10249. </cleanup-commands>
  10250. <comparators>
  10251. <comparator>
  10252. <type>RegexpComparator</type>
  10253. <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>
  10254. </comparator>
  10255. <comparator>
  10256. <type>RegexpComparator</type>
  10257. <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>
  10258. </comparator>
  10259. <comparator>
  10260. <type>RegexpComparator</type>
  10261. <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>
  10262. </comparator>
  10263. <comparator>
  10264. <type>RegexpComparator</type>
  10265. <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>
  10266. </comparator>
  10267. </comparators>
  10268. </test>
  10269. <test> <!-- TESTED -->
  10270. <description>chmod: change permission(octal mode) of multiple directories in hdfs:// path without globbing</description>
  10271. <test-commands>
  10272. <command>-fs NAMENODE -mkdir hdfs:///dir0</command>
  10273. <command>-fs NAMENODE -mkdir hdfs:///dir0/dir1</command>
  10274. <command>-fs NAMENODE -touchz hdfs:///dir0/file0</command>
  10275. <command>-fs NAMENODE -touchz hdfs:///dir0/dir1/file1</command>
  10276. <command>-fs NAMENODE -touchz hdfs:///dir0/dir1/file2</command>
  10277. <command>-fs NAMENODE -mkdir hdfs:///dir2</command>
  10278. <command>-fs NAMENODE -mkdir hdfs:///dir2/dir1</command>
  10279. <command>-fs NAMENODE -touchz hdfs:///dir2/file0</command>
  10280. <command>-fs NAMENODE -touchz hdfs:///dir2/dir1/file1</command>
  10281. <command>-fs NAMENODE -touchz hdfs:///dir2/dir1/file2</command>
  10282. <command>-fs NAMENODE -chmod 777 hdfs:///dir0 hdfs:///dir2</command>
  10283. <command>-fs NAMENODE -ls -R hdfs:///dir*</command>
  10284. </test-commands>
  10285. <cleanup-commands>
  10286. <command>-fs NAMENODE -rm -r hdfs:///dir*</command>
  10287. </cleanup-commands>
  10288. <comparators>
  10289. <comparator>
  10290. <type>RegexpComparator</type>
  10291. <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>
  10292. </comparator>
  10293. <comparator>
  10294. <type>RegexpComparator</type>
  10295. <expected-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>
  10296. </comparator>
  10297. <comparator>
  10298. <type>RegexpComparator</type>
  10299. <expected-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>
  10300. </comparator>
  10301. <comparator>
  10302. <type>RegexpComparator</type>
  10303. <expected-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>
  10304. </comparator>
  10305. <comparator>
  10306. <type>RegexpComparator</type>
  10307. <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>
  10308. </comparator>
  10309. <comparator>
  10310. <type>RegexpComparator</type>
  10311. <expected-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>
  10312. </comparator>
  10313. <comparator>
  10314. <type>RegexpComparator</type>
  10315. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir2/dir1/file2</expected-output>
  10316. </comparator>
  10317. <comparator>
  10318. <type>RegexpComparator</type>
  10319. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir2/file0</expected-output>
  10320. </comparator>
  10321. </comparators>
  10322. </test>
  10323. <test> <!-- TESTED -->
  10324. <description>chmod: change permission(normal mode) of multiple files in hdfs:// path using globbing</description>
  10325. <test-commands>
  10326. <command>-fs NAMENODE -touchz hdfs:///file1</command>
  10327. <command>-fs NAMENODE -touchz hdfs:///file2</command>
  10328. <command>-fs NAMENODE -touchz hdfs:///file3</command>
  10329. <command>-fs NAMENODE -touchz hdfs:///file4</command>
  10330. <command>-fs NAMENODE -chmod a+rw hdfs:///file* </command>
  10331. <command>-fs NAMENODE -ls -R hdfs:///file*</command>
  10332. </test-commands>
  10333. <cleanup-commands>
  10334. <command>-fs NAMENODE -rm hdfs:///file*</command>
  10335. </cleanup-commands>
  10336. <comparators>
  10337. <comparator>
  10338. <type>RegexpComparator</type>
  10339. <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>
  10340. </comparator>
  10341. <comparator>
  10342. <type>RegexpComparator</type>
  10343. <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>
  10344. </comparator>
  10345. <comparator>
  10346. <type>RegexpComparator</type>
  10347. <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>
  10348. </comparator>
  10349. <comparator>
  10350. <type>RegexpComparator</type>
  10351. <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>
  10352. </comparator>
  10353. </comparators>
  10354. </test>
  10355. <test> <!-- TESTED -->
  10356. <description>chmod: change permission(normal mode) of multiple directories in hdfs:// path using globbing</description>
  10357. <test-commands>
  10358. <command>-fs NAMENODE -mkdir hdfs:///dir0</command>
  10359. <command>-fs NAMENODE -mkdir hdfs:///dir0/dir1</command>
  10360. <command>-fs NAMENODE -touchz hdfs:///dir0/file0</command>
  10361. <command>-fs NAMENODE -touchz hdfs:///dir0/dir1/file1</command>
  10362. <command>-fs NAMENODE -touchz hdfs:///dir0/dir1/file2</command>
  10363. <command>-fs NAMENODE -mkdir hdfs:///dir2</command>
  10364. <command>-fs NAMENODE -mkdir hdfs:///dir2/dir1</command>
  10365. <command>-fs NAMENODE -touchz hdfs:///dir2/file0</command>
  10366. <command>-fs NAMENODE -touchz hdfs:///dir2/dir1/file1</command>
  10367. <command>-fs NAMENODE -touchz hdfs:///dir2/dir1/file2</command>
  10368. <command>-fs NAMENODE -chmod a+rwx hdfs:///dir*</command>
  10369. <command>-fs NAMENODE -ls -R hdfs:///dir*</command>
  10370. </test-commands>
  10371. <cleanup-commands>
  10372. <command>-fs NAMENODE -rm -r hdfs:///dir*</command>
  10373. </cleanup-commands>
  10374. <comparators>
  10375. <comparator>
  10376. <type>RegexpComparator</type>
  10377. <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>
  10378. </comparator>
  10379. <comparator>
  10380. <type>RegexpComparator</type>
  10381. <expected-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>
  10382. </comparator>
  10383. <comparator>
  10384. <type>RegexpComparator</type>
  10385. <expected-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>
  10386. </comparator>
  10387. <comparator>
  10388. <type>RegexpComparator</type>
  10389. <expected-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>
  10390. </comparator>
  10391. <comparator>
  10392. <type>RegexpComparator</type>
  10393. <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>
  10394. </comparator>
  10395. <comparator>
  10396. <type>RegexpComparator</type>
  10397. <expected-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>
  10398. </comparator>
  10399. <comparator>
  10400. <type>RegexpComparator</type>
  10401. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir2/dir1/file2</expected-output>
  10402. </comparator>
  10403. <comparator>
  10404. <type>RegexpComparator</type>
  10405. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir2/file0</expected-output>
  10406. </comparator>
  10407. </comparators>
  10408. </test>
  10409. <test> <!-- TESTED -->
  10410. <description>chmod: change permission(normal mode) of multiple files in hdfs:// path without globbing</description>
  10411. <test-commands>
  10412. <command>-fs NAMENODE -touchz hdfs:///file1</command>
  10413. <command>-fs NAMENODE -touchz hdfs:///file2</command>
  10414. <command>-fs NAMENODE -touchz hdfs:///file3</command>
  10415. <command>-fs NAMENODE -touchz hdfs:///file4</command>
  10416. <command>-fs NAMENODE -chmod a+rw hdfs:///file1 hdfs:///file2 hdfs:///file3 hdfs:///file4 </command>
  10417. <command>-fs NAMENODE -ls -R hdfs:///file*</command>
  10418. </test-commands>
  10419. <cleanup-commands>
  10420. <command>-fs NAMENODE -rm hdfs:///file*</command>
  10421. </cleanup-commands>
  10422. <comparators>
  10423. <comparator>
  10424. <type>RegexpComparator</type>
  10425. <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>
  10426. </comparator>
  10427. <comparator>
  10428. <type>RegexpComparator</type>
  10429. <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>
  10430. </comparator>
  10431. <comparator>
  10432. <type>RegexpComparator</type>
  10433. <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>
  10434. </comparator>
  10435. <comparator>
  10436. <type>RegexpComparator</type>
  10437. <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>
  10438. </comparator>
  10439. </comparators>
  10440. </test>
  10441. <test> <!-- TESTED -->
  10442. <description>chmod: change permission(normal mode) of multiple directories in hdfs:// path without globbing</description>
  10443. <test-commands>
  10444. <command>-fs NAMENODE -mkdir hdfs:///dir0</command>
  10445. <command>-fs NAMENODE -mkdir hdfs:///dir0/dir1</command>
  10446. <command>-fs NAMENODE -touchz hdfs:///dir0/file0</command>
  10447. <command>-fs NAMENODE -touchz hdfs:///dir0/dir1/file1</command>
  10448. <command>-fs NAMENODE -touchz hdfs:///dir0/dir1/file2</command>
  10449. <command>-fs NAMENODE -mkdir hdfs:///dir2</command>
  10450. <command>-fs NAMENODE -mkdir hdfs:///dir2/dir1</command>
  10451. <command>-fs NAMENODE -touchz hdfs:///dir2/file0</command>
  10452. <command>-fs NAMENODE -touchz hdfs:///dir2/dir1/file1</command>
  10453. <command>-fs NAMENODE -touchz hdfs:///dir2/dir1/file2</command>
  10454. <command>-fs NAMENODE -chmod a+rwx hdfs:///dir0 hdfs:///dir2</command>
  10455. <command>-fs NAMENODE -ls -R hdfs:///dir*</command>
  10456. </test-commands>
  10457. <cleanup-commands>
  10458. <command>-fs NAMENODE -rm -r hdfs:///dir*</command>
  10459. </cleanup-commands>
  10460. <comparators>
  10461. <comparator>
  10462. <type>RegexpComparator</type>
  10463. <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>
  10464. </comparator>
  10465. <comparator>
  10466. <type>RegexpComparator</type>
  10467. <expected-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>
  10468. </comparator>
  10469. <comparator>
  10470. <type>RegexpComparator</type>
  10471. <expected-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>
  10472. </comparator>
  10473. <comparator>
  10474. <type>RegexpComparator</type>
  10475. <expected-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>
  10476. </comparator>
  10477. <comparator>
  10478. <type>RegexpComparator</type>
  10479. <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>
  10480. </comparator>
  10481. <comparator>
  10482. <type>RegexpComparator</type>
  10483. <expected-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>
  10484. </comparator>
  10485. <comparator>
  10486. <type>RegexpComparator</type>
  10487. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir2/dir1/file2</expected-output>
  10488. </comparator>
  10489. <comparator>
  10490. <type>RegexpComparator</type>
  10491. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir2/file0</expected-output>
  10492. </comparator>
  10493. </comparators>
  10494. </test>
  10495. <test> <!-- TESTED -->
  10496. <description>chmod: change permission(octal mode) of multiple directories in hdfs:// path recursively using globbing</description>
  10497. <test-commands>
  10498. <command>-fs NAMENODE -mkdir hdfs:///dir0</command>
  10499. <command>-fs NAMENODE -mkdir hdfs:///dir0/dir1</command>
  10500. <command>-fs NAMENODE -touchz hdfs:///dir0/file0</command>
  10501. <command>-fs NAMENODE -touchz hdfs:///dir0/dir1/file1</command>
  10502. <command>-fs NAMENODE -touchz hdfs:///dir0/dir1/file2</command>
  10503. <command>-fs NAMENODE -mkdir hdfs:///dir2</command>
  10504. <command>-fs NAMENODE -mkdir hdfs:///dir2/dir1</command>
  10505. <command>-fs NAMENODE -touchz hdfs:///dir2/file0</command>
  10506. <command>-fs NAMENODE -touchz hdfs:///dir2/dir1/file1</command>
  10507. <command>-fs NAMENODE -touchz hdfs:///dir2/dir1/file2</command>
  10508. <command>-fs NAMENODE -chmod -R 777 hdfs:///dir*</command>
  10509. <command>-fs NAMENODE -ls -R hdfs:///dir*</command>
  10510. </test-commands>
  10511. <cleanup-commands>
  10512. <command>-fs NAMENODE -rm -r hdfs:///dir*</command>
  10513. </cleanup-commands>
  10514. <comparators>
  10515. <comparator>
  10516. <type>RegexpComparator</type>
  10517. <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>
  10518. </comparator>
  10519. <comparator>
  10520. <type>RegexpComparator</type>
  10521. <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>
  10522. </comparator>
  10523. <comparator>
  10524. <type>RegexpComparator</type>
  10525. <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>
  10526. </comparator>
  10527. <comparator>
  10528. <type>RegexpComparator</type>
  10529. <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>
  10530. </comparator>
  10531. <comparator>
  10532. <type>RegexpComparator</type>
  10533. <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>
  10534. </comparator>
  10535. <comparator>
  10536. <type>RegexpComparator</type>
  10537. <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>
  10538. </comparator>
  10539. <comparator>
  10540. <type>RegexpComparator</type>
  10541. <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>
  10542. </comparator>
  10543. <comparator>
  10544. <type>RegexpComparator</type>
  10545. <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>
  10546. </comparator>
  10547. </comparators>
  10548. </test>
  10549. <test> <!-- TESTED -->
  10550. <description>chmod: change permission(octal mode) of multiple directories in hdfs:// path recursively without globbing</description>
  10551. <test-commands>
  10552. <command>-fs NAMENODE -mkdir hdfs:///dir0</command>
  10553. <command>-fs NAMENODE -mkdir hdfs:///dir0/dir1</command>
  10554. <command>-fs NAMENODE -touchz hdfs:///dir0/file0</command>
  10555. <command>-fs NAMENODE -touchz hdfs:///dir0/dir1/file1</command>
  10556. <command>-fs NAMENODE -touchz hdfs:///dir0/dir1/file2</command>
  10557. <command>-fs NAMENODE -mkdir hdfs:///dir2</command>
  10558. <command>-fs NAMENODE -mkdir hdfs:///dir2/dir1</command>
  10559. <command>-fs NAMENODE -touchz hdfs:///dir2/file0</command>
  10560. <command>-fs NAMENODE -touchz hdfs:///dir2/dir1/file1</command>
  10561. <command>-fs NAMENODE -touchz hdfs:///dir2/dir1/file2</command>
  10562. <command>-fs NAMENODE -chmod -R 777 hdfs:///dir0 hdfs:///dir2</command>
  10563. <command>-fs NAMENODE -ls -R hdfs:///dir*</command>
  10564. </test-commands>
  10565. <cleanup-commands>
  10566. <command>-fs NAMENODE -rm -r hdfs:///dir*</command>
  10567. </cleanup-commands>
  10568. <comparators>
  10569. <comparator>
  10570. <type>RegexpComparator</type>
  10571. <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>
  10572. </comparator>
  10573. <comparator>
  10574. <type>RegexpComparator</type>
  10575. <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>
  10576. </comparator>
  10577. <comparator>
  10578. <type>RegexpComparator</type>
  10579. <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>
  10580. </comparator>
  10581. <comparator>
  10582. <type>RegexpComparator</type>
  10583. <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>
  10584. </comparator>
  10585. <comparator>
  10586. <type>RegexpComparator</type>
  10587. <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>
  10588. </comparator>
  10589. <comparator>
  10590. <type>RegexpComparator</type>
  10591. <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>
  10592. </comparator>
  10593. <comparator>
  10594. <type>RegexpComparator</type>
  10595. <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>
  10596. </comparator>
  10597. <comparator>
  10598. <type>RegexpComparator</type>
  10599. <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>
  10600. </comparator>
  10601. </comparators>
  10602. </test>
  10603. <test> <!-- TESTED -->
  10604. <description>chmod: change permission(normal mode) of multiple directories in hdfs:// path recursively using globbing</description>
  10605. <test-commands>
  10606. <command>-fs NAMENODE -mkdir hdfs:///dir0</command>
  10607. <command>-fs NAMENODE -mkdir hdfs:///dir0/dir1</command>
  10608. <command>-fs NAMENODE -touchz hdfs:///dir0/file0</command>
  10609. <command>-fs NAMENODE -touchz hdfs:///dir0/dir1/file1</command>
  10610. <command>-fs NAMENODE -touchz hdfs:///dir0/dir1/file2</command>
  10611. <command>-fs NAMENODE -mkdir hdfs:///dir2</command>
  10612. <command>-fs NAMENODE -mkdir hdfs:///dir2/dir1</command>
  10613. <command>-fs NAMENODE -touchz hdfs:///dir2/file0</command>
  10614. <command>-fs NAMENODE -touchz hdfs:///dir2/dir1/file1</command>
  10615. <command>-fs NAMENODE -touchz hdfs:///dir2/dir1/file2</command>
  10616. <command>-fs NAMENODE -chmod -R a+rwx hdfs:///dir*</command>
  10617. <command>-fs NAMENODE -ls -R hdfs:///dir*</command>
  10618. </test-commands>
  10619. <cleanup-commands>
  10620. <command>-fs NAMENODE -rm -r hdfs:///dir*</command>
  10621. </cleanup-commands>
  10622. <comparators>
  10623. <comparator>
  10624. <type>RegexpComparator</type>
  10625. <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>
  10626. </comparator>
  10627. <comparator>
  10628. <type>RegexpComparator</type>
  10629. <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>
  10630. </comparator>
  10631. <comparator>
  10632. <type>RegexpComparator</type>
  10633. <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>
  10634. </comparator>
  10635. <comparator>
  10636. <type>RegexpComparator</type>
  10637. <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>
  10638. </comparator>
  10639. <comparator>
  10640. <type>RegexpComparator</type>
  10641. <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>
  10642. </comparator>
  10643. <comparator>
  10644. <type>RegexpComparator</type>
  10645. <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>
  10646. </comparator>
  10647. <comparator>
  10648. <type>RegexpComparator</type>
  10649. <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>
  10650. </comparator>
  10651. <comparator>
  10652. <type>RegexpComparator</type>
  10653. <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>
  10654. </comparator>
  10655. </comparators>
  10656. </test>
  10657. <test> <!-- TESTED -->
  10658. <description>chmod: change permission(normal mode) of multiple directories in hdfs:// path recursively without globbing</description>
  10659. <test-commands>
  10660. <command>-fs NAMENODE -mkdir hdfs:///dir0</command>
  10661. <command>-fs NAMENODE -mkdir hdfs:///dir0/dir1</command>
  10662. <command>-fs NAMENODE -touchz hdfs:///dir0/file0</command>
  10663. <command>-fs NAMENODE -touchz hdfs:///dir0/dir1/file1</command>
  10664. <command>-fs NAMENODE -touchz hdfs:///dir0/dir1/file2</command>
  10665. <command>-fs NAMENODE -mkdir hdfs:///dir2</command>
  10666. <command>-fs NAMENODE -mkdir hdfs:///dir2/dir1</command>
  10667. <command>-fs NAMENODE -touchz hdfs:///dir2/file0</command>
  10668. <command>-fs NAMENODE -touchz hdfs:///dir2/dir1/file1</command>
  10669. <command>-fs NAMENODE -touchz hdfs:///dir2/dir1/file2</command>
  10670. <command>-fs NAMENODE -chmod -R a+rwx hdfs:///dir0 hdfs:///dir2</command>
  10671. <command>-fs NAMENODE -ls -R hdfs:///dir*</command>
  10672. </test-commands>
  10673. <cleanup-commands>
  10674. <command>-fs NAMENODE -rm -r hdfs:///dir*</command>
  10675. </cleanup-commands>
  10676. <comparators>
  10677. <comparator>
  10678. <type>RegexpComparator</type>
  10679. <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>
  10680. </comparator>
  10681. <comparator>
  10682. <type>RegexpComparator</type>
  10683. <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>
  10684. </comparator>
  10685. <comparator>
  10686. <type>RegexpComparator</type>
  10687. <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>
  10688. </comparator>
  10689. <comparator>
  10690. <type>RegexpComparator</type>
  10691. <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>
  10692. </comparator>
  10693. <comparator>
  10694. <type>RegexpComparator</type>
  10695. <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>
  10696. </comparator>
  10697. <comparator>
  10698. <type>RegexpComparator</type>
  10699. <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>
  10700. </comparator>
  10701. <comparator>
  10702. <type>RegexpComparator</type>
  10703. <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>
  10704. </comparator>
  10705. <comparator>
  10706. <type>RegexpComparator</type>
  10707. <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>
  10708. </comparator>
  10709. </comparators>
  10710. </test>
  10711. <test> <!-- TESTED -->
  10712. <description>chmod: invalid value in octal mode of file in hdfs:// path</description>
  10713. <test-commands>
  10714. <command>-fs NAMENODE -touchz hdfs:///file1</command>
  10715. <command>-fs NAMENODE -chmod 999 hdfs:///file1</command>
  10716. </test-commands>
  10717. <cleanup-commands>
  10718. <command>-fs NAMENODE -rm hdfs:///file1</command>
  10719. </cleanup-commands>
  10720. <comparators>
  10721. <comparator>
  10722. <type>RegexpComparator</type>
  10723. <expected-output>^-chmod: chmod : mode '999' does not match the expected pattern.</expected-output>
  10724. </comparator>
  10725. </comparators>
  10726. </test>
  10727. <test> <!-- TESTED -->
  10728. <description>chmod: invalid value in normal mode of file in hdfs:// path</description>
  10729. <test-commands>
  10730. <command>-fs NAMENODE -touchz hdfs:///file1</command>
  10731. <command>-fs NAMENODE -chmod rdef hdfs:///file1</command>
  10732. </test-commands>
  10733. <cleanup-commands>
  10734. <command>-fs NAMENODE -rm hdfs:///file1</command>
  10735. </cleanup-commands>
  10736. <comparators>
  10737. <comparator>
  10738. <type>RegexpComparator</type>
  10739. <expected-output>^-chmod: chmod : mode \'rdef\' does not match the expected pattern.</expected-output>
  10740. </comparator>
  10741. </comparators>
  10742. </test>
  10743. <!-- Tests for chmod -->
  10744. <test> <!-- TESTED -->
  10745. <description>chmod: change permission(octal mode) of file in Namenode's path</description>
  10746. <test-commands>
  10747. <command>-fs NAMENODE -touchz NAMENODE/file1</command>
  10748. <command>-fs NAMENODE -chmod 777 NAMENODE/file1</command>
  10749. <command>-fs NAMENODE -ls NAMENODE/file1</command>
  10750. </test-commands>
  10751. <cleanup-commands>
  10752. <command>-fs NAMENODE -rm NAMENODE/file1</command>
  10753. </cleanup-commands>
  10754. <comparators>
  10755. <comparator>
  10756. <type>RegexpComparator</type>
  10757. <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>
  10758. </comparator>
  10759. </comparators>
  10760. </test>
  10761. <test> <!-- TESTED -->
  10762. <description>chmod: change permission(octal mode) of directory in Namenode's path</description>
  10763. <test-commands>
  10764. <command>-fs NAMENODE -mkdir NAMENODE/dir0</command>
  10765. <command>-fs NAMENODE -mkdir NAMENODE/dir0/dir1</command>
  10766. <command>-fs NAMENODE -touchz NAMENODE/dir0/file0</command>
  10767. <command>-fs NAMENODE -touchz NAMENODE/dir0/dir1/file1</command>
  10768. <command>-fs NAMENODE -touchz NAMENODE/dir0/dir1/file2</command>
  10769. <command>-fs NAMENODE -chmod 777 NAMENODE/dir0/dir1</command>
  10770. <command>-fs NAMENODE -ls -R NAMENODE/dir0</command>
  10771. </test-commands>
  10772. <cleanup-commands>
  10773. <command>-fs NAMENODE -rm -r NAMENODE/dir0</command>
  10774. </cleanup-commands>
  10775. <comparators>
  10776. <comparator>
  10777. <type>RegexpComparator</type>
  10778. <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>
  10779. </comparator>
  10780. <comparator>
  10781. <type>RegexpComparator</type>
  10782. <expected-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>
  10783. </comparator>
  10784. <comparator>
  10785. <type>RegexpComparator</type>
  10786. <expected-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>
  10787. </comparator>
  10788. <comparator>
  10789. <type>RegexpComparator</type>
  10790. <expected-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>
  10791. </comparator>
  10792. </comparators>
  10793. </test>
  10794. <test> <!-- TESTED -->
  10795. <description>chmod: change permission(normal mode) of file in Namenode's path</description>
  10796. <test-commands>
  10797. <command>-fs NAMENODE -touchz NAMENODE/file1</command>
  10798. <command>-fs NAMENODE -chmod a+rw NAMENODE/file1</command>
  10799. <command>-fs NAMENODE -ls NAMENODE/file1</command>
  10800. </test-commands>
  10801. <cleanup-commands>
  10802. <command>-fs NAMENODE -rm NAMENODE/file1</command>
  10803. </cleanup-commands>
  10804. <comparators>
  10805. <comparator>
  10806. <type>RegexpComparator</type>
  10807. <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>
  10808. </comparator>
  10809. </comparators>
  10810. </test>
  10811. <test> <!-- TESTED -->
  10812. <description>chmod: change permission(normal mode) of directory in Namenode's path</description>
  10813. <test-commands>
  10814. <command>-fs NAMENODE -mkdir NAMENODE/dir0</command>
  10815. <command>-fs NAMENODE -mkdir NAMENODE/dir0/dir1</command>
  10816. <command>-fs NAMENODE -touchz NAMENODE/dir0/file0</command>
  10817. <command>-fs NAMENODE -touchz NAMENODE/dir0/dir1/file1</command>
  10818. <command>-fs NAMENODE -touchz NAMENODE/dir0/dir1/file2</command>
  10819. <command>-fs NAMENODE -chmod a+rwx NAMENODE/dir0/dir1</command>
  10820. <command>-fs NAMENODE -ls -R NAMENODE/dir0</command>
  10821. </test-commands>
  10822. <cleanup-commands>
  10823. <command>-fs NAMENODE -rm -r NAMENODE/dir0</command>
  10824. </cleanup-commands>
  10825. <comparators>
  10826. <comparator>
  10827. <type>RegexpComparator</type>
  10828. <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>
  10829. </comparator>
  10830. <comparator>
  10831. <type>RegexpComparator</type>
  10832. <expected-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>
  10833. </comparator>
  10834. <comparator>
  10835. <type>RegexpComparator</type>
  10836. <expected-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>
  10837. </comparator>
  10838. <comparator>
  10839. <type>RegexpComparator</type>
  10840. <expected-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>
  10841. </comparator>
  10842. </comparators>
  10843. </test>
  10844. <test> <!-- TESTED -->
  10845. <description>chmod: change permission(octal mode) of directory in Namenode's path recursively </description>
  10846. <test-commands>
  10847. <command>-fs NAMENODE -mkdir NAMENODE/dir0</command>
  10848. <command>-fs NAMENODE -mkdir NAMENODE/dir0/dir1</command>
  10849. <command>-fs NAMENODE -touchz NAMENODE/dir0/file0</command>
  10850. <command>-fs NAMENODE -touchz NAMENODE/dir0/dir1/file1</command>
  10851. <command>-fs NAMENODE -touchz NAMENODE/dir0/dir1/file2</command>
  10852. <command>-fs NAMENODE -chmod -R 777 NAMENODE/dir0/dir1</command>
  10853. <command>-fs NAMENODE -ls -R NAMENODE/dir0</command>
  10854. </test-commands>
  10855. <cleanup-commands>
  10856. <command>-fs NAMENODE -rm -r NAMENODE/dir0</command>
  10857. </cleanup-commands>
  10858. <comparators>
  10859. <comparator>
  10860. <type>RegexpComparator</type>
  10861. <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>
  10862. </comparator>
  10863. <comparator>
  10864. <type>RegexpComparator</type>
  10865. <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>
  10866. </comparator>
  10867. <comparator>
  10868. <type>RegexpComparator</type>
  10869. <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>
  10870. </comparator>
  10871. <comparator>
  10872. <type>RegexpComparator</type>
  10873. <expected-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>
  10874. </comparator>
  10875. </comparators>
  10876. </test>
  10877. <test> <!-- TESTED -->
  10878. <description>chmod: change permission(normal mode) of directory in Namenode's path recursively</description>
  10879. <test-commands>
  10880. <command>-fs NAMENODE -mkdir NAMENODE/dir0</command>
  10881. <command>-fs NAMENODE -mkdir NAMENODE/dir0/dir1</command>
  10882. <command>-fs NAMENODE -touchz NAMENODE/dir0/file0</command>
  10883. <command>-fs NAMENODE -touchz NAMENODE/dir0/dir1/file1</command>
  10884. <command>-fs NAMENODE -touchz NAMENODE/dir0/dir1/file2</command>
  10885. <command>-fs NAMENODE -chmod -R a+rwx NAMENODE/dir0/dir1</command>
  10886. <command>-fs NAMENODE -ls -R NAMENODE/dir0</command>
  10887. </test-commands>
  10888. <cleanup-commands>
  10889. <command>-fs NAMENODE -rm -r NAMENODE/dir0</command>
  10890. </cleanup-commands>
  10891. <comparators>
  10892. <comparator>
  10893. <type>RegexpComparator</type>
  10894. <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>
  10895. </comparator>
  10896. <comparator>
  10897. <type>RegexpComparator</type>
  10898. <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>
  10899. </comparator>
  10900. <comparator>
  10901. <type>RegexpComparator</type>
  10902. <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>
  10903. </comparator>
  10904. <comparator>
  10905. <type>RegexpComparator</type>
  10906. <expected-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>
  10907. </comparator>
  10908. </comparators>
  10909. </test>
  10910. <test> <!-- TESTED -->
  10911. <description>chmod: change permission(octal mode) of non existent file in Namenode's path</description>
  10912. <test-commands>
  10913. <command>-fs NAMENODE -chmod 777 NAMENODE/file1</command>
  10914. </test-commands>
  10915. <cleanup-commands>
  10916. <command>-fs NAMENODE -rm NAMENODE/file1</command>
  10917. </cleanup-commands>
  10918. <comparators>
  10919. <comparator>
  10920. <type>RegexpComparator</type>
  10921. <expected-output>^chmod: `NAMENODE/file1': No such file or directory</expected-output>
  10922. </comparator>
  10923. </comparators>
  10924. </test>
  10925. <test> <!-- TESTED -->
  10926. <description>chmod: change permission(normal mode) of non existent file in Namenode's path</description>
  10927. <test-commands>
  10928. <command>-fs NAMENODE -chmod a+rw NAMENODE/file1</command>
  10929. </test-commands>
  10930. <cleanup-commands>
  10931. <command>-fs NAMENODE -rm NAMENODE/file1</command>
  10932. </cleanup-commands>
  10933. <comparators>
  10934. <comparator>
  10935. <type>RegexpComparator</type>
  10936. <expected-output>^chmod: `NAMENODE/file1': No such file or directory</expected-output>
  10937. </comparator>
  10938. </comparators>
  10939. </test>
  10940. <test> <!-- TESTED -->
  10941. <description>chmod: change permission(octal mode) of multiple files in Namenode's path using globbing</description>
  10942. <test-commands>
  10943. <command>-fs NAMENODE -touchz NAMENODE/file1</command>
  10944. <command>-fs NAMENODE -touchz NAMENODE/file2</command>
  10945. <command>-fs NAMENODE -touchz NAMENODE/file3</command>
  10946. <command>-fs NAMENODE -touchz NAMENODE/file4</command>
  10947. <command>-fs NAMENODE -chmod 777 NAMENODE/file* </command>
  10948. <command>-fs NAMENODE -ls -R NAMENODE/file*</command>
  10949. </test-commands>
  10950. <cleanup-commands>
  10951. <command>-fs NAMENODE -rm NAMENODE/file*</command>
  10952. </cleanup-commands>
  10953. <comparators>
  10954. <comparator>
  10955. <type>RegexpComparator</type>
  10956. <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>
  10957. </comparator>
  10958. <comparator>
  10959. <type>RegexpComparator</type>
  10960. <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>
  10961. </comparator>
  10962. <comparator>
  10963. <type>RegexpComparator</type>
  10964. <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>
  10965. </comparator>
  10966. <comparator>
  10967. <type>RegexpComparator</type>
  10968. <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>
  10969. </comparator>
  10970. </comparators>
  10971. </test>
  10972. <test> <!-- TESTED -->
  10973. <description>chmod: change permission(octal mode) of multiple directories in Namenode's path using globbing</description>
  10974. <test-commands>
  10975. <command>-fs NAMENODE -mkdir NAMENODE/dir0</command>
  10976. <command>-fs NAMENODE -mkdir NAMENODE/dir0/dir1</command>
  10977. <command>-fs NAMENODE -touchz NAMENODE/dir0/file0</command>
  10978. <command>-fs NAMENODE -touchz NAMENODE/dir0/dir1/file1</command>
  10979. <command>-fs NAMENODE -touchz NAMENODE/dir0/dir1/file2</command>
  10980. <command>-fs NAMENODE -mkdir NAMENODE/dir2</command>
  10981. <command>-fs NAMENODE -mkdir NAMENODE/dir2/dir1</command>
  10982. <command>-fs NAMENODE -touchz NAMENODE/dir2/file0</command>
  10983. <command>-fs NAMENODE -touchz NAMENODE/dir2/dir1/file1</command>
  10984. <command>-fs NAMENODE -touchz NAMENODE/dir2/dir1/file2</command>
  10985. <command>-fs NAMENODE -chmod 777 NAMENODE/dir*</command>
  10986. <command>-fs NAMENODE -ls -R NAMENODE/dir*</command>
  10987. </test-commands>
  10988. <cleanup-commands>
  10989. <command>-fs NAMENODE -rm -r NAMENODE/dir*</command>
  10990. </cleanup-commands>
  10991. <comparators>
  10992. <comparator>
  10993. <type>RegexpComparator</type>
  10994. <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>
  10995. </comparator>
  10996. <comparator>
  10997. <type>RegexpComparator</type>
  10998. <expected-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>
  10999. </comparator>
  11000. <comparator>
  11001. <type>RegexpComparator</type>
  11002. <expected-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>
  11003. </comparator>
  11004. <comparator>
  11005. <type>RegexpComparator</type>
  11006. <expected-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>
  11007. </comparator>
  11008. <comparator>
  11009. <type>RegexpComparator</type>
  11010. <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>
  11011. </comparator>
  11012. <comparator>
  11013. <type>RegexpComparator</type>
  11014. <expected-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>
  11015. </comparator>
  11016. <comparator>
  11017. <type>RegexpComparator</type>
  11018. <expected-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>
  11019. </comparator>
  11020. <comparator>
  11021. <type>RegexpComparator</type>
  11022. <expected-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>
  11023. </comparator>
  11024. </comparators>
  11025. </test>
  11026. <test> <!-- TESTED -->
  11027. <description>chmod: change permission(octal mode) of multiple files in Namenode's path without globbing</description>
  11028. <test-commands>
  11029. <command>-fs NAMENODE -touchz NAMENODE/file1</command>
  11030. <command>-fs NAMENODE -touchz NAMENODE/file2</command>
  11031. <command>-fs NAMENODE -touchz NAMENODE/file3</command>
  11032. <command>-fs NAMENODE -touchz NAMENODE/file4</command>
  11033. <command>-fs NAMENODE -chmod 777 NAMENODE/file1 NAMENODE/file2 NAMENODE/file3 NAMENODE/file4 </command>
  11034. <command>-fs NAMENODE -ls -R NAMENODE/file*</command>
  11035. </test-commands>
  11036. <cleanup-commands>
  11037. <command>-fs NAMENODE -rm NAMENODE/file*</command>
  11038. </cleanup-commands>
  11039. <comparators>
  11040. <comparator>
  11041. <type>RegexpComparator</type>
  11042. <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>
  11043. </comparator>
  11044. <comparator>
  11045. <type>RegexpComparator</type>
  11046. <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>
  11047. </comparator>
  11048. <comparator>
  11049. <type>RegexpComparator</type>
  11050. <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>
  11051. </comparator>
  11052. <comparator>
  11053. <type>RegexpComparator</type>
  11054. <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>
  11055. </comparator>
  11056. </comparators>
  11057. </test>
  11058. <test> <!-- TESTED -->
  11059. <description>chmod: change permission(octal mode) of multiple directories in Namenode's path without globbing</description>
  11060. <test-commands>
  11061. <command>-fs NAMENODE -mkdir NAMENODE/dir0</command>
  11062. <command>-fs NAMENODE -mkdir NAMENODE/dir0/dir1</command>
  11063. <command>-fs NAMENODE -touchz NAMENODE/dir0/file0</command>
  11064. <command>-fs NAMENODE -touchz NAMENODE/dir0/dir1/file1</command>
  11065. <command>-fs NAMENODE -touchz NAMENODE/dir0/dir1/file2</command>
  11066. <command>-fs NAMENODE -mkdir NAMENODE/dir2</command>
  11067. <command>-fs NAMENODE -mkdir NAMENODE/dir2/dir1</command>
  11068. <command>-fs NAMENODE -touchz NAMENODE/dir2/file0</command>
  11069. <command>-fs NAMENODE -touchz NAMENODE/dir2/dir1/file1</command>
  11070. <command>-fs NAMENODE -touchz NAMENODE/dir2/dir1/file2</command>
  11071. <command>-fs NAMENODE -chmod 777 NAMENODE/dir0 NAMENODE/dir2</command>
  11072. <command>-fs NAMENODE -ls -R NAMENODE/dir*</command>
  11073. </test-commands>
  11074. <cleanup-commands>
  11075. <command>-fs NAMENODE -rm -r NAMENODE/dir*</command>
  11076. </cleanup-commands>
  11077. <comparators>
  11078. <comparator>
  11079. <type>RegexpComparator</type>
  11080. <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>
  11081. </comparator>
  11082. <comparator>
  11083. <type>RegexpComparator</type>
  11084. <expected-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>
  11085. </comparator>
  11086. <comparator>
  11087. <type>RegexpComparator</type>
  11088. <expected-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>
  11089. </comparator>
  11090. <comparator>
  11091. <type>RegexpComparator</type>
  11092. <expected-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>
  11093. </comparator>
  11094. <comparator>
  11095. <type>RegexpComparator</type>
  11096. <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>
  11097. </comparator>
  11098. <comparator>
  11099. <type>RegexpComparator</type>
  11100. <expected-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>
  11101. </comparator>
  11102. <comparator>
  11103. <type>RegexpComparator</type>
  11104. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir2/dir1/file2</expected-output>
  11105. </comparator>
  11106. <comparator>
  11107. <type>RegexpComparator</type>
  11108. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir2/file0</expected-output>
  11109. </comparator>
  11110. </comparators>
  11111. </test>
  11112. <test> <!-- TESTED -->
  11113. <description>chmod: change permission(normal mode) of multiple files in Namenode's path using globbing</description>
  11114. <test-commands>
  11115. <command>-fs NAMENODE -touchz NAMENODE/file1</command>
  11116. <command>-fs NAMENODE -touchz NAMENODE/file2</command>
  11117. <command>-fs NAMENODE -touchz NAMENODE/file3</command>
  11118. <command>-fs NAMENODE -touchz NAMENODE/file4</command>
  11119. <command>-fs NAMENODE -chmod a+rw NAMENODE/file* </command>
  11120. <command>-fs NAMENODE -ls -R NAMENODE/file*</command>
  11121. </test-commands>
  11122. <cleanup-commands>
  11123. <command>-fs NAMENODE -rm NAMENODE/file*</command>
  11124. </cleanup-commands>
  11125. <comparators>
  11126. <comparator>
  11127. <type>RegexpComparator</type>
  11128. <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>
  11129. </comparator>
  11130. <comparator>
  11131. <type>RegexpComparator</type>
  11132. <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>
  11133. </comparator>
  11134. <comparator>
  11135. <type>RegexpComparator</type>
  11136. <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>
  11137. </comparator>
  11138. <comparator>
  11139. <type>RegexpComparator</type>
  11140. <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>
  11141. </comparator>
  11142. </comparators>
  11143. </test>
  11144. <test> <!-- TESTED -->
  11145. <description>chmod: change permission(normal mode) of multiple directories in Namenode's path using globbing</description>
  11146. <test-commands>
  11147. <command>-fs NAMENODE -mkdir NAMENODE/dir0</command>
  11148. <command>-fs NAMENODE -mkdir NAMENODE/dir0/dir1</command>
  11149. <command>-fs NAMENODE -touchz NAMENODE/dir0/file0</command>
  11150. <command>-fs NAMENODE -touchz NAMENODE/dir0/dir1/file1</command>
  11151. <command>-fs NAMENODE -touchz NAMENODE/dir0/dir1/file2</command>
  11152. <command>-fs NAMENODE -mkdir NAMENODE/dir2</command>
  11153. <command>-fs NAMENODE -mkdir NAMENODE/dir2/dir1</command>
  11154. <command>-fs NAMENODE -touchz NAMENODE/dir2/file0</command>
  11155. <command>-fs NAMENODE -touchz NAMENODE/dir2/dir1/file1</command>
  11156. <command>-fs NAMENODE -touchz NAMENODE/dir2/dir1/file2</command>
  11157. <command>-fs NAMENODE -chmod a+rwx NAMENODE/dir*</command>
  11158. <command>-fs NAMENODE -ls -R NAMENODE/dir*</command>
  11159. </test-commands>
  11160. <cleanup-commands>
  11161. <command>-fs NAMENODE -rm -r NAMENODE/dir*</command>
  11162. </cleanup-commands>
  11163. <comparators>
  11164. <comparator>
  11165. <type>RegexpComparator</type>
  11166. <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>
  11167. </comparator>
  11168. <comparator>
  11169. <type>RegexpComparator</type>
  11170. <expected-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>
  11171. </comparator>
  11172. <comparator>
  11173. <type>RegexpComparator</type>
  11174. <expected-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>
  11175. </comparator>
  11176. <comparator>
  11177. <type>RegexpComparator</type>
  11178. <expected-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>
  11179. </comparator>
  11180. <comparator>
  11181. <type>RegexpComparator</type>
  11182. <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>
  11183. </comparator>
  11184. <comparator>
  11185. <type>RegexpComparator</type>
  11186. <expected-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>
  11187. </comparator>
  11188. <comparator>
  11189. <type>RegexpComparator</type>
  11190. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir2/dir1/file2</expected-output>
  11191. </comparator>
  11192. <comparator>
  11193. <type>RegexpComparator</type>
  11194. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir2/file0</expected-output>
  11195. </comparator>
  11196. </comparators>
  11197. </test>
  11198. <test> <!-- TESTED -->
  11199. <description>chmod: change permission(normal mode) of multiple files in Namenode's path without globbing</description>
  11200. <test-commands>
  11201. <command>-fs NAMENODE -touchz NAMENODE/file1</command>
  11202. <command>-fs NAMENODE -touchz NAMENODE/file2</command>
  11203. <command>-fs NAMENODE -touchz NAMENODE/file3</command>
  11204. <command>-fs NAMENODE -touchz NAMENODE/file4</command>
  11205. <command>-fs NAMENODE -chmod a+rw NAMENODE/file1 NAMENODE/file2 NAMENODE/file3 NAMENODE/file4 </command>
  11206. <command>-fs NAMENODE -ls -R NAMENODE/file*</command>
  11207. </test-commands>
  11208. <cleanup-commands>
  11209. <command>-fs NAMENODE -rm NAMENODE/file*</command>
  11210. </cleanup-commands>
  11211. <comparators>
  11212. <comparator>
  11213. <type>RegexpComparator</type>
  11214. <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>
  11215. </comparator>
  11216. <comparator>
  11217. <type>RegexpComparator</type>
  11218. <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>
  11219. </comparator>
  11220. <comparator>
  11221. <type>RegexpComparator</type>
  11222. <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>
  11223. </comparator>
  11224. <comparator>
  11225. <type>RegexpComparator</type>
  11226. <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>
  11227. </comparator>
  11228. </comparators>
  11229. </test>
  11230. <test> <!-- TESTED -->
  11231. <description>chmod: change permission(normal mode) of multiple directories in Namenode's path without globbing</description>
  11232. <test-commands>
  11233. <command>-fs NAMENODE -mkdir NAMENODE/dir0</command>
  11234. <command>-fs NAMENODE -mkdir NAMENODE/dir0/dir1</command>
  11235. <command>-fs NAMENODE -touchz NAMENODE/dir0/file0</command>
  11236. <command>-fs NAMENODE -touchz NAMENODE/dir0/dir1/file1</command>
  11237. <command>-fs NAMENODE -touchz NAMENODE/dir0/dir1/file2</command>
  11238. <command>-fs NAMENODE -mkdir NAMENODE/dir2</command>
  11239. <command>-fs NAMENODE -mkdir NAMENODE/dir2/dir1</command>
  11240. <command>-fs NAMENODE -touchz NAMENODE/dir2/file0</command>
  11241. <command>-fs NAMENODE -touchz NAMENODE/dir2/dir1/file1</command>
  11242. <command>-fs NAMENODE -touchz NAMENODE/dir2/dir1/file2</command>
  11243. <command>-fs NAMENODE -chmod a+rwx NAMENODE/dir0 NAMENODE/dir2</command>
  11244. <command>-fs NAMENODE -ls -R NAMENODE/dir*</command>
  11245. </test-commands>
  11246. <cleanup-commands>
  11247. <command>-fs NAMENODE -rm -r NAMENODE/dir*</command>
  11248. </cleanup-commands>
  11249. <comparators>
  11250. <comparator>
  11251. <type>RegexpComparator</type>
  11252. <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>
  11253. </comparator>
  11254. <comparator>
  11255. <type>RegexpComparator</type>
  11256. <expected-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>
  11257. </comparator>
  11258. <comparator>
  11259. <type>RegexpComparator</type>
  11260. <expected-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>
  11261. </comparator>
  11262. <comparator>
  11263. <type>RegexpComparator</type>
  11264. <expected-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>
  11265. </comparator>
  11266. <comparator>
  11267. <type>RegexpComparator</type>
  11268. <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>
  11269. </comparator>
  11270. <comparator>
  11271. <type>RegexpComparator</type>
  11272. <expected-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>
  11273. </comparator>
  11274. <comparator>
  11275. <type>RegexpComparator</type>
  11276. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir2/dir1/file2</expected-output>
  11277. </comparator>
  11278. <comparator>
  11279. <type>RegexpComparator</type>
  11280. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir2/file0</expected-output>
  11281. </comparator>
  11282. </comparators>
  11283. </test>
  11284. <test> <!-- TESTED -->
  11285. <description>chmod: change permission(octal mode) of multiple directories in Namenode's path recursively using globbing</description>
  11286. <test-commands>
  11287. <command>-fs NAMENODE -mkdir NAMENODE/dir0</command>
  11288. <command>-fs NAMENODE -mkdir NAMENODE/dir0/dir1</command>
  11289. <command>-fs NAMENODE -touchz NAMENODE/dir0/file0</command>
  11290. <command>-fs NAMENODE -touchz NAMENODE/dir0/dir1/file1</command>
  11291. <command>-fs NAMENODE -touchz NAMENODE/dir0/dir1/file2</command>
  11292. <command>-fs NAMENODE -mkdir NAMENODE/dir2</command>
  11293. <command>-fs NAMENODE -mkdir NAMENODE/dir2/dir1</command>
  11294. <command>-fs NAMENODE -touchz NAMENODE/dir2/file0</command>
  11295. <command>-fs NAMENODE -touchz NAMENODE/dir2/dir1/file1</command>
  11296. <command>-fs NAMENODE -touchz NAMENODE/dir2/dir1/file2</command>
  11297. <command>-fs NAMENODE -chmod -R 777 NAMENODE/dir*</command>
  11298. <command>-fs NAMENODE -ls -R NAMENODE/dir*</command>
  11299. </test-commands>
  11300. <cleanup-commands>
  11301. <command>-fs NAMENODE -rm -r NAMENODE/dir*</command>
  11302. </cleanup-commands>
  11303. <comparators>
  11304. <comparator>
  11305. <type>RegexpComparator</type>
  11306. <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>
  11307. </comparator>
  11308. <comparator>
  11309. <type>RegexpComparator</type>
  11310. <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>
  11311. </comparator>
  11312. <comparator>
  11313. <type>RegexpComparator</type>
  11314. <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>
  11315. </comparator>
  11316. <comparator>
  11317. <type>RegexpComparator</type>
  11318. <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>
  11319. </comparator>
  11320. <comparator>
  11321. <type>RegexpComparator</type>
  11322. <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>
  11323. </comparator>
  11324. <comparator>
  11325. <type>RegexpComparator</type>
  11326. <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>
  11327. </comparator>
  11328. <comparator>
  11329. <type>RegexpComparator</type>
  11330. <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>
  11331. </comparator>
  11332. <comparator>
  11333. <type>RegexpComparator</type>
  11334. <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>
  11335. </comparator>
  11336. </comparators>
  11337. </test>
  11338. <test> <!-- TESTED -->
  11339. <description>chmod: change permission(octal mode) of multiple directories in Namenode's path recursively without globbing</description>
  11340. <test-commands>
  11341. <command>-fs NAMENODE -mkdir NAMENODE/dir0</command>
  11342. <command>-fs NAMENODE -mkdir NAMENODE/dir0/dir1</command>
  11343. <command>-fs NAMENODE -touchz NAMENODE/dir0/file0</command>
  11344. <command>-fs NAMENODE -touchz NAMENODE/dir0/dir1/file1</command>
  11345. <command>-fs NAMENODE -touchz NAMENODE/dir0/dir1/file2</command>
  11346. <command>-fs NAMENODE -mkdir NAMENODE/dir2</command>
  11347. <command>-fs NAMENODE -mkdir NAMENODE/dir2/dir1</command>
  11348. <command>-fs NAMENODE -touchz NAMENODE/dir2/file0</command>
  11349. <command>-fs NAMENODE -touchz NAMENODE/dir2/dir1/file1</command>
  11350. <command>-fs NAMENODE -touchz NAMENODE/dir2/dir1/file2</command>
  11351. <command>-fs NAMENODE -chmod -R 777 NAMENODE/dir0 NAMENODE/dir2</command>
  11352. <command>-fs NAMENODE -ls -R NAMENODE/dir*</command>
  11353. </test-commands>
  11354. <cleanup-commands>
  11355. <command>-fs NAMENODE -rm -r NAMENODE/dir*</command>
  11356. </cleanup-commands>
  11357. <comparators>
  11358. <comparator>
  11359. <type>RegexpComparator</type>
  11360. <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>
  11361. </comparator>
  11362. <comparator>
  11363. <type>RegexpComparator</type>
  11364. <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>
  11365. </comparator>
  11366. <comparator>
  11367. <type>RegexpComparator</type>
  11368. <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>
  11369. </comparator>
  11370. <comparator>
  11371. <type>RegexpComparator</type>
  11372. <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>
  11373. </comparator>
  11374. <comparator>
  11375. <type>RegexpComparator</type>
  11376. <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>
  11377. </comparator>
  11378. <comparator>
  11379. <type>RegexpComparator</type>
  11380. <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>
  11381. </comparator>
  11382. <comparator>
  11383. <type>RegexpComparator</type>
  11384. <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>
  11385. </comparator>
  11386. <comparator>
  11387. <type>RegexpComparator</type>
  11388. <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>
  11389. </comparator>
  11390. </comparators>
  11391. </test>
  11392. <test> <!-- TESTED -->
  11393. <description>chmod: change permission(normal mode) of multiple directories in Namenode's path recursively using globbing</description>
  11394. <test-commands>
  11395. <command>-fs NAMENODE -mkdir NAMENODE/dir0</command>
  11396. <command>-fs NAMENODE -mkdir NAMENODE/dir0/dir1</command>
  11397. <command>-fs NAMENODE -touchz NAMENODE/dir0/file0</command>
  11398. <command>-fs NAMENODE -touchz NAMENODE/dir0/dir1/file1</command>
  11399. <command>-fs NAMENODE -touchz NAMENODE/dir0/dir1/file2</command>
  11400. <command>-fs NAMENODE -mkdir NAMENODE/dir2</command>
  11401. <command>-fs NAMENODE -mkdir NAMENODE/dir2/dir1</command>
  11402. <command>-fs NAMENODE -touchz NAMENODE/dir2/file0</command>
  11403. <command>-fs NAMENODE -touchz NAMENODE/dir2/dir1/file1</command>
  11404. <command>-fs NAMENODE -touchz NAMENODE/dir2/dir1/file2</command>
  11405. <command>-fs NAMENODE -chmod -R a+rwx NAMENODE/dir*</command>
  11406. <command>-fs NAMENODE -ls -R NAMENODE/dir*</command>
  11407. </test-commands>
  11408. <cleanup-commands>
  11409. <command>-fs NAMENODE -rm -r NAMENODE/dir*</command>
  11410. </cleanup-commands>
  11411. <comparators>
  11412. <comparator>
  11413. <type>RegexpComparator</type>
  11414. <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>
  11415. </comparator>
  11416. <comparator>
  11417. <type>RegexpComparator</type>
  11418. <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>
  11419. </comparator>
  11420. <comparator>
  11421. <type>RegexpComparator</type>
  11422. <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>
  11423. </comparator>
  11424. <comparator>
  11425. <type>RegexpComparator</type>
  11426. <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>
  11427. </comparator>
  11428. <comparator>
  11429. <type>RegexpComparator</type>
  11430. <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>
  11431. </comparator>
  11432. <comparator>
  11433. <type>RegexpComparator</type>
  11434. <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>
  11435. </comparator>
  11436. <comparator>
  11437. <type>RegexpComparator</type>
  11438. <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>
  11439. </comparator>
  11440. <comparator>
  11441. <type>RegexpComparator</type>
  11442. <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>
  11443. </comparator>
  11444. </comparators>
  11445. </test>
  11446. <test> <!-- TESTED -->
  11447. <description>chmod: change permission(normal mode) of multiple directories in Namenode's path recursively without globbing</description>
  11448. <test-commands>
  11449. <command>-fs NAMENODE -mkdir NAMENODE/dir0</command>
  11450. <command>-fs NAMENODE -mkdir NAMENODE/dir0/dir1</command>
  11451. <command>-fs NAMENODE -touchz NAMENODE/dir0/file0</command>
  11452. <command>-fs NAMENODE -touchz NAMENODE/dir0/dir1/file1</command>
  11453. <command>-fs NAMENODE -touchz NAMENODE/dir0/dir1/file2</command>
  11454. <command>-fs NAMENODE -mkdir NAMENODE/dir2</command>
  11455. <command>-fs NAMENODE -mkdir NAMENODE/dir2/dir1</command>
  11456. <command>-fs NAMENODE -touchz NAMENODE/dir2/file0</command>
  11457. <command>-fs NAMENODE -touchz NAMENODE/dir2/dir1/file1</command>
  11458. <command>-fs NAMENODE -touchz NAMENODE/dir2/dir1/file2</command>
  11459. <command>-fs NAMENODE -chmod -R a+rwx NAMENODE/dir0 NAMENODE/dir2</command>
  11460. <command>-fs NAMENODE -ls -R NAMENODE/dir*</command>
  11461. </test-commands>
  11462. <cleanup-commands>
  11463. <command>-fs NAMENODE -rm -r NAMENODE/dir*</command>
  11464. </cleanup-commands>
  11465. <comparators>
  11466. <comparator>
  11467. <type>RegexpComparator</type>
  11468. <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>
  11469. </comparator>
  11470. <comparator>
  11471. <type>RegexpComparator</type>
  11472. <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>
  11473. </comparator>
  11474. <comparator>
  11475. <type>RegexpComparator</type>
  11476. <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>
  11477. </comparator>
  11478. <comparator>
  11479. <type>RegexpComparator</type>
  11480. <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>
  11481. </comparator>
  11482. <comparator>
  11483. <type>RegexpComparator</type>
  11484. <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>
  11485. </comparator>
  11486. <comparator>
  11487. <type>RegexpComparator</type>
  11488. <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>
  11489. </comparator>
  11490. <comparator>
  11491. <type>RegexpComparator</type>
  11492. <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>
  11493. </comparator>
  11494. <comparator>
  11495. <type>RegexpComparator</type>
  11496. <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>
  11497. </comparator>
  11498. </comparators>
  11499. </test>
  11500. <test> <!-- TESTED -->
  11501. <description>chmod: invalid value in octal mode of file in Namenode's path</description>
  11502. <test-commands>
  11503. <command>-fs NAMENODE -touchz NAMENODE/file1</command>
  11504. <command>-fs NAMENODE -chmod 999 NAMENODE/file1</command>
  11505. </test-commands>
  11506. <cleanup-commands>
  11507. <command>-fs NAMENODE -rm NAMENODE/file1</command>
  11508. </cleanup-commands>
  11509. <comparators>
  11510. <comparator>
  11511. <type>RegexpComparator</type>
  11512. <expected-output>^-chmod: chmod : mode '999' does not match the expected pattern.</expected-output>
  11513. </comparator>
  11514. </comparators>
  11515. </test>
  11516. <test> <!-- TESTED -->
  11517. <description>chmod: invalid value in normal mode of file in Namenode's path</description>
  11518. <test-commands>
  11519. <command>-fs NAMENODE -touchz NAMENODE/file1</command>
  11520. <command>-fs NAMENODE -chmod rdef NAMENODE/file1</command>
  11521. </test-commands>
  11522. <cleanup-commands>
  11523. <command>-fs NAMENODE -rm NAMENODE/file1</command>
  11524. </cleanup-commands>
  11525. <comparators>
  11526. <comparator>
  11527. <type>RegexpComparator</type>
  11528. <expected-output>^-chmod: chmod : mode \'rdef\' does not match the expected pattern.</expected-output>
  11529. </comparator>
  11530. </comparators>
  11531. </test>
  11532. <!-- Tests for chown -->
  11533. <test> <!-- TESTED -->
  11534. <description>chown: change ownership of file in hdfs:// path</description>
  11535. <test-commands>
  11536. <command>-fs NAMENODE -touchz hdfs:///file1</command>
  11537. <command>-fs NAMENODE -chown newowner:newgroup hdfs:///file1</command>
  11538. <command>-fs NAMENODE -ls hdfs:///file1</command>
  11539. </test-commands>
  11540. <cleanup-commands>
  11541. <command>-fs NAMENODE -rm hdfs:///file1</command>
  11542. </cleanup-commands>
  11543. <comparators>
  11544. <comparator>
  11545. <type>RegexpComparator</type>
  11546. <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>
  11547. </comparator>
  11548. </comparators>
  11549. </test>
  11550. <test> <!-- TESTED -->
  11551. <description>chown: change ownership of directory in hdfs:// path</description>
  11552. <test-commands>
  11553. <command>-fs NAMENODE -mkdir hdfs:///dir0</command>
  11554. <command>-fs NAMENODE -mkdir hdfs:///dir0/dir1</command>
  11555. <command>-fs NAMENODE -touchz hdfs:///dir0/file0</command>
  11556. <command>-fs NAMENODE -touchz hdfs:///dir0/dir1/file1</command>
  11557. <command>-fs NAMENODE -touchz hdfs:///dir0/dir1/file2</command>
  11558. <command>-fs NAMENODE -chown newowner:newgroup hdfs:///dir0/dir1</command>
  11559. <command>-fs NAMENODE -ls -R hdfs:///dir0</command>
  11560. </test-commands>
  11561. <cleanup-commands>
  11562. <command>-fs NAMENODE -rm -r hdfs:///dir0</command>
  11563. </cleanup-commands>
  11564. <comparators>
  11565. <comparator>
  11566. <type>RegexpComparator</type>
  11567. <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>
  11568. </comparator>
  11569. <comparator>
  11570. <type>RegexpComparator</type>
  11571. <expected-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>
  11572. </comparator>
  11573. <comparator>
  11574. <type>RegexpComparator</type>
  11575. <expected-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>
  11576. </comparator>
  11577. <comparator>
  11578. <type>RegexpComparator</type>
  11579. <expected-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>
  11580. </comparator>
  11581. </comparators>
  11582. </test>
  11583. <test> <!-- TESTED -->
  11584. <description>chown: change ownership of directory in hdfs:// path recursively </description>
  11585. <test-commands>
  11586. <command>-fs NAMENODE -mkdir hdfs:///dir0</command>
  11587. <command>-fs NAMENODE -mkdir hdfs:///dir0/dir1</command>
  11588. <command>-fs NAMENODE -touchz hdfs:///dir0/file0</command>
  11589. <command>-fs NAMENODE -touchz hdfs:///dir0/dir1/file1</command>
  11590. <command>-fs NAMENODE -touchz hdfs:///dir0/dir1/file2</command>
  11591. <command>-fs NAMENODE -chown -R newowner:newgroup hdfs:///dir0/dir1</command>
  11592. <command>-fs NAMENODE -ls -R hdfs:///dir0</command>
  11593. </test-commands>
  11594. <cleanup-commands>
  11595. <command>-fs NAMENODE -rm -r hdfs:///dir0</command>
  11596. </cleanup-commands>
  11597. <comparators>
  11598. <comparator>
  11599. <type>RegexpComparator</type>
  11600. <expected-output>^drwxr-xr-x( )*-( )*newowner( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir0/dir1</expected-output>
  11601. </comparator>
  11602. <comparator>
  11603. <type>RegexpComparator</type>
  11604. <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>
  11605. </comparator>
  11606. <comparator>
  11607. <type>RegexpComparator</type>
  11608. <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>
  11609. </comparator>
  11610. <comparator>
  11611. <type>RegexpComparator</type>
  11612. <expected-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>
  11613. </comparator>
  11614. </comparators>
  11615. </test>
  11616. <test> <!-- TESTED -->
  11617. <description>chown: change ownership of non existent file in hdfs:// path</description>
  11618. <test-commands>
  11619. <command>-fs NAMENODE -chown newowner:newgroup hdfs:///file1</command>
  11620. </test-commands>
  11621. <cleanup-commands>
  11622. <command>-fs NAMENODE -rm hdfs:///file1</command>
  11623. </cleanup-commands>
  11624. <comparators>
  11625. <comparator>
  11626. <type>RegexpComparator</type>
  11627. <expected-output>^chown: `hdfs:///file1': No such file or directory</expected-output>
  11628. </comparator>
  11629. </comparators>
  11630. </test>
  11631. <test> <!-- TESTED -->
  11632. <description>chown: change ownership of multiple files in hdfs:// path using globbing</description>
  11633. <test-commands>
  11634. <command>-fs NAMENODE -touchz hdfs:///file1</command>
  11635. <command>-fs NAMENODE -touchz hdfs:///file2</command>
  11636. <command>-fs NAMENODE -touchz hdfs:///file3</command>
  11637. <command>-fs NAMENODE -touchz hdfs:///file4</command>
  11638. <command>-fs NAMENODE -chown newowner:newgroup hdfs:///file* </command>
  11639. <command>-fs NAMENODE -ls -R hdfs:///file*</command>
  11640. </test-commands>
  11641. <cleanup-commands>
  11642. <command>-fs NAMENODE -rm hdfs:///file*</command>
  11643. </cleanup-commands>
  11644. <comparators>
  11645. <comparator>
  11646. <type>RegexpComparator</type>
  11647. <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>
  11648. </comparator>
  11649. <comparator>
  11650. <type>RegexpComparator</type>
  11651. <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>
  11652. </comparator>
  11653. <comparator>
  11654. <type>RegexpComparator</type>
  11655. <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>
  11656. </comparator>
  11657. <comparator>
  11658. <type>RegexpComparator</type>
  11659. <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>
  11660. </comparator>
  11661. </comparators>
  11662. </test>
  11663. <test> <!-- TESTED -->
  11664. <description>chown: change ownership of multiple directories in hdfs:// path using globbing</description>
  11665. <test-commands>
  11666. <command>-fs NAMENODE -mkdir hdfs:///dir0</command>
  11667. <command>-fs NAMENODE -mkdir hdfs:///dir0/dir1</command>
  11668. <command>-fs NAMENODE -touchz hdfs:///dir0/file0</command>
  11669. <command>-fs NAMENODE -touchz hdfs:///dir0/dir1/file1</command>
  11670. <command>-fs NAMENODE -touchz hdfs:///dir0/dir1/file2</command>
  11671. <command>-fs NAMENODE -mkdir hdfs:///dir2</command>
  11672. <command>-fs NAMENODE -mkdir hdfs:///dir2/dir1</command>
  11673. <command>-fs NAMENODE -touchz hdfs:///dir2/file0</command>
  11674. <command>-fs NAMENODE -touchz hdfs:///dir2/dir1/file1</command>
  11675. <command>-fs NAMENODE -touchz hdfs:///dir2/dir1/file2</command>
  11676. <command>-fs NAMENODE -chown newowner:newgroup hdfs:///dir*</command>
  11677. <command>-fs NAMENODE -ls -R hdfs:///dir*</command>
  11678. </test-commands>
  11679. <cleanup-commands>
  11680. <command>-fs NAMENODE -rm -r hdfs:///dir*</command>
  11681. </cleanup-commands>
  11682. <comparators>
  11683. <comparator>
  11684. <type>RegexpComparator</type>
  11685. <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>
  11686. </comparator>
  11687. <comparator>
  11688. <type>RegexpComparator</type>
  11689. <expected-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>
  11690. </comparator>
  11691. <comparator>
  11692. <type>RegexpComparator</type>
  11693. <expected-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>
  11694. </comparator>
  11695. <comparator>
  11696. <type>RegexpComparator</type>
  11697. <expected-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>
  11698. </comparator>
  11699. <comparator>
  11700. <type>RegexpComparator</type>
  11701. <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>
  11702. </comparator>
  11703. <comparator>
  11704. <type>RegexpComparator</type>
  11705. <expected-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>
  11706. </comparator>
  11707. <comparator>
  11708. <type>RegexpComparator</type>
  11709. <expected-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>
  11710. </comparator>
  11711. <comparator>
  11712. <type>RegexpComparator</type>
  11713. <expected-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>
  11714. </comparator>
  11715. </comparators>
  11716. </test>
  11717. <test> <!-- TESTED -->
  11718. <description>chown: change ownership of multiple files in hdfs:// path without globbing</description>
  11719. <test-commands>
  11720. <command>-fs NAMENODE -touchz hdfs:///file1</command>
  11721. <command>-fs NAMENODE -touchz hdfs:///file2</command>
  11722. <command>-fs NAMENODE -touchz hdfs:///file3</command>
  11723. <command>-fs NAMENODE -touchz hdfs:///file4</command>
  11724. <command>-fs NAMENODE -chown newowner:newgroup hdfs:///file1 hdfs:///file2 hdfs:///file3 hdfs:///file4 </command>
  11725. <command>-fs NAMENODE -ls -R hdfs:///file*</command>
  11726. </test-commands>
  11727. <cleanup-commands>
  11728. <command>-fs NAMENODE -rm hdfs:///file*</command>
  11729. </cleanup-commands>
  11730. <comparators>
  11731. <comparator>
  11732. <type>RegexpComparator</type>
  11733. <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>
  11734. </comparator>
  11735. <comparator>
  11736. <type>RegexpComparator</type>
  11737. <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>
  11738. </comparator>
  11739. <comparator>
  11740. <type>RegexpComparator</type>
  11741. <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>
  11742. </comparator>
  11743. <comparator>
  11744. <type>RegexpComparator</type>
  11745. <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>
  11746. </comparator>
  11747. </comparators>
  11748. </test>
  11749. <test> <!-- TESTED -->
  11750. <description>chown: change ownership of multiple directories in hdfs:// path without globbing</description>
  11751. <test-commands>
  11752. <command>-fs NAMENODE -mkdir hdfs:///dir0</command>
  11753. <command>-fs NAMENODE -mkdir hdfs:///dir0/dir1</command>
  11754. <command>-fs NAMENODE -touchz hdfs:///dir0/file0</command>
  11755. <command>-fs NAMENODE -touchz hdfs:///dir0/dir1/file1</command>
  11756. <command>-fs NAMENODE -touchz hdfs:///dir0/dir1/file2</command>
  11757. <command>-fs NAMENODE -mkdir hdfs:///dir2</command>
  11758. <command>-fs NAMENODE -mkdir hdfs:///dir2/dir1</command>
  11759. <command>-fs NAMENODE -touchz hdfs:///dir2/file0</command>
  11760. <command>-fs NAMENODE -touchz hdfs:///dir2/dir1/file1</command>
  11761. <command>-fs NAMENODE -touchz hdfs:///dir2/dir1/file2</command>
  11762. <command>-fs NAMENODE -chown newowner:newgroup hdfs:///dir0 hdfs:///dir2</command>
  11763. <command>-fs NAMENODE -ls -R hdfs:///dir*</command>
  11764. </test-commands>
  11765. <cleanup-commands>
  11766. <command>-fs NAMENODE -rm -r hdfs:///dir*</command>
  11767. </cleanup-commands>
  11768. <comparators>
  11769. <comparator>
  11770. <type>RegexpComparator</type>
  11771. <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>
  11772. </comparator>
  11773. <comparator>
  11774. <type>RegexpComparator</type>
  11775. <expected-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>
  11776. </comparator>
  11777. <comparator>
  11778. <type>RegexpComparator</type>
  11779. <expected-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>
  11780. </comparator>
  11781. <comparator>
  11782. <type>RegexpComparator</type>
  11783. <expected-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>
  11784. </comparator>
  11785. <comparator>
  11786. <type>RegexpComparator</type>
  11787. <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>
  11788. </comparator>
  11789. <comparator>
  11790. <type>RegexpComparator</type>
  11791. <expected-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>
  11792. </comparator>
  11793. <comparator>
  11794. <type>RegexpComparator</type>
  11795. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir2/dir1/file2</expected-output>
  11796. </comparator>
  11797. <comparator>
  11798. <type>RegexpComparator</type>
  11799. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir2/file0</expected-output>
  11800. </comparator>
  11801. </comparators>
  11802. </test>
  11803. <test> <!-- TESTED -->
  11804. <description>chown: change ownership of multiple directories recursively in hdfs:// path using globbing</description>
  11805. <test-commands>
  11806. <command>-fs NAMENODE -mkdir hdfs:///dir0</command>
  11807. <command>-fs NAMENODE -mkdir hdfs:///dir0/dir1</command>
  11808. <command>-fs NAMENODE -touchz hdfs:///dir0/file0</command>
  11809. <command>-fs NAMENODE -touchz hdfs:///dir0/dir1/file1</command>
  11810. <command>-fs NAMENODE -touchz hdfs:///dir0/dir1/file2</command>
  11811. <command>-fs NAMENODE -mkdir hdfs:///dir2</command>
  11812. <command>-fs NAMENODE -mkdir hdfs:///dir2/dir1</command>
  11813. <command>-fs NAMENODE -touchz hdfs:///dir2/file0</command>
  11814. <command>-fs NAMENODE -touchz hdfs:///dir2/dir1/file1</command>
  11815. <command>-fs NAMENODE -touchz hdfs:///dir2/dir1/file2</command>
  11816. <command>-fs NAMENODE -chown -R newowner:newgroup hdfs:///dir*</command>
  11817. <command>-fs NAMENODE -ls -R hdfs:///dir*</command>
  11818. </test-commands>
  11819. <cleanup-commands>
  11820. <command>-fs NAMENODE -rm -r hdfs:///dir*</command>
  11821. </cleanup-commands>
  11822. <comparators>
  11823. <comparator>
  11824. <type>RegexpComparator</type>
  11825. <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>
  11826. </comparator>
  11827. <comparator>
  11828. <type>RegexpComparator</type>
  11829. <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>
  11830. </comparator>
  11831. <comparator>
  11832. <type>RegexpComparator</type>
  11833. <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>
  11834. </comparator>
  11835. <comparator>
  11836. <type>RegexpComparator</type>
  11837. <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>
  11838. </comparator>
  11839. <comparator>
  11840. <type>RegexpComparator</type>
  11841. <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>
  11842. </comparator>
  11843. <comparator>
  11844. <type>RegexpComparator</type>
  11845. <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>
  11846. </comparator>
  11847. <comparator>
  11848. <type>RegexpComparator</type>
  11849. <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>
  11850. </comparator>
  11851. <comparator>
  11852. <type>RegexpComparator</type>
  11853. <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>
  11854. </comparator>
  11855. </comparators>
  11856. </test>
  11857. <test> <!-- TESTED -->
  11858. <description>chown: change ownership of multiple directories recursively in hdfs:// path without globbing</description>
  11859. <test-commands>
  11860. <command>-fs NAMENODE -mkdir hdfs:///dir0</command>
  11861. <command>-fs NAMENODE -mkdir hdfs:///dir0/dir1</command>
  11862. <command>-fs NAMENODE -touchz hdfs:///dir0/file0</command>
  11863. <command>-fs NAMENODE -touchz hdfs:///dir0/dir1/file1</command>
  11864. <command>-fs NAMENODE -touchz hdfs:///dir0/dir1/file2</command>
  11865. <command>-fs NAMENODE -mkdir hdfs:///dir2</command>
  11866. <command>-fs NAMENODE -mkdir hdfs:///dir2/dir1</command>
  11867. <command>-fs NAMENODE -touchz hdfs:///dir2/file0</command>
  11868. <command>-fs NAMENODE -touchz hdfs:///dir2/dir1/file1</command>
  11869. <command>-fs NAMENODE -touchz hdfs:///dir2/dir1/file2</command>
  11870. <command>-fs NAMENODE -chown -R newowner:newgroup hdfs:///dir0 hdfs:///dir2</command>
  11871. <command>-fs NAMENODE -ls -R hdfs:///dir*</command>
  11872. </test-commands>
  11873. <cleanup-commands>
  11874. <command>-fs NAMENODE -rm -r hdfs:///dir*</command>
  11875. </cleanup-commands>
  11876. <comparators>
  11877. <comparator>
  11878. <type>RegexpComparator</type>
  11879. <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>
  11880. </comparator>
  11881. <comparator>
  11882. <type>RegexpComparator</type>
  11883. <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>
  11884. </comparator>
  11885. <comparator>
  11886. <type>RegexpComparator</type>
  11887. <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>
  11888. </comparator>
  11889. <comparator>
  11890. <type>RegexpComparator</type>
  11891. <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>
  11892. </comparator>
  11893. <comparator>
  11894. <type>RegexpComparator</type>
  11895. <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>
  11896. </comparator>
  11897. <comparator>
  11898. <type>RegexpComparator</type>
  11899. <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>
  11900. </comparator>
  11901. <comparator>
  11902. <type>RegexpComparator</type>
  11903. <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>
  11904. </comparator>
  11905. <comparator>
  11906. <type>RegexpComparator</type>
  11907. <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>
  11908. </comparator>
  11909. </comparators>
  11910. </test>
  11911. <test> <!-- TESTED -->
  11912. <description>chown: invalid option for owner of file in hdfs:// path</description>
  11913. <test-commands>
  11914. <command>-fs NAMENODE -touchz hdfs:///file1</command>
  11915. <command>-fs NAMENODE -chown %:newgroup hdfs:///file1</command>
  11916. </test-commands>
  11917. <cleanup-commands>
  11918. <command>-fs NAMENODE -rm hdfs:///file1</command>
  11919. </cleanup-commands>
  11920. <comparators>
  11921. <comparator>
  11922. <type>RegexpComparator</type>
  11923. <expected-output>^-chown: '%:newgroup' does not match expected pattern for \[owner\]\[:group\].</expected-output>
  11924. </comparator>
  11925. </comparators>
  11926. </test>
  11927. <test> <!-- TESTED -->
  11928. <description>chown: invalid option for group of file in hdfs:// path</description>
  11929. <test-commands>
  11930. <command>-fs NAMENODE -touchz hdfs:///file1</command>
  11931. <command>-fs NAMENODE -chown newowner:% hdfs:///file1</command>
  11932. </test-commands>
  11933. <cleanup-commands>
  11934. <command>-fs NAMENODE -rm hdfs:///file1</command>
  11935. </cleanup-commands>
  11936. <comparators>
  11937. <comparator>
  11938. <type>RegexpComparator</type>
  11939. <expected-output>^-chown: 'newowner:%' does not match expected pattern for \[owner\]\[:group\].</expected-output>
  11940. </comparator>
  11941. </comparators>
  11942. </test>
  11943. <!-- Tests for chown -->
  11944. <test> <!-- TESTED -->
  11945. <description>chown: change ownership of file in absolute path</description>
  11946. <test-commands>
  11947. <command>-fs NAMENODE -touchz /file1</command>
  11948. <command>-fs NAMENODE -chown newowner:newgroup /file1</command>
  11949. <command>-fs NAMENODE -ls /file1</command>
  11950. </test-commands>
  11951. <cleanup-commands>
  11952. <command>-fs NAMENODE -rm /file1</command>
  11953. </cleanup-commands>
  11954. <comparators>
  11955. <comparator>
  11956. <type>RegexpComparator</type>
  11957. <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>
  11958. </comparator>
  11959. </comparators>
  11960. </test>
  11961. <test> <!-- TESTED -->
  11962. <description>chown: change ownership of file in relative path</description>
  11963. <test-commands>
  11964. <command>-fs NAMENODE -touchz file1</command>
  11965. <command>-fs NAMENODE -chown newowner:newgroup file1</command>
  11966. <command>-fs NAMENODE -ls file1</command>
  11967. </test-commands>
  11968. <cleanup-commands>
  11969. <command>-fs NAMENODE -rm file1</command>
  11970. </cleanup-commands>
  11971. <comparators>
  11972. <comparator>
  11973. <type>RegexpComparator</type>
  11974. <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>
  11975. </comparator>
  11976. </comparators>
  11977. </test>
  11978. <test> <!-- TESTED -->
  11979. <description>chown: change ownership of directory in absolute path</description>
  11980. <test-commands>
  11981. <command>-fs NAMENODE -mkdir /dir0</command>
  11982. <command>-fs NAMENODE -mkdir /dir0/dir1</command>
  11983. <command>-fs NAMENODE -touchz /dir0/file0</command>
  11984. <command>-fs NAMENODE -touchz /dir0/dir1/file1</command>
  11985. <command>-fs NAMENODE -touchz /dir0/dir1/file2</command>
  11986. <command>-fs NAMENODE -chown newowner:newgroup /dir0/dir1</command>
  11987. <command>-fs NAMENODE -ls -R /dir0</command>
  11988. </test-commands>
  11989. <cleanup-commands>
  11990. <command>-fs NAMENODE -rm -r /dir0</command>
  11991. </cleanup-commands>
  11992. <comparators>
  11993. <comparator>
  11994. <type>RegexpComparator</type>
  11995. <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>
  11996. </comparator>
  11997. <comparator>
  11998. <type>RegexpComparator</type>
  11999. <expected-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>
  12000. </comparator>
  12001. <comparator>
  12002. <type>RegexpComparator</type>
  12003. <expected-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>
  12004. </comparator>
  12005. <comparator>
  12006. <type>RegexpComparator</type>
  12007. <expected-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>
  12008. </comparator>
  12009. </comparators>
  12010. </test>
  12011. <test> <!-- TESTED -->
  12012. <description>chown: change ownership of directory in relative path</description>
  12013. <test-commands>
  12014. <command>-fs NAMENODE -mkdir -p dir0</command>
  12015. <command>-fs NAMENODE -mkdir -p dir0/dir1</command>
  12016. <command>-fs NAMENODE -touchz dir0/file0</command>
  12017. <command>-fs NAMENODE -touchz dir0/dir1/file1</command>
  12018. <command>-fs NAMENODE -touchz dir0/dir1/file2</command>
  12019. <command>-fs NAMENODE -chown newowner:newgroup dir0/dir1</command>
  12020. <command>-fs NAMENODE -ls -R dir0</command>
  12021. </test-commands>
  12022. <cleanup-commands>
  12023. <command>-fs NAMENODE -rm -r dir0</command>
  12024. </cleanup-commands>
  12025. <comparators>
  12026. <comparator>
  12027. <type>RegexpComparator</type>
  12028. <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>
  12029. </comparator>
  12030. <comparator>
  12031. <type>RegexpComparator</type>
  12032. <expected-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>
  12033. </comparator>
  12034. <comparator>
  12035. <type>RegexpComparator</type>
  12036. <expected-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>
  12037. </comparator>
  12038. <comparator>
  12039. <type>RegexpComparator</type>
  12040. <expected-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>
  12041. </comparator>
  12042. </comparators>
  12043. </test>
  12044. <test> <!-- TESTED -->
  12045. <description>chown: change ownership of directory in absolute path recursively </description>
  12046. <test-commands>
  12047. <command>-fs NAMENODE -mkdir /dir0</command>
  12048. <command>-fs NAMENODE -mkdir /dir0/dir1</command>
  12049. <command>-fs NAMENODE -touchz /dir0/file0</command>
  12050. <command>-fs NAMENODE -touchz /dir0/dir1/file1</command>
  12051. <command>-fs NAMENODE -touchz /dir0/dir1/file2</command>
  12052. <command>-fs NAMENODE -chown -R newowner:newgroup /dir0/dir1</command>
  12053. <command>-fs NAMENODE -ls -R /dir0</command>
  12054. </test-commands>
  12055. <cleanup-commands>
  12056. <command>-fs NAMENODE -rm -r /dir0</command>
  12057. </cleanup-commands>
  12058. <comparators>
  12059. <comparator>
  12060. <type>RegexpComparator</type>
  12061. <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>
  12062. </comparator>
  12063. <comparator>
  12064. <type>RegexpComparator</type>
  12065. <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>
  12066. </comparator>
  12067. <comparator>
  12068. <type>RegexpComparator</type>
  12069. <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>
  12070. </comparator>
  12071. <comparator>
  12072. <type>RegexpComparator</type>
  12073. <expected-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>
  12074. </comparator>
  12075. </comparators>
  12076. </test>
  12077. <test> <!-- TESTED -->
  12078. <description>chown: change ownership of directory in relative path recursively </description>
  12079. <test-commands>
  12080. <command>-fs NAMENODE -mkdir -p dir0</command>
  12081. <command>-fs NAMENODE -mkdir -p dir0/dir1</command>
  12082. <command>-fs NAMENODE -touchz dir0/file0</command>
  12083. <command>-fs NAMENODE -touchz dir0/dir1/file1</command>
  12084. <command>-fs NAMENODE -touchz dir0/dir1/file2</command>
  12085. <command>-fs NAMENODE -chown -R newowner:newgroup dir0/dir1</command>
  12086. <command>-fs NAMENODE -ls -R dir0</command>
  12087. </test-commands>
  12088. <cleanup-commands>
  12089. <command>-fs NAMENODE -rm -r dir0</command>
  12090. </cleanup-commands>
  12091. <comparators>
  12092. <comparator>
  12093. <type>RegexpComparator</type>
  12094. <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>
  12095. </comparator>
  12096. <comparator>
  12097. <type>RegexpComparator</type>
  12098. <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>
  12099. </comparator>
  12100. <comparator>
  12101. <type>RegexpComparator</type>
  12102. <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>
  12103. </comparator>
  12104. <comparator>
  12105. <type>RegexpComparator</type>
  12106. <expected-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>
  12107. </comparator>
  12108. </comparators>
  12109. </test>
  12110. <test> <!-- TESTED -->
  12111. <description>chown: change ownership of non existent file in absolute path</description>
  12112. <test-commands>
  12113. <command>-fs NAMENODE -chown newowner:newgroup /file1</command>
  12114. </test-commands>
  12115. <cleanup-commands>
  12116. <command>-fs NAMENODE -rm /file1</command>
  12117. </cleanup-commands>
  12118. <comparators>
  12119. <comparator>
  12120. <type>RegexpComparator</type>
  12121. <expected-output>^chown: `/file1': No such file or directory</expected-output>
  12122. </comparator>
  12123. </comparators>
  12124. </test>
  12125. <test> <!-- TESTED -->
  12126. <description>chown: change ownership of non existent file in relative path</description>
  12127. <test-commands>
  12128. <command>-fs NAMENODE -chown newowner:newgroup file1</command>
  12129. </test-commands>
  12130. <cleanup-commands>
  12131. <command>-fs NAMENODE -rm file1</command>
  12132. </cleanup-commands>
  12133. <comparators>
  12134. <comparator>
  12135. <type>RegexpComparator</type>
  12136. <expected-output>^chown: `file1': No such file or directory</expected-output>
  12137. </comparator>
  12138. </comparators>
  12139. </test>
  12140. <test> <!-- TESTED -->
  12141. <description>chown: change ownership of multiple files in absolute path using globbing</description>
  12142. <test-commands>
  12143. <command>-fs NAMENODE -touchz /file1</command>
  12144. <command>-fs NAMENODE -touchz /file2</command>
  12145. <command>-fs NAMENODE -touchz /file3</command>
  12146. <command>-fs NAMENODE -touchz /file4</command>
  12147. <command>-fs NAMENODE -chown newowner:newgroup /file* </command>
  12148. <command>-fs NAMENODE -ls -R /file*</command>
  12149. </test-commands>
  12150. <cleanup-commands>
  12151. <command>-fs NAMENODE -rm /file*</command>
  12152. </cleanup-commands>
  12153. <comparators>
  12154. <comparator>
  12155. <type>RegexpComparator</type>
  12156. <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>
  12157. </comparator>
  12158. <comparator>
  12159. <type>RegexpComparator</type>
  12160. <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>
  12161. </comparator>
  12162. <comparator>
  12163. <type>RegexpComparator</type>
  12164. <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>
  12165. </comparator>
  12166. <comparator>
  12167. <type>RegexpComparator</type>
  12168. <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>
  12169. </comparator>
  12170. </comparators>
  12171. </test>
  12172. <test> <!-- TESTED -->
  12173. <description>chown: change ownership of multiple files in relative path using globbing</description>
  12174. <test-commands>
  12175. <command>-fs NAMENODE -touchz file1</command>
  12176. <command>-fs NAMENODE -touchz file2</command>
  12177. <command>-fs NAMENODE -touchz file3</command>
  12178. <command>-fs NAMENODE -touchz file4</command>
  12179. <command>-fs NAMENODE -chown newowner:newgroup file* </command>
  12180. <command>-fs NAMENODE -ls -R file*</command>
  12181. </test-commands>
  12182. <cleanup-commands>
  12183. <command>-fs NAMENODE -rm file*</command>
  12184. </cleanup-commands>
  12185. <comparators>
  12186. <comparator>
  12187. <type>RegexpComparator</type>
  12188. <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>
  12189. </comparator>
  12190. <comparator>
  12191. <type>RegexpComparator</type>
  12192. <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>
  12193. </comparator>
  12194. <comparator>
  12195. <type>RegexpComparator</type>
  12196. <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>
  12197. </comparator>
  12198. <comparator>
  12199. <type>RegexpComparator</type>
  12200. <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>
  12201. </comparator>
  12202. </comparators>
  12203. </test>
  12204. <test> <!-- TESTED -->
  12205. <description>chown: change ownership of multiple directories in absolute path using globbing</description>
  12206. <test-commands>
  12207. <command>-fs NAMENODE -mkdir /dir0</command>
  12208. <command>-fs NAMENODE -mkdir /dir0/dir1</command>
  12209. <command>-fs NAMENODE -touchz /dir0/file0</command>
  12210. <command>-fs NAMENODE -touchz /dir0/dir1/file1</command>
  12211. <command>-fs NAMENODE -touchz /dir0/dir1/file2</command>
  12212. <command>-fs NAMENODE -mkdir /dir2</command>
  12213. <command>-fs NAMENODE -mkdir /dir2/dir1</command>
  12214. <command>-fs NAMENODE -touchz /dir2/file0</command>
  12215. <command>-fs NAMENODE -touchz /dir2/dir1/file1</command>
  12216. <command>-fs NAMENODE -touchz /dir2/dir1/file2</command>
  12217. <command>-fs NAMENODE -chown newowner:newgroup /dir*</command>
  12218. <command>-fs NAMENODE -ls -R /dir*</command>
  12219. </test-commands>
  12220. <cleanup-commands>
  12221. <command>-fs NAMENODE -rm -r /dir*</command>
  12222. </cleanup-commands>
  12223. <comparators>
  12224. <comparator>
  12225. <type>RegexpComparator</type>
  12226. <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>
  12227. </comparator>
  12228. <comparator>
  12229. <type>RegexpComparator</type>
  12230. <expected-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>
  12231. </comparator>
  12232. <comparator>
  12233. <type>RegexpComparator</type>
  12234. <expected-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>
  12235. </comparator>
  12236. <comparator>
  12237. <type>RegexpComparator</type>
  12238. <expected-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>
  12239. </comparator>
  12240. <comparator>
  12241. <type>RegexpComparator</type>
  12242. <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>
  12243. </comparator>
  12244. <comparator>
  12245. <type>RegexpComparator</type>
  12246. <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>
  12247. </comparator>
  12248. <comparator>
  12249. <type>RegexpComparator</type>
  12250. <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>
  12251. </comparator>
  12252. <comparator>
  12253. <type>RegexpComparator</type>
  12254. <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>
  12255. </comparator>
  12256. </comparators>
  12257. </test>
  12258. <test> <!-- TESTED -->
  12259. <description>chown: change ownership of multiple directories in relative path using globbing</description>
  12260. <test-commands>
  12261. <command>-fs NAMENODE -mkdir -p dir0</command>
  12262. <command>-fs NAMENODE -mkdir -p dir0/dir1</command>
  12263. <command>-fs NAMENODE -touchz dir0/file0</command>
  12264. <command>-fs NAMENODE -touchz dir0/dir1/file1</command>
  12265. <command>-fs NAMENODE -touchz dir0/dir1/file2</command>
  12266. <command>-fs NAMENODE -mkdir -p dir2</command>
  12267. <command>-fs NAMENODE -mkdir -p dir2/dir1</command>
  12268. <command>-fs NAMENODE -touchz dir2/file0</command>
  12269. <command>-fs NAMENODE -touchz dir2/dir1/file1</command>
  12270. <command>-fs NAMENODE -touchz dir2/dir1/file2</command>
  12271. <command>-fs NAMENODE -chown newowner:newgroup dir*</command>
  12272. <command>-fs NAMENODE -ls -R dir*</command>
  12273. </test-commands>
  12274. <cleanup-commands>
  12275. <command>-fs NAMENODE -rm -r dir*</command>
  12276. </cleanup-commands>
  12277. <comparators>
  12278. <comparator>
  12279. <type>RegexpComparator</type>
  12280. <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>
  12281. </comparator>
  12282. <comparator>
  12283. <type>RegexpComparator</type>
  12284. <expected-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>
  12285. </comparator>
  12286. <comparator>
  12287. <type>RegexpComparator</type>
  12288. <expected-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>
  12289. </comparator>
  12290. <comparator>
  12291. <type>RegexpComparator</type>
  12292. <expected-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>
  12293. </comparator>
  12294. <comparator>
  12295. <type>RegexpComparator</type>
  12296. <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>
  12297. </comparator>
  12298. <comparator>
  12299. <type>RegexpComparator</type>
  12300. <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>
  12301. </comparator>
  12302. <comparator>
  12303. <type>RegexpComparator</type>
  12304. <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>
  12305. </comparator>
  12306. <comparator>
  12307. <type>RegexpComparator</type>
  12308. <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>
  12309. </comparator>
  12310. </comparators>
  12311. </test>
  12312. <test> <!-- TESTED -->
  12313. <description>chown: change ownership of multiple files in absolute path without globbing</description>
  12314. <test-commands>
  12315. <command>-fs NAMENODE -touchz /file1</command>
  12316. <command>-fs NAMENODE -touchz /file2</command>
  12317. <command>-fs NAMENODE -touchz /file3</command>
  12318. <command>-fs NAMENODE -touchz /file4</command>
  12319. <command>-fs NAMENODE -chown newowner:newgroup /file1 /file2 /file3 /file4 </command>
  12320. <command>-fs NAMENODE -ls -R /file*</command>
  12321. </test-commands>
  12322. <cleanup-commands>
  12323. <command>-fs NAMENODE -rm /file*</command>
  12324. </cleanup-commands>
  12325. <comparators>
  12326. <comparator>
  12327. <type>RegexpComparator</type>
  12328. <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>
  12329. </comparator>
  12330. <comparator>
  12331. <type>RegexpComparator</type>
  12332. <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>
  12333. </comparator>
  12334. <comparator>
  12335. <type>RegexpComparator</type>
  12336. <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>
  12337. </comparator>
  12338. <comparator>
  12339. <type>RegexpComparator</type>
  12340. <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>
  12341. </comparator>
  12342. </comparators>
  12343. </test>
  12344. <test> <!-- TESTED -->
  12345. <description>chown: change ownership of multiple files in relative path without globbing</description>
  12346. <test-commands>
  12347. <command>-fs NAMENODE -touchz file1</command>
  12348. <command>-fs NAMENODE -touchz file2</command>
  12349. <command>-fs NAMENODE -touchz file3</command>
  12350. <command>-fs NAMENODE -touchz file4</command>
  12351. <command>-fs NAMENODE -chown newowner:newgroup file1 file2 file3 file4 </command>
  12352. <command>-fs NAMENODE -ls -R file*</command>
  12353. </test-commands>
  12354. <cleanup-commands>
  12355. <command>-fs NAMENODE -rm file*</command>
  12356. </cleanup-commands>
  12357. <comparators>
  12358. <comparator>
  12359. <type>RegexpComparator</type>
  12360. <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>
  12361. </comparator>
  12362. <comparator>
  12363. <type>RegexpComparator</type>
  12364. <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>
  12365. </comparator>
  12366. <comparator>
  12367. <type>RegexpComparator</type>
  12368. <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>
  12369. </comparator>
  12370. <comparator>
  12371. <type>RegexpComparator</type>
  12372. <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>
  12373. </comparator>
  12374. </comparators>
  12375. </test>
  12376. <test> <!-- TESTED -->
  12377. <description>chown: change ownership of multiple directories in absolute path without globbing</description>
  12378. <test-commands>
  12379. <command>-fs NAMENODE -mkdir /dir0</command>
  12380. <command>-fs NAMENODE -mkdir /dir0/dir1</command>
  12381. <command>-fs NAMENODE -touchz /dir0/file0</command>
  12382. <command>-fs NAMENODE -touchz /dir0/dir1/file1</command>
  12383. <command>-fs NAMENODE -touchz /dir0/dir1/file2</command>
  12384. <command>-fs NAMENODE -mkdir /dir2</command>
  12385. <command>-fs NAMENODE -mkdir /dir2/dir1</command>
  12386. <command>-fs NAMENODE -touchz /dir2/file0</command>
  12387. <command>-fs NAMENODE -touchz /dir2/dir1/file1</command>
  12388. <command>-fs NAMENODE -touchz /dir2/dir1/file2</command>
  12389. <command>-fs NAMENODE -chown newowner:newgroup /dir0 /dir2</command>
  12390. <command>-fs NAMENODE -ls -R /dir*</command>
  12391. </test-commands>
  12392. <cleanup-commands>
  12393. <command>-fs NAMENODE -rm -r /dir*</command>
  12394. </cleanup-commands>
  12395. <comparators>
  12396. <comparator>
  12397. <type>RegexpComparator</type>
  12398. <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>
  12399. </comparator>
  12400. <comparator>
  12401. <type>RegexpComparator</type>
  12402. <expected-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>
  12403. </comparator>
  12404. <comparator>
  12405. <type>RegexpComparator</type>
  12406. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1/file2</expected-output>
  12407. </comparator>
  12408. <comparator>
  12409. <type>RegexpComparator</type>
  12410. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/file0</expected-output>
  12411. </comparator>
  12412. <comparator>
  12413. <type>RegexpComparator</type>
  12414. <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>
  12415. </comparator>
  12416. <comparator>
  12417. <type>RegexpComparator</type>
  12418. <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>
  12419. </comparator>
  12420. <comparator>
  12421. <type>RegexpComparator</type>
  12422. <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>
  12423. </comparator>
  12424. <comparator>
  12425. <type>RegexpComparator</type>
  12426. <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>
  12427. </comparator>
  12428. </comparators>
  12429. </test>
  12430. <test> <!-- TESTED -->
  12431. <description>chown: change ownership of multiple directories in relative path without globbing</description>
  12432. <test-commands>
  12433. <command>-fs NAMENODE -mkdir -p dir0</command>
  12434. <command>-fs NAMENODE -mkdir -p dir0/dir1</command>
  12435. <command>-fs NAMENODE -touchz dir0/file0</command>
  12436. <command>-fs NAMENODE -touchz dir0/dir1/file1</command>
  12437. <command>-fs NAMENODE -touchz dir0/dir1/file2</command>
  12438. <command>-fs NAMENODE -mkdir -p dir2</command>
  12439. <command>-fs NAMENODE -mkdir -p dir2/dir1</command>
  12440. <command>-fs NAMENODE -touchz dir2/file0</command>
  12441. <command>-fs NAMENODE -touchz dir2/dir1/file1</command>
  12442. <command>-fs NAMENODE -touchz dir2/dir1/file2</command>
  12443. <command>-fs NAMENODE -chown newowner:newgroup dir0 dir2</command>
  12444. <command>-fs NAMENODE -ls -R dir*</command>
  12445. </test-commands>
  12446. <cleanup-commands>
  12447. <command>-fs NAMENODE -rm -r dir*</command>
  12448. </cleanup-commands>
  12449. <comparators>
  12450. <comparator>
  12451. <type>RegexpComparator</type>
  12452. <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>
  12453. </comparator>
  12454. <comparator>
  12455. <type>RegexpComparator</type>
  12456. <expected-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>
  12457. </comparator>
  12458. <comparator>
  12459. <type>RegexpComparator</type>
  12460. <expected-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>
  12461. </comparator>
  12462. <comparator>
  12463. <type>RegexpComparator</type>
  12464. <expected-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>
  12465. </comparator>
  12466. <comparator>
  12467. <type>RegexpComparator</type>
  12468. <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>
  12469. </comparator>
  12470. <comparator>
  12471. <type>RegexpComparator</type>
  12472. <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>
  12473. </comparator>
  12474. <comparator>
  12475. <type>RegexpComparator</type>
  12476. <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>
  12477. </comparator>
  12478. <comparator>
  12479. <type>RegexpComparator</type>
  12480. <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>
  12481. </comparator>
  12482. </comparators>
  12483. </test>
  12484. <test> <!-- TESTED -->
  12485. <description>chown: change ownership of multiple directories recursively in absolute path using globbing</description>
  12486. <test-commands>
  12487. <command>-fs NAMENODE -mkdir /dir0</command>
  12488. <command>-fs NAMENODE -mkdir /dir0/dir1</command>
  12489. <command>-fs NAMENODE -touchz /dir0/file0</command>
  12490. <command>-fs NAMENODE -touchz /dir0/dir1/file1</command>
  12491. <command>-fs NAMENODE -touchz /dir0/dir1/file2</command>
  12492. <command>-fs NAMENODE -mkdir /dir2</command>
  12493. <command>-fs NAMENODE -mkdir /dir2/dir1</command>
  12494. <command>-fs NAMENODE -touchz /dir2/file0</command>
  12495. <command>-fs NAMENODE -touchz /dir2/dir1/file1</command>
  12496. <command>-fs NAMENODE -touchz /dir2/dir1/file2</command>
  12497. <command>-fs NAMENODE -chown -R newowner:newgroup /dir*</command>
  12498. <command>-fs NAMENODE -ls -R /dir*</command>
  12499. </test-commands>
  12500. <cleanup-commands>
  12501. <command>-fs NAMENODE -rm -r /dir*</command>
  12502. </cleanup-commands>
  12503. <comparators>
  12504. <comparator>
  12505. <type>RegexpComparator</type>
  12506. <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>
  12507. </comparator>
  12508. <comparator>
  12509. <type>RegexpComparator</type>
  12510. <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>
  12511. </comparator>
  12512. <comparator>
  12513. <type>RegexpComparator</type>
  12514. <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>
  12515. </comparator>
  12516. <comparator>
  12517. <type>RegexpComparator</type>
  12518. <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>
  12519. </comparator>
  12520. <comparator>
  12521. <type>RegexpComparator</type>
  12522. <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>
  12523. </comparator>
  12524. <comparator>
  12525. <type>RegexpComparator</type>
  12526. <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>
  12527. </comparator>
  12528. <comparator>
  12529. <type>RegexpComparator</type>
  12530. <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>
  12531. </comparator>
  12532. <comparator>
  12533. <type>RegexpComparator</type>
  12534. <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>
  12535. </comparator>
  12536. </comparators>
  12537. </test>
  12538. <test> <!-- TESTED -->
  12539. <description>chown: change ownership of multiple directories recursively in relative path using globbing</description>
  12540. <test-commands>
  12541. <command>-fs NAMENODE -mkdir -p dir0</command>
  12542. <command>-fs NAMENODE -mkdir -p dir0/dir1</command>
  12543. <command>-fs NAMENODE -touchz dir0/file0</command>
  12544. <command>-fs NAMENODE -touchz dir0/dir1/file1</command>
  12545. <command>-fs NAMENODE -touchz dir0/dir1/file2</command>
  12546. <command>-fs NAMENODE -mkdir -p dir2</command>
  12547. <command>-fs NAMENODE -mkdir -p dir2/dir1</command>
  12548. <command>-fs NAMENODE -touchz dir2/file0</command>
  12549. <command>-fs NAMENODE -touchz dir2/dir1/file1</command>
  12550. <command>-fs NAMENODE -touchz dir2/dir1/file2</command>
  12551. <command>-fs NAMENODE -chown -R newowner:newgroup dir*</command>
  12552. <command>-fs NAMENODE -ls -R dir*</command>
  12553. </test-commands>
  12554. <cleanup-commands>
  12555. <command>-fs NAMENODE -rm -r dir*</command>
  12556. </cleanup-commands>
  12557. <comparators>
  12558. <comparator>
  12559. <type>RegexpComparator</type>
  12560. <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>
  12561. </comparator>
  12562. <comparator>
  12563. <type>RegexpComparator</type>
  12564. <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>
  12565. </comparator>
  12566. <comparator>
  12567. <type>RegexpComparator</type>
  12568. <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>
  12569. </comparator>
  12570. <comparator>
  12571. <type>RegexpComparator</type>
  12572. <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>
  12573. </comparator>
  12574. <comparator>
  12575. <type>RegexpComparator</type>
  12576. <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>
  12577. </comparator>
  12578. <comparator>
  12579. <type>RegexpComparator</type>
  12580. <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>
  12581. </comparator>
  12582. <comparator>
  12583. <type>RegexpComparator</type>
  12584. <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>
  12585. </comparator>
  12586. <comparator>
  12587. <type>RegexpComparator</type>
  12588. <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>
  12589. </comparator>
  12590. </comparators>
  12591. </test>
  12592. <test> <!-- TESTED -->
  12593. <description>chown: change ownership of multiple directories recursively in absolute path without globbing</description>
  12594. <test-commands>
  12595. <command>-fs NAMENODE -mkdir /dir0</command>
  12596. <command>-fs NAMENODE -mkdir /dir0/dir1</command>
  12597. <command>-fs NAMENODE -touchz /dir0/file0</command>
  12598. <command>-fs NAMENODE -touchz /dir0/dir1/file1</command>
  12599. <command>-fs NAMENODE -touchz /dir0/dir1/file2</command>
  12600. <command>-fs NAMENODE -mkdir /dir2</command>
  12601. <command>-fs NAMENODE -mkdir /dir2/dir1</command>
  12602. <command>-fs NAMENODE -touchz /dir2/file0</command>
  12603. <command>-fs NAMENODE -touchz /dir2/dir1/file1</command>
  12604. <command>-fs NAMENODE -touchz /dir2/dir1/file2</command>
  12605. <command>-fs NAMENODE -chown -R newowner:newgroup /dir0 /dir2</command>
  12606. <command>-fs NAMENODE -ls -R /dir*</command>
  12607. </test-commands>
  12608. <cleanup-commands>
  12609. <command>-fs NAMENODE -rm -r /dir*</command>
  12610. </cleanup-commands>
  12611. <comparators>
  12612. <comparator>
  12613. <type>RegexpComparator</type>
  12614. <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>
  12615. </comparator>
  12616. <comparator>
  12617. <type>RegexpComparator</type>
  12618. <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>
  12619. </comparator>
  12620. <comparator>
  12621. <type>RegexpComparator</type>
  12622. <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>
  12623. </comparator>
  12624. <comparator>
  12625. <type>RegexpComparator</type>
  12626. <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>
  12627. </comparator>
  12628. <comparator>
  12629. <type>RegexpComparator</type>
  12630. <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>
  12631. </comparator>
  12632. <comparator>
  12633. <type>RegexpComparator</type>
  12634. <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>
  12635. </comparator>
  12636. <comparator>
  12637. <type>RegexpComparator</type>
  12638. <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>
  12639. </comparator>
  12640. <comparator>
  12641. <type>RegexpComparator</type>
  12642. <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>
  12643. </comparator>
  12644. </comparators>
  12645. </test>
  12646. <test> <!-- TESTED -->
  12647. <description>chown: change ownership of multiple directories recursively in relative path without globbing</description>
  12648. <test-commands>
  12649. <command>-fs NAMENODE -mkdir -p dir0</command>
  12650. <command>-fs NAMENODE -mkdir -p dir0/dir1</command>
  12651. <command>-fs NAMENODE -touchz dir0/file0</command>
  12652. <command>-fs NAMENODE -touchz dir0/dir1/file1</command>
  12653. <command>-fs NAMENODE -touchz dir0/dir1/file2</command>
  12654. <command>-fs NAMENODE -mkdir -p dir2</command>
  12655. <command>-fs NAMENODE -mkdir -p dir2/dir1</command>
  12656. <command>-fs NAMENODE -touchz dir2/file0</command>
  12657. <command>-fs NAMENODE -touchz dir2/dir1/file1</command>
  12658. <command>-fs NAMENODE -touchz dir2/dir1/file2</command>
  12659. <command>-fs NAMENODE -chown -R newowner:newgroup dir0 dir2</command>
  12660. <command>-fs NAMENODE -ls -R dir*</command>
  12661. </test-commands>
  12662. <cleanup-commands>
  12663. <command>-fs NAMENODE -rm -r dir*</command>
  12664. </cleanup-commands>
  12665. <comparators>
  12666. <comparator>
  12667. <type>RegexpComparator</type>
  12668. <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>
  12669. </comparator>
  12670. <comparator>
  12671. <type>RegexpComparator</type>
  12672. <expected-output>^-rw-r--r--( )*1( )*newowner( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/dir1/file1</expected-output>
  12673. </comparator>
  12674. <comparator>
  12675. <type>RegexpComparator</type>
  12676. <expected-output>^-rw-r--r--( )*1( )*newowner( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/dir1/file2</expected-output>
  12677. </comparator>
  12678. <comparator>
  12679. <type>RegexpComparator</type>
  12680. <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>
  12681. </comparator>
  12682. <comparator>
  12683. <type>RegexpComparator</type>
  12684. <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>
  12685. </comparator>
  12686. <comparator>
  12687. <type>RegexpComparator</type>
  12688. <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>
  12689. </comparator>
  12690. <comparator>
  12691. <type>RegexpComparator</type>
  12692. <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>
  12693. </comparator>
  12694. <comparator>
  12695. <type>RegexpComparator</type>
  12696. <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>
  12697. </comparator>
  12698. </comparators>
  12699. </test>
  12700. <test> <!-- TESTED -->
  12701. <description>chown: invalid option for owner of file in absolute path</description>
  12702. <test-commands>
  12703. <command>-fs NAMENODE -touchz /file1</command>
  12704. <command>-fs NAMENODE -chown %:newgroup /file1</command>
  12705. </test-commands>
  12706. <cleanup-commands>
  12707. <command>-fs NAMENODE -rm /file1</command>
  12708. </cleanup-commands>
  12709. <comparators>
  12710. <comparator>
  12711. <type>RegexpComparator</type>
  12712. <expected-output>^-chown: '%:newgroup' does not match expected pattern for \[owner\]\[:group\].</expected-output>
  12713. </comparator>
  12714. </comparators>
  12715. </test>
  12716. <test> <!-- TESTED -->
  12717. <description>chown: invalid option for owner of file in relative path</description>
  12718. <test-commands>
  12719. <command>-fs NAMENODE -touchz file1</command>
  12720. <command>-fs NAMENODE -chown %:newgroup file1</command>
  12721. </test-commands>
  12722. <cleanup-commands>
  12723. <command>-fs NAMENODE -rm file1</command>
  12724. </cleanup-commands>
  12725. <comparators>
  12726. <comparator>
  12727. <type>RegexpComparator</type>
  12728. <expected-output>^-chown: '%:newgroup' does not match expected pattern for \[owner\]\[:group\].</expected-output>
  12729. </comparator>
  12730. </comparators>
  12731. </test>
  12732. <test> <!-- TESTED -->
  12733. <description>chown: invalid option for group of file in absolute path</description>
  12734. <test-commands>
  12735. <command>-fs NAMENODE -touchz /file1</command>
  12736. <command>-fs NAMENODE -chown newowner:% /file1</command>
  12737. </test-commands>
  12738. <cleanup-commands>
  12739. <command>-fs NAMENODE -rm /file1</command>
  12740. </cleanup-commands>
  12741. <comparators>
  12742. <comparator>
  12743. <type>RegexpComparator</type>
  12744. <expected-output>^-chown: 'newowner:%' does not match expected pattern for \[owner\]\[:group\].</expected-output>
  12745. </comparator>
  12746. </comparators>
  12747. </test>
  12748. <test> <!-- TESTED -->
  12749. <description>chown: invalid option for group of file in relative path</description>
  12750. <test-commands>
  12751. <command>-fs NAMENODE -touchz file1</command>
  12752. <command>-fs NAMENODE -chown newowner:% file1</command>
  12753. </test-commands>
  12754. <cleanup-commands>
  12755. <command>-fs NAMENODE -rm file1</command>
  12756. </cleanup-commands>
  12757. <comparators>
  12758. <comparator>
  12759. <type>RegexpComparator</type>
  12760. <expected-output>^-chown: 'newowner:%' does not match expected pattern for \[owner\]\[:group\].</expected-output>
  12761. </comparator>
  12762. </comparators>
  12763. </test>
  12764. <test> <!-- TESTED -->
  12765. <description>chown: change ownership of file in Namenode's path</description>
  12766. <test-commands>
  12767. <command>-fs NAMENODE -touchz NAMENODE/file1</command>
  12768. <command>-fs NAMENODE -chown newowner:newgroup NAMENODE/file1</command>
  12769. <command>-fs NAMENODE -ls NAMENODE/file1</command>
  12770. </test-commands>
  12771. <cleanup-commands>
  12772. <command>-fs NAMENODE -rm NAMENODE/file1</command>
  12773. </cleanup-commands>
  12774. <comparators>
  12775. <comparator>
  12776. <type>RegexpComparator</type>
  12777. <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>
  12778. </comparator>
  12779. </comparators>
  12780. </test>
  12781. <test> <!-- TESTED -->
  12782. <description>chown: change ownership of directory in Namenode's path</description>
  12783. <test-commands>
  12784. <command>-fs NAMENODE -mkdir NAMENODE/dir0</command>
  12785. <command>-fs NAMENODE -mkdir NAMENODE/dir0/dir1</command>
  12786. <command>-fs NAMENODE -touchz NAMENODE/dir0/file0</command>
  12787. <command>-fs NAMENODE -touchz NAMENODE/dir0/dir1/file1</command>
  12788. <command>-fs NAMENODE -touchz NAMENODE/dir0/dir1/file2</command>
  12789. <command>-fs NAMENODE -chown newowner:newgroup NAMENODE/dir0/dir1</command>
  12790. <command>-fs NAMENODE -ls -R NAMENODE/dir0</command>
  12791. </test-commands>
  12792. <cleanup-commands>
  12793. <command>-fs NAMENODE -rm -r NAMENODE/dir0</command>
  12794. </cleanup-commands>
  12795. <comparators>
  12796. <comparator>
  12797. <type>RegexpComparator</type>
  12798. <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>
  12799. </comparator>
  12800. <comparator>
  12801. <type>RegexpComparator</type>
  12802. <expected-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>
  12803. </comparator>
  12804. <comparator>
  12805. <type>RegexpComparator</type>
  12806. <expected-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>
  12807. </comparator>
  12808. <comparator>
  12809. <type>RegexpComparator</type>
  12810. <expected-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>
  12811. </comparator>
  12812. </comparators>
  12813. </test>
  12814. <test> <!-- TESTED -->
  12815. <description>chown: change ownership of directory in Namenode's path recursively </description>
  12816. <test-commands>
  12817. <command>-fs NAMENODE -mkdir NAMENODE/dir0</command>
  12818. <command>-fs NAMENODE -mkdir NAMENODE/dir0/dir1</command>
  12819. <command>-fs NAMENODE -touchz NAMENODE/dir0/file0</command>
  12820. <command>-fs NAMENODE -touchz NAMENODE/dir0/dir1/file1</command>
  12821. <command>-fs NAMENODE -touchz NAMENODE/dir0/dir1/file2</command>
  12822. <command>-fs NAMENODE -chown -R newowner:newgroup NAMENODE/dir0/dir1</command>
  12823. <command>-fs NAMENODE -ls -R NAMENODE/dir0</command>
  12824. </test-commands>
  12825. <cleanup-commands>
  12826. <command>-fs NAMENODE -rm -r NAMENODE/dir0</command>
  12827. </cleanup-commands>
  12828. <comparators>
  12829. <comparator>
  12830. <type>RegexpComparator</type>
  12831. <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>
  12832. </comparator>
  12833. <comparator>
  12834. <type>RegexpComparator</type>
  12835. <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>
  12836. </comparator>
  12837. <comparator>
  12838. <type>RegexpComparator</type>
  12839. <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>
  12840. </comparator>
  12841. <comparator>
  12842. <type>RegexpComparator</type>
  12843. <expected-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>
  12844. </comparator>
  12845. </comparators>
  12846. </test>
  12847. <test> <!-- TESTED -->
  12848. <description>chown: change ownership of non existent file in Namenode's path</description>
  12849. <test-commands>
  12850. <command>-fs NAMENODE -chown newowner:newgroup NAMENODE/file1</command>
  12851. </test-commands>
  12852. <cleanup-commands>
  12853. <command>-fs NAMENODE -rm NAMENODE/file1</command>
  12854. </cleanup-commands>
  12855. <comparators>
  12856. <comparator>
  12857. <type>RegexpComparator</type>
  12858. <expected-output>^chown: `NAMENODE/file1': No such file or directory</expected-output>
  12859. </comparator>
  12860. </comparators>
  12861. </test>
  12862. <test> <!-- TESTED -->
  12863. <description>chown: change ownership of multiple files in Namenode's path using globbing</description>
  12864. <test-commands>
  12865. <command>-fs NAMENODE -touchz NAMENODE/file1</command>
  12866. <command>-fs NAMENODE -touchz NAMENODE/file2</command>
  12867. <command>-fs NAMENODE -touchz NAMENODE/file3</command>
  12868. <command>-fs NAMENODE -touchz NAMENODE/file4</command>
  12869. <command>-fs NAMENODE -chown newowner:newgroup NAMENODE/file* </command>
  12870. <command>-fs NAMENODE -ls -R NAMENODE/file*</command>
  12871. </test-commands>
  12872. <cleanup-commands>
  12873. <command>-fs NAMENODE -rm NAMENODE/file*</command>
  12874. </cleanup-commands>
  12875. <comparators>
  12876. <comparator>
  12877. <type>RegexpComparator</type>
  12878. <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>
  12879. </comparator>
  12880. <comparator>
  12881. <type>RegexpComparator</type>
  12882. <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>
  12883. </comparator>
  12884. <comparator>
  12885. <type>RegexpComparator</type>
  12886. <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>
  12887. </comparator>
  12888. <comparator>
  12889. <type>RegexpComparator</type>
  12890. <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>
  12891. </comparator>
  12892. </comparators>
  12893. </test>
  12894. <test> <!-- TESTED -->
  12895. <description>chown: change ownership of multiple directories in Namenode's path using globbing</description>
  12896. <test-commands>
  12897. <command>-fs NAMENODE -mkdir NAMENODE/dir0</command>
  12898. <command>-fs NAMENODE -mkdir NAMENODE/dir0/dir1</command>
  12899. <command>-fs NAMENODE -touchz NAMENODE/dir0/file0</command>
  12900. <command>-fs NAMENODE -touchz NAMENODE/dir0/dir1/file1</command>
  12901. <command>-fs NAMENODE -touchz NAMENODE/dir0/dir1/file2</command>
  12902. <command>-fs NAMENODE -mkdir NAMENODE/dir2</command>
  12903. <command>-fs NAMENODE -mkdir NAMENODE/dir2/dir1</command>
  12904. <command>-fs NAMENODE -touchz NAMENODE/dir2/file0</command>
  12905. <command>-fs NAMENODE -touchz NAMENODE/dir2/dir1/file1</command>
  12906. <command>-fs NAMENODE -touchz NAMENODE/dir2/dir1/file2</command>
  12907. <command>-fs NAMENODE -chown newowner:newgroup NAMENODE/dir*</command>
  12908. <command>-fs NAMENODE -ls -R NAMENODE/dir*</command>
  12909. </test-commands>
  12910. <cleanup-commands>
  12911. <command>-fs NAMENODE -rm -r NAMENODE/dir*</command>
  12912. </cleanup-commands>
  12913. <comparators>
  12914. <comparator>
  12915. <type>RegexpComparator</type>
  12916. <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>
  12917. </comparator>
  12918. <comparator>
  12919. <type>RegexpComparator</type>
  12920. <expected-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>
  12921. </comparator>
  12922. <comparator>
  12923. <type>RegexpComparator</type>
  12924. <expected-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>
  12925. </comparator>
  12926. <comparator>
  12927. <type>RegexpComparator</type>
  12928. <expected-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>
  12929. </comparator>
  12930. <comparator>
  12931. <type>RegexpComparator</type>
  12932. <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>
  12933. </comparator>
  12934. <comparator>
  12935. <type>RegexpComparator</type>
  12936. <expected-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>
  12937. </comparator>
  12938. <comparator>
  12939. <type>RegexpComparator</type>
  12940. <expected-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>
  12941. </comparator>
  12942. <comparator>
  12943. <type>RegexpComparator</type>
  12944. <expected-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>
  12945. </comparator>
  12946. </comparators>
  12947. </test>
  12948. <test> <!-- TESTED -->
  12949. <description>chown: change ownership of multiple files in Namenode's path without globbing</description>
  12950. <test-commands>
  12951. <command>-fs NAMENODE -touchz NAMENODE/file1</command>
  12952. <command>-fs NAMENODE -touchz NAMENODE/file2</command>
  12953. <command>-fs NAMENODE -touchz NAMENODE/file3</command>
  12954. <command>-fs NAMENODE -touchz NAMENODE/file4</command>
  12955. <command>-fs NAMENODE -chown newowner:newgroup NAMENODE/file1 NAMENODE/file2 NAMENODE/file3 NAMENODE/file4 </command>
  12956. <command>-fs NAMENODE -ls -R NAMENODE/file*</command>
  12957. </test-commands>
  12958. <cleanup-commands>
  12959. <command>-fs NAMENODE -rm NAMENODE/file*</command>
  12960. </cleanup-commands>
  12961. <comparators>
  12962. <comparator>
  12963. <type>RegexpComparator</type>
  12964. <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>
  12965. </comparator>
  12966. <comparator>
  12967. <type>RegexpComparator</type>
  12968. <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>
  12969. </comparator>
  12970. <comparator>
  12971. <type>RegexpComparator</type>
  12972. <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>
  12973. </comparator>
  12974. <comparator>
  12975. <type>RegexpComparator</type>
  12976. <expected-output>^-rw-r--r--( )*1( )*newowner( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/file4</expected-output>
  12977. </comparator>
  12978. </comparators>
  12979. </test>
  12980. <test> <!-- TESTED -->
  12981. <description>chown: change ownership of multiple directories in Namenode's path without globbing</description>
  12982. <test-commands>
  12983. <command>-fs NAMENODE -mkdir NAMENODE/dir0</command>
  12984. <command>-fs NAMENODE -mkdir NAMENODE/dir0/dir1</command>
  12985. <command>-fs NAMENODE -touchz NAMENODE/dir0/file0</command>
  12986. <command>-fs NAMENODE -touchz NAMENODE/dir0/dir1/file1</command>
  12987. <command>-fs NAMENODE -touchz NAMENODE/dir0/dir1/file2</command>
  12988. <command>-fs NAMENODE -mkdir NAMENODE/dir2</command>
  12989. <command>-fs NAMENODE -mkdir NAMENODE/dir2/dir1</command>
  12990. <command>-fs NAMENODE -touchz NAMENODE/dir2/file0</command>
  12991. <command>-fs NAMENODE -touchz NAMENODE/dir2/dir1/file1</command>
  12992. <command>-fs NAMENODE -touchz NAMENODE/dir2/dir1/file2</command>
  12993. <command>-fs NAMENODE -chown newowner:newgroup NAMENODE/dir0 NAMENODE/dir2</command>
  12994. <command>-fs NAMENODE -ls -R NAMENODE/dir*</command>
  12995. </test-commands>
  12996. <cleanup-commands>
  12997. <command>-fs NAMENODE -rm -r NAMENODE/dir*</command>
  12998. </cleanup-commands>
  12999. <comparators>
  13000. <comparator>
  13001. <type>RegexpComparator</type>
  13002. <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>
  13003. </comparator>
  13004. <comparator>
  13005. <type>RegexpComparator</type>
  13006. <expected-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>
  13007. </comparator>
  13008. <comparator>
  13009. <type>RegexpComparator</type>
  13010. <expected-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>
  13011. </comparator>
  13012. <comparator>
  13013. <type>RegexpComparator</type>
  13014. <expected-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>
  13015. </comparator>
  13016. <comparator>
  13017. <type>RegexpComparator</type>
  13018. <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>
  13019. </comparator>
  13020. <comparator>
  13021. <type>RegexpComparator</type>
  13022. <expected-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>
  13023. </comparator>
  13024. <comparator>
  13025. <type>RegexpComparator</type>
  13026. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir2/dir1/file2</expected-output>
  13027. </comparator>
  13028. <comparator>
  13029. <type>RegexpComparator</type>
  13030. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir2/file0</expected-output>
  13031. </comparator>
  13032. </comparators>
  13033. </test>
  13034. <test> <!-- TESTED -->
  13035. <description>chown: change ownership of multiple directories recursively in Namenode's path using globbing</description>
  13036. <test-commands>
  13037. <command>-fs NAMENODE -mkdir NAMENODE/dir0</command>
  13038. <command>-fs NAMENODE -mkdir NAMENODE/dir0/dir1</command>
  13039. <command>-fs NAMENODE -touchz NAMENODE/dir0/file0</command>
  13040. <command>-fs NAMENODE -touchz NAMENODE/dir0/dir1/file1</command>
  13041. <command>-fs NAMENODE -touchz NAMENODE/dir0/dir1/file2</command>
  13042. <command>-fs NAMENODE -mkdir NAMENODE/dir2</command>
  13043. <command>-fs NAMENODE -mkdir NAMENODE/dir2/dir1</command>
  13044. <command>-fs NAMENODE -touchz NAMENODE/dir2/file0</command>
  13045. <command>-fs NAMENODE -touchz NAMENODE/dir2/dir1/file1</command>
  13046. <command>-fs NAMENODE -touchz NAMENODE/dir2/dir1/file2</command>
  13047. <command>-fs NAMENODE -chown -R newowner:newgroup NAMENODE/dir*</command>
  13048. <command>-fs NAMENODE -ls -R NAMENODE/dir*</command>
  13049. </test-commands>
  13050. <cleanup-commands>
  13051. <command>-fs NAMENODE -rm -r NAMENODE/dir*</command>
  13052. </cleanup-commands>
  13053. <comparators>
  13054. <comparator>
  13055. <type>RegexpComparator</type>
  13056. <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>
  13057. </comparator>
  13058. <comparator>
  13059. <type>RegexpComparator</type>
  13060. <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>
  13061. </comparator>
  13062. <comparator>
  13063. <type>RegexpComparator</type>
  13064. <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>
  13065. </comparator>
  13066. <comparator>
  13067. <type>RegexpComparator</type>
  13068. <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>
  13069. </comparator>
  13070. <comparator>
  13071. <type>RegexpComparator</type>
  13072. <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>
  13073. </comparator>
  13074. <comparator>
  13075. <type>RegexpComparator</type>
  13076. <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>
  13077. </comparator>
  13078. <comparator>
  13079. <type>RegexpComparator</type>
  13080. <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>
  13081. </comparator>
  13082. <comparator>
  13083. <type>RegexpComparator</type>
  13084. <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>
  13085. </comparator>
  13086. </comparators>
  13087. </test>
  13088. <test> <!-- TESTED -->
  13089. <description>chown: change ownership of multiple directories recursively in Namenode's path without globbing</description>
  13090. <test-commands>
  13091. <command>-fs NAMENODE -mkdir NAMENODE/dir0</command>
  13092. <command>-fs NAMENODE -mkdir NAMENODE/dir0/dir1</command>
  13093. <command>-fs NAMENODE -touchz NAMENODE/dir0/file0</command>
  13094. <command>-fs NAMENODE -touchz NAMENODE/dir0/dir1/file1</command>
  13095. <command>-fs NAMENODE -touchz NAMENODE/dir0/dir1/file2</command>
  13096. <command>-fs NAMENODE -mkdir NAMENODE/dir2</command>
  13097. <command>-fs NAMENODE -mkdir NAMENODE/dir2/dir1</command>
  13098. <command>-fs NAMENODE -touchz NAMENODE/dir2/file0</command>
  13099. <command>-fs NAMENODE -touchz NAMENODE/dir2/dir1/file1</command>
  13100. <command>-fs NAMENODE -touchz NAMENODE/dir2/dir1/file2</command>
  13101. <command>-fs NAMENODE -chown -R newowner:newgroup NAMENODE/dir0 NAMENODE/dir2</command>
  13102. <command>-fs NAMENODE -ls -R NAMENODE/dir*</command>
  13103. </test-commands>
  13104. <cleanup-commands>
  13105. <command>-fs NAMENODE -rm -r NAMENODE/dir*</command>
  13106. </cleanup-commands>
  13107. <comparators>
  13108. <comparator>
  13109. <type>RegexpComparator</type>
  13110. <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>
  13111. </comparator>
  13112. <comparator>
  13113. <type>RegexpComparator</type>
  13114. <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>
  13115. </comparator>
  13116. <comparator>
  13117. <type>RegexpComparator</type>
  13118. <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>
  13119. </comparator>
  13120. <comparator>
  13121. <type>RegexpComparator</type>
  13122. <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>
  13123. </comparator>
  13124. <comparator>
  13125. <type>RegexpComparator</type>
  13126. <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>
  13127. </comparator>
  13128. <comparator>
  13129. <type>RegexpComparator</type>
  13130. <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>
  13131. </comparator>
  13132. <comparator>
  13133. <type>RegexpComparator</type>
  13134. <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>
  13135. </comparator>
  13136. <comparator>
  13137. <type>RegexpComparator</type>
  13138. <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>
  13139. </comparator>
  13140. </comparators>
  13141. </test>
  13142. <test> <!-- TESTED -->
  13143. <description>chown: invalid option for owner of file in Namenode's path</description>
  13144. <test-commands>
  13145. <command>-fs NAMENODE -touchz NAMENODE/file1</command>
  13146. <command>-fs NAMENODE -chown %:newgroup NAMENODE/file1</command>
  13147. </test-commands>
  13148. <cleanup-commands>
  13149. <command>-fs NAMENODE -rm NAMENODE/file1</command>
  13150. </cleanup-commands>
  13151. <comparators>
  13152. <comparator>
  13153. <type>RegexpComparator</type>
  13154. <expected-output>^-chown: '%:newgroup' does not match expected pattern for \[owner\]\[:group\].</expected-output>
  13155. </comparator>
  13156. </comparators>
  13157. </test>
  13158. <test> <!-- TESTED -->
  13159. <description>chown: invalid option for group of file in Namenode's path</description>
  13160. <test-commands>
  13161. <command>-fs NAMENODE -touchz NAMENODE/file1</command>
  13162. <command>-fs NAMENODE -chown newowner:% NAMENODE/file1</command>
  13163. </test-commands>
  13164. <cleanup-commands>
  13165. <command>-fs NAMENODE -rm NAMENODE/file1</command>
  13166. </cleanup-commands>
  13167. <comparators>
  13168. <comparator>
  13169. <type>RegexpComparator</type>
  13170. <expected-output>^-chown: 'newowner:%' does not match expected pattern for \[owner\]\[:group\].</expected-output>
  13171. </comparator>
  13172. </comparators>
  13173. </test>
  13174. <!-- Tests for chgrp -->
  13175. <test> <!-- TESTED -->
  13176. <description>chgrp: change group of file in absolute path</description>
  13177. <test-commands>
  13178. <command>-fs NAMENODE -touchz /file1</command>
  13179. <command>-fs NAMENODE -chgrp newgroup /file1</command>
  13180. <command>-fs NAMENODE -ls /file1</command>
  13181. </test-commands>
  13182. <cleanup-commands>
  13183. <command>-fs NAMENODE -rm /file1</command>
  13184. </cleanup-commands>
  13185. <comparators>
  13186. <comparator>
  13187. <type>RegexpComparator</type>
  13188. <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>
  13189. </comparator>
  13190. </comparators>
  13191. </test>
  13192. <test> <!-- TESTED -->
  13193. <description>chgrp: change group of file in relative path</description>
  13194. <test-commands>
  13195. <command>-fs NAMENODE -touchz file1</command>
  13196. <command>-fs NAMENODE -chgrp newgroup file1</command>
  13197. <command>-fs NAMENODE -ls file1</command>
  13198. </test-commands>
  13199. <cleanup-commands>
  13200. <command>-fs NAMENODE -rm file1</command>
  13201. </cleanup-commands>
  13202. <comparators>
  13203. <comparator>
  13204. <type>RegexpComparator</type>
  13205. <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>
  13206. </comparator>
  13207. </comparators>
  13208. </test>
  13209. <test> <!-- TESTED -->
  13210. <description>chgrp: change group of directory in absolute path</description>
  13211. <test-commands>
  13212. <command>-fs NAMENODE -mkdir /dir0</command>
  13213. <command>-fs NAMENODE -mkdir /dir0/dir1</command>
  13214. <command>-fs NAMENODE -touchz /dir0/file0</command>
  13215. <command>-fs NAMENODE -touchz /dir0/dir1/file1</command>
  13216. <command>-fs NAMENODE -touchz /dir0/dir1/file2</command>
  13217. <command>-fs NAMENODE -chgrp newgroup /dir0/dir1</command>
  13218. <command>-fs NAMENODE -ls -R /dir0</command>
  13219. </test-commands>
  13220. <cleanup-commands>
  13221. <command>-fs NAMENODE -rm -r /dir0</command>
  13222. </cleanup-commands>
  13223. <comparators>
  13224. <comparator>
  13225. <type>RegexpComparator</type>
  13226. <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>
  13227. </comparator>
  13228. <comparator>
  13229. <type>RegexpComparator</type>
  13230. <expected-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>
  13231. </comparator>
  13232. <comparator>
  13233. <type>RegexpComparator</type>
  13234. <expected-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>
  13235. </comparator>
  13236. <comparator>
  13237. <type>RegexpComparator</type>
  13238. <expected-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>
  13239. </comparator>
  13240. </comparators>
  13241. </test>
  13242. <test> <!-- TESTED -->
  13243. <description>chgrp: change group of directory in relative path</description>
  13244. <test-commands>
  13245. <command>-fs NAMENODE -mkdir -p dir0</command>
  13246. <command>-fs NAMENODE -mkdir -p dir0/dir1</command>
  13247. <command>-fs NAMENODE -touchz dir0/file0</command>
  13248. <command>-fs NAMENODE -touchz dir0/dir1/file1</command>
  13249. <command>-fs NAMENODE -touchz dir0/dir1/file2</command>
  13250. <command>-fs NAMENODE -chgrp newgroup dir0/dir1</command>
  13251. <command>-fs NAMENODE -ls -R dir0</command>
  13252. </test-commands>
  13253. <cleanup-commands>
  13254. <command>-fs NAMENODE -rm -r dir0</command>
  13255. </cleanup-commands>
  13256. <comparators>
  13257. <comparator>
  13258. <type>RegexpComparator</type>
  13259. <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>
  13260. </comparator>
  13261. <comparator>
  13262. <type>RegexpComparator</type>
  13263. <expected-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>
  13264. </comparator>
  13265. <comparator>
  13266. <type>RegexpComparator</type>
  13267. <expected-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>
  13268. </comparator>
  13269. <comparator>
  13270. <type>RegexpComparator</type>
  13271. <expected-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>
  13272. </comparator>
  13273. </comparators>
  13274. </test>
  13275. <test> <!-- TESTED -->
  13276. <description>chgrp: change group of directory in absolute path recursively </description>
  13277. <test-commands>
  13278. <command>-fs NAMENODE -mkdir /dir0</command>
  13279. <command>-fs NAMENODE -mkdir /dir0/dir1</command>
  13280. <command>-fs NAMENODE -touchz /dir0/file0</command>
  13281. <command>-fs NAMENODE -touchz /dir0/dir1/file1</command>
  13282. <command>-fs NAMENODE -touchz /dir0/dir1/file2</command>
  13283. <command>-fs NAMENODE -chgrp -R newgroup /dir0/dir1</command>
  13284. <command>-fs NAMENODE -ls -R /dir0</command>
  13285. </test-commands>
  13286. <cleanup-commands>
  13287. <command>-fs NAMENODE -rm -r /dir0</command>
  13288. </cleanup-commands>
  13289. <comparators>
  13290. <comparator>
  13291. <type>RegexpComparator</type>
  13292. <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>
  13293. </comparator>
  13294. <comparator>
  13295. <type>RegexpComparator</type>
  13296. <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>
  13297. </comparator>
  13298. <comparator>
  13299. <type>RegexpComparator</type>
  13300. <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>
  13301. </comparator>
  13302. <comparator>
  13303. <type>RegexpComparator</type>
  13304. <expected-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>
  13305. </comparator>
  13306. </comparators>
  13307. </test>
  13308. <test> <!-- TESTED -->
  13309. <description>chgrp: change group of directory in relative path recursively </description>
  13310. <test-commands>
  13311. <command>-fs NAMENODE -mkdir -p dir0</command>
  13312. <command>-fs NAMENODE -mkdir -p dir0/dir1</command>
  13313. <command>-fs NAMENODE -touchz dir0/file0</command>
  13314. <command>-fs NAMENODE -touchz dir0/dir1/file1</command>
  13315. <command>-fs NAMENODE -touchz dir0/dir1/file2</command>
  13316. <command>-fs NAMENODE -chgrp -R newgroup dir0/dir1</command>
  13317. <command>-fs NAMENODE -ls -R dir0</command>
  13318. </test-commands>
  13319. <cleanup-commands>
  13320. <command>-fs NAMENODE -rm -r dir0</command>
  13321. </cleanup-commands>
  13322. <comparators>
  13323. <comparator>
  13324. <type>RegexpComparator</type>
  13325. <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>
  13326. </comparator>
  13327. <comparator>
  13328. <type>RegexpComparator</type>
  13329. <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>
  13330. </comparator>
  13331. <comparator>
  13332. <type>RegexpComparator</type>
  13333. <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>
  13334. </comparator>
  13335. <comparator>
  13336. <type>RegexpComparator</type>
  13337. <expected-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>
  13338. </comparator>
  13339. </comparators>
  13340. </test>
  13341. <test> <!-- TESTED -->
  13342. <description>chgrp: change group of non existent file in absolute path</description>
  13343. <test-commands>
  13344. <command>-fs NAMENODE -chgrp newgroup /file1</command>
  13345. </test-commands>
  13346. <cleanup-commands>
  13347. <command>-fs NAMENODE -rm /file1</command>
  13348. </cleanup-commands>
  13349. <comparators>
  13350. <comparator>
  13351. <type>RegexpComparator</type>
  13352. <expected-output>^chgrp: `/file1': No such file or directory</expected-output>
  13353. </comparator>
  13354. </comparators>
  13355. </test>
  13356. <test> <!-- TESTED -->
  13357. <description>chgrp: change group of non existent file in relative path</description>
  13358. <test-commands>
  13359. <command>-fs NAMENODE -chgrp newgroup file1</command>
  13360. </test-commands>
  13361. <cleanup-commands>
  13362. <command>-fs NAMENODE -rm file1</command>
  13363. </cleanup-commands>
  13364. <comparators>
  13365. <comparator>
  13366. <type>RegexpComparator</type>
  13367. <expected-output>^chgrp: `file1': No such file or directory</expected-output>
  13368. </comparator>
  13369. </comparators>
  13370. </test>
  13371. <test> <!-- TESTED -->
  13372. <description>chgrp: change group of multiple files in absolute path using globbing</description>
  13373. <test-commands>
  13374. <command>-fs NAMENODE -touchz /file1</command>
  13375. <command>-fs NAMENODE -touchz /file2</command>
  13376. <command>-fs NAMENODE -touchz /file3</command>
  13377. <command>-fs NAMENODE -touchz /file4</command>
  13378. <command>-fs NAMENODE -chgrp newgroup /file* </command>
  13379. <command>-fs NAMENODE -ls -R /file*</command>
  13380. </test-commands>
  13381. <cleanup-commands>
  13382. <command>-fs NAMENODE -rm /file*</command>
  13383. </cleanup-commands>
  13384. <comparators>
  13385. <comparator>
  13386. <type>RegexpComparator</type>
  13387. <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>
  13388. </comparator>
  13389. <comparator>
  13390. <type>RegexpComparator</type>
  13391. <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>
  13392. </comparator>
  13393. <comparator>
  13394. <type>RegexpComparator</type>
  13395. <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>
  13396. </comparator>
  13397. <comparator>
  13398. <type>RegexpComparator</type>
  13399. <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>
  13400. </comparator>
  13401. </comparators>
  13402. </test>
  13403. <test> <!-- TESTED -->
  13404. <description>chgrp: change group of multiple files in relative path using globbing</description>
  13405. <test-commands>
  13406. <command>-fs NAMENODE -touchz file1</command>
  13407. <command>-fs NAMENODE -touchz file2</command>
  13408. <command>-fs NAMENODE -touchz file3</command>
  13409. <command>-fs NAMENODE -touchz file4</command>
  13410. <command>-fs NAMENODE -chgrp newgroup file* </command>
  13411. <command>-fs NAMENODE -ls -R file*</command>
  13412. </test-commands>
  13413. <cleanup-commands>
  13414. <command>-fs NAMENODE -rm file*</command>
  13415. </cleanup-commands>
  13416. <comparators>
  13417. <comparator>
  13418. <type>RegexpComparator</type>
  13419. <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>
  13420. </comparator>
  13421. <comparator>
  13422. <type>RegexpComparator</type>
  13423. <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>
  13424. </comparator>
  13425. <comparator>
  13426. <type>RegexpComparator</type>
  13427. <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>
  13428. </comparator>
  13429. <comparator>
  13430. <type>RegexpComparator</type>
  13431. <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>
  13432. </comparator>
  13433. </comparators>
  13434. </test>
  13435. <test> <!-- TESTED -->
  13436. <description>chgrp: change group of multiple directories in absolute path using globbing</description>
  13437. <test-commands>
  13438. <command>-fs NAMENODE -mkdir /dir0</command>
  13439. <command>-fs NAMENODE -mkdir /dir0/dir1</command>
  13440. <command>-fs NAMENODE -touchz /dir0/file0</command>
  13441. <command>-fs NAMENODE -touchz /dir0/dir1/file1</command>
  13442. <command>-fs NAMENODE -touchz /dir0/dir1/file2</command>
  13443. <command>-fs NAMENODE -mkdir /dir2</command>
  13444. <command>-fs NAMENODE -mkdir /dir2/dir1</command>
  13445. <command>-fs NAMENODE -touchz /dir2/file0</command>
  13446. <command>-fs NAMENODE -touchz /dir2/dir1/file1</command>
  13447. <command>-fs NAMENODE -touchz /dir2/dir1/file2</command>
  13448. <command>-fs NAMENODE -chgrp newgroup /dir*</command>
  13449. <command>-fs NAMENODE -ls -R /dir*</command>
  13450. </test-commands>
  13451. <cleanup-commands>
  13452. <command>-fs NAMENODE -rm -r /dir*</command>
  13453. </cleanup-commands>
  13454. <comparators>
  13455. <comparator>
  13456. <type>RegexpComparator</type>
  13457. <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>
  13458. </comparator>
  13459. <comparator>
  13460. <type>RegexpComparator</type>
  13461. <expected-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>
  13462. </comparator>
  13463. <comparator>
  13464. <type>RegexpComparator</type>
  13465. <expected-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>
  13466. </comparator>
  13467. <comparator>
  13468. <type>RegexpComparator</type>
  13469. <expected-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>
  13470. </comparator>
  13471. <comparator>
  13472. <type>RegexpComparator</type>
  13473. <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>
  13474. </comparator>
  13475. <comparator>
  13476. <type>RegexpComparator</type>
  13477. <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>
  13478. </comparator>
  13479. <comparator>
  13480. <type>RegexpComparator</type>
  13481. <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>
  13482. </comparator>
  13483. <comparator>
  13484. <type>RegexpComparator</type>
  13485. <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>
  13486. </comparator>
  13487. </comparators>
  13488. </test>
  13489. <test> <!-- TESTED -->
  13490. <description>chgrp: change group of multiple directories in relative path using globbing</description>
  13491. <test-commands>
  13492. <command>-fs NAMENODE -mkdir -p dir0</command>
  13493. <command>-fs NAMENODE -mkdir -p dir0/dir1</command>
  13494. <command>-fs NAMENODE -touchz dir0/file0</command>
  13495. <command>-fs NAMENODE -touchz dir0/dir1/file1</command>
  13496. <command>-fs NAMENODE -touchz dir0/dir1/file2</command>
  13497. <command>-fs NAMENODE -mkdir -p dir2</command>
  13498. <command>-fs NAMENODE -mkdir -p dir2/dir1</command>
  13499. <command>-fs NAMENODE -touchz dir2/file0</command>
  13500. <command>-fs NAMENODE -touchz dir2/dir1/file1</command>
  13501. <command>-fs NAMENODE -touchz dir2/dir1/file2</command>
  13502. <command>-fs NAMENODE -chgrp newgroup dir*</command>
  13503. <command>-fs NAMENODE -ls -R dir*</command>
  13504. </test-commands>
  13505. <cleanup-commands>
  13506. <command>-fs NAMENODE -rm -r dir*</command>
  13507. </cleanup-commands>
  13508. <comparators>
  13509. <comparator>
  13510. <type>RegexpComparator</type>
  13511. <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>
  13512. </comparator>
  13513. <comparator>
  13514. <type>RegexpComparator</type>
  13515. <expected-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>
  13516. </comparator>
  13517. <comparator>
  13518. <type>RegexpComparator</type>
  13519. <expected-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>
  13520. </comparator>
  13521. <comparator>
  13522. <type>RegexpComparator</type>
  13523. <expected-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>
  13524. </comparator>
  13525. <comparator>
  13526. <type>RegexpComparator</type>
  13527. <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>
  13528. </comparator>
  13529. <comparator>
  13530. <type>RegexpComparator</type>
  13531. <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>
  13532. </comparator>
  13533. <comparator>
  13534. <type>RegexpComparator</type>
  13535. <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>
  13536. </comparator>
  13537. <comparator>
  13538. <type>RegexpComparator</type>
  13539. <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>
  13540. </comparator>
  13541. </comparators>
  13542. </test>
  13543. <test> <!-- TESTED -->
  13544. <description>chgrp: change of multiple files in absolute path without globbing</description>
  13545. <test-commands>
  13546. <command>-fs NAMENODE -touchz /file1</command>
  13547. <command>-fs NAMENODE -touchz /file2</command>
  13548. <command>-fs NAMENODE -touchz /file3</command>
  13549. <command>-fs NAMENODE -touchz /file4</command>
  13550. <command>-fs NAMENODE -chgrp newgroup /file1 /file2 /file3 /file4 </command>
  13551. <command>-fs NAMENODE -ls -R /file*</command>
  13552. </test-commands>
  13553. <cleanup-commands>
  13554. <command>-fs NAMENODE -rm /file*</command>
  13555. </cleanup-commands>
  13556. <comparators>
  13557. <comparator>
  13558. <type>RegexpComparator</type>
  13559. <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>
  13560. </comparator>
  13561. <comparator>
  13562. <type>RegexpComparator</type>
  13563. <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>
  13564. </comparator>
  13565. <comparator>
  13566. <type>RegexpComparator</type>
  13567. <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>
  13568. </comparator>
  13569. <comparator>
  13570. <type>RegexpComparator</type>
  13571. <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>
  13572. </comparator>
  13573. </comparators>
  13574. </test>
  13575. <test> <!-- TESTED -->
  13576. <description>chgrp: change group of multiple files in relative path without globbing</description>
  13577. <test-commands>
  13578. <command>-fs NAMENODE -touchz file1</command>
  13579. <command>-fs NAMENODE -touchz file2</command>
  13580. <command>-fs NAMENODE -touchz file3</command>
  13581. <command>-fs NAMENODE -touchz file4</command>
  13582. <command>-fs NAMENODE -chgrp newgroup file1 file2 file3 file4 </command>
  13583. <command>-fs NAMENODE -ls -R file*</command>
  13584. </test-commands>
  13585. <cleanup-commands>
  13586. <command>-fs NAMENODE -rm file*</command>
  13587. </cleanup-commands>
  13588. <comparators>
  13589. <comparator>
  13590. <type>RegexpComparator</type>
  13591. <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>
  13592. </comparator>
  13593. <comparator>
  13594. <type>RegexpComparator</type>
  13595. <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>
  13596. </comparator>
  13597. <comparator>
  13598. <type>RegexpComparator</type>
  13599. <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>
  13600. </comparator>
  13601. <comparator>
  13602. <type>RegexpComparator</type>
  13603. <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>
  13604. </comparator>
  13605. </comparators>
  13606. </test>
  13607. <test> <!-- TESTED -->
  13608. <description>chgrp: change group of multiple directories in absolute path without globbing</description>
  13609. <test-commands>
  13610. <command>-fs NAMENODE -mkdir /dir0</command>
  13611. <command>-fs NAMENODE -mkdir /dir0/dir1</command>
  13612. <command>-fs NAMENODE -touchz /dir0/file0</command>
  13613. <command>-fs NAMENODE -touchz /dir0/dir1/file1</command>
  13614. <command>-fs NAMENODE -touchz /dir0/dir1/file2</command>
  13615. <command>-fs NAMENODE -mkdir /dir2</command>
  13616. <command>-fs NAMENODE -mkdir /dir2/dir1</command>
  13617. <command>-fs NAMENODE -touchz /dir2/file0</command>
  13618. <command>-fs NAMENODE -touchz /dir2/dir1/file1</command>
  13619. <command>-fs NAMENODE -touchz /dir2/dir1/file2</command>
  13620. <command>-fs NAMENODE -chgrp newgroup /dir0 /dir2</command>
  13621. <command>-fs NAMENODE -ls -R /dir*</command>
  13622. </test-commands>
  13623. <cleanup-commands>
  13624. <command>-fs NAMENODE -rm -r /dir*</command>
  13625. </cleanup-commands>
  13626. <comparators>
  13627. <comparator>
  13628. <type>RegexpComparator</type>
  13629. <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>
  13630. </comparator>
  13631. <comparator>
  13632. <type>RegexpComparator</type>
  13633. <expected-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>
  13634. </comparator>
  13635. <comparator>
  13636. <type>RegexpComparator</type>
  13637. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1/file2</expected-output>
  13638. </comparator>
  13639. <comparator>
  13640. <type>RegexpComparator</type>
  13641. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/file0</expected-output>
  13642. </comparator>
  13643. <comparator>
  13644. <type>RegexpComparator</type>
  13645. <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>
  13646. </comparator>
  13647. <comparator>
  13648. <type>RegexpComparator</type>
  13649. <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>
  13650. </comparator>
  13651. <comparator>
  13652. <type>RegexpComparator</type>
  13653. <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>
  13654. </comparator>
  13655. <comparator>
  13656. <type>RegexpComparator</type>
  13657. <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>
  13658. </comparator>
  13659. </comparators>
  13660. </test>
  13661. <test> <!-- TESTED -->
  13662. <description>chgrp: change group of multiple directories in relative path without globbing</description>
  13663. <test-commands>
  13664. <command>-fs NAMENODE -mkdir -p dir0</command>
  13665. <command>-fs NAMENODE -mkdir -p dir0/dir1</command>
  13666. <command>-fs NAMENODE -touchz dir0/file0</command>
  13667. <command>-fs NAMENODE -touchz dir0/dir1/file1</command>
  13668. <command>-fs NAMENODE -touchz dir0/dir1/file2</command>
  13669. <command>-fs NAMENODE -mkdir -p dir2</command>
  13670. <command>-fs NAMENODE -mkdir -p dir2/dir1</command>
  13671. <command>-fs NAMENODE -touchz dir2/file0</command>
  13672. <command>-fs NAMENODE -touchz dir2/dir1/file1</command>
  13673. <command>-fs NAMENODE -touchz dir2/dir1/file2</command>
  13674. <command>-fs NAMENODE -chgrp newgroup dir0 dir2</command>
  13675. <command>-fs NAMENODE -ls -R dir*</command>
  13676. </test-commands>
  13677. <cleanup-commands>
  13678. <command>-fs NAMENODE -rm -r dir*</command>
  13679. </cleanup-commands>
  13680. <comparators>
  13681. <comparator>
  13682. <type>RegexpComparator</type>
  13683. <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>
  13684. </comparator>
  13685. <comparator>
  13686. <type>RegexpComparator</type>
  13687. <expected-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>
  13688. </comparator>
  13689. <comparator>
  13690. <type>RegexpComparator</type>
  13691. <expected-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>
  13692. </comparator>
  13693. <comparator>
  13694. <type>RegexpComparator</type>
  13695. <expected-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>
  13696. </comparator>
  13697. <comparator>
  13698. <type>RegexpComparator</type>
  13699. <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>
  13700. </comparator>
  13701. <comparator>
  13702. <type>RegexpComparator</type>
  13703. <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>
  13704. </comparator>
  13705. <comparator>
  13706. <type>RegexpComparator</type>
  13707. <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>
  13708. </comparator>
  13709. <comparator>
  13710. <type>RegexpComparator</type>
  13711. <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>
  13712. </comparator>
  13713. </comparators>
  13714. </test>
  13715. <test> <!-- TESTED -->
  13716. <description>chgrp: change group of multiple directories recursively in absolute path using globbing</description>
  13717. <test-commands>
  13718. <command>-fs NAMENODE -mkdir /dir0</command>
  13719. <command>-fs NAMENODE -mkdir /dir0/dir1</command>
  13720. <command>-fs NAMENODE -touchz /dir0/file0</command>
  13721. <command>-fs NAMENODE -touchz /dir0/dir1/file1</command>
  13722. <command>-fs NAMENODE -touchz /dir0/dir1/file2</command>
  13723. <command>-fs NAMENODE -mkdir /dir2</command>
  13724. <command>-fs NAMENODE -mkdir /dir2/dir1</command>
  13725. <command>-fs NAMENODE -touchz /dir2/file0</command>
  13726. <command>-fs NAMENODE -touchz /dir2/dir1/file1</command>
  13727. <command>-fs NAMENODE -touchz /dir2/dir1/file2</command>
  13728. <command>-fs NAMENODE -chgrp -R newgroup /dir*</command>
  13729. <command>-fs NAMENODE -ls -R /dir*</command>
  13730. </test-commands>
  13731. <cleanup-commands>
  13732. <command>-fs NAMENODE -rm -r /dir*</command>
  13733. </cleanup-commands>
  13734. <comparators>
  13735. <comparator>
  13736. <type>RegexpComparator</type>
  13737. <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>
  13738. </comparator>
  13739. <comparator>
  13740. <type>RegexpComparator</type>
  13741. <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>
  13742. </comparator>
  13743. <comparator>
  13744. <type>RegexpComparator</type>
  13745. <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>
  13746. </comparator>
  13747. <comparator>
  13748. <type>RegexpComparator</type>
  13749. <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>
  13750. </comparator>
  13751. <comparator>
  13752. <type>RegexpComparator</type>
  13753. <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>
  13754. </comparator>
  13755. <comparator>
  13756. <type>RegexpComparator</type>
  13757. <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>
  13758. </comparator>
  13759. <comparator>
  13760. <type>RegexpComparator</type>
  13761. <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>
  13762. </comparator>
  13763. <comparator>
  13764. <type>RegexpComparator</type>
  13765. <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>
  13766. </comparator>
  13767. </comparators>
  13768. </test>
  13769. <test> <!-- TESTED -->
  13770. <description>chgrp: change group of multiple directories recursively in relative path using globbing</description>
  13771. <test-commands>
  13772. <command>-fs NAMENODE -mkdir -p dir0</command>
  13773. <command>-fs NAMENODE -mkdir -p dir0/dir1</command>
  13774. <command>-fs NAMENODE -touchz dir0/file0</command>
  13775. <command>-fs NAMENODE -touchz dir0/dir1/file1</command>
  13776. <command>-fs NAMENODE -touchz dir0/dir1/file2</command>
  13777. <command>-fs NAMENODE -mkdir -p dir2</command>
  13778. <command>-fs NAMENODE -mkdir -p dir2/dir1</command>
  13779. <command>-fs NAMENODE -touchz dir2/file0</command>
  13780. <command>-fs NAMENODE -touchz dir2/dir1/file1</command>
  13781. <command>-fs NAMENODE -touchz dir2/dir1/file2</command>
  13782. <command>-fs NAMENODE -chgrp -R newgroup dir*</command>
  13783. <command>-fs NAMENODE -ls -R dir*</command>
  13784. </test-commands>
  13785. <cleanup-commands>
  13786. <command>-fs NAMENODE -rm -r dir*</command>
  13787. </cleanup-commands>
  13788. <comparators>
  13789. <comparator>
  13790. <type>RegexpComparator</type>
  13791. <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>
  13792. </comparator>
  13793. <comparator>
  13794. <type>RegexpComparator</type>
  13795. <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>
  13796. </comparator>
  13797. <comparator>
  13798. <type>RegexpComparator</type>
  13799. <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>
  13800. </comparator>
  13801. <comparator>
  13802. <type>RegexpComparator</type>
  13803. <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>
  13804. </comparator>
  13805. <comparator>
  13806. <type>RegexpComparator</type>
  13807. <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>
  13808. </comparator>
  13809. <comparator>
  13810. <type>RegexpComparator</type>
  13811. <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>
  13812. </comparator>
  13813. <comparator>
  13814. <type>RegexpComparator</type>
  13815. <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>
  13816. </comparator>
  13817. <comparator>
  13818. <type>RegexpComparator</type>
  13819. <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>
  13820. </comparator>
  13821. </comparators>
  13822. </test>
  13823. <test> <!-- TESTED -->
  13824. <description>chgrp: change group of multiple directories recursively in absolute path without globbing</description>
  13825. <test-commands>
  13826. <command>-fs NAMENODE -mkdir /dir0</command>
  13827. <command>-fs NAMENODE -mkdir /dir0/dir1</command>
  13828. <command>-fs NAMENODE -touchz /dir0/file0</command>
  13829. <command>-fs NAMENODE -touchz /dir0/dir1/file1</command>
  13830. <command>-fs NAMENODE -touchz /dir0/dir1/file2</command>
  13831. <command>-fs NAMENODE -mkdir /dir2</command>
  13832. <command>-fs NAMENODE -mkdir /dir2/dir1</command>
  13833. <command>-fs NAMENODE -touchz /dir2/file0</command>
  13834. <command>-fs NAMENODE -touchz /dir2/dir1/file1</command>
  13835. <command>-fs NAMENODE -touchz /dir2/dir1/file2</command>
  13836. <command>-fs NAMENODE -chgrp -R newgroup /dir0 /dir2</command>
  13837. <command>-fs NAMENODE -ls -R /dir*</command>
  13838. </test-commands>
  13839. <cleanup-commands>
  13840. <command>-fs NAMENODE -rm -r /dir*</command>
  13841. </cleanup-commands>
  13842. <comparators>
  13843. <comparator>
  13844. <type>RegexpComparator</type>
  13845. <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>
  13846. </comparator>
  13847. <comparator>
  13848. <type>RegexpComparator</type>
  13849. <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>
  13850. </comparator>
  13851. <comparator>
  13852. <type>RegexpComparator</type>
  13853. <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>
  13854. </comparator>
  13855. <comparator>
  13856. <type>RegexpComparator</type>
  13857. <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>
  13858. </comparator>
  13859. <comparator>
  13860. <type>RegexpComparator</type>
  13861. <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>
  13862. </comparator>
  13863. <comparator>
  13864. <type>RegexpComparator</type>
  13865. <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>
  13866. </comparator>
  13867. <comparator>
  13868. <type>RegexpComparator</type>
  13869. <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>
  13870. </comparator>
  13871. <comparator>
  13872. <type>RegexpComparator</type>
  13873. <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>
  13874. </comparator>
  13875. </comparators>
  13876. </test>
  13877. <test> <!-- TESTED -->
  13878. <description>chgrp: change group of multiple directories recursively in relative path without globbing</description>
  13879. <test-commands>
  13880. <command>-fs NAMENODE -mkdir -p dir0</command>
  13881. <command>-fs NAMENODE -mkdir -p dir0/dir1</command>
  13882. <command>-fs NAMENODE -touchz dir0/file0</command>
  13883. <command>-fs NAMENODE -touchz dir0/dir1/file1</command>
  13884. <command>-fs NAMENODE -touchz dir0/dir1/file2</command>
  13885. <command>-fs NAMENODE -mkdir -p dir2</command>
  13886. <command>-fs NAMENODE -mkdir -p dir2/dir1</command>
  13887. <command>-fs NAMENODE -touchz dir2/file0</command>
  13888. <command>-fs NAMENODE -touchz dir2/dir1/file1</command>
  13889. <command>-fs NAMENODE -touchz dir2/dir1/file2</command>
  13890. <command>-fs NAMENODE -chgrp -R newgroup dir0 dir2</command>
  13891. <command>-fs NAMENODE -ls -R dir*</command>
  13892. </test-commands>
  13893. <cleanup-commands>
  13894. <command>-fs NAMENODE -rm -r dir*</command>
  13895. </cleanup-commands>
  13896. <comparators>
  13897. <comparator>
  13898. <type>RegexpComparator</type>
  13899. <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>
  13900. </comparator>
  13901. <comparator>
  13902. <type>RegexpComparator</type>
  13903. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/dir1/file1</expected-output>
  13904. </comparator>
  13905. <comparator>
  13906. <type>RegexpComparator</type>
  13907. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/dir1/file2</expected-output>
  13908. </comparator>
  13909. <comparator>
  13910. <type>RegexpComparator</type>
  13911. <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>
  13912. </comparator>
  13913. <comparator>
  13914. <type>RegexpComparator</type>
  13915. <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>
  13916. </comparator>
  13917. <comparator>
  13918. <type>RegexpComparator</type>
  13919. <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>
  13920. </comparator>
  13921. <comparator>
  13922. <type>RegexpComparator</type>
  13923. <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>
  13924. </comparator>
  13925. <comparator>
  13926. <type>RegexpComparator</type>
  13927. <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>
  13928. </comparator>
  13929. </comparators>
  13930. </test>
  13931. <test> <!-- TESTED -->
  13932. <description>chgrp: invalid option for group of file in absolute path</description>
  13933. <test-commands>
  13934. <command>-fs NAMENODE -touchz /file1</command>
  13935. <command>-fs NAMENODE -chgrp % /file1</command>
  13936. </test-commands>
  13937. <cleanup-commands>
  13938. <command>-fs NAMENODE -rm /file1</command>
  13939. </cleanup-commands>
  13940. <comparators>
  13941. <comparator>
  13942. <type>RegexpComparator</type>
  13943. <expected-output>^-chgrp: '%' does not match expected pattern for group</expected-output>
  13944. </comparator>
  13945. </comparators>
  13946. </test>
  13947. <test> <!-- TESTED -->
  13948. <description>chgrp: invalid option for group of file in relative path</description>
  13949. <test-commands>
  13950. <command>-fs NAMENODE -touchz file1</command>
  13951. <command>-fs NAMENODE -chgrp % file1</command>
  13952. </test-commands>
  13953. <cleanup-commands>
  13954. <command>-fs NAMENODE -rm file1</command>
  13955. </cleanup-commands>
  13956. <comparators>
  13957. <comparator>
  13958. <type>RegexpComparator</type>
  13959. <expected-output>^-chgrp: '%' does not match expected pattern for group</expected-output>
  13960. </comparator>
  13961. </comparators>
  13962. </test>
  13963. <test> <!-- TESTED -->
  13964. <description>chgrp: change group of file in hdfs:// path</description>
  13965. <test-commands>
  13966. <command>-fs NAMENODE -touchz hdfs:///file1</command>
  13967. <command>-fs NAMENODE -chgrp newgroup hdfs:///file1</command>
  13968. <command>-fs NAMENODE -ls hdfs:///file1</command>
  13969. </test-commands>
  13970. <cleanup-commands>
  13971. <command>-fs NAMENODE -rm hdfs:///file1</command>
  13972. </cleanup-commands>
  13973. <comparators>
  13974. <comparator>
  13975. <type>RegexpComparator</type>
  13976. <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>
  13977. </comparator>
  13978. </comparators>
  13979. </test>
  13980. <test> <!-- TESTED -->
  13981. <description>chgrp: change group of directory in hdfs:// path</description>
  13982. <test-commands>
  13983. <command>-fs NAMENODE -mkdir hdfs:///dir0</command>
  13984. <command>-fs NAMENODE -mkdir hdfs:///dir0/dir1</command>
  13985. <command>-fs NAMENODE -touchz hdfs:///dir0/file0</command>
  13986. <command>-fs NAMENODE -touchz hdfs:///dir0/dir1/file1</command>
  13987. <command>-fs NAMENODE -touchz hdfs:///dir0/dir1/file2</command>
  13988. <command>-fs NAMENODE -chgrp newgroup hdfs:///dir0/dir1</command>
  13989. <command>-fs NAMENODE -ls -R hdfs:///dir0</command>
  13990. </test-commands>
  13991. <cleanup-commands>
  13992. <command>-fs NAMENODE -rm -r hdfs:///dir0</command>
  13993. </cleanup-commands>
  13994. <comparators>
  13995. <comparator>
  13996. <type>RegexpComparator</type>
  13997. <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>
  13998. </comparator>
  13999. <comparator>
  14000. <type>RegexpComparator</type>
  14001. <expected-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>
  14002. </comparator>
  14003. <comparator>
  14004. <type>RegexpComparator</type>
  14005. <expected-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>
  14006. </comparator>
  14007. <comparator>
  14008. <type>RegexpComparator</type>
  14009. <expected-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>
  14010. </comparator>
  14011. </comparators>
  14012. </test>
  14013. <test> <!-- TESTED -->
  14014. <description>chgrp: change group of directory in hdfs:// path recursively </description>
  14015. <test-commands>
  14016. <command>-fs NAMENODE -mkdir hdfs:///dir0</command>
  14017. <command>-fs NAMENODE -mkdir hdfs:///dir0/dir1</command>
  14018. <command>-fs NAMENODE -touchz hdfs:///dir0/file0</command>
  14019. <command>-fs NAMENODE -touchz hdfs:///dir0/dir1/file1</command>
  14020. <command>-fs NAMENODE -touchz hdfs:///dir0/dir1/file2</command>
  14021. <command>-fs NAMENODE -chgrp -R newgroup hdfs:///dir0/dir1</command>
  14022. <command>-fs NAMENODE -ls -R hdfs:///dir0</command>
  14023. </test-commands>
  14024. <cleanup-commands>
  14025. <command>-fs NAMENODE -rm -r hdfs:///dir0</command>
  14026. </cleanup-commands>
  14027. <comparators>
  14028. <comparator>
  14029. <type>RegexpComparator</type>
  14030. <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>
  14031. </comparator>
  14032. <comparator>
  14033. <type>RegexpComparator</type>
  14034. <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>
  14035. </comparator>
  14036. <comparator>
  14037. <type>RegexpComparator</type>
  14038. <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>
  14039. </comparator>
  14040. <comparator>
  14041. <type>RegexpComparator</type>
  14042. <expected-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>
  14043. </comparator>
  14044. </comparators>
  14045. </test>
  14046. <test> <!-- TESTED -->
  14047. <description>chgrp: change group of non existent file in hdfs:// path</description>
  14048. <test-commands>
  14049. <command>-fs NAMENODE -chgrp newgroup hdfs:///file1</command>
  14050. </test-commands>
  14051. <cleanup-commands>
  14052. <command>-fs NAMENODE -rm hdfs:///file1</command>
  14053. </cleanup-commands>
  14054. <comparators>
  14055. <comparator>
  14056. <type>RegexpComparator</type>
  14057. <expected-output>^chgrp: `hdfs:///file1': No such file or directory</expected-output>
  14058. </comparator>
  14059. </comparators>
  14060. </test>
  14061. <test> <!-- TESTED -->
  14062. <description>chgrp: change group of multiple files in hdfs:// path using globbing</description>
  14063. <test-commands>
  14064. <command>-fs NAMENODE -touchz hdfs:///file1</command>
  14065. <command>-fs NAMENODE -touchz hdfs:///file2</command>
  14066. <command>-fs NAMENODE -touchz hdfs:///file3</command>
  14067. <command>-fs NAMENODE -touchz hdfs:///file4</command>
  14068. <command>-fs NAMENODE -chgrp newgroup hdfs:///file* </command>
  14069. <command>-fs NAMENODE -ls -R hdfs:///file*</command>
  14070. </test-commands>
  14071. <cleanup-commands>
  14072. <command>-fs NAMENODE -rm hdfs:///file*</command>
  14073. </cleanup-commands>
  14074. <comparators>
  14075. <comparator>
  14076. <type>RegexpComparator</type>
  14077. <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>
  14078. </comparator>
  14079. <comparator>
  14080. <type>RegexpComparator</type>
  14081. <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>
  14082. </comparator>
  14083. <comparator>
  14084. <type>RegexpComparator</type>
  14085. <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>
  14086. </comparator>
  14087. <comparator>
  14088. <type>RegexpComparator</type>
  14089. <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>
  14090. </comparator>
  14091. </comparators>
  14092. </test>
  14093. <test> <!-- TESTED -->
  14094. <description>chgrp: change group of multiple directories in hdfs:// path using globbing</description>
  14095. <test-commands>
  14096. <command>-fs NAMENODE -mkdir hdfs:///dir0</command>
  14097. <command>-fs NAMENODE -mkdir hdfs:///dir0/dir1</command>
  14098. <command>-fs NAMENODE -touchz hdfs:///dir0/file0</command>
  14099. <command>-fs NAMENODE -touchz hdfs:///dir0/dir1/file1</command>
  14100. <command>-fs NAMENODE -touchz hdfs:///dir0/dir1/file2</command>
  14101. <command>-fs NAMENODE -mkdir hdfs:///dir2</command>
  14102. <command>-fs NAMENODE -mkdir hdfs:///dir2/dir1</command>
  14103. <command>-fs NAMENODE -touchz hdfs:///dir2/file0</command>
  14104. <command>-fs NAMENODE -touchz hdfs:///dir2/dir1/file1</command>
  14105. <command>-fs NAMENODE -touchz hdfs:///dir2/dir1/file2</command>
  14106. <command>-fs NAMENODE -chgrp newgroup hdfs:///dir*</command>
  14107. <command>-fs NAMENODE -ls -R hdfs:///dir*</command>
  14108. </test-commands>
  14109. <cleanup-commands>
  14110. <command>-fs NAMENODE -rm -r hdfs:///dir*</command>
  14111. </cleanup-commands>
  14112. <comparators>
  14113. <comparator>
  14114. <type>RegexpComparator</type>
  14115. <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>
  14116. </comparator>
  14117. <comparator>
  14118. <type>RegexpComparator</type>
  14119. <expected-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>
  14120. </comparator>
  14121. <comparator>
  14122. <type>RegexpComparator</type>
  14123. <expected-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>
  14124. </comparator>
  14125. <comparator>
  14126. <type>RegexpComparator</type>
  14127. <expected-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>
  14128. </comparator>
  14129. <comparator>
  14130. <type>RegexpComparator</type>
  14131. <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>
  14132. </comparator>
  14133. <comparator>
  14134. <type>RegexpComparator</type>
  14135. <expected-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>
  14136. </comparator>
  14137. <comparator>
  14138. <type>RegexpComparator</type>
  14139. <expected-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>
  14140. </comparator>
  14141. <comparator>
  14142. <type>RegexpComparator</type>
  14143. <expected-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>
  14144. </comparator>
  14145. </comparators>
  14146. </test>
  14147. <test> <!-- TESTED -->
  14148. <description>chgrp: change of multiple files in hdfs:// path without globbing</description>
  14149. <test-commands>
  14150. <command>-fs NAMENODE -touchz hdfs:///file1</command>
  14151. <command>-fs NAMENODE -touchz hdfs:///file2</command>
  14152. <command>-fs NAMENODE -touchz hdfs:///file3</command>
  14153. <command>-fs NAMENODE -touchz hdfs:///file4</command>
  14154. <command>-fs NAMENODE -chgrp newgroup hdfs:///file1 hdfs:///file2 hdfs:///file3 hdfs:///file4 </command>
  14155. <command>-fs NAMENODE -ls -R hdfs:///file*</command>
  14156. </test-commands>
  14157. <cleanup-commands>
  14158. <command>-fs NAMENODE -rm hdfs:///file*</command>
  14159. </cleanup-commands>
  14160. <comparators>
  14161. <comparator>
  14162. <type>RegexpComparator</type>
  14163. <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>
  14164. </comparator>
  14165. <comparator>
  14166. <type>RegexpComparator</type>
  14167. <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>
  14168. </comparator>
  14169. <comparator>
  14170. <type>RegexpComparator</type>
  14171. <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>
  14172. </comparator>
  14173. <comparator>
  14174. <type>RegexpComparator</type>
  14175. <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>
  14176. </comparator>
  14177. </comparators>
  14178. </test>
  14179. <test> <!-- TESTED -->
  14180. <description>chgrp: change group of multiple directories in hdfs:// path without globbing</description>
  14181. <test-commands>
  14182. <command>-fs NAMENODE -mkdir hdfs:///dir0</command>
  14183. <command>-fs NAMENODE -mkdir hdfs:///dir0/dir1</command>
  14184. <command>-fs NAMENODE -touchz hdfs:///dir0/file0</command>
  14185. <command>-fs NAMENODE -touchz hdfs:///dir0/dir1/file1</command>
  14186. <command>-fs NAMENODE -touchz hdfs:///dir0/dir1/file2</command>
  14187. <command>-fs NAMENODE -mkdir hdfs:///dir2</command>
  14188. <command>-fs NAMENODE -mkdir hdfs:///dir2/dir1</command>
  14189. <command>-fs NAMENODE -touchz hdfs:///dir2/file0</command>
  14190. <command>-fs NAMENODE -touchz hdfs:///dir2/dir1/file1</command>
  14191. <command>-fs NAMENODE -touchz hdfs:///dir2/dir1/file2</command>
  14192. <command>-fs NAMENODE -chgrp newgroup hdfs:///dir0 hdfs:///dir2</command>
  14193. <command>-fs NAMENODE -ls -R hdfs:///dir*</command>
  14194. </test-commands>
  14195. <cleanup-commands>
  14196. <command>-fs NAMENODE -rm -r hdfs:///dir*</command>
  14197. </cleanup-commands>
  14198. <comparators>
  14199. <comparator>
  14200. <type>RegexpComparator</type>
  14201. <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>
  14202. </comparator>
  14203. <comparator>
  14204. <type>RegexpComparator</type>
  14205. <expected-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>
  14206. </comparator>
  14207. <comparator>
  14208. <type>RegexpComparator</type>
  14209. <expected-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>
  14210. </comparator>
  14211. <comparator>
  14212. <type>RegexpComparator</type>
  14213. <expected-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>
  14214. </comparator>
  14215. <comparator>
  14216. <type>RegexpComparator</type>
  14217. <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>
  14218. </comparator>
  14219. <comparator>
  14220. <type>RegexpComparator</type>
  14221. <expected-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>
  14222. </comparator>
  14223. <comparator>
  14224. <type>RegexpComparator</type>
  14225. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir2/dir1/file2</expected-output>
  14226. </comparator>
  14227. <comparator>
  14228. <type>RegexpComparator</type>
  14229. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir2/file0</expected-output>
  14230. </comparator>
  14231. </comparators>
  14232. </test>
  14233. <test> <!-- TESTED -->
  14234. <description>chgrp: change group of multiple directories recursively in hdfs:// path using globbing</description>
  14235. <test-commands>
  14236. <command>-fs NAMENODE -mkdir hdfs:///dir0</command>
  14237. <command>-fs NAMENODE -mkdir hdfs:///dir0/dir1</command>
  14238. <command>-fs NAMENODE -touchz hdfs:///dir0/file0</command>
  14239. <command>-fs NAMENODE -touchz hdfs:///dir0/dir1/file1</command>
  14240. <command>-fs NAMENODE -touchz hdfs:///dir0/dir1/file2</command>
  14241. <command>-fs NAMENODE -mkdir hdfs:///dir2</command>
  14242. <command>-fs NAMENODE -mkdir hdfs:///dir2/dir1</command>
  14243. <command>-fs NAMENODE -touchz hdfs:///dir2/file0</command>
  14244. <command>-fs NAMENODE -touchz hdfs:///dir2/dir1/file1</command>
  14245. <command>-fs NAMENODE -touchz hdfs:///dir2/dir1/file2</command>
  14246. <command>-fs NAMENODE -chgrp -R newgroup hdfs:///dir*</command>
  14247. <command>-fs NAMENODE -ls -R hdfs:///dir*</command>
  14248. </test-commands>
  14249. <cleanup-commands>
  14250. <command>-fs NAMENODE -rm -r hdfs:///dir*</command>
  14251. </cleanup-commands>
  14252. <comparators>
  14253. <comparator>
  14254. <type>RegexpComparator</type>
  14255. <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>
  14256. </comparator>
  14257. <comparator>
  14258. <type>RegexpComparator</type>
  14259. <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>
  14260. </comparator>
  14261. <comparator>
  14262. <type>RegexpComparator</type>
  14263. <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>
  14264. </comparator>
  14265. <comparator>
  14266. <type>RegexpComparator</type>
  14267. <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>
  14268. </comparator>
  14269. <comparator>
  14270. <type>RegexpComparator</type>
  14271. <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>
  14272. </comparator>
  14273. <comparator>
  14274. <type>RegexpComparator</type>
  14275. <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>
  14276. </comparator>
  14277. <comparator>
  14278. <type>RegexpComparator</type>
  14279. <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>
  14280. </comparator>
  14281. <comparator>
  14282. <type>RegexpComparator</type>
  14283. <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>
  14284. </comparator>
  14285. </comparators>
  14286. </test>
  14287. <test> <!-- TESTED -->
  14288. <description>chgrp: change group of multiple directories recursively in hdfs:// path without globbing</description>
  14289. <test-commands>
  14290. <command>-fs NAMENODE -mkdir hdfs:///dir0</command>
  14291. <command>-fs NAMENODE -mkdir hdfs:///dir0/dir1</command>
  14292. <command>-fs NAMENODE -touchz hdfs:///dir0/file0</command>
  14293. <command>-fs NAMENODE -touchz hdfs:///dir0/dir1/file1</command>
  14294. <command>-fs NAMENODE -touchz hdfs:///dir0/dir1/file2</command>
  14295. <command>-fs NAMENODE -mkdir hdfs:///dir2</command>
  14296. <command>-fs NAMENODE -mkdir hdfs:///dir2/dir1</command>
  14297. <command>-fs NAMENODE -touchz hdfs:///dir2/file0</command>
  14298. <command>-fs NAMENODE -touchz hdfs:///dir2/dir1/file1</command>
  14299. <command>-fs NAMENODE -touchz hdfs:///dir2/dir1/file2</command>
  14300. <command>-fs NAMENODE -chgrp -R newgroup hdfs:///dir0 hdfs:///dir2</command>
  14301. <command>-fs NAMENODE -ls -R hdfs:///dir*</command>
  14302. </test-commands>
  14303. <cleanup-commands>
  14304. <command>-fs NAMENODE -rm -r hdfs:///dir*</command>
  14305. </cleanup-commands>
  14306. <comparators>
  14307. <comparator>
  14308. <type>RegexpComparator</type>
  14309. <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>
  14310. </comparator>
  14311. <comparator>
  14312. <type>RegexpComparator</type>
  14313. <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>
  14314. </comparator>
  14315. <comparator>
  14316. <type>RegexpComparator</type>
  14317. <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>
  14318. </comparator>
  14319. <comparator>
  14320. <type>RegexpComparator</type>
  14321. <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>
  14322. </comparator>
  14323. <comparator>
  14324. <type>RegexpComparator</type>
  14325. <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>
  14326. </comparator>
  14327. <comparator>
  14328. <type>RegexpComparator</type>
  14329. <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>
  14330. </comparator>
  14331. <comparator>
  14332. <type>RegexpComparator</type>
  14333. <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>
  14334. </comparator>
  14335. <comparator>
  14336. <type>RegexpComparator</type>
  14337. <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>
  14338. </comparator>
  14339. </comparators>
  14340. </test>
  14341. <test> <!-- TESTED -->
  14342. <description>chgrp: invalid option for group of file in hdfs:// path</description>
  14343. <test-commands>
  14344. <command>-fs NAMENODE -touchz hdfs:///file1</command>
  14345. <command>-fs NAMENODE -chgrp % hdfs:///file1</command>
  14346. </test-commands>
  14347. <cleanup-commands>
  14348. <command>-fs NAMENODE -rm hdfs:///file1</command>
  14349. </cleanup-commands>
  14350. <comparators>
  14351. <comparator>
  14352. <type>RegexpComparator</type>
  14353. <expected-output>^-chgrp: '%' does not match expected pattern for group</expected-output>
  14354. </comparator>
  14355. </comparators>
  14356. </test>
  14357. <!-- Tests for chgrp -->
  14358. <test> <!-- TESTED -->
  14359. <description>chgrp: change group of file in Namenode's path</description>
  14360. <test-commands>
  14361. <command>-fs NAMENODE -touchz NAMENODE/file1</command>
  14362. <command>-fs NAMENODE -chgrp newgroup NAMENODE/file1</command>
  14363. <command>-fs NAMENODE -ls NAMENODE/file1</command>
  14364. </test-commands>
  14365. <cleanup-commands>
  14366. <command>-fs NAMENODE -rm NAMENODE/file1</command>
  14367. </cleanup-commands>
  14368. <comparators>
  14369. <comparator>
  14370. <type>RegexpComparator</type>
  14371. <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>
  14372. </comparator>
  14373. </comparators>
  14374. </test>
  14375. <test> <!-- TESTED -->
  14376. <description>chgrp: change group of directory in Namenode's path</description>
  14377. <test-commands>
  14378. <command>-fs NAMENODE -mkdir NAMENODE/dir0</command>
  14379. <command>-fs NAMENODE -mkdir NAMENODE/dir0/dir1</command>
  14380. <command>-fs NAMENODE -touchz NAMENODE/dir0/file0</command>
  14381. <command>-fs NAMENODE -touchz NAMENODE/dir0/dir1/file1</command>
  14382. <command>-fs NAMENODE -touchz NAMENODE/dir0/dir1/file2</command>
  14383. <command>-fs NAMENODE -chgrp newgroup NAMENODE/dir0/dir1</command>
  14384. <command>-fs NAMENODE -ls -R NAMENODE/dir0</command>
  14385. </test-commands>
  14386. <cleanup-commands>
  14387. <command>-fs NAMENODE -rm -r NAMENODE/dir0</command>
  14388. </cleanup-commands>
  14389. <comparators>
  14390. <comparator>
  14391. <type>RegexpComparator</type>
  14392. <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>
  14393. </comparator>
  14394. <comparator>
  14395. <type>RegexpComparator</type>
  14396. <expected-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>
  14397. </comparator>
  14398. <comparator>
  14399. <type>RegexpComparator</type>
  14400. <expected-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>
  14401. </comparator>
  14402. <comparator>
  14403. <type>RegexpComparator</type>
  14404. <expected-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>
  14405. </comparator>
  14406. </comparators>
  14407. </test>
  14408. <test> <!-- TESTED -->
  14409. <description>chgrp: change group of directory in Namenode's path recursively </description>
  14410. <test-commands>
  14411. <command>-fs NAMENODE -mkdir NAMENODE/dir0</command>
  14412. <command>-fs NAMENODE -mkdir NAMENODE/dir0/dir1</command>
  14413. <command>-fs NAMENODE -touchz NAMENODE/dir0/file0</command>
  14414. <command>-fs NAMENODE -touchz NAMENODE/dir0/dir1/file1</command>
  14415. <command>-fs NAMENODE -touchz NAMENODE/dir0/dir1/file2</command>
  14416. <command>-fs NAMENODE -chgrp -R newgroup NAMENODE/dir0/dir1</command>
  14417. <command>-fs NAMENODE -ls -R NAMENODE/dir0</command>
  14418. </test-commands>
  14419. <cleanup-commands>
  14420. <command>-fs NAMENODE -rm -r NAMENODE/dir0</command>
  14421. </cleanup-commands>
  14422. <comparators>
  14423. <comparator>
  14424. <type>RegexpComparator</type>
  14425. <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>
  14426. </comparator>
  14427. <comparator>
  14428. <type>RegexpComparator</type>
  14429. <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>
  14430. </comparator>
  14431. <comparator>
  14432. <type>RegexpComparator</type>
  14433. <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>
  14434. </comparator>
  14435. <comparator>
  14436. <type>RegexpComparator</type>
  14437. <expected-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>
  14438. </comparator>
  14439. </comparators>
  14440. </test>
  14441. <test> <!-- TESTED -->
  14442. <description>chgrp: change group of non existent file in Namenode's path</description>
  14443. <test-commands>
  14444. <command>-fs NAMENODE -chgrp newgroup NAMENODE/file1</command>
  14445. </test-commands>
  14446. <cleanup-commands>
  14447. <command>-fs NAMENODE -rm NAMENODE/file1</command>
  14448. </cleanup-commands>
  14449. <comparators>
  14450. <comparator>
  14451. <type>RegexpComparator</type>
  14452. <expected-output>^chgrp: `NAMENODE/file1': No such file or directory</expected-output>
  14453. </comparator>
  14454. </comparators>
  14455. </test>
  14456. <test> <!-- TESTED -->
  14457. <description>chgrp: change group of multiple files in Namenode's path using globbing</description>
  14458. <test-commands>
  14459. <command>-fs NAMENODE -touchz NAMENODE/file1</command>
  14460. <command>-fs NAMENODE -touchz NAMENODE/file2</command>
  14461. <command>-fs NAMENODE -touchz NAMENODE/file3</command>
  14462. <command>-fs NAMENODE -touchz NAMENODE/file4</command>
  14463. <command>-fs NAMENODE -chgrp newgroup NAMENODE/file* </command>
  14464. <command>-fs NAMENODE -ls -R NAMENODE/file*</command>
  14465. </test-commands>
  14466. <cleanup-commands>
  14467. <command>-fs NAMENODE -rm NAMENODE/file*</command>
  14468. </cleanup-commands>
  14469. <comparators>
  14470. <comparator>
  14471. <type>RegexpComparator</type>
  14472. <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>
  14473. </comparator>
  14474. <comparator>
  14475. <type>RegexpComparator</type>
  14476. <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>
  14477. </comparator>
  14478. <comparator>
  14479. <type>RegexpComparator</type>
  14480. <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>
  14481. </comparator>
  14482. <comparator>
  14483. <type>RegexpComparator</type>
  14484. <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>
  14485. </comparator>
  14486. </comparators>
  14487. </test>
  14488. <test> <!-- TESTED -->
  14489. <description>chgrp: change group of multiple directories in Namenode's path using globbing</description>
  14490. <test-commands>
  14491. <command>-fs NAMENODE -mkdir NAMENODE/dir0</command>
  14492. <command>-fs NAMENODE -mkdir NAMENODE/dir0/dir1</command>
  14493. <command>-fs NAMENODE -touchz NAMENODE/dir0/file0</command>
  14494. <command>-fs NAMENODE -touchz NAMENODE/dir0/dir1/file1</command>
  14495. <command>-fs NAMENODE -touchz NAMENODE/dir0/dir1/file2</command>
  14496. <command>-fs NAMENODE -mkdir NAMENODE/dir2</command>
  14497. <command>-fs NAMENODE -mkdir NAMENODE/dir2/dir1</command>
  14498. <command>-fs NAMENODE -touchz NAMENODE/dir2/file0</command>
  14499. <command>-fs NAMENODE -touchz NAMENODE/dir2/dir1/file1</command>
  14500. <command>-fs NAMENODE -touchz NAMENODE/dir2/dir1/file2</command>
  14501. <command>-fs NAMENODE -chgrp newgroup NAMENODE/dir*</command>
  14502. <command>-fs NAMENODE -ls -R NAMENODE/dir*</command>
  14503. </test-commands>
  14504. <cleanup-commands>
  14505. <command>-fs NAMENODE -rm -r NAMENODE/dir*</command>
  14506. </cleanup-commands>
  14507. <comparators>
  14508. <comparator>
  14509. <type>RegexpComparator</type>
  14510. <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>
  14511. </comparator>
  14512. <comparator>
  14513. <type>RegexpComparator</type>
  14514. <expected-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>
  14515. </comparator>
  14516. <comparator>
  14517. <type>RegexpComparator</type>
  14518. <expected-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>
  14519. </comparator>
  14520. <comparator>
  14521. <type>RegexpComparator</type>
  14522. <expected-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>
  14523. </comparator>
  14524. <comparator>
  14525. <type>RegexpComparator</type>
  14526. <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>
  14527. </comparator>
  14528. <comparator>
  14529. <type>RegexpComparator</type>
  14530. <expected-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>
  14531. </comparator>
  14532. <comparator>
  14533. <type>RegexpComparator</type>
  14534. <expected-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>
  14535. </comparator>
  14536. <comparator>
  14537. <type>RegexpComparator</type>
  14538. <expected-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>
  14539. </comparator>
  14540. </comparators>
  14541. </test>
  14542. <test> <!-- TESTED -->
  14543. <description>chgrp: change of multiple files in Namenode's path without globbing</description>
  14544. <test-commands>
  14545. <command>-fs NAMENODE -touchz NAMENODE/file1</command>
  14546. <command>-fs NAMENODE -touchz NAMENODE/file2</command>
  14547. <command>-fs NAMENODE -touchz NAMENODE/file3</command>
  14548. <command>-fs NAMENODE -touchz NAMENODE/file4</command>
  14549. <command>-fs NAMENODE -chgrp newgroup NAMENODE/file1 NAMENODE/file2 NAMENODE/file3 NAMENODE/file4 </command>
  14550. <command>-fs NAMENODE -ls -R NAMENODE/file*</command>
  14551. </test-commands>
  14552. <cleanup-commands>
  14553. <command>-fs NAMENODE -rm NAMENODE/file*</command>
  14554. </cleanup-commands>
  14555. <comparators>
  14556. <comparator>
  14557. <type>RegexpComparator</type>
  14558. <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>
  14559. </comparator>
  14560. <comparator>
  14561. <type>RegexpComparator</type>
  14562. <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>
  14563. </comparator>
  14564. <comparator>
  14565. <type>RegexpComparator</type>
  14566. <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>
  14567. </comparator>
  14568. <comparator>
  14569. <type>RegexpComparator</type>
  14570. <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>
  14571. </comparator>
  14572. </comparators>
  14573. </test>
  14574. <test> <!-- TESTED -->
  14575. <description>chgrp: change group of multiple directories in Namenode's path without globbing</description>
  14576. <test-commands>
  14577. <command>-fs NAMENODE -mkdir NAMENODE/dir0</command>
  14578. <command>-fs NAMENODE -mkdir NAMENODE/dir0/dir1</command>
  14579. <command>-fs NAMENODE -touchz NAMENODE/dir0/file0</command>
  14580. <command>-fs NAMENODE -touchz NAMENODE/dir0/dir1/file1</command>
  14581. <command>-fs NAMENODE -touchz NAMENODE/dir0/dir1/file2</command>
  14582. <command>-fs NAMENODE -mkdir NAMENODE/dir2</command>
  14583. <command>-fs NAMENODE -mkdir NAMENODE/dir2/dir1</command>
  14584. <command>-fs NAMENODE -touchz NAMENODE/dir2/file0</command>
  14585. <command>-fs NAMENODE -touchz NAMENODE/dir2/dir1/file1</command>
  14586. <command>-fs NAMENODE -touchz NAMENODE/dir2/dir1/file2</command>
  14587. <command>-fs NAMENODE -chgrp newgroup NAMENODE/dir0 NAMENODE/dir2</command>
  14588. <command>-fs NAMENODE -ls -R NAMENODE/dir*</command>
  14589. </test-commands>
  14590. <cleanup-commands>
  14591. <command>-fs NAMENODE -rm -r NAMENODE/dir*</command>
  14592. </cleanup-commands>
  14593. <comparators>
  14594. <comparator>
  14595. <type>RegexpComparator</type>
  14596. <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>
  14597. </comparator>
  14598. <comparator>
  14599. <type>RegexpComparator</type>
  14600. <expected-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>
  14601. </comparator>
  14602. <comparator>
  14603. <type>RegexpComparator</type>
  14604. <expected-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>
  14605. </comparator>
  14606. <comparator>
  14607. <type>RegexpComparator</type>
  14608. <expected-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>
  14609. </comparator>
  14610. <comparator>
  14611. <type>RegexpComparator</type>
  14612. <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>
  14613. </comparator>
  14614. <comparator>
  14615. <type>RegexpComparator</type>
  14616. <expected-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>
  14617. </comparator>
  14618. <comparator>
  14619. <type>RegexpComparator</type>
  14620. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir2/dir1/file2</expected-output>
  14621. </comparator>
  14622. <comparator>
  14623. <type>RegexpComparator</type>
  14624. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir2/file0</expected-output>
  14625. </comparator>
  14626. </comparators>
  14627. </test>
  14628. <test> <!-- TESTED -->
  14629. <description>chgrp: change group of multiple directories recursively in Namenode's path using globbing</description>
  14630. <test-commands>
  14631. <command>-fs NAMENODE -mkdir NAMENODE/dir0</command>
  14632. <command>-fs NAMENODE -mkdir NAMENODE/dir0/dir1</command>
  14633. <command>-fs NAMENODE -touchz NAMENODE/dir0/file0</command>
  14634. <command>-fs NAMENODE -touchz NAMENODE/dir0/dir1/file1</command>
  14635. <command>-fs NAMENODE -touchz NAMENODE/dir0/dir1/file2</command>
  14636. <command>-fs NAMENODE -mkdir NAMENODE/dir2</command>
  14637. <command>-fs NAMENODE -mkdir NAMENODE/dir2/dir1</command>
  14638. <command>-fs NAMENODE -touchz NAMENODE/dir2/file0</command>
  14639. <command>-fs NAMENODE -touchz NAMENODE/dir2/dir1/file1</command>
  14640. <command>-fs NAMENODE -touchz NAMENODE/dir2/dir1/file2</command>
  14641. <command>-fs NAMENODE -chgrp -R newgroup NAMENODE/dir*</command>
  14642. <command>-fs NAMENODE -ls -R NAMENODE/dir*</command>
  14643. </test-commands>
  14644. <cleanup-commands>
  14645. <command>-fs NAMENODE -rm -r NAMENODE/dir*</command>
  14646. </cleanup-commands>
  14647. <comparators>
  14648. <comparator>
  14649. <type>RegexpComparator</type>
  14650. <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>
  14651. </comparator>
  14652. <comparator>
  14653. <type>RegexpComparator</type>
  14654. <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>
  14655. </comparator>
  14656. <comparator>
  14657. <type>RegexpComparator</type>
  14658. <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>
  14659. </comparator>
  14660. <comparator>
  14661. <type>RegexpComparator</type>
  14662. <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>
  14663. </comparator>
  14664. <comparator>
  14665. <type>RegexpComparator</type>
  14666. <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>
  14667. </comparator>
  14668. <comparator>
  14669. <type>RegexpComparator</type>
  14670. <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>
  14671. </comparator>
  14672. <comparator>
  14673. <type>RegexpComparator</type>
  14674. <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>
  14675. </comparator>
  14676. <comparator>
  14677. <type>RegexpComparator</type>
  14678. <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>
  14679. </comparator>
  14680. </comparators>
  14681. </test>
  14682. <test> <!-- TESTED -->
  14683. <description>chgrp: change group of multiple directories recursively in Namenode's path without globbing</description>
  14684. <test-commands>
  14685. <command>-fs NAMENODE -mkdir NAMENODE/dir0</command>
  14686. <command>-fs NAMENODE -mkdir NAMENODE/dir0/dir1</command>
  14687. <command>-fs NAMENODE -touchz NAMENODE/dir0/file0</command>
  14688. <command>-fs NAMENODE -touchz NAMENODE/dir0/dir1/file1</command>
  14689. <command>-fs NAMENODE -touchz NAMENODE/dir0/dir1/file2</command>
  14690. <command>-fs NAMENODE -mkdir NAMENODE/dir2</command>
  14691. <command>-fs NAMENODE -mkdir NAMENODE/dir2/dir1</command>
  14692. <command>-fs NAMENODE -touchz NAMENODE/dir2/file0</command>
  14693. <command>-fs NAMENODE -touchz NAMENODE/dir2/dir1/file1</command>
  14694. <command>-fs NAMENODE -touchz NAMENODE/dir2/dir1/file2</command>
  14695. <command>-fs NAMENODE -chgrp -R newgroup NAMENODE/dir0 NAMENODE/dir2</command>
  14696. <command>-fs NAMENODE -ls -R NAMENODE/dir*</command>
  14697. </test-commands>
  14698. <cleanup-commands>
  14699. <command>-fs NAMENODE -rm -r NAMENODE/dir*</command>
  14700. </cleanup-commands>
  14701. <comparators>
  14702. <comparator>
  14703. <type>RegexpComparator</type>
  14704. <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>
  14705. </comparator>
  14706. <comparator>
  14707. <type>RegexpComparator</type>
  14708. <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>
  14709. </comparator>
  14710. <comparator>
  14711. <type>RegexpComparator</type>
  14712. <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>
  14713. </comparator>
  14714. <comparator>
  14715. <type>RegexpComparator</type>
  14716. <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>
  14717. </comparator>
  14718. <comparator>
  14719. <type>RegexpComparator</type>
  14720. <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>
  14721. </comparator>
  14722. <comparator>
  14723. <type>RegexpComparator</type>
  14724. <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>
  14725. </comparator>
  14726. <comparator>
  14727. <type>RegexpComparator</type>
  14728. <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>
  14729. </comparator>
  14730. <comparator>
  14731. <type>RegexpComparator</type>
  14732. <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>
  14733. </comparator>
  14734. </comparators>
  14735. </test>
  14736. <test> <!-- TESTED -->
  14737. <description>chgrp: invalid option for group of file in Namenode's path</description>
  14738. <test-commands>
  14739. <command>-fs NAMENODE -touchz NAMENODE/file1</command>
  14740. <command>-fs NAMENODE -chgrp % NAMENODE/file1</command>
  14741. </test-commands>
  14742. <cleanup-commands>
  14743. <command>-fs NAMENODE -rm NAMENODE/file1</command>
  14744. </cleanup-commands>
  14745. <comparators>
  14746. <comparator>
  14747. <type>RegexpComparator</type>
  14748. <expected-output>^-chgrp: '%' does not match expected pattern for group</expected-output>
  14749. </comparator>
  14750. </comparators>
  14751. </test>
  14752. <test> <!--Tested -->
  14753. <description>help: help for dfsadmin report</description>
  14754. <test-commands>
  14755. <dfs-admin-command>-fs NAMENODE -help report</dfs-admin-command>
  14756. </test-commands>
  14757. <cleanup-commands>
  14758. </cleanup-commands>
  14759. <comparators>
  14760. <comparator>
  14761. <type>RegexpComparator</type>
  14762. <expected-output>^-report \[-live\] \[-dead\] \[-decommissioning\]:(.)*</expected-output>
  14763. </comparator>
  14764. <comparator>
  14765. <type>RegexpComparator</type>
  14766. <expected-output>^[ \t]*Reports basic filesystem information and statistics.( )*</expected-output>
  14767. </comparator>
  14768. </comparators>
  14769. </test>
  14770. <test> <!--Tested -->
  14771. <description>help: help for dfsadmin safemode</description>
  14772. <test-commands>
  14773. <dfs-admin-command>-fs NAMENODE -help safemode</dfs-admin-command>
  14774. </test-commands>
  14775. <cleanup-commands>
  14776. </cleanup-commands>
  14777. <comparators>
  14778. <comparator>
  14779. <type>RegexpComparator</type>
  14780. <expected-output>^-safemode &lt;enter\|leave\|get\|wait&gt;:( |\t)*Safe mode maintenance command.( )*</expected-output>
  14781. </comparator>
  14782. <comparator>
  14783. <type>RegexpComparator</type>
  14784. <expected-output>^( |\t)*Safe mode is a Namenode state in which it( )*</expected-output>
  14785. </comparator>
  14786. <comparator>
  14787. <type>RegexpComparator</type>
  14788. <expected-output>^( |\t)*1.( )*does not accept changes to the name space \(read-only\)( )*</expected-output>
  14789. </comparator>
  14790. <comparator>
  14791. <type>RegexpComparator</type>
  14792. <expected-output>^( |\t)*2.( )*does not replicate or delete blocks.( )*</expected-output>
  14793. </comparator>
  14794. <comparator>
  14795. <type>RegexpComparator</type>
  14796. <expected-output>^( |\t)*Safe mode is entered automatically at Namenode startup, and( )*</expected-output>
  14797. </comparator>
  14798. <comparator>
  14799. <type>RegexpComparator</type>
  14800. <expected-output>^( |\t)*leaves safe mode automatically when the configured minimum( )*</expected-output>
  14801. </comparator>
  14802. <comparator>
  14803. <type>RegexpComparator</type>
  14804. <expected-output>^( |\t)*percentage of blocks satisfies the minimum replication( )*</expected-output>
  14805. </comparator>
  14806. <comparator>
  14807. <type>RegexpComparator</type>
  14808. <expected-output>^( |\t)*condition. Safe mode can also be entered manually, but then( )*</expected-output>
  14809. </comparator>
  14810. <comparator>
  14811. <type>RegexpComparator</type>
  14812. <expected-output>^( |\t)*it can only be turned off manually as well.( )*</expected-output>
  14813. </comparator>
  14814. </comparators>
  14815. </test>
  14816. <test> <!--Tested -->
  14817. <description>help: help for dfsadmin refreshNodes</description>
  14818. <test-commands>
  14819. <dfs-admin-command>-fs NAMENODE -help refreshNodes</dfs-admin-command>
  14820. </test-commands>
  14821. <cleanup-commands>
  14822. </cleanup-commands>
  14823. <comparators>
  14824. <comparator>
  14825. <type>RegexpComparator</type>
  14826. <expected-output>^-refreshNodes:( |\t)*Updates the namenode with the set of datanodes allowed to connect to the namenode.( )*</expected-output>
  14827. </comparator>
  14828. <comparator>
  14829. <type>RegexpComparator</type>
  14830. <expected-output>^( |\t)*Namenode re-reads datanode hostnames from the file defined by( )*</expected-output>
  14831. </comparator>
  14832. <comparator>
  14833. <type>RegexpComparator</type>
  14834. <expected-output>^( |\t)*dfs.hosts, dfs.hosts.exclude configuration parameters.( )*</expected-output>
  14835. </comparator>
  14836. <comparator>
  14837. <type>RegexpComparator</type>
  14838. <expected-output>^( |\t)*Hosts defined in dfs.hosts are the datanodes that are part of( )*</expected-output>
  14839. </comparator>
  14840. <comparator>
  14841. <type>RegexpComparator</type>
  14842. <expected-output>^( |\t)*the cluster. If there are entries in dfs.hosts, only the hosts( )*</expected-output>
  14843. </comparator>
  14844. <comparator>
  14845. <type>RegexpComparator</type>
  14846. <expected-output>^( |\t)*in it are allowed to register with the namenode.( )*</expected-output>
  14847. </comparator>
  14848. <comparator>
  14849. <type>RegexpComparator</type>
  14850. <expected-output>^( |\t)*Entries in dfs.hosts.exclude are datanodes that need to be( )*</expected-output>
  14851. </comparator>
  14852. <comparator>
  14853. <type>RegexpComparator</type>
  14854. <expected-output>^( |\t)*decommissioned. Datanodes complete decommissioning when ( )*</expected-output>
  14855. </comparator>
  14856. <comparator>
  14857. <type>RegexpComparator</type>
  14858. <expected-output>^( |\t)*all the replicas from them are replicated to other datanodes.( )*</expected-output>
  14859. </comparator>
  14860. <comparator>
  14861. <type>RegexpComparator</type>
  14862. <expected-output>^( |\t)*Decommissioned nodes are not automatically shutdown and( )*</expected-output>
  14863. </comparator>
  14864. <comparator>
  14865. <type>RegexpComparator</type>
  14866. <expected-output>^( |\t)*are not chosen for writing new replicas.( )*</expected-output>
  14867. </comparator>
  14868. </comparators>
  14869. </test>
  14870. <test> <!--Tested -->
  14871. <description>help: help for dfsadmin finalizeUpgrade</description>
  14872. <test-commands>
  14873. <dfs-admin-command>-fs NAMENODE -help finalizeUpgrade</dfs-admin-command>
  14874. </test-commands>
  14875. <cleanup-commands>
  14876. </cleanup-commands>
  14877. <comparators>
  14878. <comparator>
  14879. <type>RegexpComparator</type>
  14880. <expected-output>^-finalizeUpgrade:( )*Finalize upgrade of HDFS.( )*</expected-output>
  14881. </comparator>
  14882. <comparator>
  14883. <type>RegexpComparator</type>
  14884. <expected-output>^( |\t)*Datanodes delete their previous version working directories,( )*</expected-output>
  14885. </comparator>
  14886. <comparator>
  14887. <type>RegexpComparator</type>
  14888. <expected-output>^( |\t)*followed by Namenode doing the same.( )*</expected-output>
  14889. </comparator>
  14890. <comparator>
  14891. <type>RegexpComparator</type>
  14892. <expected-output>^( |\t)*This completes the upgrade process.( )*</expected-output>
  14893. </comparator>
  14894. </comparators>
  14895. </test>
  14896. <test> <!--Tested -->
  14897. <description>help: help for dfsadmin metasave</description>
  14898. <test-commands>
  14899. <dfs-admin-command>-fs NAMENODE -help metasave</dfs-admin-command>
  14900. </test-commands>
  14901. <cleanup-commands>
  14902. </cleanup-commands>
  14903. <comparators>
  14904. <comparator>
  14905. <type>RegexpComparator</type>
  14906. <expected-output>^-metasave &lt;filename&gt;:( |\t)*Save Namenode's primary data structures( )*</expected-output>
  14907. </comparator>
  14908. <comparator>
  14909. <type>RegexpComparator</type>
  14910. <expected-output>^( |\t)*to &lt;filename&gt; in the directory specified by hadoop.log.dir property.( )*</expected-output>
  14911. </comparator>
  14912. <comparator>
  14913. <type>RegexpComparator</type>
  14914. <expected-output>^( |\t)*&lt;filename&gt; will contain one line for each of the following( )*</expected-output>
  14915. </comparator>
  14916. <comparator>
  14917. <type>RegexpComparator</type>
  14918. <expected-output>^( |\t)*1. Datanodes heart beating with Namenode( )*</expected-output>
  14919. </comparator>
  14920. <comparator>
  14921. <type>RegexpComparator</type>
  14922. <expected-output>^( |\t)*2. Blocks waiting to be replicated( )*</expected-output>
  14923. </comparator>
  14924. <comparator>
  14925. <type>RegexpComparator</type>
  14926. <expected-output>^( |\t)*3. Blocks currrently being replicated( )*</expected-output>
  14927. </comparator>
  14928. <comparator>
  14929. <type>RegexpComparator</type>
  14930. <expected-output>^( |\t)*4. Blocks waiting to be deleted( )*</expected-output>
  14931. </comparator>
  14932. </comparators>
  14933. </test>
  14934. <test> <!--Tested -->
  14935. <description>help: help for dfsadmin setQuota</description>
  14936. <test-commands>
  14937. <dfs-admin-command>-fs NAMENODE -help setQuota</dfs-admin-command>
  14938. </test-commands>
  14939. <cleanup-commands>
  14940. </cleanup-commands>
  14941. <comparators>
  14942. <comparator>
  14943. <type>RegexpComparator</type>
  14944. <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>
  14945. </comparator>
  14946. <comparator>
  14947. <type>RegexpComparator</type>
  14948. <expected-output>^( |\t)*The directory quota is a long integer that puts a hard limit( )*</expected-output>
  14949. </comparator>
  14950. <comparator>
  14951. <type>RegexpComparator</type>
  14952. <expected-output>^( |\t)*on the number of names in the directory tree( )*</expected-output>
  14953. </comparator>
  14954. <comparator>
  14955. <type>RegexpComparator</type>
  14956. <expected-output>^( |\t)*For each directory, attempt to set the quota. An error will be reported if( )*</expected-output>
  14957. </comparator>
  14958. <comparator>
  14959. <type>RegexpComparator</type>
  14960. <expected-output>^( |\t)*1. N is not a positive integer, or( )*</expected-output>
  14961. </comparator>
  14962. <comparator>
  14963. <type>RegexpComparator</type>
  14964. <expected-output>^( |\t)*2. User is not an administrator, or( )*</expected-output>
  14965. </comparator>
  14966. <comparator>
  14967. <type>RegexpComparator</type>
  14968. <expected-output>^( |\t)*3. The directory does not exist or is a file.( )*</expected-output>
  14969. </comparator>
  14970. </comparators>
  14971. </test>
  14972. <test> <!--Tested -->
  14973. <description>help: help for dfsadmin clrQuota</description>
  14974. <test-commands>
  14975. <dfs-admin-command>-fs NAMENODE -help clrQuota</dfs-admin-command>
  14976. </test-commands>
  14977. <cleanup-commands>
  14978. </cleanup-commands>
  14979. <comparators>
  14980. <comparator>
  14981. <type>RegexpComparator</type>
  14982. <expected-output>^-clrQuota &lt;dirname&gt;...&lt;dirname&gt;: Clear the quota for each directory &lt;dirName&gt;.( )*</expected-output>
  14983. </comparator>
  14984. <comparator>
  14985. <type>RegexpComparator</type>
  14986. <expected-output>^( |\t)*For each directory, attempt to clear the quota. An error will be reported if( )*</expected-output>
  14987. </comparator>
  14988. <comparator>
  14989. <type>RegexpComparator</type>
  14990. <expected-output>^( |\t)*1. the directory does not exist or is a file, or( )*</expected-output>
  14991. </comparator>
  14992. <comparator>
  14993. <type>RegexpComparator</type>
  14994. <expected-output>^( |\t)*2. user is not an administrator.( )*</expected-output>
  14995. </comparator>
  14996. <comparator>
  14997. <type>RegexpComparator</type>
  14998. <expected-output>^( |\t)*It does not fault if the directory has no quota.( )*</expected-output>
  14999. </comparator>
  15000. </comparators>
  15001. </test>
  15002. <test> <!--Tested -->
  15003. <description>help: help for dfsadmin setSpaceQuota</description>
  15004. <test-commands>
  15005. <dfs-admin-command>-fs NAMENODE -help setSpaceQuota</dfs-admin-command>
  15006. </test-commands>
  15007. <cleanup-commands>
  15008. </cleanup-commands>
  15009. <comparators>
  15010. <comparator>
  15011. <type>RegexpComparator</type>
  15012. <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>
  15013. </comparator>
  15014. <comparator>
  15015. <type>RegexpComparator</type>
  15016. <expected-output>^( |\t)*The space quota is a long integer that puts a hard limit( )*</expected-output>
  15017. </comparator>
  15018. <comparator>
  15019. <type>RegexpComparator</type>
  15020. <expected-output>^( |\t)*on the total size of all the files under the directory tree.( )*</expected-output>
  15021. </comparator>
  15022. <comparator>
  15023. <type>RegexpComparator</type>
  15024. <expected-output>^( |\t)*2. user is not an administrator, or( )*</expected-output>
  15025. </comparator>
  15026. <comparator>
  15027. <type>RegexpComparator</type>
  15028. <expected-output>^( |\t)*3. the directory does not exist or is a file.( )*</expected-output>
  15029. </comparator>
  15030. <comparator>
  15031. <type>RegexpComparator</type>
  15032. <expected-output>^( |\t)*The storage type specific quota is set when -storageType option is specified.( )*</expected-output>
  15033. </comparator>
  15034. </comparators>
  15035. </test>
  15036. <test> <!--Tested -->
  15037. <description>help: help for dfsadmin clrSpaceQuota</description>
  15038. <test-commands>
  15039. <dfs-admin-command>-fs NAMENODE -help clrSpaceQuota</dfs-admin-command>
  15040. </test-commands>
  15041. <cleanup-commands>
  15042. </cleanup-commands>
  15043. <comparators>
  15044. <comparator>
  15045. <type>RegexpComparator</type>
  15046. <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>
  15047. </comparator>
  15048. <comparator>
  15049. <type>RegexpComparator</type>
  15050. <expected-output>^( |\t)*For each directory, attempt to clear the quota. An error will be reported if( )*</expected-output>
  15051. </comparator>
  15052. <comparator>
  15053. <type>RegexpComparator</type>
  15054. <expected-output>^( |\t)*1. the directory does not exist or is a file, or( )*</expected-output>
  15055. </comparator>
  15056. <comparator>
  15057. <type>RegexpComparator</type>
  15058. <expected-output>^( |\t)*2. user is not an administrator.( )*</expected-output>
  15059. </comparator>
  15060. <comparator>
  15061. <type>RegexpComparator</type>
  15062. <expected-output>^( |\t)*It does not fault if the directory has no quota.( )*</expected-output>
  15063. </comparator>
  15064. <comparator>
  15065. <type>RegexpComparator</type>
  15066. <expected-output>^( |\t)*The storage type specific quota is cleared when -storageType option is specified.( )*</expected-output>
  15067. </comparator>
  15068. </comparators>
  15069. </test>
  15070. <test> <!--Tested -->
  15071. <description>help: help for dfsadmin refreshServiceAcl</description>
  15072. <test-commands>
  15073. <dfs-admin-command>-fs NAMENODE -help refreshServiceAcl</dfs-admin-command>
  15074. </test-commands>
  15075. <cleanup-commands>
  15076. </cleanup-commands>
  15077. <comparators>
  15078. <comparator>
  15079. <type>RegexpComparator</type>
  15080. <expected-output>^-refreshServiceAcl: Reload the service-level authorization policy file( )*</expected-output>
  15081. </comparator>
  15082. <comparator>
  15083. <type>RegexpComparator</type>
  15084. <expected-output>^( |\t)*Namenode will reload the authorization policy file.( )*</expected-output>
  15085. </comparator>
  15086. </comparators>
  15087. </test>
  15088. <test> <!--Tested -->
  15089. <description>help: help for dfsadmin help</description>
  15090. <test-commands>
  15091. <dfs-admin-command>-fs NAMENODE -help help</dfs-admin-command>
  15092. </test-commands>
  15093. <cleanup-commands>
  15094. </cleanup-commands>
  15095. <comparators>
  15096. <comparator>
  15097. <type>RegexpComparator</type>
  15098. <expected-output>^-help \[cmd\]:( |\t)*Displays help for the given command or all commands if none( )*</expected-output>
  15099. </comparator>
  15100. <comparator>
  15101. <type>RegexpComparator</type>
  15102. <expected-output>^( |\t)*is specified.( )*</expected-output>
  15103. </comparator>
  15104. </comparators>
  15105. </test>
  15106. <test> <!--Tested -->
  15107. <description>verifying error messages for quota commands - setting quota on a file</description>
  15108. <test-commands>
  15109. <command>-fs NAMENODE -mkdir /test </command>
  15110. <command>-fs NAMENODE -touchz /test/file1 </command>
  15111. <dfs-admin-command>-fs NAMENODE -setQuota 1 /test/file1 </dfs-admin-command>
  15112. </test-commands>
  15113. <cleanup-commands>
  15114. <dfs-admin-command>-fs NAMENODE -setQuota 5 /test </dfs-admin-command>
  15115. <!-- Same directory will be used in the next test -->
  15116. </cleanup-commands>
  15117. <comparators>
  15118. <comparator>
  15119. <type>SubstringComparator</type>
  15120. <expected-output>setQuota: `/test/file1': Is not a directory</expected-output>
  15121. </comparator>
  15122. </comparators>
  15123. </test>
  15124. <test> <!--Tested -->
  15125. <description>verifying error messages for quota commands - setting quota on non-existing file</description>
  15126. <test-commands>
  15127. <dfs-admin-command>-fs NAMENODE -setSpaceQuota 1g /test1 </dfs-admin-command>
  15128. </test-commands>
  15129. <cleanup-commands>
  15130. <!-- Same directory will be used in the next test -->
  15131. </cleanup-commands>
  15132. <comparators>
  15133. <comparator>
  15134. <type>SubstringComparator</type>
  15135. <expected-output>setSpaceQuota: Directory does not exist: /test1</expected-output>
  15136. </comparator>
  15137. </comparators>
  15138. </test>
  15139. <test> <!--Tested -->
  15140. <description>verifying error messages for quota commands - exceeding quota</description>
  15141. <test-commands>
  15142. <dfs-admin-command>-fs NAMENODE -setQuota 3 /test </dfs-admin-command>
  15143. <command>-fs NAMENODE -touchz /test/file0 </command>
  15144. <command>-fs NAMENODE -mkdir /test/test1 </command>
  15145. </test-commands>
  15146. <cleanup-commands>
  15147. <!-- Same directory(/test) will be used in the next test -->
  15148. </cleanup-commands>
  15149. <comparators>
  15150. <comparator>
  15151. <type>SubstringComparator</type>
  15152. <expected-output>The NameSpace quota (directories and files) of directory /test is exceeded</expected-output>
  15153. </comparator>
  15154. </comparators>
  15155. </test>
  15156. <test> <!--Tested -->
  15157. <description>verifying error messages for quota commands - setting not valid quota</description>
  15158. <test-commands>
  15159. <dfs-admin-command>-fs NAMENODE -setQuota 0 /test </dfs-admin-command>
  15160. </test-commands>
  15161. <cleanup-commands>
  15162. <!-- Same directory will be used in the next test -->
  15163. </cleanup-commands>
  15164. <comparators>
  15165. <comparator>
  15166. <type>SubstringComparator</type>
  15167. <expected-output>Invalid values for quota : 0</expected-output>
  15168. </comparator>
  15169. </comparators>
  15170. </test>
  15171. <test> <!--Tested -->
  15172. <description>verifying error messages for quota commands - setting not valid space quota</description>
  15173. <test-commands>
  15174. <dfs-admin-command>-fs NAMENODE -setSpaceQuota a5 /test </dfs-admin-command>
  15175. </test-commands>
  15176. <cleanup-commands>
  15177. <!-- Same directory will be used in the next test -->
  15178. </cleanup-commands>
  15179. <comparators>
  15180. <comparator>
  15181. <type>SubstringComparator</type>
  15182. <expected-output>setSpaceQuota: "a5" is not a valid value for a quota.</expected-output>
  15183. </comparator>
  15184. </comparators>
  15185. </test>
  15186. <test> <!--Tested -->
  15187. <description>verifying error messages for quota commands - clearQuota on non existing file</description>
  15188. <test-commands>
  15189. <dfs-admin-command>-fs NAMENODE -clrQuota /test1 </dfs-admin-command>
  15190. </test-commands>
  15191. <cleanup-commands>
  15192. <command>-fs NAMENODE -rm -r /test </command>
  15193. </cleanup-commands>
  15194. <comparators>
  15195. <comparator>
  15196. <type>SubstringComparator</type>
  15197. <expected-output>clrQuota: Directory does not exist: /test1</expected-output>
  15198. </comparator>
  15199. </comparators>
  15200. </test>
  15201. <test> <!--Tested -->
  15202. <description>verifying error messages for quota commands - using globing</description>
  15203. <test-commands>
  15204. <command>-fs NAMENODE -mkdir /dir1</command>
  15205. <command>-fs NAMENODE -mkdir /dir2</command>
  15206. <command>-fs NAMENODE -mkdir /dir3</command>
  15207. <dfs-admin-command>-fs NAMENODE -setSpaceQuota 1k /dir* </dfs-admin-command>
  15208. <command>-fs NAMENODE -put CLITEST_DATA/data15bytes /dir1/</command>
  15209. </test-commands>
  15210. <cleanup-commands>
  15211. <command>-fs NAMENODE -rm -r /dir* </command>
  15212. </cleanup-commands>
  15213. <comparators>
  15214. <comparator>
  15215. <type>RegexpComparator</type>
  15216. <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>
  15217. </comparator>
  15218. </comparators>
  15219. </test>
  15220. <test> <!--Tested -->
  15221. <description>verifying error messages for quota commands - setting quota using globing</description>
  15222. <test-commands>
  15223. <command>-fs NAMENODE -mkdir /dir1</command>
  15224. <command>-fs NAMENODE -mkdir /dir2</command>
  15225. <command>-fs NAMENODE -mkdir /dir3</command>
  15226. <dfs-admin-command>-fs NAMENODE -setQuota 1 /dir* </dfs-admin-command>
  15227. <command>-fs NAMENODE -mkdir /dir1/dir4</command>
  15228. </test-commands>
  15229. <cleanup-commands>
  15230. <command>-fs NAMENODE -rm -r /dir* </command>
  15231. </cleanup-commands>
  15232. <comparators>
  15233. <comparator>
  15234. <type>SubstringComparator</type>
  15235. <expected-output>mkdir: The NameSpace quota (directories and files) of directory /dir1 is exceeded: quota=1 file count=2</expected-output>
  15236. </comparator>
  15237. </comparators>
  15238. </test>
  15239. <test> <!--Tested -->
  15240. <description>refreshServiceAcl: refreshing security authorization policy for namenode</description>
  15241. <test-commands>
  15242. <dfs-admin-command>-fs NAMENODE -refreshServiceAcl </dfs-admin-command>
  15243. </test-commands>
  15244. <cleanup-commands>
  15245. <!-- No cleanup -->
  15246. </cleanup-commands>
  15247. <comparators>
  15248. <comparator>
  15249. <type>RegexpComparator</type>
  15250. <expected-output>Refresh service acl successful(\n)*</expected-output>
  15251. </comparator>
  15252. </comparators>
  15253. </test><!--
  15254. <test> Tested
  15255. <description>refreshServiceAcl: verifying error message while refreshing security authorization policy for namenode</description>
  15256. <test-commands>
  15257. hadoop-policy.xml for tests has
  15258. security.refresh.policy.protocol.acl = ${user.name}
  15259. <dfs-admin-command>-fs NAMENODE -Dhadoop.job.ugi=blah,blah -refreshServiceAcl </dfs-admin-command>
  15260. </test-commands>
  15261. <cleanup-commands>
  15262. No cleanup
  15263. </cleanup-commands>
  15264. <comparators>
  15265. <comparator>
  15266. <type>SubstringComparator</type>
  15267. <expected-output>access denied</expected-output>
  15268. </comparator>
  15269. </comparators>
  15270. </test>
  15271. --><!-- Test for safemode -->
  15272. <test> <!-- TESTED -->
  15273. <description>safemode: Test for enter - Namenode is not in safemode</description>
  15274. <test-commands>
  15275. <dfs-admin-command>-fs NAMENODE -safemode enter</dfs-admin-command>
  15276. </test-commands>
  15277. <cleanup-commands>
  15278. <dfs-admin-command>-fs NAMENODE -safemode leave</dfs-admin-command>
  15279. </cleanup-commands>
  15280. <comparators>
  15281. <comparator>
  15282. <type>TokenComparator</type>
  15283. <expected-output>Safe mode is ON</expected-output>
  15284. </comparator>
  15285. </comparators>
  15286. </test>
  15287. <test> <!-- TESTED -->
  15288. <description>safemode: Test for enter - Namenode is already in safemode</description>
  15289. <test-commands>
  15290. <dfs-admin-command>-fs NAMENODE -safemode enter</dfs-admin-command>
  15291. <dfs-admin-command>-fs NAMENODE -safemode enter</dfs-admin-command>
  15292. </test-commands>
  15293. <cleanup-commands>
  15294. <dfs-admin-command>-fs NAMENODE -safemode leave</dfs-admin-command>
  15295. </cleanup-commands>
  15296. <comparators>
  15297. <comparator>
  15298. <type>TokenComparator</type>
  15299. <expected-output>Safe mode is ON</expected-output>
  15300. </comparator>
  15301. </comparators>
  15302. </test>
  15303. <test> <!-- TESTED -->
  15304. <description>safemode: Test for leave - Namenode is already in safemode</description>
  15305. <test-commands>
  15306. <dfs-admin-command>-fs NAMENODE -safemode enter</dfs-admin-command>
  15307. <dfs-admin-command>-fs NAMENODE -safemode leave</dfs-admin-command>
  15308. </test-commands>
  15309. <cleanup-commands>
  15310. <!-- No cleanup -->
  15311. </cleanup-commands>
  15312. <comparators>
  15313. <comparator>
  15314. <type>TokenComparator</type>
  15315. <expected-output>Safe mode is OFF</expected-output>
  15316. </comparator>
  15317. </comparators>
  15318. </test>
  15319. <test> <!-- TESTED -->
  15320. <description>safemode: Test for leave - Namenode is not in safemode</description>
  15321. <test-commands>
  15322. <dfs-admin-command>-fs NAMENODE -safemode leave</dfs-admin-command>
  15323. </test-commands>
  15324. <cleanup-commands>
  15325. <!-- No cleanup -->
  15326. </cleanup-commands>
  15327. <comparators>
  15328. <comparator>
  15329. <type>TokenComparator</type>
  15330. <expected-output>Safe mode is OFF</expected-output>
  15331. </comparator>
  15332. </comparators>
  15333. </test>
  15334. <test> <!-- TESTED -->
  15335. <description>safemode: Test for get - Namenode is not in safemode</description>
  15336. <test-commands>
  15337. <dfs-admin-command>-fs NAMENODE -safemode leave</dfs-admin-command>
  15338. <dfs-admin-command>-fs NAMENODE -safemode get</dfs-admin-command>
  15339. </test-commands>
  15340. <cleanup-commands>
  15341. <!-- No cleanup -->
  15342. </cleanup-commands>
  15343. <comparators>
  15344. <comparator>
  15345. <type>TokenComparator</type>
  15346. <expected-output>Safe mode is OFF</expected-output>
  15347. </comparator>
  15348. </comparators>
  15349. </test>
  15350. <test> <!-- TESTED -->
  15351. <description>safemode:Test for get - Namenode is already in safemode</description>
  15352. <test-commands>
  15353. <dfs-admin-command>-fs NAMENODE -safemode enter</dfs-admin-command>
  15354. <dfs-admin-command>-fs NAMENODE -safemode get</dfs-admin-command>
  15355. </test-commands>
  15356. <cleanup-commands>
  15357. <dfs-admin-command>-fs NAMENODE -safemode leave</dfs-admin-command>
  15358. </cleanup-commands>
  15359. <comparators>
  15360. <comparator>
  15361. <type>TokenComparator</type>
  15362. <expected-output>Safe mode is ON</expected-output>
  15363. </comparator>
  15364. </comparators>
  15365. </test>
  15366. <test> <!-- TESTED -->
  15367. <description>safemode: Test for wait - Namenode is not in safemode</description>
  15368. <test-commands>
  15369. <dfs-admin-command>-fs NAMENODE -safemode leave</dfs-admin-command>
  15370. <dfs-admin-command>-fs NAMENODE -safemode wait</dfs-admin-command>
  15371. </test-commands>
  15372. <cleanup-commands>
  15373. <!-- No cleanup -->
  15374. </cleanup-commands>
  15375. <comparators>
  15376. <comparator>
  15377. <type>TokenComparator</type>
  15378. <expected-output>Safe mode is OFF</expected-output>
  15379. </comparator>
  15380. </comparators>
  15381. </test>
  15382. <test> <!-- TESTED -->
  15383. <description>safemode: Test for wait - Namenode is already in safemode</description>
  15384. <test-commands>
  15385. <dfs-admin-command>-fs NAMENODE -safemode enter</dfs-admin-command>
  15386. <dfs-admin-command>-fs NAMENODE -safemode wait &amp;</dfs-admin-command>
  15387. <dfs-admin-command>-fs NAMENODE -safemode leave</dfs-admin-command>
  15388. </test-commands>
  15389. <cleanup-commands>
  15390. <!-- No cleanup -->
  15391. </cleanup-commands>
  15392. <comparators>
  15393. <comparator>
  15394. <type>TokenComparator</type>
  15395. <expected-output>Safe mode is OFF</expected-output>
  15396. </comparator>
  15397. </comparators>
  15398. </test>
  15399. <!-- Test for report -->
  15400. <test> <!-- TESTED -->
  15401. <description>report: Displays the report about the Datanodes</description>
  15402. <test-commands>
  15403. <dfs-admin-command>-fs NAMENODE -report</dfs-admin-command>
  15404. </test-commands>
  15405. <cleanup-commands>
  15406. <!-- no cleanup cmd -->
  15407. </cleanup-commands>
  15408. <comparators>
  15409. <comparator>
  15410. <type>RegexpComparator</type>
  15411. <expected-output>Configured Capacity: [0-9]+ \([0-9]+\.[0-9]+ [BKMGT]+\)</expected-output>
  15412. </comparator>
  15413. <comparator>
  15414. <type>RegexpComparator</type>
  15415. <expected-output>Present Capacity: [0-9]+ \([0-9\.]+ [BKMGT]+\)</expected-output>
  15416. </comparator>
  15417. <comparator>
  15418. <type>RegexpComparator</type>
  15419. <expected-output>DFS Remaining: [0-9]+ \([0-9\.]+ [BKMGT]+\)</expected-output>
  15420. </comparator>
  15421. <comparator>
  15422. <type>RegexpComparator</type>
  15423. <expected-output>DFS Used: [0-9]+ \([0-9\.]+ [BKMGT]+\)</expected-output>
  15424. </comparator>
  15425. <comparator>
  15426. <type>RegexpComparator</type>
  15427. <expected-output>DFS Used\%: [0-9\.]+%</expected-output>
  15428. </comparator>
  15429. <comparator>
  15430. <type>RegexpComparator</type>
  15431. <expected-output>Live datanodes \([0-9]+\):</expected-output>
  15432. </comparator>
  15433. <comparator>
  15434. <type>RegexpComparator</type>
  15435. <expected-output>Name: [0-9\.:]+ \([-.a-zA-z0-9\.]+\)</expected-output>
  15436. </comparator>
  15437. <comparator>
  15438. <type>RegexpComparator</type>
  15439. <expected-output>Hostname: [-.a-zA-z0-9\.]+</expected-output>
  15440. </comparator>
  15441. <comparator>
  15442. <type>RegexpComparator</type>
  15443. <expected-output>Decommission Status : [a-zA-Z]+</expected-output>
  15444. </comparator>
  15445. <comparator>
  15446. <type>RegexpComparator</type>
  15447. <expected-output>Non DFS Used: [0-9]+ \([0-9\.]+ [BKMGT]+\)</expected-output>
  15448. </comparator>
  15449. <comparator>
  15450. <type>RegexpComparator</type>
  15451. <expected-output>DFS Remaining%: [0-9\.]+%</expected-output>
  15452. </comparator>
  15453. <comparator>
  15454. <type>RegexpComparator</type>
  15455. <expected-output>Last contact: [a-zA-Z]+ [a-zA-Z]+ [0-9]+ [0-9:]+ [A-Z\-\+\:0-9]+ [0-9]+</expected-output>
  15456. </comparator>
  15457. <comparator>
  15458. <type>TokenComparator</type>
  15459. <expected-output>Live datanodes</expected-output>
  15460. </comparator>
  15461. </comparators>
  15462. </test>
  15463. <!-- Test for saveNamespace -->
  15464. <test> <!-- TESTED -->
  15465. <description>saveNamespace: to save the namespace when safemode is ON</description>
  15466. <test-commands>
  15467. <dfs-admin-command>-fs NAMENODE -safemode enter</dfs-admin-command>
  15468. <dfs-admin-command>-fs NAMENODE -saveNamespace</dfs-admin-command>
  15469. </test-commands>
  15470. <cleanup-commands>
  15471. <dfs-admin-command>-fs NAMENODE -safemode leave</dfs-admin-command>
  15472. </cleanup-commands>
  15473. <comparators>
  15474. <comparator>
  15475. <type>RegexpComparator</type>
  15476. <expected-output>Save namespace successful(\n)*</expected-output>
  15477. </comparator>
  15478. </comparators>
  15479. </test>
  15480. <test> <!-- TESTED -->
  15481. <description>saveNamespace: to save the namespace when safemode is OFF</description>
  15482. <test-commands>
  15483. <dfs-admin-command>-fs NAMENODE -safemode leave</dfs-admin-command>
  15484. <dfs-admin-command>-fs NAMENODE -saveNamespace</dfs-admin-command>
  15485. </test-commands>
  15486. <cleanup-commands>
  15487. <dfs-admin-command>-fs NAMENODE -safemode leave</dfs-admin-command>
  15488. </cleanup-commands>
  15489. <comparators>
  15490. <comparator>
  15491. <type>TokenComparator</type>
  15492. <expected-output>saveNamespace: Safe mode should be turned ON in order to create namespace image.</expected-output>
  15493. </comparator>
  15494. </comparators>
  15495. </test>
  15496. <!-- Test for rollEdits -->
  15497. <test> <!-- TESTED -->
  15498. <description>rollEdits: test rollEdits admin command</description>
  15499. <test-commands>
  15500. <dfs-admin-command>-fs NAMENODE -rollEdits</dfs-admin-command>
  15501. </test-commands>
  15502. <cleanup-commands>
  15503. <!-- no cleanup -->
  15504. </cleanup-commands>
  15505. <comparators>
  15506. <comparator>
  15507. <type>RegexpComparator</type>
  15508. <expected-output>New segment starts at txid \d+</expected-output>
  15509. </comparator>
  15510. </comparators>
  15511. </test>
  15512. <!-- Test for refreshNodes -->
  15513. <test> <!-- TESTED -->
  15514. <description>refreshNodes: to refresh the nodes</description>
  15515. <test-commands>
  15516. <dfs-admin-command>-fs NAMENODE -refreshNodes</dfs-admin-command>
  15517. <dfs-admin-command>-fs NAMENODE -report</dfs-admin-command>
  15518. </test-commands>
  15519. <cleanup-commands>
  15520. <!-- no cleanup -->
  15521. </cleanup-commands>
  15522. <comparators>
  15523. <comparator>
  15524. <type>RegexpComparator</type>
  15525. <expected-output>Configured Capacity: [0-9]+ \([0-9]+\.[0-9]+ [BKMGT]+\)</expected-output>
  15526. </comparator>
  15527. <comparator>
  15528. <type>RegexpComparator</type>
  15529. <expected-output>Present Capacity: [0-9]+ \([0-9\.]+ [BKMGT]+\)</expected-output>
  15530. </comparator>
  15531. <comparator>
  15532. <type>RegexpComparator</type>
  15533. <expected-output>DFS Remaining: [0-9]+ \([0-9\.]+ [BKMGT]+\)</expected-output>
  15534. </comparator>
  15535. <comparator>
  15536. <type>RegexpComparator</type>
  15537. <expected-output>DFS Used: [0-9]+ \([0-9\.]+ [BKMGT]+\)</expected-output>
  15538. </comparator>
  15539. <comparator>
  15540. <type>RegexpComparator</type>
  15541. <expected-output>DFS Used\%: [0-9\.]+%</expected-output>
  15542. </comparator>
  15543. <comparator>
  15544. <type>RegexpComparator</type>
  15545. <expected-output>Name: [0-9\.:]+ \([-.a-zA-z0-9\.]+\)</expected-output>
  15546. </comparator>
  15547. <comparator>
  15548. <type>RegexpComparator</type>
  15549. <expected-output>Hostname: [-.a-zA-z0-9\.]+</expected-output>
  15550. </comparator>
  15551. <comparator>
  15552. <type>RegexpComparator</type>
  15553. <expected-output>Decommission Status : [a-zA-Z]+</expected-output>
  15554. </comparator>
  15555. <comparator>
  15556. <type>RegexpComparator</type>
  15557. <expected-output>Non DFS Used: [0-9]+ \([0-9\.]+ [BKMGT]+\)</expected-output>
  15558. </comparator>
  15559. <comparator>
  15560. <type>RegexpComparator</type>
  15561. <expected-output>DFS Remaining%: [0-9\.]+%</expected-output>
  15562. </comparator>
  15563. <comparator>
  15564. <type>RegexpComparator</type>
  15565. <expected-output>Last contact: [a-zA-Z]+ [a-zA-Z]+ [0-9]+ [0-9:]+ [A-Z\-\+\:0-9]+ [0-9]+</expected-output>
  15566. </comparator>
  15567. <comparator>
  15568. <type>TokenComparator</type>
  15569. <expected-output>Live datanodes</expected-output>
  15570. </comparator>
  15571. </comparators>
  15572. </test>
  15573. <!-- Test for metasave -->
  15574. <test> <!-- TESTED -->
  15575. <description>metasave: to save metadata</description>
  15576. <test-commands>
  15577. <dfs-admin-command>-fs NAMENODE -metasave metafile</dfs-admin-command>
  15578. </test-commands>
  15579. <cleanup-commands>
  15580. <!-- No cleanup -->
  15581. </cleanup-commands>
  15582. <comparators>
  15583. <comparator>
  15584. <type>RegexpComparator</type>
  15585. <expected-output>Created metasave file metafile in the log directory of namenode hdfs:\/\/[-.a-zA-Z0-9\.:]+</expected-output>
  15586. </comparator>
  15587. </comparators>
  15588. </test>
  15589. <!-- Test for clrSpacequota -->
  15590. <test> <!-- TESTED -->
  15591. <description>clrSpaceQuota: Namenode is already in safemode</description>
  15592. <test-commands>
  15593. <command>-fs NAMENODE -mkdir test</command>
  15594. <dfs-admin-command>-fs NAMENODE -setSpaceQuota 15 test</dfs-admin-command>
  15595. <dfs-admin-command>-fs NAMENODE -clrSpaceQuota test</dfs-admin-command>
  15596. </test-commands>
  15597. <cleanup-commands>
  15598. <command>-fs NAMENODE -rm -r test</command>
  15599. </cleanup-commands>
  15600. <comparators>
  15601. <comparator>
  15602. <type>ExactComparator</type>
  15603. <expected-output></expected-output>
  15604. </comparator>
  15605. </comparators>
  15606. </test>
  15607. <test> <!-- Tested -->
  15608. <description>printTopology: verifying that the topology map is what we expect</description>
  15609. <test-commands>
  15610. <dfs-admin-command>-fs NAMENODE -printTopology</dfs-admin-command>
  15611. </test-commands>
  15612. <cleanup-commands>
  15613. <!-- No cleanup -->
  15614. </cleanup-commands>
  15615. <comparators>
  15616. <!-- miniDFS cluster started in CLITestHelper is set to match this output -->
  15617. <comparator>
  15618. <type>RegexpAcrossOutputComparator</type>
  15619. <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>
  15620. </comparator>
  15621. <comparator>
  15622. <type>RegexpAcrossOutputComparator</type>
  15623. <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>
  15624. </comparator>
  15625. <comparator>
  15626. <type>RegexpAcrossOutputComparator</type>
  15627. <expected-output>Rack: \/rack3\s*127\.0\.0\.1:\d+\s\([-.a-zA-Z0-9]+\)</expected-output>
  15628. </comparator>
  15629. <comparator>
  15630. <type>RegexpAcrossOutputComparator</type>
  15631. <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>
  15632. </comparator>
  15633. </comparators>
  15634. </test>
  15635. <!-- DFS tests -->
  15636. <test>
  15637. <description>appendToFile</description>
  15638. <test-commands>
  15639. <command>-fs NAMENODE -mkdir -p /user/USERNAME/dir1</command>
  15640. <command>-fs NAMENODE -touchz /user/USERNAME/dir1/file0</command>
  15641. <command>-fs NAMENODE -appendToFile CLITEST_DATA/data15bytes /user/USERNAME/dir1/file0</command>
  15642. <command>-fs NAMENODE -cat /user/USERNAME/dir1/file0</command>
  15643. </test-commands>
  15644. <cleanup-commands>
  15645. <command>-fs NAMENODE -rm -r /user/USERNAME</command>
  15646. </cleanup-commands>
  15647. <comparators>
  15648. <comparator>
  15649. <type>RegexpComparator</type>
  15650. <expected-output>12345678901234</expected-output>
  15651. </comparator>
  15652. </comparators>
  15653. </test>
  15654. <test>
  15655. <description>text</description>
  15656. <test-commands>
  15657. <command>-fs NAMENODE -mkdir -p /user/USERNAME/dir1</command>
  15658. <command>-fs NAMENODE -put CLITEST_DATA/data15bytes /user/USERNAME/dir1/file0</command>
  15659. <command>-fs NAMENODE -text /user/USERNAME/dir1/file0</command>
  15660. </test-commands>
  15661. <cleanup-commands>
  15662. <command>-fs NAMENODE -rm -r /user/USERNAME/dir1</command>
  15663. </cleanup-commands>
  15664. <comparators>
  15665. <comparator>
  15666. <type>RegexpComparator</type>
  15667. <expected-output>12345678901234</expected-output>
  15668. </comparator>
  15669. </comparators>
  15670. </test>
  15671. <test>
  15672. <description>rmdir</description>
  15673. <test-commands>
  15674. <command>-fs NAMENODE -mkdir -p /user/USERNAME/dir1</command>
  15675. <command>-fs NAMENODE -rmdir /user/USERNAME/dir1</command>
  15676. <command>-fs NAMENODE -ls /user/USERNAME/</command>
  15677. </test-commands>
  15678. <cleanup-commands>
  15679. <command>-fs NAMENODE -rm -r /user/USERNAME</command>
  15680. </cleanup-commands>
  15681. <comparators>
  15682. <comparator>
  15683. <type>ExactComparator</type>
  15684. <expected-output></expected-output>
  15685. </comparator>
  15686. </comparators>
  15687. </test>
  15688. <test>
  15689. <description>rmdir with ignore-fail-on-non-empty</description>
  15690. <test-commands>
  15691. <command>-fs NAMENODE -mkdir -p /user/USERNAME/dir1</command>
  15692. <command>-fs NAMENODE -put CLITEST_DATA/data15bytes /user/USERNAME/dir1/file0</command>
  15693. <command>-fs NAMENODE -rmdir --ignore-fail-on-non-empty /user/USERNAME/dir1</command>
  15694. <command>-fs NAMENODE -ls /user/USERNAME/</command>
  15695. </test-commands>
  15696. <cleanup-commands>
  15697. <command>-fs NAMENODE -rm -r /user/USERNAME</command>
  15698. </cleanup-commands>
  15699. <comparators>
  15700. <comparator>
  15701. <type>RegexpComparator</type>
  15702. <expected-output>Found 1 items</expected-output>
  15703. </comparator>
  15704. <comparator>
  15705. <type>RegexpComparator</type>
  15706. <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>
  15707. </comparator>
  15708. </comparators>
  15709. </test>
  15710. <test>
  15711. <description>df</description>
  15712. <test-commands>
  15713. <command>-fs NAMENODE -mkdir -p /user/USERNAME/dir1</command>
  15714. <command>-fs NAMENODE -put CLITEST_DATA/data15bytes /user/USERNAME/dir1/file0</command>
  15715. <command>-fs NAMENODE -df /user/USERNAME</command>
  15716. </test-commands>
  15717. <cleanup-commands>
  15718. <command>-fs NAMENODE -rm -r /user/USERNAME</command>
  15719. </cleanup-commands>
  15720. <comparators>
  15721. <comparator>
  15722. <type>RegexpComparator</type>
  15723. <expected-output>Filesystem( )*Size( )*Used( )*Available( )*Use%.*</expected-output>
  15724. </comparator>
  15725. </comparators>
  15726. </test>
  15727. <test>
  15728. <description>expunge</description>
  15729. <test-commands>
  15730. <command>-fs NAMENODE -expunge</command>
  15731. </test-commands>
  15732. <cleanup-commands>
  15733. <command></command>
  15734. </cleanup-commands>
  15735. <comparators>
  15736. <comparator>
  15737. <type>ExactComparator</type>
  15738. <expected-output></expected-output>
  15739. </comparator>
  15740. </comparators>
  15741. </test>
  15742. <test>
  15743. <description>getmerge</description>
  15744. <test-commands>
  15745. <command>-fs NAMENODE -mkdir -p /user/USERNAME/dir1</command>
  15746. <command>-fs NAMENODE -copyFromLocal CLITEST_DATA/data15bytes /user/USERNAME/dir1</command>
  15747. <command>-fs NAMENODE -copyFromLocal CLITEST_DATA/data30bytes /user/USERNAME/dir1</command>
  15748. <command>-fs NAMENODE -getmerge /user/USERNAME/dir1 CLITEST_DATA/file</command>
  15749. <command>-cat CLITEST_DATA/file</command>
  15750. </test-commands>
  15751. <cleanup-commands>
  15752. <command>-fs NAMENODE -rm -r /user/USERNAME</command>
  15753. <command>rm data</command>
  15754. </cleanup-commands>
  15755. <comparators>
  15756. <comparator>
  15757. <type>RegexpComparator</type>
  15758. <expected-output>12345678901234.*</expected-output>
  15759. </comparator>
  15760. </comparators>
  15761. </test>
  15762. <!-- Tests for snapshots -->
  15763. <test>
  15764. <description>allowSnapshot</description>
  15765. <test-commands>
  15766. <command>-fs NAMENODE -mkdir -p /user/USERNAME/dir1</command>
  15767. <dfs-admin-command>-fs NAMENODE -allowSnapshot /user/USERNAME/dir1</dfs-admin-command>
  15768. </test-commands>
  15769. <cleanup-commands>
  15770. <dfs-admin-command>-fs NAMENODE -disallowSnapshot /user/USERNAME/dir1</dfs-admin-command>
  15771. <command>-fs NAMENODE -rm -r /user/USERNAME</command>
  15772. </cleanup-commands>
  15773. <comparators>
  15774. <comparator>
  15775. <type>RegexpComparator</type>
  15776. <expected-output>Allowing snaphot on /user/USERNAME/dir1 succeeded</expected-output>
  15777. </comparator>
  15778. </comparators>
  15779. </test>
  15780. <test>
  15781. <description>disallowSnapshot</description>
  15782. <test-commands>
  15783. <command>-fs NAMENODE -mkdir -p /user/USERNAME/dir1</command>
  15784. <dfs-admin-command>-fs NAMENODE -allowSnapshot /user/USERNAME/dir1</dfs-admin-command>
  15785. <dfs-admin-command>-fs NAMENODE -disallowSnapshot /user/USERNAME/dir1</dfs-admin-command>
  15786. </test-commands>
  15787. <cleanup-commands>
  15788. <command>-fs NAMENODE -rm -r /user/USERNAME</command>
  15789. </cleanup-commands>
  15790. <comparators>
  15791. <comparator>
  15792. <type>RegexpComparator</type>
  15793. <expected-output>Disallowing snaphot on /user/USERNAME/dir1 succeeded</expected-output>
  15794. </comparator>
  15795. </comparators>
  15796. </test>
  15797. <test>
  15798. <description>createSnapshot</description>
  15799. <test-commands>
  15800. <command>-fs NAMENODE -mkdir -p /user/USERNAME/dir1</command>
  15801. <dfs-admin-command>-fs NAMENODE -allowSnapshot /user/USERNAME/dir1</dfs-admin-command>
  15802. <command>-fs NAMENODE -createSnapshot /user/USERNAME/dir1 snapshot1</command>
  15803. </test-commands>
  15804. <cleanup-commands>
  15805. <command>-fs NAMENODE -deleteSnapshot /user/USERNAME/dir1 snapshot1</command>
  15806. <dfs-admin-command>-fs NAMENODE -disallowSnapshot /user/USERNAME/dir1</dfs-admin-command>
  15807. <command>-fs NAMENODE -rm -r /user/USERNAME</command>
  15808. </cleanup-commands>
  15809. <comparators>
  15810. <comparator>
  15811. <type>RegexpComparator</type>
  15812. <expected-output>Created snapshot /user/USERNAME/dir1/.snapshot/snapshot1</expected-output>
  15813. </comparator>
  15814. </comparators>
  15815. </test>
  15816. <test>
  15817. <description>renameSnapshot</description>
  15818. <test-commands>
  15819. <command>-fs NAMENODE -mkdir -p /user/USERNAME/dir1</command>
  15820. <dfs-admin-command>-fs NAMENODE -allowSnapshot /user/USERNAME/dir1</dfs-admin-command>
  15821. <command>-fs NAMENODE -createSnapshot /user/USERNAME/dir1 snapshot1</command>
  15822. <command>-fs NAMENODE -renameSnapshot /user/USERNAME/dir1 snapshot1 snapshot2</command>
  15823. <command>-fs NAMENODE -ls /user/USERNAME/dir1/.snapshot</command>
  15824. </test-commands>
  15825. <cleanup-commands>
  15826. <command>-fs NAMENODE -deleteSnapshot /user/USERNAME/dir1 snapshot2</command>
  15827. <dfs-admin-command>-fs NAMENODE -disallowSnapshot /user/USERNAME/dir1</dfs-admin-command>
  15828. <command>-fs NAMENODE -rm -r /user/USERNAME</command>
  15829. </cleanup-commands>
  15830. <comparators>
  15831. <comparator>
  15832. <type>RegexpComparator</type>
  15833. <expected-output>Found 1 items</expected-output>
  15834. </comparator>
  15835. <comparator>
  15836. <type>RegexpComparator</type>
  15837. <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>
  15838. </comparator>
  15839. </comparators>
  15840. </test>
  15841. <test>
  15842. <description>deleteSnapshot</description>
  15843. <test-commands>
  15844. <command>-fs NAMENODE -mkdir -p /user/USERNAME/dir1</command>
  15845. <dfs-admin-command>-fs NAMENODE -allowSnapshot /user/USERNAME/dir1</dfs-admin-command>
  15846. <command>-fs NAMENODE -createSnapshot /user/USERNAME/dir1 snapshot1</command>
  15847. <command>-fs NAMENODE -deleteSnapshot /user/USERNAME/dir1 snapshot1</command>
  15848. <command>-fs NAMENODE -ls /user/USERNAME/dir1/.snapshot</command>
  15849. </test-commands>
  15850. <cleanup-commands>
  15851. <dfs-admin-command>-fs NAMENODE -disallowSnapshot /user/USERNAME/dir1</dfs-admin-command>
  15852. <command>-fs NAMENODE -rm -r /user/USERNAME</command>
  15853. </cleanup-commands>
  15854. <comparators>
  15855. <comparator>
  15856. <type>ExactComparator</type>
  15857. <expected-output></expected-output>
  15858. </comparator>
  15859. </comparators>
  15860. </test>
  15861. <!-- DFSadmin tests -->
  15862. <test>
  15863. <description>refreshUserToGroupsMappings</description>
  15864. <test-commands>
  15865. <dfs-admin-command>-fs NAMENODE -refreshUserToGroupsMappings</dfs-admin-command>
  15866. </test-commands>
  15867. <cleanup-commands>
  15868. <command></command>
  15869. </cleanup-commands>
  15870. <comparators>
  15871. <comparator>
  15872. <type>RegexpComparator</type>
  15873. <expected-output>Refresh user to groups mapping successful(\n)*</expected-output>
  15874. </comparator>
  15875. </comparators>
  15876. </test>
  15877. <test>
  15878. <description>refreshSuperUserGroupsConfiguration</description>
  15879. <test-commands>
  15880. <dfs-admin-command>-fs NAMENODE -refreshSuperUserGroupsConfiguration</dfs-admin-command>
  15881. </test-commands>
  15882. <cleanup-commands>
  15883. <command></command>
  15884. </cleanup-commands>
  15885. <comparators>
  15886. <comparator>
  15887. <type>RegexpComparator</type>
  15888. <expected-output>Refresh super user groups configuration successful(\n)*</expected-output>
  15889. </comparator>
  15890. </comparators>
  15891. </test>
  15892. <test>
  15893. <description>setQuota</description>
  15894. <test-commands>
  15895. <command>-fs NAMENODE -mkdir -p /user/USERNAME/dir1</command>
  15896. <dfs-admin-command>-fs NAMENODE -setQuota 3 /user/USERNAME/dir1</dfs-admin-command>
  15897. <command>-fs NAMENODE -count -q /user/USERNAME/dir1</command>
  15898. </test-commands>
  15899. <cleanup-commands>
  15900. <command>-fs NAMENODE -rm -r /user/USERNAME</command>
  15901. </cleanup-commands>
  15902. <comparators>
  15903. <comparator>
  15904. <type>RegexpComparator</type>
  15905. <expected-output>( )*3.*/user/USERNAME/dir1</expected-output>
  15906. </comparator>
  15907. </comparators>
  15908. </test>
  15909. <test>
  15910. <description>clrQuota</description>
  15911. <test-commands>
  15912. <command>-fs NAMENODE -mkdir -p /user/USERNAME/dir1</command>
  15913. <dfs-admin-command>-fs NAMENODE -setQuota 3 /user/USERNAME/dir1</dfs-admin-command>
  15914. <dfs-admin-command>-fs NAMENODE -clrQuota /user/USERNAME/dir1</dfs-admin-command>
  15915. <command>-fs NAMENODE -count -q /user/USERNAME/dir1</command>
  15916. </test-commands>
  15917. <cleanup-commands>
  15918. <command>-fs NAMENODE -rm -r /user/USERNAME</command>
  15919. </cleanup-commands>
  15920. <comparators>
  15921. <comparator>
  15922. <type>RegexpComparator</type>
  15923. <expected-output>( )*none.*/user/USERNAME/dir1</expected-output>
  15924. </comparator>
  15925. </comparators>
  15926. </test>
  15927. <test>
  15928. <description>setSpaceQuota</description>
  15929. <test-commands>
  15930. <command>-fs NAMENODE -mkdir -p /user/USERNAME/dir1</command>
  15931. <dfs-admin-command>-fs NAMENODE -setSpaceQuota 1G /user/USERNAME/dir1</dfs-admin-command>
  15932. </test-commands>
  15933. <cleanup-commands>
  15934. <command>-fs NAMENODE -rm -r /user/USERNAME/dir1</command>
  15935. </cleanup-commands>
  15936. <comparators>
  15937. <comparator>
  15938. <type>ExactComparator</type>
  15939. <expected-output></expected-output>
  15940. </comparator>
  15941. </comparators>
  15942. </test>
  15943. <test>
  15944. <description>setBalancerBandwidth</description>
  15945. <test-commands>
  15946. <dfs-admin-command>-fs NAMENODE -setBalancerBandwidth 104857600</dfs-admin-command>
  15947. </test-commands>
  15948. <cleanup-commands>
  15949. <command></command>
  15950. </cleanup-commands>
  15951. <comparators>
  15952. <comparator>
  15953. <type>RegexpComparator</type>
  15954. <expected-output>Balancer bandwidth is set to 104857600(\n)*</expected-output>
  15955. </comparator>
  15956. </comparators>
  15957. </test>
  15958. <test>
  15959. <description>finalizeUpgrade</description>
  15960. <test-commands>
  15961. <dfs-admin-command>-fs NAMENODE -finalizeUpgrade</dfs-admin-command>
  15962. </test-commands>
  15963. <cleanup-commands>
  15964. <command></command>
  15965. </cleanup-commands>
  15966. <comparators>
  15967. <comparator>
  15968. <type>SubstringComparator</type>
  15969. <expected-output>Finalize upgrade successful</expected-output>
  15970. </comparator>
  15971. </comparators>
  15972. </test>
  15973. <!-- Tests for moveFromLocal -->
  15974. <test> <!-- TESTED -->
  15975. <description>moveFromLocal: moving non existent file(absolute path)</description>
  15976. <test-commands>
  15977. <command>-fs NAMENODE -mkdir -p /user/USERNAME/dir</command>
  15978. <command>-fs NAMENODE -moveFromLocal /user/wrongdata /user/USERNAME/dir</command>
  15979. </test-commands>
  15980. <cleanup-commands>
  15981. <command>-fs NAMENODE -rm -r /user/USERNAME</command>
  15982. </cleanup-commands>
  15983. <comparators>
  15984. <comparator>
  15985. <type>TokenComparator</type>
  15986. <expected-output>moveFromLocal: `/user/wrongdata': No such file or directory</expected-output>
  15987. </comparator>
  15988. </comparators>
  15989. </test>
  15990. <test> <!-- TESTED -->
  15991. <description>moveFromLocal: moving non existent file(relative path)</description>
  15992. <test-commands>
  15993. <command>-fs NAMENODE -mkdir -p /user/USERNAME/dir</command> <!-- make sure user home dir exists -->
  15994. <command>-fs NAMENODE -moveFromLocal wrongdata /user/USERNAME/dir</command>
  15995. </test-commands>
  15996. <cleanup-commands>
  15997. <command>-fs NAMENODE -rm -r /user/USERNAME</command>
  15998. </cleanup-commands>
  15999. <comparators>
  16000. <comparator>
  16001. <type>TokenComparator</type>
  16002. <expected-output>moveFromLocal: `wrongdata': No such file or directory</expected-output>
  16003. </comparator>
  16004. </comparators>
  16005. </test>
  16006. <test> <!-- TESTED -->
  16007. <description>moveFromLocal: moving many files into an existing file</description>
  16008. <test-commands>
  16009. <command>-fs NAMENODE -cp CLITEST_DATA/data15bytes data15bytes</command>
  16010. <command>-fs NAMENODE -cp CLITEST_DATA/data30bytes data30bytes</command>
  16011. <command>-fs NAMENODE -mkdir -p /user/USERNAME/dir</command>
  16012. <command>-fs NAMENODE -touchz /user/USERNAME/dir/file0</command>
  16013. <command>-fs NAMENODE -moveFromLocal data15bytes data30bytes /user/USERNAME/dir/file0</command>
  16014. </test-commands>
  16015. <cleanup-commands>
  16016. <command>-fs NAMENODE -rm -r /user/USERNAME</command>
  16017. </cleanup-commands>
  16018. <comparators>
  16019. <comparator>
  16020. <type>RegexpComparator</type>
  16021. <expected-output>moveFromLocal: `/user/USERNAME/dir/file0': Is not a directory</expected-output>
  16022. </comparator>
  16023. </comparators>
  16024. </test>
  16025. <test> <!-- TESTED -->
  16026. <description>moveFromLocal: moving many files into a non existent directory</description>
  16027. <test-commands>
  16028. <command>-fs NAMENODE -cp CLITEST_DATA/data15bytes data15bytes</command>
  16029. <command>-fs NAMENODE -cp CLITEST_DATA/data30bytes data30bytes</command>
  16030. <command>-fs NAMENODE -moveFromLocal data15bytes data30bytes /user/USERNAME/dir/wrongdir</command>
  16031. </test-commands>
  16032. <cleanup-commands>
  16033. <command>-fs NAMENODE -rm -r /user/USERNAME</command>
  16034. </cleanup-commands>
  16035. <comparators>
  16036. <comparator>
  16037. <type>RegexpComparator</type>
  16038. <expected-output>^moveFromLocal: `/user/USERNAME/dir/wrongdir': No such file or directory</expected-output>
  16039. </comparator>
  16040. </comparators>
  16041. </test>
  16042. <test> <!-- TESTED -->
  16043. <description>moveFromLocal: Test for hdfs:// path - moving non existent file</description>
  16044. <test-commands>
  16045. <command>-fs NAMENODE -mkdir -p /user/USERNAME/dir</command>
  16046. <command>-fs NAMENODE -moveFromLocal /user/wrongdata hdfs:///user/USERNAME/dir/file</command>
  16047. </test-commands>
  16048. <cleanup-commands>
  16049. <command>-fs NAMENODE -rm -r hdfs:///*</command>
  16050. </cleanup-commands>
  16051. <comparators>
  16052. <comparator>
  16053. <type>TokenComparator</type>
  16054. <expected-output>moveFromLocal: `/user/wrongdata': No such file or directory</expected-output>
  16055. </comparator>
  16056. </comparators>
  16057. </test>
  16058. <test> <!-- TESTED -->
  16059. <description>moveFromLocal: Test for hdfs:// path - moving many files into an existing file</description>
  16060. <test-commands>
  16061. <command>-fs NAMENODE -cp CLITEST_DATA/data15bytes data15bytes</command>
  16062. <command>-fs NAMENODE -cp CLITEST_DATA/data30bytes data30bytes</command>
  16063. <command>-fs NAMENODE -mkdir -p /user/USERNAME/dir</command>
  16064. <command>-fs NAMENODE -touchz hdfs:///user/USERNAME/dir/file</command>
  16065. <command>-fs NAMENODE -moveFromLocal data15bytes data30bytes hdfs:///user/USERNAME/dir/file</command>
  16066. </test-commands>
  16067. <cleanup-commands>
  16068. <command>-fs NAMENODE -rm -r hdfs:///*</command>
  16069. </cleanup-commands>
  16070. <comparators>
  16071. <comparator>
  16072. <type>RegexpComparator</type>
  16073. <expected-output>moveFromLocal: `hdfs:///user/USERNAME/dir/file': Is not a directory</expected-output>
  16074. </comparator>
  16075. </comparators>
  16076. </test>
  16077. <test> <!-- TESTED -->
  16078. <description>moveFromLocal: Test for hdfs:// path - moving many files into a non existent directory</description>
  16079. <test-commands>
  16080. <command>-fs NAMENODE -cp CLITEST_DATA/data15bytes data15bytes</command>
  16081. <command>-fs NAMENODE -cp CLITEST_DATA/data30bytes data30bytes</command>
  16082. <command>-fs NAMENODE -moveFromLocal data15bytes data30bytes hdfs:///user/USERNAME/dir/wrongdir</command>
  16083. </test-commands>
  16084. <cleanup-commands>
  16085. <command>-fs NAMENODE -rm -r hdfs:///*</command>
  16086. </cleanup-commands>
  16087. <comparators>
  16088. <comparator>
  16089. <type>RegexpComparator</type>
  16090. <expected-output>moveFromLocal: `hdfs:///user/USERNAME/dir/wrongdir': No such file or directory</expected-output>
  16091. </comparator>
  16092. </comparators>
  16093. </test>
  16094. <test> <!-- TESTED -->
  16095. <description>moveFromLocal: Test for Namenode's path - moving non existent file</description>
  16096. <test-commands>
  16097. <command>-fs NAMENODE -mkdir -p NAMENODE/user/USERNAME/dir</command>
  16098. <command>-fs NAMENODE -moveFromLocal /user/wrongdata NAMENODE/user/USERNAME/dir</command>
  16099. </test-commands>
  16100. <cleanup-commands>
  16101. <command>-fs NAMENODE -rm -r NAMENODE/*</command>
  16102. </cleanup-commands>
  16103. <comparators>
  16104. <comparator>
  16105. <type>TokenComparator</type>
  16106. <expected-output>moveFromLocal: `/user/wrongdata': No such file or directory</expected-output>
  16107. </comparator>
  16108. </comparators>
  16109. </test>
  16110. <test> <!-- TESTED -->
  16111. <description>moveFromLocal: Test for Namenode's path - moving many files into an existing file</description>
  16112. <test-commands>
  16113. <command>-fs NAMENODE -mkdir -p NAMENODE/user/USERNAME/dir</command>
  16114. <command>-fs NAMENODE -touchz NAMENODE/user/USERNAME/dir/file0</command>
  16115. <command>-fs NAMENODE -cp CLITEST_DATA/data15bytes data15bytes</command>
  16116. <command>-fs NAMENODE -cp CLITEST_DATA/data30bytes data30bytes</command>
  16117. <command>-fs NAMENODE -moveFromLocal data15bytes data30bytes NAMENODE/user/USERNAME/dir/file0</command>
  16118. </test-commands>
  16119. <cleanup-commands>
  16120. <command>-fs NAMENODE -rm -r NAMENODE/*</command>
  16121. </cleanup-commands>
  16122. <comparators>
  16123. <comparator>
  16124. <type>RegexpComparator</type>
  16125. <expected-output>moveFromLocal: `hdfs://\w+[-.a-z0-9]*:[0-9]+/user/USERNAME/dir/file0': Is not a directory</expected-output>
  16126. </comparator>
  16127. </comparators>
  16128. </test>
  16129. <test> <!-- TESTED -->
  16130. <description>moveFromLocal: Test for Namenode's path - moving many files into a non existent directory</description>
  16131. <test-commands>
  16132. <command>-fs NAMENODE -mkdir -p NAMENODE/user/USERNAME</command>
  16133. <command>-fs NAMENODE -touchz NAMENODE/user/USERNAME/dir/file0</command>
  16134. <command>-fs NAMENODE -cp CLITEST_DATA/data15bytes data15bytes</command>
  16135. <command>-fs NAMENODE -cp CLITEST_DATA/data30bytes data30bytes</command>
  16136. <command>-fs NAMENODE -moveFromLocal data15bytes data30bytes NAMENODE/user/USERNAME/wrongdir</command>
  16137. </test-commands>
  16138. <cleanup-commands>
  16139. <command>-fs NAMENODE -rm -r NAMENODE/*</command>
  16140. </cleanup-commands>
  16141. <comparators>
  16142. <comparator>
  16143. <type>RegexpComparator</type>
  16144. <expected-output>moveFromLocal: `hdfs://\w+[-.a-z0-9]*:[0-9]+/user/USERNAME/wrongdir': No such file or directory</expected-output>
  16145. </comparator>
  16146. </comparators>
  16147. </test>
  16148. <test> <!--Tested -->
  16149. <description>Verifying chmod operation is not permitted in safemode</description>
  16150. <test-commands>
  16151. <command>-fs NAMENODE -mkdir /test </command>
  16152. <command>-fs NAMENODE -touchz /test/file1 </command>
  16153. <dfs-admin-command>-fs NAMENODE -safemode enter </dfs-admin-command>
  16154. <command>-fs NAMENODE -chmod 777 /test/file1 </command>
  16155. </test-commands>
  16156. <cleanup-commands>
  16157. <dfs-admin-command>-fs NAMENODE -safemode leave </dfs-admin-command>
  16158. <dfs-admin-command>-fs NAMENODE -rm -r /test </dfs-admin-command>
  16159. </cleanup-commands>
  16160. <comparators>
  16161. <comparator>
  16162. <type>SubstringComparator</type>
  16163. <expected-output>Cannot set permission for /test/file1. Name node is in safe mode.</expected-output>
  16164. </comparator>
  16165. </comparators>
  16166. </test>
  16167. <test> <!--Tested -->
  16168. <description>Verifying chown operation is not permitted in safemode</description>
  16169. <test-commands>
  16170. <command>-fs NAMENODE -mkdir /test </command>
  16171. <command>-fs NAMENODE -touchz /test/file1 </command>
  16172. <dfs-admin-command>-fs NAMENODE -safemode enter </dfs-admin-command>
  16173. <command>-fs NAMENODE -chown newgroup /test/file1 </command>
  16174. </test-commands>
  16175. <cleanup-commands>
  16176. <dfs-admin-command>-fs NAMENODE -safemode leave </dfs-admin-command>
  16177. <dfs-admin-command>-fs NAMENODE -rm -r /test </dfs-admin-command>
  16178. </cleanup-commands>
  16179. <comparators>
  16180. <comparator>
  16181. <type>SubstringComparator</type>
  16182. <expected-output>Cannot set owner for /test/file1. Name node is in safe mode.</expected-output>
  16183. </comparator>
  16184. </comparators>
  16185. </test>
  16186. <test> <!--Tested -->
  16187. <description>Verifying chgrp operation is not permitted in safemode</description>
  16188. <test-commands>
  16189. <command>-fs NAMENODE -mkdir /test </command>
  16190. <command>-fs NAMENODE -touchz /test/file1 </command>
  16191. <dfs-admin-command>-fs NAMENODE -safemode enter </dfs-admin-command>
  16192. <command>-fs NAMENODE -chgrp newgroup /test/file1 </command>
  16193. </test-commands>
  16194. <cleanup-commands>
  16195. <dfs-admin-command>-fs NAMENODE -safemode leave </dfs-admin-command>
  16196. <dfs-admin-command>-fs NAMENODE -rm -r /test </dfs-admin-command>
  16197. </cleanup-commands>
  16198. <comparators>
  16199. <comparator>
  16200. <type>SubstringComparator</type>
  16201. <expected-output>Cannot set owner for /test/file1. Name node is in safe mode.</expected-output>
  16202. </comparator>
  16203. </comparators>
  16204. </test>
  16205. <test> <!--Tested -->
  16206. <description>Verifying setQuota operation is not permitted in safemode</description>
  16207. <test-commands>
  16208. <command>-fs NAMENODE -mkdir /test </command>
  16209. <dfs-admin-command>-fs NAMENODE -safemode enter </dfs-admin-command>
  16210. <dfs-admin-command>-fs NAMENODE -setQuota 100 /test </dfs-admin-command>
  16211. </test-commands>
  16212. <cleanup-commands>
  16213. <dfs-admin-command>-fs NAMENODE -safemode leave </dfs-admin-command>
  16214. <dfs-admin-command>-fs NAMENODE -rm -r /test </dfs-admin-command>
  16215. </cleanup-commands>
  16216. <comparators>
  16217. <comparator>
  16218. <type>SubstringComparator</type>
  16219. <expected-output>setQuota: Cannot set quota on /test. Name node is in safe mode.</expected-output>
  16220. </comparator>
  16221. </comparators>
  16222. </test>
  16223. <test> <!--Tested -->
  16224. <description>Verifying clrQuota operation is not permitted in safemode</description>
  16225. <test-commands>
  16226. <command>-fs NAMENODE -mkdir /test </command>
  16227. <dfs-admin-command>-fs NAMENODE -safemode enter </dfs-admin-command>
  16228. <dfs-admin-command>-fs NAMENODE -clrQuota /test </dfs-admin-command>
  16229. </test-commands>
  16230. <cleanup-commands>
  16231. <dfs-admin-command>-fs NAMENODE -safemode leave </dfs-admin-command>
  16232. <dfs-admin-command>-fs NAMENODE -rm -r /test </dfs-admin-command>
  16233. </cleanup-commands>
  16234. <comparators>
  16235. <comparator>
  16236. <type>SubstringComparator</type>
  16237. <expected-output>clrQuota: Cannot set quota on /test. Name node is in safe mode.</expected-output>
  16238. </comparator>
  16239. </comparators>
  16240. </test>
  16241. <test> <!--Tested -->
  16242. <description>Verifying setSpaceQuota operation is not permitted in safemode</description>
  16243. <test-commands>
  16244. <command>-fs NAMENODE -mkdir /test </command>
  16245. <dfs-admin-command>-fs NAMENODE -safemode enter </dfs-admin-command>
  16246. <dfs-admin-command>-fs NAMENODE -setSpaceQuota 100 /test </dfs-admin-command>
  16247. </test-commands>
  16248. <cleanup-commands>
  16249. <dfs-admin-command>-fs NAMENODE -safemode leave </dfs-admin-command>
  16250. <dfs-admin-command>-fs NAMENODE -rm -r /test </dfs-admin-command>
  16251. </cleanup-commands>
  16252. <comparators>
  16253. <comparator>
  16254. <type>SubstringComparator</type>
  16255. <expected-output>setSpaceQuota: Cannot set quota on /test. Name node is in safe mode.</expected-output>
  16256. </comparator>
  16257. </comparators>
  16258. </test>
  16259. <test> <!--Tested -->
  16260. <description>Verifying clrSpaceQuota operation is not permitted in safemode</description>
  16261. <test-commands>
  16262. <command>-fs NAMENODE -mkdir /test </command>
  16263. <dfs-admin-command>-fs NAMENODE -safemode enter </dfs-admin-command>
  16264. <dfs-admin-command>-fs NAMENODE -clrSpaceQuota /test </dfs-admin-command>
  16265. </test-commands>
  16266. <cleanup-commands>
  16267. <dfs-admin-command>-fs NAMENODE -safemode leave </dfs-admin-command>
  16268. <dfs-admin-command>-fs NAMENODE -rm -r /test </dfs-admin-command>
  16269. </cleanup-commands>
  16270. <comparators>
  16271. <comparator>
  16272. <type>SubstringComparator</type>
  16273. <expected-output>clrSpaceQuota: Cannot set quota on /test. Name node is in safe mode.</expected-output>
  16274. </comparator>
  16275. </comparators>
  16276. </test>
  16277. <!-- Tests for find -->
  16278. <test> <!-- TESTED -->
  16279. <description>find: default expression</description>
  16280. <test-commands>
  16281. <command>-fs NAMENODE -mkdir /donotfind</command>
  16282. <command>-fs NAMENODE -mkdir donotfind</command>
  16283. <command>-fs NAMENODE -mkdir /findtest</command>
  16284. <command>-fs NAMENODE -mkdir /findtest/item1</command>
  16285. <command>-fs NAMENODE -mkdir /findtest/item1/item1a</command>
  16286. <command>-fs NAMENODE -touchz /findtest/item1/item1a/item1aa</command>
  16287. <command>-fs NAMENODE -put CLITEST_DATA/data60bytes /findtest/item1/item1b</command>
  16288. <command>-fs NAMENODE -put CLITEST_DATA/data60bytes /findtest/item2</command>
  16289. <command>-fs NAMENODE -mkdir /findtest/item3</command>
  16290. <command>-fs NAMENODE -mkdir /findtest/item4</command>
  16291. <command>-fs NAMENODE -mkdir /findtest/item4/item4a</command>
  16292. <command>-fs NAMENODE -put CLITEST_DATA/data120bytes /findtest/item4/item4b</command>
  16293. <command>-fs NAMENODE -put CLITEST_DATA/data1k /findtest/item5</command>
  16294. <command>-fs NAMENODE -find /findtest</command>
  16295. </test-commands>
  16296. <cleanup-commands>
  16297. <command>-fs NAMENODE -rm -r /donotfind</command>
  16298. <command>-fs NAMENODE -rm -r donotfind</command>
  16299. <command>-fs NAMENODE -rm -r /findtest</command>
  16300. </cleanup-commands>
  16301. <comparators>
  16302. <comparator>
  16303. <type>RegexpAcrossOutputComparator</type>
  16304. <expected-output>^/findtest
  16305. /findtest/item1
  16306. /findtest/item1/item1a
  16307. /findtest/item1/item1a/item1aa
  16308. /findtest/item1/item1b
  16309. /findtest/item2
  16310. /findtest/item3
  16311. /findtest/item4
  16312. /findtest/item4/item4a
  16313. /findtest/item4/item4b
  16314. /findtest/item5
  16315. $</expected-output>
  16316. </comparator>
  16317. </comparators>
  16318. </test>
  16319. <test> <!-- TESTED -->
  16320. <description>find: -print </description>
  16321. <test-commands>
  16322. <command>-fs NAMENODE -mkdir /donotfind</command>
  16323. <command>-fs NAMENODE -mkdir donotfind</command>
  16324. <command>-fs NAMENODE -mkdir /findtest</command>
  16325. <command>-fs NAMENODE -mkdir /findtest/item1</command>
  16326. <command>-fs NAMENODE -mkdir /findtest/item1/item1a</command>
  16327. <command>-fs NAMENODE -touchz /findtest/item1/item1a/item1aa</command>
  16328. <command>-fs NAMENODE -put CLITEST_DATA/data60bytes /findtest/item1/item1b</command>
  16329. <command>-fs NAMENODE -put CLITEST_DATA/data60bytes /findtest/item2</command>
  16330. <command>-fs NAMENODE -mkdir /findtest/item3</command>
  16331. <command>-fs NAMENODE -mkdir /findtest/item4</command>
  16332. <command>-fs NAMENODE -mkdir /findtest/item4/item4a</command>
  16333. <command>-fs NAMENODE -put CLITEST_DATA/data120bytes /findtest/item4/item4b</command>
  16334. <command>-fs NAMENODE -put CLITEST_DATA/data1k /findtest/item5</command>
  16335. <command>-fs NAMENODE -find /findtest -print</command>
  16336. </test-commands>
  16337. <cleanup-commands>
  16338. <command>-fs NAMENODE -rm -r /donotfind</command>
  16339. <command>-fs NAMENODE -rm -r donotfind</command>
  16340. <command>-fs NAMENODE -rm -r /findtest</command>
  16341. </cleanup-commands>
  16342. <comparators>
  16343. <comparator>
  16344. <type>RegexpAcrossOutputComparator</type>
  16345. <expected-output>^/findtest
  16346. /findtest/item1
  16347. /findtest/item1/item1a
  16348. /findtest/item1/item1a/item1aa
  16349. /findtest/item1/item1b
  16350. /findtest/item2
  16351. /findtest/item3
  16352. /findtest/item4
  16353. /findtest/item4/item4a
  16354. /findtest/item4/item4b
  16355. /findtest/item5
  16356. $</expected-output>
  16357. </comparator>
  16358. </comparators>
  16359. </test>
  16360. <test> <!-- TESTED -->
  16361. <description>find: -print (relative path) </description>
  16362. <test-commands>
  16363. <command>-fs NAMENODE -mkdir /donotfind</command>
  16364. <command>-fs NAMENODE -mkdir -p donotfind</command>
  16365. <command>-fs NAMENODE -mkdir -p findtest</command>
  16366. <command>-fs NAMENODE -mkdir -p findtest/item1</command>
  16367. <command>-fs NAMENODE -mkdir -p findtest/item1/item1a</command>
  16368. <command>-fs NAMENODE -touchz findtest/item1/item1a/item1aa</command>
  16369. <command>-fs NAMENODE -put CLITEST_DATA/data60bytes findtest/item1/item1b</command>
  16370. <command>-fs NAMENODE -put CLITEST_DATA/data60bytes findtest/item2</command>
  16371. <command>-fs NAMENODE -mkdir -p findtest/item3</command>
  16372. <command>-fs NAMENODE -mkdir -p findtest/item4</command>
  16373. <command>-fs NAMENODE -mkdir -p findtest/item4/item4a</command>
  16374. <command>-fs NAMENODE -put CLITEST_DATA/data120bytes findtest/item4/item4b</command>
  16375. <command>-fs NAMENODE -put CLITEST_DATA/data1k findtest/item5</command>
  16376. <command>-fs NAMENODE -find findtest -print</command>
  16377. </test-commands>
  16378. <cleanup-commands>
  16379. <command>-fs NAMENODE -rm -r /donotfind</command>
  16380. <command>-fs NAMENODE -rm -r donotfind</command>
  16381. <command>-fs NAMENODE -rm -r findtest</command>
  16382. </cleanup-commands>
  16383. <comparators>
  16384. <comparator>
  16385. <type>RegexpAcrossOutputComparator</type>
  16386. <expected-output>^findtest
  16387. findtest/item1
  16388. findtest/item1/item1a
  16389. findtest/item1/item1a/item1aa
  16390. findtest/item1/item1b
  16391. findtest/item2
  16392. findtest/item3
  16393. findtest/item4
  16394. findtest/item4/item4a
  16395. findtest/item4/item4b
  16396. findtest/item5
  16397. $</expected-output>
  16398. </comparator>
  16399. </comparators>
  16400. </test>
  16401. <test> <!-- TESTED -->
  16402. <description>find: -print (cwd) </description>
  16403. <test-commands>
  16404. <command>-fs NAMENODE -mkdir /donotfind</command>
  16405. <command>-fs NAMENODE -mkdir findtest</command>
  16406. <command>-fs NAMENODE -mkdir findtest/item1</command>
  16407. <command>-fs NAMENODE -mkdir findtest/item1/item1a</command>
  16408. <command>-fs NAMENODE -touchz findtest/item1/item1a/item1aa</command>
  16409. <command>-fs NAMENODE -put CLITEST_DATA/data60bytes findtest/item1/item1b</command>
  16410. <command>-fs NAMENODE -put CLITEST_DATA/data60bytes findtest/item2</command>
  16411. <command>-fs NAMENODE -mkdir findtest/item3</command>
  16412. <command>-fs NAMENODE -mkdir findtest/item4</command>
  16413. <command>-fs NAMENODE -mkdir findtest/item4/item4a</command>
  16414. <command>-fs NAMENODE -put CLITEST_DATA/data120bytes findtest/item4/item4b</command>
  16415. <command>-fs NAMENODE -put CLITEST_DATA/data1k findtest/item5</command>
  16416. <command>-fs NAMENODE -find -print</command>
  16417. </test-commands>
  16418. <cleanup-commands>
  16419. <command>-fs NAMENODE -rm -r findtest</command>
  16420. <command>-fs NAMENODE -rm -r /donotfind</command>
  16421. </cleanup-commands>
  16422. <comparators>
  16423. <comparator>
  16424. <type>RegexpAcrossOutputComparator</type>
  16425. <expected-output>^.
  16426. findtest
  16427. findtest/item1
  16428. findtest/item1/item1a
  16429. findtest/item1/item1a/item1aa
  16430. findtest/item1/item1b
  16431. findtest/item2
  16432. findtest/item3
  16433. findtest/item4
  16434. findtest/item4/item4a
  16435. findtest/item4/item4b
  16436. findtest/item5
  16437. $</expected-output>
  16438. </comparator>
  16439. </comparators>
  16440. </test>
  16441. <test> <!-- TESTED -->
  16442. <description>find: -name </description>
  16443. <test-commands>
  16444. <command>-fs NAMENODE -mkdir /findtest</command>
  16445. <command>-fs NAMENODE -mkdir /findtest/item1</command>
  16446. <command>-fs NAMENODE -mkdir /findtest/item1/item1a</command>
  16447. <command>-fs NAMENODE -touchz /findtest/item1/item1a/item1aa</command>
  16448. <command>-fs NAMENODE -put CLITEST_DATA/data60bytes /findtest/item1/item1b</command>
  16449. <command>-fs NAMENODE -put CLITEST_DATA/data60bytes /findtest/item2</command>
  16450. <command>-fs NAMENODE -mkdir /findtest/item3</command>
  16451. <command>-fs NAMENODE -mkdir /findtest/item4</command>
  16452. <command>-fs NAMENODE -mkdir /findtest/item4/item4a</command>
  16453. <command>-fs NAMENODE -put CLITEST_DATA/data120bytes /findtest/item4/item4b</command>
  16454. <command>-fs NAMENODE -put CLITEST_DATA/data1k /findtest/item5</command>
  16455. <command>-fs NAMENODE -find /findtest -name item*a</command>
  16456. </test-commands>
  16457. <cleanup-commands>
  16458. <command>-fs NAMENODE -rm -r /findtest</command>
  16459. </cleanup-commands>
  16460. <comparators>
  16461. <comparator>
  16462. <type>RegexpAcrossOutputComparator</type>
  16463. <expected-output>^/findtest/item1/item1a
  16464. /findtest/item1/item1a/item1aa
  16465. /findtest/item4/item4a
  16466. $</expected-output>
  16467. </comparator>
  16468. </comparators>
  16469. </test>
  16470. <test> <!-- TESTED -->
  16471. <description>find: -iname </description>
  16472. <test-commands>
  16473. <command>-fs NAMENODE -mkdir /findtest</command>
  16474. <command>-fs NAMENODE -mkdir /findtest/item1</command>
  16475. <command>-fs NAMENODE -mkdir /findtest/item1/item1a</command>
  16476. <command>-fs NAMENODE -touchz /findtest/item1/item1a/item1aa</command>
  16477. <command>-fs NAMENODE -put CLITEST_DATA/data60bytes /findtest/item1/item1b</command>
  16478. <command>-fs NAMENODE -put CLITEST_DATA/data60bytes /findtest/item2</command>
  16479. <command>-fs NAMENODE -mkdir /findtest/item3</command>
  16480. <command>-fs NAMENODE -mkdir /findtest/item4</command>
  16481. <command>-fs NAMENODE -mkdir /findtest/item4/item4a</command>
  16482. <command>-fs NAMENODE -put CLITEST_DATA/data120bytes /findtest/item4/item4b</command>
  16483. <command>-fs NAMENODE -put CLITEST_DATA/data1k /findtest/item5</command>
  16484. <command>-fs NAMENODE -find /findtest -iname ITEM*a</command>
  16485. </test-commands>
  16486. <cleanup-commands>
  16487. <command>-fs NAMENODE -rm -r /findtest</command>
  16488. </cleanup-commands>
  16489. <comparators>
  16490. <comparator>
  16491. <type>RegexpAcrossOutputComparator</type>
  16492. <expected-output>^/findtest/item1/item1a
  16493. /findtest/item1/item1a/item1aa
  16494. /findtest/item4/item4a
  16495. $</expected-output>
  16496. </comparator>
  16497. </comparators>
  16498. </test>
  16499. <test> <!-- TESTED -->
  16500. <description>truncate to 5 bytes after waiting for block recovery to complete</description>
  16501. <test-commands>
  16502. <command>-fs NAMENODE -mkdir -p /user/USERNAME/dir0</command>
  16503. <command>-fs NAMENODE -put CLITEST_DATA/data120bytes /user/USERNAME/dir0</command>
  16504. <command>-fs NAMENODE -truncate -w 5 /user/USERNAME/dir0/data120bytes</command>
  16505. <command>-fs NAMENODE -cat /user/USERNAME/dir0/data120bytes</command>
  16506. </test-commands>
  16507. <cleanup-commands>
  16508. <command>-fs NAMENODE -rm -r /user/USERNAME/dir0</command>
  16509. </cleanup-commands>
  16510. <comparators>
  16511. <comparator>
  16512. <type>RegexpComparator</type>
  16513. <expected-output>12345</expected-output>
  16514. </comparator>
  16515. </comparators>
  16516. </test>
  16517. <test> <!-- TESTED -->
  16518. <description>truncate to greater length than length of file</description>
  16519. <test-commands>
  16520. <command>-fs NAMENODE -mkdir /user/USERNAME/dir0</command>
  16521. <command>-fs NAMENODE -put CLITEST_DATA/data15bytes /user/USERNAME/dir0</command>
  16522. <command>-fs NAMENODE -truncate -w 50 /user/USERNAME/dir0/data15bytes</command>
  16523. <command>-fs NAMENODE -cat /user/USERNAME/dir0/data15bytes</command>
  16524. </test-commands>
  16525. <cleanup-commands>
  16526. <command>-fs NAMENODE -rm -r /user/USERNAME/dir0</command>
  16527. </cleanup-commands>
  16528. <comparators>
  16529. <comparator>
  16530. <type>RegexpComparator</type>
  16531. <expected-output>12345678901234</expected-output>
  16532. </comparator>
  16533. </comparators>
  16534. </test>
  16535. </tests>
  16536. </configuration>