testHDFSConf.xml 788 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547354835493550355135523553355435553556355735583559356035613562356335643565356635673568356935703571357235733574357535763577357835793580358135823583358435853586358735883589359035913592359335943595359635973598359936003601360236033604360536063607360836093610361136123613361436153616361736183619362036213622362336243625362636273628362936303631363236333634363536363637363836393640364136423643364436453646364736483649365036513652365336543655365636573658365936603661366236633664366536663667366836693670367136723673367436753676367736783679368036813682368336843685368636873688368936903691369236933694369536963697369836993700370137023703370437053706370737083709371037113712371337143715371637173718371937203721372237233724372537263727372837293730373137323733373437353736373737383739374037413742374337443745374637473748374937503751375237533754375537563757375837593760376137623763376437653766376737683769377037713772377337743775377637773778377937803781378237833784378537863787378837893790379137923793379437953796379737983799380038013802380338043805380638073808380938103811381238133814381538163817381838193820382138223823382438253826382738283829383038313832383338343835383638373838383938403841384238433844384538463847384838493850385138523853385438553856385738583859386038613862386338643865386638673868386938703871387238733874387538763877387838793880388138823883388438853886388738883889389038913892389338943895389638973898389939003901390239033904390539063907390839093910391139123913391439153916391739183919392039213922392339243925392639273928392939303931393239333934393539363937393839393940394139423943394439453946394739483949395039513952395339543955395639573958395939603961396239633964396539663967396839693970397139723973397439753976397739783979398039813982398339843985398639873988398939903991399239933994399539963997399839994000400140024003400440054006400740084009401040114012401340144015401640174018401940204021402240234024402540264027402840294030403140324033403440354036403740384039404040414042404340444045404640474048404940504051405240534054405540564057405840594060406140624063406440654066406740684069407040714072407340744075407640774078407940804081408240834084408540864087408840894090409140924093409440954096409740984099410041014102410341044105410641074108410941104111411241134114411541164117411841194120412141224123412441254126412741284129413041314132413341344135413641374138413941404141414241434144414541464147414841494150415141524153415441554156415741584159416041614162416341644165416641674168416941704171417241734174417541764177417841794180418141824183418441854186418741884189419041914192419341944195419641974198419942004201420242034204420542064207420842094210421142124213421442154216421742184219422042214222422342244225422642274228422942304231423242334234423542364237423842394240424142424243424442454246424742484249425042514252425342544255425642574258425942604261426242634264426542664267426842694270427142724273427442754276427742784279428042814282428342844285428642874288428942904291429242934294429542964297429842994300430143024303430443054306430743084309431043114312431343144315431643174318431943204321432243234324432543264327432843294330433143324333433443354336433743384339434043414342434343444345434643474348434943504351435243534354435543564357435843594360436143624363436443654366436743684369437043714372437343744375437643774378437943804381438243834384438543864387438843894390439143924393439443954396439743984399440044014402440344044405440644074408440944104411441244134414441544164417441844194420442144224423442444254426442744284429443044314432443344344435443644374438443944404441444244434444444544464447444844494450445144524453445444554456445744584459446044614462446344644465446644674468446944704471447244734474447544764477447844794480448144824483448444854486448744884489449044914492449344944495449644974498449945004501450245034504450545064507450845094510451145124513451445154516451745184519452045214522452345244525452645274528452945304531453245334534453545364537453845394540454145424543454445454546454745484549455045514552455345544555455645574558455945604561456245634564456545664567456845694570457145724573457445754576457745784579458045814582458345844585458645874588458945904591459245934594459545964597459845994600460146024603460446054606460746084609461046114612461346144615461646174618461946204621462246234624462546264627462846294630463146324633463446354636463746384639464046414642464346444645464646474648464946504651465246534654465546564657465846594660466146624663466446654666466746684669467046714672467346744675467646774678467946804681468246834684468546864687468846894690469146924693469446954696469746984699470047014702470347044705470647074708470947104711471247134714471547164717471847194720472147224723472447254726472747284729473047314732473347344735473647374738473947404741474247434744474547464747474847494750475147524753475447554756475747584759476047614762476347644765476647674768476947704771477247734774477547764777477847794780478147824783478447854786478747884789479047914792479347944795479647974798479948004801480248034804480548064807480848094810481148124813481448154816481748184819482048214822482348244825482648274828482948304831483248334834483548364837483848394840484148424843484448454846484748484849485048514852485348544855485648574858485948604861486248634864486548664867486848694870487148724873487448754876487748784879488048814882488348844885488648874888488948904891489248934894489548964897489848994900490149024903490449054906490749084909491049114912491349144915491649174918491949204921492249234924492549264927492849294930493149324933493449354936493749384939494049414942494349444945494649474948494949504951495249534954495549564957495849594960496149624963496449654966496749684969497049714972497349744975497649774978497949804981498249834984498549864987498849894990499149924993499449954996499749984999500050015002500350045005500650075008500950105011501250135014501550165017501850195020502150225023502450255026502750285029503050315032503350345035503650375038503950405041504250435044504550465047504850495050505150525053505450555056505750585059506050615062506350645065506650675068506950705071507250735074507550765077507850795080508150825083508450855086508750885089509050915092509350945095509650975098509951005101510251035104510551065107510851095110511151125113511451155116511751185119512051215122512351245125512651275128512951305131513251335134513551365137513851395140514151425143514451455146514751485149515051515152515351545155515651575158515951605161516251635164516551665167516851695170517151725173517451755176517751785179518051815182518351845185518651875188518951905191519251935194519551965197519851995200520152025203520452055206520752085209521052115212521352145215521652175218521952205221522252235224522552265227522852295230523152325233523452355236523752385239524052415242524352445245524652475248524952505251525252535254525552565257525852595260526152625263526452655266526752685269527052715272527352745275527652775278527952805281528252835284528552865287528852895290529152925293529452955296529752985299530053015302530353045305530653075308530953105311531253135314531553165317531853195320532153225323532453255326532753285329533053315332533353345335533653375338533953405341534253435344534553465347534853495350535153525353535453555356535753585359536053615362536353645365536653675368536953705371537253735374537553765377537853795380538153825383538453855386538753885389539053915392539353945395539653975398539954005401540254035404540554065407540854095410541154125413541454155416541754185419542054215422542354245425542654275428542954305431543254335434543554365437543854395440544154425443544454455446544754485449545054515452545354545455545654575458545954605461546254635464546554665467546854695470547154725473547454755476547754785479548054815482548354845485548654875488548954905491549254935494549554965497549854995500550155025503550455055506550755085509551055115512551355145515551655175518551955205521552255235524552555265527552855295530553155325533553455355536553755385539554055415542554355445545554655475548554955505551555255535554555555565557555855595560556155625563556455655566556755685569557055715572557355745575557655775578557955805581558255835584558555865587558855895590559155925593559455955596559755985599560056015602560356045605560656075608560956105611561256135614561556165617561856195620562156225623562456255626562756285629563056315632563356345635563656375638563956405641564256435644564556465647564856495650565156525653565456555656565756585659566056615662566356645665566656675668566956705671567256735674567556765677567856795680568156825683568456855686568756885689569056915692569356945695569656975698569957005701570257035704570557065707570857095710571157125713571457155716571757185719572057215722572357245725572657275728572957305731573257335734573557365737573857395740574157425743574457455746574757485749575057515752575357545755575657575758575957605761576257635764576557665767576857695770577157725773577457755776577757785779578057815782578357845785578657875788578957905791579257935794579557965797579857995800580158025803580458055806580758085809581058115812581358145815581658175818581958205821582258235824582558265827582858295830583158325833583458355836583758385839584058415842584358445845584658475848584958505851585258535854585558565857585858595860586158625863586458655866586758685869587058715872587358745875587658775878587958805881588258835884588558865887588858895890589158925893589458955896589758985899590059015902590359045905590659075908590959105911591259135914591559165917591859195920592159225923592459255926592759285929593059315932593359345935593659375938593959405941594259435944594559465947594859495950595159525953595459555956595759585959596059615962596359645965596659675968596959705971597259735974597559765977597859795980598159825983598459855986598759885989599059915992599359945995599659975998599960006001600260036004600560066007600860096010601160126013601460156016601760186019602060216022602360246025602660276028602960306031603260336034603560366037603860396040604160426043604460456046604760486049605060516052605360546055605660576058605960606061606260636064606560666067606860696070607160726073607460756076607760786079608060816082608360846085608660876088608960906091609260936094609560966097609860996100610161026103610461056106610761086109611061116112611361146115611661176118611961206121612261236124612561266127612861296130613161326133613461356136613761386139614061416142614361446145614661476148614961506151615261536154615561566157615861596160616161626163616461656166616761686169617061716172617361746175617661776178617961806181618261836184618561866187618861896190619161926193619461956196619761986199620062016202620362046205620662076208620962106211621262136214621562166217621862196220622162226223622462256226622762286229623062316232623362346235623662376238623962406241624262436244624562466247624862496250625162526253625462556256625762586259626062616262626362646265626662676268626962706271627262736274627562766277627862796280628162826283628462856286628762886289629062916292629362946295629662976298629963006301630263036304630563066307630863096310631163126313631463156316631763186319632063216322632363246325632663276328632963306331633263336334633563366337633863396340634163426343634463456346634763486349635063516352635363546355635663576358635963606361636263636364636563666367636863696370637163726373637463756376637763786379638063816382638363846385638663876388638963906391639263936394639563966397639863996400640164026403640464056406640764086409641064116412641364146415641664176418641964206421642264236424642564266427642864296430643164326433643464356436643764386439644064416442644364446445644664476448644964506451645264536454645564566457645864596460646164626463646464656466646764686469647064716472647364746475647664776478647964806481648264836484648564866487648864896490649164926493649464956496649764986499650065016502650365046505650665076508650965106511651265136514651565166517651865196520652165226523652465256526652765286529653065316532653365346535653665376538653965406541654265436544654565466547654865496550655165526553655465556556655765586559656065616562656365646565656665676568656965706571657265736574657565766577657865796580658165826583658465856586658765886589659065916592659365946595659665976598659966006601660266036604660566066607660866096610661166126613661466156616661766186619662066216622662366246625662666276628662966306631663266336634663566366637663866396640664166426643664466456646664766486649665066516652665366546655665666576658665966606661666266636664666566666667666866696670667166726673667466756676667766786679668066816682668366846685668666876688668966906691669266936694669566966697669866996700670167026703670467056706670767086709671067116712671367146715671667176718671967206721672267236724672567266727672867296730673167326733673467356736673767386739674067416742674367446745674667476748674967506751675267536754675567566757675867596760676167626763676467656766676767686769677067716772677367746775677667776778677967806781678267836784678567866787678867896790679167926793679467956796679767986799680068016802680368046805680668076808680968106811681268136814681568166817681868196820682168226823682468256826682768286829683068316832683368346835683668376838683968406841684268436844684568466847684868496850685168526853685468556856685768586859686068616862686368646865686668676868686968706871687268736874687568766877687868796880688168826883688468856886688768886889689068916892689368946895689668976898689969006901690269036904690569066907690869096910691169126913691469156916691769186919692069216922692369246925692669276928692969306931693269336934693569366937693869396940694169426943694469456946694769486949695069516952695369546955695669576958695969606961696269636964696569666967696869696970697169726973697469756976697769786979698069816982698369846985698669876988698969906991699269936994699569966997699869997000700170027003700470057006700770087009701070117012701370147015701670177018701970207021702270237024702570267027702870297030703170327033703470357036703770387039704070417042704370447045704670477048704970507051705270537054705570567057705870597060706170627063706470657066706770687069707070717072707370747075707670777078707970807081708270837084708570867087708870897090709170927093709470957096709770987099710071017102710371047105710671077108710971107111711271137114711571167117711871197120712171227123712471257126712771287129713071317132713371347135713671377138713971407141714271437144714571467147714871497150715171527153715471557156715771587159716071617162716371647165716671677168716971707171717271737174717571767177717871797180718171827183718471857186718771887189719071917192719371947195719671977198719972007201720272037204720572067207720872097210721172127213721472157216721772187219722072217222722372247225722672277228722972307231723272337234723572367237723872397240724172427243724472457246724772487249725072517252725372547255725672577258725972607261726272637264726572667267726872697270727172727273727472757276727772787279728072817282728372847285728672877288728972907291729272937294729572967297729872997300730173027303730473057306730773087309731073117312731373147315731673177318731973207321732273237324732573267327732873297330733173327333733473357336733773387339734073417342734373447345734673477348734973507351735273537354735573567357735873597360736173627363736473657366736773687369737073717372737373747375737673777378737973807381738273837384738573867387738873897390739173927393739473957396739773987399740074017402740374047405740674077408740974107411741274137414741574167417741874197420742174227423742474257426742774287429743074317432743374347435743674377438743974407441744274437444744574467447744874497450745174527453745474557456745774587459746074617462746374647465746674677468746974707471747274737474747574767477747874797480748174827483748474857486748774887489749074917492749374947495749674977498749975007501750275037504750575067507750875097510751175127513751475157516751775187519752075217522752375247525752675277528752975307531753275337534753575367537753875397540754175427543754475457546754775487549755075517552755375547555755675577558755975607561756275637564756575667567756875697570757175727573757475757576757775787579758075817582758375847585758675877588758975907591759275937594759575967597759875997600760176027603760476057606760776087609761076117612761376147615761676177618761976207621762276237624762576267627762876297630763176327633763476357636763776387639764076417642764376447645764676477648764976507651765276537654765576567657765876597660766176627663766476657666766776687669767076717672767376747675767676777678767976807681768276837684768576867687768876897690769176927693769476957696769776987699770077017702770377047705770677077708770977107711771277137714771577167717771877197720772177227723772477257726772777287729773077317732773377347735773677377738773977407741774277437744774577467747774877497750775177527753775477557756775777587759776077617762776377647765776677677768776977707771777277737774777577767777777877797780778177827783778477857786778777887789779077917792779377947795779677977798779978007801780278037804780578067807780878097810781178127813781478157816781778187819782078217822782378247825782678277828782978307831783278337834783578367837783878397840784178427843784478457846784778487849785078517852785378547855785678577858785978607861786278637864786578667867786878697870787178727873787478757876787778787879788078817882788378847885788678877888788978907891789278937894789578967897789878997900790179027903790479057906790779087909791079117912791379147915791679177918791979207921792279237924792579267927792879297930793179327933793479357936793779387939794079417942794379447945794679477948794979507951795279537954795579567957795879597960796179627963796479657966796779687969797079717972797379747975797679777978797979807981798279837984798579867987798879897990799179927993799479957996799779987999800080018002800380048005800680078008800980108011801280138014801580168017801880198020802180228023802480258026802780288029803080318032803380348035803680378038803980408041804280438044804580468047804880498050805180528053805480558056805780588059806080618062806380648065806680678068806980708071807280738074807580768077807880798080808180828083808480858086808780888089809080918092809380948095809680978098809981008101810281038104810581068107810881098110811181128113811481158116811781188119812081218122812381248125812681278128812981308131813281338134813581368137813881398140814181428143814481458146814781488149815081518152815381548155815681578158815981608161816281638164816581668167816881698170817181728173817481758176817781788179818081818182818381848185818681878188818981908191819281938194819581968197819881998200820182028203820482058206820782088209821082118212821382148215821682178218821982208221822282238224822582268227822882298230823182328233823482358236823782388239824082418242824382448245824682478248824982508251825282538254825582568257825882598260826182628263826482658266826782688269827082718272827382748275827682778278827982808281828282838284828582868287828882898290829182928293829482958296829782988299830083018302830383048305830683078308830983108311831283138314831583168317831883198320832183228323832483258326832783288329833083318332833383348335833683378338833983408341834283438344834583468347834883498350835183528353835483558356835783588359836083618362836383648365836683678368836983708371837283738374837583768377837883798380838183828383838483858386838783888389839083918392839383948395839683978398839984008401840284038404840584068407840884098410841184128413841484158416841784188419842084218422842384248425842684278428842984308431843284338434843584368437843884398440844184428443844484458446844784488449845084518452845384548455845684578458845984608461846284638464846584668467846884698470847184728473847484758476847784788479848084818482848384848485848684878488848984908491849284938494849584968497849884998500850185028503850485058506850785088509851085118512851385148515851685178518851985208521852285238524852585268527852885298530853185328533853485358536853785388539854085418542854385448545854685478548854985508551855285538554855585568557855885598560856185628563856485658566856785688569857085718572857385748575857685778578857985808581858285838584858585868587858885898590859185928593859485958596859785988599860086018602860386048605860686078608860986108611861286138614861586168617861886198620862186228623862486258626862786288629863086318632863386348635863686378638863986408641864286438644864586468647864886498650865186528653865486558656865786588659866086618662866386648665866686678668866986708671867286738674867586768677867886798680868186828683868486858686868786888689869086918692869386948695869686978698869987008701870287038704870587068707870887098710871187128713871487158716871787188719872087218722872387248725872687278728872987308731873287338734873587368737873887398740874187428743874487458746874787488749875087518752875387548755875687578758875987608761876287638764876587668767876887698770877187728773877487758776877787788779878087818782878387848785878687878788878987908791879287938794879587968797879887998800880188028803880488058806880788088809881088118812881388148815881688178818881988208821882288238824882588268827882888298830883188328833883488358836883788388839884088418842884388448845884688478848884988508851885288538854885588568857885888598860886188628863886488658866886788688869887088718872887388748875887688778878887988808881888288838884888588868887888888898890889188928893889488958896889788988899890089018902890389048905890689078908890989108911891289138914891589168917891889198920892189228923892489258926892789288929893089318932893389348935893689378938893989408941894289438944894589468947894889498950895189528953895489558956895789588959896089618962896389648965896689678968896989708971897289738974897589768977897889798980898189828983898489858986898789888989899089918992899389948995899689978998899990009001900290039004900590069007900890099010901190129013901490159016901790189019902090219022902390249025902690279028902990309031903290339034903590369037903890399040904190429043904490459046904790489049905090519052905390549055905690579058905990609061906290639064906590669067906890699070907190729073907490759076907790789079908090819082908390849085908690879088908990909091909290939094909590969097909890999100910191029103910491059106910791089109911091119112911391149115911691179118911991209121912291239124912591269127912891299130913191329133913491359136913791389139914091419142914391449145914691479148914991509151915291539154915591569157915891599160916191629163916491659166916791689169917091719172917391749175917691779178917991809181918291839184918591869187918891899190919191929193919491959196919791989199920092019202920392049205920692079208920992109211921292139214921592169217921892199220922192229223922492259226922792289229923092319232923392349235923692379238923992409241924292439244924592469247924892499250925192529253925492559256925792589259926092619262926392649265926692679268926992709271927292739274927592769277927892799280928192829283928492859286928792889289929092919292929392949295929692979298929993009301930293039304930593069307930893099310931193129313931493159316931793189319932093219322932393249325932693279328932993309331933293339334933593369337933893399340934193429343934493459346934793489349935093519352935393549355935693579358935993609361936293639364936593669367936893699370937193729373937493759376937793789379938093819382938393849385938693879388938993909391939293939394939593969397939893999400940194029403940494059406940794089409941094119412941394149415941694179418941994209421942294239424942594269427942894299430943194329433943494359436943794389439944094419442944394449445944694479448944994509451945294539454945594569457945894599460946194629463946494659466946794689469947094719472947394749475947694779478947994809481948294839484948594869487948894899490949194929493949494959496949794989499950095019502950395049505950695079508950995109511951295139514951595169517951895199520952195229523952495259526952795289529953095319532953395349535953695379538953995409541954295439544954595469547954895499550955195529553955495559556955795589559956095619562956395649565956695679568956995709571957295739574957595769577957895799580958195829583958495859586958795889589959095919592959395949595959695979598959996009601960296039604960596069607960896099610961196129613961496159616961796189619962096219622962396249625962696279628962996309631963296339634963596369637963896399640964196429643964496459646964796489649965096519652965396549655965696579658965996609661966296639664966596669667966896699670967196729673967496759676967796789679968096819682968396849685968696879688968996909691969296939694969596969697969896999700970197029703970497059706970797089709971097119712971397149715971697179718971997209721972297239724972597269727972897299730973197329733973497359736973797389739974097419742974397449745974697479748974997509751975297539754975597569757975897599760976197629763976497659766976797689769977097719772977397749775977697779778977997809781978297839784978597869787978897899790979197929793979497959796979797989799980098019802980398049805980698079808980998109811981298139814981598169817981898199820982198229823982498259826982798289829983098319832983398349835983698379838983998409841984298439844984598469847984898499850985198529853985498559856985798589859986098619862986398649865986698679868986998709871987298739874987598769877987898799880988198829883988498859886988798889889989098919892989398949895989698979898989999009901990299039904990599069907990899099910991199129913991499159916991799189919992099219922992399249925992699279928992999309931993299339934993599369937993899399940994199429943994499459946994799489949995099519952995399549955995699579958995999609961996299639964996599669967996899699970997199729973997499759976997799789979998099819982998399849985998699879988998999909991999299939994999599969997999899991000010001100021000310004100051000610007100081000910010100111001210013100141001510016100171001810019100201002110022100231002410025100261002710028100291003010031100321003310034100351003610037100381003910040100411004210043100441004510046100471004810049100501005110052100531005410055100561005710058100591006010061100621006310064100651006610067100681006910070100711007210073100741007510076100771007810079100801008110082100831008410085100861008710088100891009010091100921009310094100951009610097100981009910100101011010210103101041010510106101071010810109101101011110112101131011410115101161011710118101191012010121101221012310124101251012610127101281012910130101311013210133101341013510136101371013810139101401014110142101431014410145101461014710148101491015010151101521015310154101551015610157101581015910160101611016210163101641016510166101671016810169101701017110172101731017410175101761017710178101791018010181101821018310184101851018610187101881018910190101911019210193101941019510196101971019810199102001020110202102031020410205102061020710208102091021010211102121021310214102151021610217102181021910220102211022210223102241022510226102271022810229102301023110232102331023410235102361023710238102391024010241102421024310244102451024610247102481024910250102511025210253102541025510256102571025810259102601026110262102631026410265102661026710268102691027010271102721027310274102751027610277102781027910280102811028210283102841028510286102871028810289102901029110292102931029410295102961029710298102991030010301103021030310304103051030610307103081030910310103111031210313103141031510316103171031810319103201032110322103231032410325103261032710328103291033010331103321033310334103351033610337103381033910340103411034210343103441034510346103471034810349103501035110352103531035410355103561035710358103591036010361103621036310364103651036610367103681036910370103711037210373103741037510376103771037810379103801038110382103831038410385103861038710388103891039010391103921039310394103951039610397103981039910400104011040210403104041040510406104071040810409104101041110412104131041410415104161041710418104191042010421104221042310424104251042610427104281042910430104311043210433104341043510436104371043810439104401044110442104431044410445104461044710448104491045010451104521045310454104551045610457104581045910460104611046210463104641046510466104671046810469104701047110472104731047410475104761047710478104791048010481104821048310484104851048610487104881048910490104911049210493104941049510496104971049810499105001050110502105031050410505105061050710508105091051010511105121051310514105151051610517105181051910520105211052210523105241052510526105271052810529105301053110532105331053410535105361053710538105391054010541105421054310544105451054610547105481054910550105511055210553105541055510556105571055810559105601056110562105631056410565105661056710568105691057010571105721057310574105751057610577105781057910580105811058210583105841058510586105871058810589105901059110592105931059410595105961059710598105991060010601106021060310604106051060610607106081060910610106111061210613106141061510616106171061810619106201062110622106231062410625106261062710628106291063010631106321063310634106351063610637106381063910640106411064210643106441064510646106471064810649106501065110652106531065410655106561065710658106591066010661106621066310664106651066610667106681066910670106711067210673106741067510676106771067810679106801068110682106831068410685106861068710688106891069010691106921069310694106951069610697106981069910700107011070210703107041070510706107071070810709107101071110712107131071410715107161071710718107191072010721107221072310724107251072610727107281072910730107311073210733107341073510736107371073810739107401074110742107431074410745107461074710748107491075010751107521075310754107551075610757107581075910760107611076210763107641076510766107671076810769107701077110772107731077410775107761077710778107791078010781107821078310784107851078610787107881078910790107911079210793107941079510796107971079810799108001080110802108031080410805108061080710808108091081010811108121081310814108151081610817108181081910820108211082210823108241082510826108271082810829108301083110832108331083410835108361083710838108391084010841108421084310844108451084610847108481084910850108511085210853108541085510856108571085810859108601086110862108631086410865108661086710868108691087010871108721087310874108751087610877108781087910880108811088210883108841088510886108871088810889108901089110892108931089410895108961089710898108991090010901109021090310904109051090610907109081090910910109111091210913109141091510916109171091810919109201092110922109231092410925109261092710928109291093010931109321093310934109351093610937109381093910940109411094210943109441094510946109471094810949109501095110952109531095410955109561095710958109591096010961109621096310964109651096610967109681096910970109711097210973109741097510976109771097810979109801098110982109831098410985109861098710988109891099010991109921099310994109951099610997109981099911000110011100211003110041100511006110071100811009110101101111012110131101411015110161101711018110191102011021110221102311024110251102611027110281102911030110311103211033110341103511036110371103811039110401104111042110431104411045110461104711048110491105011051110521105311054110551105611057110581105911060110611106211063110641106511066110671106811069110701107111072110731107411075110761107711078110791108011081110821108311084110851108611087110881108911090110911109211093110941109511096110971109811099111001110111102111031110411105111061110711108111091111011111111121111311114111151111611117111181111911120111211112211123111241112511126111271112811129111301113111132111331113411135111361113711138111391114011141111421114311144111451114611147111481114911150111511115211153111541115511156111571115811159111601116111162111631116411165111661116711168111691117011171111721117311174111751117611177111781117911180111811118211183111841118511186111871118811189111901119111192111931119411195111961119711198111991120011201112021120311204112051120611207112081120911210112111121211213112141121511216112171121811219112201122111222112231122411225112261122711228112291123011231112321123311234112351123611237112381123911240112411124211243112441124511246112471124811249112501125111252112531125411255112561125711258112591126011261112621126311264112651126611267112681126911270112711127211273112741127511276112771127811279112801128111282112831128411285112861128711288112891129011291112921129311294112951129611297112981129911300113011130211303113041130511306113071130811309113101131111312113131131411315113161131711318113191132011321113221132311324113251132611327113281132911330113311133211333113341133511336113371133811339113401134111342113431134411345113461134711348113491135011351113521135311354113551135611357113581135911360113611136211363113641136511366113671136811369113701137111372113731137411375113761137711378113791138011381113821138311384113851138611387113881138911390113911139211393113941139511396113971139811399114001140111402114031140411405114061140711408114091141011411114121141311414114151141611417114181141911420114211142211423114241142511426114271142811429114301143111432114331143411435114361143711438114391144011441114421144311444114451144611447114481144911450114511145211453114541145511456114571145811459114601146111462114631146411465114661146711468114691147011471114721147311474114751147611477114781147911480114811148211483114841148511486114871148811489114901149111492114931149411495114961149711498114991150011501115021150311504115051150611507115081150911510115111151211513115141151511516115171151811519115201152111522115231152411525115261152711528115291153011531115321153311534115351153611537115381153911540115411154211543115441154511546115471154811549115501155111552115531155411555115561155711558115591156011561115621156311564115651156611567115681156911570115711157211573115741157511576115771157811579115801158111582115831158411585115861158711588115891159011591115921159311594115951159611597115981159911600116011160211603116041160511606116071160811609116101161111612116131161411615116161161711618116191162011621116221162311624116251162611627116281162911630116311163211633116341163511636116371163811639116401164111642116431164411645116461164711648116491165011651116521165311654116551165611657116581165911660116611166211663116641166511666116671166811669116701167111672116731167411675116761167711678116791168011681116821168311684116851168611687116881168911690116911169211693116941169511696116971169811699117001170111702117031170411705117061170711708117091171011711117121171311714117151171611717117181171911720117211172211723117241172511726117271172811729117301173111732117331173411735117361173711738117391174011741117421174311744117451174611747117481174911750117511175211753117541175511756117571175811759117601176111762117631176411765117661176711768117691177011771117721177311774117751177611777117781177911780117811178211783117841178511786117871178811789117901179111792117931179411795117961179711798117991180011801118021180311804118051180611807118081180911810118111181211813118141181511816118171181811819118201182111822118231182411825118261182711828118291183011831118321183311834118351183611837118381183911840118411184211843118441184511846118471184811849118501185111852118531185411855118561185711858118591186011861118621186311864118651186611867118681186911870118711187211873118741187511876118771187811879118801188111882118831188411885118861188711888118891189011891118921189311894118951189611897118981189911900119011190211903119041190511906119071190811909119101191111912119131191411915119161191711918119191192011921119221192311924119251192611927119281192911930119311193211933119341193511936119371193811939119401194111942119431194411945119461194711948119491195011951119521195311954119551195611957119581195911960119611196211963119641196511966119671196811969119701197111972119731197411975119761197711978119791198011981119821198311984119851198611987119881198911990119911199211993119941199511996119971199811999120001200112002120031200412005120061200712008120091201012011120121201312014120151201612017120181201912020120211202212023120241202512026120271202812029120301203112032120331203412035120361203712038120391204012041120421204312044120451204612047120481204912050120511205212053120541205512056120571205812059120601206112062120631206412065120661206712068120691207012071120721207312074120751207612077120781207912080120811208212083120841208512086120871208812089120901209112092120931209412095120961209712098120991210012101121021210312104121051210612107121081210912110121111211212113121141211512116121171211812119121201212112122121231212412125121261212712128121291213012131121321213312134121351213612137121381213912140121411214212143121441214512146121471214812149121501215112152121531215412155121561215712158121591216012161121621216312164121651216612167121681216912170121711217212173121741217512176121771217812179121801218112182121831218412185121861218712188121891219012191121921219312194121951219612197121981219912200122011220212203122041220512206122071220812209122101221112212122131221412215122161221712218122191222012221122221222312224122251222612227122281222912230122311223212233122341223512236122371223812239122401224112242122431224412245122461224712248122491225012251122521225312254122551225612257122581225912260122611226212263122641226512266122671226812269122701227112272122731227412275122761227712278122791228012281122821228312284122851228612287122881228912290122911229212293122941229512296122971229812299123001230112302123031230412305123061230712308123091231012311123121231312314123151231612317123181231912320123211232212323123241232512326123271232812329123301233112332123331233412335123361233712338123391234012341123421234312344123451234612347123481234912350123511235212353123541235512356123571235812359123601236112362123631236412365123661236712368123691237012371123721237312374123751237612377123781237912380123811238212383123841238512386123871238812389123901239112392123931239412395123961239712398123991240012401124021240312404124051240612407124081240912410124111241212413124141241512416124171241812419124201242112422124231242412425124261242712428124291243012431124321243312434124351243612437124381243912440124411244212443124441244512446124471244812449124501245112452124531245412455124561245712458124591246012461124621246312464124651246612467124681246912470124711247212473124741247512476124771247812479124801248112482124831248412485124861248712488124891249012491124921249312494124951249612497124981249912500125011250212503125041250512506125071250812509125101251112512125131251412515125161251712518125191252012521125221252312524125251252612527125281252912530125311253212533125341253512536125371253812539125401254112542125431254412545125461254712548125491255012551125521255312554125551255612557125581255912560125611256212563125641256512566125671256812569125701257112572125731257412575125761257712578125791258012581125821258312584125851258612587125881258912590125911259212593125941259512596125971259812599126001260112602126031260412605126061260712608126091261012611126121261312614126151261612617126181261912620126211262212623126241262512626126271262812629126301263112632126331263412635126361263712638126391264012641126421264312644126451264612647126481264912650126511265212653126541265512656126571265812659126601266112662126631266412665126661266712668126691267012671126721267312674126751267612677126781267912680126811268212683126841268512686126871268812689126901269112692126931269412695126961269712698126991270012701127021270312704127051270612707127081270912710127111271212713127141271512716127171271812719127201272112722127231272412725127261272712728127291273012731127321273312734127351273612737127381273912740127411274212743127441274512746127471274812749127501275112752127531275412755127561275712758127591276012761127621276312764127651276612767127681276912770127711277212773127741277512776127771277812779127801278112782127831278412785127861278712788127891279012791127921279312794127951279612797127981279912800128011280212803128041280512806128071280812809128101281112812128131281412815128161281712818128191282012821128221282312824128251282612827128281282912830128311283212833128341283512836128371283812839128401284112842128431284412845128461284712848128491285012851128521285312854128551285612857128581285912860128611286212863128641286512866128671286812869128701287112872128731287412875128761287712878128791288012881128821288312884128851288612887128881288912890128911289212893128941289512896128971289812899129001290112902129031290412905129061290712908129091291012911129121291312914129151291612917129181291912920129211292212923129241292512926129271292812929129301293112932129331293412935129361293712938129391294012941129421294312944129451294612947129481294912950129511295212953129541295512956129571295812959129601296112962129631296412965129661296712968129691297012971129721297312974129751297612977129781297912980129811298212983129841298512986129871298812989129901299112992129931299412995129961299712998129991300013001130021300313004130051300613007130081300913010130111301213013130141301513016130171301813019130201302113022130231302413025130261302713028130291303013031130321303313034130351303613037130381303913040130411304213043130441304513046130471304813049130501305113052130531305413055130561305713058130591306013061130621306313064130651306613067130681306913070130711307213073130741307513076130771307813079130801308113082130831308413085130861308713088130891309013091130921309313094130951309613097130981309913100131011310213103131041310513106131071310813109131101311113112131131311413115131161311713118131191312013121131221312313124131251312613127131281312913130131311313213133131341313513136131371313813139131401314113142131431314413145131461314713148131491315013151131521315313154131551315613157131581315913160131611316213163131641316513166131671316813169131701317113172131731317413175131761317713178131791318013181131821318313184131851318613187131881318913190131911319213193131941319513196131971319813199132001320113202132031320413205132061320713208132091321013211132121321313214132151321613217132181321913220132211322213223132241322513226132271322813229132301323113232132331323413235132361323713238132391324013241132421324313244132451324613247132481324913250132511325213253132541325513256132571325813259132601326113262132631326413265132661326713268132691327013271132721327313274132751327613277132781327913280132811328213283132841328513286132871328813289132901329113292132931329413295132961329713298132991330013301133021330313304133051330613307133081330913310133111331213313133141331513316133171331813319133201332113322133231332413325133261332713328133291333013331133321333313334133351333613337133381333913340133411334213343133441334513346133471334813349133501335113352133531335413355133561335713358133591336013361133621336313364133651336613367133681336913370133711337213373133741337513376133771337813379133801338113382133831338413385133861338713388133891339013391133921339313394133951339613397133981339913400134011340213403134041340513406134071340813409134101341113412134131341413415134161341713418134191342013421134221342313424134251342613427134281342913430134311343213433134341343513436134371343813439134401344113442134431344413445134461344713448134491345013451134521345313454134551345613457134581345913460134611346213463134641346513466134671346813469134701347113472134731347413475134761347713478134791348013481134821348313484134851348613487134881348913490134911349213493134941349513496134971349813499135001350113502135031350413505135061350713508135091351013511135121351313514135151351613517135181351913520135211352213523135241352513526135271352813529135301353113532135331353413535135361353713538135391354013541135421354313544135451354613547135481354913550135511355213553135541355513556135571355813559135601356113562135631356413565135661356713568135691357013571135721357313574135751357613577135781357913580135811358213583135841358513586135871358813589135901359113592135931359413595135961359713598135991360013601136021360313604136051360613607136081360913610136111361213613136141361513616136171361813619136201362113622136231362413625136261362713628136291363013631136321363313634136351363613637136381363913640136411364213643136441364513646136471364813649136501365113652136531365413655136561365713658136591366013661136621366313664136651366613667136681366913670136711367213673136741367513676136771367813679136801368113682136831368413685136861368713688136891369013691136921369313694136951369613697136981369913700137011370213703137041370513706137071370813709137101371113712137131371413715137161371713718137191372013721137221372313724137251372613727137281372913730137311373213733137341373513736137371373813739137401374113742137431374413745137461374713748137491375013751137521375313754137551375613757137581375913760137611376213763137641376513766137671376813769137701377113772137731377413775137761377713778137791378013781137821378313784137851378613787137881378913790137911379213793137941379513796137971379813799138001380113802138031380413805138061380713808138091381013811138121381313814138151381613817138181381913820138211382213823138241382513826138271382813829138301383113832138331383413835138361383713838138391384013841138421384313844138451384613847138481384913850138511385213853138541385513856138571385813859138601386113862138631386413865138661386713868138691387013871138721387313874138751387613877138781387913880138811388213883138841388513886138871388813889138901389113892138931389413895138961389713898138991390013901139021390313904139051390613907139081390913910139111391213913139141391513916139171391813919139201392113922139231392413925139261392713928139291393013931139321393313934139351393613937139381393913940139411394213943139441394513946139471394813949139501395113952139531395413955139561395713958139591396013961139621396313964139651396613967139681396913970139711397213973139741397513976139771397813979139801398113982139831398413985139861398713988139891399013991139921399313994139951399613997139981399914000140011400214003140041400514006140071400814009140101401114012140131401414015140161401714018140191402014021140221402314024140251402614027140281402914030140311403214033140341403514036140371403814039140401404114042140431404414045140461404714048140491405014051140521405314054140551405614057140581405914060140611406214063140641406514066140671406814069140701407114072140731407414075140761407714078140791408014081140821408314084140851408614087140881408914090140911409214093140941409514096140971409814099141001410114102141031410414105141061410714108141091411014111141121411314114141151411614117141181411914120141211412214123141241412514126141271412814129141301413114132141331413414135141361413714138141391414014141141421414314144141451414614147141481414914150141511415214153141541415514156141571415814159141601416114162141631416414165141661416714168141691417014171141721417314174141751417614177141781417914180141811418214183141841418514186141871418814189141901419114192141931419414195141961419714198141991420014201142021420314204142051420614207142081420914210142111421214213142141421514216142171421814219142201422114222142231422414225142261422714228142291423014231142321423314234142351423614237142381423914240142411424214243142441424514246142471424814249142501425114252142531425414255142561425714258142591426014261142621426314264142651426614267142681426914270142711427214273142741427514276142771427814279142801428114282142831428414285142861428714288142891429014291142921429314294142951429614297142981429914300143011430214303143041430514306143071430814309143101431114312143131431414315143161431714318143191432014321143221432314324143251432614327143281432914330143311433214333143341433514336143371433814339143401434114342143431434414345143461434714348143491435014351143521435314354143551435614357143581435914360143611436214363143641436514366143671436814369143701437114372143731437414375143761437714378143791438014381143821438314384143851438614387143881438914390143911439214393143941439514396143971439814399144001440114402144031440414405144061440714408144091441014411144121441314414144151441614417144181441914420144211442214423144241442514426144271442814429144301443114432144331443414435144361443714438144391444014441144421444314444144451444614447144481444914450144511445214453144541445514456144571445814459144601446114462144631446414465144661446714468144691447014471144721447314474144751447614477144781447914480144811448214483144841448514486144871448814489144901449114492144931449414495144961449714498144991450014501145021450314504145051450614507145081450914510145111451214513145141451514516145171451814519145201452114522145231452414525145261452714528145291453014531145321453314534145351453614537145381453914540145411454214543145441454514546145471454814549145501455114552145531455414555145561455714558145591456014561145621456314564145651456614567145681456914570145711457214573145741457514576145771457814579145801458114582145831458414585145861458714588145891459014591145921459314594145951459614597145981459914600146011460214603146041460514606146071460814609146101461114612146131461414615146161461714618146191462014621146221462314624146251462614627146281462914630146311463214633146341463514636146371463814639146401464114642146431464414645146461464714648146491465014651146521465314654146551465614657146581465914660146611466214663146641466514666146671466814669146701467114672146731467414675146761467714678146791468014681146821468314684146851468614687146881468914690146911469214693146941469514696146971469814699147001470114702147031470414705147061470714708147091471014711147121471314714147151471614717147181471914720147211472214723147241472514726147271472814729147301473114732147331473414735147361473714738147391474014741147421474314744147451474614747147481474914750147511475214753147541475514756147571475814759147601476114762147631476414765147661476714768147691477014771147721477314774147751477614777147781477914780147811478214783147841478514786147871478814789147901479114792147931479414795147961479714798147991480014801148021480314804148051480614807148081480914810148111481214813148141481514816148171481814819148201482114822148231482414825148261482714828148291483014831148321483314834148351483614837148381483914840148411484214843148441484514846148471484814849148501485114852148531485414855148561485714858148591486014861148621486314864148651486614867148681486914870148711487214873148741487514876148771487814879148801488114882148831488414885148861488714888148891489014891148921489314894148951489614897148981489914900149011490214903149041490514906149071490814909149101491114912149131491414915149161491714918149191492014921149221492314924149251492614927149281492914930149311493214933149341493514936149371493814939149401494114942149431494414945149461494714948149491495014951149521495314954149551495614957149581495914960149611496214963149641496514966149671496814969149701497114972149731497414975149761497714978149791498014981149821498314984149851498614987149881498914990149911499214993149941499514996149971499814999150001500115002150031500415005150061500715008150091501015011150121501315014150151501615017150181501915020150211502215023150241502515026150271502815029150301503115032150331503415035150361503715038150391504015041150421504315044150451504615047150481504915050150511505215053150541505515056150571505815059150601506115062150631506415065150661506715068150691507015071150721507315074150751507615077150781507915080150811508215083150841508515086150871508815089150901509115092150931509415095150961509715098150991510015101151021510315104151051510615107151081510915110151111511215113151141511515116151171511815119151201512115122151231512415125151261512715128151291513015131151321513315134151351513615137151381513915140151411514215143151441514515146151471514815149151501515115152151531515415155151561515715158151591516015161151621516315164151651516615167151681516915170151711517215173151741517515176151771517815179151801518115182151831518415185151861518715188151891519015191151921519315194151951519615197151981519915200152011520215203152041520515206152071520815209152101521115212152131521415215152161521715218152191522015221152221522315224152251522615227152281522915230152311523215233152341523515236152371523815239152401524115242152431524415245152461524715248152491525015251152521525315254152551525615257152581525915260152611526215263152641526515266152671526815269152701527115272152731527415275152761527715278152791528015281152821528315284152851528615287152881528915290152911529215293152941529515296152971529815299153001530115302153031530415305153061530715308153091531015311153121531315314153151531615317153181531915320153211532215323153241532515326153271532815329153301533115332153331533415335153361533715338153391534015341153421534315344153451534615347153481534915350153511535215353153541535515356153571535815359153601536115362153631536415365153661536715368153691537015371153721537315374153751537615377153781537915380153811538215383153841538515386153871538815389153901539115392153931539415395153961539715398153991540015401154021540315404154051540615407154081540915410154111541215413154141541515416154171541815419154201542115422154231542415425154261542715428154291543015431154321543315434154351543615437154381543915440154411544215443154441544515446154471544815449154501545115452154531545415455154561545715458154591546015461154621546315464154651546615467154681546915470154711547215473154741547515476154771547815479154801548115482154831548415485154861548715488154891549015491154921549315494154951549615497154981549915500155011550215503155041550515506155071550815509155101551115512155131551415515155161551715518155191552015521155221552315524155251552615527155281552915530155311553215533155341553515536155371553815539155401554115542155431554415545155461554715548155491555015551155521555315554155551555615557155581555915560155611556215563155641556515566155671556815569155701557115572155731557415575155761557715578155791558015581155821558315584155851558615587155881558915590155911559215593155941559515596155971559815599156001560115602156031560415605156061560715608156091561015611156121561315614156151561615617156181561915620156211562215623156241562515626156271562815629156301563115632156331563415635156361563715638156391564015641156421564315644156451564615647156481564915650156511565215653156541565515656156571565815659156601566115662156631566415665156661566715668156691567015671156721567315674156751567615677156781567915680156811568215683156841568515686156871568815689156901569115692156931569415695156961569715698156991570015701157021570315704157051570615707157081570915710157111571215713157141571515716157171571815719157201572115722157231572415725157261572715728157291573015731157321573315734157351573615737157381573915740157411574215743157441574515746157471574815749157501575115752157531575415755157561575715758157591576015761157621576315764157651576615767157681576915770157711577215773157741577515776157771577815779157801578115782157831578415785157861578715788157891579015791157921579315794157951579615797157981579915800158011580215803158041580515806158071580815809158101581115812158131581415815158161581715818158191582015821158221582315824158251582615827158281582915830158311583215833158341583515836158371583815839158401584115842158431584415845158461584715848158491585015851158521585315854158551585615857158581585915860158611586215863158641586515866158671586815869158701587115872158731587415875158761587715878158791588015881158821588315884158851588615887158881588915890158911589215893158941589515896158971589815899159001590115902159031590415905159061590715908159091591015911159121591315914159151591615917159181591915920159211592215923159241592515926159271592815929159301593115932159331593415935159361593715938159391594015941159421594315944159451594615947159481594915950159511595215953159541595515956159571595815959159601596115962159631596415965159661596715968159691597015971159721597315974159751597615977159781597915980159811598215983159841598515986159871598815989159901599115992159931599415995159961599715998159991600016001160021600316004160051600616007160081600916010160111601216013160141601516016160171601816019160201602116022160231602416025160261602716028160291603016031160321603316034160351603616037160381603916040160411604216043160441604516046160471604816049160501605116052160531605416055160561605716058160591606016061160621606316064160651606616067160681606916070160711607216073160741607516076160771607816079160801608116082160831608416085160861608716088160891609016091160921609316094160951609616097160981609916100161011610216103161041610516106161071610816109161101611116112161131611416115161161611716118161191612016121161221612316124161251612616127161281612916130161311613216133161341613516136161371613816139161401614116142161431614416145161461614716148161491615016151161521615316154161551615616157161581615916160161611616216163161641616516166161671616816169161701617116172161731617416175161761617716178161791618016181161821618316184161851618616187161881618916190161911619216193161941619516196161971619816199162001620116202162031620416205162061620716208162091621016211162121621316214162151621616217162181621916220162211622216223162241622516226162271622816229162301623116232162331623416235162361623716238162391624016241162421624316244162451624616247162481624916250162511625216253162541625516256162571625816259162601626116262162631626416265162661626716268162691627016271162721627316274162751627616277162781627916280162811628216283162841628516286162871628816289162901629116292162931629416295162961629716298162991630016301163021630316304163051630616307163081630916310163111631216313163141631516316163171631816319163201632116322163231632416325163261632716328163291633016331163321633316334163351633616337163381633916340163411634216343163441634516346163471634816349163501635116352163531635416355163561635716358163591636016361163621636316364163651636616367163681636916370163711637216373163741637516376163771637816379163801638116382163831638416385163861638716388163891639016391163921639316394163951639616397163981639916400164011640216403164041640516406164071640816409164101641116412164131641416415164161641716418164191642016421164221642316424164251642616427164281642916430164311643216433164341643516436164371643816439164401644116442164431644416445164461644716448164491645016451164521645316454164551645616457164581645916460164611646216463164641646516466164671646816469164701647116472164731647416475164761647716478164791648016481164821648316484164851648616487164881648916490164911649216493164941649516496164971649816499165001650116502165031650416505165061650716508165091651016511165121651316514165151651616517165181651916520165211652216523165241652516526165271652816529165301653116532165331653416535165361653716538165391654016541165421654316544165451654616547165481654916550165511655216553165541655516556165571655816559165601656116562165631656416565165661656716568165691657016571165721657316574165751657616577165781657916580165811658216583165841658516586165871658816589165901659116592165931659416595165961659716598165991660016601166021660316604166051660616607166081660916610166111661216613166141661516616166171661816619166201662116622166231662416625166261662716628166291663016631166321663316634166351663616637166381663916640166411664216643166441664516646166471664816649166501665116652166531665416655166561665716658166591666016661166621666316664166651666616667166681666916670166711667216673166741667516676166771667816679166801668116682166831668416685166861668716688166891669016691166921669316694166951669616697166981669916700167011670216703167041670516706167071670816709167101671116712167131671416715167161671716718167191672016721167221672316724167251672616727167281672916730167311673216733167341673516736167371673816739167401674116742167431674416745167461674716748167491675016751167521675316754167551675616757167581675916760167611676216763167641676516766167671676816769167701677116772167731677416775167761677716778167791678016781167821678316784167851678616787167881678916790167911679216793167941679516796167971679816799168001680116802168031680416805168061680716808168091681016811168121681316814168151681616817168181681916820168211682216823168241682516826168271682816829168301683116832168331683416835168361683716838168391684016841168421684316844168451684616847168481684916850168511685216853168541685516856168571685816859168601686116862168631686416865168661686716868168691687016871168721687316874168751687616877168781687916880168811688216883168841688516886168871688816889168901689116892168931689416895168961689716898168991690016901169021690316904169051690616907169081690916910169111691216913169141691516916169171691816919169201692116922169231692416925169261692716928169291693016931169321693316934169351693616937169381693916940169411694216943169441694516946169471694816949169501695116952169531695416955169561695716958169591696016961169621696316964169651696616967169681696916970169711697216973169741697516976169771697816979169801698116982169831698416985169861698716988169891699016991169921699316994169951699616997169981699917000170011700217003170041700517006170071700817009170101701117012170131701417015170161701717018170191702017021170221702317024170251702617027170281702917030170311703217033170341703517036170371703817039170401704117042170431704417045170461704717048170491705017051170521705317054170551705617057170581705917060170611706217063170641706517066170671706817069170701707117072170731707417075170761707717078170791708017081170821708317084170851708617087170881708917090170911709217093170941709517096170971709817099171001710117102171031710417105171061710717108171091711017111171121711317114171151711617117171181711917120171211712217123171241712517126171271712817129171301713117132171331713417135171361713717138171391714017141171421714317144171451714617147171481714917150171511715217153171541715517156171571715817159171601716117162171631716417165171661716717168171691717017171171721717317174171751717617177171781717917180171811718217183171841718517186171871718817189171901719117192171931719417195171961719717198171991720017201172021720317204172051720617207172081720917210172111721217213172141721517216172171721817219172201722117222172231722417225172261722717228172291723017231172321723317234172351723617237172381723917240172411724217243172441724517246172471724817249172501725117252172531725417255172561725717258172591726017261172621726317264172651726617267172681726917270172711727217273172741727517276172771727817279172801728117282172831728417285172861728717288172891729017291172921729317294172951729617297172981729917300173011730217303173041730517306173071730817309173101731117312173131731417315173161731717318173191732017321173221732317324173251732617327173281732917330173311733217333173341733517336173371733817339173401734117342173431734417345173461734717348173491735017351173521735317354173551735617357173581735917360173611736217363173641736517366173671736817369173701737117372173731737417375173761737717378173791738017381173821738317384173851738617387173881738917390173911739217393173941739517396173971739817399174001740117402174031740417405174061740717408174091741017411174121741317414174151741617417174181741917420174211742217423174241742517426174271742817429174301743117432174331743417435174361743717438174391744017441174421744317444174451744617447174481744917450174511745217453174541745517456174571745817459174601746117462174631746417465174661746717468174691747017471174721747317474174751747617477174781747917480174811748217483174841748517486174871748817489174901749117492174931749417495174961749717498174991750017501175021750317504175051750617507175081750917510175111751217513175141751517516175171751817519175201752117522175231752417525175261752717528175291753017531175321753317534
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <?xml-stylesheet type="text/xsl" href="testConf.xsl"?>
  3. <!--
  4. Licensed to the Apache Software Foundation (ASF) under one or more
  5. contributor license agreements. See the NOTICE file distributed with
  6. this work for additional information regarding copyright ownership.
  7. The ASF licenses this file to You under the Apache License, Version 2.0
  8. (the "License"); you may not use this file except in compliance with
  9. the License. You may obtain a copy of the License at
  10. http://www.apache.org/licenses/LICENSE-2.0
  11. Unless required by applicable law or agreed to in writing, software
  12. distributed under the License is distributed on an "AS IS" BASIS,
  13. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  14. See the License for the specific language governing permissions and
  15. limitations under the License.
  16. -->
  17. <configuration>
  18. <!-- Normal mode is test. To run just the commands and dump the output
  19. to the log, set it to nocompare -->
  20. <mode>test</mode>
  21. <!-- Comparator types:
  22. ExactComparator
  23. SubstringComparator
  24. RegexpComparator
  25. TokenComparator
  26. -->
  27. <tests>
  28. <!-- Tests for ls -->
  29. <test> <!-- TESTED -->
  30. <description>ls: file using absolute path</description>
  31. <test-commands>
  32. <command>-fs NAMENODE -touchz /file1</command>
  33. <command>-fs NAMENODE -ls /file1</command>
  34. </test-commands>
  35. <cleanup-commands>
  36. <command>-fs NAMENODE -rm /file1</command>
  37. </cleanup-commands>
  38. <comparators>
  39. <comparator>
  40. <type>RegexpComparator</type>
  41. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/file1</expected-output>
  42. </comparator>
  43. </comparators>
  44. </test>
  45. <test> <!-- TESTED -->
  46. <description>ls: file using relative path</description>
  47. <test-commands>
  48. <command>-fs NAMENODE -mkdir -p dir</command>
  49. <command>-fs NAMENODE -touchz file1</command>
  50. <command>-fs NAMENODE -ls file1</command>
  51. </test-commands>
  52. <cleanup-commands>
  53. <command>-fs NAMENODE -rm file1</command>
  54. </cleanup-commands>
  55. <comparators>
  56. <comparator>
  57. <type>RegexpComparator</type>
  58. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*file1</expected-output>
  59. </comparator>
  60. </comparators>
  61. </test>
  62. <test> <!-- TESTED -->
  63. <description>ls: files using globbing</description>
  64. <test-commands>
  65. <command>-fs NAMENODE -mkdir -p dir</command>
  66. <command>-fs NAMENODE -touchz file1</command>
  67. <command>-fs NAMENODE -touchz file2</command>
  68. <command>-fs NAMENODE -touchz file3</command>
  69. <command>-fs NAMENODE -touchz file4</command>
  70. <command>-fs NAMENODE -ls file*</command>
  71. </test-commands>
  72. <cleanup-commands>
  73. <command>-fs NAMENODE -rm -r /user</command>
  74. </cleanup-commands>
  75. <comparators>
  76. <comparator>
  77. <type>RegexpComparator</type>
  78. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*file1</expected-output>
  79. </comparator>
  80. <comparator>
  81. <type>RegexpComparator</type>
  82. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*file2</expected-output>
  83. </comparator>
  84. <comparator>
  85. <type>RegexpComparator</type>
  86. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*file3</expected-output>
  87. </comparator>
  88. <comparator>
  89. <type>RegexpComparator</type>
  90. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*file4</expected-output>
  91. </comparator>
  92. </comparators>
  93. </test>
  94. <test> <!-- TESTED -->
  95. <description>ls: directory using absolute path</description>
  96. <test-commands>
  97. <command>-fs NAMENODE -mkdir /dir1</command>
  98. <command>-fs NAMENODE -ls /</command>
  99. </test-commands>
  100. <cleanup-commands>
  101. <command>-fs NAMENODE -rm -r /dir1</command>
  102. </cleanup-commands>
  103. <comparators>
  104. <comparator>
  105. <type>RegexpComparator</type>
  106. <expected-output>^drwxr-xr-x( )*-( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir1</expected-output>
  107. </comparator>
  108. </comparators>
  109. </test>
  110. <test> <!-- TESTED -->
  111. <description>ls: directory using relative path</description>
  112. <test-commands>
  113. <command>-fs NAMENODE -mkdir -p dir1</command>
  114. <command>-fs NAMENODE -ls </command>
  115. </test-commands>
  116. <cleanup-commands>
  117. <command>-fs NAMENODE -rm -r dir1</command>
  118. </cleanup-commands>
  119. <comparators>
  120. <comparator>
  121. <type>RegexpComparator</type>
  122. <expected-output>^drwxr-xr-x( )*-( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir1</expected-output>
  123. </comparator>
  124. </comparators>
  125. </test>
  126. <test> <!-- TESTED -->
  127. <description>ls: directory using globbing</description>
  128. <test-commands>
  129. <command>-fs NAMENODE -mkdir -p dir1</command>
  130. <command>-fs NAMENODE -mkdir -p dir2</command>
  131. <command>-fs NAMENODE -mkdir -p dir3</command>
  132. <command>-fs NAMENODE -mkdir -p dir4</command>
  133. <command>-fs NAMENODE -ls </command>
  134. </test-commands>
  135. <cleanup-commands>
  136. <command>-fs NAMENODE -rm -r /user</command>
  137. </cleanup-commands>
  138. <comparators>
  139. <comparator>
  140. <type>RegexpComparator</type>
  141. <expected-output>^drwxr-xr-x( )*-( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir1</expected-output>
  142. </comparator>
  143. <comparator>
  144. <type>RegexpComparator</type>
  145. <expected-output>^drwxr-xr-x( )*-( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir2</expected-output>
  146. </comparator>
  147. <comparator>
  148. <type>RegexpComparator</type>
  149. <expected-output>^drwxr-xr-x( )*-( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir3</expected-output>
  150. </comparator>
  151. <comparator>
  152. <type>RegexpComparator</type>
  153. <expected-output>^drwxr-xr-x( )*-( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir4</expected-output>
  154. </comparator>
  155. </comparators>
  156. </test>
  157. <test> <!-- TESTED -->
  158. <description>ls: file/directory that does not exist in /</description>
  159. <test-commands>
  160. <command>-fs NAMENODE -ls /file1</command>
  161. </test-commands>
  162. <cleanup-commands>
  163. </cleanup-commands>
  164. <comparators>
  165. <comparator>
  166. <type>RegexpComparator</type>
  167. <expected-output>^ls: `/file1': No such file or directory</expected-output>
  168. </comparator>
  169. </comparators>
  170. </test>
  171. <test> <!-- TESTED -->
  172. <description>ls: file/directory that does not exist in home directory (/user/username)</description>
  173. <test-commands>
  174. <command>-fs NAMENODE -ls /user</command>
  175. </test-commands>
  176. <cleanup-commands>
  177. </cleanup-commands>
  178. <comparators>
  179. <comparator>
  180. <type>RegexpComparator</type>
  181. <expected-output>^ls: `/user': No such file or directory</expected-output>
  182. </comparator>
  183. </comparators>
  184. </test>
  185. <test> <!-- TESTED -->
  186. <description>ls: Non-URI input file at Namenode's path</description>
  187. <test-commands>
  188. <command>-fs NAMENODE -touchz NAMENODE/file1</command>
  189. <command>-fs NAMENODE -ls NAMENODE/file1</command>
  190. </test-commands>
  191. <cleanup-commands>
  192. <command>-fs NAMENODE -rm NAMENODE/file1</command>
  193. </cleanup-commands>
  194. <comparators>
  195. <comparator>
  196. <type>RegexpComparator</type>
  197. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/file1</expected-output>
  198. </comparator>
  199. </comparators>
  200. </test>
  201. <test> <!-- TESTED -->
  202. <description>ls: file at hdfs:// path</description>
  203. <test-commands>
  204. <command>-fs NAMENODE -touchz hdfs:///file1</command>
  205. <command>-fs NAMENODE -ls hdfs:///file1</command>
  206. </test-commands>
  207. <cleanup-commands>
  208. <command>-fs NAMENODE -rm hdfs:///file1</command>
  209. </cleanup-commands>
  210. <comparators>
  211. <comparator>
  212. <type>RegexpComparator</type>
  213. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///file1</expected-output>
  214. </comparator>
  215. </comparators>
  216. </test>
  217. <test> <!-- TESTED -->
  218. <description>ls: Non-URI input file at Namenode's path using globing</description>
  219. <test-commands>
  220. <command>-fs NAMENODE -touchz NAMENODE/file1</command>
  221. <command>-fs NAMENODE -touchz NAMENODE/file2</command>
  222. <command>-fs NAMENODE -touchz NAMENODE/file3</command>
  223. <command>-fs NAMENODE -ls NAMENODE/file*</command>
  224. </test-commands>
  225. <cleanup-commands>
  226. <command>-fs NAMENODE -rm NAMENODE/file*</command>
  227. </cleanup-commands>
  228. <comparators>
  229. <comparator>
  230. <type>RegexpComparator</type>
  231. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/file1</expected-output>
  232. </comparator>
  233. <comparator>
  234. <type>RegexpComparator</type>
  235. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/file2</expected-output>
  236. </comparator>
  237. <comparator>
  238. <type>RegexpComparator</type>
  239. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/file3</expected-output>
  240. </comparator>
  241. </comparators>
  242. </test>
  243. <test> <!-- TESTED -->
  244. <description>ls: file at hdfs:// path using globing</description>
  245. <test-commands>
  246. <command>-fs NAMENODE -touchz hdfs:///file1</command>
  247. <command>-fs NAMENODE -touchz hdfs:///file2</command>
  248. <command>-fs NAMENODE -touchz hdfs:///file3</command>
  249. <command>-fs NAMENODE -ls hdfs:///file*</command>
  250. </test-commands>
  251. <cleanup-commands>
  252. <command>-fs NAMENODE -rm hdfs:///file*</command>
  253. </cleanup-commands>
  254. <comparators>
  255. <comparator>
  256. <type>RegexpComparator</type>
  257. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///file1</expected-output>
  258. </comparator>
  259. <comparator>
  260. <type>RegexpComparator</type>
  261. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///file2</expected-output>
  262. </comparator>
  263. <comparator>
  264. <type>RegexpComparator</type>
  265. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///file3</expected-output>
  266. </comparator>
  267. </comparators>
  268. </test>
  269. <test> <!-- TESTED -->
  270. <description>ls: Non-URI input dir at Namenode's path</description>
  271. <test-commands>
  272. <command>-fs NAMENODE -mkdir -p NAMENODE/user/dir1</command>
  273. <command>-fs NAMENODE -ls hdfs:///user/</command>
  274. </test-commands>
  275. <cleanup-commands>
  276. <command>-fs NAMENODE -rm hdfs:///user/dir1</command>
  277. </cleanup-commands>
  278. <comparators>
  279. <comparator>
  280. <type>RegexpComparator</type>
  281. <expected-output>Found [0-9] items</expected-output>
  282. </comparator>
  283. <comparator>
  284. <type>RegexpComparator</type>
  285. <expected-output>^drwxr-xr-x( )*-( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///user/dir1</expected-output>
  286. </comparator>
  287. </comparators>
  288. </test>
  289. <test> <!-- TESTED -->
  290. <description>ls: dir at hdfs:// path</description>
  291. <test-commands>
  292. <command>-fs NAMENODE -mkdir -p hdfs:///user/dir1</command>
  293. <command>-fs NAMENODE -ls hdfs:///user/</command>
  294. </test-commands>
  295. <cleanup-commands>
  296. <command>-fs NAMENODE -rm hdfs:///user/dir1</command>
  297. </cleanup-commands>
  298. <comparators>
  299. <comparator>
  300. <type>RegexpComparator</type>
  301. <expected-output>Found [0-9] items</expected-output>
  302. </comparator>
  303. <comparator>
  304. <type>RegexpComparator</type>
  305. <expected-output>^drwxr-xr-x( )*-( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///user/dir1</expected-output>
  306. </comparator>
  307. </comparators>
  308. </test>
  309. <test> <!-- TESTED -->
  310. <description>ls: Non-URI input dir at Namenode's path using globing</description>
  311. <test-commands>
  312. <command>-fs NAMENODE -mkdir -p NAMENODE/user/dir1</command>
  313. <command>-fs NAMENODE -mkdir -p NAMENODE/user/dir2</command>
  314. <command>-fs NAMENODE -mkdir -p NAMENODE/user/dir3</command>
  315. <command>-fs NAMENODE -ls hdfs:///user/</command>
  316. </test-commands>
  317. <cleanup-commands>
  318. <command>-fs NAMENODE -rm hdfs:///user/dir*</command>
  319. </cleanup-commands>
  320. <comparators>
  321. <comparator>
  322. <type>RegexpComparator</type>
  323. <expected-output>Found [0-9] items</expected-output>
  324. </comparator>
  325. <comparator>
  326. <type>RegexpComparator</type>
  327. <expected-output>^drwxr-xr-x( )*-( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///user/dir1</expected-output>
  328. </comparator>
  329. <comparator>
  330. <type>RegexpComparator</type>
  331. <expected-output>^drwxr-xr-x( )*-( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///user/dir2</expected-output>
  332. </comparator>
  333. <comparator>
  334. <type>RegexpComparator</type>
  335. <expected-output>^drwxr-xr-x( )*-( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///user/dir3</expected-output>
  336. </comparator>
  337. </comparators>
  338. </test>
  339. <test> <!-- TESTED -->
  340. <description>ls: dir at hdfs:// path using globing</description>
  341. <test-commands>
  342. <command>-fs NAMENODE -mkdir -p hdfs:///user/dir1</command>
  343. <command>-fs NAMENODE -mkdir -p hdfs:///user/dir2</command>
  344. <command>-fs NAMENODE -mkdir -p hdfs:///user/dir3</command>
  345. <command>-fs NAMENODE -ls hdfs:///user/</command>
  346. </test-commands>
  347. <cleanup-commands>
  348. <command>-fs NAMENODE -rm hdfs:///user/dir*</command>
  349. </cleanup-commands>
  350. <comparators>
  351. <comparator>
  352. <type>RegexpComparator</type>
  353. <expected-output>Found [0-9] items</expected-output>
  354. </comparator>
  355. <comparator>
  356. <type>RegexpComparator</type>
  357. <expected-output>^drwxr-xr-x( )*-( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///user/dir1</expected-output>
  358. </comparator>
  359. <comparator>
  360. <type>RegexpComparator</type>
  361. <expected-output>^drwxr-xr-x( )*-( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///user/dir2</expected-output>
  362. </comparator>
  363. <comparator>
  364. <type>RegexpComparator</type>
  365. <expected-output>^drwxr-xr-x( )*-( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///user/dir3</expected-output>
  366. </comparator>
  367. </comparators>
  368. </test>
  369. <test> <!-- TESTED -->
  370. <description>ls: non-existent file/directory at hdfs:// path </description>
  371. <test-commands>
  372. <command>-fs NAMENODE -ls hdfs:///file1</command>
  373. </test-commands>
  374. <cleanup-commands>
  375. <!-- no cleanup -->
  376. </cleanup-commands>
  377. <comparators>
  378. <comparator>
  379. <type>RegexpComparator</type>
  380. <expected-output>^ls: `hdfs:///file1': No such file or directory</expected-output>
  381. </comparator>
  382. </comparators>
  383. </test>
  384. <test> <!-- TESTED -->
  385. <description>ls: non-existent file/directory in Namenode's path </description>
  386. <test-commands>
  387. <command>-fs NAMENODE -ls NAMENODE/file1</command>
  388. </test-commands>
  389. <cleanup-commands>
  390. <!-- no cleanup -->
  391. </cleanup-commands>
  392. <comparators>
  393. <comparator>
  394. <type>RegexpComparator</type>
  395. <expected-output>^ls: `hdfs://\w+[-.a-z0-9]*:[0-9]+/file1': No such file or directory</expected-output>
  396. </comparator>
  397. </comparators>
  398. </test>
  399. <test> <!-- TESTED -->
  400. <description>ls: whitespaces in an absolute path to a file</description>
  401. <test-commands>
  402. <command>-fs NAMENODE -mkdir -p "/a path with/whitespaces in directories"</command>
  403. <command>-fs NAMENODE -touchz "/a path with/whitespaces in directories/and file names"</command>
  404. <command>-fs NAMENODE -ls "/a path with/whitespaces in directories"</command>
  405. </test-commands>
  406. <cleanup-commands>
  407. <command>-fs NAMENODE -rm -r "/a path with"</command>
  408. </cleanup-commands>
  409. <comparators>
  410. <comparator>
  411. <type>RegexpComparator</type>
  412. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/a path with/whitespaces in directories/and file names</expected-output>
  413. </comparator>
  414. </comparators>
  415. </test>
  416. <test> <!-- TESTED -->
  417. <description>ls: whitespaces in a relative path to a file</description>
  418. <test-commands>
  419. <command>-fs NAMENODE -mkdir -p "a path with/whitespaces in directories"</command>
  420. <command>-fs NAMENODE -touchz "a path with/whitespaces in directories/and file names"</command>
  421. <command>-fs NAMENODE -ls "a path with/whitespaces in directories"</command>
  422. </test-commands>
  423. <cleanup-commands>
  424. <command>-fs NAMENODE -rm -r "a path with"</command>
  425. </cleanup-commands>
  426. <comparators>
  427. <comparator>
  428. <type>RegexpComparator</type>
  429. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*a path with/whitespaces in directories/and file names</expected-output>
  430. </comparator>
  431. </comparators>
  432. </test>
  433. <test> <!-- TESTED -->
  434. <description>ls: whitespaces in a scheme-qualified path to a file</description>
  435. <test-commands>
  436. <command>-fs NAMENODE -mkdir -p "NAMENODE/a path with/whitespaces in directories"</command>
  437. <command>-fs NAMENODE -touchz "NAMENODE/a path with/whitespaces in directories/and file names"</command>
  438. <command>-fs NAMENODE -ls "NAMENODE/a path with/whitespaces in directories"</command>
  439. </test-commands>
  440. <cleanup-commands>
  441. <command>-fs NAMENODE -rm -r "NAMENODE/a path with"</command>
  442. </cleanup-commands>
  443. <comparators>
  444. <comparator>
  445. <type>RegexpComparator</type>
  446. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/a path with/whitespaces in directories/and file names</expected-output>
  447. </comparator>
  448. </comparators>
  449. </test>
  450. <test> <!-- TESTED -->
  451. <description>ls: whitespaces in an absolute path to a file, using globbing</description>
  452. <test-commands>
  453. <command>-fs NAMENODE -mkdir -p "/a path with/whitespaces in directories"</command>
  454. <command>-fs NAMENODE -touchz "/a path with/whitespaces in directories/and file names"</command>
  455. <command>-fs NAMENODE -touchz "/a path with/whitespaces in directories/and file names 2"</command>
  456. <command>-fs NAMENODE -ls "/a*/w*"</command>
  457. </test-commands>
  458. <cleanup-commands>
  459. <command>-fs NAMENODE -rm -r "/a path with"</command>
  460. </cleanup-commands>
  461. <comparators>
  462. <comparator>
  463. <type>TokenComparator</type>
  464. <expected-output>Found 2 items</expected-output>
  465. </comparator>
  466. <comparator>
  467. <type>RegexpComparator</type>
  468. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/a path with/whitespaces in directories/and file names</expected-output>
  469. </comparator>
  470. <comparator>
  471. <type>RegexpComparator</type>
  472. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/a path with/whitespaces in directories/and file names 2</expected-output>
  473. </comparator>
  474. </comparators>
  475. </test>
  476. <test> <!-- TESTED -->
  477. <description>ls: whitespaces in a relative path to a file, using globbing</description>
  478. <test-commands>
  479. <command>-fs NAMENODE -mkdir -p "a path with/whitespaces in directories"</command>
  480. <command>-fs NAMENODE -touchz "a path with/whitespaces in directories/and file names"</command>
  481. <command>-fs NAMENODE -touchz "a path with/whitespaces in directories/and file names 2"</command>
  482. <command>-fs NAMENODE -ls "a*/w*"</command>
  483. </test-commands>
  484. <cleanup-commands>
  485. <command>-fs NAMENODE -rm -r "a path with"</command>
  486. </cleanup-commands>
  487. <comparators>
  488. <comparator>
  489. <type>TokenComparator</type>
  490. <expected-output>Found 2 items</expected-output>
  491. </comparator>
  492. <comparator>
  493. <type>RegexpComparator</type>
  494. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*a path with/whitespaces in directories/and file names</expected-output>
  495. </comparator>
  496. <comparator>
  497. <type>RegexpComparator</type>
  498. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*a path with/whitespaces in directories/and file names 2</expected-output>
  499. </comparator>
  500. </comparators>
  501. </test>
  502. <test> <!-- TESTED -->
  503. <description>ls: whitespaces in a scheme-qualified path to a file, using globbing</description>
  504. <test-commands>
  505. <command>-fs NAMENODE -mkdir -p "NAMENODE/a path with/whitespaces in directories"</command>
  506. <command>-fs NAMENODE -touchz "NAMENODE/a path with/whitespaces in directories/and file names"</command>
  507. <command>-fs NAMENODE -touchz "NAMENODE/a path with/whitespaces in directories/and file names 2"</command>
  508. <command>-fs NAMENODE -ls "NAMENODE/a*/w*"</command>
  509. </test-commands>
  510. <cleanup-commands>
  511. <command>-fs NAMENODE -rm -r "NAMENODE/a path with"</command>
  512. </cleanup-commands>
  513. <comparators>
  514. <comparator>
  515. <type>TokenComparator</type>
  516. <expected-output>Found 2 items</expected-output>
  517. </comparator>
  518. <comparator>
  519. <type>RegexpComparator</type>
  520. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/a path with/whitespaces in directories/and file names</expected-output>
  521. </comparator>
  522. <comparator>
  523. <type>RegexpComparator</type>
  524. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/a path with/whitespaces in directories/and file names 2</expected-output>
  525. </comparator>
  526. </comparators>
  527. </test>
  528. <!-- Tests for ls -R -->
  529. <test> <!-- TESTED -->
  530. <description>ls: files/directories using absolute path</description>
  531. <test-commands>
  532. <command>-fs NAMENODE -mkdir /dir0</command>
  533. <command>-fs NAMENODE -mkdir /dir0/dir1</command>
  534. <command>-fs NAMENODE -mkdir /dir0/dir1/dir1</command>
  535. <command>-fs NAMENODE -mkdir /dir0/dir1/dir2</command>
  536. <command>-fs NAMENODE -mkdir /dir0/dir2</command>
  537. <command>-fs NAMENODE -mkdir /dir0/dir2/dir1</command>
  538. <command>-fs NAMENODE -mkdir /dir0/dir2/dir2</command>
  539. <command>-fs NAMENODE -touchz /dir0/file0</command>
  540. <command>-fs NAMENODE -touchz /dir0/dir1/file1</command>
  541. <command>-fs NAMENODE -touchz /dir0/dir1/file2</command>
  542. <command>-fs NAMENODE -touchz /dir0/dir2/file1</command>
  543. <command>-fs NAMENODE -touchz /dir0/dir2/file2</command>
  544. <command>-fs NAMENODE -touchz /dir0/dir1/dir1/file1</command>
  545. <command>-fs NAMENODE -touchz /dir0/dir1/dir1/file2</command>
  546. <command>-fs NAMENODE -touchz /dir0/dir2/dir2/file1</command>
  547. <command>-fs NAMENODE -touchz /dir0/dir2/dir2/file2</command>
  548. <command>-fs NAMENODE -ls -R /dir0</command>
  549. </test-commands>
  550. <cleanup-commands>
  551. <command>-fs NAMENODE -rm -r /dir0</command>
  552. </cleanup-commands>
  553. <comparators>
  554. <comparator>
  555. <type>RegexpComparator</type>
  556. <expected-output>^drwxr-xr-x( )*-( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1</expected-output>
  557. </comparator>
  558. <comparator>
  559. <type>RegexpComparator</type>
  560. <expected-output>^drwxr-xr-x( )*-( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir2</expected-output>
  561. </comparator>
  562. <comparator>
  563. <type>RegexpComparator</type>
  564. <expected-output>^drwxr-xr-x( )*-( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1/dir1</expected-output>
  565. </comparator>
  566. <comparator>
  567. <type>RegexpComparator</type>
  568. <expected-output>^drwxr-xr-x( )*-( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1/dir2</expected-output>
  569. </comparator>
  570. <comparator>
  571. <type>RegexpComparator</type>
  572. <expected-output>^drwxr-xr-x( )*-( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir2/dir1</expected-output>
  573. </comparator>
  574. <comparator>
  575. <type>RegexpComparator</type>
  576. <expected-output>^drwxr-xr-x( )*-( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir2/dir2</expected-output>
  577. </comparator>
  578. <comparator>
  579. <type>RegexpComparator</type>
  580. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/file0</expected-output>
  581. </comparator>
  582. <comparator>
  583. <type>RegexpComparator</type>
  584. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1/file1</expected-output>
  585. </comparator>
  586. <comparator>
  587. <type>RegexpComparator</type>
  588. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1/file2</expected-output>
  589. </comparator>
  590. <comparator>
  591. <type>RegexpComparator</type>
  592. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir2/file1</expected-output>
  593. </comparator>
  594. <comparator>
  595. <type>RegexpComparator</type>
  596. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir2/file2</expected-output>
  597. </comparator>
  598. <comparator>
  599. <type>RegexpComparator</type>
  600. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1/dir1/file1</expected-output>
  601. </comparator>
  602. <comparator>
  603. <type>RegexpComparator</type>
  604. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1/dir1/file2</expected-output>
  605. </comparator>
  606. <comparator>
  607. <type>RegexpComparator</type>
  608. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir2/dir2/file1</expected-output>
  609. </comparator>
  610. <comparator>
  611. <type>RegexpComparator</type>
  612. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir2/dir2/file2</expected-output>
  613. </comparator>
  614. </comparators>
  615. </test>
  616. <test> <!-- TESTED -->
  617. <description>ls: files/directories using relative path</description>
  618. <test-commands>
  619. <command>-fs NAMENODE -mkdir -p dir0</command>
  620. <command>-fs NAMENODE -mkdir -p dir0/dir1</command>
  621. <command>-fs NAMENODE -mkdir -p dir0/dir1/dir1</command>
  622. <command>-fs NAMENODE -mkdir -p dir0/dir1/dir2</command>
  623. <command>-fs NAMENODE -mkdir -p dir0/dir2</command>
  624. <command>-fs NAMENODE -mkdir -p dir0/dir2/dir1</command>
  625. <command>-fs NAMENODE -mkdir -p dir0/dir2/dir2</command>
  626. <command>-fs NAMENODE -touchz dir0/file0</command>
  627. <command>-fs NAMENODE -touchz dir0/dir1/file1</command>
  628. <command>-fs NAMENODE -touchz dir0/dir1/file2</command>
  629. <command>-fs NAMENODE -touchz dir0/dir2/file1</command>
  630. <command>-fs NAMENODE -touchz dir0/dir2/file2</command>
  631. <command>-fs NAMENODE -touchz dir0/dir1/dir1/file1</command>
  632. <command>-fs NAMENODE -touchz dir0/dir1/dir1/file2</command>
  633. <command>-fs NAMENODE -touchz dir0/dir2/dir2/file1</command>
  634. <command>-fs NAMENODE -touchz dir0/dir2/dir2/file2</command>
  635. <command>-fs NAMENODE -ls -R dir0</command>
  636. </test-commands>
  637. <cleanup-commands>
  638. <command>-fs NAMENODE -rm -r /user</command>
  639. </cleanup-commands>
  640. <comparators>
  641. <comparator>
  642. <type>RegexpComparator</type>
  643. <expected-output>^drwxr-xr-x( )*-( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/dir1</expected-output>
  644. </comparator>
  645. <comparator>
  646. <type>RegexpComparator</type>
  647. <expected-output>^drwxr-xr-x( )*-( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/dir2</expected-output>
  648. </comparator>
  649. <comparator>
  650. <type>RegexpComparator</type>
  651. <expected-output>^drwxr-xr-x( )*-( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/dir1/dir1</expected-output>
  652. </comparator>
  653. <comparator>
  654. <type>RegexpComparator</type>
  655. <expected-output>^drwxr-xr-x( )*-( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/dir1/dir2</expected-output>
  656. </comparator>
  657. <comparator>
  658. <type>RegexpComparator</type>
  659. <expected-output>^drwxr-xr-x( )*-( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/dir2/dir1</expected-output>
  660. </comparator>
  661. <comparator>
  662. <type>RegexpComparator</type>
  663. <expected-output>^drwxr-xr-x( )*-( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/dir2/dir2</expected-output>
  664. </comparator>
  665. <comparator>
  666. <type>RegexpComparator</type>
  667. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/file0</expected-output>
  668. </comparator>
  669. <comparator>
  670. <type>RegexpComparator</type>
  671. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/dir1/file1</expected-output>
  672. </comparator>
  673. <comparator>
  674. <type>RegexpComparator</type>
  675. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/dir1/file2</expected-output>
  676. </comparator>
  677. <comparator>
  678. <type>RegexpComparator</type>
  679. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/dir2/file1</expected-output>
  680. </comparator>
  681. <comparator>
  682. <type>RegexpComparator</type>
  683. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/dir2/file2</expected-output>
  684. </comparator>
  685. <comparator>
  686. <type>RegexpComparator</type>
  687. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/dir1/dir1/file1</expected-output>
  688. </comparator>
  689. <comparator>
  690. <type>RegexpComparator</type>
  691. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/dir1/dir1/file2</expected-output>
  692. </comparator>
  693. <comparator>
  694. <type>RegexpComparator</type>
  695. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/dir2/dir2/file1</expected-output>
  696. </comparator>
  697. <comparator>
  698. <type>RegexpComparator</type>
  699. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/dir2/dir2/file2</expected-output>
  700. </comparator>
  701. </comparators>
  702. </test>
  703. <test> <!-- TESTED -->
  704. <description>ls: files/directories using globbing</description>
  705. <test-commands>
  706. <command>-fs NAMENODE -mkdir -p dir0</command>
  707. <command>-fs NAMENODE -mkdir -p dir0/dir1</command>
  708. <command>-fs NAMENODE -mkdir -p dir0/dir1/dir1</command>
  709. <command>-fs NAMENODE -mkdir -p dir0/dir1/dir2</command>
  710. <command>-fs NAMENODE -mkdir -p dir0/dir2</command>
  711. <command>-fs NAMENODE -mkdir -p dir0/dir2/dir1</command>
  712. <command>-fs NAMENODE -mkdir -p dir0/dir2/dir2</command>
  713. <command>-fs NAMENODE -touchz dir0/file0</command>
  714. <command>-fs NAMENODE -touchz dir0/dir1/file1</command>
  715. <command>-fs NAMENODE -touchz dir0/dir1/file2</command>
  716. <command>-fs NAMENODE -touchz dir0/dir2/file1</command>
  717. <command>-fs NAMENODE -touchz dir0/dir2/file2</command>
  718. <command>-fs NAMENODE -touchz dir0/dir1/dir1/file1</command>
  719. <command>-fs NAMENODE -touchz dir0/dir1/dir1/file2</command>
  720. <command>-fs NAMENODE -touchz dir0/dir2/dir2/file1</command>
  721. <command>-fs NAMENODE -touchz dir0/dir2/dir2/file2</command>
  722. <command>-fs NAMENODE -ls -R dir0/*</command>
  723. </test-commands>
  724. <cleanup-commands>
  725. <command>-fs NAMENODE -rm -r /user</command>
  726. </cleanup-commands>
  727. <comparators>
  728. <!-- JIRA?
  729. <comparator>
  730. <type>RegexpComparator</type>
  731. <expected-output>^/user/[a-zA-z0-9]*/dir0/dir1</expected-output>
  732. </comparator>
  733. <comparator>
  734. <type>RegexpComparator</type>
  735. <expected-output>^/user/[a-zA-z0-9]*/dir0/dir2</expected-output>
  736. </comparator>
  737. -->
  738. <comparator>
  739. <type>RegexpComparator</type>
  740. <expected-output>^drwxr-xr-x( )*-( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/dir1/dir1</expected-output>
  741. </comparator>
  742. <comparator>
  743. <type>RegexpComparator</type>
  744. <expected-output>^drwxr-xr-x( )*-( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/dir1/dir2</expected-output>
  745. </comparator>
  746. <comparator>
  747. <type>RegexpComparator</type>
  748. <expected-output>^drwxr-xr-x( )*-( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/dir2/dir1</expected-output>
  749. </comparator>
  750. <comparator>
  751. <type>RegexpComparator</type>
  752. <expected-output>^drwxr-xr-x( )*-( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/dir2/dir2</expected-output>
  753. </comparator>
  754. <comparator>
  755. <type>RegexpComparator</type>
  756. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/file0</expected-output>
  757. </comparator>
  758. <comparator>
  759. <type>RegexpComparator</type>
  760. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/dir1/file1</expected-output>
  761. </comparator>
  762. <comparator>
  763. <type>RegexpComparator</type>
  764. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/dir1/file2</expected-output>
  765. </comparator>
  766. <comparator>
  767. <type>RegexpComparator</type>
  768. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/dir2/file1</expected-output>
  769. </comparator>
  770. <comparator>
  771. <type>RegexpComparator</type>
  772. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/dir2/file2</expected-output>
  773. </comparator>
  774. <comparator>
  775. <type>RegexpComparator</type>
  776. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/dir1/dir1/file1</expected-output>
  777. </comparator>
  778. <comparator>
  779. <type>RegexpComparator</type>
  780. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/dir1/dir1/file2</expected-output>
  781. </comparator>
  782. <comparator>
  783. <type>RegexpComparator</type>
  784. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/dir2/dir2/file1</expected-output>
  785. </comparator>
  786. <comparator>
  787. <type>RegexpComparator</type>
  788. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/dir2/dir2/file2</expected-output>
  789. </comparator>
  790. </comparators>
  791. </test>
  792. <test> <!-- TESTED -->
  793. <description>ls: file/directory that does not exist in /</description>
  794. <test-commands>
  795. <command>-fs NAMENODE -ls -R /file1</command>
  796. </test-commands>
  797. <cleanup-commands>
  798. </cleanup-commands>
  799. <comparators>
  800. <comparator>
  801. <type>RegexpComparator</type>
  802. <expected-output>^ls: `/file1': No such file or directory</expected-output>
  803. </comparator>
  804. </comparators>
  805. </test>
  806. <test> <!-- TESTED -->
  807. <description>ls: file/directory that does not exist in home directory (/user/username)</description>
  808. <test-commands>
  809. <command>-fs NAMENODE -ls -R /user</command>
  810. </test-commands>
  811. <cleanup-commands>
  812. </cleanup-commands>
  813. <comparators>
  814. <comparator>
  815. <type>RegexpComparator</type>
  816. <expected-output>^ls: `/user': No such file or directory</expected-output>
  817. </comparator>
  818. </comparators>
  819. </test>
  820. <test> <!-- TESTED -->
  821. <description>ls: dir at hdfs:// path</description>
  822. <test-commands>
  823. <command>-fs NAMENODE -mkdir hdfs:///dir0</command>
  824. <command>-fs NAMENODE -mkdir hdfs:///dir0/dir1</command>
  825. <command>-fs NAMENODE -touchz hdfs:///file1</command>
  826. <command>-fs NAMENODE -touchz hdfs:///dir0/file1</command>
  827. <command>-fs NAMENODE -touchz hdfs:///dir0/dir1/file1</command>
  828. <command>-fs NAMENODE -ls -R hdfs:///</command>
  829. </test-commands>
  830. <cleanup-commands>
  831. <command>-fs NAMENODE -rm hdfs:///dir0</command>
  832. <command>-fs NAMENODE -rm hdfs:///file1</command>
  833. </cleanup-commands>
  834. <comparators>
  835. <comparator>
  836. <type>RegexpComparator</type>
  837. <expected-output>^drwxr-xr-x( )*-( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir0</expected-output>
  838. </comparator>
  839. <comparator>
  840. <type>RegexpComparator</type>
  841. <expected-output>^drwxr-xr-x( )*-( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir0/dir1</expected-output>
  842. </comparator>
  843. <comparator>
  844. <type>RegexpComparator</type>
  845. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///file1</expected-output>
  846. </comparator>
  847. <comparator>
  848. <type>RegexpComparator</type>
  849. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir0/file1</expected-output>
  850. </comparator>
  851. <comparator>
  852. <type>RegexpComparator</type>
  853. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir0/dir1/file1</expected-output>
  854. </comparator>
  855. </comparators>
  856. </test>
  857. <test> <!-- TESTED -->
  858. <description>ls: files/directories in hdfs:// path using globbing</description>
  859. <test-commands>
  860. <command>-fs NAMENODE -mkdir hdfs:///dir0</command>
  861. <command>-fs NAMENODE -mkdir hdfs:///dir0/dir1</command>
  862. <command>-fs NAMENODE -touchz hdfs:///dir0/file1</command>
  863. <command>-fs NAMENODE -touchz hdfs:///dir0/dir1/file1</command>
  864. <command>-fs NAMENODE -ls -R hdfs:///dir0/*</command>
  865. </test-commands>
  866. <cleanup-commands>
  867. <command>-fs NAMENODE -rm -r hdfs:///dir0</command>
  868. </cleanup-commands>
  869. <comparators>
  870. <comparator>
  871. <type>RegexpComparator</type>
  872. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir0/file1</expected-output>
  873. </comparator>
  874. <comparator>
  875. <type>RegexpComparator</type>
  876. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir0/dir1/file1</expected-output>
  877. </comparator>
  878. </comparators>
  879. </test>
  880. <test> <!-- TESTED -->
  881. <description>ls: Non-existent file/directory in hdfs:// path</description>
  882. <test-commands>
  883. <command>-fs NAMENODE -ls -R hdfs:///file1</command>
  884. </test-commands>
  885. <cleanup-commands>
  886. </cleanup-commands>
  887. <comparators>
  888. <comparator>
  889. <type>RegexpComparator</type>
  890. <expected-output>^ls: `hdfs:///file1': No such file or directory</expected-output>
  891. </comparator>
  892. </comparators>
  893. </test>
  894. <test> <!-- TESTED -->
  895. <description>ls: dir at Namenode's path</description>
  896. <test-commands>
  897. <command>-fs NAMENODE -mkdir NAMENODE/dir0</command>
  898. <command>-fs NAMENODE -mkdir NAMENODE/dir0/dir1</command>
  899. <command>-fs NAMENODE -touchz NAMENODE/file1</command>
  900. <command>-fs NAMENODE -touchz NAMENODE/dir0/file1</command>
  901. <command>-fs NAMENODE -touchz NAMENODE/dir0/dir1/file1</command>
  902. <command>-fs NAMENODE -ls -R NAMENODE/</command>
  903. </test-commands>
  904. <cleanup-commands>
  905. <command>-fs NAMENODE -rm hdfs:///dir0</command>
  906. <command>-fs NAMENODE -rm hdfs:///file1</command>
  907. </cleanup-commands>
  908. <comparators>
  909. <comparator>
  910. <type>RegexpComparator</type>
  911. <expected-output>^drwxr-xr-x( )*-( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir0</expected-output>
  912. </comparator>
  913. <comparator>
  914. <type>RegexpComparator</type>
  915. <expected-output>^drwxr-xr-x( )*-( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir0/dir1</expected-output>
  916. </comparator>
  917. <comparator>
  918. <type>RegexpComparator</type>
  919. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/file1</expected-output>
  920. </comparator>
  921. <comparator>
  922. <type>RegexpComparator</type>
  923. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir0/file1</expected-output>
  924. </comparator>
  925. <comparator>
  926. <type>RegexpComparator</type>
  927. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir0/dir1/file1</expected-output>
  928. </comparator>
  929. </comparators>
  930. </test>
  931. <test> <!-- TESTED -->
  932. <description>ls: Non-URI input files/directories in Namenode's path </description>
  933. <test-commands>
  934. <command>-fs NAMENODE -mkdir NAMENODE/dir0</command>
  935. <command>-fs NAMENODE -mkdir NAMENODE/dir0/dir1</command>
  936. <command>-fs NAMENODE -touchz NAMENODE/dir0/file1</command>
  937. <command>-fs NAMENODE -touchz NAMENODE/dir0/dir1/file1</command>
  938. <command>-fs NAMENODE -ls -R NAMENODE/dir0/*</command>
  939. </test-commands>
  940. <cleanup-commands>
  941. <command>-fs NAMENODE -rm -r NAMENODE/dir0</command>
  942. </cleanup-commands>
  943. <comparators>
  944. <comparator>
  945. <type>RegexpComparator</type>
  946. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir0/file1</expected-output>
  947. </comparator>
  948. <comparator>
  949. <type>RegexpComparator</type>
  950. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir0/dir1/file1</expected-output>
  951. </comparator>
  952. </comparators>
  953. </test>
  954. <test> <!-- TESTED -->
  955. <description>ls: Non-URI input for non-existent file/directory in Namenode's path </description>
  956. <test-commands>
  957. <command>-fs NAMENODE -ls -R NAMENODE/file1</command>
  958. </test-commands>
  959. <cleanup-commands>
  960. </cleanup-commands>
  961. <comparators>
  962. <comparator>
  963. <type>RegexpComparator</type>
  964. <expected-output>^ls: `hdfs://\w+[-.a-z0-9]*:[0-9]+/file1': No such file or directory</expected-output>
  965. </comparator>
  966. </comparators>
  967. </test>
  968. <test> <!-- TESTED -->
  969. <description>ls: Negative test for quoted /*/* globbing </description>
  970. <windows>false</windows>
  971. <test-commands>
  972. <command>-fs NAMENODE -mkdir /dir0</command>
  973. <command>-fs NAMENODE -mkdir /dir0/dir1</command>
  974. <command>-fs NAMENODE -touchz /dir0/dir1/file1</command>
  975. <command>-fs NAMENODE -ls -R /\*/\*</command>
  976. </test-commands>
  977. <cleanup-commands>
  978. <command>-fs NAMENODE -rm -r /dir0</command>
  979. </cleanup-commands>
  980. <comparators>
  981. <comparator>
  982. <type>TokenComparator</type>
  983. <expected-output>ls: `/*/*': No such file or directory</expected-output>
  984. </comparator>
  985. </comparators>
  986. </test>
  987. <test> <!-- TESTED -->
  988. <description>ls: Test for quoted globbing </description>
  989. <windows>false</windows>
  990. <test-commands>
  991. <command>-fs NAMENODE -mkdir /dir0</command>
  992. <command>-fs NAMENODE -mkdir /dir0/\*</command>
  993. <command>-fs NAMENODE -touchz /dir0/\*/file</command>
  994. <command>-fs NAMENODE -touchz /dir0/dir1/file1</command>
  995. <command>-fs NAMENODE -ls -R /dir0/\*</command>
  996. </test-commands>
  997. <cleanup-commands>
  998. <command>-fs NAMENODE -rm -r /dir0</command>
  999. </cleanup-commands>
  1000. <comparators>
  1001. <comparator>
  1002. <type>RegexpComparator</type>
  1003. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/\*/file</expected-output>
  1004. </comparator>
  1005. </comparators>
  1006. </test>
  1007. <test> <!-- TESTED -->
  1008. <description>ls: files sorted in default order</description>
  1009. <test-commands>
  1010. <command>-fs NAMENODE -mkdir /dir</command>
  1011. <command>-fs NAMENODE -touchz /dir/file2 /dir/file1 /dir/file3</command>
  1012. <command>-fs NAMENODE -ls /dir</command>
  1013. </test-commands>
  1014. <cleanup-commands>
  1015. <command>-fs NAMENODE -rm -r /dir</command>
  1016. </cleanup-commands>
  1017. <comparators>
  1018. <comparator>
  1019. <type>RegexpAcrossOutputComparator</type>
  1020. <expected-output>Found 3 items
  1021. -rw-r--r--( )*1( )*[a-zA-z0-9]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir/file1
  1022. -rw-r--r--( )*1( )*[a-zA-z0-9]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir/file2
  1023. -rw-r--r--( )*1( )*[a-zA-z0-9]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir/file3</expected-output>
  1024. </comparator>
  1025. </comparators>
  1026. </test>
  1027. <test> <!-- TESTED -->
  1028. <description>ls: files sorted in reverse default order</description>
  1029. <test-commands>
  1030. <command>-fs NAMENODE -mkdir /dir</command>
  1031. <command>-fs NAMENODE -touchz /dir/file2 /dir/file1 /dir/file3</command>
  1032. <command>-fs NAMENODE -ls -r /dir</command>
  1033. </test-commands>
  1034. <cleanup-commands>
  1035. <command>-fs NAMENODE -rm -r /dir</command>
  1036. </cleanup-commands>
  1037. <comparators>
  1038. <comparator>
  1039. <type>RegexpAcrossOutputComparator</type>
  1040. <expected-output>Found 3 items
  1041. -rw-r--r--( )*1( )*[a-zA-z0-9]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir/file3
  1042. -rw-r--r--( )*1( )*[a-zA-z0-9]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir/file2
  1043. -rw-r--r--( )*1( )*[a-zA-z0-9]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir/file1</expected-output>
  1044. </comparator>
  1045. </comparators>
  1046. </test>
  1047. <test> <!-- TESTED -->
  1048. <description>ls: files sorted in size order</description>
  1049. <test-commands>
  1050. <command>-fs NAMENODE -mkdir /dir</command>
  1051. <command>-fs NAMENODE -put CLITEST_DATA/data30bytes /dir/data30bytes</command>
  1052. <command>-fs NAMENODE -put CLITEST_DATA/data15bytes /dir/data15bytes</command>
  1053. <command>-fs NAMENODE -put CLITEST_DATA/data120bytes /dir/data120bytes</command>
  1054. <command>-fs NAMENODE -put CLITEST_DATA/data60bytes /dir/data60bytes</command>
  1055. <command>-fs NAMENODE -ls -S /dir</command>
  1056. </test-commands>
  1057. <cleanup-commands>
  1058. <command>-fs NAMENODE -rm -r /dir</command>
  1059. </cleanup-commands>
  1060. <comparators>
  1061. <comparator>
  1062. <type>RegexpAcrossOutputComparator</type>
  1063. <expected-output>Found 4 items
  1064. -rw-r--r--( )*1( )*[a-zA-z0-9]*( )*supergroup( )*120( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir/data120bytes
  1065. -rw-r--r--( )*1( )*[a-zA-z0-9]*( )*supergroup( )*60( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir/data60bytes
  1066. -rw-r--r--( )*1( )*[a-zA-z0-9]*( )*supergroup( )*30( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir/data30bytes
  1067. -rw-r--r--( )*1( )*[a-zA-z0-9]*( )*supergroup( )*15( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir/data15bytes</expected-output>
  1068. </comparator>
  1069. </comparators>
  1070. </test>
  1071. <test> <!-- TESTED -->
  1072. <description>ls: files sorted in reverse size order</description>
  1073. <test-commands>
  1074. <command>-fs NAMENODE -mkdir /dir</command>
  1075. <command>-fs NAMENODE -put CLITEST_DATA/data30bytes /dir/data30bytes</command>
  1076. <command>-fs NAMENODE -put CLITEST_DATA/data15bytes /dir/data15bytes</command>
  1077. <command>-fs NAMENODE -put CLITEST_DATA/data120bytes /dir/data120bytes</command>
  1078. <command>-fs NAMENODE -put CLITEST_DATA/data60bytes /dir/data60bytes</command>
  1079. <command>-fs NAMENODE -ls -S -r /dir</command>
  1080. </test-commands>
  1081. <cleanup-commands>
  1082. <command>-fs NAMENODE -rm -r /dir</command>
  1083. </cleanup-commands>
  1084. <comparators>
  1085. <comparator>
  1086. <type>RegexpAcrossOutputComparator</type>
  1087. <expected-output>Found 4 items
  1088. -rw-r--r--( )*1( )*[a-zA-z0-9]*( )*supergroup( )*15( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir/data15bytes
  1089. -rw-r--r--( )*1( )*[a-zA-z0-9]*( )*supergroup( )*30( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir/data30bytes
  1090. -rw-r--r--( )*1( )*[a-zA-z0-9]*( )*supergroup( )*60( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir/data60bytes
  1091. -rw-r--r--( )*1( )*[a-zA-z0-9]*( )*supergroup( )*120( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir/data120bytes</expected-output>
  1092. </comparator>
  1093. </comparators>
  1094. </test>
  1095. <test> <!-- TESTED -->
  1096. <description>ls: files sorted in modification order</description>
  1097. <!-- this test assumes that the files take > 1ms each to create -->
  1098. <test-commands>
  1099. <command>-fs NAMENODE -mkdir /dir</command>
  1100. <command>-fs NAMENODE -touchz /dir/first</command>
  1101. <command>-fs NAMENODE -touchz /dir/second</command>
  1102. <command>-fs NAMENODE -touchz /dir/third</command>
  1103. <command>-fs NAMENODE -touchz /dir/fourth</command>
  1104. <command>-fs NAMENODE -touchz /dir/fifth</command>
  1105. <command>-fs NAMENODE -ls -t /dir</command>
  1106. </test-commands>
  1107. <cleanup-commands>
  1108. <command>-fs NAMENODE -rm -r /dir</command>
  1109. </cleanup-commands>
  1110. <comparators>
  1111. <comparator>
  1112. <type>RegexpAcrossOutputComparator</type>
  1113. <expected-output>Found 5 items
  1114. -rw-r--r--( )*1( )*[a-zA-z0-9]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir/fifth
  1115. -rw-r--r--( )*1( )*[a-zA-z0-9]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir/fourth
  1116. -rw-r--r--( )*1( )*[a-zA-z0-9]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir/third
  1117. -rw-r--r--( )*1( )*[a-zA-z0-9]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir/second
  1118. -rw-r--r--( )*1( )*[a-zA-z0-9]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir/first</expected-output>
  1119. </comparator>
  1120. </comparators>
  1121. </test>
  1122. <test> <!-- TESTED -->
  1123. <description>ls: files sorted in reverse modification order</description>
  1124. <!-- this test assumes that the files take > 1ms each to create -->
  1125. <test-commands>
  1126. <command>-fs NAMENODE -mkdir /dir</command>
  1127. <command>-fs NAMENODE -touchz /dir/first</command>
  1128. <command>-fs NAMENODE -touchz /dir/second</command>
  1129. <command>-fs NAMENODE -touchz /dir/third</command>
  1130. <command>-fs NAMENODE -touchz /dir/fourth</command>
  1131. <command>-fs NAMENODE -touchz /dir/fifth</command>
  1132. <command>-fs NAMENODE -ls -t -r /dir</command>
  1133. </test-commands>
  1134. <cleanup-commands>
  1135. <command>-fs NAMENODE -rm -r /dir</command>
  1136. </cleanup-commands>
  1137. <comparators>
  1138. <comparator>
  1139. <type>RegexpAcrossOutputComparator</type>
  1140. <expected-output>Found 5 items
  1141. -rw-r--r--( )*1( )*[a-zA-z0-9]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir/first
  1142. -rw-r--r--( )*1( )*[a-zA-z0-9]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir/second
  1143. -rw-r--r--( )*1( )*[a-zA-z0-9]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir/third
  1144. -rw-r--r--( )*1( )*[a-zA-z0-9]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir/fourth
  1145. -rw-r--r--( )*1( )*[a-zA-z0-9]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir/fifth</expected-output>
  1146. </comparator>
  1147. </comparators>
  1148. </test>
  1149. <test> <!-- TESTED -->
  1150. <description>rm: Test for quoted globbing </description>
  1151. <windows>false</windows>
  1152. <test-commands>
  1153. <command>-fs NAMENODE -mkdir /dir0</command>
  1154. <command>-fs NAMENODE -mkdir /dir0/\*</command>
  1155. <command>-fs NAMENODE -touchz /dir0/\*/file</command>
  1156. <command>-fs NAMENODE -mkdir /dir0/dir1/</command>
  1157. <command>-fs NAMENODE -touchz /dir0/dir1/file1</command>
  1158. <command>-fs NAMENODE -rm -r /dir0/\*</command>
  1159. <command>-fs NAMENODE -ls -R /dir0</command>
  1160. </test-commands>
  1161. <cleanup-commands>
  1162. <command>-fs NAMENODE -rm -r /dir0</command>
  1163. </cleanup-commands>
  1164. <comparators>
  1165. <comparator>
  1166. <type>RegexpComparator</type>
  1167. <expected-output>^drwxr-xr-x( )*-( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1</expected-output>
  1168. </comparator>
  1169. <comparator>
  1170. <type>RegexpComparator</type>
  1171. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1/file1</expected-output>
  1172. </comparator>
  1173. </comparators>
  1174. </test>
  1175. <!-- Tests for du -->
  1176. <test> <!-- TESTED -->
  1177. <description>du: file using absolute path</description>
  1178. <test-commands>
  1179. <command>-fs NAMENODE -put CLITEST_DATA/data15bytes /data15bytes</command>
  1180. <command>-fs NAMENODE -du /data15bytes</command>
  1181. </test-commands>
  1182. <cleanup-commands>
  1183. <command>-fs NAMENODE -rm /data15bytes</command>
  1184. </cleanup-commands>
  1185. <comparators>
  1186. <comparator>
  1187. <type>RegexpComparator</type>
  1188. <expected-output>^15\s+/data15bytes</expected-output>
  1189. </comparator>
  1190. </comparators>
  1191. </test>
  1192. <test> <!-- TESTED -->
  1193. <description>du: file using relative path</description>
  1194. <test-commands>
  1195. <command>-fs NAMENODE -mkdir -p dir</command> <!-- make sure user home dir exists -->
  1196. <command>-fs NAMENODE -put CLITEST_DATA/data15bytes data15bytesZZ</command>
  1197. <command>-fs NAMENODE -du data15bytesZZ</command>
  1198. </test-commands>
  1199. <cleanup-commands>
  1200. <command>-fs NAMENODE -rm data15bytesZZ</command>
  1201. </cleanup-commands>
  1202. <comparators>
  1203. <comparator>
  1204. <type>RegexpComparator</type>
  1205. <expected-output>^15\s+data15bytesZZ</expected-output>
  1206. </comparator>
  1207. </comparators>
  1208. </test>
  1209. <test> <!-- TESTED -->
  1210. <description>du: files using globbing</description>
  1211. <test-commands>
  1212. <command>-fs NAMENODE -mkdir -p CLITEST_DATA</command>
  1213. <command>-fs NAMENODE -put CLITEST_DATA/data15bytes data15bytes</command>
  1214. <command>-fs NAMENODE -put CLITEST_DATA/data30bytes data30bytes</command>
  1215. <command>-fs NAMENODE -put CLITEST_DATA/data60bytes data60bytes</command>
  1216. <command>-fs NAMENODE -put CLITEST_DATA/data120bytes data120bytes</command>
  1217. <command>-fs NAMENODE -du data*</command>
  1218. </test-commands>
  1219. <cleanup-commands>
  1220. <command>-fs NAMENODE -rm data*bytes</command>
  1221. </cleanup-commands>
  1222. <comparators>
  1223. <comparator>
  1224. <type>RegexpComparator</type>
  1225. <expected-output>^120\s+data120bytes</expected-output>
  1226. </comparator>
  1227. <comparator>
  1228. <type>RegexpComparator</type>
  1229. <expected-output>^15\s+data15bytes</expected-output>
  1230. </comparator>
  1231. <comparator>
  1232. <type>RegexpComparator</type>
  1233. <expected-output>^30\s+data30bytes</expected-output>
  1234. </comparator>
  1235. <comparator>
  1236. <type>RegexpComparator</type>
  1237. <expected-output>^60\s+data60bytes</expected-output>
  1238. </comparator>
  1239. </comparators>
  1240. </test>
  1241. <test> <!-- TESTED -->
  1242. <description>du: directory using absolute path</description>
  1243. <test-commands>
  1244. <command>-fs NAMENODE -mkdir /dir0</command>
  1245. <command>-fs NAMENODE -put CLITEST_DATA/data15bytes /dir0/data15bytes</command>
  1246. <command>-fs NAMENODE -du /dir0</command>
  1247. </test-commands>
  1248. <cleanup-commands>
  1249. <command>-fs NAMENODE -rm -r /dir0</command>
  1250. </cleanup-commands>
  1251. <comparators>
  1252. <comparator>
  1253. <type>RegexpComparator</type>
  1254. <expected-output>^15\s+/dir0/data15bytes</expected-output>
  1255. </comparator>
  1256. </comparators>
  1257. </test>
  1258. <test> <!-- TESTED -->
  1259. <description>du: directory using relative path</description>
  1260. <test-commands>
  1261. <command>-fs NAMENODE -mkdir -p dir0</command>
  1262. <command>-fs NAMENODE -put CLITEST_DATA/data15bytes dir0/data15bytes</command>
  1263. <command>-fs NAMENODE -du dir0</command>
  1264. </test-commands>
  1265. <cleanup-commands>
  1266. <command>-fs NAMENODE -rm -r /user</command>
  1267. </cleanup-commands>
  1268. <comparators>
  1269. <comparator>
  1270. <type>RegexpComparator</type>
  1271. <expected-output>^15\s+dir0/data15bytes</expected-output>
  1272. </comparator>
  1273. </comparators>
  1274. </test>
  1275. <test> <!-- TESTED -->
  1276. <description>du: directory using globbing</description>
  1277. <test-commands>
  1278. <command>-fs NAMENODE -mkdir /dir0</command>
  1279. <command>-fs NAMENODE -put CLITEST_DATA/data15bytes /dir0/data15bytes</command>
  1280. <command>-fs NAMENODE -put CLITEST_DATA/data30bytes /dir0/data30bytes</command>
  1281. <command>-fs NAMENODE -put CLITEST_DATA/data60bytes /dir0/data60bytes</command>
  1282. <command>-fs NAMENODE -put CLITEST_DATA/data120bytes /dir0/data120bytes</command>
  1283. <command>-fs NAMENODE -du /dir0/*</command>
  1284. </test-commands>
  1285. <cleanup-commands>
  1286. <command>-fs NAMENODE -rm -r /dir0</command>
  1287. </cleanup-commands>
  1288. <comparators>
  1289. <comparator>
  1290. <type>RegexpComparator</type>
  1291. <expected-output>^15( |\t)*/dir0/data15bytes</expected-output>
  1292. </comparator>
  1293. <comparator>
  1294. <type>RegexpComparator</type>
  1295. <expected-output>^30( |\t)*/dir0/data30bytes</expected-output>
  1296. </comparator>
  1297. <comparator>
  1298. <type>RegexpComparator</type>
  1299. <expected-output>^60( |\t)*/dir0/data60bytes</expected-output>
  1300. </comparator>
  1301. <comparator>
  1302. <type>RegexpComparator</type>
  1303. <expected-output>^120( |\t)*/dir0/data120bytes</expected-output>
  1304. </comparator>
  1305. </comparators>
  1306. </test>
  1307. <test> <!-- TESTED -->
  1308. <description>du: Test for hdfs:// path - file</description>
  1309. <test-commands>
  1310. <command>-fs NAMENODE -put CLITEST_DATA/data15bytes hdfs:///data15bytes</command>
  1311. <command>-fs NAMENODE -du hdfs:///data15bytes</command>
  1312. </test-commands>
  1313. <cleanup-commands>
  1314. <command>-fs NAMENODE -rm hdfs:///data15bytes</command>
  1315. </cleanup-commands>
  1316. <comparators>
  1317. <comparator>
  1318. <type>RegexpComparator</type>
  1319. <expected-output>^15\s+hdfs:///data15bytes</expected-output>
  1320. </comparator>
  1321. </comparators>
  1322. </test>
  1323. <test> <!-- TESTED -->
  1324. <description>du: Test for hdfs:// path - files using globbing</description>
  1325. <test-commands>
  1326. <command>-fs NAMENODE -put CLITEST_DATA/data15bytes hdfs:///data15bytes</command>
  1327. <command>-fs NAMENODE -put CLITEST_DATA/data30bytes hdfs:///data30bytes</command>
  1328. <command>-fs NAMENODE -put CLITEST_DATA/data60bytes hdfs:///data60bytes</command>
  1329. <command>-fs NAMENODE -put CLITEST_DATA/data120bytes hdfs:///data120bytes</command>
  1330. <command>-fs NAMENODE -du hdfs:///data*</command>
  1331. </test-commands>
  1332. <cleanup-commands>
  1333. <command>-fs NAMENODE -rm -r hdfs:///*</command>
  1334. </cleanup-commands>
  1335. <comparators>
  1336. <comparator>
  1337. <type>RegexpComparator</type>
  1338. <expected-output>^120\s+hdfs:///data120bytes</expected-output>
  1339. </comparator>
  1340. <comparator>
  1341. <type>RegexpComparator</type>
  1342. <expected-output>^15\s+hdfs:///data15bytes</expected-output>
  1343. </comparator>
  1344. <comparator>
  1345. <type>RegexpComparator</type>
  1346. <expected-output>^30\s+hdfs:///data30bytes</expected-output>
  1347. </comparator>
  1348. <comparator>
  1349. <type>RegexpComparator</type>
  1350. <expected-output>^60\s+hdfs:///data60bytes</expected-output>
  1351. </comparator>
  1352. </comparators>
  1353. </test>
  1354. <test> <!-- TESTED -->
  1355. <description>du: Test for hdfs:// path - directory</description>
  1356. <test-commands>
  1357. <command>-fs NAMENODE -mkdir hdfs:///dir0</command>
  1358. <command>-fs NAMENODE -put CLITEST_DATA/data15bytes hdfs:///dir0/data15bytes</command>
  1359. <command>-fs NAMENODE -du hdfs:///dir0</command>
  1360. </test-commands>
  1361. <cleanup-commands>
  1362. <command>-fs NAMENODE -rm -r hdfs:///dir0</command>
  1363. </cleanup-commands>
  1364. <comparators>
  1365. <comparator>
  1366. <type>RegexpComparator</type>
  1367. <expected-output>^15\s+hdfs:///dir0/data15bytes</expected-output>
  1368. </comparator>
  1369. </comparators>
  1370. </test>
  1371. <test> <!-- TESTED -->
  1372. <description>duh: Test for hdfs:// path - directory</description>
  1373. <test-commands>
  1374. <command>-fs NAMENODE -mkdir hdfs:///dir0</command>
  1375. <command>-fs NAMENODE -put CLITEST_DATA/data15bytes hdfs:///dir0/data15bytes</command>
  1376. <command>-fs NAMENODE -put CLITEST_DATA/data1k hdfs:///dir0/data1k</command>
  1377. <command>-fs NAMENODE -du -h hdfs:///dir0</command>
  1378. </test-commands>
  1379. <cleanup-commands>
  1380. <command>-fs NAMENODE -rm -r hdfs:///dir0</command>
  1381. </cleanup-commands>
  1382. <comparators>
  1383. <comparator>
  1384. <type>RegexpComparator</type>
  1385. <expected-output>^15\s+hdfs:///dir0/data15bytes</expected-output>
  1386. </comparator>
  1387. <comparator>
  1388. <type>RegexpComparator</type>
  1389. <expected-output>^1\.0 K\s+hdfs:///dir0/data1k</expected-output>
  1390. </comparator>
  1391. </comparators>
  1392. </test>
  1393. <test> <!-- TESTED -->
  1394. <description>du: Test for hdfs:// path - directory using globbing</description>
  1395. <test-commands>
  1396. <command>-fs NAMENODE -mkdir hdfs:///dir0</command>
  1397. <command>-fs NAMENODE -put CLITEST_DATA/data15bytes hdfs:///dir0/data15bytes</command>
  1398. <command>-fs NAMENODE -put CLITEST_DATA/data30bytes hdfs:///dir0/data30bytes</command>
  1399. <command>-fs NAMENODE -put CLITEST_DATA/data60bytes hdfs:///dir0/data60bytes</command>
  1400. <command>-fs NAMENODE -put CLITEST_DATA/data120bytes hdfs:///dir0/data120bytes</command>
  1401. <command>-fs NAMENODE -du hdfs:///dir0/*</command>
  1402. </test-commands>
  1403. <cleanup-commands>
  1404. <command>-fs NAMENODE -rm -r hdfs:///dir0</command>
  1405. </cleanup-commands>
  1406. <comparators>
  1407. <comparator>
  1408. <type>RegexpComparator</type>
  1409. <expected-output>^15( |\t)*hdfs:///dir0/data15bytes</expected-output>
  1410. </comparator>
  1411. <comparator>
  1412. <type>RegexpComparator</type>
  1413. <expected-output>^30( |\t)*hdfs:///dir0/data30bytes</expected-output>
  1414. </comparator>
  1415. <comparator>
  1416. <type>RegexpComparator</type>
  1417. <expected-output>^60( |\t)*hdfs:///dir0/data60bytes</expected-output>
  1418. </comparator>
  1419. <comparator>
  1420. <type>RegexpComparator</type>
  1421. <expected-output>^120( |\t)*hdfs:///dir0/data120bytes</expected-output>
  1422. </comparator>
  1423. </comparators>
  1424. </test>
  1425. <test> <!-- TESTED -->
  1426. <description>du: Test for Namenode's path - file</description>
  1427. <test-commands>
  1428. <command>-fs NAMENODE -put CLITEST_DATA/data15bytes NAMENODE/data15bytes</command>
  1429. <command>-fs NAMENODE -du NAMENODE/data15bytes</command>
  1430. </test-commands>
  1431. <cleanup-commands>
  1432. <command>-fs NAMENODE -rm NAMENODE/data15bytes</command>
  1433. </cleanup-commands>
  1434. <comparators>
  1435. <comparator>
  1436. <type>RegexpComparator</type>
  1437. <expected-output>^15( |\t)*NAMENODE/data15bytes</expected-output>
  1438. </comparator>
  1439. </comparators>
  1440. </test>
  1441. <test> <!-- TESTED -->
  1442. <description>du: Test for Namenode's path - files using globbing</description>
  1443. <test-commands>
  1444. <command>-fs NAMENODE -put CLITEST_DATA/data15bytes NAMENODE/data15bytes</command>
  1445. <command>-fs NAMENODE -put CLITEST_DATA/data30bytes NAMENODE/data30bytes</command>
  1446. <command>-fs NAMENODE -put CLITEST_DATA/data60bytes NAMENODE/data60bytes</command>
  1447. <command>-fs NAMENODE -put CLITEST_DATA/data120bytes NAMENODE/data120bytes</command>
  1448. <command>-fs NAMENODE -du NAMENODE/data*</command>
  1449. </test-commands>
  1450. <cleanup-commands>
  1451. <command>-fs NAMENODE -rm -r NAMENODE/*</command>
  1452. </cleanup-commands>
  1453. <comparators>
  1454. <comparator>
  1455. <type>RegexpComparator</type>
  1456. <expected-output>^15( |\t)*NAMENODE/data15bytes</expected-output>
  1457. </comparator>
  1458. <comparator>
  1459. <type>RegexpComparator</type>
  1460. <expected-output>^30( |\t)*NAMENODE/data30bytes</expected-output>
  1461. </comparator>
  1462. <comparator>
  1463. <type>RegexpComparator</type>
  1464. <expected-output>^60( |\t)*NAMENODE/data60bytes</expected-output>
  1465. </comparator>
  1466. <comparator>
  1467. <type>RegexpComparator</type>
  1468. <expected-output>^120( |\t)*NAMENODE/data120bytes</expected-output>
  1469. </comparator>
  1470. </comparators>
  1471. </test>
  1472. <test> <!-- TESTED -->
  1473. <description>du: Test for Namenode's path - directory</description>
  1474. <test-commands>
  1475. <command>-fs NAMENODE -mkdir NAMENODE/dir0</command>
  1476. <command>-fs NAMENODE -put CLITEST_DATA/data15bytes NAMENODE/dir0/data15bytes</command>
  1477. <command>-fs NAMENODE -du NAMENODE/dir0</command>
  1478. </test-commands>
  1479. <cleanup-commands>
  1480. <command>-fs NAMENODE -rm -r NAMENODE/dir0</command>
  1481. </cleanup-commands>
  1482. <comparators>
  1483. <comparator>
  1484. <type>RegexpComparator</type>
  1485. <expected-output>^15( |\t)*NAMENODE/dir0/data15bytes</expected-output>
  1486. </comparator>
  1487. </comparators>
  1488. </test>
  1489. <test> <!-- TESTED -->
  1490. <description>du: Test for Namenode's path - directory using globbing</description>
  1491. <test-commands>
  1492. <command>-fs NAMENODE -mkdir NAMENODE/dir0</command>
  1493. <command>-fs NAMENODE -put CLITEST_DATA/data15bytes NAMENODE/dir0/data15bytes</command>
  1494. <command>-fs NAMENODE -put CLITEST_DATA/data30bytes NAMENODE/dir0/data30bytes</command>
  1495. <command>-fs NAMENODE -put CLITEST_DATA/data60bytes NAMENODE/dir0/data60bytes</command>
  1496. <command>-fs NAMENODE -put CLITEST_DATA/data120bytes NAMENODE/dir0/data120bytes</command>
  1497. <command>-fs NAMENODE -du NAMENODE/dir0/*</command>
  1498. </test-commands>
  1499. <cleanup-commands>
  1500. <command>-fs NAMENODE -rm -r NAMENODE/dir0</command>
  1501. </cleanup-commands>
  1502. <comparators>
  1503. <comparator>
  1504. <type>RegexpComparator</type>
  1505. <expected-output>^15( |\t)*NAMENODE/dir0/data15bytes</expected-output>
  1506. </comparator>
  1507. <comparator>
  1508. <type>RegexpComparator</type>
  1509. <expected-output>^30( |\t)*NAMENODE/dir0/data30bytes</expected-output>
  1510. </comparator>
  1511. <comparator>
  1512. <type>RegexpComparator</type>
  1513. <expected-output>^60( |\t)*NAMENODE/dir0/data60bytes</expected-output>
  1514. </comparator>
  1515. <comparator>
  1516. <type>RegexpComparator</type>
  1517. <expected-output>^120( |\t)*NAMENODE/dir0/data120bytes</expected-output>
  1518. </comparator>
  1519. </comparators>
  1520. </test>
  1521. <!-- Tests for dus -->
  1522. <test> <!-- TESTED -->
  1523. <description>dus: directories/files using absolute path</description>
  1524. <test-commands>
  1525. <command>-fs NAMENODE -mkdir /dir0</command>
  1526. <command>-fs NAMENODE -mkdir /dir0/dir1</command>
  1527. <command>-fs NAMENODE -mkdir /dir0/dir1/dir1</command>
  1528. <command>-fs NAMENODE -mkdir /dir0/dir1/dir2</command>
  1529. <command>-fs NAMENODE -mkdir /dir0/dir2</command>
  1530. <command>-fs NAMENODE -mkdir /dir0/dir2/dir1</command>
  1531. <command>-fs NAMENODE -mkdir /dir0/dir2/dir2</command>
  1532. <command>-fs NAMENODE -touchz /dir0/file0</command>
  1533. <command>-fs NAMENODE -put CLITEST_DATA/data15bytes /dir0/dir1/data15bytes</command>
  1534. <command>-fs NAMENODE -put CLITEST_DATA/data30bytes /dir0/dir1/data30bytes</command>
  1535. <command>-fs NAMENODE -put CLITEST_DATA/data15bytes /dir0/dir2/data15bytes</command>
  1536. <command>-fs NAMENODE -put CLITEST_DATA/data30bytes /dir0/dir2/data30bytes</command>
  1537. <command>-fs NAMENODE -put CLITEST_DATA/data60bytes /dir0/dir1/dir1/data60bytes</command>
  1538. <command>-fs NAMENODE -put CLITEST_DATA/data120bytes /dir0/dir1/dir2/data120bytes</command>
  1539. <command>-fs NAMENODE -put CLITEST_DATA/data60bytes /dir0/dir2/dir1/data60bytes</command>
  1540. <command>-fs NAMENODE -put CLITEST_DATA/data120bytes /dir0/dir2/dir2/data120bytes</command>
  1541. <command>-fs NAMENODE -du -s /dir0</command>
  1542. </test-commands>
  1543. <cleanup-commands>
  1544. <command>-fs NAMENODE -rm -r /dir0</command>
  1545. </cleanup-commands>
  1546. <comparators>
  1547. <comparator>
  1548. <type>RegexpComparator</type>
  1549. <expected-output>^450\s+/dir0</expected-output>
  1550. </comparator>
  1551. </comparators>
  1552. </test>
  1553. <test> <!-- TESTED -->
  1554. <description>dus: directories/files using relative path</description>
  1555. <test-commands>
  1556. <command>-fs NAMENODE -mkdir -p dir0</command>
  1557. <command>-fs NAMENODE -mkdir -p dir0/dir1</command>
  1558. <command>-fs NAMENODE -mkdir -p dir0/dir1/dir1</command>
  1559. <command>-fs NAMENODE -mkdir -p dir0/dir1/dir2</command>
  1560. <command>-fs NAMENODE -mkdir -p dir0/dir2</command>
  1561. <command>-fs NAMENODE -mkdir -p dir0/dir2/dir1</command>
  1562. <command>-fs NAMENODE -mkdir -p dir0/dir2/dir2</command>
  1563. <command>-fs NAMENODE -touchz dir0/file0</command>
  1564. <command>-fs NAMENODE -put CLITEST_DATA/data15bytes dir0/dir1/data15bytes</command>
  1565. <command>-fs NAMENODE -put CLITEST_DATA/data30bytes dir0/dir1/data30bytes</command>
  1566. <command>-fs NAMENODE -put CLITEST_DATA/data15bytes dir0/dir2/data15bytes</command>
  1567. <command>-fs NAMENODE -put CLITEST_DATA/data30bytes dir0/dir2/data30bytes</command>
  1568. <command>-fs NAMENODE -put CLITEST_DATA/data60bytes dir0/dir1/dir1/data60bytes</command>
  1569. <command>-fs NAMENODE -put CLITEST_DATA/data120bytes dir0/dir1/dir2/data120bytes</command>
  1570. <command>-fs NAMENODE -put CLITEST_DATA/data60bytes dir0/dir2/dir1/data60bytes</command>
  1571. <command>-fs NAMENODE -put CLITEST_DATA/data120bytes dir0/dir2/dir2/data120bytes</command>
  1572. <command>-fs NAMENODE -du -s dir0</command>
  1573. </test-commands>
  1574. <cleanup-commands>
  1575. <command>-fs NAMENODE -rm -r /user</command>
  1576. </cleanup-commands>
  1577. <comparators>
  1578. <comparator>
  1579. <type>RegexpComparator</type>
  1580. <expected-output>^450\s+dir0</expected-output>
  1581. </comparator>
  1582. </comparators>
  1583. </test>
  1584. <test> <!-- TESTED -->
  1585. <description>dus: directories/files using globbing</description>
  1586. <test-commands>
  1587. <command>-fs NAMENODE -mkdir /dir0</command>
  1588. <command>-fs NAMENODE -mkdir /dir0/dir1</command>
  1589. <command>-fs NAMENODE -mkdir /dir0/dir1/dir1</command>
  1590. <command>-fs NAMENODE -mkdir /dir0/dir1/dir2</command>
  1591. <command>-fs NAMENODE -mkdir /dir0/dir2</command>
  1592. <command>-fs NAMENODE -mkdir /dir0/dir2/dir1</command>
  1593. <command>-fs NAMENODE -mkdir /dir0/dir2/dir2</command>
  1594. <command>-fs NAMENODE -touchz /dir0/file0</command>
  1595. <command>-fs NAMENODE -put CLITEST_DATA/data15bytes /dir0/dir1/data15bytes</command>
  1596. <command>-fs NAMENODE -put CLITEST_DATA/data30bytes /dir0/dir1/data30bytes</command>
  1597. <command>-fs NAMENODE -put CLITEST_DATA/data15bytes /dir0/dir2/data15bytes</command>
  1598. <command>-fs NAMENODE -put CLITEST_DATA/data30bytes /dir0/dir2/data30bytes</command>
  1599. <command>-fs NAMENODE -put CLITEST_DATA/data60bytes /dir0/dir1/dir1/data60bytes</command>
  1600. <command>-fs NAMENODE -put CLITEST_DATA/data120bytes /dir0/dir1/dir2/data120bytes</command>
  1601. <command>-fs NAMENODE -put CLITEST_DATA/data60bytes /dir0/dir2/dir1/data60bytes</command>
  1602. <command>-fs NAMENODE -put CLITEST_DATA/data120bytes /dir0/dir2/dir2/data120bytes</command>
  1603. <command>-fs NAMENODE -mkdir /donotcountdir0</command>
  1604. <command>-fs NAMENODE -put CLITEST_DATA/data15bytes /donotcountdir0/data15bytes</command>
  1605. <command>-fs NAMENODE -put CLITEST_DATA/data15bytes /donotcountdir0/data15bytes</command>
  1606. <command>-fs NAMENODE -put CLITEST_DATA/data15bytes /donotcountdir0/data15bytes</command>
  1607. <command>-fs NAMENODE -put CLITEST_DATA/data15bytes /donotcountdir0/data15bytes</command>
  1608. <command>-fs NAMENODE -du -s /dir*</command>
  1609. </test-commands>
  1610. <cleanup-commands>
  1611. <command>-fs NAMENODE -rm -r /dir0</command>
  1612. <command>-fs NAMENODE -rm -r /donotcountdir0</command>
  1613. </cleanup-commands>
  1614. <comparators>
  1615. <comparator>
  1616. <type>RegexpComparator</type>
  1617. <expected-output>^450\s+/dir0</expected-output>
  1618. </comparator>
  1619. </comparators>
  1620. </test>
  1621. <!-- Tests for dus -->
  1622. <test> <!-- TESTED -->
  1623. <description>dus: Test for hdfs:// path - directories/files</description>
  1624. <test-commands>
  1625. <command>-fs NAMENODE -mkdir hdfs:///dir0</command>
  1626. <command>-fs NAMENODE -mkdir hdfs:///dir0/dir1</command>
  1627. <command>-fs NAMENODE -mkdir hdfs:///dir0/dir1/dir1</command>
  1628. <command>-fs NAMENODE -mkdir hdfs:///dir0/dir1/dir2</command>
  1629. <command>-fs NAMENODE -mkdir hdfs:///dir0/dir2</command>
  1630. <command>-fs NAMENODE -mkdir hdfs:///dir0/dir2/dir1</command>
  1631. <command>-fs NAMENODE -mkdir hdfs:///dir0/dir2/dir2</command>
  1632. <command>-fs NAMENODE -touchz hdfs:///dir0/file0</command>
  1633. <command>-fs NAMENODE -put CLITEST_DATA/data15bytes hdfs:///dir0/dir1/data15bytes</command>
  1634. <command>-fs NAMENODE -put CLITEST_DATA/data30bytes hdfs:///dir0/dir1/data30bytes</command>
  1635. <command>-fs NAMENODE -put CLITEST_DATA/data15bytes hdfs:///dir0/dir2/data15bytes</command>
  1636. <command>-fs NAMENODE -put CLITEST_DATA/data30bytes hdfs:///dir0/dir2/data30bytes</command>
  1637. <command>-fs NAMENODE -put CLITEST_DATA/data60bytes hdfs:///dir0/dir1/dir1/data60bytes</command>
  1638. <command>-fs NAMENODE -put CLITEST_DATA/data120bytes hdfs:///dir0/dir1/dir2/data120bytes</command>
  1639. <command>-fs NAMENODE -put CLITEST_DATA/data60bytes hdfs:///dir0/dir2/dir1/data60bytes</command>
  1640. <command>-fs NAMENODE -put CLITEST_DATA/data120bytes hdfs:///dir0/dir2/dir2/data120bytes</command>
  1641. <command>-fs NAMENODE -du -s hdfs:///dir0</command>
  1642. </test-commands>
  1643. <cleanup-commands>
  1644. <command>-fs NAMENODE -rm -r hdfs:///dir0</command>
  1645. </cleanup-commands>
  1646. <comparators>
  1647. <comparator>
  1648. <type>RegexpComparator</type>
  1649. <expected-output>^450\s+hdfs:///dir0</expected-output>
  1650. </comparator>
  1651. </comparators>
  1652. </test>
  1653. <test> <!-- TESTED -->
  1654. <description>dus: Test for hdfs:// path - directories/files using globbing</description>
  1655. <test-commands>
  1656. <command>-fs NAMENODE -mkdir hdfs:///dir0</command>
  1657. <command>-fs NAMENODE -mkdir hdfs:///dir0/dir1</command>
  1658. <command>-fs NAMENODE -mkdir hdfs:///dir0/dir1/dir1</command>
  1659. <command>-fs NAMENODE -mkdir hdfs:///dir0/dir1/dir2</command>
  1660. <command>-fs NAMENODE -mkdir hdfs:///dir0/dir2</command>
  1661. <command>-fs NAMENODE -mkdir hdfs:///dir0/dir2/dir1</command>
  1662. <command>-fs NAMENODE -mkdir hdfs:///dir0/dir2/dir2</command>
  1663. <command>-fs NAMENODE -touchz hdfs:///dir0/file0</command>
  1664. <command>-fs NAMENODE -put CLITEST_DATA/data15bytes hdfs:///dir0/dir1/data15bytes</command>
  1665. <command>-fs NAMENODE -put CLITEST_DATA/data30bytes hdfs:///dir0/dir1/data30bytes</command>
  1666. <command>-fs NAMENODE -put CLITEST_DATA/data15bytes hdfs:///dir0/dir2/data15bytes</command>
  1667. <command>-fs NAMENODE -put CLITEST_DATA/data30bytes hdfs:///dir0/dir2/data30bytes</command>
  1668. <command>-fs NAMENODE -put CLITEST_DATA/data60bytes hdfs:///dir0/dir1/dir1/data60bytes</command>
  1669. <command>-fs NAMENODE -put CLITEST_DATA/data120bytes hdfs:///dir0/dir1/dir2/data120bytes</command>
  1670. <command>-fs NAMENODE -put CLITEST_DATA/data60bytes hdfs:///dir0/dir2/dir1/data60bytes</command>
  1671. <command>-fs NAMENODE -put CLITEST_DATA/data120bytes hdfs:///dir0/dir2/dir2/data120bytes</command>
  1672. <command>-fs NAMENODE -mkdir /donotcountdir0</command>
  1673. <command>-fs NAMENODE -put CLITEST_DATA/data15bytes hdfs:///donotcountdir0/data15bytes</command>
  1674. <command>-fs NAMENODE -put CLITEST_DATA/data15bytes hdfs:///donotcountdir0/data15bytes</command>
  1675. <command>-fs NAMENODE -put CLITEST_DATA/data15bytes hdfs:///donotcountdir0/data15bytes</command>
  1676. <command>-fs NAMENODE -put CLITEST_DATA/data15bytes hdfs:///donotcountdir0/data15bytes</command>
  1677. <command>-fs NAMENODE -du -s hdfs:///dir*</command>
  1678. </test-commands>
  1679. <cleanup-commands>
  1680. <command>-fs NAMENODE -rm -r hdfs:///dir0</command>
  1681. <command>-fs NAMENODE -rm -r hdfs:///donotcountdir0</command>
  1682. </cleanup-commands>
  1683. <comparators>
  1684. <comparator>
  1685. <type>RegexpComparator</type>
  1686. <expected-output>^450\s+hdfs:///dir0</expected-output>
  1687. </comparator>
  1688. </comparators>
  1689. </test>
  1690. <test> <!-- TESTED -->
  1691. <description>dus: Test for Namenode's path - directories/files</description>
  1692. <test-commands>
  1693. <command>-fs NAMENODE -mkdir NAMENODE/dir0</command>
  1694. <command>-fs NAMENODE -mkdir NAMENODE/dir0/dir1</command>
  1695. <command>-fs NAMENODE -mkdir NAMENODE/dir0/dir1/dir1</command>
  1696. <command>-fs NAMENODE -mkdir NAMENODE/dir0/dir1/dir2</command>
  1697. <command>-fs NAMENODE -mkdir NAMENODE/dir0/dir2</command>
  1698. <command>-fs NAMENODE -mkdir NAMENODE/dir0/dir2/dir1</command>
  1699. <command>-fs NAMENODE -mkdir NAMENODE/dir0/dir2/dir2</command>
  1700. <command>-fs NAMENODE -touchz NAMENODE/dir0/file0</command>
  1701. <command>-fs NAMENODE -put CLITEST_DATA/data15bytes NAMENODE/dir0/dir1/data15bytes</command>
  1702. <command>-fs NAMENODE -put CLITEST_DATA/data30bytes NAMENODE/dir0/dir1/data30bytes</command>
  1703. <command>-fs NAMENODE -put CLITEST_DATA/data15bytes NAMENODE/dir0/dir2/data15bytes</command>
  1704. <command>-fs NAMENODE -put CLITEST_DATA/data30bytes NAMENODE/dir0/dir2/data30bytes</command>
  1705. <command>-fs NAMENODE -put CLITEST_DATA/data60bytes NAMENODE/dir0/dir1/dir1/data60bytes</command>
  1706. <command>-fs NAMENODE -put CLITEST_DATA/data120bytes NAMENODE/dir0/dir1/dir2/data120bytes</command>
  1707. <command>-fs NAMENODE -put CLITEST_DATA/data60bytes NAMENODE/dir0/dir2/dir1/data60bytes</command>
  1708. <command>-fs NAMENODE -put CLITEST_DATA/data120bytes NAMENODE/dir0/dir2/dir2/data120bytes</command>
  1709. <command>-fs NAMENODE -du -s NAMENODE/dir0</command>
  1710. </test-commands>
  1711. <cleanup-commands>
  1712. <command>-fs NAMENODE -rm -r NAMENODE/dir0</command>
  1713. </cleanup-commands>
  1714. <comparators>
  1715. <comparator>
  1716. <type>RegexpComparator</type>
  1717. <expected-output>^450\s+NAMENODE/dir0</expected-output>
  1718. </comparator>
  1719. </comparators>
  1720. </test>
  1721. <test> <!-- TESTED -->
  1722. <description>dus: Test for Namenode's path - directories/files using globbing</description>
  1723. <test-commands>
  1724. <command>-fs NAMENODE -mkdir NAMENODE/dir0</command>
  1725. <command>-fs NAMENODE -mkdir NAMENODE/dir0/dir1</command>
  1726. <command>-fs NAMENODE -mkdir NAMENODE/dir0/dir1/dir1</command>
  1727. <command>-fs NAMENODE -mkdir NAMENODE/dir0/dir1/dir2</command>
  1728. <command>-fs NAMENODE -mkdir NAMENODE/dir0/dir2</command>
  1729. <command>-fs NAMENODE -mkdir NAMENODE/dir0/dir2/dir1</command>
  1730. <command>-fs NAMENODE -mkdir NAMENODE/dir0/dir2/dir2</command>
  1731. <command>-fs NAMENODE -touchz NAMENODE/dir0/file0</command>
  1732. <command>-fs NAMENODE -put CLITEST_DATA/data15bytes NAMENODE/dir0/dir1/data15bytes</command>
  1733. <command>-fs NAMENODE -put CLITEST_DATA/data30bytes NAMENODE/dir0/dir1/data30bytes</command>
  1734. <command>-fs NAMENODE -put CLITEST_DATA/data15bytes NAMENODE/dir0/dir2/data15bytes</command>
  1735. <command>-fs NAMENODE -put CLITEST_DATA/data30bytes NAMENODE/dir0/dir2/data30bytes</command>
  1736. <command>-fs NAMENODE -put CLITEST_DATA/data60bytes NAMENODE/dir0/dir1/dir1/data60bytes</command>
  1737. <command>-fs NAMENODE -put CLITEST_DATA/data120bytes NAMENODE/dir0/dir1/dir2/data120bytes</command>
  1738. <command>-fs NAMENODE -put CLITEST_DATA/data60bytes NAMENODE/dir0/dir2/dir1/data60bytes</command>
  1739. <command>-fs NAMENODE -put CLITEST_DATA/data120bytes NAMENODE/dir0/dir2/dir2/data120bytes</command>
  1740. <command>-fs NAMENODE -mkdir NAMENODE/donotcountdir0</command>
  1741. <command>-fs NAMENODE -put CLITEST_DATA/data15bytes NAMENODE/donotcountdir0/data15bytes</command>
  1742. <command>-fs NAMENODE -put CLITEST_DATA/data15bytes NAMENODE/donotcountdir0/data15bytes</command>
  1743. <command>-fs NAMENODE -put CLITEST_DATA/data15bytes NAMENODE/donotcountdir0/data15bytes</command>
  1744. <command>-fs NAMENODE -put CLITEST_DATA/data15bytes NAMENODE/donotcountdir0/data15bytes</command>
  1745. <command>-fs NAMENODE -du -s NAMENODE/dir*</command>
  1746. </test-commands>
  1747. <cleanup-commands>
  1748. <command>-fs NAMENODE -rm -r NAMENODE/dir0</command>
  1749. <command>-fs NAMENODE -rm -r NAMENODE/donotcountdir0</command>
  1750. </cleanup-commands>
  1751. <comparators>
  1752. <comparator>
  1753. <type>RegexpComparator</type>
  1754. <expected-output>^450\s+NAMENODE/dir0</expected-output>
  1755. </comparator>
  1756. </comparators>
  1757. </test>
  1758. <!-- Tests for mv -->
  1759. <test> <!-- TESTED -->
  1760. <description>mv: file (absolute path) to file (absolute path)</description>
  1761. <test-commands>
  1762. <command>-fs NAMENODE -touchz /file1</command>
  1763. <command>-fs NAMENODE -mv /file1 /file2</command>
  1764. <command>-fs NAMENODE -ls /file*</command>
  1765. </test-commands>
  1766. <cleanup-commands>
  1767. <command>-fs NAMENODE -rm /file2</command>
  1768. </cleanup-commands>:
  1769. <comparators>
  1770. <comparator>
  1771. <type>RegexpComparator</type>
  1772. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/file2</expected-output>
  1773. </comparator>
  1774. <comparator>
  1775. <type>RegexpComparator</type>
  1776. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/file[^1]</expected-output>
  1777. </comparator>
  1778. </comparators>
  1779. </test>
  1780. <test> <!-- TESTED -->
  1781. <description>mv: file (absolute path) to file (relative path)</description>
  1782. <test-commands>
  1783. <command>-fs NAMENODE -touchz /file1</command>
  1784. <command>-fs NAMENODE -mv /file1 file2</command>
  1785. </test-commands>
  1786. <cleanup-commands>
  1787. <command>-fs NAMENODE -rm -r /file1</command>
  1788. </cleanup-commands>
  1789. <comparators>
  1790. <comparator>
  1791. <type>RegexpComparator</type>
  1792. <expected-output>^mv: `file2': No such file or directory: `NAMENODE/user/USERNAME/file2'</expected-output>
  1793. </comparator>
  1794. </comparators>
  1795. </test>
  1796. <test> <!-- TESTED -->
  1797. <description>mv: file (absolute path) to directory (absolute path); keep the same name at the destination</description>
  1798. <test-commands>
  1799. <command>-fs NAMENODE -touchz /file1</command>
  1800. <command>-fs NAMENODE -mkdir /dir0</command>
  1801. <command>-fs NAMENODE -mv /file1 /dir0</command>
  1802. <command>-fs NAMENODE -ls -R /dir0</command>
  1803. </test-commands>
  1804. <cleanup-commands>
  1805. <command>-fs NAMENODE -rm -r /dir0</command>
  1806. </cleanup-commands>
  1807. <comparators>
  1808. <comparator>
  1809. <type>RegexpComparator</type>
  1810. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/file1</expected-output>
  1811. </comparator>
  1812. </comparators>
  1813. </test>
  1814. <test> <!-- TESTED -->
  1815. <description>mv: file (absolute path) to directory (absolute path); keep the same name at the destination [ TIED to previous test ]</description>
  1816. <test-commands>
  1817. <command>-fs NAMENODE -ls /file1</command>
  1818. </test-commands>
  1819. <cleanup-commands>
  1820. </cleanup-commands>
  1821. <comparators>
  1822. <comparator>
  1823. <type>TokenComparator</type>
  1824. <expected-output>ls: `/file1': No such file or directory</expected-output>
  1825. </comparator>
  1826. </comparators>
  1827. </test>
  1828. <test> <!-- TESTED -->
  1829. <description>mv: file (absolute path) to directory (absolute path); change the name at the destination</description>
  1830. <test-commands>
  1831. <command>-fs NAMENODE -touchz /file1</command>
  1832. <command>-fs NAMENODE -mkdir /dir0</command>
  1833. <command>-fs NAMENODE -mv /file1 /dir0/file2</command>
  1834. <command>-fs NAMENODE -ls /dir0</command>
  1835. </test-commands>
  1836. <cleanup-commands>
  1837. <command>-fs NAMENODE -rm -r /dir0</command>
  1838. </cleanup-commands>
  1839. <comparators>
  1840. <comparator>
  1841. <type>RegexpComparator</type>
  1842. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/file2</expected-output>
  1843. </comparator>
  1844. </comparators>
  1845. </test>
  1846. <test> <!-- TESTED -->
  1847. <description>mv: file (absolute path) to directory (absolute path); change the name at the destination [ TIED to previous test ]</description>
  1848. <test-commands>
  1849. <command>-fs NAMENODE -ls /file1</command>
  1850. </test-commands>
  1851. <cleanup-commands>
  1852. </cleanup-commands>
  1853. <comparators>
  1854. <comparator>
  1855. <type>TokenComparator</type>
  1856. <expected-output>ls: `/file1': No such file or directory</expected-output>
  1857. </comparator>
  1858. </comparators>
  1859. </test>
  1860. <test> <!-- TESTED -->
  1861. <description>mv: files (absolute path) to directory (absolute path) using globbing</description>
  1862. <test-commands>
  1863. <command>-fs NAMENODE -touchz /file1</command>
  1864. <command>-fs NAMENODE -touchz /file2</command>
  1865. <command>-fs NAMENODE -touchz /file3</command>
  1866. <command>-fs NAMENODE -touchz /file4</command>
  1867. <command>-fs NAMENODE -mkdir /dir0</command>
  1868. <command>-fs NAMENODE -mv /file* /dir0</command>
  1869. <command>-fs NAMENODE -ls -R /*</command>
  1870. </test-commands>
  1871. <cleanup-commands>
  1872. <command>-fs NAMENODE -rm -r /dir0</command>
  1873. </cleanup-commands>
  1874. <comparators>
  1875. <comparator>
  1876. <type>RegexpComparator</type>
  1877. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/file1</expected-output>
  1878. </comparator>
  1879. <comparator>
  1880. <type>RegexpComparator</type>
  1881. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/file2</expected-output>
  1882. </comparator>
  1883. <comparator>
  1884. <type>RegexpComparator</type>
  1885. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/file3</expected-output>
  1886. </comparator>
  1887. <comparator>
  1888. <type>RegexpComparator</type>
  1889. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/file4</expected-output>
  1890. </comparator>
  1891. </comparators>
  1892. </test>
  1893. <test> <!-- TESTED -->
  1894. <description>mv: files (absolute path) to directory (absolute path) using globbing [ TIED to previous test ]</description>
  1895. <test-commands>
  1896. <command>-fs NAMENODE -ls /file*</command>
  1897. </test-commands>
  1898. <cleanup-commands>
  1899. </cleanup-commands>
  1900. <comparators>
  1901. <comparator>
  1902. <type>TokenComparator</type>
  1903. <expected-output>ls: `/file*': No such file or directory</expected-output>
  1904. </comparator>
  1905. </comparators>
  1906. </test>
  1907. <test> <!-- TESTED -->
  1908. <description>mv: file (relative) to file (relative)</description>
  1909. <test-commands>
  1910. <command>-fs NAMENODE -mkdir -p dir</command> <!-- make sure user home dir exists -->
  1911. <command>-fs NAMENODE -touchz file1</command>
  1912. <command>-fs NAMENODE -mv file1 file2</command>
  1913. <command>-fs NAMENODE -ls file*</command>
  1914. </test-commands>
  1915. <cleanup-commands>
  1916. <command>-fs NAMENODE -rm /user</command>
  1917. </cleanup-commands>
  1918. <comparators>
  1919. <comparator>
  1920. <type>RegexpComparator</type>
  1921. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*file2</expected-output>
  1922. </comparator>
  1923. <comparator>
  1924. <type>RegexpComparator</type>
  1925. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*file[^1]</expected-output>
  1926. </comparator>
  1927. </comparators>
  1928. </test>
  1929. <test> <!-- TESTED -->
  1930. <description>mv: moving file to file(rename in for hdfs:// path) </description>
  1931. <test-commands>
  1932. <command>-fs NAMENODE -touchz hdfs:///file1</command>
  1933. <command>-fs NAMENODE -mv hdfs:///file1 hdfs:///file2</command>
  1934. <command>-fs NAMENODE -ls hdfs:///file*</command>
  1935. </test-commands>
  1936. <cleanup-commands>
  1937. <command>-fs NAMENODE -rm hdfs:///file2</command>
  1938. </cleanup-commands>:
  1939. <comparators>
  1940. <comparator>
  1941. <type>RegexpComparator</type>
  1942. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///file2</expected-output>
  1943. </comparator>
  1944. <comparator>
  1945. <type>RegexpComparator</type>
  1946. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///file[^1]</expected-output>
  1947. </comparator>
  1948. </comparators>
  1949. </test>
  1950. <test> <!-- TESTED -->
  1951. <description>mv: moving file to directory (keep the same name at the destination) in hdfs:// path - </description>
  1952. <test-commands>
  1953. <command>-fs NAMENODE -touchz hdfs:///file1</command>
  1954. <command>-fs NAMENODE -mkdir hdfs:///dir0</command>
  1955. <command>-fs NAMENODE -mv hdfs:///file1 hdfs:///dir0</command>
  1956. <command>-fs NAMENODE -ls -R hdfs:///dir0</command>
  1957. </test-commands>
  1958. <cleanup-commands>
  1959. <command>-fs NAMENODE -rm -r hdfs:///dir0</command>
  1960. </cleanup-commands>
  1961. <comparators>
  1962. <comparator>
  1963. <type>RegexpComparator</type>
  1964. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir0/file1</expected-output>
  1965. </comparator>
  1966. </comparators>
  1967. </test>
  1968. <test> <!-- TESTED -->
  1969. <description>mv: moving files to directory in hdfs:// path - [ TIED to previous test ]</description>
  1970. <test-commands>
  1971. <command>-fs NAMENODE -ls hdfs:///file*</command>
  1972. </test-commands>
  1973. <cleanup-commands>
  1974. </cleanup-commands>
  1975. <comparators>
  1976. <comparator>
  1977. <type>TokenComparator</type>
  1978. <expected-output>ls: `hdfs:///file*': No such file or directory</expected-output>
  1979. </comparator>
  1980. </comparators>
  1981. </test>
  1982. <test> <!-- TESTED -->
  1983. <description>mv: moving file that does not exist in hdfs:// path </description>
  1984. <test-commands>
  1985. <command>-fs NAMENODE -mv hdfs:///file1 hdfs:///file2</command>
  1986. </test-commands>
  1987. <cleanup-commands>
  1988. </cleanup-commands>
  1989. <comparators>
  1990. <comparator>
  1991. <type>TokenComparator</type>
  1992. <expected-output>mv: `hdfs:///file1': No such file or directory</expected-output>
  1993. </comparator>
  1994. </comparators>
  1995. </test>
  1996. <test> <!-- TESTED -->
  1997. <description>mv: moving file to directory (different name at the destination) in hdfs:// path </description>
  1998. <test-commands>
  1999. <command>-fs NAMENODE -touchz hdfs:///file1</command>
  2000. <command>-fs NAMENODE -mkdir hdfs:///dir0</command>
  2001. <command>-fs NAMENODE -mv hdfs:///file1 hdfs:///dir0/file2</command>
  2002. <command>-fs NAMENODE -ls hdfs:///dir0</command>
  2003. </test-commands>
  2004. <cleanup-commands>
  2005. <command>-fs NAMENODE -rm -r hdfs:///dir0</command>
  2006. </cleanup-commands>
  2007. <comparators>
  2008. <comparator>
  2009. <type>RegexpComparator</type>
  2010. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir0/file2</expected-output>
  2011. </comparator>
  2012. </comparators>
  2013. </test>
  2014. <test> <!-- TESTED -->
  2015. <description>mv: moving file to directory (different name at the destination) in hdfs:// path [ TIED to previous test ]</description>
  2016. <test-commands>
  2017. <command>-fs NAMENODE -ls hdfs:///file1</command>
  2018. </test-commands>
  2019. <cleanup-commands>
  2020. </cleanup-commands>
  2021. <comparators>
  2022. <comparator>
  2023. <type>TokenComparator</type>
  2024. <expected-output>ls: `hdfs:///file1': No such file or directory</expected-output>
  2025. </comparator>
  2026. </comparators>
  2027. </test>
  2028. <test> <!-- TESTED -->
  2029. <description>mv: moving group of files to directory using globbing in hdfs:// path - </description>
  2030. <test-commands>
  2031. <command>-fs NAMENODE -touchz hdfs:///file1</command>
  2032. <command>-fs NAMENODE -touchz hdfs:///file2</command>
  2033. <command>-fs NAMENODE -touchz hdfs:///file3</command>
  2034. <command>-fs NAMENODE -mkdir hdfs:///dir0</command>
  2035. <command>-fs NAMENODE -mv hdfs:///file* hdfs:///dir0</command>
  2036. <command>-fs NAMENODE -ls -R hdfs:///*</command>
  2037. </test-commands>
  2038. <cleanup-commands>
  2039. <command>-fs NAMENODE -rm -r hdfs:///dir0</command>
  2040. </cleanup-commands>
  2041. <comparators>
  2042. <comparator>
  2043. <type>RegexpComparator</type>
  2044. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir0/file1</expected-output>
  2045. </comparator>
  2046. <comparator>
  2047. <type>RegexpComparator</type>
  2048. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir0/file2</expected-output>
  2049. </comparator>
  2050. <comparator>
  2051. <type>RegexpComparator</type>
  2052. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir0/file3</expected-output>
  2053. </comparator>
  2054. </comparators>
  2055. </test>
  2056. <test> <!-- TESTED -->
  2057. <description>mv: moving files to directory using globbing in hdfs:// [ TIED to previous test ]</description>
  2058. <test-commands>
  2059. <command>-fs NAMENODE -ls hdfs:///file*</command>
  2060. </test-commands>
  2061. <cleanup-commands>
  2062. </cleanup-commands>
  2063. <comparators>
  2064. <comparator>
  2065. <type>TokenComparator</type>
  2066. <expected-output>ls: `hdfs:///file*': No such file or directory</expected-output>
  2067. </comparator>
  2068. </comparators>
  2069. </test>
  2070. <test> <!-- TESTED -->
  2071. <description>mv: moving file to file(rename) in Namenode's path - </description>
  2072. <test-commands>
  2073. <command>-fs NAMENODE -touchz NAMENODE/file1</command>
  2074. <command>-fs NAMENODE -mv NAMENODE/file1 NAMENODE/file2</command>
  2075. <command>-fs NAMENODE -ls NAMENODE/file*</command>
  2076. </test-commands>
  2077. <cleanup-commands>
  2078. <command>-fs NAMENODE -rm NAMENODE/file2</command>
  2079. </cleanup-commands>:
  2080. <comparators>
  2081. <comparator>
  2082. <type>RegexpComparator</type>
  2083. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/file2</expected-output>
  2084. </comparator>
  2085. <comparator>
  2086. <type>RegexpComparator</type>
  2087. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/file[^1]</expected-output>
  2088. </comparator>
  2089. </comparators>
  2090. </test>
  2091. <test> <!-- TESTED -->
  2092. <description>mv: moving file to directory (keep the same name at the destination) in Namenode's path </description>
  2093. <test-commands>
  2094. <command>-fs NAMENODE -touchz NAMENODE/file1</command>
  2095. <command>-fs NAMENODE -mkdir NAMENODE/dir0</command>
  2096. <command>-fs NAMENODE -mv NAMENODE/file1 NAMENODE/dir0</command>
  2097. <command>-fs NAMENODE -ls -R NAMENODE/dir0</command>
  2098. </test-commands>
  2099. <cleanup-commands>
  2100. <command>-fs NAMENODE -rm -r NAMENODE/dir0</command>
  2101. </cleanup-commands>
  2102. <comparators>
  2103. <comparator>
  2104. <type>RegexpComparator</type>
  2105. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir0/file1</expected-output>
  2106. </comparator>
  2107. </comparators>
  2108. </test>
  2109. <test> <!-- TESTED -->
  2110. <description>mv: moving files to directory in Namenode's path - [ TIED to previous test ]</description>
  2111. <test-commands>
  2112. <command>-fs NAMENODE -ls NAMENODE/file1</command>
  2113. </test-commands>
  2114. <cleanup-commands>
  2115. </cleanup-commands>
  2116. <comparators>
  2117. <comparator>
  2118. <type>RegexpComparator</type>
  2119. <expected-output>^ls: `hdfs://\w+[-.a-z0-9]*:[0-9]+/file1': No such file or directory</expected-output>
  2120. </comparator>
  2121. </comparators>
  2122. </test>
  2123. <test> <!-- TESTED -->
  2124. <description>mv: moving file that does not exist in Namenode's path </description>
  2125. <test-commands>
  2126. <command>-fs NAMENODE -mv NAMENODE/file1 NAMENODE/file2</command>
  2127. </test-commands>
  2128. <cleanup-commands>
  2129. </cleanup-commands>
  2130. <comparators>
  2131. <comparator>
  2132. <type>RegexpComparator</type>
  2133. <expected-output>^mv: `hdfs://\w+[-.a-z0-9]*:[0-9]+/file1': No such file or directory</expected-output>
  2134. </comparator>
  2135. </comparators>
  2136. </test>
  2137. <test> <!-- TESTED -->
  2138. <description>mv: moving file to directory (different name at the destination) in Namenode's path </description>
  2139. <test-commands>
  2140. <command>-fs NAMENODE -touchz NAMENODE/file1</command>
  2141. <command>-fs NAMENODE -mkdir NAMENODE/dir0</command>
  2142. <command>-fs NAMENODE -mv NAMENODE/file1 NAMENODE/dir0/file2</command>
  2143. <command>-fs NAMENODE -ls NAMENODE/dir0</command>
  2144. </test-commands>
  2145. <cleanup-commands>
  2146. <command>-fs NAMENODE -rm -r NAMENODE/dir0</command>
  2147. </cleanup-commands>
  2148. <comparators>
  2149. <comparator>
  2150. <type>RegexpComparator</type>
  2151. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir0/file2</expected-output>
  2152. </comparator>
  2153. </comparators>
  2154. </test>
  2155. <test> <!-- TESTED -->
  2156. <description>mv: moving file to directory (different name at the destination) in Namenode's path [ TIED to previous test ]</description>
  2157. <test-commands>
  2158. <command>-fs NAMENODE -ls NAMENODE/file1</command>
  2159. </test-commands>
  2160. <cleanup-commands>
  2161. </cleanup-commands>
  2162. <comparators>
  2163. <comparator>
  2164. <type>RegexpComparator</type>
  2165. <expected-output>^ls: `NAMENODE/file1': No such file or directory</expected-output>
  2166. </comparator>
  2167. </comparators>
  2168. </test>
  2169. <test> <!-- TESTED -->
  2170. <description>mv: moving group of files to directory using globbing in Namenode's path </description>
  2171. <test-commands>
  2172. <command>-fs NAMENODE -touchz NAMENODE/file1</command>
  2173. <command>-fs NAMENODE -touchz NAMENODE/file2</command>
  2174. <command>-fs NAMENODE -touchz NAMENODE/file3</command>
  2175. <command>-fs NAMENODE -mkdir NAMENODE/dir0</command>
  2176. <command>-fs NAMENODE -mv NAMENODE/file* NAMENODE/dir0</command>
  2177. <command>-fs NAMENODE -ls -R NAMENODE/*</command>
  2178. </test-commands>
  2179. <cleanup-commands>
  2180. <command>-fs NAMENODE -rm -r NAMENODE/dir0</command>
  2181. </cleanup-commands>
  2182. <comparators>
  2183. <comparator>
  2184. <type>RegexpComparator</type>
  2185. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir0/file1</expected-output>
  2186. </comparator>
  2187. <comparator>
  2188. <type>RegexpComparator</type>
  2189. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir0/file2</expected-output>
  2190. </comparator>
  2191. <comparator>
  2192. <type>RegexpComparator</type>
  2193. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir0/file3</expected-output>
  2194. </comparator>
  2195. </comparators>
  2196. </test>
  2197. <test> <!-- TESTED -->
  2198. <description>mv: moving files to directory using globbing in Namenode's path [ TIED to previous test ]</description>
  2199. <test-commands>
  2200. <command>-fs NAMENODE -ls NAMENODE/file*</command>
  2201. </test-commands>
  2202. <cleanup-commands>
  2203. </cleanup-commands>
  2204. <comparators>
  2205. <comparator>
  2206. <type>RegexpComparator</type>
  2207. <expected-output>^ls: `hdfs://\w+[-.a-z0-9]*:[0-9]+/file\*': No such file or directory</expected-output>
  2208. </comparator>
  2209. </comparators>
  2210. </test>
  2211. <test> <!-- TESTED -->
  2212. <description>mv: moving directory to directory in hdfs:// path </description>
  2213. <test-commands>
  2214. <command>-fs NAMENODE -mkdir hdfs:///dir0</command>
  2215. <command>-fs NAMENODE -mkdir hdfs:///dir1</command>
  2216. <command>-fs NAMENODE -touchz hdfs:///dir0/file1</command>
  2217. <command>-fs NAMENODE -mv hdfs:///dir0 hdfs:///dir1</command>
  2218. <command>-fs NAMENODE -ls -R hdfs:///dir1</command>
  2219. </test-commands>
  2220. <cleanup-commands>
  2221. <command>-fs NAMENODE -rm hdfs:///dir1</command>
  2222. </cleanup-commands>
  2223. <comparators>
  2224. <comparator>
  2225. <type>RegexpComparator</type>
  2226. <expected-output>^drwxr-xr-x( )*-( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir1/dir0</expected-output>
  2227. </comparator>
  2228. <comparator>
  2229. <type>RegexpComparator</type>
  2230. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir1/dir0/file1</expected-output>
  2231. </comparator>
  2232. </comparators>
  2233. </test>
  2234. <test> <!-- TESTED -->
  2235. <description>mv: moving directory to directory in Namenode's path </description>
  2236. <test-commands>
  2237. <command>-fs NAMENODE -mkdir NAMENODE/dir0</command>
  2238. <command>-fs NAMENODE -mkdir NAMENODE/dir1</command>
  2239. <command>-fs NAMENODE -touchz NAMENODE/dir0/file1</command>
  2240. <command>-fs NAMENODE -mv NAMENODE/dir0 NAMENODE/dir1</command>
  2241. <command>-fs NAMENODE -ls -R NAMENODE/dir1</command>
  2242. </test-commands>
  2243. <cleanup-commands>
  2244. <command>-fs NAMENODE -rm NAMENODE/dir1</command>
  2245. </cleanup-commands>
  2246. <comparators>
  2247. <comparator>
  2248. <type>RegexpComparator</type>
  2249. <expected-output>^drwxr-xr-x( )*-( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir1/dir0</expected-output>
  2250. </comparator>
  2251. <comparator>
  2252. <type>RegexpComparator</type>
  2253. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir1/dir0/file1</expected-output>
  2254. </comparator>
  2255. </comparators>
  2256. </test>
  2257. <!-- Tests for cp-->
  2258. <test> <!-- TESTED -->
  2259. <description>cp: file (absolute path) to file (absolute path)</description>
  2260. <test-commands>
  2261. <command>-fs NAMENODE -touchz /file1</command>
  2262. <command>-fs NAMENODE -cp /file1 /file2</command>
  2263. <command>-fs NAMENODE -ls /file*</command>
  2264. </test-commands>
  2265. <cleanup-commands>
  2266. <command>-fs NAMENODE -rm /file*</command>
  2267. </cleanup-commands>:
  2268. <comparators>
  2269. <comparator>
  2270. <type>RegexpComparator</type>
  2271. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/file1</expected-output>
  2272. </comparator>
  2273. <comparator>
  2274. <type>RegexpComparator</type>
  2275. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/file2</expected-output>
  2276. </comparator>
  2277. </comparators>
  2278. </test>
  2279. <test> <!-- TESTED -->
  2280. <description>cp: file (absolute path) to file (relative path)</description>
  2281. <test-commands>
  2282. <command>-fs NAMENODE -mkdir -p dir</command> <!-- make sure user home dir exists -->
  2283. <command>-fs NAMENODE -touchz /file1</command>
  2284. <command>-fs NAMENODE -cp /file1 file2</command>
  2285. <command>-fs NAMENODE -ls /file1 file2</command>
  2286. </test-commands>
  2287. <cleanup-commands>
  2288. <command>-fs NAMENODE -rm -r /file1 file2</command>
  2289. </cleanup-commands>
  2290. <comparators>
  2291. <comparator>
  2292. <type>RegexpComparator</type>
  2293. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/file1</expected-output>
  2294. </comparator>
  2295. <comparator>
  2296. <type>RegexpComparator</type>
  2297. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*file2</expected-output>
  2298. </comparator>
  2299. </comparators>
  2300. </test>
  2301. <test> <!-- TESTED -->
  2302. <description>cp: file (relative path) to file (absolute path)</description>
  2303. <test-commands>
  2304. <command>-fs NAMENODE -mkdir -p dir</command> <!-- make sure user home dir exists -->
  2305. <command>-fs NAMENODE -touchz file1</command>
  2306. <command>-fs NAMENODE -cp file1 /file2</command>
  2307. <command>-fs NAMENODE -ls file1 /file2</command>
  2308. </test-commands>
  2309. <cleanup-commands>
  2310. <command>-fs NAMENODE -rm -r file1 /file2</command>
  2311. </cleanup-commands>
  2312. <comparators>
  2313. <comparator>
  2314. <type>RegexpComparator</type>
  2315. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*file1</expected-output>
  2316. </comparator>
  2317. <comparator>
  2318. <type>RegexpComparator</type>
  2319. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/file2</expected-output>
  2320. </comparator>
  2321. </comparators>
  2322. </test>
  2323. <test> <!-- TESTED -->
  2324. <description>cp: file (relative path) to file (relative path)</description>
  2325. <test-commands>
  2326. <command>-fs NAMENODE -mkdir -p dir</command> <!-- make sure user home dir exists -->
  2327. <command>-fs NAMENODE -touchz file1</command>
  2328. <command>-fs NAMENODE -cp file1 file2</command>
  2329. <command>-fs NAMENODE -ls file1 file2</command>
  2330. </test-commands>
  2331. <cleanup-commands>
  2332. <command>-fs NAMENODE -rm -r file1 file2</command>
  2333. </cleanup-commands>
  2334. <comparators>
  2335. <comparator>
  2336. <type>RegexpComparator</type>
  2337. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*file1</expected-output>
  2338. </comparator>
  2339. <comparator>
  2340. <type>RegexpComparator</type>
  2341. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*file2</expected-output>
  2342. </comparator>
  2343. </comparators>
  2344. </test>
  2345. <test> <!-- TESTED -->
  2346. <description>cp: file (absolute path) to directory (absolute path); keep the same name at the destination</description>
  2347. <test-commands>
  2348. <command>-fs NAMENODE -touchz /file1</command>
  2349. <command>-fs NAMENODE -mkdir /dir0</command>
  2350. <command>-fs NAMENODE -cp /file1 /dir0</command>
  2351. <command>-fs NAMENODE -ls /file1 /dir0</command>
  2352. </test-commands>
  2353. <cleanup-commands>
  2354. <command>-fs NAMENODE -rm -r /dir0</command>
  2355. </cleanup-commands>
  2356. <comparators>
  2357. <comparator>
  2358. <type>RegexpComparator</type>
  2359. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/file1</expected-output>
  2360. </comparator>
  2361. <comparator>
  2362. <type>RegexpComparator</type>
  2363. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/file1</expected-output>
  2364. </comparator>
  2365. </comparators>
  2366. </test>
  2367. <test> <!-- TESTED -->
  2368. <description>cp: file (absolute path) to directory (absolute path); change the name at the destination</description>
  2369. <test-commands>
  2370. <command>-fs NAMENODE -touchz /file1</command>
  2371. <command>-fs NAMENODE -mkdir /dir0</command>
  2372. <command>-fs NAMENODE -cp /file1 /dir0/file2</command>
  2373. <command>-fs NAMENODE -ls /file1 /dir0</command>
  2374. </test-commands>
  2375. <cleanup-commands>
  2376. <command>-fs NAMENODE -rm -r /dir0</command>
  2377. </cleanup-commands>
  2378. <comparators>
  2379. <comparator>
  2380. <type>RegexpComparator</type>
  2381. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/file1</expected-output>
  2382. </comparator>
  2383. <comparator>
  2384. <type>RegexpComparator</type>
  2385. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/file2</expected-output>
  2386. </comparator>
  2387. </comparators>
  2388. </test>
  2389. <test> <!-- TESTED -->
  2390. <description>cp: files to directory (absolute path) using globbing</description>
  2391. <test-commands>
  2392. <command>-fs NAMENODE -touchz /file1</command>
  2393. <command>-fs NAMENODE -touchz /file2</command>
  2394. <command>-fs NAMENODE -touchz /file3</command>
  2395. <command>-fs NAMENODE -touchz /file4</command>
  2396. <command>-fs NAMENODE -mkdir /dir0</command>
  2397. <command>-fs NAMENODE -cp /file* /dir0</command>
  2398. <command>-fs NAMENODE -ls -R /*</command>
  2399. </test-commands>
  2400. <cleanup-commands>
  2401. <command>-fs NAMENODE -rm -r /dir0</command>
  2402. </cleanup-commands>
  2403. <comparators>
  2404. <comparator>
  2405. <type>RegexpComparator</type>
  2406. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/file1</expected-output>
  2407. </comparator>
  2408. <comparator>
  2409. <type>RegexpComparator</type>
  2410. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/file2</expected-output>
  2411. </comparator>
  2412. <comparator>
  2413. <type>RegexpComparator</type>
  2414. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/file3</expected-output>
  2415. </comparator>
  2416. <comparator>
  2417. <type>RegexpComparator</type>
  2418. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/file4</expected-output>
  2419. </comparator>
  2420. <comparator>
  2421. <type>RegexpComparator</type>
  2422. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/file1</expected-output>
  2423. </comparator>
  2424. <comparator>
  2425. <type>RegexpComparator</type>
  2426. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/file2</expected-output>
  2427. </comparator>
  2428. <comparator>
  2429. <type>RegexpComparator</type>
  2430. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/file3</expected-output>
  2431. </comparator>
  2432. <comparator>
  2433. <type>RegexpComparator</type>
  2434. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/file4</expected-output>
  2435. </comparator>
  2436. </comparators>
  2437. </test>
  2438. <test> <!-- TESTED -->
  2439. <description>cp: files to directory (absolute path) without globbing</description>
  2440. <test-commands>
  2441. <command>-fs NAMENODE -touchz /file1</command>
  2442. <command>-fs NAMENODE -touchz /file2</command>
  2443. <command>-fs NAMENODE -touchz /file3</command>
  2444. <command>-fs NAMENODE -touchz /file4</command>
  2445. <command>-fs NAMENODE -mkdir /dir0</command>
  2446. <command>-fs NAMENODE -cp /file1 /file2 /file3 /file4 /dir0</command>
  2447. <command>-fs NAMENODE -ls -R /*</command>
  2448. </test-commands>
  2449. <cleanup-commands>
  2450. <command>-fs NAMENODE -rm -r /dir0 /file*</command>
  2451. </cleanup-commands>
  2452. <comparators>
  2453. <comparator>
  2454. <type>RegexpComparator</type>
  2455. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/file1</expected-output>
  2456. </comparator>
  2457. <comparator>
  2458. <type>RegexpComparator</type>
  2459. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/file2</expected-output>
  2460. </comparator>
  2461. <comparator>
  2462. <type>RegexpComparator</type>
  2463. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/file3</expected-output>
  2464. </comparator>
  2465. <comparator>
  2466. <type>RegexpComparator</type>
  2467. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/file4</expected-output>
  2468. </comparator>
  2469. <comparator>
  2470. <type>RegexpComparator</type>
  2471. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/file1</expected-output>
  2472. </comparator>
  2473. <comparator>
  2474. <type>RegexpComparator</type>
  2475. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/file2</expected-output>
  2476. </comparator>
  2477. <comparator>
  2478. <type>RegexpComparator</type>
  2479. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/file3</expected-output>
  2480. </comparator>
  2481. <comparator>
  2482. <type>RegexpComparator</type>
  2483. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/file4</expected-output>
  2484. </comparator>
  2485. </comparators>
  2486. </test>
  2487. <test> <!-- TESTED -->
  2488. <description>cp: copying non existent file (absolute path)</description>
  2489. <test-commands>
  2490. <command>-fs NAMENODE -cp /file /file1</command>
  2491. </test-commands>
  2492. <cleanup-commands>
  2493. <command>-fs NAMENODE -rm -r /user</command>
  2494. </cleanup-commands>:
  2495. <comparators>
  2496. <comparator>
  2497. <type>RegexpComparator</type>
  2498. <expected-output>^cp: `/file': No such file or directory</expected-output>
  2499. </comparator>
  2500. </comparators>
  2501. </test>
  2502. <test> <!-- TESTED -->
  2503. <description>cp: copying non existent file (relative path)</description>
  2504. <test-commands>
  2505. <command>-fs NAMENODE -cp touchz test</command>
  2506. <command>-fs NAMENODE -cp file1 file2</command>
  2507. </test-commands>
  2508. <cleanup-commands>
  2509. <command>-fs NAMENODE -rm -r /user</command>
  2510. </cleanup-commands>:
  2511. <comparators>
  2512. <comparator>
  2513. <type>RegexpComparator</type>
  2514. <expected-output>^cp: `file2': No such file or directory: `NAMENODE/user/USERNAME/file2'</expected-output>
  2515. </comparator>
  2516. </comparators>
  2517. </test>
  2518. <test> <!-- TESTED -->
  2519. <description>cp: files to an existent file using globbing</description>
  2520. <test-commands>
  2521. <command>-fs NAMENODE -touchz /file1</command>
  2522. <command>-fs NAMENODE -touchz /file2</command>
  2523. <command>-fs NAMENODE -touchz /file3</command>
  2524. <command>-fs NAMENODE -touchz /file4</command>
  2525. <command>-fs NAMENODE -touchz /file5</command>
  2526. <command>-fs NAMENODE -cp /file* /file5</command>
  2527. </test-commands>
  2528. <cleanup-commands>
  2529. <command>-fs NAMENODE -rm -r /user</command>
  2530. </cleanup-commands>
  2531. <comparators>
  2532. <comparator>
  2533. <type>RegexpComparator</type>
  2534. <expected-output>^cp: `/file5': Is not a directory</expected-output>
  2535. </comparator>
  2536. </comparators>
  2537. </test>
  2538. <test> <!-- TESTED -->
  2539. <description>cp: files to an existent file without globbing</description>
  2540. <test-commands>
  2541. <command>-fs NAMENODE -touchz /file1</command>
  2542. <command>-fs NAMENODE -touchz /file2</command>
  2543. <command>-fs NAMENODE -touchz /file3</command>
  2544. <command>-fs NAMENODE -touchz /file4</command>
  2545. <command>-fs NAMENODE -touchz /file5</command>
  2546. <command>-fs NAMENODE -cp /file1 /file2 /file3 /file4 /file5</command>
  2547. </test-commands>
  2548. <cleanup-commands>
  2549. <command>-fs NAMENODE -rm -r /user</command>
  2550. </cleanup-commands>
  2551. <comparators>
  2552. <comparator>
  2553. <type>RegexpComparator</type>
  2554. <expected-output>^cp: `/file5': Is not a directory</expected-output>
  2555. </comparator>
  2556. </comparators>
  2557. </test>
  2558. <test> <!-- TESTED -->
  2559. <description>cp: files to a non existent directory using globbing</description>
  2560. <test-commands>
  2561. <command>-fs NAMENODE -touchz /file1</command>
  2562. <command>-fs NAMENODE -touchz /file2</command>
  2563. <command>-fs NAMENODE -touchz /file3</command>
  2564. <command>-fs NAMENODE -touchz /file4</command>
  2565. <command>-fs NAMENODE -cp /file* dir</command>
  2566. </test-commands>
  2567. <cleanup-commands>
  2568. <command>-fs NAMENODE -rm -r /user</command>
  2569. </cleanup-commands>
  2570. <comparators>
  2571. <comparator>
  2572. <type>RegexpComparator</type>
  2573. <expected-output>^cp: `dir': No such file or directory</expected-output>
  2574. </comparator>
  2575. </comparators>
  2576. </test>
  2577. <test> <!-- TESTED -->
  2578. <description>cp: files to a non existent directory without globbing</description>
  2579. <test-commands>
  2580. <command>-fs NAMENODE -touchz /file1</command>
  2581. <command>-fs NAMENODE -touchz /file2</command>
  2582. <command>-fs NAMENODE -touchz /file3</command>
  2583. <command>-fs NAMENODE -touchz /file4</command>
  2584. <command>-fs NAMENODE -cp /file1 /file2 /file3 /file4 dir</command>
  2585. </test-commands>
  2586. <cleanup-commands>
  2587. <command>-fs NAMENODE -rm -r /user</command>
  2588. </cleanup-commands>
  2589. <comparators>
  2590. <comparator>
  2591. <type>RegexpComparator</type>
  2592. <expected-output>^cp: `dir': No such file or directory</expected-output>
  2593. </comparator>
  2594. </comparators>
  2595. </test>
  2596. <test> <!-- TESTED -->
  2597. <description>cp: file to file copy in hdfs:// path </description>
  2598. <test-commands>
  2599. <command>-fs NAMENODE -touchz hdfs:///file1</command>
  2600. <command>-fs NAMENODE -cp hdfs:///file1 hdfs:///file2</command>
  2601. <command>-fs NAMENODE -ls hdfs:///file*</command>
  2602. </test-commands>
  2603. <cleanup-commands>
  2604. <command>-fs NAMENODE -rm hdfs:///file*</command>
  2605. </cleanup-commands>:
  2606. <comparators>
  2607. <comparator>
  2608. <type>RegexpComparator</type>
  2609. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///file1</expected-output>
  2610. </comparator>
  2611. <comparator>
  2612. <type>RegexpComparator</type>
  2613. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///file2</expected-output>
  2614. </comparator>
  2615. </comparators>
  2616. </test>
  2617. <test> <!-- TESTED -->
  2618. <description>cp: file to directory copy (same name at the destination) in hdfs:// path</description>
  2619. <test-commands>
  2620. <command>-fs NAMENODE -touchz hdfs:///file1</command>
  2621. <command>-fs NAMENODE -mkdir hdfs:///dir0</command>
  2622. <command>-fs NAMENODE -cp hdfs:///file1 hdfs:///dir0</command>
  2623. <command>-fs NAMENODE -ls hdfs:///file1 hdfs:///dir0</command>
  2624. </test-commands>
  2625. <cleanup-commands>
  2626. <command>-fs NAMENODE -rm -r hdfs:///dir0/ hdfs://file1</command>
  2627. </cleanup-commands>
  2628. <comparators>
  2629. <comparator>
  2630. <type>RegexpComparator</type>
  2631. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///file1</expected-output>
  2632. </comparator>
  2633. <comparator>
  2634. <type>RegexpComparator</type>
  2635. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir0/file1</expected-output>
  2636. </comparator>
  2637. </comparators>
  2638. </test>
  2639. <test> <!-- TESTED -->
  2640. <description>cp: file to directory (different name at the destination) in hdfs:// path </description>
  2641. <test-commands>
  2642. <command>-fs NAMENODE -touchz hdfs:///file1</command>
  2643. <command>-fs NAMENODE -mkdir hdfs:///dir0</command>
  2644. <command>-fs NAMENODE -cp hdfs:///file1 hdfs:///dir0/file2</command>
  2645. <command>-fs NAMENODE -ls hdfs:///file1 hdfs:///dir0</command>
  2646. </test-commands>
  2647. <cleanup-commands>
  2648. <command>-fs NAMENODE -rm -r hdfs:///dir0/</command>
  2649. </cleanup-commands>
  2650. <comparators>
  2651. <comparator>
  2652. <type>RegexpComparator</type>
  2653. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///file1</expected-output>
  2654. </comparator>
  2655. <comparator>
  2656. <type>RegexpComparator</type>
  2657. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir0/file2</expected-output>
  2658. </comparator>
  2659. </comparators>
  2660. </test>
  2661. <test> <!-- TESTED -->
  2662. <description>cp: files to directory using globbing in hdfs:// path</description>
  2663. <test-commands>
  2664. <command>-fs NAMENODE -touchz hdfs:///file1</command>
  2665. <command>-fs NAMENODE -touchz hdfs:///file2</command>
  2666. <command>-fs NAMENODE -touchz hdfs:///file3</command>
  2667. <command>-fs NAMENODE -mkdir hdfs:///dir0</command>
  2668. <command>-fs NAMENODE -cp hdfs:///file* hdfs:///dir0</command>
  2669. <command>-fs NAMENODE -ls -R hdfs:///*</command>
  2670. </test-commands>
  2671. <cleanup-commands>
  2672. <command>-fs NAMENODE -rm -r hdfs:///file*</command>
  2673. <command>-fs NAMENODE -rm -r hdfs:///dir0/</command>
  2674. </cleanup-commands>
  2675. <comparators>
  2676. <comparator>
  2677. <type>RegexpComparator</type>
  2678. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///file1</expected-output>
  2679. </comparator>
  2680. <comparator>
  2681. <type>RegexpComparator</type>
  2682. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///file2</expected-output>
  2683. </comparator>
  2684. <comparator>
  2685. <type>RegexpComparator</type>
  2686. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///file3</expected-output>
  2687. </comparator>
  2688. <comparator>
  2689. <type>RegexpComparator</type>
  2690. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir0/file1</expected-output>
  2691. </comparator>
  2692. <comparator>
  2693. <type>RegexpComparator</type>
  2694. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir0/file2</expected-output>
  2695. </comparator>
  2696. <comparator>
  2697. <type>RegexpComparator</type>
  2698. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir0/file3</expected-output>
  2699. </comparator>
  2700. </comparators>
  2701. </test>
  2702. <test> <!-- TESTED -->
  2703. <description>cp: files to directory in hdfs:// path without globbing</description>
  2704. <test-commands>
  2705. <command>-fs NAMENODE -touchz hdfs:///file1</command>
  2706. <command>-fs NAMENODE -touchz hdfs:///file2</command>
  2707. <command>-fs NAMENODE -touchz hdfs:///file3</command>
  2708. <command>-fs NAMENODE -mkdir hdfs:///dir0</command>
  2709. <command>-fs NAMENODE -cp hdfs:///file1 hdfs:///file2 hdfs:///file3 hdfs:///dir0</command>
  2710. <command>-fs NAMENODE -ls -R hdfs:///*</command>
  2711. </test-commands>
  2712. <cleanup-commands>
  2713. <command>-fs NAMENODE -rm -r hdfs:///file*</command>
  2714. <command>-fs NAMENODE -rm -r hdfs:///dir0/</command>
  2715. </cleanup-commands>
  2716. <comparators>
  2717. <comparator>
  2718. <type>RegexpComparator</type>
  2719. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///file1</expected-output>
  2720. </comparator>
  2721. <comparator>
  2722. <type>RegexpComparator</type>
  2723. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///file2</expected-output>
  2724. </comparator>
  2725. <comparator>
  2726. <type>RegexpComparator</type>
  2727. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///file3</expected-output>
  2728. </comparator>
  2729. <comparator>
  2730. <type>RegexpComparator</type>
  2731. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir0/file1</expected-output>
  2732. </comparator>
  2733. <comparator>
  2734. <type>RegexpComparator</type>
  2735. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir0/file2</expected-output>
  2736. </comparator>
  2737. <comparator>
  2738. <type>RegexpComparator</type>
  2739. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir0/file3</expected-output>
  2740. </comparator>
  2741. </comparators>
  2742. </test>
  2743. <test> <!-- TESTED -->
  2744. <description>cp: copying non existent file in hdfs:// path </description>
  2745. <test-commands>
  2746. <command>-fs NAMENODE -cp hdfs:///file hdfs:///file1</command>
  2747. </test-commands>
  2748. <cleanup-commands>
  2749. </cleanup-commands>:
  2750. <comparators>
  2751. <comparator>
  2752. <type>RegexpComparator</type>
  2753. <expected-output>^cp: `hdfs:///file': No such file or directory</expected-output>
  2754. </comparator>
  2755. </comparators>
  2756. </test>
  2757. <test> <!-- TESTED -->
  2758. <description>cp: copying files to an existent file in hdfs:// path using globbing</description>
  2759. <test-commands>
  2760. <command>-fs NAMENODE -touchz hdfs:///file1</command>
  2761. <command>-fs NAMENODE -touchz hdfs:///file2</command>
  2762. <command>-fs NAMENODE -touchz hdfs:///file3</command>
  2763. <command>-fs NAMENODE -touchz hdfs:///file4</command>
  2764. <command>-fs NAMENODE -touchz hdfs:///file5</command>
  2765. <command>-fs NAMENODE -cp hdfs:///file* hdfs:///file5</command>
  2766. </test-commands>
  2767. <cleanup-commands>
  2768. <command>-fs NAMENODE -rm -r hdfs:///file*</command>
  2769. </cleanup-commands>
  2770. <comparators>
  2771. <comparator>
  2772. <type>RegexpComparator</type>
  2773. <expected-output>^cp: `hdfs:///file5': Is not a directory</expected-output>
  2774. </comparator>
  2775. </comparators>
  2776. </test>
  2777. <test> <!-- TESTED -->
  2778. <description>cp: copying files to an existent file in hdfs:// path without globbing</description>
  2779. <test-commands>
  2780. <command>-fs NAMENODE -touchz hdfs:///file1</command>
  2781. <command>-fs NAMENODE -touchz hdfs:///file2</command>
  2782. <command>-fs NAMENODE -touchz hdfs:///file3</command>
  2783. <command>-fs NAMENODE -touchz hdfs:///file4</command>
  2784. <command>-fs NAMENODE -touchz hdfs:///file5</command>
  2785. <command>-fs NAMENODE -cp hdfs:///file1 hdfs:///file2 hdfs:///file3 hdfs:///file4 hdfs:///file5</command>
  2786. </test-commands>
  2787. <cleanup-commands>
  2788. <command>-fs NAMENODE -rm -r hdfs:///file*</command>
  2789. </cleanup-commands>
  2790. <comparators>
  2791. <comparator>
  2792. <type>RegexpComparator</type>
  2793. <expected-output>^cp: `hdfs:///file5': Is not a directory</expected-output>
  2794. </comparator>
  2795. </comparators>
  2796. </test>
  2797. <test> <!-- TESTED -->
  2798. <description>cp: copying files to a non existent directory in hdfs:// path using globbing</description>
  2799. <test-commands>
  2800. <command>-fs NAMENODE -touchz hdfs:///file1</command>
  2801. <command>-fs NAMENODE -touchz hdfs:///file2</command>
  2802. <command>-fs NAMENODE -touchz hdfs:///file3</command>
  2803. <command>-fs NAMENODE -touchz hdfs:///file4</command>
  2804. <command>-fs NAMENODE -cp hdfs:///file* hdfs:///dir</command>
  2805. </test-commands>
  2806. <cleanup-commands>
  2807. <command>-fs NAMENODE -rm -r hdfs:///file*</command>
  2808. </cleanup-commands>
  2809. <comparators>
  2810. <comparator>
  2811. <type>RegexpComparator</type>
  2812. <expected-output>^cp: `hdfs:///dir': No such file or directory</expected-output>
  2813. </comparator>
  2814. </comparators>
  2815. </test>
  2816. <test> <!-- TESTED -->
  2817. <description>cp: copying files to a non existent directory in hdfs:// path without globbing</description>
  2818. <test-commands>
  2819. <command>-fs NAMENODE -touchz hdfs:///file1</command>
  2820. <command>-fs NAMENODE -touchz hdfs:///file2</command>
  2821. <command>-fs NAMENODE -touchz hdfs:///file3</command>
  2822. <command>-fs NAMENODE -touchz hdfs:///file4</command>
  2823. <command>-fs NAMENODE -cp hdfs:///file1 hdfs:///file2 hdfs:///file3 hdfs:///file4 hdfs:///dir</command>
  2824. </test-commands>
  2825. <cleanup-commands>
  2826. <command>-fs NAMENODE -rm -r hdfs:///file*</command>
  2827. </cleanup-commands>
  2828. <comparators>
  2829. <comparator>
  2830. <type>RegexpComparator</type>
  2831. <expected-output>^cp: `hdfs:///dir': No such file or directory</expected-output>
  2832. </comparator>
  2833. </comparators>
  2834. </test>
  2835. <test> <!-- TESTED -->
  2836. <description>cp: copying non existent directory in hdfs:// path</description>
  2837. <test-commands>
  2838. <command>-fs NAMENODE -mkdir hdfs:///dir1</command>
  2839. <command>-fs NAMENODE -cp hdfs:///dir0 hdfs:///dir1</command>
  2840. </test-commands>
  2841. <cleanup-commands>
  2842. <command>-fs NAMNEODE -rm -r hdfs:///dir1</command>
  2843. </cleanup-commands>
  2844. <comparators>
  2845. <comparator>
  2846. <type>RegexpComparator</type>
  2847. <expected-output>^cp: `hdfs:///dir0': No such file or directory</expected-output>
  2848. </comparator>
  2849. </comparators>
  2850. </test>
  2851. <test> <!-- TESTED -->
  2852. <description>cp: putting file into an already existing destination with -f option(absolute path)</description>
  2853. <test-commands>
  2854. <command>-fs NAMENODE -mkdir /user</command> <!-- make sure user home dir exists -->
  2855. <command>-fs NAMENODE -touchz /user/file0</command>
  2856. <command>-fs NAMENODE -cp -f CLITEST_DATA/data120bytes /user/file0</command>
  2857. <command>-fs NAMENODE -cat /user/file0</command>
  2858. </test-commands>
  2859. <cleanup-commands>
  2860. <command>-fs NAMENODE -rm -r /user</command>
  2861. </cleanup-commands>
  2862. <comparators>
  2863. <comparator>
  2864. <type>RegexpComparator</type>
  2865. <expected-output>12345678901234</expected-output>
  2866. </comparator>
  2867. </comparators>
  2868. </test>
  2869. <test> <!-- TESTED -->
  2870. <description>cp: copying directory to directory in hdfs:// path</description>
  2871. <test-commands>
  2872. <command>-fs NAMENODE -mkdir hdfs:///dir0</command>
  2873. <command>-fs NAMENODE -mkdir hdfs:///dir1</command>
  2874. <command>-fs NAMENODE -touchz hdfs:///dir0/file1</command>
  2875. <command>-fs NAMENODE -cp hdfs:///dir0 hdfs:///dir1</command>
  2876. <command>-fs NAMENODE -ls -R hdfs:///dir*</command>
  2877. </test-commands>
  2878. <cleanup-commands>
  2879. <command>-fs NAMENODE -rm -r hdfs:///*</command>
  2880. </cleanup-commands>
  2881. <comparators>
  2882. <comparator>
  2883. <type>RegexpComparator</type>
  2884. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir0/file1</expected-output>
  2885. </comparator>
  2886. <comparator>
  2887. <type>RegexpComparator</type>
  2888. <expected-output>^drwxr-xr-x( )*-( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir1/dir0</expected-output>
  2889. </comparator>
  2890. <comparator>
  2891. <type>RegexpComparator</type>
  2892. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir1/dir0/file1</expected-output>
  2893. </comparator>
  2894. </comparators>
  2895. </test>
  2896. <test> <!-- TESTED -->
  2897. <description>cp: copying multiple directories to directory using globbing in hdfs:// path </description>
  2898. <test-commands>
  2899. <command>-fs NAMENODE -mkdir hdfs:///dir0</command>
  2900. <command>-fs NAMENODE -mkdir hdfs:///dir1</command>
  2901. <command>-fs NAMENODE -mkdir hdfs:///dir2</command>
  2902. <command>-fs NAMENODE -mkdir hdfs:///dest</command>
  2903. <command>-fs NAMENODE -cp hdfs:///dir* hdfs:///dest</command>
  2904. <command>-fs NAMENODE -ls -R hdfs:///d*</command>
  2905. </test-commands>
  2906. <cleanup-commands>
  2907. <command>-fs NAMNEODE -rm -r hdfs:///d*</command>
  2908. </cleanup-commands>
  2909. <comparators>
  2910. <comparator>
  2911. <type>RegexpComparator</type>
  2912. <expected-output>^drwxr-xr-x( )*-( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dest/dir0</expected-output>
  2913. </comparator>
  2914. <comparator>
  2915. <type>RegexpComparator</type>
  2916. <expected-output>^drwxr-xr-x( )*-( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dest/dir1</expected-output>
  2917. </comparator>
  2918. <comparator>
  2919. <type>RegexpComparator</type>
  2920. <expected-output>^drwxr-xr-x( )*-( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dest/dir2</expected-output>
  2921. </comparator>
  2922. </comparators>
  2923. </test>
  2924. <test> <!-- TESTED -->
  2925. <description>cp: copying multiple directories to directory in hdfs:// path without using globbing</description>
  2926. <test-commands>
  2927. <command>-fs NAMENODE -mkdir hdfs:///dir0</command>
  2928. <command>-fs NAMENODE -mkdir hdfs:///dir1</command>
  2929. <command>-fs NAMENODE -mkdir hdfs:///dir2</command>
  2930. <command>-fs NAMENODE -mkdir hdfs:///dest</command>
  2931. <command>-fs NAMENODE -cp hdfs:///dir0 hdfs:///dir1 hdfs:///dir2 hdfs:///dest</command>
  2932. <command>-fs NAMENODE -ls -R hdfs:///d*</command>
  2933. </test-commands>
  2934. <cleanup-commands>
  2935. <command>-fs NAMNEODE -rm -r hdfs:///*</command>
  2936. </cleanup-commands>
  2937. <comparators>
  2938. <comparator>
  2939. <type>RegexpComparator</type>
  2940. <expected-output>^drwxr-xr-x( )*-( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dest/dir0</expected-output>
  2941. </comparator>
  2942. <comparator>
  2943. <type>RegexpComparator</type>
  2944. <expected-output>^drwxr-xr-x( )*-( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dest/dir1</expected-output>
  2945. </comparator>
  2946. <comparator>
  2947. <type>RegexpComparator</type>
  2948. <expected-output>^drwxr-xr-x( )*-( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dest/dir2</expected-output>
  2949. </comparator>
  2950. </comparators>
  2951. </test>
  2952. <test> <!-- TESTED -->
  2953. <description>cp: file to file copy in Namenode's path </description>
  2954. <test-commands>
  2955. <command>-fs NAMENODE -touchz NAMENODE/file1</command>
  2956. <command>-fs NAMENODE -cp NAMENODE/file1 NAMENODE/file2</command>
  2957. <command>-fs NAMENODE -ls NAMENODE/file*</command>
  2958. </test-commands>
  2959. <cleanup-commands>
  2960. <command>-fs NAMENODE -rm NAMENODE/file*</command>
  2961. </cleanup-commands>:
  2962. <comparators>
  2963. <comparator>
  2964. <type>RegexpComparator</type>
  2965. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/file1</expected-output>
  2966. </comparator>
  2967. <comparator>
  2968. <type>RegexpComparator</type>
  2969. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/file2</expected-output>
  2970. </comparator>
  2971. </comparators>
  2972. </test>
  2973. <test> <!-- TESTED -->
  2974. <description>cp: file to directory copy (same name at the destination) in Namenode's path </description>
  2975. <test-commands>
  2976. <command>-fs NAMENODE -touchz NAMENODE/file1</command>
  2977. <command>-fs NAMENODE -mkdir NAMENODE/dir0</command>
  2978. <command>-fs NAMENODE -cp NAMENODE/file1 NAMENODE/dir0</command>
  2979. <command>-fs NAMENODE -ls NAMENODE/file1 NAMENODE/dir0</command>
  2980. </test-commands>
  2981. <cleanup-commands>
  2982. <command>-fs NAMENODE -rm -r NAMENODE/dir0/ NAMENODE/file1</command>
  2983. </cleanup-commands>
  2984. <comparators>
  2985. <comparator>
  2986. <type>RegexpComparator</type>
  2987. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/file1</expected-output>
  2988. </comparator>
  2989. <comparator>
  2990. <type>RegexpComparator</type>
  2991. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir0/file1</expected-output>
  2992. </comparator>
  2993. </comparators>
  2994. </test>
  2995. <test> <!-- TESTED -->
  2996. <description>cp: file to directory (different name at the destination) in Namenode's path </description>
  2997. <test-commands>
  2998. <command>-fs NAMENODE -touchz NAMENODE/file1</command>
  2999. <command>-fs NAMENODE -mkdir NAMENODE/dir0</command>
  3000. <command>-fs NAMENODE -cp NAMENODE/file1 NAMENODE/dir0/file2</command>
  3001. <command>-fs NAMENODE -ls NAMENODE/file1 NAMENODE/dir0</command>
  3002. </test-commands>
  3003. <cleanup-commands>
  3004. <command>-fs NAMENODE -rm -r NAMENODE/dir0/</command>
  3005. </cleanup-commands>
  3006. <comparators>
  3007. <comparator>
  3008. <type>RegexpComparator</type>
  3009. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/file1</expected-output>
  3010. </comparator>
  3011. <comparator>
  3012. <type>RegexpComparator</type>
  3013. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir0/file2</expected-output>
  3014. </comparator>
  3015. </comparators>
  3016. </test>
  3017. <test> <!-- TESTED -->
  3018. <description>cp: files to directory in Namenode's path using globbing</description>
  3019. <test-commands>
  3020. <command>-fs NAMENODE -touchz NAMENODE/file1</command>
  3021. <command>-fs NAMENODE -touchz NAMENODE/file2</command>
  3022. <command>-fs NAMENODE -touchz NAMENODE/file3</command>
  3023. <command>-fs NAMENODE -mkdir NAMENODE/dir0</command>
  3024. <command>-fs NAMENODE -cp NAMENODE/file* NAMENODE/dir0</command>
  3025. <command>-fs NAMENODE -ls -R NAMENODE/*</command>
  3026. </test-commands>
  3027. <cleanup-commands>
  3028. <command>-fs NAMENODE -rm -r NAMENODE/file*</command>
  3029. <command>-fs NAMENODE -rm -r NAMENODE/dir0/</command>
  3030. </cleanup-commands>
  3031. <comparators>
  3032. <comparator>
  3033. <type>RegexpComparator</type>
  3034. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/file1</expected-output>
  3035. </comparator>
  3036. <comparator>
  3037. <type>RegexpComparator</type>
  3038. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/file2</expected-output>
  3039. </comparator>
  3040. <comparator>
  3041. <type>RegexpComparator</type>
  3042. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/file3</expected-output>
  3043. </comparator>
  3044. <comparator>
  3045. <type>RegexpComparator</type>
  3046. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir0/file1</expected-output>
  3047. </comparator>
  3048. <comparator>
  3049. <type>RegexpComparator</type>
  3050. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir0/file2</expected-output>
  3051. </comparator>
  3052. <comparator>
  3053. <type>RegexpComparator</type>
  3054. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir0/file3</expected-output>
  3055. </comparator>
  3056. </comparators>
  3057. </test>
  3058. <test> <!-- TESTED -->
  3059. <description>cp: files to directory in Namenode's path without globbing</description>
  3060. <test-commands>
  3061. <command>-fs NAMENODE -touchz NAMENODE/file1</command>
  3062. <command>-fs NAMENODE -touchz NAMENODE/file2</command>
  3063. <command>-fs NAMENODE -touchz NAMENODE/file3</command>
  3064. <command>-fs NAMENODE -mkdir NAMENODE/dir0</command>
  3065. <command>-fs NAMENODE -cp NAMENODE/file1 NAMENODE/file2 NAMENODE/file3 NAMENODE/dir0</command>
  3066. <command>-fs NAMENODE -ls -R NAMENODE/*</command>
  3067. </test-commands>
  3068. <cleanup-commands>
  3069. <command>-fs NAMENODE -rm -r NAMENODE/file*</command>
  3070. <command>-fs NAMENODE -rm -r NAMENODE/dir0/</command>
  3071. </cleanup-commands>
  3072. <comparators>
  3073. <comparator>
  3074. <type>RegexpComparator</type>
  3075. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/file1</expected-output>
  3076. </comparator>
  3077. <comparator>
  3078. <type>RegexpComparator</type>
  3079. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/file2</expected-output>
  3080. </comparator>
  3081. <comparator>
  3082. <type>RegexpComparator</type>
  3083. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/file3</expected-output>
  3084. </comparator>
  3085. <comparator>
  3086. <type>RegexpComparator</type>
  3087. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir0/file1</expected-output>
  3088. </comparator>
  3089. <comparator>
  3090. <type>RegexpComparator</type>
  3091. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir0/file2</expected-output>
  3092. </comparator>
  3093. <comparator>
  3094. <type>RegexpComparator</type>
  3095. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir0/file3</expected-output>
  3096. </comparator>
  3097. </comparators>
  3098. </test>
  3099. <test> <!-- TESTED -->
  3100. <description>cp: copying non existent file in Namenode's path </description>
  3101. <test-commands>
  3102. <command>-fs NAMENODE -cp NAMENODE/file NAMENODE/file1</command>
  3103. </test-commands>
  3104. <cleanup-commands>
  3105. </cleanup-commands>:
  3106. <comparators>
  3107. <comparator>
  3108. <type>RegexpComparator</type>
  3109. <expected-output>^cp: `hdfs://\w+[-.a-z0-9]*:[0-9]+/file': No such file or directory</expected-output>
  3110. </comparator>
  3111. </comparators>
  3112. </test>
  3113. <test> <!-- TESTED -->
  3114. <description>cp: copying files to an existent file in Namenode's path using globbing</description>
  3115. <test-commands>
  3116. <command>-fs NAMENODE -touchz NAMENODE/file1</command>
  3117. <command>-fs NAMENODE -touchz NAMENODE/file2</command>
  3118. <command>-fs NAMENODE -touchz NAMENODE/file3</command>
  3119. <command>-fs NAMENODE -touchz NAMENODE/file4</command>
  3120. <command>-fs NAMENODE -touchz NAMENODE/file5</command>
  3121. <command>-fs NAMENODE -cp NAMENODE/file* NAMENODE/file5</command>
  3122. </test-commands>
  3123. <cleanup-commands>
  3124. <command>-fs NAMENODE -rm -r NAMENODE/file*</command>
  3125. </cleanup-commands>
  3126. <comparators>
  3127. <comparator>
  3128. <type>RegexpComparator</type>
  3129. <expected-output>^cp: `hdfs://\w+[-.a-z0-9]*:[0-9]+/file5': Is not a directory</expected-output>
  3130. </comparator>
  3131. </comparators>
  3132. </test>
  3133. <test> <!-- TESTED -->
  3134. <description>cp: copying files to an existent file in Namenode's path without globbing</description>
  3135. <test-commands>
  3136. <command>-fs NAMENODE -touchz NAMENODE/file1</command>
  3137. <command>-fs NAMENODE -touchz NAMENODE/file2</command>
  3138. <command>-fs NAMENODE -touchz NAMENODE/file3</command>
  3139. <command>-fs NAMENODE -touchz NAMENODE/file4</command>
  3140. <command>-fs NAMENODE -touchz NAMENODE/file5</command>
  3141. <command>-fs NAMENODE -cp NAMENODE/file1 NAMENODE/file2 NAMENODE/file3 NAMENODE/file4 NAMENODE/file5</command>
  3142. </test-commands>
  3143. <cleanup-commands>
  3144. <command>-fs NAMENODE -rm -r NAMENODE/file*</command>
  3145. </cleanup-commands>
  3146. <comparators>
  3147. <comparator>
  3148. <type>RegexpComparator</type>
  3149. <expected-output>^cp: `hdfs://\w+[-.a-z0-9]*:[0-9]+/file5': Is not a directory</expected-output>
  3150. </comparator>
  3151. </comparators>
  3152. </test>
  3153. <test> <!-- TESTED -->
  3154. <description>cp: copying files to a non existent directory in Namenode's path using globbing</description>
  3155. <test-commands>
  3156. <command>-fs NAMENODE -touchz NAMENODE/file1</command>
  3157. <command>-fs NAMENODE -touchz NAMENODE/file2</command>
  3158. <command>-fs NAMENODE -touchz NAMENODE/file3</command>
  3159. <command>-fs NAMENODE -touchz NAMENODE/file4</command>
  3160. <command>-fs NAMENODE -cp NAMENODE/file* NAMENODE/dir</command>
  3161. </test-commands>
  3162. <cleanup-commands>
  3163. <command>-fs NAMENODE -rm -r NAMENODE/file*</command>
  3164. </cleanup-commands>
  3165. <comparators>
  3166. <comparator>
  3167. <type>RegexpComparator</type>
  3168. <expected-output>^cp: `hdfs://\w+[-.a-z0-9]*:[0-9]+/dir': No such file or directory</expected-output>
  3169. </comparator>
  3170. </comparators>
  3171. </test>
  3172. <test> <!-- TESTED -->
  3173. <description>cp: copying files to a non existent directory in Namenode's path without globbing</description>
  3174. <test-commands>
  3175. <command>-fs NAMENODE -touchz NAMENODE/file1</command>
  3176. <command>-fs NAMENODE -touchz NAMENODE/file2</command>
  3177. <command>-fs NAMENODE -touchz NAMENODE/file3</command>
  3178. <command>-fs NAMENODE -touchz NAMENODE/file4</command>
  3179. <command>-fs NAMENODE -cp NAMENODE/file1 NAMENODE/file2 NAMENODE/file3 NAMENODE/file4 NAMENODE/dir</command>
  3180. </test-commands>
  3181. <cleanup-commands>
  3182. <command>-fs NAMENODE -rm -r NAMENODE/file*</command>
  3183. </cleanup-commands>
  3184. <comparators>
  3185. <comparator>
  3186. <type>RegexpComparator</type>
  3187. <expected-output>^cp: `hdfs://\w+[-.a-z0-9]*:[0-9]+/dir': No such file or directory</expected-output>
  3188. </comparator>
  3189. </comparators>
  3190. </test>
  3191. <test> <!-- TESTED -->
  3192. <description>cp: copying directory to directory in Namenode's path </description>
  3193. <test-commands>
  3194. <command>-fs NAMENODE -mkdir NAMENODE/dir0</command>
  3195. <command>-fs NAMENODE -mkdir NAMENODE/dir1</command>
  3196. <command>-fs NAMENODE -touchz NAMENODE/dir0/file1</command>
  3197. <command>-fs NAMENODE -cp NAMENODE/dir0 NAMENODE/dir1</command>
  3198. <command>-fs NAMENODE -ls -R NAMENODE/dir*</command>
  3199. </test-commands>
  3200. <cleanup-commands>
  3201. <command>-fs NAMENODE -rm -r NAMENODE/*</command>
  3202. </cleanup-commands>
  3203. <comparators>
  3204. <comparator>
  3205. <type>RegexpComparator</type>
  3206. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir0/file1</expected-output>
  3207. </comparator>
  3208. <comparator>
  3209. <type>RegexpComparator</type>
  3210. <expected-output>^drwxr-xr-x( )*-( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir1/dir0</expected-output>
  3211. </comparator>
  3212. <comparator>
  3213. <type>RegexpComparator</type>
  3214. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir1/dir0/file1</expected-output>
  3215. </comparator>
  3216. </comparators>
  3217. </test>
  3218. <test> <!-- TESTED -->
  3219. <description>cp: copying multiple directories to directory in Namenode's path using globbing</description>
  3220. <test-commands>
  3221. <command>-fs NAMENODE -mkdir NAMENODE/dir0</command>
  3222. <command>-fs NAMENODE -mkdir NAMENODE/dir1</command>
  3223. <command>-fs NAMENODE -mkdir NAMENODE/dir2</command>
  3224. <command>-fs NAMENODE -mkdir NAMENODE/dest</command>
  3225. <command>-fs NAMENODE -cp NAMENODE/dir* NAMENODE/dest</command>
  3226. <command>-fs NAMENODE -ls -R NAMENODE/d*</command>
  3227. </test-commands>
  3228. <cleanup-commands>
  3229. <command>-fs NAMNEODE -rm -r NAMENODE/d*</command>
  3230. </cleanup-commands>
  3231. <comparators>
  3232. <comparator>
  3233. <type>RegexpComparator</type>
  3234. <expected-output>^drwxr-xr-x( )*-( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dest/dir0</expected-output>
  3235. </comparator>
  3236. <comparator>
  3237. <type>RegexpComparator</type>
  3238. <expected-output>^drwxr-xr-x( )*-( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dest/dir1</expected-output>
  3239. </comparator>
  3240. <comparator>
  3241. <type>RegexpComparator</type>
  3242. <expected-output>^drwxr-xr-x( )*-( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dest/dir2</expected-output>
  3243. </comparator>
  3244. </comparators>
  3245. </test>
  3246. <test> <!-- TESTED -->
  3247. <description>cp: copying multiple directories to directory in Namenode's path without using globbing</description>
  3248. <test-commands>
  3249. <command>-fs NAMENODE -mkdir NAMENODE/dir0</command>
  3250. <command>-fs NAMENODE -mkdir NAMENODE/dir1</command>
  3251. <command>-fs NAMENODE -mkdir NAMENODE/dir2</command>
  3252. <command>-fs NAMENODE -mkdir NAMENODE/dest</command>
  3253. <command>-fs NAMENODE -cp NAMENODE/dir0 NAMENODE/dir1 NAMENODE/dir2 NAMENODE/dest</command>
  3254. <command>-fs NAMENODE -ls -R NAMENODE/d*</command>
  3255. </test-commands>
  3256. <cleanup-commands>
  3257. <command>-fs NAMNEODE -rm -r NAMENODE/*</command>
  3258. </cleanup-commands>
  3259. <comparators>
  3260. <comparator>
  3261. <type>RegexpComparator</type>
  3262. <expected-output>^drwxr-xr-x( )*-( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dest/dir0</expected-output>
  3263. </comparator>
  3264. <comparator>
  3265. <type>RegexpComparator</type>
  3266. <expected-output>^drwxr-xr-x( )*-( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dest/dir1</expected-output>
  3267. </comparator>
  3268. <comparator>
  3269. <type>RegexpComparator</type>
  3270. <expected-output>^drwxr-xr-x( )*-( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dest/dir2</expected-output>
  3271. </comparator>
  3272. </comparators>
  3273. </test>
  3274. <!-- Tests for rm -->
  3275. <test> <!-- TESTED -->
  3276. <description>rm: removing a file (absolute path) </description>
  3277. <test-commands>
  3278. <command>-fs NAMENODE -mkdir /dir0</command>
  3279. <command>-fs NAMENODE -touchz /dir0/file0</command>
  3280. <command>-fs NAMENODE -rm /dir0/file0</command>
  3281. </test-commands>
  3282. <cleanup-commands>
  3283. <command>-fs NAMENODE -rm /user</command>
  3284. </cleanup-commands>
  3285. <comparators>
  3286. <comparator>
  3287. <type>RegexpComparator</type>
  3288. <expected-output>^Deleted /dir0/file0</expected-output>
  3289. </comparator>
  3290. </comparators>
  3291. </test>
  3292. <test> <!-- TESTED -->
  3293. <description>rm: removing a file (relative path) </description>
  3294. <test-commands>
  3295. <command>-fs NAMENODE -mkdir -p dir</command> <!-- make sure user home dir exists -->
  3296. <command>-fs NAMENODE -touchz file0</command>
  3297. <command>-fs NAMENODE -rm file0</command>
  3298. </test-commands>
  3299. <cleanup-commands>
  3300. <command>-fs NAMENODE -rm /user</command>
  3301. </cleanup-commands>
  3302. <comparators>
  3303. <comparator>
  3304. <type>RegexpComparator</type>
  3305. <expected-output>^Deleted file0</expected-output>
  3306. </comparator>
  3307. </comparators>
  3308. </test>
  3309. <test> <!-- TESTED -->
  3310. <description>rm: removing files by globbing (absolute path) </description>
  3311. <test-commands>
  3312. <command>-fs NAMENODE -mkdir /dir0</command>
  3313. <command>-fs NAMENODE -touchz /dir0/file0</command>
  3314. <command>-fs NAMENODE -touchz /dir0/file1</command>
  3315. <command>-fs NAMENODE -touchz /dir0/file2</command>
  3316. <command>-fs NAMENODE -touchz /dir0/file3</command>
  3317. <command>-fs NAMENODE -rm /dir0/file*</command>
  3318. </test-commands>
  3319. <cleanup-commands>
  3320. <command>-fs NAMENODE -rm /user</command>
  3321. </cleanup-commands>
  3322. <comparators>
  3323. <comparator>
  3324. <type>RegexpComparator</type>
  3325. <expected-output>^Deleted /dir0/file0</expected-output>
  3326. </comparator>
  3327. <comparator>
  3328. <type>RegexpComparator</type>
  3329. <expected-output>^Deleted /dir0/file1</expected-output>
  3330. </comparator>
  3331. <comparator>
  3332. <type>RegexpComparator</type>
  3333. <expected-output>^Deleted /dir0/file2</expected-output>
  3334. </comparator>
  3335. <comparator>
  3336. <type>RegexpComparator</type>
  3337. <expected-output>^Deleted /dir0/file3</expected-output>
  3338. </comparator>
  3339. </comparators>
  3340. </test>
  3341. <test> <!-- TESTED -->
  3342. <description>rm: removing files by globbing (relative path) </description>
  3343. <test-commands>
  3344. <command>-fs NAMENODE -mkdir dir</command>
  3345. <command>-fs NAMENODE -touchz file0</command>
  3346. <command>-fs NAMENODE -touchz file1</command>
  3347. <command>-fs NAMENODE -touchz file2</command>
  3348. <command>-fs NAMENODE -touchz file3</command>
  3349. <command>-fs NAMENODE -rm file*</command>
  3350. </test-commands>
  3351. <cleanup-commands>
  3352. <command>-fs NAMENODE -rm /user</command>
  3353. </cleanup-commands>
  3354. <comparators>
  3355. <comparator>
  3356. <type>RegexpComparator</type>
  3357. <expected-output>^Deleted file0</expected-output>
  3358. </comparator>
  3359. <comparator>
  3360. <type>RegexpComparator</type>
  3361. <expected-output>^Deleted file1</expected-output>
  3362. </comparator>
  3363. <comparator>
  3364. <type>RegexpComparator</type>
  3365. <expected-output>^Deleted file2</expected-output>
  3366. </comparator>
  3367. <comparator>
  3368. <type>RegexpComparator</type>
  3369. <expected-output>^Deleted file3</expected-output>
  3370. </comparator>
  3371. </comparators>
  3372. </test>
  3373. <test> <!-- TESTED -->
  3374. <description>rm: removing a directory (absolute path) </description>
  3375. <test-commands>
  3376. <command>-fs NAMENODE mkdir /dir0</command>
  3377. <command>-fs NAMENODE -rm /dir0</command>
  3378. </test-commands>
  3379. <cleanup-commands>
  3380. <command>-fs NAMENODE -rm /user</command>
  3381. </cleanup-commands>
  3382. <comparators>
  3383. <comparator>
  3384. <type>RegexpComparator</type>
  3385. <expected-output>^rm: `/dir0': Is a directory</expected-output>
  3386. </comparator>
  3387. </comparators>
  3388. </test>
  3389. <test> <!-- TESTED -->
  3390. <description>rm: removing a directory (relative path) </description>
  3391. <test-commands>
  3392. <command>-fs NAMENODE mkdir -p dir0</command>
  3393. <command>-fs NAMENODE -rm dir0</command>
  3394. </test-commands>
  3395. <cleanup-commands>
  3396. <command>-fs NAMENODE -rm /user</command>
  3397. </cleanup-commands>
  3398. <comparators>
  3399. <comparator>
  3400. <type>RegexpComparator</type>
  3401. <expected-output>^rm: `dir0': No such file or directory</expected-output>
  3402. </comparator>
  3403. </comparators>
  3404. </test>
  3405. <test> <!-- TESTED -->
  3406. <description>rm: removing a nonexistent file (absolute path) </description>
  3407. <test-commands>
  3408. <command>-fs NAMENODE -rm /dir0/file0</command>
  3409. </test-commands>
  3410. <cleanup-commands>
  3411. <command>-fs NAMENODE -rm /user</command>
  3412. </cleanup-commands>
  3413. <comparators>
  3414. <comparator>
  3415. <type>RegexpComparator</type>
  3416. <expected-output>^rm: `/dir0/file0': No such file or directory</expected-output>
  3417. </comparator>
  3418. </comparators>
  3419. </test>
  3420. <test> <!-- TESTED -->
  3421. <description>rm: removing a nonexistent file (relative path) </description>
  3422. <test-commands>
  3423. <command>-fs NAMENODE -rm file0</command>
  3424. </test-commands>
  3425. <cleanup-commands>
  3426. <command>-fs NAMENODE -rm /user</command>
  3427. </cleanup-commands>
  3428. <comparators>
  3429. <comparator>
  3430. <type>RegexpComparator</type>
  3431. <expected-output>^rm: `file0': No such file or directory</expected-output>
  3432. </comparator>
  3433. </comparators>
  3434. </test>
  3435. <test> <!-- TESTED -->
  3436. <description>rm: removing a file in hdfs:// path </description>
  3437. <test-commands>
  3438. <command>-fs NAMENODE -touchz hdfs:///file0</command>
  3439. <command>-fs NAMENODE -rm hdfs:///file0</command>
  3440. </test-commands>
  3441. <cleanup-commands>
  3442. <command>-fs NAMENODE -rm hdfs:///*</command>
  3443. </cleanup-commands>
  3444. <comparators>
  3445. <comparator>
  3446. <type>RegexpComparator</type>
  3447. <expected-output>^Deleted hdfs:///file0</expected-output>
  3448. </comparator>
  3449. </comparators>
  3450. </test>
  3451. <test> <!-- TESTED -->
  3452. <description>rm: removing files by globbing in hdfs:// path </description>
  3453. <test-commands>
  3454. <command>-fs NAMENODE -touchz hdfs:///file0</command>
  3455. <command>-fs NAMENODE -touchz hdfs:///file1</command>
  3456. <command>-fs NAMENODE -touchz hdfs:///file2</command>
  3457. <command>-fs NAMENODE -touchz hdfs:///file3</command>
  3458. <command>-fs NAMENODE -rm hdfs:///file*</command>
  3459. </test-commands>
  3460. <cleanup-commands>
  3461. <command>-fs NAMENODE -rm hdfs:///*</command>
  3462. </cleanup-commands>
  3463. <comparators>
  3464. <comparator>
  3465. <type>RegexpComparator</type>
  3466. <expected-output>^Deleted hdfs:///file0</expected-output>
  3467. </comparator>
  3468. <comparator>
  3469. <type>RegexpComparator</type>
  3470. <expected-output>^Deleted hdfs:///file1</expected-output>
  3471. </comparator>
  3472. <comparator>
  3473. <type>RegexpComparator</type>
  3474. <expected-output>^Deleted hdfs:///file2</expected-output>
  3475. </comparator>
  3476. <comparator>
  3477. <type>RegexpComparator</type>
  3478. <expected-output>^Deleted hdfs:///file3</expected-output>
  3479. </comparator>
  3480. </comparators>
  3481. </test>
  3482. <test> <!-- TESTED -->
  3483. <description>rm: removing a directory in hdfs:// path </description>
  3484. <test-commands>
  3485. <command>-fs NAMENODE mkdir hdfs:///dir0</command>
  3486. <command>-fs NAMENODE -rm hdfs:///dir0</command>
  3487. </test-commands>
  3488. <cleanup-commands>
  3489. <command>-fs NAMENODE -rm -r hdfs:///*</command>
  3490. </cleanup-commands>
  3491. <comparators>
  3492. <comparator>
  3493. <type>RegexpComparator</type>
  3494. <expected-output>^rm: `hdfs:///dir0': Is a directory</expected-output>
  3495. </comparator>
  3496. </comparators>
  3497. </test>
  3498. <test> <!-- TESTED -->
  3499. <description>rm: removing a nonexistent file or dirctory in hdfs:// path </description>
  3500. <test-commands>
  3501. <command>-fs NAMENODE -rm hdfs:///file0</command>
  3502. </test-commands>
  3503. <cleanup-commands>
  3504. <command>-fs NAMENODE -rm hdfs:///*</command>
  3505. </cleanup-commands>
  3506. <comparators>
  3507. <comparator>
  3508. <type>RegexpComparator</type>
  3509. <expected-output>^rm: `hdfs:///file0': No such file or directory</expected-output>
  3510. </comparator>
  3511. </comparators>
  3512. </test>
  3513. <test> <!-- TESTED -->
  3514. <description>rm: removing files without globbing in hdfs:// path </description>
  3515. <test-commands>
  3516. <command>-fs NAMENODE -touchz hdfs:///file0</command>
  3517. <command>-fs NAMENODE -touchz hdfs:///file1</command>
  3518. <command>-fs NAMENODE -touchz hdfs:///file2</command>
  3519. <command>-fs NAMENODE -touchz hdfs:///file3</command>
  3520. <command>-fs NAMENODE -rm hdfs:///file0 hdfs:///file1 hdfs:///file2 hdfs:///file3</command>
  3521. </test-commands>
  3522. <cleanup-commands>
  3523. <command>-fs NAMENODE -rm hdfs:///*</command>
  3524. </cleanup-commands>
  3525. <comparators>
  3526. <comparator>
  3527. <type>RegexpComparator</type>
  3528. <expected-output>^Deleted hdfs:///file0</expected-output>
  3529. </comparator>
  3530. <comparator>
  3531. <type>RegexpComparator</type>
  3532. <expected-output>^Deleted hdfs:///file1</expected-output>
  3533. </comparator>
  3534. <comparator>
  3535. <type>RegexpComparator</type>
  3536. <expected-output>^Deleted hdfs:///file2</expected-output>
  3537. </comparator>
  3538. <comparator>
  3539. <type>RegexpComparator</type>
  3540. <expected-output>^Deleted hdfs:///file3</expected-output>
  3541. </comparator>
  3542. </comparators>
  3543. </test>
  3544. <test> <!-- TESTED -->
  3545. <description>rm: removing a file in Namenode's path </description>
  3546. <test-commands>
  3547. <command>-fs NAMENODE -touchz NAMENODE/file0</command>
  3548. <command>-fs NAMENODE -rm NAMENODE/file0</command>
  3549. </test-commands>
  3550. <cleanup-commands>
  3551. <command>-fs NAMENODE -rm NAMENODE/*</command>
  3552. </cleanup-commands>
  3553. <comparators>
  3554. <comparator>
  3555. <type>RegexpComparator</type>
  3556. <expected-output>^Deleted NAMENODE/file0</expected-output>
  3557. </comparator>
  3558. </comparators>
  3559. </test>
  3560. <test> <!-- TESTED -->
  3561. <description>rm: removing files by globbing in Namenode's path </description>
  3562. <test-commands>
  3563. <command>-fs NAMENODE -touchz NAMENODE/file0</command>
  3564. <command>-fs NAMENODE -touchz NAMENODE/file1</command>
  3565. <command>-fs NAMENODE -touchz NAMENODE/file2</command>
  3566. <command>-fs NAMENODE -touchz NAMENODE/file3</command>
  3567. <command>-fs NAMENODE -rm NAMENODE/file*</command>
  3568. </test-commands>
  3569. <cleanup-commands>
  3570. <command>-fs NAMENODE -rm NAMENODE/*</command>
  3571. </cleanup-commands>
  3572. <comparators>
  3573. <comparator>
  3574. <type>RegexpComparator</type>
  3575. <expected-output>^Deleted NAMENODE/file0</expected-output>
  3576. </comparator>
  3577. <comparator>
  3578. <type>RegexpComparator</type>
  3579. <expected-output>^Deleted NAMENODE/file1</expected-output>
  3580. </comparator>
  3581. <comparator>
  3582. <type>RegexpComparator</type>
  3583. <expected-output>^Deleted NAMENODE/file2</expected-output>
  3584. </comparator>
  3585. <comparator>
  3586. <type>RegexpComparator</type>
  3587. <expected-output>^Deleted NAMENODE/file3</expected-output>
  3588. </comparator>
  3589. </comparators>
  3590. </test>
  3591. <test> <!-- TESTED -->
  3592. <description>rm: removing a directory in Namenode's path </description>
  3593. <test-commands>
  3594. <command>-fs NAMENODE mkdir NAMENODE/dir0</command>
  3595. <command>-fs NAMENODE -rm NAMENODE/dir0</command>
  3596. </test-commands>
  3597. <cleanup-commands>
  3598. <command>-fs NAMENODE -rm -r NAMENODE/*</command>
  3599. </cleanup-commands>
  3600. <comparators>
  3601. <comparator>
  3602. <type>RegexpComparator</type>
  3603. <expected-output>rm: `NAMENODE/dir0': No such file or directory</expected-output>
  3604. </comparator>
  3605. </comparators>
  3606. </test>
  3607. <test> <!-- TESTED -->
  3608. <description>rm: removing a nonexistent file or directory in Namenode's path </description>
  3609. <test-commands>
  3610. <command>-fs NAMENODE -rm NAMENODE/file0</command>
  3611. </test-commands>
  3612. <cleanup-commands>
  3613. <command>-fs NAMENODE -rm NAMENODE/*</command>
  3614. </cleanup-commands>
  3615. <comparators>
  3616. <comparator>
  3617. <type>RegexpComparator</type>
  3618. <expected-output>^rm: `NAMENODE/file0': No such file or directory</expected-output>
  3619. </comparator>
  3620. </comparators>
  3621. </test>
  3622. <test> <!-- TESTED -->
  3623. <description>rm: Tremoving files without globbing in Namenode path </description>
  3624. <test-commands>
  3625. <command>-fs NAMENODE -touchz NAMENODE/file0</command>
  3626. <command>-fs NAMENODE -touchz NAMENODE/file1</command>
  3627. <command>-fs NAMENODE -touchz NAMENODE/file2</command>
  3628. <command>-fs NAMENODE -touchz NAMENODE/file3</command>
  3629. <command>-fs NAMENODE -rm NAMENODE/file0 NAMENODE/file1 NAMENODE/file2 NAMENODE/file3</command>
  3630. </test-commands>
  3631. <cleanup-commands>
  3632. <command>-fs NAMENODE -rm NAMENODE/*</command>
  3633. </cleanup-commands>
  3634. <comparators>
  3635. <comparator>
  3636. <type>RegexpComparator</type>
  3637. <expected-output>^Deleted NAMENODE/file0</expected-output>
  3638. </comparator>
  3639. <comparator>
  3640. <type>RegexpComparator</type>
  3641. <expected-output>^Deleted NAMENODE/file1</expected-output>
  3642. </comparator>
  3643. <comparator>
  3644. <type>RegexpComparator</type>
  3645. <expected-output>^Deleted NAMENODE/file2</expected-output>
  3646. </comparator>
  3647. <comparator>
  3648. <type>RegexpComparator</type>
  3649. <expected-output>^Deleted NAMENODE/file3</expected-output>
  3650. </comparator>
  3651. </comparators>
  3652. </test>
  3653. <!--Tests for rmr-->
  3654. <test> <!-- TESTED -->
  3655. <description>rm: removing a file (absolute path) </description>
  3656. <test-commands>
  3657. <command>-fs NAMENODE -mkdir /dir0</command>
  3658. <command>-fs NAMENODE -touchz /dir0/file0</command>
  3659. <command>-fs NAMENODE -rm -r /dir0/file0</command>
  3660. </test-commands>
  3661. <cleanup-commands>
  3662. <command>-fs NAMENODE -rm -r /user</command>
  3663. </cleanup-commands>
  3664. <comparators>
  3665. <comparator>
  3666. <type>RegexpComparator</type>
  3667. <expected-output>^Deleted /dir0/file0</expected-output>
  3668. </comparator>
  3669. </comparators>
  3670. </test>
  3671. <test> <!-- TESTED -->
  3672. <description>rm: removing a file (relative path) </description>
  3673. <test-commands>
  3674. <command>-fs NAMENODE -mkdir -p dir</command> <!-- make sure user home dir exists -->
  3675. <command>-fs NAMENODE -touchz file0</command>
  3676. <command>-fs NAMENODE -rm -r file0</command>
  3677. </test-commands>
  3678. <cleanup-commands>
  3679. <command>-fs NAMENODE -rm -r /user</command>
  3680. </cleanup-commands>
  3681. <comparators>
  3682. <comparator>
  3683. <type>RegexpComparator</type>
  3684. <expected-output>^Deleted file0</expected-output>
  3685. </comparator>
  3686. </comparators>
  3687. </test>
  3688. <test> <!-- TESTED -->
  3689. <description>rm: removing a directory (absolute path) </description>
  3690. <test-commands>
  3691. <command>-fs NAMENODE -touchz /dir0</command>
  3692. <command>-fs NAMENODE -rm -r /dir0</command>
  3693. </test-commands>
  3694. <cleanup-commands>
  3695. <command>-fs NAMENODE -rm -r /user</command>
  3696. </cleanup-commands>
  3697. <comparators>
  3698. <comparator>
  3699. <type>RegexpComparator</type>
  3700. <expected-output>^Deleted /dir0</expected-output>
  3701. </comparator>
  3702. </comparators>
  3703. </test>
  3704. <test> <!-- TESTED -->
  3705. <description>rm: removing a directory (relative path) </description>
  3706. <test-commands>
  3707. <command>-fs NAMENODE -mkdir -p dir0</command>
  3708. <command>-fs NAMENODE -rm -r dir0</command>
  3709. </test-commands>
  3710. <cleanup-commands>
  3711. <command>-fs NAMENODE -rm -r /user</command>
  3712. </cleanup-commands>
  3713. <comparators>
  3714. <comparator>
  3715. <type>RegexpComparator</type>
  3716. <expected-output>^Deleted dir0</expected-output>
  3717. </comparator>
  3718. </comparators>
  3719. </test>
  3720. <test> <!-- TESTED -->
  3721. <description>rm: removing directories by globbing (absolute path) </description>
  3722. <test-commands>
  3723. <command>-fs NAMENODE -mkdir /dir0</command>
  3724. <command>-fs NAMENODE -mkdir /dir1</command>
  3725. <command>-fs NAMENODE -mkdir /dir2</command>
  3726. <command>-fs NAMENODE -mkdir /dir3</command>
  3727. <command>-fs NAMENODE -rm -r /dir*</command>
  3728. </test-commands>
  3729. <cleanup-commands>
  3730. <command>-fs NAMENODE -rm /user</command>
  3731. </cleanup-commands>
  3732. <comparators>
  3733. <comparator>
  3734. <type>RegexpComparator</type>
  3735. <expected-output>^Deleted /dir0</expected-output>
  3736. </comparator>
  3737. <comparator>
  3738. <type>RegexpComparator</type>
  3739. <expected-output>^Deleted /dir1</expected-output>
  3740. </comparator>
  3741. <comparator>
  3742. <type>RegexpComparator</type>
  3743. <expected-output>^Deleted /dir2</expected-output>
  3744. </comparator>
  3745. <comparator>
  3746. <type>RegexpComparator</type>
  3747. <expected-output>^Deleted /dir3</expected-output>
  3748. </comparator>
  3749. </comparators>
  3750. </test>
  3751. <test> <!-- TESTED -->
  3752. <description>rm: removing directories by globbing (relative path) </description>
  3753. <test-commands>
  3754. <command>-fs NAMENODE -mkdir -p dir0</command>
  3755. <command>-fs NAMENODE -mkdir -p dir1</command>
  3756. <command>-fs NAMENODE -mkdir -p dir2</command>
  3757. <command>-fs NAMENODE -mkdir -p dir3</command>
  3758. <command>-fs NAMENODE -rm -r dir*</command>
  3759. </test-commands>
  3760. <cleanup-commands>
  3761. <command>-fs NAMENODE -rm /user</command>
  3762. </cleanup-commands>
  3763. <comparators>
  3764. <comparator>
  3765. <type>RegexpComparator</type>
  3766. <expected-output>^Deleted dir0</expected-output>
  3767. </comparator>
  3768. <comparator>
  3769. <type>RegexpComparator</type>
  3770. <expected-output>^Deleted dir1</expected-output>
  3771. </comparator>
  3772. <comparator>
  3773. <type>RegexpComparator</type>
  3774. <expected-output>^Deleted dir2</expected-output>
  3775. </comparator>
  3776. <comparator>
  3777. <type>RegexpComparator</type>
  3778. <expected-output>^Deleted dir3</expected-output>
  3779. </comparator>
  3780. </comparators>
  3781. </test>
  3782. <test> <!--TESTED-->
  3783. <description>rm: removing a nonexistent file (absolute path) </description>
  3784. <test-commands>
  3785. <command>-fs NAMENODE -rm -r /dir0/file0</command>
  3786. </test-commands>
  3787. <cleanup-commands>
  3788. <command>-fs NAMENODE -rm -r /user</command>
  3789. </cleanup-commands>
  3790. <comparators>
  3791. <comparator>
  3792. <type>RegexpComparator</type>
  3793. <expected-output>^rm: `/dir0/file0': No such file or directory</expected-output>
  3794. </comparator>
  3795. </comparators>
  3796. </test>
  3797. <test> <!-- TESTED -->
  3798. <description>rm: removing a nonexistent file (relative path) </description>
  3799. <test-commands>
  3800. <command>-fs NAMENODE -rm -r file0</command>
  3801. </test-commands>
  3802. <cleanup-commands>
  3803. <command>-fs NAMENODE -rm -r /user</command>
  3804. </cleanup-commands>
  3805. <comparators>
  3806. <comparator>
  3807. <type>RegexpComparator</type>
  3808. <expected-output>^rm: `file0': No such file or directory</expected-output>
  3809. </comparator>
  3810. </comparators>
  3811. </test>
  3812. <test> <!-- TESTED -->
  3813. <description>rm: removing a file in hdfs:// path </description>
  3814. <test-commands>
  3815. <command>-fs NAMENODE -touchz hdfs:///file0</command>
  3816. <command>-fs NAMENODE -rm -r hdfs:///file0</command>
  3817. </test-commands>
  3818. <cleanup-commands>
  3819. <command>-fs NAMENODE -rm -r hdfs:///*</command>
  3820. </cleanup-commands>
  3821. <comparators>
  3822. <comparator>
  3823. <type>RegexpComparator</type>
  3824. <expected-output>^Deleted hdfs:///file0</expected-output>
  3825. </comparator>
  3826. </comparators>
  3827. </test>
  3828. <test> <!-- TESTED -->
  3829. <description>rm: removing a directory in hdfs:// path </description>
  3830. <test-commands>
  3831. <command>-fs NAMENODE -touchz hdfs:///dir0</command>
  3832. <command>-fs NAMENODE -rm -r hdfs:///dir0</command>
  3833. </test-commands>
  3834. <cleanup-commands>
  3835. <command>-fs NAMENODE -rm -r hdfs:///*</command>
  3836. </cleanup-commands>
  3837. <comparators>
  3838. <comparator>
  3839. <type>RegexpComparator</type>
  3840. <expected-output>^Deleted hdfs:///dir0</expected-output>
  3841. </comparator>
  3842. </comparators>
  3843. </test>
  3844. <test> <!-- TESTED -->
  3845. <description>rm: removing directories by globbing in hdfs:// path </description>
  3846. <test-commands>
  3847. <command>-fs NAMENODE -mkdir hdfs:///dir0</command>
  3848. <command>-fs NAMENODE -mkdir hdfs:///dir1</command>
  3849. <command>-fs NAMENODE -mkdir hdfs:///dir2</command>
  3850. <command>-fs NAMENODE -mkdir hdfs:///dir3</command>
  3851. <command>-fs NAMENODE -rm -r hdfs:///dir*</command>
  3852. </test-commands>
  3853. <cleanup-commands>
  3854. <command>-fs NAMENODE -rm -r hdfs:///*</command>
  3855. </cleanup-commands>
  3856. <comparators>
  3857. <comparator>
  3858. <type>RegexpComparator</type>
  3859. <expected-output>^Deleted hdfs:///dir0</expected-output>
  3860. </comparator>
  3861. <comparator>
  3862. <type>RegexpComparator</type>
  3863. <expected-output>^Deleted hdfs:///dir1</expected-output>
  3864. </comparator>
  3865. <comparator>
  3866. <type>RegexpComparator</type>
  3867. <expected-output>^Deleted hdfs:///dir2</expected-output>
  3868. </comparator>
  3869. <comparator>
  3870. <type>RegexpComparator</type>
  3871. <expected-output>^Deleted hdfs:///dir3</expected-output>
  3872. </comparator>
  3873. </comparators>
  3874. </test>
  3875. <test> <!--TESTED-->
  3876. <description>rm: removing a nonexistent file or directory in hdfs:// path </description>
  3877. <test-commands>
  3878. <command>-fs NAMENODE -rm -r hdfs:///file0</command>
  3879. </test-commands>
  3880. <cleanup-commands>
  3881. <command>-fs NAMENODE -rm -r hdfs:///*</command>
  3882. </cleanup-commands>
  3883. <comparators>
  3884. <comparator>
  3885. <type>RegexpComparator</type>
  3886. <expected-output>^rm: `hdfs:///file0': No such file or directory</expected-output>
  3887. </comparator>
  3888. </comparators>
  3889. </test>
  3890. <test> <!-- TESTED -->
  3891. <description>rm: removing directories without globbing in hdfs:// path </description>
  3892. <test-commands>
  3893. <command>-fs NAMENODE -mkdir hdfs:///dir0</command>
  3894. <command>-fs NAMENODE -mkdir hdfs:///dir1</command>
  3895. <command>-fs NAMENODE -mkdir hdfs:///dir2</command>
  3896. <command>-fs NAMENODE -mkdir hdfs:///dir3</command>
  3897. <command>-fs NAMENODE -rm -r hdfs:///dir0 hdfs:///dir1 hdfs:///dir2 hdfs:///dir3</command>
  3898. </test-commands>
  3899. <cleanup-commands>
  3900. <command>-fs NAMENODE -rm -r hdfs:///*</command>
  3901. </cleanup-commands>
  3902. <comparators>
  3903. <comparator>
  3904. <type>RegexpComparator</type>
  3905. <expected-output>^Deleted hdfs:///dir0</expected-output>
  3906. </comparator>
  3907. <comparator>
  3908. <type>RegexpComparator</type>
  3909. <expected-output>^Deleted hdfs:///dir1</expected-output>
  3910. </comparator>
  3911. <comparator>
  3912. <type>RegexpComparator</type>
  3913. <expected-output>^Deleted hdfs:///dir2</expected-output>
  3914. </comparator>
  3915. <comparator>
  3916. <type>RegexpComparator</type>
  3917. <expected-output>^Deleted hdfs:///dir3</expected-output>
  3918. </comparator>
  3919. </comparators>
  3920. </test>
  3921. <test> <!-- TESTED -->
  3922. <description>rm: Test for Namenode's path - removing a file</description>
  3923. <test-commands>
  3924. <command>-fs NAMENODE -touchz NAMENODE/file0</command>
  3925. <command>-fs NAMENODE -rm -r NAMENODE/file0</command>
  3926. </test-commands>
  3927. <cleanup-commands>
  3928. <command>-fs NAMENODE -rm -r NAMENODE/*</command>
  3929. </cleanup-commands>
  3930. <comparators>
  3931. <comparator>
  3932. <type>RegexpComparator</type>
  3933. <expected-output>^Deleted NAMENODE/file0</expected-output>
  3934. </comparator>
  3935. </comparators>
  3936. </test>
  3937. <test> <!-- TESTED -->
  3938. <description>rm: Test for Namenode's path - removing a directory</description>
  3939. <test-commands>
  3940. <command>-fs NAMENODE -touchz NAMENODE/dir0</command>
  3941. <command>-fs NAMENODE -rm -r NAMENODE/dir0</command>
  3942. </test-commands>
  3943. <cleanup-commands>
  3944. <command>-fs NAMENODE -rm -r NAMENODE/*</command>
  3945. </cleanup-commands>
  3946. <comparators>
  3947. <comparator>
  3948. <type>RegexpComparator</type>
  3949. <expected-output>^Deleted NAMENODE/dir0</expected-output>
  3950. </comparator>
  3951. </comparators>
  3952. </test>
  3953. <test> <!-- TESTED -->
  3954. <description>rm: removing directories by globbing in Namenode's path </description>
  3955. <test-commands>
  3956. <command>-fs NAMENODE -mkdir NAMENODE/dir0</command>
  3957. <command>-fs NAMENODE -mkdir NAMENODE/dir1</command>
  3958. <command>-fs NAMENODE -mkdir NAMENODE/dir2</command>
  3959. <command>-fs NAMENODE -mkdir NAMENODE/dir3</command>
  3960. <command>-fs NAMENODE -rm -r NAMENODE/dir*</command>
  3961. </test-commands>
  3962. <cleanup-commands>
  3963. <command>-fs NAMENODE -rm -r NAMENODE/*</command>
  3964. </cleanup-commands>
  3965. <comparators>
  3966. <comparator>
  3967. <type>RegexpComparator</type>
  3968. <expected-output>^Deleted NAMENODE/dir0</expected-output>
  3969. </comparator>
  3970. <comparator>
  3971. <type>RegexpComparator</type>
  3972. <expected-output>^Deleted NAMENODE/dir1</expected-output>
  3973. </comparator>
  3974. <comparator>
  3975. <type>RegexpComparator</type>
  3976. <expected-output>^Deleted NAMENODE/dir2</expected-output>
  3977. </comparator>
  3978. <comparator>
  3979. <type>RegexpComparator</type>
  3980. <expected-output>^Deleted NAMENODE/dir3</expected-output>
  3981. </comparator>
  3982. </comparators>
  3983. </test>
  3984. <test> <!--TESTED-->
  3985. <description>rm: removing a nonexistent file or directory in Namenode's path </description>
  3986. <test-commands>
  3987. <command>-fs NAMENODE -rm -r NAMENODE/file0</command>
  3988. </test-commands>
  3989. <cleanup-commands>
  3990. <command>-fs NAMENODE -rm -r NAMENODE/*</command>
  3991. </cleanup-commands>
  3992. <comparators>
  3993. <comparator>
  3994. <type>RegexpComparator</type>
  3995. <expected-output>^rm: `NAMENODE/file0': No such file or directory</expected-output>
  3996. </comparator>
  3997. </comparators>
  3998. </test>
  3999. <test> <!-- TESTED -->
  4000. <description>rm: removing directories without globbing in Namenode's path </description>
  4001. <test-commands>
  4002. <command>-fs NAMENODE -mkdir NAMENODE/dir0</command>
  4003. <command>-fs NAMENODE -mkdir NAMENODE/dir1</command>
  4004. <command>-fs NAMENODE -mkdir NAMENODE/dir2</command>
  4005. <command>-fs NAMENODE -mkdir NAMENODE/dir3</command>
  4006. <command>-fs NAMENODE -rm -r NAMENODE/dir0 NAMENODE/dir1 NAMENODE/dir2 NAMENODE/dir3</command>
  4007. </test-commands>
  4008. <cleanup-commands>
  4009. <command>-fs NAMENODE -rm -r NAMENODE/*</command>
  4010. </cleanup-commands>
  4011. <comparators>
  4012. <comparator>
  4013. <type>RegexpComparator</type>
  4014. <expected-output>^Deleted NAMENODE/dir0</expected-output>
  4015. </comparator>
  4016. <comparator>
  4017. <type>RegexpComparator</type>
  4018. <expected-output>^Deleted NAMENODE/dir1</expected-output>
  4019. </comparator>
  4020. <comparator>
  4021. <type>RegexpComparator</type>
  4022. <expected-output>^Deleted NAMENODE/dir2</expected-output>
  4023. </comparator>
  4024. <comparator>
  4025. <type>RegexpComparator</type>
  4026. <expected-output>^Deleted NAMENODE/dir3</expected-output>
  4027. </comparator>
  4028. </comparators>
  4029. </test>
  4030. <!-- Tests for expunge -->
  4031. <!-- Not yet implemented -->
  4032. <!-- Tests for put -->
  4033. <test> <!-- TESTED -->
  4034. <description>put: putting file into a file (absolute path)</description>
  4035. <test-commands>
  4036. <command>-fs NAMENODE -put CLITEST_DATA/data15bytes /data15bytes</command>
  4037. <command>-fs NAMENODE -du /data15bytes</command>
  4038. </test-commands>
  4039. <cleanup-commands>
  4040. <command>-fs NAMENODE -rm /data15bytes</command>
  4041. </cleanup-commands>
  4042. <comparators>
  4043. <comparator>
  4044. <type>RegexpComparator</type>
  4045. <expected-output>^15\s+/data15bytes</expected-output>
  4046. </comparator>
  4047. </comparators>
  4048. </test>
  4049. <test> <!-- TESTED -->
  4050. <description>put: putting file into a file (relative path)</description>
  4051. <test-commands>
  4052. <command>-fs NAMENODE -mkdir -p dir</command> <!-- make sure user home dir exists -->
  4053. <command>-fs NAMENODE -touchz test</command>
  4054. <command>-fs NAMENODE -put CLITEST_DATA/data15bytes data15bytes</command>
  4055. <command>-fs NAMENODE -du data15bytes</command>
  4056. </test-commands>
  4057. <cleanup-commands>
  4058. <command>-fs NAMENODE -rm -r /user</command>
  4059. </cleanup-commands>
  4060. <comparators>
  4061. <comparator>
  4062. <type>RegexpComparator</type>
  4063. <expected-output>^15\s+data15bytes</expected-output>
  4064. </comparator>
  4065. </comparators>
  4066. </test>
  4067. <test> <!-- TESTED -->
  4068. <description>put: putting file into a directory(absolute path)</description>
  4069. <test-commands>
  4070. <command>-fs NAMENODE -mkdir -p /dir0/dir1/data</command>
  4071. <command>-fs NAMENODE -put CLITEST_DATA/data15bytes /dir0/dir1/data</command> -->
  4072. <command>-fs NAMENODE -du /dir0/dir1/data</command>
  4073. </test-commands>
  4074. <cleanup-commands>
  4075. <command>-fs NAMENODE -rm -r /dir0</command>
  4076. </cleanup-commands>
  4077. <comparators>
  4078. <comparator>
  4079. <type>RegexpComparator</type>
  4080. <expected-output>^15\s+/dir0/dir1/data/data15bytes</expected-output>
  4081. </comparator>
  4082. </comparators>
  4083. </test>
  4084. <test> <!-- TESTED -->
  4085. <description>put: putting file into a directory(relative path)</description>
  4086. <test-commands>
  4087. <command>-fs NAMENODE -mkdir -p dir0/dir1/data</command>
  4088. <command>-fs NAMENODE -put CLITEST_DATA/data15bytes dir0/dir1/data</command>
  4089. <command>-fs NAMENODE -du dir0/dir1/data</command>
  4090. </test-commands>
  4091. <cleanup-commands>
  4092. <command>-fs NAMENODE -rm -r /user</command>
  4093. </cleanup-commands>
  4094. <comparators>
  4095. <comparator>
  4096. <type>RegexpComparator</type>
  4097. <expected-output>^15\s+dir0/dir1/data/data15bytes</expected-output>
  4098. </comparator>
  4099. </comparators>
  4100. </test>
  4101. <test> <!-- TESTED -->
  4102. <description>put: putting many files into an existing directory(absolute path)</description>
  4103. <test-commands>
  4104. <command>-fs NAMENODE -mkdir /dir0</command>
  4105. <command>-fs NAMENODE -put CLITEST_DATA/data15bytes CLITEST_DATA/data30bytes /dir0</command>
  4106. <command>-fs NAMENODE -du /dir0</command>
  4107. </test-commands>
  4108. <cleanup-commands>
  4109. <command>-fs NAMENODE -rm -r /user</command>
  4110. </cleanup-commands>
  4111. <comparators>
  4112. <comparator>
  4113. <type>RegexpComparator</type>
  4114. <expected-output>^15\s+/dir0/data15bytes</expected-output>
  4115. </comparator>
  4116. <comparator>
  4117. <type>RegexpComparator</type>
  4118. <expected-output>^30\s+/dir0/data30bytes</expected-output>
  4119. </comparator>
  4120. </comparators>
  4121. </test>
  4122. <test> <!-- TESTED -->
  4123. <description>put: putting many files into an existing directory(relative path)</description>
  4124. <test-commands>
  4125. <command>-fs NAMENODE -mkdir -p dir0</command>
  4126. <command>-fs NAMENODE -put CLITEST_DATA/data15bytes CLITEST_DATA/data30bytes dir0</command>
  4127. <command>-fs NAMENODE -du dir0</command>
  4128. </test-commands>
  4129. <cleanup-commands>
  4130. <command>-fs NAMENODE -rm -r /user</command>
  4131. </cleanup-commands>
  4132. <comparators>
  4133. <comparator>
  4134. <type>RegexpComparator</type>
  4135. <expected-output>^15\s+dir0/data15bytes</expected-output>
  4136. </comparator>
  4137. <comparator>
  4138. <type>RegexpComparator</type>
  4139. <expected-output>^30\s+dir0/data30bytes</expected-output>
  4140. </comparator>
  4141. </comparators>
  4142. </test>
  4143. <test> <!-- TESTED -->
  4144. <description>put: putting non existent file(absolute path)</description>
  4145. <test-commands>
  4146. <command>-fs NAMENODE -mkdir -p dir</command> <!-- make sure user home dir exists -->
  4147. <command>-fs NAMENODE -touchz test</command>
  4148. <command>-fs NAMENODE -put /user/wrongdata file</command>
  4149. </test-commands>
  4150. <cleanup-commands>
  4151. <command>-fs NAMENODE -rm -r /user</command>
  4152. </cleanup-commands>
  4153. <comparators>
  4154. <comparator>
  4155. <type>TokenComparator</type>
  4156. <expected-output>put: `/user/wrongdata': No such file or directory</expected-output>
  4157. </comparator>
  4158. </comparators>
  4159. </test>
  4160. <test> <!-- TESTED -->
  4161. <description>put: putting non existent file(relative path)</description>
  4162. <test-commands>
  4163. <command>-fs NAMENODE -mkdir -p dir</command> <!-- make sure user home dir exists -->
  4164. <command>-fs NAMENODE -touchz test</command>
  4165. <command>-fs NAMENODE -put wrongdata file</command>
  4166. </test-commands>
  4167. <cleanup-commands>
  4168. <command>-fs NAMENODE -rm -r /user</command>
  4169. </cleanup-commands>
  4170. <comparators>
  4171. <comparator>
  4172. <type>TokenComparator</type>
  4173. <expected-output>put: `wrongdata': No such file or directory</expected-output>
  4174. </comparator>
  4175. </comparators>
  4176. </test>
  4177. <test> <!-- TESTED -->
  4178. <description>put: putting file into an already existing destination(absolute path)</description>
  4179. <test-commands>
  4180. <command>-fs NAMENODE -mkdir /user</command>
  4181. <command>-fs NAMENODE -touchz /user/file0</command>
  4182. <command>-fs NAMENODE -put CLITEST_DATA/data15bytes /user/file0</command>
  4183. </test-commands>
  4184. <cleanup-commands>
  4185. <command>-fs NAMENODE -rm -r /user</command>
  4186. </cleanup-commands>
  4187. <comparators>
  4188. <comparator>
  4189. <type>TokenComparator</type>
  4190. <expected-output>put: `/user/file0': File exists</expected-output>
  4191. </comparator>
  4192. </comparators>
  4193. </test>
  4194. <test> <!-- TESTED -->
  4195. <description>put: putting file into an already existing destination with -f option(absolute path)</description>
  4196. <test-commands>
  4197. <command>-fs NAMENODE -mkdir /user</command>
  4198. <command>-fs NAMENODE -touchz /user/file0</command>
  4199. <command>-fs NAMENODE -put -f CLITEST_DATA/data120bytes /user/file0</command>
  4200. <command>-fs NAMENODE -cat /user/file0</command>
  4201. </test-commands>
  4202. <cleanup-commands>
  4203. <command>-fs NAMENODE -rm -r /user</command>
  4204. </cleanup-commands>
  4205. <comparators>
  4206. <comparator>
  4207. <type>RegexpComparator</type>
  4208. <expected-output>12345678901234</expected-output>
  4209. </comparator>
  4210. </comparators>
  4211. </test>
  4212. <test> <!-- TESTED -->
  4213. <description>put: putting file into an already existing destination(relative path)</description>
  4214. <test-commands>
  4215. <command>-fs NAMENODE -mkdir -p dir</command> <!-- make sure user home dir exists -->
  4216. <command>-fs NAMENODE -touchz file0</command>
  4217. <command>-fs NAMENODE -put CLITEST_DATA/data15bytes file0</command>
  4218. </test-commands>
  4219. <cleanup-commands>
  4220. <command>-fs NAMENODE -rm -r /user</command>
  4221. </cleanup-commands>
  4222. <comparators>
  4223. <comparator>
  4224. <type>TokenComparator</type>
  4225. <expected-output>put: `file0': File exists</expected-output>
  4226. </comparator>
  4227. </comparators>
  4228. </test>
  4229. <test> <!-- TESTED -->
  4230. <description>put: putting many files into an existing file</description>
  4231. <test-commands>
  4232. <command>-fs NAMENODE -put CLITEST_DATA/data15bytes /data15bytes</command>
  4233. <command>-fs NAMENODE -put CLITEST_DATA/data30bytes /data30bytes</command>
  4234. <command>-fs NAMENODE -mkdir -p dir</command> <!-- make sure user home dir exists -->
  4235. <command>-fs NAMENODE -touchz file0</command>
  4236. <command>-fs NAMENODE -put /data15bytes /data30bytes file0</command>
  4237. </test-commands>
  4238. <cleanup-commands>
  4239. <command>-fs NAMENODE -rm -r /user</command>
  4240. </cleanup-commands>
  4241. <comparators>
  4242. <comparator>
  4243. <type>RegexpComparator</type>
  4244. <expected-output>^put: `file0': Is not a directory</expected-output>
  4245. </comparator>
  4246. </comparators>
  4247. </test>
  4248. <test> <!-- TESTED -->
  4249. <description>put: putting many files into a non existent directory</description>
  4250. <test-commands>
  4251. <command>-fs NAMENODE -put CLITEST_DATA/data15bytes /data15bytes</command>
  4252. <command>-fs NAMENODE -put CLITEST_DATA/data30bytes /data30bytes</command>
  4253. <command>-fs NAMENODE -put /data15bytes /data30bytes wrongdir</command>
  4254. </test-commands>
  4255. <cleanup-commands>
  4256. <command>-fs NAMENODE -rm -r /user</command>
  4257. </cleanup-commands>
  4258. <comparators>
  4259. <comparator>
  4260. <type>RegexpComparator</type>
  4261. <expected-output>^put: `wrongdir': No such file or directory</expected-output>
  4262. </comparator>
  4263. </comparators>
  4264. </test>
  4265. <test> <!-- TESTED -->
  4266. <description>put: putting a local file into hdfs:// path </description>
  4267. <test-commands>
  4268. <command>-fs NAMENODE -put CLITEST_DATA/data15bytes hdfs:///data15bytes</command>
  4269. <command>-fs NAMENODE -du hdfs:///data15bytes</command>
  4270. </test-commands>
  4271. <cleanup-commands>
  4272. <command>-fs NAMENODE -rm hdfs:///data15bytes</command>
  4273. </cleanup-commands>
  4274. <comparators>
  4275. <comparator>
  4276. <type>RegexpComparator</type>
  4277. <expected-output>^15\s+hdfs:///data15bytes</expected-output>
  4278. </comparator>
  4279. </comparators>
  4280. </test>
  4281. <test> <!-- TESTED -->
  4282. <description>put: putting file into a directory in hdfs:// path </description>
  4283. <test-commands>
  4284. <command>-fs NAMENODE -mkdir -p /dir1/data</command>
  4285. <command>-fs NAMENODE -put CLITEST_DATA/data15bytes hdfs:///dir1/data</command>
  4286. <command>-fs NAMENODE -du hdfs:///dir1/data/</command>
  4287. </test-commands>
  4288. <cleanup-commands>
  4289. <command>-fs NAMENODE -rm -r hdfs:///dir1/data</command>
  4290. </cleanup-commands>
  4291. <comparators>
  4292. <comparator>
  4293. <type>RegexpComparator</type>
  4294. <expected-output>^15\s+hdfs:///dir1/data/data15bytes</expected-output>
  4295. </comparator>
  4296. </comparators>
  4297. </test>
  4298. <test> <!-- TESTED -->
  4299. <description>put: putting many local files into an existing directory in hdfs:// path </description>
  4300. <test-commands>
  4301. <command>-fs NAMENODE -mkdir hdfs:///dir0</command>
  4302. <command>-fs NAMENODE -put CLITEST_DATA/data15bytes CLITEST_DATA/data30bytes hdfs:///dir0</command>
  4303. <command>-fs NAMENODE -du hdfs:///dir0</command>
  4304. </test-commands>
  4305. <cleanup-commands>
  4306. <command>-fs NAMENODE -rm -r hdfs:///dir0</command>
  4307. </cleanup-commands>
  4308. <comparators>
  4309. <comparator>
  4310. <type>RegexpComparator</type>
  4311. <expected-output>^15\s+hdfs:///dir0/data15bytes</expected-output>
  4312. </comparator>
  4313. <comparator>
  4314. <type>RegexpComparator</type>
  4315. <expected-output>^30\s+hdfs:///dir0/data30bytes</expected-output>
  4316. </comparator>
  4317. </comparators>
  4318. </test>
  4319. <test> <!-- TESTED -->
  4320. <description>put: putting non existent file in hdfs:// path </description>
  4321. <test-commands>
  4322. <command>-fs NAMENODE -put /user/wrongdata hdfs:///file</command>
  4323. </test-commands>
  4324. <cleanup-commands>
  4325. <command>-fs NAMENODE -rm -r hdfs:///*</command>
  4326. </cleanup-commands>
  4327. <comparators>
  4328. <comparator>
  4329. <type>TokenComparator</type>
  4330. <expected-output>put: `/user/wrongdata': No such file or directory</expected-output>
  4331. </comparator>
  4332. </comparators>
  4333. </test>
  4334. <test> <!-- TESTED -->
  4335. <description>put: putting local file into an already existing destination in hdfs:// path </description>
  4336. <test-commands>
  4337. <command>-fs NAMENODE -mkdir hdfs:///user/</command>
  4338. <command>-fs NAMENODE -touchz hdfs:///user/file0</command>
  4339. <command>-fs NAMENODE -put CLITEST_DATA/data15bytes hdfs:///user/file0</command>
  4340. </test-commands>
  4341. <cleanup-commands>
  4342. <command>-fs NAMENODE -rm -r hdfs:///user</command>
  4343. </cleanup-commands>
  4344. <comparators>
  4345. <comparator>
  4346. <type>TokenComparator</type>
  4347. <expected-output>put: `hdfs:///user/file0': File exists</expected-output>
  4348. </comparator>
  4349. </comparators>
  4350. </test>
  4351. <test> <!-- TESTED -->
  4352. <description>put: putting many local files into an existing file in hdfs:// path</description>
  4353. <test-commands>
  4354. <command>-fs NAMENODE -touchz hdfs:///file0</command>
  4355. <command>-fs NAMENODE -put CLITEST_DATA/data15bytes CLITEST_DATA/data30bytes hdfs:///file0</command>
  4356. </test-commands>
  4357. <cleanup-commands>
  4358. <command>-fs NAMENODE -rm -r hdfs:///*</command>
  4359. </cleanup-commands>
  4360. <comparators>
  4361. <comparator>
  4362. <type>RegexpComparator</type>
  4363. <expected-output>^put: `hdfs:///file0': Is not a directory</expected-output>
  4364. </comparator>
  4365. </comparators>
  4366. </test>
  4367. <test> <!-- TESTED -->
  4368. <description>put: putting file into a non existent directory in hdfs:// path </description>
  4369. <test-commands>
  4370. <command>-fs NAMENODE -put CLITEST_DATA/data15bytes CLITEST_DATA/data30bytes hdfs:///wrongdir</command>
  4371. </test-commands>
  4372. <cleanup-commands>
  4373. <command>-fs NAMENODE -rm -r hdfs:///*</command>
  4374. </cleanup-commands>
  4375. <comparators>
  4376. <comparator>
  4377. <type>RegexpComparator</type>
  4378. <expected-output>^put: `hdfs:///wrongdir': No such file or directory</expected-output>
  4379. </comparator>
  4380. </comparators>
  4381. </test>
  4382. <test> <!-- TESTED -->
  4383. <description>put: putting a local file into in Namenode's path </description>
  4384. <test-commands>
  4385. <command>-fs NAMENODE -put CLITEST_DATA/data15bytes NAMENODE/data15bytes</command>
  4386. <command>-fs NAMENODE -du NAMENODE/data15bytes</command>
  4387. </test-commands>
  4388. <cleanup-commands>
  4389. <command>-fs NAMENODE -rm NAMENODE/data15bytes</command>
  4390. </cleanup-commands>
  4391. <comparators>
  4392. <comparator>
  4393. <type>RegexpComparator</type>
  4394. <expected-output>^15\s+NAMENODE/data15bytes</expected-output>
  4395. </comparator>
  4396. </comparators>
  4397. </test>
  4398. <test> <!-- TESTED -->
  4399. <description>put: putting file into a directory in Namenode's path </description>
  4400. <test-commands>
  4401. <command>-fs NAMENODE -mkdir -p /dir1/data</command>
  4402. <command>-fs NAMENODE -put CLITEST_DATA/data15bytes NAMENODE/dir1/data</command>
  4403. <command>-fs NAMENODE -du NAMENODE/dir1/data</command>
  4404. </test-commands>
  4405. <cleanup-commands>
  4406. <command>-fs NAMENODE -rm -r NAMENODE/dir1/data</command>
  4407. </cleanup-commands>
  4408. <comparators>
  4409. <comparator>
  4410. <type>RegexpComparator</type>
  4411. <expected-output>^15\s+NAMENODE/dir1/data/data15bytes</expected-output>
  4412. </comparator>
  4413. </comparators>
  4414. </test>
  4415. <test> <!-- TESTED -->
  4416. <description>put: putting many local files into an existing directory in Namenode's path</description>
  4417. <test-commands>
  4418. <command>-fs NAMENODE -mkdir NAMENODE/dir0</command>
  4419. <command>-fs NAMENODE -put CLITEST_DATA/data15bytes CLITEST_DATA/data30bytes NAMENODE/dir0</command>
  4420. <command>-fs NAMENODE -du NAMENODE/dir0</command>
  4421. </test-commands>
  4422. <cleanup-commands>
  4423. <command>-fs NAMENODE -rm -r NAMENODE/dir0</command>
  4424. </cleanup-commands>
  4425. <comparators>
  4426. <comparator>
  4427. <type>RegexpComparator</type>
  4428. <expected-output>^15\s+NAMENODE/dir0/data15bytes</expected-output>
  4429. </comparator>
  4430. <comparator>
  4431. <type>RegexpComparator</type>
  4432. <expected-output>^30\s+NAMENODE/dir0/data30bytes</expected-output>
  4433. </comparator>
  4434. </comparators>
  4435. </test>
  4436. <test> <!-- TESTED -->
  4437. <description>put: putting non existent file in Namenode's path </description>
  4438. <test-commands>
  4439. <command>-fs NAMENODE -put /user/wrongdata NAMENODE/file</command>
  4440. </test-commands>
  4441. <cleanup-commands>
  4442. <command>-fs NAMENODE -rm -r NAMENODE/*</command>
  4443. </cleanup-commands>
  4444. <comparators>
  4445. <comparator>
  4446. <type>RegexpComparator</type>
  4447. <expected-output>^put: `/user/wrongdata': No such file or directory</expected-output>
  4448. </comparator>
  4449. </comparators>
  4450. </test>
  4451. <test> <!-- TESTED -->
  4452. <description>put: putting local file into an already existing destination in Namenode's path</description>
  4453. <test-commands>
  4454. <command>-fs NAMENODE -mkdir NAMENODE/user/</command>
  4455. <command>-fs NAMENODE -touchz NAMENODE/user/file0</command>
  4456. <command>-fs NAMENODE -put CLITEST_DATA/data15bytes NAMENODE/user/file0</command>
  4457. </test-commands>
  4458. <cleanup-commands>
  4459. <command>-fs NAMENODE -rm -r NAMENODE/user</command>
  4460. </cleanup-commands>
  4461. <comparators>
  4462. <comparator>
  4463. <type>RegexpComparator</type>
  4464. <expected-output>^put: `hdfs://\w+[-.a-z0-9]*:[0-9]+/user/file0': File exists</expected-output>
  4465. </comparator>
  4466. </comparators>
  4467. </test>
  4468. <test> <!-- TESTED -->
  4469. <description>put: putting many local files into an existing file in Namenode's path </description>
  4470. <test-commands>
  4471. <command>-fs NAMENODE -touchz NAMENODE/file0</command>
  4472. <command>-fs NAMENODE -put CLITEST_DATA/data15bytes CLITEST_DATA/data30bytes NAMENODE/file0</command>
  4473. </test-commands>
  4474. <cleanup-commands>
  4475. <command>-fs NAMENODE -rm -r NAMENODE/*</command>
  4476. </cleanup-commands>
  4477. <comparators>
  4478. <comparator>
  4479. <type>RegexpComparator</type>
  4480. <expected-output>^put: `hdfs://\w+[-.a-z0-9]*:[0-9]+/file0': Is not a directory</expected-output>
  4481. </comparator>
  4482. </comparators>
  4483. </test>
  4484. <test> <!-- TESTED -->
  4485. <description>put: putting many files into a non existent directory in Namenode's path </description>
  4486. <test-commands>
  4487. <command>-fs NAMENODE -put CLITEST_DATA/data15bytes CLITEST_DATA/data30bytes NAMENODE/wrongdir</command>
  4488. </test-commands>
  4489. <cleanup-commands>
  4490. <command>-fs NAMENODE -rm -r NAMENODE/*</command>
  4491. </cleanup-commands>
  4492. <comparators>
  4493. <comparator>
  4494. <type>RegexpComparator</type>
  4495. <expected-output>^put: `hdfs://\w+[-.a-z0-9]*:[0-9]+/wrongdir': No such file or directory</expected-output>
  4496. </comparator>
  4497. </comparators>
  4498. </test>
  4499. <!-- Tests for copyFromLocal -->
  4500. <test> <!-- TESTED -->
  4501. <description>copyFromLocal: copying file into a file (absolute path)</description>
  4502. <test-commands>
  4503. <command>-fs NAMENODE -copyFromLocal CLITEST_DATA/data15bytes /data15bytes</command>
  4504. <command>-fs NAMENODE -du /data15bytes</command>
  4505. </test-commands>
  4506. <cleanup-commands>
  4507. <command>-fs NAMENODE -rm /data15bytes</command>
  4508. </cleanup-commands>
  4509. <comparators>
  4510. <comparator>
  4511. <type>RegexpComparator</type>
  4512. <expected-output>^15\s+/data15bytes</expected-output>
  4513. </comparator>
  4514. </comparators>
  4515. </test>
  4516. <test> <!-- TESTED -->
  4517. <description>copyFromLocal: copying file into a file (relative path)</description>
  4518. <test-commands>
  4519. <command>-fs NAMENODE -mkdir -p dir</command> <!-- make sure user home dir exists -->
  4520. <command>-fs NAMENODE -touchz test</command>
  4521. <command>-fs NAMENODE -copyFromLocal CLITEST_DATA/data15bytes data15bytes</command>
  4522. <command>-fs NAMENODE -du data15bytes</command>
  4523. </test-commands>
  4524. <cleanup-commands>
  4525. <command>-fs NAMENODE -rm -r /user</command>
  4526. </cleanup-commands>
  4527. <comparators>
  4528. <comparator>
  4529. <type>RegexpComparator</type>
  4530. <expected-output>^15\s+data15bytes</expected-output>
  4531. </comparator>
  4532. </comparators>
  4533. </test>
  4534. <test> <!-- TESTED -->
  4535. <description>copyFromLocal: copying file into a directory(absolute path)</description>
  4536. <test-commands>
  4537. <command>-fs NAMENODE -mkdir -p /dir0/dir1/data</command>
  4538. <command>-fs NAMENODE -copyFromLocal CLITEST_DATA/data15bytes /dir0/dir1/data</command>
  4539. <command>-fs NAMENODE -du /dir0/dir1/data/*</command>
  4540. </test-commands>
  4541. <cleanup-commands>
  4542. <command>-fs NAMENODE -rm -r /dir0</command>
  4543. </cleanup-commands>
  4544. <comparators>
  4545. <comparator>
  4546. <type>RegexpComparator</type>
  4547. <expected-output>^15\s+/dir0/dir1/data/data15bytes</expected-output>
  4548. </comparator>
  4549. </comparators>
  4550. </test>
  4551. <test> <!-- TESTED -->
  4552. <description>copyFromLocal: copying file into a directory(relative path)</description>
  4553. <test-commands>
  4554. <command>-fs NAMENODE -mkdir -p dir0/dir1/data</command>
  4555. <command>-fs NAMENODE -copyFromLocal CLITEST_DATA/data15bytes dir0/dir1/data</command>
  4556. <command>-fs NAMENODE -du dir0/dir1/data/*</command>
  4557. </test-commands>
  4558. <cleanup-commands>
  4559. <command>-fs NAMENODE -rm -r /user</command>
  4560. </cleanup-commands>
  4561. <comparators>
  4562. <comparator>
  4563. <type>RegexpComparator</type>
  4564. <expected-output>^15\s+dir0/dir1/data/data15bytes</expected-output>
  4565. </comparator>
  4566. </comparators>
  4567. </test>
  4568. <test> <!-- TESTED -->
  4569. <description>copyFromLocal: copying many files into an existing directory(absolute path)</description>
  4570. <test-commands>
  4571. <command>-fs NAMENODE -mkdir /dir0</command>
  4572. <command>-fs NAMENODE -copyFromLocal CLITEST_DATA/data15bytes CLITEST_DATA/data30bytes /dir0</command>
  4573. <command>-fs NAMENODE -du /dir0</command>
  4574. </test-commands>
  4575. <cleanup-commands>
  4576. <command>-fs NAMENODE -rm -r /user</command>
  4577. </cleanup-commands>
  4578. <comparators>
  4579. <comparator>
  4580. <type>RegexpComparator</type>
  4581. <expected-output>^15\s+/dir0/data15bytes</expected-output>
  4582. </comparator>
  4583. <comparator>
  4584. <type>RegexpComparator</type>
  4585. <expected-output>^30\s+/dir0/data30bytes</expected-output>
  4586. </comparator>
  4587. </comparators>
  4588. </test>
  4589. <test> <!-- TESTED -->
  4590. <description>copyFromLocal: copying many files into an existing directory(relative path)</description>
  4591. <test-commands>
  4592. <command>-fs NAMENODE -mkdir -p dir0</command>
  4593. <command>-fs NAMENODE -copyFromLocal CLITEST_DATA/data15bytes CLITEST_DATA/data30bytes dir0</command>
  4594. <command>-fs NAMENODE -du dir0</command>
  4595. </test-commands>
  4596. <cleanup-commands>
  4597. <command>-fs NAMENODE -rm -r /user</command>
  4598. </cleanup-commands>
  4599. <comparators>
  4600. <comparator>
  4601. <type>RegexpComparator</type>
  4602. <expected-output>^15\s+dir0/data15bytes</expected-output>
  4603. </comparator>
  4604. <comparator>
  4605. <type>RegexpComparator</type>
  4606. <expected-output>^30\s+dir0/data30bytes</expected-output>
  4607. </comparator>
  4608. </comparators>
  4609. </test>
  4610. <test> <!-- TESTED -->
  4611. <description>copyFromLocal: copying non existent file(absolute path)</description>
  4612. <test-commands>
  4613. <command>-fs NAMENODE -mkdir -p dir</command> <!-- make sure user home dir exists -->
  4614. <command>-fs NAMENODE -touchz test</command>
  4615. <command>-fs NAMENODE -copyFromLocal /user/wrongdata file</command>
  4616. </test-commands>
  4617. <cleanup-commands>
  4618. <command>-fs NAMENODE -rm -r /user</command>
  4619. </cleanup-commands>
  4620. <comparators>
  4621. <comparator>
  4622. <type>TokenComparator</type>
  4623. <expected-output>copyFromLocal: `/user/wrongdata': No such file or directory</expected-output>
  4624. </comparator>
  4625. </comparators>
  4626. </test>
  4627. <test> <!-- TESTED -->
  4628. <description>copyFromLocal: copying non existent file(relative path)</description>
  4629. <test-commands>
  4630. <command>-fs NAMENODE -mkdir -p dir</command> <!-- make sure user home dir exists -->
  4631. <command>-fs NAMENODE -touchz test</command>
  4632. <command>-fs NAMENODE -copyFromLocal wrongdata file</command>
  4633. </test-commands>
  4634. <cleanup-commands>
  4635. <command>-fs NAMENODE -rm -r /user</command>
  4636. </cleanup-commands>
  4637. <comparators>
  4638. <comparator>
  4639. <type>TokenComparator</type>
  4640. <expected-output>copyFromLocal: `wrongdata': No such file or directory</expected-output>
  4641. </comparator>
  4642. </comparators>
  4643. </test>
  4644. <test> <!-- TESTED -->
  4645. <description>copyFromLocal: copying file into an already existing destination(absolute path)</description>
  4646. <test-commands>
  4647. <command>-fs NAMENODE -mkdir /user</command>
  4648. <command>-fs NAMENODE -touchz /user/file0</command>
  4649. <command>-fs NAMENODE -copyFromLocal CLITEST_DATA/data15bytes /user/file0</command>
  4650. </test-commands>
  4651. <cleanup-commands>
  4652. <command>-fs NAMENODE -rm -r /user</command>
  4653. </cleanup-commands>
  4654. <comparators>
  4655. <comparator>
  4656. <type>TokenComparator</type>
  4657. <expected-output>copyFromLocal: `/user/file0': File exists</expected-output>
  4658. </comparator>
  4659. </comparators>
  4660. </test>
  4661. <test> <!-- TESTED -->
  4662. <description>copyFromLocal: copying file into an already existing destination with -f option(absolute path)</description>
  4663. <test-commands>
  4664. <command>-fs NAMENODE -mkdir /user</command>
  4665. <command>-fs NAMENODE -touchz /user/file0</command>
  4666. <command>-fs NAMENODE -copyFromLocal -f CLITEST_DATA/data120bytes /user/file0</command>
  4667. <command>-fs NAMENODE -cat /user/file0</command>
  4668. </test-commands>
  4669. <cleanup-commands>
  4670. <command>-fs NAMENODE -rm -r /user</command>
  4671. </cleanup-commands>
  4672. <comparators>
  4673. <comparator>
  4674. <type>RegexpComparator</type>
  4675. <expected-output>12345678901234</expected-output>
  4676. </comparator>
  4677. </comparators>
  4678. </test>
  4679. <test> <!-- TESTED -->
  4680. <description>copyFromLocal: copying file into an already existing destination(relative path)</description>
  4681. <test-commands>
  4682. <command>-fs NAMENODE -mkdir -p dir</command> <!-- make sure user home dir exists -->
  4683. <command>-fs NAMENODE -touchz file0</command>
  4684. <command>-fs NAMENODE -copyFromLocal CLITEST_DATA/data15bytes file0</command>
  4685. </test-commands>
  4686. <cleanup-commands>
  4687. <command>-fs NAMENODE -rm -r /user</command>
  4688. </cleanup-commands>
  4689. <comparators>
  4690. <comparator>
  4691. <type>TokenComparator</type>
  4692. <expected-output>copyFromLocal: `file0': File exists</expected-output>
  4693. </comparator>
  4694. </comparators>
  4695. </test>
  4696. <test> <!-- TESTED -->
  4697. <description>copyFromLocal: copying many files into an existing file</description>
  4698. <test-commands>
  4699. <command>-fs NAMENODE -copyFromLocal CLITEST_DATA/data15bytes /data15bytes</command>
  4700. <command>-fs NAMENODE -copyFromLocal CLITEST_DATA/data30bytes /data30bytes</command>
  4701. <command>-fs NAMENODE -mkdir -p dir</command> <!-- make sure user home dir exists -->
  4702. <command>-fs NAMENODE -touchz file0</command>
  4703. <command>-fs NAMENODE -copyFromLocal /data15bytes /data30bytes file0</command>
  4704. </test-commands>
  4705. <cleanup-commands>
  4706. <command>-fs NAMENODE -rm -r /user</command>
  4707. </cleanup-commands>
  4708. <comparators>
  4709. <comparator>
  4710. <type>RegexpComparator</type>
  4711. <expected-output>^copyFromLocal: `file0': Is not a directory</expected-output>
  4712. </comparator>
  4713. </comparators>
  4714. </test>
  4715. <test> <!-- TESTED -->
  4716. <description>copyFromLocal: copying many files into a non existent directory</description>
  4717. <test-commands>
  4718. <command>-fs NAMENODE -copyFromLocal CLITEST_DATA/data15bytes /data15bytes</command>
  4719. <command>-fs NAMENODE -copyFromLocal CLITEST_DATA/data30bytes /data30bytes</command>
  4720. <command>-fs NAMENODE -copyFromLocal /data15bytes /data30bytes wrongdir</command>
  4721. </test-commands>
  4722. <cleanup-commands>
  4723. <command>-fs NAMENODE -rm -r /user</command>
  4724. </cleanup-commands>
  4725. <comparators>
  4726. <comparator>
  4727. <type>RegexpComparator</type>
  4728. <expected-output>^copyFromLocal: `wrongdir': No such file or directory</expected-output>
  4729. </comparator>
  4730. </comparators>
  4731. </test>
  4732. <test> <!-- TESTED -->
  4733. <description>copyFromLocal: Test for hdfs:// path - copying local file into a hdfs://file</description>
  4734. <test-commands>
  4735. <command>-fs NAMENODE -copyFromLocal CLITEST_DATA/data15bytes hdfs:///data15bytes</command>
  4736. <command>-fs NAMENODE -du hdfs:///data15bytes</command>
  4737. </test-commands>
  4738. <cleanup-commands>
  4739. <command>-fs NAMENODE -rm hdfs:///data15bytes</command>
  4740. </cleanup-commands>
  4741. <comparators>
  4742. <comparator>
  4743. <type>RegexpComparator</type>
  4744. <expected-output>^15\s+hdfs:///data15bytes</expected-output>
  4745. </comparator>
  4746. </comparators>
  4747. </test>
  4748. <test> <!-- TESTED -->
  4749. <description>copyFromLocal: Test for hdfs:// path - copying local file into a hdfs directory</description>
  4750. <test-commands>
  4751. <command>-fs NAMENODE -mkdir hdfs:///dir0</command>
  4752. <command>-fs NAMENODE -mkdir hdfs:///dir0/dir1</command>
  4753. <command>-fs NAMENODE -mkdir hdfs:///dir0/dir1/data</command>
  4754. <command>-fs NAMENODE -copyFromLocal CLITEST_DATA/data15bytes hdfs:///dir0/dir1/data/</command>
  4755. <command>-fs NAMENODE -du hdfs:///dir0/dir1/data/data15bytes</command>
  4756. </test-commands>
  4757. <cleanup-commands>
  4758. <command>-fs NAMENODE -rm -r hdfs:///dir0</command>
  4759. </cleanup-commands>
  4760. <comparators>
  4761. <comparator>
  4762. <type>RegexpComparator</type>
  4763. <expected-output>^15\s+hdfs:///dir0/dir1/data/data15bytes</expected-output>
  4764. </comparator>
  4765. </comparators>
  4766. </test>
  4767. <test> <!-- TESTED -->
  4768. <description>copyFromLocal: Test for hdfs:// path copying many local files into an existing hdfs directory</description>
  4769. <test-commands>
  4770. <command>-fs NAMENODE -mkdir hdfs:///dir0</command>
  4771. <command>-fs NAMENODE -copyFromLocal CLITEST_DATA/data15bytes CLITEST_DATA/data30bytes hdfs:///dir0</command>
  4772. <command>-fs NAMENODE -du hdfs:///dir0</command>
  4773. </test-commands>
  4774. <cleanup-commands>
  4775. <command>-fs NAMENODE -rm -r hdfs:///dir0</command>
  4776. </cleanup-commands>
  4777. <comparators>
  4778. <comparator>
  4779. <type>RegexpComparator</type>
  4780. <expected-output>^15\s+hdfs:///dir0/data15bytes</expected-output>
  4781. </comparator>
  4782. <comparator>
  4783. <type>RegexpComparator</type>
  4784. <expected-output>^30\s+hdfs:///dir0/data30bytes</expected-output>
  4785. </comparator>
  4786. </comparators>
  4787. </test>
  4788. <test> <!-- TESTED -->
  4789. <description>copyFromLocal: Test for hdfs:// path - copying non existent file</description>
  4790. <test-commands>
  4791. <command>-fs NAMENODE -copyFromLocal /user/wrongdata hdfs:///file</command>
  4792. </test-commands>
  4793. <cleanup-commands>
  4794. <command>-fs NAMENODE -rm -r hdfs:///*</command>
  4795. </cleanup-commands>
  4796. <comparators>
  4797. <comparator>
  4798. <type>TokenComparator</type>
  4799. <expected-output>copyFromLocal: `/user/wrongdata': No such file or directory</expected-output>
  4800. </comparator>
  4801. </comparators>
  4802. </test>
  4803. <test> <!-- TESTED -->
  4804. <description>copyFromLocal: Test for hdfs:// path - copying local file into an already existing destination</description>
  4805. <test-commands>
  4806. <command>-fs NAMENODE -mkdir hdfs:///user/</command>
  4807. <command>-fs NAMENODE -touchz hdfs:///user/file0</command>
  4808. <command>-fs NAMENODE -copyFromLocal CLITEST_DATA/data15bytes hdfs:///user/file0</command>
  4809. </test-commands>
  4810. <cleanup-commands>
  4811. <command>-fs NAMENODE -rm -r hdfs:///user</command>
  4812. </cleanup-commands>
  4813. <comparators>
  4814. <comparator>
  4815. <type>TokenComparator</type>
  4816. <expected-output>copyFromLocal: `hdfs:///user/file0': File exists</expected-output>
  4817. </comparator>
  4818. </comparators>
  4819. </test>
  4820. <test> <!-- TESTED -->
  4821. <description>copyFromLocal: Test for hdfs:// path - copying many local files into an existing file</description>
  4822. <test-commands>
  4823. <command>-fs NAMENODE -touchz hdfs:///file0</command>
  4824. <command>-fs NAMENODE -copyFromLocal CLITEST_DATA/data15bytes CLITEST_DATA/data30bytes hdfs:///file0</command>
  4825. </test-commands>
  4826. <cleanup-commands>
  4827. <command>-fs NAMENODE -rm -r hdfs:///*</command>
  4828. </cleanup-commands>
  4829. <comparators>
  4830. <comparator>
  4831. <type>RegexpComparator</type>
  4832. <expected-output>^copyFromLocal: `hdfs:///file0': Is not a directory</expected-output>
  4833. </comparator>
  4834. </comparators>
  4835. </test>
  4836. <test> <!-- TESTED -->
  4837. <description>copyFromLocal: Test for hdfs:// path - copying many local files into a non existent directory</description>
  4838. <test-commands>
  4839. <command>-fs NAMENODE -copyFromLocal CLITEST_DATA/data15bytes CLITEST_DATA/data30bytes hdfs:///wrongdir</command>
  4840. </test-commands>
  4841. <cleanup-commands>
  4842. <command>-fs NAMENODE -rm -r hdfs:///*</command>
  4843. </cleanup-commands>
  4844. <comparators>
  4845. <comparator>
  4846. <type>RegexpComparator</type>
  4847. <expected-output>^copyFromLocal: `hdfs:///wrongdir': No such file or directory</expected-output>
  4848. </comparator>
  4849. </comparators>
  4850. </test>
  4851. <!-- Tests for copyFromLocal using Namenode's path-->
  4852. <test> <!-- TESTED -->
  4853. <description>copyFromLocal: Test for Namenode's path - copying local file into a hdfs://file</description>
  4854. <test-commands>
  4855. <command>-fs NAMENODE -copyFromLocal CLITEST_DATA/data15bytes NAMENODE/data15bytes</command>
  4856. <command>-fs NAMENODE -du NAMENODE/data15bytes</command>
  4857. </test-commands>
  4858. <cleanup-commands>
  4859. <command>-fs NAMENODE -rm NAMENODE/data15bytes</command>
  4860. </cleanup-commands>
  4861. <comparators>
  4862. <comparator>
  4863. <type>RegexpComparator</type>
  4864. <expected-output>^15\s+NAMENODE/data15bytes</expected-output>
  4865. </comparator>
  4866. </comparators>
  4867. </test>
  4868. <test> <!-- TESTED -->
  4869. <description>copyFromLocal: Test for Namenode's path - copying local file into a hdfs directory</description>
  4870. <test-commands>
  4871. <command>-fs NAMENODE -mkdir NAMENODE/dir0</command>
  4872. <command>-fs NAMENODE -mkdir NAMENODE/dir0/dir1</command>
  4873. <command>-fs NAMENODE -mkdir NAMENODE/dir0/dir1/data</command>
  4874. <command>-fs NAMENODE -copyFromLocal CLITEST_DATA/data15bytes NAMENODE/dir0/dir1/data/</command>
  4875. <command>-fs NAMENODE -du NAMENODE/dir0/dir1/data/data15bytes</command>
  4876. </test-commands>
  4877. <cleanup-commands>
  4878. <command>-fs NAMENODE -rm -r NAMENODE/dir0</command>
  4879. </cleanup-commands>
  4880. <comparators>
  4881. <comparator>
  4882. <type>RegexpComparator</type>
  4883. <expected-output>^15\s+NAMENODE/dir0/dir1/data/data15bytes</expected-output>
  4884. </comparator>
  4885. </comparators>
  4886. </test>
  4887. <test> <!-- TESTED -->
  4888. <description>copyFromLocal: Test for Namenode's path copying many local files into an existing hdfs directory</description>
  4889. <test-commands>
  4890. <command>-fs NAMENODE -mkdir NAMENODE/dir0</command>
  4891. <command>-fs NAMENODE -copyFromLocal CLITEST_DATA/data15bytes CLITEST_DATA/data30bytes NAMENODE/dir0</command>
  4892. <command>-fs NAMENODE -du NAMENODE/dir0</command>
  4893. </test-commands>
  4894. <cleanup-commands>
  4895. <command>-fs NAMENODE -rm -r NAMENODE/dir0</command>
  4896. </cleanup-commands>
  4897. <comparators>
  4898. <comparator>
  4899. <type>RegexpComparator</type>
  4900. <expected-output>^15\s+NAMENODE/dir0/data15bytes</expected-output>
  4901. </comparator>
  4902. <comparator>
  4903. <type>RegexpComparator</type>
  4904. <expected-output>^30\s+NAMENODE/dir0/data30bytes</expected-output>
  4905. </comparator>
  4906. </comparators>
  4907. </test>
  4908. <test> <!-- TESTED -->
  4909. <description>copyFromLocal: Test for Namenode's path - copying non existent file</description>
  4910. <test-commands>
  4911. <command>-fs NAMENODE -copyFromLocal /user/wrongdata NAMENODE/file</command>
  4912. </test-commands>
  4913. <cleanup-commands>
  4914. <command>-fs NAMENODE -rm -r NAMENODE/*</command>
  4915. </cleanup-commands>
  4916. <comparators>
  4917. <comparator>
  4918. <type>TokenComparator</type>
  4919. <expected-output>copyFromLocal: `/user/wrongdata': No such file or directory</expected-output>
  4920. </comparator>
  4921. </comparators>
  4922. </test>
  4923. <test> <!-- TESTED -->
  4924. <description>copyFromLocal: Test for Namenode's path - copying local file into an already existing destination</description>
  4925. <test-commands>
  4926. <command>-fs NAMENODE -mkdir NAMENODE/user/</command>
  4927. <command>-fs NAMENODE -touchz NAMENODE/user/file0</command>
  4928. <command>-fs NAMENODE -copyFromLocal CLITEST_DATA/data15bytes NAMENODE/user/file0</command>
  4929. </test-commands>
  4930. <cleanup-commands>
  4931. <command>-fs NAMENODE -rm -r NAMENODE/user</command>
  4932. </cleanup-commands>
  4933. <comparators>
  4934. <comparator>
  4935. <type>RegexpComparator</type>
  4936. <expected-output>copyFromLocal: `hdfs://\w+[-.a-z0-9]*:[0-9]+/user/file0': File exists</expected-output>
  4937. </comparator>
  4938. </comparators>
  4939. </test>
  4940. <test> <!-- TESTED -->
  4941. <description>copyFromLocal: Test for Namenode's path - copying many local files into an existing file</description>
  4942. <test-commands>
  4943. <command>-fs NAMENODE -touchz NAMENODE/file0</command>
  4944. <command>-fs NAMENODE -copyFromLocal CLITEST_DATA/data15bytes CLITEST_DATA/data30bytes NAMENODE/file0</command>
  4945. </test-commands>
  4946. <cleanup-commands>
  4947. <command>-fs NAMENODE -rm -r NAMENODE/*</command>
  4948. </cleanup-commands>
  4949. <comparators>
  4950. <comparator>
  4951. <type>RegexpComparator</type>
  4952. <expected-output>^copyFromLocal: `hdfs://\w+[-.a-z0-9]*:[0-9]+/file0': Is not a directory</expected-output>
  4953. </comparator>
  4954. </comparators>
  4955. </test>
  4956. <test> <!-- TESTED -->
  4957. <description>copyFromLocal: Test for Namenode's path - copying many local files into a non existent directory</description>
  4958. <test-commands>
  4959. <command>-fs NAMENODE -copyFromLocal CLITEST_DATA/data15bytes CLITEST_DATA/data30bytes NAMENODE/wrongdir</command>
  4960. </test-commands>
  4961. <cleanup-commands>
  4962. <command>-fs NAMENODE -rm -r NAMENODE/*</command>
  4963. </cleanup-commands>
  4964. <comparators>
  4965. <comparator>
  4966. <type>RegexpComparator</type>
  4967. <expected-output>^copyFromLocal: `hdfs://\w+[-.a-z0-9]*:[0-9]+/wrongdir': No such file or directory</expected-output>
  4968. </comparator>
  4969. </comparators>
  4970. </test>
  4971. <!-- Tests for get -->
  4972. <test> <!-- TESTED -->
  4973. <description>get: getting non existent(absolute path)</description>
  4974. <test-commands>
  4975. <command>-fs NAMENODE -get /user/file CLITEST_DATA/file</command>
  4976. </test-commands>
  4977. <cleanup-commands>
  4978. <command>-fs NAMENODE -rm -r /user</command>
  4979. </cleanup-commands>
  4980. <comparators>
  4981. <comparator>
  4982. <type>RegexpComparator</type>
  4983. <expected-output>get: `.*': No such file or directory</expected-output>
  4984. </comparator>
  4985. </comparators>
  4986. </test>
  4987. <test> <!-- TESTED -->
  4988. <description>get: getting non existent file(relative path)</description>
  4989. <test-commands>
  4990. <command>-fs NAMENODE -get file CLITEST_DATA/file</command>
  4991. </test-commands>
  4992. <cleanup-commands>
  4993. <command>-fs NAMENODE -rm -r /user</command>
  4994. </cleanup-commands>
  4995. <comparators>
  4996. <comparator>
  4997. <type>RegexpComparator</type>
  4998. <expected-output>get: `.*': No such file or directory</expected-output>
  4999. </comparator>
  5000. </comparators>
  5001. </test>
  5002. <test> <!-- TESTED -->
  5003. <description>get: Test for hdfs:// path - getting non existent</description>
  5004. <test-commands>
  5005. <command>-fs NAMENODE -get hdfs:///user/file CLITEST_DATA/file</command>
  5006. </test-commands>
  5007. <cleanup-commands>
  5008. <command>-fs NAMENODE -rm -r hdfs:///user</command>
  5009. </cleanup-commands>
  5010. <comparators>
  5011. <comparator>
  5012. <type>RegexpComparator</type>
  5013. <expected-output>get: `.*': No such file or directory</expected-output>
  5014. </comparator>
  5015. </comparators>
  5016. </test>
  5017. <test> <!-- TESTED -->
  5018. <description>get: Test for Namenode's path - getting non existent</description>
  5019. <test-commands>
  5020. <command>-fs NAMENODE -get NAMENODE/user/file CLITEST_DATA/file</command>
  5021. </test-commands>
  5022. <cleanup-commands>
  5023. <command>-fs NAMENODE -rm -r NAMENODE/user</command>
  5024. </cleanup-commands>
  5025. <comparators>
  5026. <comparator>
  5027. <type>RegexpComparator</type>
  5028. <expected-output>get: `.*': No such file or directory</expected-output>
  5029. </comparator>
  5030. </comparators>
  5031. </test>
  5032. <!-- Tests for getmerge -->
  5033. <test> <!-- TESTED -->
  5034. <description>getmerge: basic</description>
  5035. <test-commands>
  5036. <command>-fs NAMENODE -mkdir -p /user/USERNAME/dir1</command>
  5037. <command>-fs NAMENODE -copyFromLocal CLITEST_DATA/data15bytes /user/USERNAME/dir1</command>
  5038. <command>-fs NAMENODE -copyFromLocal CLITEST_DATA/data30bytes /user/USERNAME/dir1</command>
  5039. <command>-fs NAMENODE -getmerge /user/USERNAME/dir1 CLITEST_DATA/file</command>
  5040. <command>-cat CLITEST_DATA/file</command>
  5041. </test-commands>
  5042. <cleanup-commands>
  5043. <command>-fs NAMENODE -rm -r /user/USERNAME CLITEST_DATA/file</command>
  5044. <command>rm data</command>
  5045. </cleanup-commands>
  5046. <comparators>
  5047. <comparator>
  5048. <type>ExactComparator</type>
  5049. <expected-output>12345678901234
  5050. 12345678901234
  5051. 12345678901234
  5052. </expected-output>
  5053. </comparator>
  5054. </comparators>
  5055. </test>
  5056. <test> <!-- TESTED -->
  5057. <description>getmerge: with file</description>
  5058. <test-commands>
  5059. <command>-fs NAMENODE -mkdir -p /user/USERNAME/dir1</command>
  5060. <command>-fs NAMENODE -copyFromLocal CLITEST_DATA/data15bytes /user/USERNAME/dir1</command>
  5061. <command>-fs NAMENODE -getmerge /user/USERNAME/dir1/data15bytes CLITEST_DATA/file</command>
  5062. <command>-cat CLITEST_DATA/file</command>
  5063. </test-commands>
  5064. <cleanup-commands>
  5065. <command>-fs NAMENODE -rm -r /user/USERNAME CLITEST_DATA/file</command>
  5066. <command>rm data</command>
  5067. </cleanup-commands>
  5068. <comparators>
  5069. <comparator>
  5070. <type>ExactComparator</type>
  5071. <expected-output>12345678901234
  5072. </expected-output>
  5073. </comparator>
  5074. </comparators>
  5075. </test>
  5076. <test> <!-- TESTED -->
  5077. <description>getmerge: with multiple files</description>
  5078. <test-commands>
  5079. <command>-fs NAMENODE -mkdir -p /user/USERNAME/dir1</command>
  5080. <command>-fs NAMENODE -copyFromLocal CLITEST_DATA/data15bytes /user/USERNAME/dir1</command>
  5081. <command>-fs NAMENODE -copyFromLocal CLITEST_DATA/data30bytes /user/USERNAME/dir1</command>
  5082. <command>-fs NAMENODE -getmerge /user/USERNAME/dir1/data15bytes /user/USERNAME/dir1/data30bytes CLITEST_DATA/file</command>
  5083. <command>-cat CLITEST_DATA/file</command>
  5084. </test-commands>
  5085. <cleanup-commands>
  5086. <command>-fs NAMENODE -rm -r /user/USERNAME CLITEST_DATA/file</command>
  5087. <command>rm data</command>
  5088. </cleanup-commands>
  5089. <comparators>
  5090. <comparator>
  5091. <type>ExactComparator</type>
  5092. <expected-output>12345678901234
  5093. 12345678901234
  5094. 12345678901234
  5095. </expected-output>
  5096. </comparator>
  5097. </comparators>
  5098. </test>
  5099. <test> <!-- TESTED -->
  5100. <description>getmerge: with newlines</description>
  5101. <test-commands>
  5102. <command>-fs NAMENODE -mkdir -p /user/USERNAME/dir1</command>
  5103. <command>-fs NAMENODE -copyFromLocal CLITEST_DATA/data15bytes /user/USERNAME/dir1</command>
  5104. <command>-fs NAMENODE -copyFromLocal CLITEST_DATA/data30bytes /user/USERNAME/dir1</command>
  5105. <command>-fs NAMENODE -getmerge -nl /user/USERNAME/dir1 CLITEST_DATA/file</command>
  5106. <command>-cat CLITEST_DATA/file</command>
  5107. </test-commands>
  5108. <cleanup-commands>
  5109. <command>-fs NAMENODE -rm -r /user/USERNAME CLITEST_DATA/file</command>
  5110. <command>rm data</command>
  5111. </cleanup-commands>
  5112. <comparators>
  5113. <comparator>
  5114. <type>ExactComparator</type>
  5115. <expected-output>12345678901234
  5116. 12345678901234
  5117. 12345678901234
  5118. </expected-output>
  5119. </comparator>
  5120. </comparators>
  5121. </test>
  5122. <test> <!-- TESTED -->
  5123. <description>getmerge: with multiple files and newlines</description>
  5124. <test-commands>
  5125. <command>-fs NAMENODE -mkdir -p /user/USERNAME/dir1</command>
  5126. <command>-fs NAMENODE -copyFromLocal CLITEST_DATA/data15bytes /user/USERNAME/dir1</command>
  5127. <command>-fs NAMENODE -copyFromLocal CLITEST_DATA/data30bytes /user/USERNAME/dir1</command>
  5128. <command>-fs NAMENODE -getmerge -nl /user/USERNAME/dir1/data15bytes /user/USERNAME/dir1/data30bytes CLITEST_DATA/file</command>
  5129. <command>-cat CLITEST_DATA/file</command>
  5130. </test-commands>
  5131. <cleanup-commands>
  5132. <command>-fs NAMENODE -rm -r /user/USERNAME CLITEST_DATA/file</command>
  5133. <command>rm data</command>
  5134. </cleanup-commands>
  5135. <comparators>
  5136. <comparator>
  5137. <type>ExactComparator</type>
  5138. <expected-output>12345678901234
  5139. 12345678901234
  5140. 12345678901234
  5141. </expected-output>
  5142. </comparator>
  5143. </comparators>
  5144. </test>
  5145. <!-- Tests for cat -->
  5146. <test> <!-- TESTED -->
  5147. <description>cat: contents of file(absolute path)</description>
  5148. <test-commands>
  5149. <command>-fs NAMENODE -put CLITEST_DATA/data15bytes /data15bytes</command>
  5150. <command>-fs NAMENODE -cat /data15bytes</command>
  5151. </test-commands>
  5152. <cleanup-commands>
  5153. <command>-fs NAMENODE -rm /data15bytes</command>
  5154. </cleanup-commands>
  5155. <comparators>
  5156. <comparator>
  5157. <type>TokenComparator</type>
  5158. <expected-output>12345678901234</expected-output>
  5159. </comparator>
  5160. </comparators>
  5161. </test>
  5162. <test>
  5163. <description>cat: contents of file(relative path)</description>
  5164. <test-commands>
  5165. <command>-fs NAMENODE -mkdir -p dir</command> <!-- make sure user home dir exists -->
  5166. <command>-fs NAMENODE -touchz test</command>
  5167. <command>-fs NAMENODE -put CLITEST_DATA/data15bytes data15bytes</command>
  5168. <command>-fs NAMENODE -cat data15bytes</command>
  5169. </test-commands>
  5170. <cleanup-commands>
  5171. <command>-fs NAMENODE -rm -r /user</command>
  5172. </cleanup-commands>
  5173. <comparators>
  5174. <comparator>
  5175. <type>TokenComparator</type>
  5176. <expected-output>12345678901234</expected-output>
  5177. </comparator>
  5178. </comparators>
  5179. </test>
  5180. <test> <!-- TESTED -->
  5181. <description>cat: contents of files(absolute path) using globbing</description>
  5182. <test-commands>
  5183. <command>-fs NAMENODE -mkdir /dir0</command>
  5184. <command>-fs NAMENODE -put CLITEST_DATA/data15bytes /dir0/data15bytes</command>
  5185. <command>-fs NAMENODE -put CLITEST_DATA/data30bytes /dir0/data30bytes</command>
  5186. <command>-fs NAMENODE -put CLITEST_DATA/data60bytes /dir0/data60bytes</command>
  5187. <command>-fs NAMENODE -put CLITEST_DATA/data120bytes /dir0/data120bytes</command>
  5188. <command>-fs NAMENODE -cat /dir0/data*</command>
  5189. </test-commands>
  5190. <cleanup-commands>
  5191. <command>-fs NAMENODE -rm -r /dir0</command>
  5192. </cleanup-commands>
  5193. <comparators>
  5194. <comparator>
  5195. <type>RegexpComparator</type>
  5196. <expected-output>12345678901234.*</expected-output>
  5197. </comparator>
  5198. </comparators>
  5199. </test>
  5200. <test> <!-- TESTED-->
  5201. <description>cat: contents of files(relative path) using globbing</description>
  5202. <test-commands>
  5203. <command>-fs NAMENODE -mkdir -p dir0</command>
  5204. <command>-fs NAMENODE -put CLITEST_DATA/data15bytes dir0/data15bytes</command>
  5205. <command>-fs NAMENODE -put CLITEST_DATA/data30bytes dir0/data30bytes</command>
  5206. <command>-fs NAMENODE -put CLITEST_DATA/data60bytes dir0/data60bytes</command>
  5207. <command>-fs NAMENODE -put CLITEST_DATA/data120bytes dir0/data120bytes</command>
  5208. <command>-fs NAMENODE -cat dir0/data*</command>
  5209. </test-commands>
  5210. <cleanup-commands>
  5211. <command>-fs NAMENODE -rm -r /user</command>
  5212. </cleanup-commands>
  5213. <comparators>
  5214. <comparator>
  5215. <type>RegexpComparator</type>
  5216. <expected-output>12345678901234.*</expected-output>
  5217. </comparator>
  5218. </comparators>
  5219. </test>
  5220. <test> <!-- TESTED -->
  5221. <description>cat: contents of files(absolute path) without globbing</description>
  5222. <test-commands>
  5223. <command>-fs NAMENODE -mkdir /dir0</command>
  5224. <command>-fs NAMENODE -put CLITEST_DATA/data15bytes /dir0/data15bytes</command>
  5225. <command>-fs NAMENODE -put CLITEST_DATA/data30bytes /dir0/data30bytes</command>
  5226. <command>-fs NAMENODE -put CLITEST_DATA/data60bytes /dir0/data60bytes</command>
  5227. <command>-fs NAMENODE -put CLITEST_DATA/data120bytes /dir0/data120bytes</command>
  5228. <command>-fs NAMENODE -cat /dir0/data15bytes /dir0/data30bytes /dir0/data60bytes /dir0/data120bytes</command>
  5229. </test-commands>
  5230. <cleanup-commands>
  5231. <command>-fs NAMENODE -rm -r /dir0</command>
  5232. </cleanup-commands>
  5233. <comparators>
  5234. <comparator>
  5235. <type>RegexpComparator</type>
  5236. <expected-output>12345678901234.*</expected-output>
  5237. </comparator>
  5238. </comparators>
  5239. </test>
  5240. <test> <!-- TESTED-->
  5241. <description>cat: contents of files(relative path) without globbing</description>
  5242. <test-commands>
  5243. <command>-fs NAMENODE -mkdir -p dir0</command>
  5244. <command>-fs NAMENODE -put CLITEST_DATA/data15bytes dir0/data15bytes</command>
  5245. <command>-fs NAMENODE -put CLITEST_DATA/data30bytes dir0/data30bytes</command>
  5246. <command>-fs NAMENODE -put CLITEST_DATA/data60bytes dir0/data60bytes</command>
  5247. <command>-fs NAMENODE -put CLITEST_DATA/data120bytes dir0/data120bytes</command>
  5248. <command>-fs NAMENODE -cat dir0/data15bytes dir0/data30bytes dir0/data60bytes dir0/data120bytes</command>
  5249. </test-commands>
  5250. <cleanup-commands>
  5251. <command>-fs NAMENODE -rm -r /user</command>
  5252. </cleanup-commands>
  5253. <comparators>
  5254. <comparator>
  5255. <type>RegexpComparator</type>
  5256. <expected-output>12345678901234.*</expected-output>
  5257. </comparator>
  5258. </comparators>
  5259. </test>
  5260. <test> <!-- TESTED -->
  5261. <description>cat: contents of file(absolute path) that does not exist</description>
  5262. <test-commands>
  5263. <command>-fs NAMENODE -cat /file</command>
  5264. </test-commands>
  5265. <cleanup-commands>
  5266. </cleanup-commands>
  5267. <comparators>
  5268. <comparator>
  5269. <type>RegexpComparator</type>
  5270. <expected-output>^cat: `/file': No such file or directory</expected-output>
  5271. </comparator>
  5272. </comparators>
  5273. </test>
  5274. <test> <!-- TESTED -->
  5275. <description>cat: contents of file(relative path) that does not exist</description>
  5276. <test-commands>
  5277. <command>-fs NAMENODE -cat file</command>
  5278. </test-commands>
  5279. <cleanup-commands>
  5280. </cleanup-commands>
  5281. <comparators>
  5282. <comparator>
  5283. <type>RegexpComparator</type>
  5284. <expected-output>^cat: `file': No such file or directory</expected-output>
  5285. </comparator>
  5286. </comparators>
  5287. </test>
  5288. <test> <!-- TESTED -->
  5289. <description>cat: contents of directory(absolute path)</description>
  5290. <test-commands>
  5291. <command>-fs NAMENODE -mkdir /dir1</command>
  5292. <command>-fs NAMENODE -cat /dir1</command>
  5293. </test-commands>
  5294. <cleanup-commands>
  5295. <command>-fs NAMENODE -rm -r /dir1</command>
  5296. </cleanup-commands>
  5297. <comparators>
  5298. <comparator>
  5299. <type>RegexpComparator</type>
  5300. <expected-output>^cat: `/dir1': Is a directory</expected-output>
  5301. </comparator>
  5302. </comparators>
  5303. </test>
  5304. <test> <!-- TESTED -->
  5305. <description>cat: contents of directory(relative path)</description>
  5306. <test-commands>
  5307. <command>-fs NAMENODE -mkdir -p dir1</command>
  5308. <command>-fs NAMENODE -cat dir1</command>
  5309. </test-commands>
  5310. <cleanup-commands>
  5311. <command>-fs NAMENODE -rm -r dir1</command>
  5312. </cleanup-commands>
  5313. <comparators>
  5314. <comparator>
  5315. <type>RegexpComparator</type>
  5316. <expected-output>^cat: `dir1': Is a directory</expected-output>
  5317. </comparator>
  5318. </comparators>
  5319. </test>
  5320. <test> <!-- TESTED -->
  5321. <description>cat: Test for hdfs:// path - content of file</description>
  5322. <test-commands>
  5323. <command>-fs NAMENODE -put CLITEST_DATA/data15bytes hdfs:///data15bytes</command>
  5324. <command>-fs NAMENODE -cat hdfs:///data15bytes</command>
  5325. </test-commands>
  5326. <cleanup-commands>
  5327. <command>-fs NAMENODE -rm hdfs:///data15bytes</command>
  5328. </cleanup-commands>
  5329. <comparators>
  5330. <comparator>
  5331. <type>TokenComparator</type>
  5332. <expected-output>12345678901234</expected-output>
  5333. </comparator>
  5334. </comparators>
  5335. </test>
  5336. <test> <!-- TESTED -->
  5337. <description>cat: Test for hdfs:// path - contents of files using globbing</description>
  5338. <test-commands>
  5339. <command>-fs NAMENODE -mkdir hdfs:///dir0</command>
  5340. <command>-fs NAMENODE -put CLITEST_DATA/data15bytes hdfs:///dir0/data15bytes</command>
  5341. <command>-fs NAMENODE -put CLITEST_DATA/data30bytes hdfs:///dir0/data30bytes</command>
  5342. <command>-fs NAMENODE -put CLITEST_DATA/data60bytes hdfs:///dir0/data60bytes</command>
  5343. <command>-fs NAMENODE -put CLITEST_DATA/data120bytes hdfs:///dir0/data120bytes</command>
  5344. <command>-fs NAMENODE -cat hdfs:///dir0/data*</command>
  5345. </test-commands>
  5346. <cleanup-commands>
  5347. <command>-fs NAMENODE -rm -r hdfs:///dir0</command>
  5348. </cleanup-commands>
  5349. <comparators>
  5350. <comparator>
  5351. <type>RegexpComparator</type>
  5352. <expected-output>12345678901234.*</expected-output>
  5353. </comparator>
  5354. </comparators>
  5355. </test>
  5356. <test> <!-- TESTED -->
  5357. <description>cat: Test for hdfs:// path - contents of files without globbing</description>
  5358. <test-commands>
  5359. <command>-fs NAMENODE -mkdir hdfs:///dir0</command>
  5360. <command>-fs NAMENODE -put CLITEST_DATA/data15bytes hdfs:///dir0/data15bytes</command>
  5361. <command>-fs NAMENODE -put CLITEST_DATA/data30bytes hdfs:///dir0/data30bytes</command>
  5362. <command>-fs NAMENODE -put CLITEST_DATA/data60bytes hdfs:///dir0/data60bytes</command>
  5363. <command>-fs NAMENODE -put CLITEST_DATA/data120bytes hdfs:///dir0/data120bytes</command>
  5364. <command>-fs NAMENODE -cat hdfs:///dir0/data15bytes hdfs:///dir0/data30bytes hdfs:///dir0/data60bytes hdfs:///dir0/data120bytes</command>
  5365. </test-commands>
  5366. <cleanup-commands>
  5367. <command>-fs NAMENODE -rm -r hdfs:///dir0</command>
  5368. </cleanup-commands>
  5369. <comparators>
  5370. <comparator>
  5371. <type>RegexpComparator</type>
  5372. <expected-output>12345678901234.*</expected-output>
  5373. </comparator>
  5374. </comparators>
  5375. </test>
  5376. <test> <!-- TESTED -->
  5377. <description>cat: Test for hdfs:// path - contents of file that does not exist</description>
  5378. <test-commands>
  5379. <command>-fs NAMENODE -cat hdfs:///file</command>
  5380. </test-commands>
  5381. <cleanup-commands>
  5382. </cleanup-commands>
  5383. <comparators>
  5384. <comparator>
  5385. <type>RegexpComparator</type>
  5386. <expected-output>^cat: `hdfs:///file': No such file or directory</expected-output>
  5387. </comparator>
  5388. </comparators>
  5389. </test>
  5390. <test> <!-- TESTED -->
  5391. <description>cat: Test for hdfs:// path - contents of directory</description>
  5392. <test-commands>
  5393. <command>-fs NAMENODE -mkdir hdfs:///dir1</command>
  5394. <command>-fs NAMENODE -cat hdfs:///dir1</command>
  5395. </test-commands>
  5396. <cleanup-commands>
  5397. <command>-fs NAMENODE -rm -r hdfs:///dir1</command>
  5398. </cleanup-commands>
  5399. <comparators>
  5400. <comparator>
  5401. <type>RegexpComparator</type>
  5402. <expected-output>^cat: `hdfs:///dir1': Is a directory</expected-output>
  5403. </comparator>
  5404. </comparators>
  5405. </test>
  5406. <!-- Tests for cat using Namenode's path -->
  5407. <test> <!-- TESTED -->
  5408. <description>cat: Test for Namenode's path - content of file</description>
  5409. <test-commands>
  5410. <command>-fs NAMENODE -put CLITEST_DATA/data15bytes NAMENODE/data15bytes</command>
  5411. <command>-fs NAMENODE -cat NAMENODE/data15bytes</command>
  5412. </test-commands>
  5413. <cleanup-commands>
  5414. <command>-fs NAMENODE -rm NAMENODE/data15bytes</command>
  5415. </cleanup-commands>
  5416. <comparators>
  5417. <comparator>
  5418. <type>TokenComparator</type>
  5419. <expected-output>12345678901234</expected-output>
  5420. </comparator>
  5421. </comparators>
  5422. </test>
  5423. <test> <!-- TESTED -->
  5424. <description>cat: Test for Namenode's path - contents of files using globbing</description>
  5425. <test-commands>
  5426. <command>-fs NAMENODE -mkdir NAMENODE/dir0</command>
  5427. <command>-fs NAMENODE -put CLITEST_DATA/data15bytes NAMENODE/dir0/data15bytes</command>
  5428. <command>-fs NAMENODE -put CLITEST_DATA/data30bytes NAMENODE/dir0/data30bytes</command>
  5429. <command>-fs NAMENODE -put CLITEST_DATA/data60bytes NAMENODE/dir0/data60bytes</command>
  5430. <command>-fs NAMENODE -put CLITEST_DATA/data120bytes NAMENODE/dir0/data120bytes</command>
  5431. <command>-fs NAMENODE -cat NAMENODE/dir0/data*</command>
  5432. </test-commands>
  5433. <cleanup-commands>
  5434. <command>-fs NAMENODE -rm -r NAMENODE/dir0</command>
  5435. </cleanup-commands>
  5436. <comparators>
  5437. <comparator>
  5438. <type>RegexpComparator</type>
  5439. <expected-output>12345678901234.*</expected-output>
  5440. </comparator>
  5441. </comparators>
  5442. </test>
  5443. <test> <!-- TESTED -->
  5444. <description>cat: Test for Namenode's path - contents of files without globbing</description>
  5445. <test-commands>
  5446. <command>-fs NAMENODE -mkdir NAMENODE/dir0</command>
  5447. <command>-fs NAMENODE -put CLITEST_DATA/data15bytes NAMENODE/dir0/data15bytes</command>
  5448. <command>-fs NAMENODE -put CLITEST_DATA/data30bytes NAMENODE/dir0/data30bytes</command>
  5449. <command>-fs NAMENODE -put CLITEST_DATA/data60bytes NAMENODE/dir0/data60bytes</command>
  5450. <command>-fs NAMENODE -put CLITEST_DATA/data120bytes NAMENODE/dir0/data120bytes</command>
  5451. <command>-fs NAMENODE -cat NAMENODE/dir0/data15bytes NAMENODE/dir0/data30bytes NAMENODE/dir0/data60bytes NAMENODE/dir0/data120bytes</command>
  5452. </test-commands>
  5453. <cleanup-commands>
  5454. <command>-fs NAMENODE -rm -r NAMENODE/dir0</command>
  5455. </cleanup-commands>
  5456. <comparators>
  5457. <comparator>
  5458. <type>RegexpComparator</type>
  5459. <expected-output>12345678901234.*</expected-output>
  5460. </comparator>
  5461. </comparators>
  5462. </test>
  5463. <test> <!-- TESTED -->
  5464. <description>cat: Test for Namenode's path - contents of file that does not exist</description>
  5465. <test-commands>
  5466. <command>-fs NAMENODE -cat NAMENODE/file</command>
  5467. </test-commands>
  5468. <cleanup-commands>
  5469. </cleanup-commands>
  5470. <comparators>
  5471. <comparator>
  5472. <type>RegexpComparator</type>
  5473. <expected-output>^cat: `NAMENODE/file': No such file or directory</expected-output>
  5474. </comparator>
  5475. </comparators>
  5476. </test>
  5477. <test> <!-- TESTED -->
  5478. <description>cat: Test for Namenode's path - contents of directory</description>
  5479. <test-commands>
  5480. <command>-fs NAMENODE -mkdir NAMENODE/dir1</command>
  5481. <command>-fs NAMENODE -cat NAMENODE/dir1</command>
  5482. </test-commands>
  5483. <cleanup-commands>
  5484. <command>-fs NAMENODE -rm -r NAMENODE/dir1</command>
  5485. </cleanup-commands>
  5486. <comparators>
  5487. <comparator>
  5488. <type>RegexpComparator</type>
  5489. <expected-output>^cat: `NAMENODE/dir1': Is a directory</expected-output>
  5490. </comparator>
  5491. </comparators>
  5492. </test>
  5493. <!-- Tests for copyToLocal -->
  5494. <test> <!-- TESTED -->
  5495. <description>copyToLocal: non existent relative path</description>
  5496. <test-commands>
  5497. <command>-fs NAMENODE -copyToLocal file CLITEST_DATA/file</command>
  5498. </test-commands>
  5499. <cleanup-commands>
  5500. <command>-fs NAMENODE -rm -r /user</command>
  5501. </cleanup-commands>
  5502. <comparators>
  5503. <comparator>
  5504. <type>RegexpComparator</type>
  5505. <expected-output>copyToLocal: `.*': No such file or directory</expected-output>
  5506. </comparator>
  5507. </comparators>
  5508. </test>
  5509. <test> <!-- TESTED -->
  5510. <description>copyToLocal: non existent absolute path</description>
  5511. <test-commands>
  5512. <command>-fs NAMENODE -copyToLocal /user/file CLITEST_DATA/file</command>
  5513. </test-commands>
  5514. <cleanup-commands>
  5515. <command>-fs NAMENODE -rm -r /user</command>
  5516. </cleanup-commands>
  5517. <comparators>
  5518. <comparator>
  5519. <type>RegexpComparator</type>
  5520. <expected-output>copyToLocal: `.*': No such file or directory</expected-output>
  5521. </comparator>
  5522. </comparators>
  5523. </test>
  5524. <test> <!-- TESTED -->
  5525. <description>copyToLocal: Test for hdfs:// path - non existent file/directory</description>
  5526. <test-commands>
  5527. <command>-fs NAMENODE -copyToLocal hdfs:///file CLITEST_DATA/file</command>
  5528. </test-commands>
  5529. <cleanup-commands>
  5530. <command>-fs NAMENODE -rm -r hdfs:///*</command>
  5531. </cleanup-commands>
  5532. <comparators>
  5533. <comparator>
  5534. <type>RegexpComparator</type>
  5535. <expected-output>copyToLocal: `.*': No such file or directory</expected-output>
  5536. </comparator>
  5537. </comparators>
  5538. </test>
  5539. <test> <!-- TESTED -->
  5540. <description>copyToLocal: Test for Namenode's path - non existent file/directory</description>
  5541. <test-commands>
  5542. <command>-fs NAMENODE -copyToLocal NAMENODE/file CLITEST_DATA/file</command>
  5543. </test-commands>
  5544. <cleanup-commands>
  5545. <command>-fs NAMENODE -rm -r NAMENODE/*</command>
  5546. </cleanup-commands>
  5547. <comparators>
  5548. <comparator>
  5549. <type>RegexpComparator</type>
  5550. <expected-output>copyToLocal: `.*': No such file or directory</expected-output>
  5551. </comparator>
  5552. </comparators>
  5553. </test>
  5554. <test> <!-- TESTED-->
  5555. <description>checksum: checksum of files(relative path) using globbing</description>
  5556. <test-commands>
  5557. <command>-fs NAMENODE -mkdir -p dir0</command>
  5558. <command>-fs NAMENODE -put CLITEST_DATA/data15bytes dir0/data15bytes</command>
  5559. <command>-fs NAMENODE -put CLITEST_DATA/data30bytes dir0/data30bytes</command>
  5560. <command>-fs NAMENODE -put CLITEST_DATA/data60bytes dir0/data60bytes</command>
  5561. <command>-fs NAMENODE -put CLITEST_DATA/data120bytes dir0/data120bytes</command>
  5562. <command>-fs NAMENODE -checksum dir0/data*</command>
  5563. </test-commands>
  5564. <cleanup-commands>
  5565. <command>-fs NAMENODE -rm -r /user</command>
  5566. </cleanup-commands>
  5567. <comparators>
  5568. <comparator>
  5569. <type>RegexpComparator</type>
  5570. <expected-output>^dir0/data120bytes\tMD5-of-0MD5-of-512CRC32C\t000002000000000000000000a58cdc3c0967fc8cddb7fed5960d06f2</expected-output>
  5571. </comparator>
  5572. <comparator>
  5573. <type>RegexpComparator</type>
  5574. <expected-output>^dir0/data15bytes\tMD5-of-0MD5-of-512CRC32C\t0000020000000000000000007267e9528002723a30939aefc238d665</expected-output>
  5575. </comparator>
  5576. <comparator>
  5577. <type>RegexpComparator</type>
  5578. <expected-output>^dir0/data30bytes\tMD5-of-0MD5-of-512CRC32C\t000002000000000000000000fc09371298117c4943cf089b4bd79c96</expected-output>
  5579. </comparator>
  5580. <comparator>
  5581. <type>RegexpComparator</type>
  5582. <expected-output>^dir0/data60bytes\tMD5-of-0MD5-of-512CRC32C\t000002000000000000000000009476431d851dd7b0a8d057a404d7b9</expected-output>
  5583. </comparator>
  5584. </comparators>
  5585. </test>
  5586. <!-- Tests for moveToLocal -->
  5587. <!-- Not yet implemented -->
  5588. <!-- Tests for mkdir -->
  5589. <test> <!-- TESTED -->
  5590. <description>mkdir: creating directory (absolute path) </description>
  5591. <test-commands>
  5592. <command>-fs NAMENODE -mkdir /dir0</command>
  5593. <command>-fs NAMENODE -du -s /dir0</command>
  5594. </test-commands>
  5595. <cleanup-commands>
  5596. <command>-fs NAMENODE -rm /user</command>
  5597. </cleanup-commands>
  5598. <comparators>
  5599. <comparator>
  5600. <type>RegexpComparator</type>
  5601. <expected-output>^0\s+/dir0</expected-output>
  5602. </comparator>
  5603. </comparators>
  5604. </test>
  5605. <test> <!-- TESTED -->
  5606. <description>mkdir: creating directory (absolute path) </description>
  5607. <test-commands>
  5608. <command>-fs NAMENODE -mkdir /dir0</command>
  5609. <command>-fs NAMENODE -mkdir /dir0/b/</command>
  5610. <command>-fs NAMENODE -du -s /dir0/b</command>
  5611. </test-commands>
  5612. <cleanup-commands>
  5613. <command>-fs NAMENODE -rm /user</command>
  5614. </cleanup-commands>
  5615. <comparators>
  5616. <comparator>
  5617. <type>RegexpComparator</type>
  5618. <expected-output>^0\s+/dir0/b</expected-output>
  5619. </comparator>
  5620. </comparators>
  5621. </test>
  5622. <test> <!-- TESTED -->
  5623. <description>mkdir: creating directory (relative path) </description>
  5624. <test-commands>
  5625. <command>-fs NAMENODE -mkdir -p dir0 </command>
  5626. <command>-fs NAMENODE -du -s dir0</command>
  5627. </test-commands>
  5628. <cleanup-commands>
  5629. <command>-fs NAMENODE -rm /user</command>
  5630. </cleanup-commands>
  5631. <comparators>
  5632. <comparator>
  5633. <type>RegexpComparator</type>
  5634. <expected-output>^0\s+dir0</expected-output>
  5635. </comparator>
  5636. </comparators>
  5637. </test>
  5638. <test> <!-- TESTED -->
  5639. <description>mkdir: creating many directories (absolute path) </description>
  5640. <test-commands>
  5641. <command>-fs NAMENODE -mkdir /dir0 </command>
  5642. <command>-fs NAMENODE -mkdir /dir1 </command>
  5643. <command>-fs NAMENODE -mkdir /dir2 </command>
  5644. <command>-fs NAMENODE -mkdir /dir3 </command>
  5645. <command>-fs NAMENODE -du -s /dir*</command>
  5646. </test-commands>
  5647. <cleanup-commands>
  5648. <command>-fs NAMENODE -rm /dir*</command>
  5649. </cleanup-commands>
  5650. <comparators>
  5651. <comparator>
  5652. <type>RegexpComparator</type>
  5653. <expected-output>^0\s+/dir0</expected-output>
  5654. </comparator>
  5655. <comparator>
  5656. <type>RegexpComparator</type>
  5657. <expected-output>^0\s+/dir1</expected-output>
  5658. </comparator>
  5659. <comparator>
  5660. <type>RegexpComparator</type>
  5661. <expected-output>^0\s+/dir2</expected-output>
  5662. </comparator>
  5663. <comparator>
  5664. <type>RegexpComparator</type>
  5665. <expected-output>^0\s+/dir3</expected-output>
  5666. </comparator>
  5667. </comparators>
  5668. </test>
  5669. <test> <!-- TESTED -->
  5670. <description>mkdir: creating many directories (relative path) </description>
  5671. <test-commands>
  5672. <command>-fs NAMENODE -mkdir -p dir0 </command>
  5673. <command>-fs NAMENODE -mkdir -p dir1 </command>
  5674. <command>-fs NAMENODE -mkdir -p dir2 </command>
  5675. <command>-fs NAMENODE -mkdir -p dir3 </command>
  5676. <command>-fs NAMENODE -du -s dir*</command>
  5677. </test-commands>
  5678. <cleanup-commands>
  5679. <command>-fs NAMENODE -rm /user</command>
  5680. </cleanup-commands>
  5681. <comparators>
  5682. <comparator>
  5683. <type>RegexpComparator</type>
  5684. <expected-output>^0\s+dir0</expected-output>
  5685. </comparator>
  5686. <comparator>
  5687. <type>RegexpComparator</type>
  5688. <expected-output>^0\s+dir1</expected-output>
  5689. </comparator>
  5690. <comparator>
  5691. <type>RegexpComparator</type>
  5692. <expected-output>^0\s+dir2</expected-output>
  5693. </comparator>
  5694. <comparator>
  5695. <type>RegexpComparator</type>
  5696. <expected-output>^0\s+dir3</expected-output>
  5697. </comparator>
  5698. </comparators>
  5699. </test>
  5700. <test> <!-- TESTED -->
  5701. <description>mkdir: creating a directory with the name of an already existing directory</description>
  5702. <test-commands>
  5703. <command>-fs NAMENODE -mkdir /dir0</command>
  5704. <command>-fs NAMENODE -mkdir /dir0</command>
  5705. </test-commands>
  5706. <cleanup-commands>
  5707. <command>-fs NAMENODE -rm -r /dir0</command>
  5708. </cleanup-commands>
  5709. <comparators>
  5710. <comparator>
  5711. <type>TokenComparator</type>
  5712. <expected-output>mkdir: `/dir0': File exists</expected-output>
  5713. </comparator>
  5714. </comparators>
  5715. </test>
  5716. <test> <!-- TESTED -->
  5717. <description>mkdir: creating a directory with the name of an already existing file</description>
  5718. <test-commands>
  5719. <command>-fs NAMENODE -put CLITEST_DATA/data15bytes data15bytes</command>
  5720. <command>-fs NAMENODE -mkdir -p data15bytes</command>
  5721. </test-commands>
  5722. <cleanup-commands>
  5723. <command>-fs NAMENODE -rm -r data15bytes</command>
  5724. </cleanup-commands>
  5725. <comparators>
  5726. <comparator>
  5727. <type>TokenComparator</type>
  5728. <expected-output>mkdir: `data15bytes': Is not a directory</expected-output>
  5729. </comparator>
  5730. </comparators>
  5731. </test>
  5732. <test> <!-- TESTED -->
  5733. <description>mkdir: Test for hdfs:// path - creating directory</description>
  5734. <test-commands>
  5735. <command>-fs NAMENODE -mkdir hdfs:///dir0</command>
  5736. <command>-fs NAMENODE -du -s hdfs:///dir0</command>
  5737. </test-commands>
  5738. <cleanup-commands>
  5739. <command>-fs NAMENODE -rm hdfs:///*</command>
  5740. </cleanup-commands>
  5741. <comparators>
  5742. <comparator>
  5743. <type>RegexpComparator</type>
  5744. <expected-output>^0\s+hdfs:///dir0</expected-output>
  5745. </comparator>
  5746. </comparators>
  5747. </test>
  5748. <test> <!-- TESTED -->
  5749. <description>mkdir: Test for hdfs:// path - creating many directories</description>
  5750. <test-commands>
  5751. <command>-fs NAMENODE -mkdir hdfs:///dir0 hdfs:///dir1 hdfs:///dir2 hdfs:///dir3 </command>
  5752. <command>-fs NAMENODE -du -s hdfs:///dir*</command>
  5753. </test-commands>
  5754. <cleanup-commands>
  5755. <command>-fs NAMENODE -rm hdfs:///dir*</command>
  5756. </cleanup-commands>
  5757. <comparators>
  5758. <comparator>
  5759. <type>RegexpComparator</type>
  5760. <expected-output>^0\s+hdfs:///dir0</expected-output>
  5761. </comparator>
  5762. <comparator>
  5763. <type>RegexpComparator</type>
  5764. <expected-output>^0\s+hdfs:///dir1</expected-output>
  5765. </comparator>
  5766. <comparator>
  5767. <type>RegexpComparator</type>
  5768. <expected-output>^0\s+hdfs:///dir2</expected-output>
  5769. </comparator>
  5770. <comparator>
  5771. <type>RegexpComparator</type>
  5772. <expected-output>^0\s+hdfs:///dir3</expected-output>
  5773. </comparator>
  5774. </comparators>
  5775. </test>
  5776. <test> <!-- TESTED -->
  5777. <description>mkdir: Test for hdfs:// path - creating a directory with the name of an already existing directory</description>
  5778. <test-commands>
  5779. <command>-fs NAMENODE -mkdir hdfs:///dir0</command>
  5780. <command>-fs NAMENODE -mkdir hdfs:///dir0</command>
  5781. </test-commands>
  5782. <cleanup-commands>
  5783. <command>-fs NAMENODE -rm -r hdfs:///dir0</command>
  5784. </cleanup-commands>
  5785. <comparators>
  5786. <comparator>
  5787. <type>TokenComparator</type>
  5788. <expected-output>mkdir: `hdfs:///dir0': File exists</expected-output>
  5789. </comparator>
  5790. </comparators>
  5791. </test>
  5792. <test> <!-- TESTED -->
  5793. <description>mkdir: Test for hdfs:// path - creating a directory with the name of an already existing file</description>
  5794. <test-commands>
  5795. <command>-fs NAMENODE -put CLITEST_DATA/data15bytes hdfs:///data15bytes</command>
  5796. <command>-fs NAMENODE -mkdir hdfs:///data15bytes</command>
  5797. </test-commands>
  5798. <cleanup-commands>
  5799. <command>-fs NAMENODE -rm -r hdfs:///data15bytes</command>
  5800. </cleanup-commands>
  5801. <comparators>
  5802. <comparator>
  5803. <type>TokenComparator</type>
  5804. <expected-output>mkdir: `hdfs:///data15bytes': Is not a directory</expected-output>
  5805. </comparator>
  5806. </comparators>
  5807. </test>
  5808. <test> <!-- TESTED -->
  5809. <description>mkdir: Test for Namenode's path - creating directory</description>
  5810. <test-commands>
  5811. <command>-fs NAMENODE -mkdir NAMENODE/dir0</command>
  5812. <command>-fs NAMENODE -du -s NAMENODE/dir0</command>
  5813. </test-commands>
  5814. <cleanup-commands>
  5815. <command>-fs NAMENODE -rm NAMENODE/*</command>
  5816. </cleanup-commands>
  5817. <comparators>
  5818. <comparator>
  5819. <type>RegexpComparator</type>
  5820. <expected-output>^0\s+NAMENODE/dir0</expected-output>
  5821. </comparator>
  5822. </comparators>
  5823. </test>
  5824. <test> <!-- TESTED -->
  5825. <description>mkdir: Test for Namenode's path - creating many directories</description>
  5826. <test-commands>
  5827. <command>-fs NAMENODE -mkdir NAMENODE/dir0 NAMENODE/dir1 NAMENODE/dir2 NAMENODE/dir3</command>
  5828. <command>-fs NAMENODE -du -s NAMENODE/dir*</command>
  5829. </test-commands>
  5830. <cleanup-commands>
  5831. <command>-fs NAMENODE -rm NAMENODE/dir*</command>
  5832. </cleanup-commands>
  5833. <comparators>
  5834. <comparator>
  5835. <type>RegexpComparator</type>
  5836. <expected-output>^0\s+NAMENODE/dir0</expected-output>
  5837. </comparator>
  5838. <comparator>
  5839. <type>RegexpComparator</type>
  5840. <expected-output>^0\s+NAMENODE/dir1</expected-output>
  5841. </comparator>
  5842. <comparator>
  5843. <type>RegexpComparator</type>
  5844. <expected-output>^0\s+NAMENODE/dir2</expected-output>
  5845. </comparator>
  5846. <comparator>
  5847. <type>RegexpComparator</type>
  5848. <expected-output>^0\s+NAMENODE/dir3</expected-output>
  5849. </comparator>
  5850. </comparators>
  5851. </test>
  5852. <test> <!-- TESTED -->
  5853. <description>mkdir: Test for NAMENODE path - creating a directory with the name of an already existing directory</description>
  5854. <test-commands>
  5855. <command>-fs NAMENODE -mkdir NAMENODE/dir0</command>
  5856. <command>-fs NAMENODE -mkdir NAMENODE/dir0</command>
  5857. </test-commands>
  5858. <cleanup-commands>
  5859. <command>-fs NAMENODE -rm -r NAMENODE/dir0</command>
  5860. </cleanup-commands>
  5861. <comparators>
  5862. <comparator>
  5863. <type>RegexpComparator</type>
  5864. <expected-output>mkdir: `hdfs://\w+[-.a-z0-9]*:[0-9]+/dir0': File exists</expected-output>
  5865. </comparator>
  5866. </comparators>
  5867. </test>
  5868. <test> <!-- TESTED -->
  5869. <description>mkdir: Test for Namenode's path - creating a directory with the name of an already existing file</description>
  5870. <test-commands>
  5871. <command>-fs NAMENODE -put CLITEST_DATA/data15bytes NAMENODE/data15bytes</command>
  5872. <command>-fs NAMENODE -mkdir NAMENODE/data15bytes</command>
  5873. </test-commands>
  5874. <cleanup-commands>
  5875. <command>-fs NAMENODE -rm -r NAMENODE/data15bytes</command>
  5876. </cleanup-commands>
  5877. <comparators>
  5878. <comparator>
  5879. <type>RegexpComparator</type>
  5880. <expected-output>mkdir: `hdfs://\w+[-.a-z0-9]*:[0-9]+/data15bytes': Is not a directory</expected-output>
  5881. </comparator>
  5882. </comparators>
  5883. </test>
  5884. <test> <!-- TESTED -->
  5885. <description>mkdir: Test create of directory with no parent and no -p fails</description>
  5886. <test-commands>
  5887. <command>-fs NAMENODE -rm -r -f dir0</command>
  5888. <command>-fs NAMENODE -mkdir dir0/dir1</command>
  5889. </test-commands>
  5890. <cleanup-commands>
  5891. <command>-fs NAMENODE -rm -r dir0</command>
  5892. </cleanup-commands>
  5893. <comparators>
  5894. <comparator>
  5895. <type>RegexpComparator</type>
  5896. <expected-output>mkdir: `dir0/dir1': No such file or directory</expected-output>
  5897. </comparator>
  5898. </comparators>
  5899. </test>
  5900. <test> <!-- TESTED -->
  5901. <description>mkdir: Test recreate of existing directory fails</description>
  5902. <test-commands>
  5903. <command>-fs NAMENODE -rm -r -f dir0</command>
  5904. <command>-fs NAMENODE -mkdir -p dir0/dir1</command>
  5905. <command>-fs NAMENODE -mkdir dir0/dir1</command>
  5906. </test-commands>
  5907. <cleanup-commands>
  5908. <command>-fs NAMENODE -rm -r dir0</command>
  5909. </cleanup-commands>
  5910. <comparators>
  5911. <comparator>
  5912. <type>RegexpComparator</type>
  5913. <expected-output>mkdir: `dir0/dir1': File exists</expected-output>
  5914. </comparator>
  5915. </comparators>
  5916. </test>
  5917. <test> <!-- TESTED -->
  5918. <description>mkdir: Test recreate of existing directory with -p succeeds</description>
  5919. <test-commands>
  5920. <command>-fs NAMENODE -rm -r -f dir0</command>
  5921. <command>-fs NAMENODE -mkdir -p dir0/dir1</command>
  5922. <command>-fs NAMENODE -mkdir -p dir0/dir1</command>
  5923. </test-commands>
  5924. <cleanup-commands>
  5925. <command>-fs NAMENODE -rm -r dir0</command>
  5926. </cleanup-commands>
  5927. <comparators>
  5928. <comparator>
  5929. <type>ExactComparator</type>
  5930. <expected-output></expected-output>
  5931. </comparator>
  5932. </comparators>
  5933. </test>
  5934. <!--Tests for setrep-->
  5935. <test> <!-- TESTED -->
  5936. <description>setrep: existent file (absolute path)</description>
  5937. <test-commands>
  5938. <command>-fs NAMENODE -mkdir /dir0</command>
  5939. <command>-fs NAMENODE -touchz /dir0/file0</command>
  5940. <command>-fs NAMENODE -setrep 2 /dir0/file0</command>
  5941. </test-commands>
  5942. <cleanup-commands>
  5943. <command>-fs NAMENODE -rm -r /user</command>
  5944. </cleanup-commands>
  5945. <comparators>
  5946. <comparator>
  5947. <type>RegexpComparator</type>
  5948. <expected-output>^Replication 2 set: /dir0/file0</expected-output>
  5949. </comparator>
  5950. </comparators>
  5951. </test>
  5952. <test> <!-- TESTED -->
  5953. <description>setrep: existent file (relative path)</description>
  5954. <test-commands>
  5955. <command>-fs NAMENODE -mkdir -p dir</command> <!-- make sure user home dir exists -->
  5956. <command>-fs NAMENODE -touchz file0</command>
  5957. <command>-fs NAMENODE -setrep 2 file0</command>
  5958. </test-commands>
  5959. <cleanup-commands>
  5960. <command>-fs NAMENODE -rm -r /user</command>
  5961. </cleanup-commands>
  5962. <comparators>
  5963. <comparator>
  5964. <type>RegexpComparator</type>
  5965. <expected-output>^Replication 2 set: file0</expected-output>
  5966. </comparator>
  5967. </comparators>
  5968. </test>
  5969. <test> <!-- TESTED -->
  5970. <description>setrep: existent directory (absolute path)</description>
  5971. <test-commands>
  5972. <command>-fs NAMENODE -mkdir /dir0</command>
  5973. <command>-fs NAMENODE -touchz /dir0/file0</command>
  5974. <command>-fs NAMENODE -touchz /dir0/file1</command>
  5975. <command>-fs NAMENODE -setrep 2 /dir0</command>
  5976. </test-commands>
  5977. <cleanup-commands>
  5978. <command>-fs NAMENODE -rm -r /user</command>
  5979. </cleanup-commands>
  5980. <comparators>
  5981. <comparator>
  5982. <type>RegexpComparator</type>
  5983. <expected-output>^Replication 2 set: /dir0/file0</expected-output>
  5984. </comparator>
  5985. <comparator>
  5986. <type>RegexpComparator</type>
  5987. <expected-output>^Replication 2 set: /dir0/file1</expected-output>
  5988. </comparator>
  5989. </comparators>
  5990. </test>
  5991. <test> <!-- TESTED -->
  5992. <description>setrep: existent directory (relative path)</description>
  5993. <test-commands>
  5994. <command>-fs NAMENODE -mkdir -p dir0</command>
  5995. <command>-fs NAMENODE -touchz dir0/file0</command>
  5996. <command>-fs NAMENODE -touchz dir0/file1</command>
  5997. <command>-fs NAMENODE -setrep 2 dir0</command>
  5998. </test-commands>
  5999. <cleanup-commands>
  6000. <command>-fs NAMENODE -rm -r /user</command>
  6001. </cleanup-commands>
  6002. <comparators>
  6003. <comparator>
  6004. <type>RegexpComparator</type>
  6005. <expected-output>^Replication 2 set: dir0/file0</expected-output>
  6006. </comparator>
  6007. <comparator>
  6008. <type>RegexpComparator</type>
  6009. <expected-output>^Replication 2 set: dir0/file1</expected-output>
  6010. </comparator>
  6011. </comparators>
  6012. </test>
  6013. <test> <!-- TESTED -->
  6014. <description>setrep: -R ignored for existing file</description>
  6015. <test-commands>
  6016. <command>-fs NAMENODE -mkdir -p dir0</command>
  6017. <command>-fs NAMENODE -touchz dir0/file0</command>
  6018. <command>-fs NAMENODE -setrep -R 2 dir0/file0</command>
  6019. </test-commands>
  6020. <cleanup-commands>
  6021. <command>-fs NAMENODE -rm -r /user</command>
  6022. </cleanup-commands>
  6023. <comparators>
  6024. <comparator>
  6025. <type>RegexpComparator</type>
  6026. <expected-output>^Replication 2 set: dir0/file0</expected-output>
  6027. </comparator>
  6028. </comparators>
  6029. </test>
  6030. <test> <!-- TESTED -->
  6031. <description>setrep: non existent file (absolute path)</description>
  6032. <test-commands>
  6033. <command>-fs NAMENODE -setrep 2 /dir0/file</command>
  6034. </test-commands>
  6035. <cleanup-commands>
  6036. <command>-fs NAMENODE -rm -r /user</command>
  6037. </cleanup-commands>
  6038. <comparators>
  6039. <comparator>
  6040. <type>RegexpComparator</type>
  6041. <expected-output>^setrep: `/dir0/file': No such file or directory</expected-output>
  6042. </comparator>
  6043. </comparators>
  6044. </test>
  6045. <test> <!-- TESTED -->
  6046. <description>setrep: non existent file (relative path)</description>
  6047. <test-commands>
  6048. <command>-fs NAMENODE -setrep 2 file0</command>
  6049. </test-commands>
  6050. <cleanup-commands>
  6051. <command>-fs NAMENODE -rm -r /user</command>
  6052. </cleanup-commands>
  6053. <comparators>
  6054. <comparator>
  6055. <type>RegexpComparator</type>
  6056. <expected-output>^setrep: `file0': No such file or directory</expected-output>
  6057. </comparator>
  6058. </comparators>
  6059. </test>
  6060. <test> <!-- TESTED -->
  6061. <description>setrep: Test for hdfs:// path - existent file</description>
  6062. <test-commands>
  6063. <command>-fs NAMENODE -mkdir hdfs:///dir0/</command>
  6064. <command>-fs NAMENODE -touchz hdfs:///dir0/file0</command>
  6065. <command>-fs NAMENODE -setrep 2 hdfs:///dir0/file0</command>
  6066. </test-commands>
  6067. <cleanup-commands>
  6068. <command>-fs NAMENODE -rm -r hdfs:///*</command>
  6069. </cleanup-commands>
  6070. <comparators>
  6071. <comparator>
  6072. <type>RegexpComparator</type>
  6073. <expected-output>^Replication 2 set: hdfs:///dir0/file0</expected-output>
  6074. </comparator>
  6075. </comparators>
  6076. </test>
  6077. <test> <!-- TESTED -->
  6078. <description>setrep: Test for hdfs:// path - existent directory</description>
  6079. <test-commands>
  6080. <command>-fs NAMENODE -mkdir hdfs:///dir0/</command>
  6081. <command>-fs NAMENODE -touchz hdfs:///dir0/file0</command>
  6082. <command>-fs NAMENODE -touchz hdfs:///dir0/file1</command>
  6083. <command>-fs NAMENODE -setrep 2 hdfs:///dir0</command>
  6084. </test-commands>
  6085. <cleanup-commands>
  6086. <command>-fs NAMENODE -rm -r hdfs:///*</command>
  6087. </cleanup-commands>
  6088. <comparators>
  6089. <comparator>
  6090. <type>RegexpComparator</type>
  6091. <expected-output>^Replication 2 set: hdfs:///dir0/file0</expected-output>
  6092. </comparator>
  6093. <comparator>
  6094. <type>RegexpComparator</type>
  6095. <expected-output>^Replication 2 set: hdfs:///dir0/file1</expected-output>
  6096. </comparator>
  6097. </comparators>
  6098. </test>
  6099. <test> <!-- TESTED -->
  6100. <description>setrep: Test for hdfs:// path - non existent file</description>
  6101. <test-commands>
  6102. <command>-fs NAMENODE -mkdir hdfs:///dir0/</command>
  6103. <command>-fs NAMENODE -setrep 2 hdfs:///dir0/file</command>
  6104. </test-commands>
  6105. <cleanup-commands>
  6106. <command>-fs NAMENODE -rm -r hdfs:///*</command>
  6107. </cleanup-commands>
  6108. <comparators>
  6109. <comparator>
  6110. <type>RegexpComparator</type>
  6111. <expected-output>^setrep: `hdfs:///dir0/file': No such file or directory</expected-output>
  6112. </comparator>
  6113. </comparators>
  6114. </test>
  6115. <test> <!-- TESTED -->
  6116. <description>setrep: Test for Namenode's path - existent file</description>
  6117. <test-commands>
  6118. <command>-fs NAMENODE -mkdir NAMENODE/dir0/</command>
  6119. <command>-fs NAMENODE -touchz NAMENODE/dir0/file0</command>
  6120. <command>-fs NAMENODE -setrep 2 NAMENODE/dir0/file0</command>
  6121. </test-commands>
  6122. <cleanup-commands>
  6123. <command>-fs NAMENODE -rm -r NAMENODE/*</command>
  6124. </cleanup-commands>
  6125. <comparators>
  6126. <comparator>
  6127. <type>RegexpComparator</type>
  6128. <expected-output>^Replication 2 set: NAMENODE/dir0/file0</expected-output>
  6129. </comparator>
  6130. </comparators>
  6131. </test>
  6132. <test> <!-- TESTED -->
  6133. <description>setrep: Test for Namenode's path - existent directory</description>
  6134. <test-commands>
  6135. <command>-fs NAMENODE -mkdir -p NAMENODE/dir0</command>
  6136. <command>-fs NAMENODE -touchz NAMENODE/dir0/file0</command>
  6137. <command>-fs NAMENODE -touchz NAMENODE/dir0/file1</command>
  6138. <command>-fs NAMENODE -setrep 2 NAMENODE/dir0</command>
  6139. </test-commands>
  6140. <cleanup-commands>
  6141. <command>-fs NAMENODE -rm -r NAMENODE/*</command>
  6142. </cleanup-commands>
  6143. <comparators>
  6144. <comparator>
  6145. <type>RegexpComparator</type>
  6146. <expected-output>^Replication 2 set: NAMENODE/dir0/file0</expected-output>
  6147. </comparator>
  6148. <comparator>
  6149. <type>RegexpComparator</type>
  6150. <expected-output>^Replication 2 set: NAMENODE/dir0/file1</expected-output>
  6151. </comparator>
  6152. </comparators>
  6153. </test>
  6154. <test> <!-- TESTED -->
  6155. <description>setrep: Test for Namenode's path - non existent file</description>
  6156. <test-commands>
  6157. <command>-fs NAMENODE -setrep 2 NAMENODE/dir0/file</command>
  6158. </test-commands>
  6159. <cleanup-commands>
  6160. <command>-fs NAMENODE -rm -r NAMENODE/*</command>
  6161. </cleanup-commands>
  6162. <comparators>
  6163. <comparator>
  6164. <type>RegexpComparator</type>
  6165. <expected-output>^setrep: `hdfs://\w+[-.a-z0-9]*:[0-9]+/dir0/file': No such file or directory</expected-output>
  6166. </comparator>
  6167. </comparators>
  6168. </test>
  6169. <test> <!-- TESTED -->
  6170. <description>setrep: invalid replication factor -- too high</description>
  6171. <test-commands>
  6172. <command>-fs NAMENODE -mkdir -p /dir0</command>
  6173. <command>-fs NAMENODE -touchz /dir0/file0</command>
  6174. <command>-fs NAMENODE -setrep 1025 /dir0/file0</command>
  6175. </test-commands>
  6176. <cleanup-commands>
  6177. <command>-fs NAMENODE -rm -r /user</command>
  6178. </cleanup-commands>
  6179. <comparators>
  6180. <comparator>
  6181. <type>RegexpComparator</type>
  6182. <expected-output>^setrep: Requested replication factor of 1025 exceeds maximum of [0-9]+ for /dir0/file0</expected-output>
  6183. </comparator>
  6184. </comparators>
  6185. </test>
  6186. <test> <!-- TESTED -->
  6187. <description>setrep: invalid replication factor -- 0</description>
  6188. <test-commands>
  6189. <command>-fs NAMENODE -mkdir -p dir0</command>
  6190. <command>-fs NAMENODE -touchz dir0/file0</command>
  6191. <command>-fs NAMENODE -setrep 0 dir0/file0</command>
  6192. </test-commands>
  6193. <cleanup-commands>
  6194. <command>-fs NAMENODE -rm -r /user</command>
  6195. </cleanup-commands>
  6196. <comparators>
  6197. <comparator>
  6198. <type>RegexpComparator</type>
  6199. <expected-output>^-setrep: replication must be >= 1</expected-output>
  6200. </comparator>
  6201. </comparators>
  6202. </test>
  6203. <test> <!-- TESTED -->
  6204. <description>setrep: invalid replication factor -- NaN</description>
  6205. <test-commands>
  6206. <command>-fs NAMENODE -mkdir -p dir0</command>
  6207. <command>-fs NAMENODE -touchz dir0/file0</command>
  6208. <command>-fs NAMENODE -setrep three dir0/file0</command>
  6209. </test-commands>
  6210. <cleanup-commands>
  6211. <command>-fs NAMENODE -rm -r /user</command>
  6212. </cleanup-commands>
  6213. <comparators>
  6214. <comparator>
  6215. <type>RegexpComparator</type>
  6216. <expected-output>^setrep: Illegal replication, a positive integer expected</expected-output>
  6217. </comparator>
  6218. </comparators>
  6219. </test>
  6220. <!-- Tests for touchz-->
  6221. <test> <!-- TESTED -->
  6222. <description>touchz: touching file (absolute path) </description>
  6223. <test-commands>
  6224. <command>-fs NAMENODE -mkdir /user</command>
  6225. <command>-fs NAMENODE -touchz /user/file0</command>
  6226. <command>-fs NAMENODE -du /user/file0</command>
  6227. </test-commands>
  6228. <cleanup-commands>
  6229. <command>-fs NAMENODE -rm /user</command>
  6230. </cleanup-commands>
  6231. <comparators>
  6232. <comparator>
  6233. <type>RegexpComparator</type>
  6234. <expected-output>^0\s+/user/file0</expected-output>
  6235. </comparator>
  6236. </comparators>
  6237. </test>
  6238. <test> <!-- TESTED -->
  6239. <description>touchz: touching file in non-existent directory </description>
  6240. <test-commands>
  6241. <command>-fs NAMENODE -touchz file0 </command>
  6242. </test-commands>
  6243. <cleanup-commands>
  6244. </cleanup-commands>
  6245. <comparators>
  6246. <comparator>
  6247. <type>RegexpComparator</type>
  6248. <expected-output>touchz: `file0': No such file or directory: `NAMENODE/user/USERNAME/file0'</expected-output>
  6249. </comparator>
  6250. </comparators>
  6251. </test>
  6252. <test> <!-- TESTED -->
  6253. <description>touchz: touching file(relative path) </description>
  6254. <test-commands>
  6255. <command>-fs NAMENODE -mkdir -p dir</command> <!-- make sure user home dir exists -->
  6256. <command>-fs NAMENODE -touchz file0 </command>
  6257. <command>-fs NAMENODE -du file0</command>
  6258. </test-commands>
  6259. <cleanup-commands>
  6260. <command>-fs NAMENODE -rm /user</command>
  6261. </cleanup-commands>
  6262. <comparators>
  6263. <comparator>
  6264. <type>RegexpComparator</type>
  6265. <expected-output>^0\s+file0</expected-output>
  6266. </comparator>
  6267. </comparators>
  6268. </test>
  6269. <test> <!-- TESTED -->
  6270. <description>touchz: touching many files </description>
  6271. <test-commands>
  6272. <command>-fs NAMENODE -mkdir -p dir</command> <!-- make sure user home dir exists -->
  6273. <command>-fs NAMENODE -touchz file0 file1 file2</command>
  6274. <command>-fs NAMENODE -du file*</command>
  6275. </test-commands>
  6276. <cleanup-commands>
  6277. <command>-fs NAMENODE -rm /user</command>
  6278. </cleanup-commands>
  6279. <comparators>
  6280. <comparator>
  6281. <type>RegexpComparator</type>
  6282. <expected-output>^0( |\t)*file0</expected-output>
  6283. <expected-output>^0( |\t)*file1</expected-output>
  6284. <expected-output>^0( |\t)*file2</expected-output>
  6285. </comparator>
  6286. </comparators>
  6287. </test>
  6288. <test> <!-- TESTED -->
  6289. <description>touchz: touching already existing file </description>
  6290. <test-commands>
  6291. <command>-fs NAMENODE -mkdir -p dir</command> <!-- make sure user home dir exists -->
  6292. <command>-fs NAMENODE -put CLITEST_DATA/data15bytes data15bytes</command>
  6293. <command>-fs NAMENODE -touchz data15bytes</command>
  6294. </test-commands>
  6295. <cleanup-commands>
  6296. <command>-fs NAMENODE -rm data15bytes</command>
  6297. </cleanup-commands>
  6298. <comparators>
  6299. <comparator>
  6300. <type>TokenComparator</type>
  6301. <expected-output>touchz: `data15bytes': Not a zero-length file</expected-output>
  6302. </comparator>
  6303. </comparators>
  6304. </test>
  6305. <test> <!-- TESTED -->
  6306. <description>touchz: Test for hdfs:// path - touching file</description>
  6307. <test-commands>
  6308. <command>-fs NAMENODE -mkdir -p hdfs:///user/</command>
  6309. <command>-fs NAMENODE -touchz hdfs:///user/file0</command>
  6310. <command>-fs NAMENODE -du hdfs:///user/file0</command>
  6311. </test-commands>
  6312. <cleanup-commands>
  6313. <command>-fs NAMENODE -rm hdfs:///user</command>
  6314. </cleanup-commands>
  6315. <comparators>
  6316. <comparator>
  6317. <type>RegexpComparator</type>
  6318. <expected-output>^0\s+hdfs:///user/file0</expected-output>
  6319. </comparator>
  6320. </comparators>
  6321. </test>
  6322. <test> <!-- TESTED -->
  6323. <description>touchz: Test for hdfs:// path - touching many files </description>
  6324. <test-commands>
  6325. <command>-fs NAMENODE -touchz hdfs:///file0 hdfs:///file1 hdfs:///file2</command>
  6326. <command>-fs NAMENODE -du hdfs:///file*</command>
  6327. </test-commands>
  6328. <cleanup-commands>
  6329. <command>-fs NAMENODE -rm hdfs:///user</command>
  6330. </cleanup-commands>
  6331. <comparators>
  6332. <comparator>
  6333. <type>RegexpComparator</type>
  6334. <expected-output>^0( |\t)*hdfs:///file0</expected-output>
  6335. <expected-output>^0( |\t)*hdfs:///file1</expected-output>
  6336. <expected-output>^0( |\t)*hdfs:///file2</expected-output>
  6337. </comparator>
  6338. </comparators>
  6339. </test>
  6340. <test> <!-- TESTED -->
  6341. <description>touchz: Test for hdfs:// path - touching already existing file </description>
  6342. <test-commands>
  6343. <command>-fs NAMENODE -put CLITEST_DATA/data15bytes hdfs:///data15bytes</command>
  6344. <command>-fs NAMENODE -touchz hdfs:///data15bytes</command>
  6345. </test-commands>
  6346. <cleanup-commands>
  6347. <command>-fs NAMENODE -rm hdfs:///data15bytes</command>
  6348. </cleanup-commands>
  6349. <comparators>
  6350. <comparator>
  6351. <type>TokenComparator</type>
  6352. <expected-output>touchz: `hdfs:///data15bytes': Not a zero-length file</expected-output>
  6353. </comparator>
  6354. </comparators>
  6355. </test>
  6356. <test> <!-- TESTED -->
  6357. <description>touchz: Test for Namenode's path - touching file</description>
  6358. <test-commands>
  6359. <command>-fs NAMENODE -touchz NAMENODE/user/file0</command>
  6360. <command>-fs NAMENODE -du NAMENODE/user/file0</command>
  6361. </test-commands>
  6362. <cleanup-commands>
  6363. <command>-fs NAMENODE -rm NAMENODE/user</command>
  6364. </cleanup-commands>
  6365. <comparators>
  6366. <comparator>
  6367. <type>RegexpComparator</type>
  6368. <expected-output>^0\s+NAMENODE/user/file0</expected-output>
  6369. </comparator>
  6370. </comparators>
  6371. </test>
  6372. <test> <!-- TESTED -->
  6373. <description>touchz: Test for Namenode path - touching many files </description>
  6374. <test-commands>
  6375. <command>-fs NAMENODE -touchz NAMENODE/file0 NAMENODE/file1 NAMENODE/file2</command>
  6376. <command>-fs NAMENODE -du NAMENODE/file*</command>
  6377. </test-commands>
  6378. <cleanup-commands>
  6379. <command>-fs NAMENODE -rm NAMENODE/user</command>
  6380. </cleanup-commands>
  6381. <comparators>
  6382. <comparator>
  6383. <type>RegexpComparator</type>
  6384. <expected-output>^0\s+hdfs://\w+[-.a-z0-9]*:[0-9]+/file0</expected-output>
  6385. <expected-output>^0\s+hdfs://\w+[-.a-z0-9]*:[0-9]+/file1</expected-output>
  6386. <expected-output>^0\s+hdfs://\w+[-.a-z0-9]*:[0-9]+/file2</expected-output>
  6387. </comparator>
  6388. </comparators>
  6389. </test>
  6390. <test> <!-- TESTED -->
  6391. <description>touchz: Test for Namenode's path - touching already existing file </description>
  6392. <test-commands>
  6393. <command>-fs NAMENODE -put CLITEST_DATA/data15bytes NAMENODE/data15bytes</command>
  6394. <command>-fs NAMENODE -touchz NAMENODE/data15bytes</command>
  6395. </test-commands>
  6396. <cleanup-commands>
  6397. <command>-fs NAMENODE -rm NAMENODE/data15bytes</command>
  6398. </cleanup-commands>
  6399. <comparators>
  6400. <comparator>
  6401. <type>RegexpComparator</type>
  6402. <expected-output>touchz: `hdfs://\w+[-.a-z0-9]*:[0-9]+/data15bytes': Not a zero-length file</expected-output>
  6403. </comparator>
  6404. </comparators>
  6405. </test>
  6406. <!--Tests for test-->
  6407. <test> <!-- TESTED -->
  6408. <description>test: non existent file (absolute path)</description>
  6409. <test-commands>
  6410. <command>-fs NAMENODE -test -z /dir0/file</command>
  6411. </test-commands>
  6412. <cleanup-commands>
  6413. <command>-fs NAMENODE -rm -r /user</command>
  6414. </cleanup-commands>
  6415. <comparators>
  6416. <comparator>
  6417. <type>ExactComparator</type>
  6418. <expected-output></expected-output>
  6419. </comparator>
  6420. </comparators>
  6421. </test>
  6422. <test> <!-- TESTED -->
  6423. <description>test: non existent file (relative path)</description>
  6424. <test-commands>
  6425. <command>-fs NAMENODE -test -z file</command>
  6426. </test-commands>
  6427. <cleanup-commands>
  6428. <command>-fs NAMENODE -rm -r /user</command>
  6429. </cleanup-commands>
  6430. <comparators>
  6431. <comparator>
  6432. <type>ExactComparator</type>
  6433. <expected-output></expected-output>
  6434. </comparator>
  6435. </comparators>
  6436. </test>
  6437. <test> <!-- TESTED -->
  6438. <description>test: non existent directory (absolute path)</description>
  6439. <test-commands>
  6440. <command>-fs NAMENODE -test -d /dir</command>
  6441. </test-commands>
  6442. <cleanup-commands>
  6443. <command>-fs NAMENODE -rm -r /user</command>
  6444. </cleanup-commands>
  6445. <comparators>
  6446. <comparator>
  6447. <type>ExactComparator</type>
  6448. <expected-output></expected-output>
  6449. </comparator>
  6450. </comparators>
  6451. </test>
  6452. <test> <!-- TESTED -->
  6453. <description>test: non existent directory (relative path)</description>
  6454. <test-commands>
  6455. <command>-fs NAMENODE -test -d dir0</command>
  6456. </test-commands>
  6457. <cleanup-commands>
  6458. <command>-fs NAMENODE -rm -r /user</command>
  6459. </cleanup-commands>
  6460. <comparators>
  6461. <comparator>
  6462. <type>ExactComparator</type>
  6463. <expected-output></expected-output>
  6464. </comparator>
  6465. </comparators>
  6466. </test>
  6467. <test> <!-- TESTED -->
  6468. <description>test: Test for hdfs:// path - non existent file</description>
  6469. <test-commands>
  6470. <command>-fs NAMENODE -test -z hdfs:///dir0/file</command>
  6471. </test-commands>
  6472. <cleanup-commands>
  6473. <command>-fs NAMENODE -rm -r hdfs:///dir0</command>
  6474. </cleanup-commands>
  6475. <comparators>
  6476. <comparator>
  6477. <type>ExactComparator</type>
  6478. <expected-output></expected-output>
  6479. </comparator>
  6480. </comparators>
  6481. </test>
  6482. <test> <!-- TESTED -->
  6483. <description>test: Test for hdfs:// path - non existent directory</description>
  6484. <test-commands>
  6485. <command>-fs NAMENODE -test -d hdfs:///dir</command>
  6486. </test-commands>
  6487. <cleanup-commands>
  6488. <command>-fs NAMENODE -rm -r hdfs:///dir</command>
  6489. </cleanup-commands>
  6490. <comparators>
  6491. <comparator>
  6492. <type>ExactComparator</type>
  6493. <expected-output></expected-output>
  6494. </comparator>
  6495. </comparators>
  6496. </test>
  6497. <test> <!-- TESTED -->
  6498. <description>test: Test for Namenode's path - non existent file</description>
  6499. <test-commands>
  6500. <command>-fs NAMENODE -test -z NAMENODE/dir0/file</command>
  6501. </test-commands>
  6502. <cleanup-commands>
  6503. <command>-fs NAMENODE -rm -r NAMENODE/dir0</command>
  6504. </cleanup-commands>
  6505. <comparators>
  6506. <comparator>
  6507. <type>ExactComparator</type>
  6508. <expected-output></expected-output>
  6509. </comparator>
  6510. </comparators>
  6511. </test>
  6512. <test> <!-- TESTED -->
  6513. <description>test: Test for Namenode's path - non existent directory</description>
  6514. <test-commands>
  6515. <command>-fs NAMENODE -test -d NAMENODE/dir</command>
  6516. </test-commands>
  6517. <cleanup-commands>
  6518. <command>-fs NAMENODE -rm -r NAMENODE/dir</command>
  6519. </cleanup-commands>
  6520. <comparators>
  6521. <comparator>
  6522. <type>ExactComparator</type>
  6523. <expected-output></expected-output>
  6524. </comparator>
  6525. </comparators>
  6526. </test>
  6527. <!--Tests for stat -->
  6528. <test> <!-- TESTED -->
  6529. <description>stat: statistics about file(absolute path)</description>
  6530. <test-commands>
  6531. <command>-fs NAMENODE -put CLITEST_DATA/data60bytes /data60bytes</command>
  6532. <command>-fs NAMENODE -stat "%n-%b" /data60bytes</command>
  6533. </test-commands>
  6534. <cleanup-commands>
  6535. <command>-fs NAMENODE -rm -r /data60bytes</command>
  6536. </cleanup-commands>
  6537. <comparators>
  6538. <comparator>
  6539. <type>TokenComparator</type>
  6540. <expected-output>data60bytes-60</expected-output>
  6541. </comparator>
  6542. </comparators>
  6543. </test>
  6544. <test> <!-- TESTED -->
  6545. <description>stat: statistics about file(relative path)</description>
  6546. <test-commands>
  6547. <command>-fs NAMENODE -mkdir -p dir</command> <!-- make sure user home dir exists -->
  6548. <command>-fs NAMENODE -touchz test</command>
  6549. <command>-fs NAMENODE -put CLITEST_DATA/data60bytes data60bytes</command>
  6550. <command>-fs NAMENODE -stat "%n-%b" data60bytes</command>
  6551. </test-commands>
  6552. <cleanup-commands>
  6553. <command>-fs NAMENODE -rm -r /user</command>
  6554. </cleanup-commands>
  6555. <comparators>
  6556. <comparator>
  6557. <type>TokenComparator</type>
  6558. <expected-output>data60bytes-60</expected-output>
  6559. </comparator>
  6560. </comparators>
  6561. </test>
  6562. <test> <!-- TESTED -->
  6563. <description>stat: statistics about directory(absolute path)</description>
  6564. <test-commands>
  6565. <command>-fs NAMENODE -mkdir /dirtest</command>
  6566. <command>-fs NAMENODE -stat "%n-%b-%o" /dirtest</command>
  6567. </test-commands>
  6568. <cleanup-commands>
  6569. <command>-fs NAMENODE -rm -r /dirtest</command>
  6570. </cleanup-commands>
  6571. <comparators>
  6572. <comparator>
  6573. <type>TokenComparator</type>
  6574. <expected-output>dirtest-0-0</expected-output>
  6575. </comparator>
  6576. </comparators>
  6577. </test>
  6578. <test> <!-- TESTED -->
  6579. <description>stat: statistics about directory(relative path)</description>
  6580. <test-commands>
  6581. <command>-fs NAMENODE -mkdir -p dirtest</command>
  6582. <command>-fs NAMENODE -stat "%n-%b-%o" dirtest</command>
  6583. </test-commands>
  6584. <cleanup-commands>
  6585. <command>-fs NAMENODE -rm -r /user</command>
  6586. </cleanup-commands>
  6587. <comparators>
  6588. <comparator>
  6589. <type>TokenComparator</type>
  6590. <expected-output>dirtest-0-0</expected-output>
  6591. </comparator>
  6592. </comparators>
  6593. </test>
  6594. <test> <!-- TESTED -->
  6595. <description>stat: statistics about files (absolute path) using globbing</description>
  6596. <test-commands>
  6597. <command>-fs NAMENODE -mkdir /dir0</command>
  6598. <command>-fs NAMENODE -put CLITEST_DATA/data15bytes /dir0/data15bytes</command>
  6599. <command>-fs NAMENODE -put CLITEST_DATA/data30bytes /dir0/data30bytes</command>
  6600. <command>-fs NAMENODE -put CLITEST_DATA/data60bytes /dir0/data60bytes</command>
  6601. <command>-fs NAMENODE -put CLITEST_DATA/data120bytes /dir0/data120bytes</command>
  6602. <command>-fs NAMENODE -mkdir /dir0/datadir</command>
  6603. <command>-fs NAMENODE -stat "%n-%b" /dir0/data*</command>
  6604. </test-commands>
  6605. <cleanup-commands>
  6606. <command>-fs NAMENODE -rm -r /dir0</command>
  6607. </cleanup-commands>
  6608. <comparators>
  6609. <comparator>
  6610. <type>TokenComparator</type>
  6611. <expected-output>data15bytes-15</expected-output>
  6612. </comparator>
  6613. <comparator>
  6614. <type>TokenComparator</type>
  6615. <expected-output>data30bytes-30</expected-output>
  6616. </comparator>
  6617. <comparator>
  6618. <type>TokenComparator</type>
  6619. <expected-output>data60bytes-60</expected-output>
  6620. </comparator>
  6621. <comparator>
  6622. <type>TokenComparator</type>
  6623. <expected-output>data120bytes-120</expected-output>
  6624. </comparator>
  6625. <comparator>
  6626. <type>TokenComparator</type>
  6627. <expected-output>datadir-0</expected-output>
  6628. </comparator>
  6629. </comparators>
  6630. </test>
  6631. <test> <!-- TESTED -->
  6632. <description>stat: statistics about files (relative path) using globbing</description>
  6633. <test-commands>
  6634. <command>-fs NAMENODE -mkdir -p dir</command> <!-- make sure user home dir exists -->
  6635. <command>-fs NAMENODE -touchz test</command>
  6636. <command>-fs NAMENODE -put CLITEST_DATA/data15bytes data15bytes</command>
  6637. <command>-fs NAMENODE -put CLITEST_DATA/data30bytes data30bytes</command>
  6638. <command>-fs NAMENODE -put CLITEST_DATA/data60bytes data60bytes</command>
  6639. <command>-fs NAMENODE -put CLITEST_DATA/data120bytes data120bytes</command>
  6640. <command>-fs NAMENODE -mkdir -p datadir</command>
  6641. <command>-fs NAMENODE -stat "%n-%b" data*</command>
  6642. </test-commands>
  6643. <cleanup-commands>
  6644. <command>-fs NAMENODE -rm -r /user</command>
  6645. </cleanup-commands>
  6646. <comparators>
  6647. <comparator>
  6648. <type>TokenComparator</type>
  6649. <expected-output>data15bytes-15</expected-output>
  6650. </comparator>
  6651. <comparator>
  6652. <type>TokenComparator</type>
  6653. <expected-output>data30bytes-30</expected-output>
  6654. </comparator>
  6655. <comparator>
  6656. <type>TokenComparator</type>
  6657. <expected-output>data60bytes-60</expected-output>
  6658. </comparator>
  6659. <comparator>
  6660. <type>TokenComparator</type>
  6661. <expected-output>data120bytes-120</expected-output>
  6662. </comparator>
  6663. <comparator>
  6664. <type>TokenComparator</type>
  6665. <expected-output>datadir-0</expected-output>
  6666. </comparator>
  6667. </comparators>
  6668. </test>
  6669. <test> <!-- TESTED -->
  6670. <description>stat: statistics about file or directory(absolute path) that does not exist</description>
  6671. <test-commands>
  6672. <command>-fs NAMENODE -stat /file</command>
  6673. </test-commands>
  6674. <cleanup-commands>
  6675. </cleanup-commands>
  6676. <comparators>
  6677. <comparator>
  6678. <type>RegexpComparator</type>
  6679. <expected-output>^stat: `/file': No such file or directory</expected-output>
  6680. </comparator>
  6681. </comparators>
  6682. </test>
  6683. <test> <!-- TESTED -->
  6684. <description>stat: statistics about file or directory(relative path) that does not exist </description>
  6685. <test-commands>
  6686. <command>-fs NAMENODE -stat file1</command>
  6687. </test-commands>
  6688. <cleanup-commands>
  6689. </cleanup-commands>
  6690. <comparators>
  6691. <comparator>
  6692. <type>RegexpComparator</type>
  6693. <expected-output>^stat: `file1': No such file or directory</expected-output>
  6694. </comparator>
  6695. </comparators>
  6696. </test>
  6697. <test> <!-- TESTED -->
  6698. <description>stat: Test for hdfs:// path - statistics about file</description>
  6699. <test-commands>
  6700. <command>-fs NAMENODE -put CLITEST_DATA/data60bytes hdfs:///data60bytes</command>
  6701. <command>-fs NAMENODE -stat "%n-%b" hdfs:///data60bytes</command>
  6702. </test-commands>
  6703. <cleanup-commands>
  6704. <command>-fs NAMENODE -rm -r hdfs:///data60bytes</command>
  6705. </cleanup-commands>
  6706. <comparators>
  6707. <comparator>
  6708. <type>TokenComparator</type>
  6709. <expected-output>data60bytes-60</expected-output>
  6710. </comparator>
  6711. </comparators>
  6712. </test>
  6713. <test> <!-- TESTED -->
  6714. <description>stat: Test for hdfs:// path - statistics about directory</description>
  6715. <test-commands>
  6716. <command>-fs NAMENODE -mkdir hdfs:///dirtest</command>
  6717. <command>-fs NAMENODE -stat "%n-%b-%o" hdfs:///dirtest</command>
  6718. </test-commands>
  6719. <cleanup-commands>
  6720. <command>-fs NAMENODE -rm -r hdfs:///dirtest</command>
  6721. </cleanup-commands>
  6722. <comparators>
  6723. <comparator>
  6724. <type>TokenComparator</type>
  6725. <expected-output>dirtest-0-0</expected-output>
  6726. </comparator>
  6727. </comparators>
  6728. </test>
  6729. <test> <!-- TESTED -->
  6730. <description>stat: Test for hdfs:// path - statistics about files using globbing</description>
  6731. <test-commands>
  6732. <command>-fs NAMENODE -mkdir /dir0</command>
  6733. <command>-fs NAMENODE -put CLITEST_DATA/data15bytes hdfs:///dir0/data15bytes</command>
  6734. <command>-fs NAMENODE -put CLITEST_DATA/data30bytes hdfs:///dir0/data30bytes</command>
  6735. <command>-fs NAMENODE -put CLITEST_DATA/data60bytes hdfs:///dir0/data60bytes</command>
  6736. <command>-fs NAMENODE -put CLITEST_DATA/data120bytes hdfs:///dir0/data120bytes</command>
  6737. <command>-fs NAMENODE -mkdir -p hdfs:///dir0/datadir</command>
  6738. <command>-fs NAMENODE -stat "%n-%b" hdfs:///dir0/data*</command>
  6739. </test-commands>
  6740. <cleanup-commands>
  6741. <command>-fs NAMENODE -rm -r hdfs:///dir0</command>
  6742. </cleanup-commands>
  6743. <comparators>
  6744. <comparator>
  6745. <type>TokenComparator</type>
  6746. <expected-output>data15bytes-15</expected-output>
  6747. </comparator>
  6748. <comparator>
  6749. <type>TokenComparator</type>
  6750. <expected-output>data30bytes-30</expected-output>
  6751. </comparator>
  6752. <comparator>
  6753. <type>TokenComparator</type>
  6754. <expected-output>data60bytes-60</expected-output>
  6755. </comparator>
  6756. <comparator>
  6757. <type>TokenComparator</type>
  6758. <expected-output>data120bytes-120</expected-output>
  6759. </comparator>
  6760. <comparator>
  6761. <type>TokenComparator</type>
  6762. <expected-output>datadir-0</expected-output>
  6763. </comparator>
  6764. </comparators>
  6765. </test>
  6766. <test> <!-- TESTED -->
  6767. <description>stat: Test for hdfs:// path - statistics about file or directory that does not exist</description>
  6768. <test-commands>
  6769. <command>-fs NAMENODE -stat hdfs:///file</command>
  6770. </test-commands>
  6771. <cleanup-commands>
  6772. </cleanup-commands>
  6773. <comparators>
  6774. <comparator>
  6775. <type>RegexpComparator</type>
  6776. <expected-output>^stat: `hdfs:///file': No such file or directory</expected-output>
  6777. </comparator>
  6778. </comparators>
  6779. </test>
  6780. <test> <!-- TESTED -->
  6781. <description>stat: Test for Namenode's path - statistics about file</description>
  6782. <test-commands>
  6783. <command>-fs NAMENODE -put CLITEST_DATA/data60bytes NAMENODE/data60bytes</command>
  6784. <command>-fs NAMENODE -stat "%n-%b" NAMENODE/data60bytes</command>
  6785. </test-commands>
  6786. <cleanup-commands>
  6787. <command>-fs NAMENODE -rm -r NAMENODE/data60bytes</command>
  6788. </cleanup-commands>
  6789. <comparators>
  6790. <comparator>
  6791. <type>TokenComparator</type>
  6792. <expected-output>data60bytes-60</expected-output>
  6793. </comparator>
  6794. </comparators>
  6795. </test>
  6796. <test> <!-- TESTED -->
  6797. <description>stat: Test for Namenode's path - statistics about directory</description>
  6798. <test-commands>
  6799. <command>-fs NAMENODE -mkdir NAMENODE/dirtest</command>
  6800. <command>-fs NAMENODE -stat "%n-%b-%o" NAMENODE/dirtest</command>
  6801. </test-commands>
  6802. <cleanup-commands>
  6803. <command>-fs NAMENODE -rm -r NAMENODE/dirtest</command>
  6804. </cleanup-commands>
  6805. <comparators>
  6806. <comparator>
  6807. <type>TokenComparator</type>
  6808. <expected-output>dirtest-0-0</expected-output>
  6809. </comparator>
  6810. </comparators>
  6811. </test>
  6812. <test> <!-- TESTED -->
  6813. <description>stat: Test for Namenode's path - statistics about files using globbing</description>
  6814. <test-commands>
  6815. <command>-fs NAMENODE -mkdir /dir0</command>
  6816. <command>-fs NAMENODE -put CLITEST_DATA/data15bytes NAMENODE/dir0/data15bytes</command>
  6817. <command>-fs NAMENODE -put CLITEST_DATA/data30bytes NAMENODE/dir0/data30bytes</command>
  6818. <command>-fs NAMENODE -put CLITEST_DATA/data60bytes NAMENODE/dir0/data60bytes</command>
  6819. <command>-fs NAMENODE -put CLITEST_DATA/data120bytes NAMENODE/dir0/data120bytes</command>
  6820. <command>-fs NAMENODE -mkdir -p NAMENODE/dir0/datadir</command>
  6821. <command>-fs NAMENODE -stat "%n-%b" NAMENODE/dir0/data*</command>
  6822. </test-commands>
  6823. <cleanup-commands>
  6824. <command>-fs NAMENODE -rm -r NAMENODE/dir0</command>
  6825. </cleanup-commands>
  6826. <comparators>
  6827. <comparator>
  6828. <type>TokenComparator</type>
  6829. <expected-output>data15bytes-15</expected-output>
  6830. </comparator>
  6831. <comparator>
  6832. <type>TokenComparator</type>
  6833. <expected-output>data30bytes-30</expected-output>
  6834. </comparator>
  6835. <comparator>
  6836. <type>TokenComparator</type>
  6837. <expected-output>data60bytes-60</expected-output>
  6838. </comparator>
  6839. <comparator>
  6840. <type>TokenComparator</type>
  6841. <expected-output>data120bytes-120</expected-output>
  6842. </comparator>
  6843. <comparator>
  6844. <type>TokenComparator</type>
  6845. <expected-output>datadir-0</expected-output>
  6846. </comparator>
  6847. </comparators>
  6848. </test>
  6849. <test> <!-- TESTED -->
  6850. <description>stat: Test for Namenode's path - statistics about file or directory that does not exist</description>
  6851. <test-commands>
  6852. <command>-fs NAMENODE -stat NAMENODE/file</command>
  6853. </test-commands>
  6854. <cleanup-commands>
  6855. </cleanup-commands>
  6856. <comparators>
  6857. <comparator>
  6858. <type>RegexpComparator</type>
  6859. <expected-output>^stat: `hdfs://\w+[-.a-z0-9]*:[0-9]+/file': No such file or directory</expected-output>
  6860. </comparator>
  6861. </comparators>
  6862. </test>
  6863. <!-- Tests for tail -->
  6864. <test> <!-- TESTED -->
  6865. <description>tail: contents of file(absolute path)</description>
  6866. <test-commands>
  6867. <command>-fs NAMENODE -put CLITEST_DATA/data15bytes /data15bytes</command>
  6868. <command>-fs NAMENODE -tail /data15bytes</command>
  6869. </test-commands>
  6870. <cleanup-commands>
  6871. <command>-fs NAMENODE -rm /user</command>
  6872. </cleanup-commands>
  6873. <comparators>
  6874. <comparator>
  6875. <type>TokenComparator</type>
  6876. <expected-output>12345678901234</expected-output>
  6877. </comparator>
  6878. </comparators>
  6879. </test>
  6880. <test> <!--TESTED-->
  6881. <description>tail: contents of file(relative path)</description>
  6882. <test-commands>
  6883. <command>-fs NAMENODE -mkdir -p dir</command> <!-- make sure user home dir exists -->
  6884. <command>-fs NAMENODE -touchz test</command>
  6885. <command>-fs NAMENODE -put CLITEST_DATA/data15bytes data15bytes</command>
  6886. <command>-fs NAMENODE -tail data15bytes</command>
  6887. </test-commands>
  6888. <cleanup-commands>
  6889. <command>-fs NAMENODE -rm -r /user</command>
  6890. </cleanup-commands>
  6891. <comparators>
  6892. <comparator>
  6893. <type>TokenComparator</type>
  6894. <expected-output>12345678901234</expected-output>
  6895. </comparator>
  6896. </comparators>
  6897. </test>
  6898. <test> <!-- TESTED -->
  6899. <description>tail: contents of files(absolute path) using globbing</description>
  6900. <test-commands>
  6901. <command>-fs NAMENODE -touchz /file1</command>
  6902. <command>-fs NAMENODE -touchz /file2</command>
  6903. <command>-fs NAMENODE -touchz /file3</command>
  6904. <command>-fs NAMENODE -touchz /file4</command>
  6905. <command>-fs NAMENODE -tail /file*</command>
  6906. </test-commands>
  6907. <cleanup-commands>
  6908. <command>-fs NAMENODE -rm -r /user</command>
  6909. </cleanup-commands>
  6910. <comparators>
  6911. <comparator>
  6912. <type>RegexpComparator</type>
  6913. <expected-output>^tail: `/file\*': No such file or directory</expected-output>
  6914. </comparator>
  6915. </comparators>
  6916. </test>
  6917. <test> <!-- TESTED -->
  6918. <description>tail: contents of files(relative path) using globbing</description>
  6919. <test-commands>
  6920. <command>-fs NAMENODE -touchz file1</command>
  6921. <command>-fs NAMENODE -touchz file2</command>
  6922. <command>-fs NAMENODE -touchz file3</command>
  6923. <command>-fs NAMENODE -touchz file4</command>
  6924. <command>-fs NAMENODE -tail file*</command>
  6925. </test-commands>
  6926. <cleanup-commands>
  6927. <command>-fs NAMENODE -rm -r /user</command>
  6928. </cleanup-commands>
  6929. <comparators>
  6930. <comparator>
  6931. <type>RegexpComparator</type>
  6932. <expected-output>^tail: `file\*': No such file or directory</expected-output>
  6933. </comparator>
  6934. </comparators>
  6935. </test>
  6936. <test> <!-- TESTED -->
  6937. <description>tail: contents of file(absolute path) that does not exist</description>
  6938. <test-commands>
  6939. <command>-fs NAMENODE -tail /file</command>
  6940. </test-commands>
  6941. <cleanup-commands>
  6942. </cleanup-commands>
  6943. <comparators>
  6944. <comparator>
  6945. <type>RegexpComparator</type>
  6946. <expected-output>^tail: `/file': No such file or directory</expected-output>
  6947. </comparator>
  6948. </comparators>
  6949. </test>
  6950. <test> <!-- TESTED -->
  6951. <description>tail: contents of file(relative path) that does not exist</description>
  6952. <test-commands>
  6953. <command>-fs NAMENODE -tail file1</command>
  6954. </test-commands>
  6955. <cleanup-commands>
  6956. </cleanup-commands>
  6957. <comparators>
  6958. <comparator>
  6959. <type>RegexpComparator</type>
  6960. <expected-output>^tail: `file1': No such file or directory</expected-output>
  6961. </comparator>
  6962. </comparators>
  6963. </test>
  6964. <test> <!-- TESTED -->
  6965. <description>tail: contents of directory(absolute path) </description>
  6966. <test-commands>
  6967. <command>-fs NAMENODE -mkdir /dir1</command>
  6968. <command>-fs NAMENODE -tail /dir1</command>
  6969. </test-commands>
  6970. <cleanup-commands>
  6971. <command>-fs NAMENODE -rm -r /dir1</command>
  6972. </cleanup-commands>
  6973. <comparators>
  6974. <comparator>
  6975. <type>RegexpComparator</type>
  6976. <expected-output>^tail: `/dir1': Is a directory</expected-output>
  6977. </comparator>
  6978. </comparators>
  6979. </test>
  6980. <test> <!-- TESTED -->
  6981. <description>tail: contents of directory(relative path)</description>
  6982. <test-commands>
  6983. <command>-fs NAMENODE -mkdir -p dir1</command>
  6984. <command>-fs NAMENODE -tail dir1</command>
  6985. </test-commands>
  6986. <cleanup-commands>
  6987. <command>-fs NAMENODE -rm -r dir1</command>
  6988. </cleanup-commands>
  6989. <comparators>
  6990. <comparator>
  6991. <type>RegexpComparator</type>
  6992. <expected-output>^tail: `dir1': Is a directory</expected-output>
  6993. </comparator>
  6994. </comparators>
  6995. </test>
  6996. <test> <!-- TESTED -->
  6997. <description>tail: Test for hdfs:// path - contents of file</description>
  6998. <test-commands>
  6999. <command>-fs NAMENODE -put CLITEST_DATA/data15bytes hdfs:///data15bytes</command>
  7000. <command>-fs NAMENODE -tail hdfs:///data15bytes</command>
  7001. </test-commands>
  7002. <cleanup-commands>
  7003. <command>-fs NAMENODE -rm hdfs:///*</command>
  7004. </cleanup-commands>
  7005. <comparators>
  7006. <comparator>
  7007. <type>TokenComparator</type>
  7008. <expected-output>12345678901234</expected-output>
  7009. </comparator>
  7010. </comparators>
  7011. </test>
  7012. <test> <!-- TESTED -->
  7013. <description>tail: Test for hdfs:// path - contents of files using globbing</description>
  7014. <test-commands>
  7015. <command>-fs NAMENODE -touchz hdfs:///file1</command>
  7016. <command>-fs NAMENODE -touchz hdfs:///file2</command>
  7017. <command>-fs NAMENODE -touchz hdfs:///file3</command>
  7018. <command>-fs NAMENODE -touchz hdfs:///file4</command>
  7019. <command>-fs NAMENODE -tail hdfs:///file*</command>
  7020. </test-commands>
  7021. <cleanup-commands>
  7022. <command>-fs NAMENODE -rm -r hdfs:///*</command>
  7023. </cleanup-commands>
  7024. <comparators>
  7025. <comparator>
  7026. <type>RegexpComparator</type>
  7027. <expected-output>^tail: `hdfs:///file\*': No such file or directory</expected-output>
  7028. </comparator>
  7029. </comparators>
  7030. </test>
  7031. <test> <!-- TESTED -->
  7032. <description>tail: Test for hdfs:// path - contents of file that does not exist</description>
  7033. <test-commands>
  7034. <command>-fs NAMENODE -tail hdfs:///file</command>
  7035. </test-commands>
  7036. <cleanup-commands>
  7037. </cleanup-commands>
  7038. <comparators>
  7039. <comparator>
  7040. <type>RegexpComparator</type>
  7041. <expected-output>^tail: `hdfs:///file': No such file or directory</expected-output>
  7042. </comparator>
  7043. </comparators>
  7044. </test>
  7045. <test> <!-- TESTED -->
  7046. <description>tail: Test for hdfs:// path - contents of directory</description>
  7047. <test-commands>
  7048. <command>-fs NAMENODE -mkdir hdfs:///dir1</command>
  7049. <command>-fs NAMENODE -tail hdfs:///dir1</command>
  7050. </test-commands>
  7051. <cleanup-commands>
  7052. <command>-fs NAMENODE -rm -r hdfs:///dir1</command>
  7053. </cleanup-commands>
  7054. <comparators>
  7055. <comparator>
  7056. <type>RegexpComparator</type>
  7057. <expected-output>^tail: `hdfs:///dir1': Is a directory</expected-output>
  7058. </comparator>
  7059. </comparators>
  7060. </test>
  7061. <test> <!-- TESTED -->
  7062. <description>tail: Test for Namenode's path - contents of file</description>
  7063. <test-commands>
  7064. <command>-fs NAMENODE -put CLITEST_DATA/data15bytes NAMENODE/data15bytes</command>
  7065. <command>-fs NAMENODE -tail NAMENODE/data15bytes</command>
  7066. </test-commands>
  7067. <cleanup-commands>
  7068. <command>-fs NAMENODE -rm NAMENODE/*</command>
  7069. </cleanup-commands>
  7070. <comparators>
  7071. <comparator>
  7072. <type>TokenComparator</type>
  7073. <expected-output>12345678901234</expected-output>
  7074. </comparator>
  7075. </comparators>
  7076. </test>
  7077. <test> <!-- TESTED -->
  7078. <description>tail: Test for Namenode's path - contents of files using globbing</description>
  7079. <test-commands>
  7080. <command>-fs NAMENODE -touchz NAMENODE/file1</command>
  7081. <command>-fs NAMENODE -touchz NAMENODE/file2</command>
  7082. <command>-fs NAMENODE -touchz NAMENODE/file3</command>
  7083. <command>-fs NAMENODE -touchz NAMENODE/file4</command>
  7084. <command>-fs NAMENODE -tail NAMENODE/file*</command>
  7085. </test-commands>
  7086. <cleanup-commands>
  7087. <command>-fs NAMENODE -rm -r NAMENODE/*</command>
  7088. </cleanup-commands>
  7089. <comparators>
  7090. <comparator>
  7091. <type>RegexpComparator</type>
  7092. <expected-output>^tail: `hdfs://\w+[-.a-z0-9]*:[0-9]+/file\*': No such file or directory</expected-output>
  7093. </comparator>
  7094. </comparators>
  7095. </test>
  7096. <test> <!-- TESTED -->
  7097. <description>tail: Test for Namenode's path - contents of file that does not exist</description>
  7098. <test-commands>
  7099. <command>-fs NAMENODE -tail NAMENODE/file</command>
  7100. </test-commands>
  7101. <cleanup-commands>
  7102. </cleanup-commands>
  7103. <comparators>
  7104. <comparator>
  7105. <type>RegexpComparator</type>
  7106. <expected-output>^tail: `hdfs://\w+[-.a-z0-9]*:[0-9]+/file': No such file or directory</expected-output>
  7107. </comparator>
  7108. </comparators>
  7109. </test>
  7110. <test> <!-- TESTED -->
  7111. <description>tail: Test for Namenode's path - contents of directory</description>
  7112. <test-commands>
  7113. <command>-fs NAMENODE -mkdir NAMENODE/dir1</command>
  7114. <command>-fs NAMENODE -tail NAMENODE/dir1</command>
  7115. </test-commands>
  7116. <cleanup-commands>
  7117. <command>-fs NAMENODE -rm -r NAMENODE/dir1</command>
  7118. </cleanup-commands>
  7119. <comparators>
  7120. <comparator>
  7121. <type>RegexpComparator</type>
  7122. <expected-output>^tail: `hdfs://\w+[-.a-z0-9]*:[0-9]+/dir1': Is a directory</expected-output>
  7123. </comparator>
  7124. </comparators>
  7125. </test>
  7126. <!-- Tests for count -->
  7127. <test> <!-- TESTED -->
  7128. <description>count: file using absolute path</description>
  7129. <test-commands>
  7130. <command>-fs NAMENODE -touchz /file1</command>
  7131. <command>-fs NAMENODE -count /file1</command>
  7132. </test-commands>
  7133. <cleanup-commands>
  7134. <command>-fs NAMENODE -rm /file1</command>
  7135. </cleanup-commands>
  7136. <comparators>
  7137. <comparator>
  7138. <type>RegexpComparator</type>
  7139. <expected-output>( |\t)*0( |\t)*1( |\t)*0 /file1</expected-output>
  7140. </comparator>
  7141. </comparators>
  7142. </test>
  7143. <test> <!-- TESTED -->
  7144. <description>count: file using relative path</description>
  7145. <test-commands>
  7146. <command>-fs NAMENODE -mkdir -p dir</command> <!-- make sure user home dir exists -->
  7147. <command>-fs NAMENODE -touchz file1</command>
  7148. <command>-fs NAMENODE -count file1</command>
  7149. </test-commands>
  7150. <cleanup-commands>
  7151. <command>-fs NAMENODE -rm file1</command>
  7152. </cleanup-commands>
  7153. <comparators>
  7154. <comparator>
  7155. <type>RegexpComparator</type>
  7156. <expected-output>( |\t)*0( |\t)*1( |\t)*0 file1</expected-output>
  7157. </comparator>
  7158. </comparators>
  7159. </test>
  7160. <test> <!-- TESTED -->
  7161. <description>count: directory using absolute path</description>
  7162. <test-commands>
  7163. <command>-fs NAMENODE -mkdir /dir1</command>
  7164. <command>-fs NAMENODE -count /dir1</command>
  7165. </test-commands>
  7166. <cleanup-commands>
  7167. <command>-fs NAMENODE -rm -r /dir1</command>
  7168. </cleanup-commands>
  7169. <comparators>
  7170. <comparator>
  7171. <type>RegexpComparator</type>
  7172. <expected-output>( |\t)*1( |\t)*0( |\t)*0 /dir1</expected-output>
  7173. </comparator>
  7174. </comparators>
  7175. </test>
  7176. <test> <!-- TESTED -->
  7177. <description>count: directory using relative path</description>
  7178. <test-commands>
  7179. <command>-fs NAMENODE -mkdir -p dir1</command>
  7180. <command>-fs NAMENODE -count dir1</command>
  7181. </test-commands>
  7182. <cleanup-commands>
  7183. <command>-fs NAMENODE -rm -r dir1</command>
  7184. </cleanup-commands>
  7185. <comparators>
  7186. <comparator>
  7187. <type>RegexpComparator</type>
  7188. <expected-output>( |\t)*1( |\t)*0( |\t)*0 dir1</expected-output>
  7189. </comparator>
  7190. </comparators>
  7191. </test>
  7192. <test> <!-- TESTED -->
  7193. <description>count: absolute path to file/directory that does not exist</description>
  7194. <test-commands>
  7195. <command>-fs NAMENODE -count /file1 </command>
  7196. </test-commands>
  7197. <cleanup-commands>
  7198. </cleanup-commands>
  7199. <comparators>
  7200. <comparator>
  7201. <type>TokenComparator</type>
  7202. <expected-output>count: `/file1': No such file or directory</expected-output>
  7203. </comparator>
  7204. </comparators>
  7205. </test>
  7206. <test> <!-- TESTED -->
  7207. <description>count: relative path to file/directory that does not exist</description>
  7208. <test-commands>
  7209. <command>-fs NAMENODE -count file1</command>
  7210. </test-commands>
  7211. <cleanup-commands>
  7212. </cleanup-commands>
  7213. <comparators>
  7214. <comparator>
  7215. <type>TokenComparator</type>
  7216. <expected-output>count: `file1': No such file or directory</expected-output>
  7217. </comparator>
  7218. </comparators>
  7219. </test>
  7220. <test> <!-- TESTED -->
  7221. <description>count: absolute path to multiple files using globbing</description>
  7222. <test-commands>
  7223. <command>-fs NAMENODE -touchz /file1</command>
  7224. <command>-fs NAMENODE -touchz /file2</command>
  7225. <command>-fs NAMENODE -touchz /file3</command>
  7226. <command>-fs NAMENODE -touchz /file4</command>
  7227. <command>-fs NAMENODE -count /file*</command>
  7228. </test-commands>
  7229. <cleanup-commands>
  7230. <command>-fs NAMENODE -rm -r /file*</command>
  7231. </cleanup-commands>
  7232. <comparators>
  7233. <comparator>
  7234. <type>RegexpComparator</type>
  7235. <expected-output>( |\t)*0( |\t)*1( |\t)*0 /file1</expected-output>
  7236. </comparator>
  7237. <comparator>
  7238. <type>RegexpComparator</type>
  7239. <expected-output>( |\t)*0( |\t)*1( |\t)*0 /file2</expected-output>
  7240. </comparator>
  7241. <comparator>
  7242. <type>RegexpComparator</type>
  7243. <expected-output>( |\t)*0( |\t)*1( |\t)*0 /file3</expected-output>
  7244. </comparator>
  7245. <comparator>
  7246. <type>RegexpComparator</type>
  7247. <expected-output>( |\t)*0( |\t)*1( |\t)*0 /file4</expected-output>
  7248. </comparator>
  7249. </comparators>
  7250. </test>
  7251. <test> <!-- TESTED -->
  7252. <description>count: relative path to multiple files using globbing</description>
  7253. <test-commands>
  7254. <command>-fs NAMENODE -touchz file1</command>
  7255. <command>-fs NAMENODE -touchz file2</command>
  7256. <command>-fs NAMENODE -touchz file3</command>
  7257. <command>-fs NAMENODE -touchz file4</command>
  7258. <command>-fs NAMENODE -count file*</command>
  7259. </test-commands>
  7260. <cleanup-commands>
  7261. <command>-fs NAMENODE -rm -r /user</command>
  7262. </cleanup-commands>
  7263. <comparators>
  7264. <comparator>
  7265. <type>RegexpComparator</type>
  7266. <expected-output>( |\t)*0( |\t)*1( |\t)*0 file1</expected-output>
  7267. </comparator>
  7268. <comparator>
  7269. <type>RegexpComparator</type>
  7270. <expected-output>( |\t)*0( |\t)*1( |\t)*0 file2</expected-output>
  7271. </comparator>
  7272. <comparator>
  7273. <type>RegexpComparator</type>
  7274. <expected-output>( |\t)*0( |\t)*1( |\t)*0 file3</expected-output>
  7275. </comparator>
  7276. <comparator>
  7277. <type>RegexpComparator</type>
  7278. <expected-output>( |\t)*0( |\t)*1( |\t)*0 file4</expected-output>
  7279. </comparator>
  7280. </comparators>
  7281. </test>
  7282. <test> <!-- TESTED -->
  7283. <description>count: absolute path to multiple files without globbing</description>
  7284. <test-commands>
  7285. <command>-fs NAMENODE -touchz /file1</command>
  7286. <command>-fs NAMENODE -touchz /file2</command>
  7287. <command>-fs NAMENODE -touchz /file3</command>
  7288. <command>-fs NAMENODE -touchz /file4</command>
  7289. <command>-fs NAMENODE -count /file1 /file2 /file3 /file4</command>
  7290. </test-commands>
  7291. <cleanup-commands>
  7292. <command>-fs NAMENODE -rm -r /file*</command>
  7293. </cleanup-commands>
  7294. <comparators>
  7295. <comparator>
  7296. <type>RegexpComparator</type>
  7297. <expected-output>( |\t)*0( |\t)*1( |\t)*0 /file1</expected-output>
  7298. </comparator>
  7299. <comparator>
  7300. <type>RegexpComparator</type>
  7301. <expected-output>( |\t)*0( |\t)*1( |\t)*0 /file2</expected-output>
  7302. </comparator>
  7303. <comparator>
  7304. <type>RegexpComparator</type>
  7305. <expected-output>( |\t)*0( |\t)*1( |\t)*0 /file3</expected-output>
  7306. </comparator>
  7307. <comparator>
  7308. <type>RegexpComparator</type>
  7309. <expected-output>( |\t)*0( |\t)*1( |\t)*0 /file4</expected-output>
  7310. </comparator>
  7311. </comparators>
  7312. </test>
  7313. <test> <!-- TESTED -->
  7314. <description>count: relative path to multiple files without globbing</description>
  7315. <test-commands>
  7316. <command>-fs NAMENODE -mkdir -p dir</command> <!-- make sure user home dir exists -->
  7317. <command>-fs NAMENODE -touchz file1</command>
  7318. <command>-fs NAMENODE -touchz file2</command>
  7319. <command>-fs NAMENODE -touchz file3</command>
  7320. <command>-fs NAMENODE -touchz file4</command>
  7321. <command>-fs NAMENODE -count file1 file2 file3 file4</command>
  7322. </test-commands>
  7323. <cleanup-commands>
  7324. <command>-fs NAMENODE -rm -r /user</command>
  7325. </cleanup-commands>
  7326. <comparators>
  7327. <comparator>
  7328. <type>RegexpComparator</type>
  7329. <expected-output>( |\t)*0( |\t)*1( |\t)*0 file1</expected-output>
  7330. </comparator>
  7331. <comparator>
  7332. <type>RegexpComparator</type>
  7333. <expected-output>( |\t)*0( |\t)*1( |\t)*0 file2</expected-output>
  7334. </comparator>
  7335. <comparator>
  7336. <type>RegexpComparator</type>
  7337. <expected-output>( |\t)*0( |\t)*1( |\t)*0 file3</expected-output>
  7338. </comparator>
  7339. <comparator>
  7340. <type>RegexpComparator</type>
  7341. <expected-output>( |\t)*0( |\t)*1( |\t)*0 file4</expected-output>
  7342. </comparator>
  7343. </comparators>
  7344. </test>
  7345. <test> <!-- TESTED -->
  7346. <description>count: absolute path to multiple directories using globbing</description>
  7347. <test-commands>
  7348. <command>-fs NAMENODE -mkdir /dir1</command>
  7349. <command>-fs NAMENODE -mkdir /dir2</command>
  7350. <command>-fs NAMENODE -mkdir /dir3</command>
  7351. <command>-fs NAMENODE -mkdir /dir4</command>
  7352. <command>-fs NAMENODE -count /dir* </command>
  7353. </test-commands>
  7354. <cleanup-commands>
  7355. <command>-fs NAMENODE -rm -r /dir*</command>
  7356. </cleanup-commands>
  7357. <comparators>
  7358. <comparator>
  7359. <type>RegexpComparator</type>
  7360. <expected-output>( |\t)*1( |\t)*0( |\t)*0 /dir1</expected-output>
  7361. </comparator>
  7362. <comparator>
  7363. <type>RegexpComparator</type>
  7364. <expected-output>( |\t)*1( |\t)*0( |\t)*0 /dir2</expected-output>
  7365. </comparator>
  7366. <comparator>
  7367. <type>RegexpComparator</type>
  7368. <expected-output>( |\t)*1( |\t)*0( |\t)*0 /dir3</expected-output>
  7369. </comparator>
  7370. <comparator>
  7371. <type>RegexpComparator</type>
  7372. <expected-output>( |\t)*1( |\t)*0( |\t)*0 /dir4</expected-output>
  7373. </comparator>
  7374. </comparators>
  7375. </test>
  7376. <test> <!-- TESTED -->
  7377. <description>count: relative path to multiple directories using globbing</description>
  7378. <test-commands>
  7379. <command>-fs NAMENODE -mkdir -p dir1</command>
  7380. <command>-fs NAMENODE -mkdir -p dir2</command>
  7381. <command>-fs NAMENODE -mkdir -p dir3</command>
  7382. <command>-fs NAMENODE -mkdir -p dir4</command>
  7383. <command>-fs NAMENODE -count dir* </command>
  7384. </test-commands>
  7385. <cleanup-commands>
  7386. <command>-fs NAMENODE -rm -r /user</command>
  7387. </cleanup-commands>
  7388. <comparators>
  7389. <comparator>
  7390. <type>RegexpComparator</type>
  7391. <expected-output>( |\t)*1( |\t)*0( |\t)*0 dir1</expected-output>
  7392. </comparator>
  7393. <comparator>
  7394. <type>RegexpComparator</type>
  7395. <expected-output>( |\t)*1( |\t)*0( |\t)*0 dir2</expected-output>
  7396. </comparator>
  7397. <comparator>
  7398. <type>RegexpComparator</type>
  7399. <expected-output>( |\t)*1( |\t)*0( |\t)*0 dir3</expected-output>
  7400. </comparator>
  7401. <comparator>
  7402. <type>RegexpComparator</type>
  7403. <expected-output>( |\t)*1( |\t)*0( |\t)*0 dir4</expected-output>
  7404. </comparator>
  7405. </comparators>
  7406. </test>
  7407. <test> <!-- TESTED -->
  7408. <description>count: absolute path to multiple directories without globbing</description>
  7409. <test-commands>
  7410. <command>-fs NAMENODE -mkdir /dir1</command>
  7411. <command>-fs NAMENODE -mkdir /dir2</command>
  7412. <command>-fs NAMENODE -mkdir /dir3</command>
  7413. <command>-fs NAMENODE -mkdir /dir4</command>
  7414. <command>-fs NAMENODE -count /dir1 /dir2 /dir3 /dir4 </command>
  7415. </test-commands>
  7416. <cleanup-commands>
  7417. <command>-fs NAMENODE -rm -r /dir*</command>
  7418. </cleanup-commands>
  7419. <comparators>
  7420. <comparator>
  7421. <type>RegexpComparator</type>
  7422. <expected-output>( |\t)*1( |\t)*0( |\t)*0 /dir1</expected-output>
  7423. </comparator>
  7424. <comparator>
  7425. <type>RegexpComparator</type>
  7426. <expected-output>( |\t)*1( |\t)*0( |\t)*0 /dir2</expected-output>
  7427. </comparator>
  7428. <comparator>
  7429. <type>RegexpComparator</type>
  7430. <expected-output>( |\t)*1( |\t)*0( |\t)*0 /dir3</expected-output>
  7431. </comparator>
  7432. <comparator>
  7433. <type>RegexpComparator</type>
  7434. <expected-output>( |\t)*1( |\t)*0( |\t)*0 /dir4</expected-output>
  7435. </comparator>
  7436. </comparators>
  7437. </test>
  7438. <test> <!-- TESTED -->
  7439. <description>count: relative path to multiple directories without globbing</description>
  7440. <test-commands>
  7441. <command>-fs NAMENODE -mkdir -p dir1</command>
  7442. <command>-fs NAMENODE -mkdir -p dir2</command>
  7443. <command>-fs NAMENODE -mkdir -p dir3</command>
  7444. <command>-fs NAMENODE -mkdir -p dir4</command>
  7445. <command>-fs NAMENODE -count dir1 dir2 dir3 dir4 </command>
  7446. </test-commands>
  7447. <cleanup-commands>
  7448. <command>-fs NAMENODE -rm -r /user</command>
  7449. </cleanup-commands>
  7450. <comparators>
  7451. <comparator>
  7452. <type>RegexpComparator</type>
  7453. <expected-output>( |\t)*1( |\t)*0( |\t)*0 dir1</expected-output>
  7454. </comparator>
  7455. <comparator>
  7456. <type>RegexpComparator</type>
  7457. <expected-output>( |\t)*1( |\t)*0( |\t)*0 dir2</expected-output>
  7458. </comparator>
  7459. <comparator>
  7460. <type>RegexpComparator</type>
  7461. <expected-output>( |\t)*1( |\t)*0( |\t)*0 dir3</expected-output>
  7462. </comparator>
  7463. <comparator>
  7464. <type>RegexpComparator</type>
  7465. <expected-output>( |\t)*1( |\t)*0( |\t)*0 dir4</expected-output>
  7466. </comparator>
  7467. </comparators>
  7468. </test>
  7469. <test> <!-- TESTED -->
  7470. <description>count: file using absolute path with -q option</description>
  7471. <test-commands>
  7472. <command>-fs NAMENODE -touchz /file1</command>
  7473. <command>-fs NAMENODE -count -q /file1</command>
  7474. </test-commands>
  7475. <cleanup-commands>
  7476. <command>-fs NAMENODE -rm /file1</command>
  7477. </cleanup-commands>
  7478. <comparators>
  7479. <comparator>
  7480. <type>RegexpComparator</type>
  7481. <expected-output>( |\t)*none( |\t)*inf( |\t)*none( |\t)*inf( |\t)*0( |\t)*1( |\t)*0 /file1</expected-output>
  7482. </comparator>
  7483. </comparators>
  7484. </test>
  7485. <test> <!-- TESTED -->
  7486. <description>count: file using relative path with -q option</description>
  7487. <test-commands>
  7488. <command>-fs NAMENODE -mkdir -p dir</command> <!-- make sure user home dir exists -->
  7489. <command>-fs NAMENODE -touchz file1</command>
  7490. <command>-fs NAMENODE -count -q file1</command>
  7491. </test-commands>
  7492. <cleanup-commands>
  7493. <command>-fs NAMENODE -rm file1</command>
  7494. </cleanup-commands>
  7495. <comparators>
  7496. <comparator>
  7497. <type>RegexpComparator</type>
  7498. <expected-output>( |\t)*none( |\t)*inf( |\t)*none( |\t)*inf( |\t)*0( |\t)*1( |\t)*0 file1</expected-output>
  7499. </comparator>
  7500. </comparators>
  7501. </test>
  7502. <test> <!-- TESTED -->
  7503. <description>count: directory using absolute path with -q option</description>
  7504. <test-commands>
  7505. <command>-fs NAMENODE -mkdir /dir1</command>
  7506. <dfs-admin-command>-fs NAMENODE -setQuota 10 /dir1 </dfs-admin-command>
  7507. <dfs-admin-command>-fs NAMENODE -setSpaceQuota 1m /dir1 </dfs-admin-command>
  7508. <command>-fs NAMENODE -count -q /dir1</command>
  7509. </test-commands>
  7510. <cleanup-commands>
  7511. <command>-fs NAMENODE -rm -r /dir1</command>
  7512. </cleanup-commands>
  7513. <comparators>
  7514. <comparator>
  7515. <type>RegexpComparator</type>
  7516. <expected-output>( |\t)*10( |\t)*9( |\t)*1048576( |\t)*1048576( |\t)*1( |\t)*0( |\t)*0 /dir1</expected-output>
  7517. </comparator>
  7518. </comparators>
  7519. </test>
  7520. <test> <!-- TESTED -->
  7521. <description>setSpaceQuota -storageType: directory with quota by storage type</description>
  7522. <test-commands>
  7523. <command>-fs NAMENODE -mkdir /ttt</command>
  7524. <dfs-admin-command>-fs NAMENODE -setSpaceQuota 1m -storageType DISK /ttt </dfs-admin-command>
  7525. <command>-fs NAMENODE -count -q -t DISK /ttt</command>
  7526. </test-commands>
  7527. <cleanup-commands>
  7528. <command>-fs NAMENODE -rm -r /ttt</command>
  7529. </cleanup-commands>
  7530. <comparators>
  7531. <comparator>
  7532. <type>RegexpComparator</type>
  7533. <expected-output>( |\t)*1048576( |\t)*1048576 /ttt</expected-output>
  7534. </comparator>
  7535. </comparators>
  7536. </test>
  7537. <test> <!-- TESTED -->
  7538. <description>clrSpaceQuota -storageType: directory quota by storage type</description>
  7539. <test-commands>
  7540. <command>-fs NAMENODE -mkdir /ttt</command>
  7541. <dfs-admin-command>-fs NAMENODE -setSpaceQuota 1m -storageType DISK /ttt </dfs-admin-command>
  7542. <command>-fs NAMENODE -count -q -t DISK /ttt</command>
  7543. <dfs-admin-command>-fs NAMENODE -clrSpaceQuota -storageType DISK /ttt </dfs-admin-command>
  7544. <command>-fs NAMENODE -count -q -t DISK /ttt</command>
  7545. </test-commands>
  7546. <cleanup-commands>
  7547. <command>-fs NAMENODE -rm -r /ttt</command>
  7548. </cleanup-commands>
  7549. <comparators>
  7550. <comparator>
  7551. <type>RegexpComparator</type>
  7552. <expected-output>( |\t)*none( |\t)*inf /ttt</expected-output>
  7553. </comparator>
  7554. </comparators>
  7555. </test>
  7556. <test> <!-- TESTED -->
  7557. <description>count: directory using relative path with -q option</description>
  7558. <test-commands>
  7559. <command>-fs NAMENODE -mkdir -p dir1</command>
  7560. <dfs-admin-command>-fs NAMENODE -setQuota 10 dir1 </dfs-admin-command>
  7561. <dfs-admin-command>-fs NAMENODE -setSpaceQuota 1m dir1 </dfs-admin-command>
  7562. <command>-fs NAMENODE -count -q dir1</command>
  7563. </test-commands>
  7564. <cleanup-commands>
  7565. <command>-fs NAMENODE -rm -r dir1</command>
  7566. </cleanup-commands>
  7567. <comparators>
  7568. <comparator>
  7569. <type>RegexpComparator</type>
  7570. <expected-output>( |\t)*10( |\t)*9( |\t)*1048576( |\t)*1048576( |\t)*1( |\t)*0( |\t)*0 dir1</expected-output>
  7571. </comparator>
  7572. </comparators>
  7573. </test>
  7574. <test> <!-- TESTED -->
  7575. <description>count: absolute path to file/directory that does not exist with -q option</description>
  7576. <test-commands>
  7577. <command>-fs NAMENODE -count -q /file1 </command>
  7578. </test-commands>
  7579. <cleanup-commands>
  7580. </cleanup-commands>
  7581. <comparators>
  7582. <comparator>
  7583. <type>TokenComparator</type>
  7584. <expected-output>count: `/file1': No such file or directory</expected-output>
  7585. </comparator>
  7586. </comparators>
  7587. </test>
  7588. <test> <!-- TESTED -->
  7589. <description>count: relative path to file/directory that does not exist with -q option</description>
  7590. <test-commands>
  7591. <command>-fs NAMENODE -count -q file1</command>
  7592. </test-commands>
  7593. <cleanup-commands>
  7594. </cleanup-commands>
  7595. <comparators>
  7596. <comparator>
  7597. <type>TokenComparator</type>
  7598. <expected-output>count: `file1': No such file or directory</expected-output>
  7599. </comparator>
  7600. </comparators>
  7601. </test>
  7602. <test> <!-- TESTED -->
  7603. <description>count: absolute path to multiple files using globbing with -q option</description>
  7604. <test-commands>
  7605. <command>-fs NAMENODE -touchz /file1</command>
  7606. <command>-fs NAMENODE -touchz /file2</command>
  7607. <command>-fs NAMENODE -touchz /file3</command>
  7608. <command>-fs NAMENODE -touchz /file4</command>
  7609. <command>-fs NAMENODE -count -q /file*</command>
  7610. </test-commands>
  7611. <cleanup-commands>
  7612. <command>-fs NAMENODE -rm -r /file*</command>
  7613. </cleanup-commands>
  7614. <comparators>
  7615. <comparator>
  7616. <type>RegexpComparator</type>
  7617. <expected-output>( |\t)*none( |\t)*inf( |\t)*none( |\t)*inf( |\t)*0( |\t)*1( |\t)*0 /file1</expected-output>
  7618. </comparator>
  7619. <comparator>
  7620. <type>RegexpComparator</type>
  7621. <expected-output>( |\t)*none( |\t)*inf( |\t)*none( |\t)*inf( |\t)*0( |\t)*1( |\t)*0 /file2</expected-output>
  7622. </comparator>
  7623. <comparator>
  7624. <type>RegexpComparator</type>
  7625. <expected-output>( |\t)*none( |\t)*inf( |\t)*none( |\t)*inf( |\t)*0( |\t)*1( |\t)*0 /file3</expected-output>
  7626. </comparator>
  7627. <comparator>
  7628. <type>RegexpComparator</type>
  7629. <expected-output>( |\t)*none( |\t)*inf( |\t)*none( |\t)*inf( |\t)*0( |\t)*1( |\t)*0 /file4</expected-output>
  7630. </comparator>
  7631. </comparators>
  7632. </test>
  7633. <test> <!-- TESTED -->
  7634. <description>count: relative path to multiple files using globbing with -q option</description>
  7635. <test-commands>
  7636. <command>-fs NAMENODE -touchz file1</command>
  7637. <command>-fs NAMENODE -touchz file2</command>
  7638. <command>-fs NAMENODE -touchz file3</command>
  7639. <command>-fs NAMENODE -touchz file4</command>
  7640. <command>-fs NAMENODE -count -q file*</command>
  7641. </test-commands>
  7642. <cleanup-commands>
  7643. <command>-fs NAMENODE -rm -r /user</command>
  7644. </cleanup-commands>
  7645. <comparators>
  7646. <comparator>
  7647. <type>RegexpComparator</type>
  7648. <expected-output>( |\t)*none( |\t)*inf( |\t)*none( |\t)*inf( |\t)*0( |\t)*1( |\t)*0 file1</expected-output>
  7649. </comparator>
  7650. <comparator>
  7651. <type>RegexpComparator</type>
  7652. <expected-output>( |\t)*none( |\t)*inf( |\t)*none( |\t)*inf( |\t)*0( |\t)*1( |\t)*0 file2</expected-output>
  7653. </comparator>
  7654. <comparator>
  7655. <type>RegexpComparator</type>
  7656. <expected-output>( |\t)*none( |\t)*inf( |\t)*none( |\t)*inf( |\t)*0( |\t)*1( |\t)*0 file3</expected-output>
  7657. </comparator>
  7658. <comparator>
  7659. <type>RegexpComparator</type>
  7660. <expected-output>( |\t)*none( |\t)*inf( |\t)*none( |\t)*inf( |\t)*0( |\t)*1( |\t)*0 file4</expected-output>
  7661. </comparator>
  7662. </comparators>
  7663. </test>
  7664. <test> <!-- TESTED -->
  7665. <description>count: absolute path to multiple files without globbing with -q option</description>
  7666. <test-commands>
  7667. <command>-fs NAMENODE -touchz /file1</command>
  7668. <command>-fs NAMENODE -touchz /file2</command>
  7669. <command>-fs NAMENODE -touchz /file3</command>
  7670. <command>-fs NAMENODE -touchz /file4</command>
  7671. <command>-fs NAMENODE -count -q /file1 /file2 /file3 /file4</command>
  7672. </test-commands>
  7673. <cleanup-commands>
  7674. <command>-fs NAMENODE -rm -r /file*</command>
  7675. </cleanup-commands>
  7676. <comparators>
  7677. <comparator>
  7678. <type>RegexpComparator</type>
  7679. <expected-output>( |\t)*none( |\t)*inf( |\t)*none( |\t)*inf( |\t)*0( |\t)*1( |\t)*0 /file1</expected-output>
  7680. </comparator>
  7681. <comparator>
  7682. <type>RegexpComparator</type>
  7683. <expected-output>( |\t)*none( |\t)*inf( |\t)*none( |\t)*inf( |\t)*0( |\t)*1( |\t)*0 /file2</expected-output>
  7684. </comparator>
  7685. <comparator>
  7686. <type>RegexpComparator</type>
  7687. <expected-output>( |\t)*none( |\t)*inf( |\t)*none( |\t)*inf( |\t)*0( |\t)*1( |\t)*0 /file3</expected-output>
  7688. </comparator>
  7689. <comparator>
  7690. <type>RegexpComparator</type>
  7691. <expected-output>( |\t)*none( |\t)*inf( |\t)*none( |\t)*inf( |\t)*0( |\t)*1( |\t)*0 /file4</expected-output>
  7692. </comparator>
  7693. </comparators>
  7694. </test>
  7695. <test> <!-- TESTED -->
  7696. <description>count: relative path to multiple files without globbing with -q option</description>
  7697. <test-commands>
  7698. <command>-fs NAMENODE -mkdir -p dir</command> <!-- make sure user home dir exists -->
  7699. <command>-fs NAMENODE -touchz file1</command>
  7700. <command>-fs NAMENODE -touchz file2</command>
  7701. <command>-fs NAMENODE -touchz file3</command>
  7702. <command>-fs NAMENODE -touchz file4</command>
  7703. <command>-fs NAMENODE -count -q file1 file2 file3 file4</command>
  7704. </test-commands>
  7705. <cleanup-commands>
  7706. <command>-fs NAMENODE -rm -r /user</command>
  7707. </cleanup-commands>
  7708. <comparators>
  7709. <comparator>
  7710. <type>RegexpComparator</type>
  7711. <expected-output>( |\t)*none( |\t)*inf( |\t)*none( |\t)*inf( |\t)*0( |\t)*1( |\t)*0 file1</expected-output>
  7712. </comparator>
  7713. <comparator>
  7714. <type>RegexpComparator</type>
  7715. <expected-output>( |\t)*none( |\t)*inf( |\t)*none( |\t)*inf( |\t)*0( |\t)*1( |\t)*0 file2</expected-output>
  7716. </comparator>
  7717. <comparator>
  7718. <type>RegexpComparator</type>
  7719. <expected-output>( |\t)*none( |\t)*inf( |\t)*none( |\t)*inf( |\t)*0( |\t)*1( |\t)*0 file3</expected-output>
  7720. </comparator>
  7721. <comparator>
  7722. <type>RegexpComparator</type>
  7723. <expected-output>( |\t)*none( |\t)*inf( |\t)*none( |\t)*inf( |\t)*0( |\t)*1( |\t)*0 file4</expected-output>
  7724. </comparator>
  7725. </comparators>
  7726. </test>
  7727. <test> <!-- TESTED -->
  7728. <description>count: absolute path to multiple directories using globbing with -q option</description>
  7729. <test-commands>
  7730. <command>-fs NAMENODE -mkdir /dir1</command>
  7731. <command>-fs NAMENODE -mkdir /dir2</command>
  7732. <command>-fs NAMENODE -mkdir /dir3</command>
  7733. <command>-fs NAMENODE -mkdir /dir4</command>
  7734. <dfs-admin-command>-fs NAMENODE -setQuota 10 /dir1 </dfs-admin-command>
  7735. <dfs-admin-command>-fs NAMENODE -setSpaceQuota 1m /dir1 </dfs-admin-command>
  7736. <dfs-admin-command>-fs NAMENODE -setQuota 10 /dir2 </dfs-admin-command>
  7737. <dfs-admin-command>-fs NAMENODE -setSpaceQuota 1m /dir2 </dfs-admin-command>
  7738. <dfs-admin-command>-fs NAMENODE -setQuota 10 /dir3 </dfs-admin-command>
  7739. <dfs-admin-command>-fs NAMENODE -setSpaceQuota 1m /dir3 </dfs-admin-command>
  7740. <dfs-admin-command>-fs NAMENODE -setQuota 10 /dir4 </dfs-admin-command>
  7741. <dfs-admin-command>-fs NAMENODE -setSpaceQuota 1m /dir4 </dfs-admin-command>
  7742. <command>-fs NAMENODE -count -q /dir* </command>
  7743. </test-commands>
  7744. <cleanup-commands>
  7745. <command>-fs NAMENODE -rm -r /dir*</command>
  7746. </cleanup-commands>
  7747. <comparators>
  7748. <comparator>
  7749. <type>RegexpComparator</type>
  7750. <expected-output>( |\t)*10( |\t)*9( |\t)*1048576( |\t)*1048576( |\t)*1( |\t)*0( |\t)*0 /dir1</expected-output>
  7751. </comparator>
  7752. <comparator>
  7753. <type>RegexpComparator</type>
  7754. <expected-output>( |\t)*10( |\t)*9( |\t)*1048576( |\t)*1048576( |\t)*1( |\t)*0( |\t)*0 /dir2</expected-output>
  7755. </comparator>
  7756. <comparator>
  7757. <type>RegexpComparator</type>
  7758. <expected-output>( |\t)*10( |\t)*9( |\t)*1048576( |\t)*1048576( |\t)*1( |\t)*0( |\t)*0 /dir3</expected-output>
  7759. </comparator>
  7760. <comparator>
  7761. <type>RegexpComparator</type>
  7762. <expected-output>( |\t)*10( |\t)*9( |\t)*1048576( |\t)*1048576( |\t)*1( |\t)*0( |\t)*0 /dir4</expected-output>
  7763. </comparator>
  7764. </comparators>
  7765. </test>
  7766. <test> <!-- TESTED -->
  7767. <description>count: relative path to multiple directories using globbing with -q option</description>
  7768. <test-commands>
  7769. <command>-fs NAMENODE -mkdir -p dir1</command>
  7770. <command>-fs NAMENODE -mkdir -p dir2</command>
  7771. <command>-fs NAMENODE -mkdir -p dir3</command>
  7772. <command>-fs NAMENODE -mkdir -p dir4</command>
  7773. <dfs-admin-command>-fs NAMENODE -setQuota 10 dir1 </dfs-admin-command>
  7774. <dfs-admin-command>-fs NAMENODE -setSpaceQuota 1m dir1 </dfs-admin-command>
  7775. <dfs-admin-command>-fs NAMENODE -setQuota 10 dir2 </dfs-admin-command>
  7776. <dfs-admin-command>-fs NAMENODE -setSpaceQuota 1m dir2 </dfs-admin-command>
  7777. <dfs-admin-command>-fs NAMENODE -setQuota 10 dir3 </dfs-admin-command>
  7778. <dfs-admin-command>-fs NAMENODE -setSpaceQuota 1m dir3 </dfs-admin-command>
  7779. <dfs-admin-command>-fs NAMENODE -setQuota 10 dir4 </dfs-admin-command>
  7780. <dfs-admin-command>-fs NAMENODE -setSpaceQuota 1m dir4 </dfs-admin-command>
  7781. <command>-fs NAMENODE -count -q dir* </command>
  7782. </test-commands>
  7783. <cleanup-commands>
  7784. <command>-fs NAMENODE -rm -r /user</command>
  7785. </cleanup-commands>
  7786. <comparators>
  7787. <comparator>
  7788. <type>RegexpComparator</type>
  7789. <expected-output>( |\t)*10( |\t)*9( |\t)*1048576( |\t)*1048576( |\t)*1( |\t)*0( |\t)*0 dir1</expected-output>
  7790. </comparator>
  7791. <comparator>
  7792. <type>RegexpComparator</type>
  7793. <expected-output>( |\t)*10( |\t)*9( |\t)*1048576( |\t)*1048576( |\t)*1( |\t)*0( |\t)*0 dir2</expected-output>
  7794. </comparator>
  7795. <comparator>
  7796. <type>RegexpComparator</type>
  7797. <expected-output>( |\t)*10( |\t)*9( |\t)*1048576( |\t)*1048576( |\t)*1( |\t)*0( |\t)*0 dir3</expected-output>
  7798. </comparator>
  7799. <comparator>
  7800. <type>RegexpComparator</type>
  7801. <expected-output>( |\t)*10( |\t)*9( |\t)*1048576( |\t)*1048576( |\t)*1( |\t)*0( |\t)*0 dir4</expected-output>
  7802. </comparator>
  7803. </comparators>
  7804. </test>
  7805. <test> <!-- TESTED -->
  7806. <description>count: absolute path to multiple directories without globbing with -q option</description>
  7807. <test-commands>
  7808. <command>-fs NAMENODE -mkdir /dir1</command>
  7809. <command>-fs NAMENODE -mkdir /dir2</command>
  7810. <command>-fs NAMENODE -mkdir /dir3</command>
  7811. <command>-fs NAMENODE -mkdir /dir4</command>
  7812. <dfs-admin-command>-fs NAMENODE -setQuota 10 /dir1 </dfs-admin-command>
  7813. <dfs-admin-command>-fs NAMENODE -setSpaceQuota 1m /dir1 </dfs-admin-command>
  7814. <dfs-admin-command>-fs NAMENODE -setQuota 10 /dir2 </dfs-admin-command>
  7815. <dfs-admin-command>-fs NAMENODE -setSpaceQuota 1m /dir2 </dfs-admin-command>
  7816. <dfs-admin-command>-fs NAMENODE -setQuota 10 /dir3 </dfs-admin-command>
  7817. <dfs-admin-command>-fs NAMENODE -setSpaceQuota 1m /dir3 </dfs-admin-command>
  7818. <dfs-admin-command>-fs NAMENODE -setQuota 10 /dir4 </dfs-admin-command>
  7819. <dfs-admin-command>-fs NAMENODE -setSpaceQuota 1m /dir4 </dfs-admin-command>
  7820. <command>-fs NAMENODE -count -q /dir1 /dir2 /dir3 /dir4 </command>
  7821. </test-commands>
  7822. <cleanup-commands>
  7823. <command>-fs NAMENODE -rm -r /dir*</command>
  7824. </cleanup-commands>
  7825. <comparators>
  7826. <comparator>
  7827. <type>RegexpComparator</type>
  7828. <expected-output>( |\t)*10( |\t)*9( |\t)*1048576( |\t)*1048576( |\t)*1( |\t)*0( |\t)*0 /dir1</expected-output>
  7829. </comparator>
  7830. <comparator>
  7831. <type>RegexpComparator</type>
  7832. <expected-output>( |\t)*10( |\t)*9( |\t)*1048576( |\t)*1048576( |\t)*1( |\t)*0( |\t)*0 /dir2</expected-output>
  7833. </comparator>
  7834. <comparator>
  7835. <type>RegexpComparator</type>
  7836. <expected-output>( |\t)*10( |\t)*9( |\t)*1048576( |\t)*1048576( |\t)*1( |\t)*0( |\t)*0 /dir3</expected-output>
  7837. </comparator>
  7838. <comparator>
  7839. <type>RegexpComparator</type>
  7840. <expected-output>( |\t)*10( |\t)*9( |\t)*1048576( |\t)*1048576( |\t)*1( |\t)*0( |\t)*0 /dir4</expected-output>
  7841. </comparator>
  7842. </comparators>
  7843. </test>
  7844. <test> <!-- TESTED -->
  7845. <description>count: relative path to multiple directories without globbing with -q option</description>
  7846. <test-commands>
  7847. <command>-fs NAMENODE -mkdir -p dir1</command>
  7848. <command>-fs NAMENODE -mkdir -p dir2</command>
  7849. <command>-fs NAMENODE -mkdir -p dir3</command>
  7850. <command>-fs NAMENODE -mkdir -p dir4</command>
  7851. <dfs-admin-command>-fs NAMENODE -setQuota 10 dir1 </dfs-admin-command>
  7852. <dfs-admin-command>-fs NAMENODE -setSpaceQuota 1m dir1 </dfs-admin-command>
  7853. <dfs-admin-command>-fs NAMENODE -setQuota 10 dir2 </dfs-admin-command>
  7854. <dfs-admin-command>-fs NAMENODE -setSpaceQuota 1m dir2 </dfs-admin-command>
  7855. <dfs-admin-command>-fs NAMENODE -setQuota 10 dir3 </dfs-admin-command>
  7856. <dfs-admin-command>-fs NAMENODE -setSpaceQuota 1m dir3 </dfs-admin-command>
  7857. <dfs-admin-command>-fs NAMENODE -setQuota 10 dir4 </dfs-admin-command>
  7858. <dfs-admin-command>-fs NAMENODE -setSpaceQuota 1m dir4 </dfs-admin-command>
  7859. <command>-fs NAMENODE -count -q dir1 dir2 dir3 dir4 </command>
  7860. </test-commands>
  7861. <cleanup-commands>
  7862. <command>-fs NAMENODE -rm -r /user</command>
  7863. </cleanup-commands>
  7864. <comparators>
  7865. <comparator>
  7866. <type>RegexpComparator</type>
  7867. <expected-output>( |\t)*10( |\t)*9( |\t)*1048576( |\t)*1048576( |\t)*1( |\t)*0( |\t)*0 dir1</expected-output>
  7868. </comparator>
  7869. <comparator>
  7870. <type>RegexpComparator</type>
  7871. <expected-output>( |\t)*10( |\t)*9( |\t)*1048576( |\t)*1048576( |\t)*1( |\t)*0( |\t)*0 dir2</expected-output>
  7872. </comparator>
  7873. <comparator>
  7874. <type>RegexpComparator</type>
  7875. <expected-output>( |\t)*10( |\t)*9( |\t)*1048576( |\t)*1048576( |\t)*1( |\t)*0( |\t)*0 dir3</expected-output>
  7876. </comparator>
  7877. <comparator>
  7878. <type>RegexpComparator</type>
  7879. <expected-output>( |\t)*10( |\t)*9( |\t)*1048576( |\t)*1048576( |\t)*1( |\t)*0( |\t)*0 dir4</expected-output>
  7880. </comparator>
  7881. </comparators>
  7882. </test>
  7883. <test> <!-- TESTED -->
  7884. <description>count: Test for file using hdfs:// path</description>
  7885. <test-commands>
  7886. <command>-fs NAMENODE -touchz hdfs:///file1</command>
  7887. <command>-fs NAMENODE -count hdfs:///file1</command>
  7888. </test-commands>
  7889. <cleanup-commands>
  7890. <command>-fs NAMENODE -rm hdfs:///file1</command>
  7891. </cleanup-commands>
  7892. <comparators>
  7893. <comparator>
  7894. <type>RegexpComparator</type>
  7895. <expected-output>( |\t)*0( |\t)*1( |\t)*0 hdfs:///file1</expected-output>
  7896. </comparator>
  7897. </comparators>
  7898. </test>
  7899. <test> <!-- TESTED -->
  7900. <description>count: Test for directory using hdfs:// path</description>
  7901. <test-commands>
  7902. <command>-fs NAMENODE -mkdir hdfs:///dir1</command>
  7903. <command>-fs NAMENODE -count hdfs:///dir1</command>
  7904. </test-commands>
  7905. <cleanup-commands>
  7906. <command>-fs NAMENODE -rm -r hdfs:///dir1</command>
  7907. </cleanup-commands>
  7908. <comparators>
  7909. <comparator>
  7910. <type>RegexpComparator</type>
  7911. <expected-output>( |\t)*1( |\t)*0( |\t)*0 hdfs:///dir1</expected-output>
  7912. </comparator>
  7913. </comparators>
  7914. </test>
  7915. <test> <!-- TESTED -->
  7916. <description>count: Test for hdfs:// path - file/directory that does not exist</description>
  7917. <test-commands>
  7918. <command>-fs NAMENODE -count hdfs:///file1 </command>
  7919. </test-commands>
  7920. <cleanup-commands>
  7921. </cleanup-commands>
  7922. <comparators>
  7923. <comparator>
  7924. <type>TokenComparator</type>
  7925. <expected-output>count: `hdfs:///file1': No such file or directory</expected-output>
  7926. </comparator>
  7927. </comparators>
  7928. </test>
  7929. <test> <!-- TESTED -->
  7930. <description>count: Test for hdfs:// path - multiple files using globbing</description>
  7931. <test-commands>
  7932. <command>-fs NAMENODE -touchz hdfs:///file1</command>
  7933. <command>-fs NAMENODE -touchz hdfs:///file2</command>
  7934. <command>-fs NAMENODE -touchz hdfs:///file3</command>
  7935. <command>-fs NAMENODE -touchz hdfs:///file4</command>
  7936. <command>-fs NAMENODE -count hdfs:///file*</command>
  7937. </test-commands>
  7938. <cleanup-commands>
  7939. <command>-fs NAMENODE -rm -r hdfs:///file*</command>
  7940. </cleanup-commands>
  7941. <comparators>
  7942. <comparator>
  7943. <type>RegexpComparator</type>
  7944. <expected-output>( |\t)*0( |\t)*1( |\t)*0 hdfs:///file1</expected-output>
  7945. </comparator>
  7946. <comparator>
  7947. <type>RegexpComparator</type>
  7948. <expected-output>( |\t)*0( |\t)*1( |\t)*0 hdfs:///file2</expected-output>
  7949. </comparator>
  7950. <comparator>
  7951. <type>RegexpComparator</type>
  7952. <expected-output>( |\t)*0( |\t)*1( |\t)*0 hdfs:///file3</expected-output>
  7953. </comparator>
  7954. <comparator>
  7955. <type>RegexpComparator</type>
  7956. <expected-output>( |\t)*0( |\t)*1( |\t)*0 hdfs:///file4</expected-output>
  7957. </comparator>
  7958. </comparators>
  7959. </test>
  7960. <test> <!-- TESTED -->
  7961. <description>count: Test for hdfs:// path - multiple files without globbing</description>
  7962. <test-commands>
  7963. <command>-fs NAMENODE -touchz hdfs:///file1</command>
  7964. <command>-fs NAMENODE -touchz hdfs:///file2</command>
  7965. <command>-fs NAMENODE -touchz hdfs:///file3</command>
  7966. <command>-fs NAMENODE -touchz hdfs:///file4</command>
  7967. <command>-fs NAMENODE -count hdfs:///file1 hdfs:///file2 hdfs:///file3 hdfs:///file4</command>
  7968. </test-commands>
  7969. <cleanup-commands>
  7970. <command>-fs NAMENODE -rm -r hdfs:///file*</command>
  7971. </cleanup-commands>
  7972. <comparators>
  7973. <comparator>
  7974. <type>RegexpComparator</type>
  7975. <expected-output>( |\t)*0( |\t)*1( |\t)*0 hdfs:///file1</expected-output>
  7976. </comparator>
  7977. <comparator>
  7978. <type>RegexpComparator</type>
  7979. <expected-output>( |\t)*0( |\t)*1( |\t)*0 hdfs:///file2</expected-output>
  7980. </comparator>
  7981. <comparator>
  7982. <type>RegexpComparator</type>
  7983. <expected-output>( |\t)*0( |\t)*1( |\t)*0 hdfs:///file3</expected-output>
  7984. </comparator>
  7985. <comparator>
  7986. <type>RegexpComparator</type>
  7987. <expected-output>( |\t)*0( |\t)*1( |\t)*0 hdfs:///file4</expected-output>
  7988. </comparator>
  7989. </comparators>
  7990. </test>
  7991. <test> <!-- TESTED -->
  7992. <description>count: Test for hdfs:// path - multiple directories using globbing</description>
  7993. <test-commands>
  7994. <command>-fs NAMENODE -mkdir hdfs:///dir1</command>
  7995. <command>-fs NAMENODE -mkdir hdfs:///dir2</command>
  7996. <command>-fs NAMENODE -mkdir hdfs:///dir3</command>
  7997. <command>-fs NAMENODE -mkdir hdfs:///dir4</command>
  7998. <command>-fs NAMENODE -count hdfs:///dir* </command>
  7999. </test-commands>
  8000. <cleanup-commands>
  8001. <command>-fs NAMENODE -rm -r hdfs:///dir*</command>
  8002. </cleanup-commands>
  8003. <comparators>
  8004. <comparator>
  8005. <type>RegexpComparator</type>
  8006. <expected-output>( |\t)*1( |\t)*0( |\t)*0 hdfs:///dir1</expected-output>
  8007. </comparator>
  8008. <comparator>
  8009. <type>RegexpComparator</type>
  8010. <expected-output>( |\t)*1( |\t)*0( |\t)*0 hdfs:///dir2</expected-output>
  8011. </comparator>
  8012. <comparator>
  8013. <type>RegexpComparator</type>
  8014. <expected-output>( |\t)*1( |\t)*0( |\t)*0 hdfs:///dir3</expected-output>
  8015. </comparator>
  8016. <comparator>
  8017. <type>RegexpComparator</type>
  8018. <expected-output>( |\t)*1( |\t)*0( |\t)*0 hdfs:///dir4</expected-output>
  8019. </comparator>
  8020. </comparators>
  8021. </test>
  8022. <test> <!-- TESTED -->
  8023. <description>count: Test for hdfs:// path - multiple directories without globbing</description>
  8024. <test-commands>
  8025. <command>-fs NAMENODE -mkdir hdfs:///dir1</command>
  8026. <command>-fs NAMENODE -mkdir hdfs:///dir2</command>
  8027. <command>-fs NAMENODE -mkdir hdfs:///dir3</command>
  8028. <command>-fs NAMENODE -mkdir hdfs:///dir4</command>
  8029. <command>-fs NAMENODE -count hdfs:///dir1 hdfs:///dir2 hdfs:///dir3 hdfs:///dir4 </command>
  8030. </test-commands>
  8031. <cleanup-commands>
  8032. <command>-fs NAMENODE -rm -r hdfs:///dir*</command>
  8033. </cleanup-commands>
  8034. <comparators>
  8035. <comparator>
  8036. <type>RegexpComparator</type>
  8037. <expected-output>( |\t)*1( |\t)*0( |\t)*0 hdfs:///dir1</expected-output>
  8038. </comparator>
  8039. <comparator>
  8040. <type>RegexpComparator</type>
  8041. <expected-output>( |\t)*1( |\t)*0( |\t)*0 hdfs:///dir2</expected-output>
  8042. </comparator>
  8043. <comparator>
  8044. <type>RegexpComparator</type>
  8045. <expected-output>( |\t)*1( |\t)*0( |\t)*0 hdfs:///dir3</expected-output>
  8046. </comparator>
  8047. <comparator>
  8048. <type>RegexpComparator</type>
  8049. <expected-output>( |\t)*1( |\t)*0( |\t)*0 hdfs:///dir4</expected-output>
  8050. </comparator>
  8051. </comparators>
  8052. </test>
  8053. <test> <!-- TESTED -->
  8054. <description>count: Test for file using hdfs:// path with -q option</description>
  8055. <test-commands>
  8056. <command>-fs NAMENODE -touchz hdfs:///file1</command>
  8057. <command>-fs NAMENODE -count -q hdfs:///file1</command>
  8058. </test-commands>
  8059. <cleanup-commands>
  8060. <command>-fs NAMENODE -rm hdfs:///file1</command>
  8061. </cleanup-commands>
  8062. <comparators>
  8063. <comparator>
  8064. <type>RegexpComparator</type>
  8065. <expected-output>( |\t)*none( |\t)*inf( |\t)*none( |\t)*inf( |\t)*0( |\t)*1( |\t)*0 hdfs:///file1</expected-output>
  8066. </comparator>
  8067. </comparators>
  8068. </test>
  8069. <test> <!-- TESTED -->
  8070. <description>count: Test for directory using hdfs:// path with -q option</description>
  8071. <test-commands>
  8072. <command>-fs NAMENODE -mkdir hdfs:///dir1</command>
  8073. <dfs-admin-command>-fs NAMENODE -setQuota 10 hdfs:///dir1 </dfs-admin-command>
  8074. <dfs-admin-command>-fs NAMENODE -setSpaceQuota 1m hdfs:///dir1 </dfs-admin-command>
  8075. <command>-fs NAMENODE -count -q hdfs:///dir1</command>
  8076. </test-commands>
  8077. <cleanup-commands>
  8078. <command>-fs NAMENODE -rm -r hdfs:///dir1</command>
  8079. </cleanup-commands>
  8080. <comparators>
  8081. <comparator>
  8082. <type>RegexpComparator</type>
  8083. <expected-output>( |\t)*10( |\t)*9( |\t)*1048576( |\t)*1048576( |\t)*1( |\t)*0( |\t)*0 hdfs:///dir1</expected-output>
  8084. </comparator>
  8085. </comparators>
  8086. </test>
  8087. <test> <!-- TESTED -->
  8088. <description>count: Test for hdfs:// path - file/directory that does not exist with -q option</description>
  8089. <test-commands>
  8090. <command>-fs NAMENODE -count -q hdfs:///file1 </command>
  8091. </test-commands>
  8092. <cleanup-commands>
  8093. </cleanup-commands>
  8094. <comparators>
  8095. <comparator>
  8096. <type>TokenComparator</type>
  8097. <expected-output>count: `hdfs:///file1': No such file or directory</expected-output>
  8098. </comparator>
  8099. </comparators>
  8100. </test>
  8101. <test> <!-- TESTED -->
  8102. <description>count: Test for hdfs:// path - multiple files using globbing with -q option</description>
  8103. <test-commands>
  8104. <command>-fs NAMENODE -touchz hdfs:///file1</command>
  8105. <command>-fs NAMENODE -touchz hdfs:///file2</command>
  8106. <command>-fs NAMENODE -touchz hdfs:///file3</command>
  8107. <command>-fs NAMENODE -touchz hdfs:///file4</command>
  8108. <command>-fs NAMENODE -count -q hdfs:///file*</command>
  8109. </test-commands>
  8110. <cleanup-commands>
  8111. <command>-fs NAMENODE -rm -r hdfs:///file*</command>
  8112. </cleanup-commands>
  8113. <comparators>
  8114. <comparator>
  8115. <type>RegexpComparator</type>
  8116. <expected-output>( |\t)*none( |\t)*inf( |\t)*none( |\t)*inf( |\t)*0( |\t)*1( |\t)*0 hdfs:///file1</expected-output>
  8117. </comparator>
  8118. <comparator>
  8119. <type>RegexpComparator</type>
  8120. <expected-output>( |\t)*none( |\t)*inf( |\t)*none( |\t)*inf( |\t)*0( |\t)*1( |\t)*0 hdfs:///file2</expected-output>
  8121. </comparator>
  8122. <comparator>
  8123. <type>RegexpComparator</type>
  8124. <expected-output>( |\t)*none( |\t)*inf( |\t)*none( |\t)*inf( |\t)*0( |\t)*1( |\t)*0 hdfs:///file3</expected-output>
  8125. </comparator>
  8126. <comparator>
  8127. <type>RegexpComparator</type>
  8128. <expected-output>( |\t)*none( |\t)*inf( |\t)*none( |\t)*inf( |\t)*0( |\t)*1( |\t)*0 hdfs:///file4</expected-output>
  8129. </comparator>
  8130. </comparators>
  8131. </test>
  8132. <test> <!-- TESTED -->
  8133. <description>count: Test for hdfs:// path - multiple files without globbing with -q option</description>
  8134. <test-commands>
  8135. <command>-fs NAMENODE -touchz hdfs:///file1</command>
  8136. <command>-fs NAMENODE -touchz hdfs:///file2</command>
  8137. <command>-fs NAMENODE -touchz hdfs:///file3</command>
  8138. <command>-fs NAMENODE -touchz hdfs:///file4</command>
  8139. <command>-fs NAMENODE -count -q hdfs:///file1 hdfs:///file2 hdfs:///file3 hdfs:///file4</command>
  8140. </test-commands>
  8141. <cleanup-commands>
  8142. <command>-fs NAMENODE -rm -r hdfs:///file*</command>
  8143. </cleanup-commands>
  8144. <comparators>
  8145. <comparator>
  8146. <type>RegexpComparator</type>
  8147. <expected-output>( |\t)*none( |\t)*inf( |\t)*none( |\t)*inf( |\t)*0( |\t)*1( |\t)*0 hdfs:///file1</expected-output>
  8148. </comparator>
  8149. <comparator>
  8150. <type>RegexpComparator</type>
  8151. <expected-output>( |\t)*none( |\t)*inf( |\t)*none( |\t)*inf( |\t)*0( |\t)*1( |\t)*0 hdfs:///file2</expected-output>
  8152. </comparator>
  8153. <comparator>
  8154. <type>RegexpComparator</type>
  8155. <expected-output>( |\t)*none( |\t)*inf( |\t)*none( |\t)*inf( |\t)*0( |\t)*1( |\t)*0 hdfs:///file3</expected-output>
  8156. </comparator>
  8157. <comparator>
  8158. <type>RegexpComparator</type>
  8159. <expected-output>( |\t)*none( |\t)*inf( |\t)*none( |\t)*inf( |\t)*0( |\t)*1( |\t)*0 hdfs:///file4</expected-output>
  8160. </comparator>
  8161. </comparators>
  8162. </test>
  8163. <test> <!-- TESTED -->
  8164. <description>count: Test for hdfs:// path - multiple directories using globbing with -q option</description>
  8165. <test-commands>
  8166. <command>-fs NAMENODE -mkdir hdfs:///dir1</command>
  8167. <command>-fs NAMENODE -mkdir hdfs:///dir2</command>
  8168. <command>-fs NAMENODE -mkdir hdfs:///dir3</command>
  8169. <command>-fs NAMENODE -mkdir hdfs:///dir4</command>
  8170. <dfs-admin-command>-fs NAMENODE -setQuota 10 hdfs:///dir1 </dfs-admin-command>
  8171. <dfs-admin-command>-fs NAMENODE -setSpaceQuota 1m hdfs:///dir1 </dfs-admin-command>
  8172. <dfs-admin-command>-fs NAMENODE -setQuota 10 hdfs:///dir2 </dfs-admin-command>
  8173. <dfs-admin-command>-fs NAMENODE -setSpaceQuota 1m hdfs:///dir2 </dfs-admin-command>
  8174. <dfs-admin-command>-fs NAMENODE -setQuota 10 hdfs:///dir3 </dfs-admin-command>
  8175. <dfs-admin-command>-fs NAMENODE -setSpaceQuota 1m hdfs:///dir3 </dfs-admin-command>
  8176. <dfs-admin-command>-fs NAMENODE -setQuota 10 hdfs:///dir4 </dfs-admin-command>
  8177. <dfs-admin-command>-fs NAMENODE -setSpaceQuota 1m hdfs:///dir4 </dfs-admin-command>
  8178. <command>-fs NAMENODE -count -q hdfs:///dir* </command>
  8179. </test-commands>
  8180. <cleanup-commands>
  8181. <command>-fs NAMENODE -rm -r hdfs:///dir*</command>
  8182. </cleanup-commands>
  8183. <comparators>
  8184. <comparator>
  8185. <type>RegexpComparator</type>
  8186. <expected-output>( |\t)*10( |\t)*9( |\t)*1048576( |\t)*1048576( |\t)*1( |\t)*0( |\t)*0 hdfs:///dir1</expected-output>
  8187. </comparator>
  8188. <comparator>
  8189. <type>RegexpComparator</type>
  8190. <expected-output>( |\t)*10( |\t)*9( |\t)*1048576( |\t)*1048576( |\t)*1( |\t)*0( |\t)*0 hdfs:///dir2</expected-output>
  8191. </comparator>
  8192. <comparator>
  8193. <type>RegexpComparator</type>
  8194. <expected-output>( |\t)*10( |\t)*9( |\t)*1048576( |\t)*1048576( |\t)*1( |\t)*0( |\t)*0 hdfs:///dir3</expected-output>
  8195. </comparator>
  8196. <comparator>
  8197. <type>RegexpComparator</type>
  8198. <expected-output>( |\t)*10( |\t)*9( |\t)*1048576( |\t)*1048576( |\t)*1( |\t)*0( |\t)*0 hdfs:///dir4</expected-output>
  8199. </comparator>
  8200. </comparators>
  8201. </test>
  8202. <test> <!-- TESTED -->
  8203. <description>count: Test for hdfs:// path - multiple directories without globbing with -q option</description>
  8204. <test-commands>
  8205. <command>-fs NAMENODE -mkdir hdfs:///dir1</command>
  8206. <command>-fs NAMENODE -mkdir hdfs:///dir2</command>
  8207. <command>-fs NAMENODE -mkdir hdfs:///dir3</command>
  8208. <command>-fs NAMENODE -mkdir hdfs:///dir4</command>
  8209. <dfs-admin-command>-fs NAMENODE -setQuota 10 hdfs:///dir1 </dfs-admin-command>
  8210. <dfs-admin-command>-fs NAMENODE -setSpaceQuota 1m hdfs:///dir1 </dfs-admin-command>
  8211. <dfs-admin-command>-fs NAMENODE -setQuota 10 hdfs:///dir2 </dfs-admin-command>
  8212. <dfs-admin-command>-fs NAMENODE -setSpaceQuota 1m hdfs:///dir2 </dfs-admin-command>
  8213. <dfs-admin-command>-fs NAMENODE -setQuota 10 hdfs:///dir3 </dfs-admin-command>
  8214. <dfs-admin-command>-fs NAMENODE -setSpaceQuota 1m hdfs:///dir3 </dfs-admin-command>
  8215. <dfs-admin-command>-fs NAMENODE -setQuota 10 hdfs:///dir4 </dfs-admin-command>
  8216. <dfs-admin-command>-fs NAMENODE -setSpaceQuota 1m hdfs:///dir4 </dfs-admin-command>
  8217. <command>-fs NAMENODE -count -q hdfs:///dir1 hdfs:///dir2 hdfs:///dir3 hdfs:///dir4 </command>
  8218. </test-commands>
  8219. <cleanup-commands>
  8220. <command>-fs NAMENODE -rm -r /dir*</command>
  8221. </cleanup-commands>
  8222. <comparators>
  8223. <comparator>
  8224. <type>RegexpComparator</type>
  8225. <expected-output>( |\t)*10( |\t)*9( |\t)*1048576( |\t)*1048576( |\t)*1( |\t)*0( |\t)*0 hdfs:///dir1</expected-output>
  8226. </comparator>
  8227. <comparator>
  8228. <type>RegexpComparator</type>
  8229. <expected-output>( |\t)*10( |\t)*9( |\t)*1048576( |\t)*1048576( |\t)*1( |\t)*0( |\t)*0 hdfs:///dir2</expected-output>
  8230. </comparator>
  8231. <comparator>
  8232. <type>RegexpComparator</type>
  8233. <expected-output>( |\t)*10( |\t)*9( |\t)*1048576( |\t)*1048576( |\t)*1( |\t)*0( |\t)*0 hdfs:///dir3</expected-output>
  8234. </comparator>
  8235. <comparator>
  8236. <type>RegexpComparator</type>
  8237. <expected-output>( |\t)*10( |\t)*9( |\t)*1048576( |\t)*1048576( |\t)*1( |\t)*0( |\t)*0 hdfs:///dir4</expected-output>
  8238. </comparator>
  8239. </comparators>
  8240. </test>
  8241. <test> <!-- TESTED -->
  8242. <description>count: Test for file using Namenode's path</description>
  8243. <test-commands>
  8244. <command>-fs NAMENODE -touchz NAMENODE/file1</command>
  8245. <command>-fs NAMENODE -count NAMENODE/file1</command>
  8246. </test-commands>
  8247. <cleanup-commands>
  8248. <command>-fs NAMENODE -rm NAMENODE/file1</command>
  8249. </cleanup-commands>
  8250. <comparators>
  8251. <comparator>
  8252. <type>RegexpComparator</type>
  8253. <expected-output>( |\t)*0( |\t)*1( |\t)*0 NAMENODE/file1</expected-output>
  8254. </comparator>
  8255. </comparators>
  8256. </test>
  8257. <test> <!-- TESTED -->
  8258. <description>count: Test for directory using Namenode's path</description>
  8259. <test-commands>
  8260. <command>-fs NAMENODE -mkdir NAMENODE/dir1</command>
  8261. <command>-fs NAMENODE -count NAMENODE/dir1</command>
  8262. </test-commands>
  8263. <cleanup-commands>
  8264. <command>-fs NAMENODE -rm -r NAMENODE/dir1</command>
  8265. </cleanup-commands>
  8266. <comparators>
  8267. <comparator>
  8268. <type>RegexpComparator</type>
  8269. <expected-output>( |\t)*1( |\t)*0( |\t)*0 NAMENODE/dir1</expected-output>
  8270. </comparator>
  8271. </comparators>
  8272. </test>
  8273. <test> <!-- TESTED -->
  8274. <description>count: Test for Namenode's path - file/directory that does not exist</description>
  8275. <test-commands>
  8276. <command>-fs NAMENODE -count NAMENODE/file1 </command>
  8277. </test-commands>
  8278. <cleanup-commands>
  8279. </cleanup-commands>
  8280. <comparators>
  8281. <comparator>
  8282. <type>RegexpComparator</type>
  8283. <expected-output>count: `NAMENODE/file1': No such file or directory</expected-output>
  8284. </comparator>
  8285. </comparators>
  8286. </test>
  8287. <test> <!-- TESTED -->
  8288. <description>count: Test for Namenode's path - multiple files using globbing</description>
  8289. <test-commands>
  8290. <command>-fs NAMENODE -touchz NAMENODE/file1</command>
  8291. <command>-fs NAMENODE -touchz NAMENODE/file2</command>
  8292. <command>-fs NAMENODE -touchz NAMENODE/file3</command>
  8293. <command>-fs NAMENODE -touchz NAMENODE/file4</command>
  8294. <command>-fs NAMENODE -count NAMENODE/file*</command>
  8295. </test-commands>
  8296. <cleanup-commands>
  8297. <command>-fs NAMENODE -rm -r NAMENODE/file*</command>
  8298. </cleanup-commands>
  8299. <comparators>
  8300. <comparator>
  8301. <type>RegexpComparator</type>
  8302. <expected-output>( |\t)*0( |\t)*1( |\t)*0 NAMENODE/file1</expected-output>
  8303. </comparator>
  8304. <comparator>
  8305. <type>RegexpComparator</type>
  8306. <expected-output>( |\t)*0( |\t)*1( |\t)*0 NAMENODE/file2</expected-output>
  8307. </comparator>
  8308. <comparator>
  8309. <type>RegexpComparator</type>
  8310. <expected-output>( |\t)*0( |\t)*1( |\t)*0 NAMENODE/file3</expected-output>
  8311. </comparator>
  8312. <comparator>
  8313. <type>RegexpComparator</type>
  8314. <expected-output>( |\t)*0( |\t)*1( |\t)*0 NAMENODE/file4</expected-output>
  8315. </comparator>
  8316. </comparators>
  8317. </test>
  8318. <test> <!-- TESTED -->
  8319. <description>count: Test for Namenode's path - multiple files without globbing</description>
  8320. <test-commands>
  8321. <command>-fs NAMENODE -touchz NAMENODE/file1</command>
  8322. <command>-fs NAMENODE -touchz NAMENODE/file2</command>
  8323. <command>-fs NAMENODE -touchz NAMENODE/file3</command>
  8324. <command>-fs NAMENODE -touchz NAMENODE/file4</command>
  8325. <command>-fs NAMENODE -count NAMENODE/file1 NAMENODE/file2 NAMENODE/file3 NAMENODE/file4</command>
  8326. </test-commands>
  8327. <cleanup-commands>
  8328. <command>-fs NAMENODE -rm -r NAMENODE/file*</command>
  8329. </cleanup-commands>
  8330. <comparators>
  8331. <comparator>
  8332. <type>RegexpComparator</type>
  8333. <expected-output>( |\t)*0( |\t)*1( |\t)*0 NAMENODE/file1</expected-output>
  8334. </comparator>
  8335. <comparator>
  8336. <type>RegexpComparator</type>
  8337. <expected-output>( |\t)*0( |\t)*1( |\t)*0 NAMENODE/file2</expected-output>
  8338. </comparator>
  8339. <comparator>
  8340. <type>RegexpComparator</type>
  8341. <expected-output>( |\t)*0( |\t)*1( |\t)*0 NAMENODE/file3</expected-output>
  8342. </comparator>
  8343. <comparator>
  8344. <type>RegexpComparator</type>
  8345. <expected-output>( |\t)*0( |\t)*1( |\t)*0 NAMENODE/file4</expected-output>
  8346. </comparator>
  8347. </comparators>
  8348. </test>
  8349. <test> <!-- TESTED -->
  8350. <description>count: Test for Namenode's path - multiple directories using globbing</description>
  8351. <test-commands>
  8352. <command>-fs NAMENODE -mkdir NAMENODE/dir1</command>
  8353. <command>-fs NAMENODE -mkdir NAMENODE/dir2</command>
  8354. <command>-fs NAMENODE -mkdir NAMENODE/dir3</command>
  8355. <command>-fs NAMENODE -mkdir NAMENODE/dir4</command>
  8356. <command>-fs NAMENODE -count NAMENODE/dir* </command>
  8357. </test-commands>
  8358. <cleanup-commands>
  8359. <command>-fs NAMENODE -rm -r NAMENODE/dir*</command>
  8360. </cleanup-commands>
  8361. <comparators>
  8362. <comparator>
  8363. <type>RegexpComparator</type>
  8364. <expected-output>( |\t)*1( |\t)*0( |\t)*0 NAMENODE/dir1</expected-output>
  8365. </comparator>
  8366. <comparator>
  8367. <type>RegexpComparator</type>
  8368. <expected-output>( |\t)*1( |\t)*0( |\t)*0 NAMENODE/dir2</expected-output>
  8369. </comparator>
  8370. <comparator>
  8371. <type>RegexpComparator</type>
  8372. <expected-output>( |\t)*1( |\t)*0( |\t)*0 NAMENODE/dir3</expected-output>
  8373. </comparator>
  8374. <comparator>
  8375. <type>RegexpComparator</type>
  8376. <expected-output>( |\t)*1( |\t)*0( |\t)*0 NAMENODE/dir4</expected-output>
  8377. </comparator>
  8378. </comparators>
  8379. </test>
  8380. <test> <!-- TESTED -->
  8381. <description>count: Test for Namenode's path - multiple directories without globbing</description>
  8382. <test-commands>
  8383. <command>-fs NAMENODE -mkdir NAMENODE/dir1</command>
  8384. <command>-fs NAMENODE -mkdir NAMENODE/dir2</command>
  8385. <command>-fs NAMENODE -mkdir NAMENODE/dir3</command>
  8386. <command>-fs NAMENODE -mkdir NAMENODE/dir4</command>
  8387. <command>-fs NAMENODE -count NAMENODE/dir1 NAMENODE/dir2 NAMENODE/dir3 NAMENODE/dir4 </command>
  8388. </test-commands>
  8389. <cleanup-commands>
  8390. <command>-fs NAMENODE -rm -r NAMENODE/dir*</command>
  8391. </cleanup-commands>
  8392. <comparators>
  8393. <comparator>
  8394. <type>RegexpComparator</type>
  8395. <expected-output>( |\t)*1( |\t)*0( |\t)*0 NAMENODE/dir1</expected-output>
  8396. </comparator>
  8397. <comparator>
  8398. <type>RegexpComparator</type>
  8399. <expected-output>( |\t)*1( |\t)*0( |\t)*0 NAMENODE/dir2</expected-output>
  8400. </comparator>
  8401. <comparator>
  8402. <type>RegexpComparator</type>
  8403. <expected-output>( |\t)*1( |\t)*0( |\t)*0 NAMENODE/dir3</expected-output>
  8404. </comparator>
  8405. <comparator>
  8406. <type>RegexpComparator</type>
  8407. <expected-output>( |\t)*1( |\t)*0( |\t)*0 NAMENODE/dir4</expected-output>
  8408. </comparator>
  8409. </comparators>
  8410. </test>
  8411. <test> <!-- TESTED -->
  8412. <description>count: Test for file using Namenode's path with -q option</description>
  8413. <test-commands>
  8414. <command>-fs NAMENODE -touchz NAMENODE/file1</command>
  8415. <command>-fs NAMENODE -count -q NAMENODE/file1</command>
  8416. </test-commands>
  8417. <cleanup-commands>
  8418. <command>-fs NAMENODE -rm NAMENODE/file1</command>
  8419. </cleanup-commands>
  8420. <comparators>
  8421. <comparator>
  8422. <type>RegexpComparator</type>
  8423. <expected-output>( |\t)*none( |\t)*inf( |\t)*none( |\t)*inf( |\t)*0( |\t)*1( |\t)*0 NAMENODE/file1</expected-output>
  8424. </comparator>
  8425. </comparators>
  8426. </test>
  8427. <test> <!-- TESTED -->
  8428. <description>count: Test for directory using Namenode's path with -q option</description>
  8429. <test-commands>
  8430. <command>-fs NAMENODE -mkdir NAMENODE/dir1</command>
  8431. <dfs-admin-command>-fs NAMENODE -setQuota 10 NAMENODE/dir1 </dfs-admin-command>
  8432. <dfs-admin-command>-fs NAMENODE -setSpaceQuota 1m NAMENODE/dir1 </dfs-admin-command>
  8433. <command>-fs NAMENODE -count -q NAMENODE/dir1</command>
  8434. </test-commands>
  8435. <cleanup-commands>
  8436. <command>-fs NAMENODE -rm -r NAMENODE/dir1</command>
  8437. </cleanup-commands>
  8438. <comparators>
  8439. <comparator>
  8440. <type>RegexpComparator</type>
  8441. <expected-output>( |\t)*10( |\t)*9( |\t)*1048576( |\t)*1048576( |\t)*1( |\t)*0( |\t)*0 NAMENODE/dir1</expected-output>
  8442. </comparator>
  8443. </comparators>
  8444. </test>
  8445. <test> <!-- TESTED -->
  8446. <description>count: Test for Namenode's path - file/directory that does not exist with -q option</description>
  8447. <test-commands>
  8448. <command>-fs NAMENODE -count -q NAMENODE/file1 </command>
  8449. </test-commands>
  8450. <cleanup-commands>
  8451. </cleanup-commands>
  8452. <comparators>
  8453. <comparator>
  8454. <type>RegexpComparator</type>
  8455. <expected-output>count: `NAMENODE/file1': No such file or directory</expected-output>
  8456. </comparator>
  8457. </comparators>
  8458. </test>
  8459. <test> <!-- TESTED -->
  8460. <description>count: Test for Namenode's path - multiple files using globbing with -q option</description>
  8461. <test-commands>
  8462. <command>-fs NAMENODE -touchz NAMENODE/file1</command>
  8463. <command>-fs NAMENODE -touchz NAMENODE/file2</command>
  8464. <command>-fs NAMENODE -touchz NAMENODE/file3</command>
  8465. <command>-fs NAMENODE -touchz NAMENODE/file4</command>
  8466. <command>-fs NAMENODE -count -q NAMENODE/file*</command>
  8467. </test-commands>
  8468. <cleanup-commands>
  8469. <command>-fs NAMENODE -rm -r NAMENODE/file*</command>
  8470. </cleanup-commands>
  8471. <comparators>
  8472. <comparator>
  8473. <type>RegexpComparator</type>
  8474. <expected-output>( |\t)*none( |\t)*inf( |\t)*none( |\t)*inf( |\t)*0( |\t)*1( |\t)*0 NAMENODE/file1</expected-output>
  8475. </comparator>
  8476. <comparator>
  8477. <type>RegexpComparator</type>
  8478. <expected-output>( |\t)*none( |\t)*inf( |\t)*none( |\t)*inf( |\t)*0( |\t)*1( |\t)*0 NAMENODE/file2</expected-output>
  8479. </comparator>
  8480. <comparator>
  8481. <type>RegexpComparator</type>
  8482. <expected-output>( |\t)*none( |\t)*inf( |\t)*none( |\t)*inf( |\t)*0( |\t)*1( |\t)*0 NAMENODE/file3</expected-output>
  8483. </comparator>
  8484. <comparator>
  8485. <type>RegexpComparator</type>
  8486. <expected-output>( |\t)*none( |\t)*inf( |\t)*none( |\t)*inf( |\t)*0( |\t)*1( |\t)*0 NAMENODE/file4</expected-output>
  8487. </comparator>
  8488. </comparators>
  8489. </test>
  8490. <test> <!-- TESTED -->
  8491. <description>count: Test for Namenode's path - multiple files without globbing with -q option</description>
  8492. <test-commands>
  8493. <command>-fs NAMENODE -touchz NAMENODE/file1</command>
  8494. <command>-fs NAMENODE -touchz NAMENODE/file2</command>
  8495. <command>-fs NAMENODE -touchz NAMENODE/file3</command>
  8496. <command>-fs NAMENODE -touchz NAMENODE/file4</command>
  8497. <command>-fs NAMENODE -count -q NAMENODE/file1 NAMENODE/file2 NAMENODE/file3 NAMENODE/file4</command>
  8498. </test-commands>
  8499. <cleanup-commands>
  8500. <command>-fs NAMENODE -rm -r NAMENODE/file*</command>
  8501. </cleanup-commands>
  8502. <comparators>
  8503. <comparator>
  8504. <type>RegexpComparator</type>
  8505. <expected-output>( |\t)*none( |\t)*inf( |\t)*none( |\t)*inf( |\t)*0( |\t)*1( |\t)*0 NAMENODE/file1</expected-output>
  8506. </comparator>
  8507. <comparator>
  8508. <type>RegexpComparator</type>
  8509. <expected-output>( |\t)*none( |\t)*inf( |\t)*none( |\t)*inf( |\t)*0( |\t)*1( |\t)*0 NAMENODE/file2</expected-output>
  8510. </comparator>
  8511. <comparator>
  8512. <type>RegexpComparator</type>
  8513. <expected-output>( |\t)*none( |\t)*inf( |\t)*none( |\t)*inf( |\t)*0( |\t)*1( |\t)*0 NAMENODE/file3</expected-output>
  8514. </comparator>
  8515. <comparator>
  8516. <type>RegexpComparator</type>
  8517. <expected-output>( |\t)*none( |\t)*inf( |\t)*none( |\t)*inf( |\t)*0( |\t)*1( |\t)*0 NAMENODE/file4</expected-output>
  8518. </comparator>
  8519. </comparators>
  8520. </test>
  8521. <test> <!-- TESTED -->
  8522. <description>count: Test for Namenode's path - multiple directories using globbing with -q option</description>
  8523. <test-commands>
  8524. <command>-fs NAMENODE -mkdir NAMENODE/dir1</command>
  8525. <command>-fs NAMENODE -mkdir NAMENODE/dir2</command>
  8526. <command>-fs NAMENODE -mkdir NAMENODE/dir3</command>
  8527. <command>-fs NAMENODE -mkdir NAMENODE/dir4</command>
  8528. <dfs-admin-command>-fs NAMENODE -setQuota 10 NAMENODE/dir1 </dfs-admin-command>
  8529. <dfs-admin-command>-fs NAMENODE -setSpaceQuota 1m NAMENODE/dir1 </dfs-admin-command>
  8530. <dfs-admin-command>-fs NAMENODE -setQuota 10 NAMENODE/dir2 </dfs-admin-command>
  8531. <dfs-admin-command>-fs NAMENODE -setSpaceQuota 1m NAMENODE/dir2 </dfs-admin-command>
  8532. <dfs-admin-command>-fs NAMENODE -setQuota 10 NAMENODE/dir3 </dfs-admin-command>
  8533. <dfs-admin-command>-fs NAMENODE -setSpaceQuota 1m NAMENODE/dir3 </dfs-admin-command>
  8534. <dfs-admin-command>-fs NAMENODE -setQuota 10 NAMENODE/dir4 </dfs-admin-command>
  8535. <dfs-admin-command>-fs NAMENODE -setSpaceQuota 1m NAMENODE/dir4 </dfs-admin-command>
  8536. <command>-fs NAMENODE -count -q NAMENODE/dir* </command>
  8537. </test-commands>
  8538. <cleanup-commands>
  8539. <command>-fs NAMENODE -rm -r NAMENODE/dir*</command>
  8540. </cleanup-commands>
  8541. <comparators>
  8542. <comparator>
  8543. <type>RegexpComparator</type>
  8544. <expected-output>( |\t)*10( |\t)*9( |\t)*1048576( |\t)*1048576( |\t)*1( |\t)*0( |\t)*0 NAMENODE/dir1</expected-output>
  8545. </comparator>
  8546. <comparator>
  8547. <type>RegexpComparator</type>
  8548. <expected-output>( |\t)*10( |\t)*9( |\t)*1048576( |\t)*1048576( |\t)*1( |\t)*0( |\t)*0 NAMENODE/dir2</expected-output>
  8549. </comparator>
  8550. <comparator>
  8551. <type>RegexpComparator</type>
  8552. <expected-output>( |\t)*10( |\t)*9( |\t)*1048576( |\t)*1048576( |\t)*1( |\t)*0( |\t)*0 NAMENODE/dir3</expected-output>
  8553. </comparator>
  8554. <comparator>
  8555. <type>RegexpComparator</type>
  8556. <expected-output>( |\t)*10( |\t)*9( |\t)*1048576( |\t)*1048576( |\t)*1( |\t)*0( |\t)*0 NAMENODE/dir4</expected-output>
  8557. </comparator>
  8558. </comparators>
  8559. </test>
  8560. <test> <!-- TESTED -->
  8561. <description>count: Test for Namenode's path - multiple directories without globbing with -q option</description>
  8562. <test-commands>
  8563. <command>-fs NAMENODE -mkdir NAMENODE/dir1</command>
  8564. <command>-fs NAMENODE -mkdir NAMENODE/dir2</command>
  8565. <command>-fs NAMENODE -mkdir NAMENODE/dir3</command>
  8566. <command>-fs NAMENODE -mkdir NAMENODE/dir4</command>
  8567. <dfs-admin-command>-fs NAMENODE -setQuota 10 NAMENODE/dir1 </dfs-admin-command>
  8568. <dfs-admin-command>-fs NAMENODE -setSpaceQuota 1m NAMENODE/dir1 </dfs-admin-command>
  8569. <dfs-admin-command>-fs NAMENODE -setQuota 10 NAMENODE/dir2 </dfs-admin-command>
  8570. <dfs-admin-command>-fs NAMENODE -setSpaceQuota 1m NAMENODE/dir2 </dfs-admin-command>
  8571. <dfs-admin-command>-fs NAMENODE -setQuota 10 NAMENODE/dir3 </dfs-admin-command>
  8572. <dfs-admin-command>-fs NAMENODE -setSpaceQuota 1m NAMENODE/dir3 </dfs-admin-command>
  8573. <dfs-admin-command>-fs NAMENODE -setQuota 10 NAMENODE/dir4 </dfs-admin-command>
  8574. <dfs-admin-command>-fs NAMENODE -setSpaceQuota 1m NAMENODE/dir4 </dfs-admin-command>
  8575. <command>-fs NAMENODE -count -q NAMENODE/dir1 NAMENODE/dir2 NAMENODE/dir3 NAMENODE/dir4 </command>
  8576. </test-commands>
  8577. <cleanup-commands>
  8578. <command>-fs NAMENODE -rm -r NAMENODE/dir*</command>
  8579. </cleanup-commands>
  8580. <comparators>
  8581. <comparator>
  8582. <type>RegexpComparator</type>
  8583. <expected-output>( |\t)*10( |\t)*9( |\t)*1048576( |\t)*1048576( |\t)*1( |\t)*0( |\t)*0 NAMENODE/dir1</expected-output>
  8584. </comparator>
  8585. <comparator>
  8586. <type>RegexpComparator</type>
  8587. <expected-output>( |\t)*10( |\t)*9( |\t)*1048576( |\t)*1048576( |\t)*1( |\t)*0( |\t)*0 NAMENODE/dir2</expected-output>
  8588. </comparator>
  8589. <comparator>
  8590. <type>RegexpComparator</type>
  8591. <expected-output>( |\t)*10( |\t)*9( |\t)*1048576( |\t)*1048576( |\t)*1( |\t)*0( |\t)*0 NAMENODE/dir3</expected-output>
  8592. </comparator>
  8593. <comparator>
  8594. <type>RegexpComparator</type>
  8595. <expected-output>( |\t)*10( |\t)*9( |\t)*1048576( |\t)*1048576( |\t)*1( |\t)*0( |\t)*0 NAMENODE/dir4</expected-output>
  8596. </comparator>
  8597. </comparators>
  8598. </test>
  8599. <test> <!-- TESTED -->
  8600. <description>count: file using -h option</description>
  8601. <test-commands>
  8602. <command>-fs NAMENODE -mkdir -p dir</command> <!-- make sure user home dir exists -->
  8603. <command>-fs NAMENODE -put CLITEST_DATA/data15bytes file1</command>
  8604. <command>-fs NAMENODE -put CLITEST_DATA/data1k file2</command>
  8605. <command>-fs NAMENODE -count -h file1 file2</command>
  8606. </test-commands>
  8607. <cleanup-commands>
  8608. <command>-fs NAMENODE -rm file1 file2</command>
  8609. </cleanup-commands>
  8610. <comparators>
  8611. <comparator>
  8612. <type>RegexpComparator</type>
  8613. <expected-output>( |\t)*0( |\t)*1( |\t)*15 file1</expected-output>
  8614. </comparator>
  8615. </comparators>
  8616. <comparators>
  8617. <comparator>
  8618. <type>RegexpComparator</type>
  8619. <expected-output>( |\t)*0( |\t)*1( |\t)*1\.0 K file2</expected-output>
  8620. </comparator>
  8621. </comparators>
  8622. </test>
  8623. <test> <!-- TESTED -->
  8624. <description>count: directory using -q and -h options</description>
  8625. <test-commands>
  8626. <command>-fs NAMENODE -mkdir /dir1</command>
  8627. <dfs-admin-command>-fs NAMENODE -setQuota 10 /dir1 </dfs-admin-command>
  8628. <dfs-admin-command>-fs NAMENODE -setSpaceQuota 1m /dir1 </dfs-admin-command>
  8629. <command>-fs NAMENODE -count -q -h /dir1</command>
  8630. </test-commands>
  8631. <cleanup-commands>
  8632. <command>-fs NAMENODE -rm -r /dir1</command>
  8633. </cleanup-commands>
  8634. <comparators>
  8635. <comparator>
  8636. <type>RegexpComparator</type>
  8637. <expected-output>( |\t)*10( |\t)*9( |\t)*1 M( |\t)*1 M( |\t)*1( |\t)*0( |\t)*0 /dir1</expected-output>
  8638. </comparator>
  8639. </comparators>
  8640. </test>
  8641. <test> <!-- TESTED -->
  8642. <description>count: file using absolute path showing header record</description>
  8643. <test-commands>
  8644. <command>-fs NAMENODE -touchz /file1</command>
  8645. <command>-fs NAMENODE -count -v /file1</command>
  8646. </test-commands>
  8647. <cleanup-commands>
  8648. <command>-fs NAMENODE -rm /file1</command>
  8649. </cleanup-commands>
  8650. <comparators>
  8651. <comparator>
  8652. <type>RegexpComparator</type>
  8653. <expected-output>( |\t)*DIR_COUNT FILE_COUNT CONTENT_SIZE PATHNAME</expected-output>
  8654. </comparator>
  8655. <comparator>
  8656. <type>RegexpComparator</type>
  8657. <expected-output>( |\t)*0( |\t)*1( |\t)*0 /file1</expected-output>
  8658. </comparator>
  8659. </comparators>
  8660. </test>
  8661. <test> <!-- TESTED -->
  8662. <description>count: file using absolute path with -q option and showing header record</description>
  8663. <test-commands>
  8664. <command>-fs NAMENODE -touchz /file1</command>
  8665. <command>-fs NAMENODE -count -q -v /file1</command>
  8666. </test-commands>
  8667. <cleanup-commands>
  8668. <command>-fs NAMENODE -rm /file1</command>
  8669. </cleanup-commands>
  8670. <comparators>
  8671. <comparator>
  8672. <type>RegexpComparator</type>
  8673. <expected-output>( |\t)*QUOTA REM_QUOTA SPACE_QUOTA REM_SPACE_QUOTA DIR_COUNT FILE_COUNT CONTENT_SIZE PATHNAME</expected-output>
  8674. </comparator>
  8675. <comparator>
  8676. <type>RegexpComparator</type>
  8677. <expected-output>( |\t)*none( |\t)*inf( |\t)*none( |\t)*inf( |\t)*0( |\t)*1( |\t)*0 /file1</expected-output>
  8678. </comparator>
  8679. </comparators>
  8680. </test>
  8681. <!-- Tests for chmod -->
  8682. <test> <!-- TESTED -->
  8683. <description>chmod: change permission(octal mode) of file in absolute path</description>
  8684. <test-commands>
  8685. <command>-fs NAMENODE -touchz /file1</command>
  8686. <command>-fs NAMENODE -chmod 777 /file1</command>
  8687. <command>-fs NAMENODE -ls /file1</command>
  8688. </test-commands>
  8689. <cleanup-commands>
  8690. <command>-fs NAMENODE -rm /file1</command>
  8691. </cleanup-commands>
  8692. <comparators>
  8693. <comparator>
  8694. <type>RegexpComparator</type>
  8695. <expected-output>^-rwxrwxrwx( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/file1</expected-output>
  8696. </comparator>
  8697. </comparators>
  8698. </test>
  8699. <test> <!-- TESTED -->
  8700. <description>chmod: change permission(octal mode) of file in relative path</description>
  8701. <test-commands>
  8702. <command>-fs NAMENODE -mkdir -p dir</command> <!-- make sure user home dir exists -->
  8703. <command>-fs NAMENODE -touchz file1</command>
  8704. <command>-fs NAMENODE -chmod 666 file1</command>
  8705. <command>-fs NAMENODE -ls file1</command>
  8706. </test-commands>
  8707. <cleanup-commands>
  8708. <command>-fs NAMENODE -rm file1</command>
  8709. </cleanup-commands>
  8710. <comparators>
  8711. <comparator>
  8712. <type>RegexpComparator</type>
  8713. <expected-output>^-rw-rw-rw-( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*file1</expected-output>
  8714. </comparator>
  8715. </comparators>
  8716. </test>
  8717. <test> <!-- TESTED -->
  8718. <description>chmod: change permission(octal mode) of directory in absolute path</description>
  8719. <test-commands>
  8720. <command>-fs NAMENODE -mkdir /dir0</command>
  8721. <command>-fs NAMENODE -mkdir /dir0/dir1</command>
  8722. <command>-fs NAMENODE -touchz /dir0/file0</command>
  8723. <command>-fs NAMENODE -touchz /dir0/dir1/file1</command>
  8724. <command>-fs NAMENODE -touchz /dir0/dir1/file2</command>
  8725. <command>-fs NAMENODE -chmod 777 /dir0/dir1</command>
  8726. <command>-fs NAMENODE -ls -R /dir0</command>
  8727. </test-commands>
  8728. <cleanup-commands>
  8729. <command>-fs NAMENODE -rm -r /dir0</command>
  8730. </cleanup-commands>
  8731. <comparators>
  8732. <comparator>
  8733. <type>RegexpComparator</type>
  8734. <expected-output>^drwxrwxrwx( )*-( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1</expected-output>
  8735. </comparator>
  8736. <comparator>
  8737. <type>RegexpComparator</type>
  8738. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1/file1</expected-output>
  8739. </comparator>
  8740. <comparator>
  8741. <type>RegexpComparator</type>
  8742. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1/file2</expected-output>
  8743. </comparator>
  8744. <comparator>
  8745. <type>RegexpComparator</type>
  8746. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/file0</expected-output>
  8747. </comparator>
  8748. </comparators>
  8749. </test>
  8750. <test> <!-- TESTED -->
  8751. <description>chmod: change permission(octal mode) of directory in relative path</description>
  8752. <test-commands>
  8753. <command>-fs NAMENODE -mkdir -p dir0</command>
  8754. <command>-fs NAMENODE -mkdir -p dir0/dir1</command>
  8755. <command>-fs NAMENODE -touchz dir0/file0</command>
  8756. <command>-fs NAMENODE -touchz dir0/dir1/file1</command>
  8757. <command>-fs NAMENODE -touchz dir0/dir1/file2</command>
  8758. <command>-fs NAMENODE -chmod 777 dir0/dir1</command>
  8759. <command>-fs NAMENODE -ls -R dir0</command>
  8760. </test-commands>
  8761. <cleanup-commands>
  8762. <command>-fs NAMENODE -rm -r dir0</command>
  8763. </cleanup-commands>
  8764. <comparators>
  8765. <comparator>
  8766. <type>RegexpComparator</type>
  8767. <expected-output>^drwxrwxrwx( )*-( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/dir1</expected-output>
  8768. </comparator>
  8769. <comparator>
  8770. <type>RegexpComparator</type>
  8771. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/dir1/file1</expected-output>
  8772. </comparator>
  8773. <comparator>
  8774. <type>RegexpComparator</type>
  8775. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/dir1/file2</expected-output>
  8776. </comparator>
  8777. <comparator>
  8778. <type>RegexpComparator</type>
  8779. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/file0</expected-output>
  8780. </comparator>
  8781. </comparators>
  8782. </test>
  8783. <test> <!-- TESTED -->
  8784. <description>chmod: change permission(normal mode) of file in absolute path</description>
  8785. <test-commands>
  8786. <command>-fs NAMENODE -touchz /file1</command>
  8787. <command>-fs NAMENODE -chmod a+rw /file1</command>
  8788. <command>-fs NAMENODE -ls /file1</command>
  8789. </test-commands>
  8790. <cleanup-commands>
  8791. <command>-fs NAMENODE -rm /file1</command>
  8792. </cleanup-commands>
  8793. <comparators>
  8794. <comparator>
  8795. <type>RegexpComparator</type>
  8796. <expected-output>^-rw-rw-rw-( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/file1</expected-output>
  8797. </comparator>
  8798. </comparators>
  8799. </test>
  8800. <test> <!-- TESTED -->
  8801. <description>chmod: change permission(normal mode) of file in relative path</description>
  8802. <test-commands>
  8803. <command>-fs NAMENODE -touchz file1</command>
  8804. <command>-fs NAMENODE -chmod a+rw file1</command>
  8805. <command>-fs NAMENODE -ls file1</command>
  8806. </test-commands>
  8807. <cleanup-commands>
  8808. <command>-fs NAMENODE -rm file1</command>
  8809. </cleanup-commands>
  8810. <comparators>
  8811. <comparator>
  8812. <type>RegexpComparator</type>
  8813. <expected-output>^-rw-rw-rw-( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*file1</expected-output>
  8814. </comparator>
  8815. </comparators>
  8816. </test>
  8817. <test> <!-- TESTED -->
  8818. <description>chmod: change permission(normal mode) of directory in absolute path</description>
  8819. <test-commands>
  8820. <command>-fs NAMENODE -mkdir /dir0</command>
  8821. <command>-fs NAMENODE -mkdir /dir0/dir1</command>
  8822. <command>-fs NAMENODE -touchz /dir0/file0</command>
  8823. <command>-fs NAMENODE -touchz /dir0/dir1/file1</command>
  8824. <command>-fs NAMENODE -touchz /dir0/dir1/file2</command>
  8825. <command>-fs NAMENODE -chmod a+rwx /dir0/dir1</command>
  8826. <command>-fs NAMENODE -ls -R /dir0</command>
  8827. </test-commands>
  8828. <cleanup-commands>
  8829. <command>-fs NAMENODE -rm -r /dir0</command>
  8830. </cleanup-commands>
  8831. <comparators>
  8832. <comparator>
  8833. <type>RegexpComparator</type>
  8834. <expected-output>^drwxrwxrwx( )*-( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1</expected-output>
  8835. </comparator>
  8836. <comparator>
  8837. <type>RegexpComparator</type>
  8838. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1/file1</expected-output>
  8839. </comparator>
  8840. <comparator>
  8841. <type>RegexpComparator</type>
  8842. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1/file2</expected-output>
  8843. </comparator>
  8844. <comparator>
  8845. <type>RegexpComparator</type>
  8846. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/file0</expected-output>
  8847. </comparator>
  8848. </comparators>
  8849. </test>
  8850. <test> <!-- TESTED -->
  8851. <description>chmod: change permission(normal mode) of directory in relative path</description>
  8852. <test-commands>
  8853. <command>-fs NAMENODE -mkdir -p dir0</command>
  8854. <command>-fs NAMENODE -mkdir -p dir0/dir1</command>
  8855. <command>-fs NAMENODE -touchz dir0/file0</command>
  8856. <command>-fs NAMENODE -touchz dir0/dir1/file1</command>
  8857. <command>-fs NAMENODE -touchz dir0/dir1/file2</command>
  8858. <command>-fs NAMENODE -chmod a+rwx dir0/dir1</command>
  8859. <command>-fs NAMENODE -ls -R dir0</command>
  8860. </test-commands>
  8861. <cleanup-commands>
  8862. <command>-fs NAMENODE -rm -r dir0</command>
  8863. </cleanup-commands>
  8864. <comparators>
  8865. <comparator>
  8866. <type>RegexpComparator</type>
  8867. <expected-output>^drwxrwxrwx( )*-( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/dir1</expected-output>
  8868. </comparator>
  8869. <comparator>
  8870. <type>RegexpComparator</type>
  8871. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/dir1/file1</expected-output>
  8872. </comparator>
  8873. <comparator>
  8874. <type>RegexpComparator</type>
  8875. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/dir1/file2</expected-output>
  8876. </comparator>
  8877. <comparator>
  8878. <type>RegexpComparator</type>
  8879. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/file0</expected-output>
  8880. </comparator>
  8881. </comparators>
  8882. </test>
  8883. <test> <!-- TESTED -->
  8884. <description>chmod: change permission(octal mode) of directory in absolute path recursively </description>
  8885. <test-commands>
  8886. <command>-fs NAMENODE -mkdir /dir0</command>
  8887. <command>-fs NAMENODE -mkdir /dir0/dir1</command>
  8888. <command>-fs NAMENODE -touchz /dir0/file0</command>
  8889. <command>-fs NAMENODE -touchz /dir0/dir1/file1</command>
  8890. <command>-fs NAMENODE -touchz /dir0/dir1/file2</command>
  8891. <command>-fs NAMENODE -chmod -R 777 /dir0/dir1</command>
  8892. <command>-fs NAMENODE -ls -R /dir0</command>
  8893. </test-commands>
  8894. <cleanup-commands>
  8895. <command>-fs NAMENODE -rm -r /dir0</command>
  8896. </cleanup-commands>
  8897. <comparators>
  8898. <comparator>
  8899. <type>RegexpComparator</type>
  8900. <expected-output>^drwxrwxrwx( )*-( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1</expected-output>
  8901. </comparator>
  8902. <comparator>
  8903. <type>RegexpComparator</type>
  8904. <expected-output>^-rwxrwxrwx( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1/file1</expected-output>
  8905. </comparator>
  8906. <comparator>
  8907. <type>RegexpComparator</type>
  8908. <expected-output>^-rwxrwxrwx( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1/file2</expected-output>
  8909. </comparator>
  8910. <comparator>
  8911. <type>RegexpComparator</type>
  8912. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/file0</expected-output>
  8913. </comparator>
  8914. </comparators>
  8915. </test>
  8916. <test> <!-- TESTED -->
  8917. <description>chmod: change permission(octal mode) of directory in relative path recursively</description>
  8918. <test-commands>
  8919. <command>-fs NAMENODE -mkdir -p dir0</command>
  8920. <command>-fs NAMENODE -mkdir -p dir0/dir1</command>
  8921. <command>-fs NAMENODE -touchz dir0/file0</command>
  8922. <command>-fs NAMENODE -touchz dir0/dir1/file1</command>
  8923. <command>-fs NAMENODE -touchz dir0/dir1/file2</command>
  8924. <command>-fs NAMENODE -chmod -R 777 dir0/dir1</command>
  8925. <command>-fs NAMENODE -ls -R dir0</command>
  8926. </test-commands>
  8927. <cleanup-commands>
  8928. <command>-fs NAMENODE -rm -r dir0</command>
  8929. </cleanup-commands>
  8930. <comparators>
  8931. <comparator>
  8932. <type>RegexpComparator</type>
  8933. <expected-output>^drwxrwxrwx( )*-( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/dir1</expected-output>
  8934. </comparator>
  8935. <comparator>
  8936. <type>RegexpComparator</type>
  8937. <expected-output>^-rwxrwxrwx( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/dir1/file1</expected-output>
  8938. </comparator>
  8939. <comparator>
  8940. <type>RegexpComparator</type>
  8941. <expected-output>^-rwxrwxrwx( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/dir1/file2</expected-output>
  8942. </comparator>
  8943. <comparator>
  8944. <type>RegexpComparator</type>
  8945. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/file0</expected-output>
  8946. </comparator>
  8947. </comparators>
  8948. </test>
  8949. <test> <!-- TESTED -->
  8950. <description>chmod: change permission(normal mode) of directory in absolute path recursively</description>
  8951. <test-commands>
  8952. <command>-fs NAMENODE -mkdir /dir0</command>
  8953. <command>-fs NAMENODE -mkdir /dir0/dir1</command>
  8954. <command>-fs NAMENODE -touchz /dir0/file0</command>
  8955. <command>-fs NAMENODE -touchz /dir0/dir1/file1</command>
  8956. <command>-fs NAMENODE -touchz /dir0/dir1/file2</command>
  8957. <command>-fs NAMENODE -chmod -R a+rwx /dir0/dir1</command>
  8958. <command>-fs NAMENODE -ls -R /dir0</command>
  8959. </test-commands>
  8960. <cleanup-commands>
  8961. <command>-fs NAMENODE -rm -r /dir0</command>
  8962. </cleanup-commands>
  8963. <comparators>
  8964. <comparator>
  8965. <type>RegexpComparator</type>
  8966. <expected-output>^drwxrwxrwx( )*-( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1</expected-output>
  8967. </comparator>
  8968. <comparator>
  8969. <type>RegexpComparator</type>
  8970. <expected-output>^-rwxrwxrwx( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1/file1</expected-output>
  8971. </comparator>
  8972. <comparator>
  8973. <type>RegexpComparator</type>
  8974. <expected-output>^-rwxrwxrwx( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1/file2</expected-output>
  8975. </comparator>
  8976. <comparator>
  8977. <type>RegexpComparator</type>
  8978. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/file0</expected-output>
  8979. </comparator>
  8980. </comparators>
  8981. </test>
  8982. <test> <!-- TESTED -->
  8983. <description>chmod: change permission(normal mode) of directory in relative path recursively</description>
  8984. <test-commands>
  8985. <command>-fs NAMENODE -mkdir -p dir0</command>
  8986. <command>-fs NAMENODE -mkdir -p dir0/dir1</command>
  8987. <command>-fs NAMENODE -touchz dir0/file0</command>
  8988. <command>-fs NAMENODE -touchz dir0/dir1/file1</command>
  8989. <command>-fs NAMENODE -touchz dir0/dir1/file2</command>
  8990. <command>-fs NAMENODE -chmod -R a+rwx dir0/dir1</command>
  8991. <command>-fs NAMENODE -ls -R dir0</command>
  8992. </test-commands>
  8993. <cleanup-commands>
  8994. <command>-fs NAMENODE -rm -r dir0</command>
  8995. </cleanup-commands>
  8996. <comparators>
  8997. <comparator>
  8998. <type>RegexpComparator</type>
  8999. <expected-output>^drwxrwxrwx( )*-( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/dir1</expected-output>
  9000. </comparator>
  9001. <comparator>
  9002. <type>RegexpComparator</type>
  9003. <expected-output>^-rwxrwxrwx( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/dir1/file1</expected-output>
  9004. </comparator>
  9005. <comparator>
  9006. <type>RegexpComparator</type>
  9007. <expected-output>^-rwxrwxrwx( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/dir1/file2</expected-output>
  9008. </comparator>
  9009. <comparator>
  9010. <type>RegexpComparator</type>
  9011. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/file0</expected-output>
  9012. </comparator>
  9013. </comparators>
  9014. </test>
  9015. <test> <!-- TESTED -->
  9016. <description>chmod: change permission(octal mode) of non existent file in absolute path</description>
  9017. <test-commands>
  9018. <command>-fs NAMENODE -chmod 777 /file1</command>
  9019. </test-commands>
  9020. <cleanup-commands>
  9021. <command>-fs NAMENODE -rm /file1</command>
  9022. </cleanup-commands>
  9023. <comparators>
  9024. <comparator>
  9025. <type>RegexpComparator</type>
  9026. <expected-output>^chmod: `/file1': No such file or directory</expected-output>
  9027. </comparator>
  9028. </comparators>
  9029. </test>
  9030. <test> <!-- TESTED -->
  9031. <description>chmod: change permission(octal mode) of non existent file in relative path</description>
  9032. <test-commands>
  9033. <command>-fs NAMENODE -chmod 666 file1</command>
  9034. </test-commands>
  9035. <cleanup-commands>
  9036. <command>-fs NAMENODE -rm file1</command>
  9037. </cleanup-commands>
  9038. <comparators>
  9039. <comparator>
  9040. <type>RegexpComparator</type>
  9041. <expected-output>^chmod: `file1': No such file or directory</expected-output>
  9042. </comparator>
  9043. </comparators>
  9044. </test>
  9045. <test> <!-- TESTED -->
  9046. <description>chmod: change permission(normal mode) of non existent file in absolute path</description>
  9047. <test-commands>
  9048. <command>-fs NAMENODE -chmod a+rw /file1</command>
  9049. </test-commands>
  9050. <cleanup-commands>
  9051. <command>-fs NAMENODE -rm /file1</command>
  9052. </cleanup-commands>
  9053. <comparators>
  9054. <comparator>
  9055. <type>RegexpComparator</type>
  9056. <expected-output>^chmod: `/file1': No such file or directory</expected-output>
  9057. </comparator>
  9058. </comparators>
  9059. </test>
  9060. <test> <!-- TESTED -->
  9061. <description>chmod: change permission(normal mode) of non existent file in relative path</description>
  9062. <test-commands>
  9063. <command>-fs NAMENODE -chmod a+rw file1</command>
  9064. </test-commands>
  9065. <cleanup-commands>
  9066. <command>-fs NAMENODE -rm file1</command>
  9067. </cleanup-commands>
  9068. <comparators>
  9069. <comparator>
  9070. <type>RegexpComparator</type>
  9071. <expected-output>^chmod: `file1': No such file or directory</expected-output>
  9072. </comparator>
  9073. </comparators>
  9074. </test>
  9075. <test> <!-- TESTED -->
  9076. <description>chmod: change permission(octal mode) of multiple files in absolute path using globbing</description>
  9077. <test-commands>
  9078. <command>-fs NAMENODE -touchz /file1</command>
  9079. <command>-fs NAMENODE -touchz /file2</command>
  9080. <command>-fs NAMENODE -touchz /file3</command>
  9081. <command>-fs NAMENODE -touchz /file4</command>
  9082. <command>-fs NAMENODE -chmod 777 /file* </command>
  9083. <command>-fs NAMENODE -ls -R /file*</command>
  9084. </test-commands>
  9085. <cleanup-commands>
  9086. <command>-fs NAMENODE -rm /file*</command>
  9087. </cleanup-commands>
  9088. <comparators>
  9089. <comparator>
  9090. <type>RegexpComparator</type>
  9091. <expected-output>^-rwxrwxrwx( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/file1</expected-output>
  9092. </comparator>
  9093. <comparator>
  9094. <type>RegexpComparator</type>
  9095. <expected-output>^-rwxrwxrwx( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/file2</expected-output>
  9096. </comparator>
  9097. <comparator>
  9098. <type>RegexpComparator</type>
  9099. <expected-output>^-rwxrwxrwx( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/file3</expected-output>
  9100. </comparator>
  9101. <comparator>
  9102. <type>RegexpComparator</type>
  9103. <expected-output>^-rwxrwxrwx( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/file4</expected-output>
  9104. </comparator>
  9105. </comparators>
  9106. </test>
  9107. <test> <!-- TESTED -->
  9108. <description>chmod: change permission(octal mode) of multiple files in relative path using globbing</description>
  9109. <test-commands>
  9110. <command>-fs NAMENODE -touchz file1</command>
  9111. <command>-fs NAMENODE -touchz file2</command>
  9112. <command>-fs NAMENODE -touchz file3</command>
  9113. <command>-fs NAMENODE -touchz file4</command>
  9114. <command>-fs NAMENODE -chmod 777 file* </command>
  9115. <command>-fs NAMENODE -ls -R file*</command>
  9116. </test-commands>
  9117. <cleanup-commands>
  9118. <command>-fs NAMENODE -rm file*</command>
  9119. </cleanup-commands>
  9120. <comparators>
  9121. <comparator>
  9122. <type>RegexpComparator</type>
  9123. <expected-output>^-rwxrwxrwx( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*file1</expected-output>
  9124. </comparator>
  9125. <comparator>
  9126. <type>RegexpComparator</type>
  9127. <expected-output>^-rwxrwxrwx( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*file2</expected-output>
  9128. </comparator>
  9129. <comparator>
  9130. <type>RegexpComparator</type>
  9131. <expected-output>^-rwxrwxrwx( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*file3</expected-output>
  9132. </comparator>
  9133. <comparator>
  9134. <type>RegexpComparator</type>
  9135. <expected-output>^-rwxrwxrwx( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*file4</expected-output>
  9136. </comparator>
  9137. </comparators>
  9138. </test>
  9139. <test> <!-- TESTED -->
  9140. <description>chmod: change permission(octal mode) of multiple directories in absolute path using globbing</description>
  9141. <test-commands>
  9142. <command>-fs NAMENODE -mkdir /dir0</command>
  9143. <command>-fs NAMENODE -mkdir /dir0/dir1</command>
  9144. <command>-fs NAMENODE -touchz /dir0/file0</command>
  9145. <command>-fs NAMENODE -touchz /dir0/dir1/file1</command>
  9146. <command>-fs NAMENODE -touchz /dir0/dir1/file2</command>
  9147. <command>-fs NAMENODE -mkdir /dir2</command>
  9148. <command>-fs NAMENODE -mkdir /dir2/dir1</command>
  9149. <command>-fs NAMENODE -touchz /dir2/file0</command>
  9150. <command>-fs NAMENODE -touchz /dir2/dir1/file1</command>
  9151. <command>-fs NAMENODE -touchz /dir2/dir1/file2</command>
  9152. <command>-fs NAMENODE -chmod 777 /dir*</command>
  9153. <command>-fs NAMENODE -ls -R /dir*</command>
  9154. </test-commands>
  9155. <cleanup-commands>
  9156. <command>-fs NAMENODE -rm -r /dir*</command>
  9157. </cleanup-commands>
  9158. <comparators>
  9159. <comparator>
  9160. <type>RegexpComparator</type>
  9161. <expected-output>^drwxr-xr-x( )*-( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1</expected-output>
  9162. </comparator>
  9163. <comparator>
  9164. <type>RegexpComparator</type>
  9165. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1/file1</expected-output>
  9166. </comparator>
  9167. <comparator>
  9168. <type>RegexpComparator</type>
  9169. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1/file2</expected-output>
  9170. </comparator>
  9171. <comparator>
  9172. <type>RegexpComparator</type>
  9173. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/file0</expected-output>
  9174. </comparator>
  9175. <comparator>
  9176. <type>RegexpComparator</type>
  9177. <expected-output>^drwxr-xr-x( )*-( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir2/dir1</expected-output>
  9178. </comparator>
  9179. <comparator>
  9180. <type>RegexpComparator</type>
  9181. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir2/dir1/file1</expected-output>
  9182. </comparator>
  9183. <comparator>
  9184. <type>RegexpComparator</type>
  9185. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir2/dir1/file2</expected-output>
  9186. </comparator>
  9187. <comparator>
  9188. <type>RegexpComparator</type>
  9189. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir2/file0</expected-output>
  9190. </comparator>
  9191. </comparators>
  9192. </test>
  9193. <test> <!-- TESTED -->
  9194. <description>chmod: change permission(octal mode) of multiple directories in relative path using globbing</description>
  9195. <test-commands>
  9196. <command>-fs NAMENODE -mkdir -p dir0</command>
  9197. <command>-fs NAMENODE -mkdir -p dir0/dir1</command>
  9198. <command>-fs NAMENODE -touchz dir0/file0</command>
  9199. <command>-fs NAMENODE -touchz dir0/dir1/file1</command>
  9200. <command>-fs NAMENODE -touchz dir0/dir1/file2</command>
  9201. <command>-fs NAMENODE -mkdir -p dir2</command>
  9202. <command>-fs NAMENODE -mkdir -p dir2/dir1</command>
  9203. <command>-fs NAMENODE -touchz dir2/file0</command>
  9204. <command>-fs NAMENODE -touchz dir2/dir1/file1</command>
  9205. <command>-fs NAMENODE -touchz dir2/dir1/file2</command>
  9206. <command>-fs NAMENODE -chmod 777 dir*</command>
  9207. <command>-fs NAMENODE -ls -R dir*</command>
  9208. </test-commands>
  9209. <cleanup-commands>
  9210. <command>-fs NAMENODE -rm -r dir*</command>
  9211. </cleanup-commands>
  9212. <comparators>
  9213. <comparator>
  9214. <type>RegexpComparator</type>
  9215. <expected-output>^drwxr-xr-x( )*-( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/dir1</expected-output>
  9216. </comparator>
  9217. <comparator>
  9218. <type>RegexpComparator</type>
  9219. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/dir1/file1</expected-output>
  9220. </comparator>
  9221. <comparator>
  9222. <type>RegexpComparator</type>
  9223. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/dir1/file2</expected-output>
  9224. </comparator>
  9225. <comparator>
  9226. <type>RegexpComparator</type>
  9227. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/file0</expected-output>
  9228. </comparator>
  9229. <comparator>
  9230. <type>RegexpComparator</type>
  9231. <expected-output>^drwxr-xr-x( )*-( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir2/dir1</expected-output>
  9232. </comparator>
  9233. <comparator>
  9234. <type>RegexpComparator</type>
  9235. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir2/dir1/file1</expected-output>
  9236. </comparator>
  9237. <comparator>
  9238. <type>RegexpComparator</type>
  9239. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir2/dir1/file2</expected-output>
  9240. </comparator>
  9241. <comparator>
  9242. <type>RegexpComparator</type>
  9243. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir2/file0</expected-output>
  9244. </comparator>
  9245. </comparators>
  9246. </test>
  9247. <test> <!-- TESTED -->
  9248. <description>chmod: change permission(octal mode) of multiple files in absolute path without globbing</description>
  9249. <test-commands>
  9250. <command>-fs NAMENODE -touchz /file1</command>
  9251. <command>-fs NAMENODE -touchz /file2</command>
  9252. <command>-fs NAMENODE -touchz /file3</command>
  9253. <command>-fs NAMENODE -touchz /file4</command>
  9254. <command>-fs NAMENODE -chmod 777 /file1 /file2 /file3 /file4 </command>
  9255. <command>-fs NAMENODE -ls -R /file*</command>
  9256. </test-commands>
  9257. <cleanup-commands>
  9258. <command>-fs NAMENODE -rm /file*</command>
  9259. </cleanup-commands>
  9260. <comparators>
  9261. <comparator>
  9262. <type>RegexpComparator</type>
  9263. <expected-output>^-rwxrwxrwx( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/file1</expected-output>
  9264. </comparator>
  9265. <comparator>
  9266. <type>RegexpComparator</type>
  9267. <expected-output>^-rwxrwxrwx( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/file2</expected-output>
  9268. </comparator>
  9269. <comparator>
  9270. <type>RegexpComparator</type>
  9271. <expected-output>^-rwxrwxrwx( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/file3</expected-output>
  9272. </comparator>
  9273. <comparator>
  9274. <type>RegexpComparator</type>
  9275. <expected-output>^-rwxrwxrwx( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/file4</expected-output>
  9276. </comparator>
  9277. </comparators>
  9278. </test>
  9279. <test> <!-- TESTED -->
  9280. <description>chmod: change permission(octal mode) of multiple files in relative path without globbing</description>
  9281. <test-commands>
  9282. <command>-fs NAMENODE -touchz file1</command>
  9283. <command>-fs NAMENODE -touchz file2</command>
  9284. <command>-fs NAMENODE -touchz file3</command>
  9285. <command>-fs NAMENODE -touchz file4</command>
  9286. <command>-fs NAMENODE -chmod 777 file1 file2 file3 file4 </command>
  9287. <command>-fs NAMENODE -ls -R file*</command>
  9288. </test-commands>
  9289. <cleanup-commands>
  9290. <command>-fs NAMENODE -rm file*</command>
  9291. </cleanup-commands>
  9292. <comparators>
  9293. <comparator>
  9294. <type>RegexpComparator</type>
  9295. <expected-output>^-rwxrwxrwx( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*file1</expected-output>
  9296. </comparator>
  9297. <comparator>
  9298. <type>RegexpComparator</type>
  9299. <expected-output>^-rwxrwxrwx( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*file2</expected-output>
  9300. </comparator>
  9301. <comparator>
  9302. <type>RegexpComparator</type>
  9303. <expected-output>^-rwxrwxrwx( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*file3</expected-output>
  9304. </comparator>
  9305. <comparator>
  9306. <type>RegexpComparator</type>
  9307. <expected-output>^-rwxrwxrwx( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*file4</expected-output>
  9308. </comparator>
  9309. </comparators>
  9310. </test>
  9311. <test> <!-- TESTED -->
  9312. <description>chmod: change permission(octal mode) of multiple directories in absolute path without globbing</description>
  9313. <test-commands>
  9314. <command>-fs NAMENODE -mkdir /dir0</command>
  9315. <command>-fs NAMENODE -mkdir /dir0/dir1</command>
  9316. <command>-fs NAMENODE -touchz /dir0/file0</command>
  9317. <command>-fs NAMENODE -touchz /dir0/dir1/file1</command>
  9318. <command>-fs NAMENODE -touchz /dir0/dir1/file2</command>
  9319. <command>-fs NAMENODE -mkdir /dir2</command>
  9320. <command>-fs NAMENODE -mkdir /dir2/dir1</command>
  9321. <command>-fs NAMENODE -touchz /dir2/file0</command>
  9322. <command>-fs NAMENODE -touchz /dir2/dir1/file1</command>
  9323. <command>-fs NAMENODE -touchz /dir2/dir1/file2</command>
  9324. <command>-fs NAMENODE -chmod 777 /dir0 /dir2</command>
  9325. <command>-fs NAMENODE -ls -R /dir*</command>
  9326. </test-commands>
  9327. <cleanup-commands>
  9328. <command>-fs NAMENODE -rm -r /dir*</command>
  9329. </cleanup-commands>
  9330. <comparators>
  9331. <comparator>
  9332. <type>RegexpComparator</type>
  9333. <expected-output>^drwxr-xr-x( )*-( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1</expected-output>
  9334. </comparator>
  9335. <comparator>
  9336. <type>RegexpComparator</type>
  9337. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1/file1</expected-output>
  9338. </comparator>
  9339. <comparator>
  9340. <type>RegexpComparator</type>
  9341. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1/file2</expected-output>
  9342. </comparator>
  9343. <comparator>
  9344. <type>RegexpComparator</type>
  9345. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/file0</expected-output>
  9346. </comparator>
  9347. <comparator>
  9348. <type>RegexpComparator</type>
  9349. <expected-output>^drwxr-xr-x( )*-( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir2/dir1</expected-output>
  9350. </comparator>
  9351. <comparator>
  9352. <type>RegexpComparator</type>
  9353. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir2/dir1/file1</expected-output>
  9354. </comparator>
  9355. <comparator>
  9356. <type>RegexpComparator</type>
  9357. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir2/dir1/file2</expected-output>
  9358. </comparator>
  9359. <comparator>
  9360. <type>RegexpComparator</type>
  9361. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir2/file0</expected-output>
  9362. </comparator>
  9363. </comparators>
  9364. </test>
  9365. <test> <!-- TESTED -->
  9366. <description>chmod: change permission(octal mode) of multiple directories in relative path without globbing</description>
  9367. <test-commands>
  9368. <command>-fs NAMENODE -mkdir -p dir0</command>
  9369. <command>-fs NAMENODE -mkdir -p dir0/dir1</command>
  9370. <command>-fs NAMENODE -touchz dir0/file0</command>
  9371. <command>-fs NAMENODE -touchz dir0/dir1/file1</command>
  9372. <command>-fs NAMENODE -touchz dir0/dir1/file2</command>
  9373. <command>-fs NAMENODE -mkdir -p dir2</command>
  9374. <command>-fs NAMENODE -mkdir -p dir2/dir1</command>
  9375. <command>-fs NAMENODE -touchz dir2/file0</command>
  9376. <command>-fs NAMENODE -touchz dir2/dir1/file1</command>
  9377. <command>-fs NAMENODE -touchz dir2/dir1/file2</command>
  9378. <command>-fs NAMENODE -chmod 777 dir0 dir2</command>
  9379. <command>-fs NAMENODE -ls -R dir*</command>
  9380. </test-commands>
  9381. <cleanup-commands>
  9382. <command>-fs NAMENODE -rm -r dir*</command>
  9383. </cleanup-commands>
  9384. <comparators>
  9385. <comparator>
  9386. <type>RegexpComparator</type>
  9387. <expected-output>^drwxr-xr-x( )*-( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/dir1</expected-output>
  9388. </comparator>
  9389. <comparator>
  9390. <type>RegexpComparator</type>
  9391. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/dir1/file1</expected-output>
  9392. </comparator>
  9393. <comparator>
  9394. <type>RegexpComparator</type>
  9395. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/dir1/file2</expected-output>
  9396. </comparator>
  9397. <comparator>
  9398. <type>RegexpComparator</type>
  9399. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/file0</expected-output>
  9400. </comparator>
  9401. <comparator>
  9402. <type>RegexpComparator</type>
  9403. <expected-output>^drwxr-xr-x( )*-( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir2/dir1</expected-output>
  9404. </comparator>
  9405. <comparator>
  9406. <type>RegexpComparator</type>
  9407. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir2/dir1/file1</expected-output>
  9408. </comparator>
  9409. <comparator>
  9410. <type>RegexpComparator</type>
  9411. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir2/dir1/file2</expected-output>
  9412. </comparator>
  9413. <comparator>
  9414. <type>RegexpComparator</type>
  9415. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir2/file0</expected-output>
  9416. </comparator>
  9417. </comparators>
  9418. </test>
  9419. <test> <!-- TESTED -->
  9420. <description>chmod: change permission(normal mode) of multiple files in absolute path using globbing</description>
  9421. <test-commands>
  9422. <command>-fs NAMENODE -touchz /file1</command>
  9423. <command>-fs NAMENODE -touchz /file2</command>
  9424. <command>-fs NAMENODE -touchz /file3</command>
  9425. <command>-fs NAMENODE -touchz /file4</command>
  9426. <command>-fs NAMENODE -chmod a+rw /file* </command>
  9427. <command>-fs NAMENODE -ls -R /file*</command>
  9428. </test-commands>
  9429. <cleanup-commands>
  9430. <command>-fs NAMENODE -rm /file*</command>
  9431. </cleanup-commands>
  9432. <comparators>
  9433. <comparator>
  9434. <type>RegexpComparator</type>
  9435. <expected-output>^-rw-rw-rw-( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/file1</expected-output>
  9436. </comparator>
  9437. <comparator>
  9438. <type>RegexpComparator</type>
  9439. <expected-output>^-rw-rw-rw-( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/file2</expected-output>
  9440. </comparator>
  9441. <comparator>
  9442. <type>RegexpComparator</type>
  9443. <expected-output>^-rw-rw-rw-( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/file3</expected-output>
  9444. </comparator>
  9445. <comparator>
  9446. <type>RegexpComparator</type>
  9447. <expected-output>^-rw-rw-rw-( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/file4</expected-output>
  9448. </comparator>
  9449. </comparators>
  9450. </test>
  9451. <test> <!-- TESTED -->
  9452. <description>chmod: change permission(normal mode) of multiple files in relative path using globbing</description>
  9453. <test-commands>
  9454. <command>-fs NAMENODE -touchz file1</command>
  9455. <command>-fs NAMENODE -touchz file2</command>
  9456. <command>-fs NAMENODE -touchz file3</command>
  9457. <command>-fs NAMENODE -touchz file4</command>
  9458. <command>-fs NAMENODE -chmod a+rw file* </command>
  9459. <command>-fs NAMENODE -ls -R file*</command>
  9460. </test-commands>
  9461. <cleanup-commands>
  9462. <command>-fs NAMENODE -rm file*</command>
  9463. </cleanup-commands>
  9464. <comparators>
  9465. <comparator>
  9466. <type>RegexpComparator</type>
  9467. <expected-output>^-rw-rw-rw-( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*file1</expected-output>
  9468. </comparator>
  9469. <comparator>
  9470. <type>RegexpComparator</type>
  9471. <expected-output>^-rw-rw-rw-( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*file2</expected-output>
  9472. </comparator>
  9473. <comparator>
  9474. <type>RegexpComparator</type>
  9475. <expected-output>^-rw-rw-rw-( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*file3</expected-output>
  9476. </comparator>
  9477. <comparator>
  9478. <type>RegexpComparator</type>
  9479. <expected-output>^-rw-rw-rw-( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*file4</expected-output>
  9480. </comparator>
  9481. </comparators>
  9482. </test>
  9483. <test> <!-- TESTED -->
  9484. <description>chmod: change permission(normal mode) of multiple directories in absolute path using globbing</description>
  9485. <test-commands>
  9486. <command>-fs NAMENODE -mkdir /dir0</command>
  9487. <command>-fs NAMENODE -mkdir /dir0/dir1</command>
  9488. <command>-fs NAMENODE -touchz /dir0/file0</command>
  9489. <command>-fs NAMENODE -touchz /dir0/dir1/file1</command>
  9490. <command>-fs NAMENODE -touchz /dir0/dir1/file2</command>
  9491. <command>-fs NAMENODE -mkdir /dir2</command>
  9492. <command>-fs NAMENODE -mkdir /dir2/dir1</command>
  9493. <command>-fs NAMENODE -touchz /dir2/file0</command>
  9494. <command>-fs NAMENODE -touchz /dir2/dir1/file1</command>
  9495. <command>-fs NAMENODE -touchz /dir2/dir1/file2</command>
  9496. <command>-fs NAMENODE -chmod a+rwx /dir*</command>
  9497. <command>-fs NAMENODE -ls -R /dir*</command>
  9498. </test-commands>
  9499. <cleanup-commands>
  9500. <command>-fs NAMENODE -rm -r /dir*</command>
  9501. </cleanup-commands>
  9502. <comparators>
  9503. <comparator>
  9504. <type>RegexpComparator</type>
  9505. <expected-output>^drwxr-xr-x( )*-( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1</expected-output>
  9506. </comparator>
  9507. <comparator>
  9508. <type>RegexpComparator</type>
  9509. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1/file1</expected-output>
  9510. </comparator>
  9511. <comparator>
  9512. <type>RegexpComparator</type>
  9513. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1/file2</expected-output>
  9514. </comparator>
  9515. <comparator>
  9516. <type>RegexpComparator</type>
  9517. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/file0</expected-output>
  9518. </comparator>
  9519. <comparator>
  9520. <type>RegexpComparator</type>
  9521. <expected-output>^drwxr-xr-x( )*-( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir2/dir1</expected-output>
  9522. </comparator>
  9523. <comparator>
  9524. <type>RegexpComparator</type>
  9525. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir2/dir1/file1</expected-output>
  9526. </comparator>
  9527. <comparator>
  9528. <type>RegexpComparator</type>
  9529. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir2/dir1/file2</expected-output>
  9530. </comparator>
  9531. <comparator>
  9532. <type>RegexpComparator</type>
  9533. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir2/file0</expected-output>
  9534. </comparator>
  9535. </comparators>
  9536. </test>
  9537. <test> <!-- TESTED -->
  9538. <description>chmod: change permission(normal mode) of multiple directories in relative path using globbing</description>
  9539. <test-commands>
  9540. <command>-fs NAMENODE -mkdir -p dir0</command>
  9541. <command>-fs NAMENODE -mkdir -p dir0/dir1</command>
  9542. <command>-fs NAMENODE -touchz dir0/file0</command>
  9543. <command>-fs NAMENODE -touchz dir0/dir1/file1</command>
  9544. <command>-fs NAMENODE -touchz dir0/dir1/file2</command>
  9545. <command>-fs NAMENODE -mkdir -p dir2</command>
  9546. <command>-fs NAMENODE -mkdir -p dir2/dir1</command>
  9547. <command>-fs NAMENODE -touchz dir2/file0</command>
  9548. <command>-fs NAMENODE -touchz dir2/dir1/file1</command>
  9549. <command>-fs NAMENODE -touchz dir2/dir1/file2</command>
  9550. <command>-fs NAMENODE -chmod a+rwx dir*</command>
  9551. <command>-fs NAMENODE -ls -R dir*</command>
  9552. </test-commands>
  9553. <cleanup-commands>
  9554. <command>-fs NAMENODE -rm -r dir*</command>
  9555. </cleanup-commands>
  9556. <comparators>
  9557. <comparator>
  9558. <type>RegexpComparator</type>
  9559. <expected-output>^drwxr-xr-x( )*-( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/dir1</expected-output>
  9560. </comparator>
  9561. <comparator>
  9562. <type>RegexpComparator</type>
  9563. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/dir1/file1</expected-output>
  9564. </comparator>
  9565. <comparator>
  9566. <type>RegexpComparator</type>
  9567. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/dir1/file2</expected-output>
  9568. </comparator>
  9569. <comparator>
  9570. <type>RegexpComparator</type>
  9571. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/file0</expected-output>
  9572. </comparator>
  9573. <comparator>
  9574. <type>RegexpComparator</type>
  9575. <expected-output>^drwxr-xr-x( )*-( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir2/dir1</expected-output>
  9576. </comparator>
  9577. <comparator>
  9578. <type>RegexpComparator</type>
  9579. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir2/dir1/file1</expected-output>
  9580. </comparator>
  9581. <comparator>
  9582. <type>RegexpComparator</type>
  9583. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir2/dir1/file2</expected-output>
  9584. </comparator>
  9585. <comparator>
  9586. <type>RegexpComparator</type>
  9587. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir2/file0</expected-output>
  9588. </comparator>
  9589. </comparators>
  9590. </test>
  9591. <test> <!-- TESTED -->
  9592. <description>chmod: change permission(normal mode) of multiple files in absolute path without globbing</description>
  9593. <test-commands>
  9594. <command>-fs NAMENODE -touchz /file1</command>
  9595. <command>-fs NAMENODE -touchz /file2</command>
  9596. <command>-fs NAMENODE -touchz /file3</command>
  9597. <command>-fs NAMENODE -touchz /file4</command>
  9598. <command>-fs NAMENODE -chmod a+rw /file1 /file2 /file3 /file4 </command>
  9599. <command>-fs NAMENODE -ls -R /file*</command>
  9600. </test-commands>
  9601. <cleanup-commands>
  9602. <command>-fs NAMENODE -rm /file*</command>
  9603. </cleanup-commands>
  9604. <comparators>
  9605. <comparator>
  9606. <type>RegexpComparator</type>
  9607. <expected-output>^-rw-rw-rw-( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/file1</expected-output>
  9608. </comparator>
  9609. <comparator>
  9610. <type>RegexpComparator</type>
  9611. <expected-output>^-rw-rw-rw-( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/file2</expected-output>
  9612. </comparator>
  9613. <comparator>
  9614. <type>RegexpComparator</type>
  9615. <expected-output>^-rw-rw-rw-( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/file3</expected-output>
  9616. </comparator>
  9617. <comparator>
  9618. <type>RegexpComparator</type>
  9619. <expected-output>^-rw-rw-rw-( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/file4</expected-output>
  9620. </comparator>
  9621. </comparators>
  9622. </test>
  9623. <test> <!-- TESTED -->
  9624. <description>chmod: change permission(normal mode) of multiple files in relative path without globbing</description>
  9625. <test-commands>
  9626. <command>-fs NAMENODE -touchz file1</command>
  9627. <command>-fs NAMENODE -touchz file2</command>
  9628. <command>-fs NAMENODE -touchz file3</command>
  9629. <command>-fs NAMENODE -touchz file4</command>
  9630. <command>-fs NAMENODE -chmod a+rw file1 file2 file3 file4 </command>
  9631. <command>-fs NAMENODE -ls -R file*</command>
  9632. </test-commands>
  9633. <cleanup-commands>
  9634. <command>-fs NAMENODE -rm file*</command>
  9635. </cleanup-commands>
  9636. <comparators>
  9637. <comparator>
  9638. <type>RegexpComparator</type>
  9639. <expected-output>^-rw-rw-rw-( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*file1</expected-output>
  9640. </comparator>
  9641. <comparator>
  9642. <type>RegexpComparator</type>
  9643. <expected-output>^-rw-rw-rw-( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*file2</expected-output>
  9644. </comparator>
  9645. <comparator>
  9646. <type>RegexpComparator</type>
  9647. <expected-output>^-rw-rw-rw-( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*file3</expected-output>
  9648. </comparator>
  9649. <comparator>
  9650. <type>RegexpComparator</type>
  9651. <expected-output>^-rw-rw-rw-( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*file4</expected-output>
  9652. </comparator>
  9653. </comparators>
  9654. </test>
  9655. <test> <!-- TESTED -->
  9656. <description>chmod: change permission(normal mode) of multiple directories in absolute path without globbing</description>
  9657. <test-commands>
  9658. <command>-fs NAMENODE -mkdir /dir0</command>
  9659. <command>-fs NAMENODE -mkdir /dir0/dir1</command>
  9660. <command>-fs NAMENODE -touchz /dir0/file0</command>
  9661. <command>-fs NAMENODE -touchz /dir0/dir1/file1</command>
  9662. <command>-fs NAMENODE -touchz /dir0/dir1/file2</command>
  9663. <command>-fs NAMENODE -mkdir /dir2</command>
  9664. <command>-fs NAMENODE -mkdir /dir2/dir1</command>
  9665. <command>-fs NAMENODE -touchz /dir2/file0</command>
  9666. <command>-fs NAMENODE -touchz /dir2/dir1/file1</command>
  9667. <command>-fs NAMENODE -touchz /dir2/dir1/file2</command>
  9668. <command>-fs NAMENODE -chmod a+rwx /dir0 /dir2</command>
  9669. <command>-fs NAMENODE -ls -R /dir*</command>
  9670. </test-commands>
  9671. <cleanup-commands>
  9672. <command>-fs NAMENODE -rm -r /dir*</command>
  9673. </cleanup-commands>
  9674. <comparators>
  9675. <comparator>
  9676. <type>RegexpComparator</type>
  9677. <expected-output>^drwxr-xr-x( )*-( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1</expected-output>
  9678. </comparator>
  9679. <comparator>
  9680. <type>RegexpComparator</type>
  9681. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1/file1</expected-output>
  9682. </comparator>
  9683. <comparator>
  9684. <type>RegexpComparator</type>
  9685. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1/file2</expected-output>
  9686. </comparator>
  9687. <comparator>
  9688. <type>RegexpComparator</type>
  9689. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/file0</expected-output>
  9690. </comparator>
  9691. <comparator>
  9692. <type>RegexpComparator</type>
  9693. <expected-output>^drwxr-xr-x( )*-( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir2/dir1</expected-output>
  9694. </comparator>
  9695. <comparator>
  9696. <type>RegexpComparator</type>
  9697. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir2/dir1/file1</expected-output>
  9698. </comparator>
  9699. <comparator>
  9700. <type>RegexpComparator</type>
  9701. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir2/dir1/file2</expected-output>
  9702. </comparator>
  9703. <comparator>
  9704. <type>RegexpComparator</type>
  9705. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir2/file0</expected-output>
  9706. </comparator>
  9707. </comparators>
  9708. </test>
  9709. <test> <!-- TESTED -->
  9710. <description>chmod: change permission(normal mode) of multiple directories in relative path without globbing</description>
  9711. <test-commands>
  9712. <command>-fs NAMENODE -mkdir -p dir0</command>
  9713. <command>-fs NAMENODE -mkdir -p dir0/dir1</command>
  9714. <command>-fs NAMENODE -touchz dir0/file0</command>
  9715. <command>-fs NAMENODE -touchz dir0/dir1/file1</command>
  9716. <command>-fs NAMENODE -touchz dir0/dir1/file2</command>
  9717. <command>-fs NAMENODE -mkdir -p dir2</command>
  9718. <command>-fs NAMENODE -mkdir -p dir2/dir1</command>
  9719. <command>-fs NAMENODE -touchz dir2/file0</command>
  9720. <command>-fs NAMENODE -touchz dir2/dir1/file1</command>
  9721. <command>-fs NAMENODE -touchz dir2/dir1/file2</command>
  9722. <command>-fs NAMENODE -chmod a+rwx dir0 dir2</command>
  9723. <command>-fs NAMENODE -ls -R dir*</command>
  9724. </test-commands>
  9725. <cleanup-commands>
  9726. <command>-fs NAMENODE -rm -r dir*</command>
  9727. </cleanup-commands>
  9728. <comparators>
  9729. <comparator>
  9730. <type>RegexpComparator</type>
  9731. <expected-output>^drwxr-xr-x( )*-( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/dir1</expected-output>
  9732. </comparator>
  9733. <comparator>
  9734. <type>RegexpComparator</type>
  9735. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/dir1/file1</expected-output>
  9736. </comparator>
  9737. <comparator>
  9738. <type>RegexpComparator</type>
  9739. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/dir1/file2</expected-output>
  9740. </comparator>
  9741. <comparator>
  9742. <type>RegexpComparator</type>
  9743. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/file0</expected-output>
  9744. </comparator>
  9745. <comparator>
  9746. <type>RegexpComparator</type>
  9747. <expected-output>^drwxr-xr-x( )*-( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir2/dir1</expected-output>
  9748. </comparator>
  9749. <comparator>
  9750. <type>RegexpComparator</type>
  9751. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir2/dir1/file1</expected-output>
  9752. </comparator>
  9753. <comparator>
  9754. <type>RegexpComparator</type>
  9755. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir2/dir1/file2</expected-output>
  9756. </comparator>
  9757. <comparator>
  9758. <type>RegexpComparator</type>
  9759. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir2/file0</expected-output>
  9760. </comparator>
  9761. </comparators>
  9762. </test>
  9763. <test> <!-- TESTED -->
  9764. <description>chmod: change permission(octal mode) of multiple directories in absolute path recursively using globbing</description>
  9765. <test-commands>
  9766. <command>-fs NAMENODE -mkdir /dir0</command>
  9767. <command>-fs NAMENODE -mkdir /dir0/dir1</command>
  9768. <command>-fs NAMENODE -touchz /dir0/file0</command>
  9769. <command>-fs NAMENODE -touchz /dir0/dir1/file1</command>
  9770. <command>-fs NAMENODE -touchz /dir0/dir1/file2</command>
  9771. <command>-fs NAMENODE -mkdir /dir2</command>
  9772. <command>-fs NAMENODE -mkdir /dir2/dir1</command>
  9773. <command>-fs NAMENODE -touchz /dir2/file0</command>
  9774. <command>-fs NAMENODE -touchz /dir2/dir1/file1</command>
  9775. <command>-fs NAMENODE -touchz /dir2/dir1/file2</command>
  9776. <command>-fs NAMENODE -chmod -R 777 /dir*</command>
  9777. <command>-fs NAMENODE -ls -R /dir*</command>
  9778. </test-commands>
  9779. <cleanup-commands>
  9780. <command>-fs NAMENODE -rm -r /dir*</command>
  9781. </cleanup-commands>
  9782. <comparators>
  9783. <comparator>
  9784. <type>RegexpComparator</type>
  9785. <expected-output>^drwxrwxrwx( )*-( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1</expected-output>
  9786. </comparator>
  9787. <comparator>
  9788. <type>RegexpComparator</type>
  9789. <expected-output>^-rwxrwxrwx( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1/file1</expected-output>
  9790. </comparator>
  9791. <comparator>
  9792. <type>RegexpComparator</type>
  9793. <expected-output>^-rwxrwxrwx( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1/file2</expected-output>
  9794. </comparator>
  9795. <comparator>
  9796. <type>RegexpComparator</type>
  9797. <expected-output>^-rwxrwxrwx( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/file0</expected-output>
  9798. </comparator>
  9799. <comparator>
  9800. <type>RegexpComparator</type>
  9801. <expected-output>^drwxrwxrwx( )*-( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir2/dir1</expected-output>
  9802. </comparator>
  9803. <comparator>
  9804. <type>RegexpComparator</type>
  9805. <expected-output>^-rwxrwxrwx( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir2/dir1/file1</expected-output>
  9806. </comparator>
  9807. <comparator>
  9808. <type>RegexpComparator</type>
  9809. <expected-output>^-rwxrwxrwx( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir2/dir1/file2</expected-output>
  9810. </comparator>
  9811. <comparator>
  9812. <type>RegexpComparator</type>
  9813. <expected-output>^-rwxrwxrwx( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir2/file0</expected-output>
  9814. </comparator>
  9815. </comparators>
  9816. </test>
  9817. <test> <!-- TESTED -->
  9818. <description>chmod: change permission(octal mode) of multiple directories in relative path recursively using globbing</description>
  9819. <test-commands>
  9820. <command>-fs NAMENODE -mkdir -p dir0</command>
  9821. <command>-fs NAMENODE -mkdir -p dir0/dir1</command>
  9822. <command>-fs NAMENODE -touchz dir0/file0</command>
  9823. <command>-fs NAMENODE -touchz dir0/dir1/file1</command>
  9824. <command>-fs NAMENODE -touchz dir0/dir1/file2</command>
  9825. <command>-fs NAMENODE -mkdir -p dir2</command>
  9826. <command>-fs NAMENODE -mkdir -p dir2/dir1</command>
  9827. <command>-fs NAMENODE -touchz dir2/file0</command>
  9828. <command>-fs NAMENODE -touchz dir2/dir1/file1</command>
  9829. <command>-fs NAMENODE -touchz dir2/dir1/file2</command>
  9830. <command>-fs NAMENODE -chmod -R 777 dir*</command>
  9831. <command>-fs NAMENODE -ls -R dir*</command>
  9832. </test-commands>
  9833. <cleanup-commands>
  9834. <command>-fs NAMENODE -rm -r dir*</command>
  9835. </cleanup-commands>
  9836. <comparators>
  9837. <comparator>
  9838. <type>RegexpComparator</type>
  9839. <expected-output>^drwxrwxrwx( )*-( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/dir1</expected-output>
  9840. </comparator>
  9841. <comparator>
  9842. <type>RegexpComparator</type>
  9843. <expected-output>^-rwxrwxrwx( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/dir1/file1</expected-output>
  9844. </comparator>
  9845. <comparator>
  9846. <type>RegexpComparator</type>
  9847. <expected-output>^-rwxrwxrwx( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/dir1/file2</expected-output>
  9848. </comparator>
  9849. <comparator>
  9850. <type>RegexpComparator</type>
  9851. <expected-output>^-rwxrwxrwx( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/file0</expected-output>
  9852. </comparator>
  9853. <comparator>
  9854. <type>RegexpComparator</type>
  9855. <expected-output>^drwxrwxrwx( )*-( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir2/dir1</expected-output>
  9856. </comparator>
  9857. <comparator>
  9858. <type>RegexpComparator</type>
  9859. <expected-output>^-rwxrwxrwx( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir2/dir1/file1</expected-output>
  9860. </comparator>
  9861. <comparator>
  9862. <type>RegexpComparator</type>
  9863. <expected-output>^-rwxrwxrwx( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir2/dir1/file2</expected-output>
  9864. </comparator>
  9865. <comparator>
  9866. <type>RegexpComparator</type>
  9867. <expected-output>^-rwxrwxrwx( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir2/file0</expected-output>
  9868. </comparator>
  9869. </comparators>
  9870. </test>
  9871. <test> <!-- TESTED -->
  9872. <description>chmod: change permission(octal mode) of multiple directories in absolute path recursively without globbing</description>
  9873. <test-commands>
  9874. <command>-fs NAMENODE -mkdir /dir0</command>
  9875. <command>-fs NAMENODE -mkdir /dir0/dir1</command>
  9876. <command>-fs NAMENODE -touchz /dir0/file0</command>
  9877. <command>-fs NAMENODE -touchz /dir0/dir1/file1</command>
  9878. <command>-fs NAMENODE -touchz /dir0/dir1/file2</command>
  9879. <command>-fs NAMENODE -mkdir /dir2</command>
  9880. <command>-fs NAMENODE -mkdir /dir2/dir1</command>
  9881. <command>-fs NAMENODE -touchz /dir2/file0</command>
  9882. <command>-fs NAMENODE -touchz /dir2/dir1/file1</command>
  9883. <command>-fs NAMENODE -touchz /dir2/dir1/file2</command>
  9884. <command>-fs NAMENODE -chmod -R 777 /dir0 /dir2</command>
  9885. <command>-fs NAMENODE -ls -R /dir*</command>
  9886. </test-commands>
  9887. <cleanup-commands>
  9888. <command>-fs NAMENODE -rm -r /dir*</command>
  9889. </cleanup-commands>
  9890. <comparators>
  9891. <comparator>
  9892. <type>RegexpComparator</type>
  9893. <expected-output>^drwxrwxrwx( )*-( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1</expected-output>
  9894. </comparator>
  9895. <comparator>
  9896. <type>RegexpComparator</type>
  9897. <expected-output>^-rwxrwxrwx( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1/file1</expected-output>
  9898. </comparator>
  9899. <comparator>
  9900. <type>RegexpComparator</type>
  9901. <expected-output>^-rwxrwxrwx( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1/file2</expected-output>
  9902. </comparator>
  9903. <comparator>
  9904. <type>RegexpComparator</type>
  9905. <expected-output>^-rwxrwxrwx( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/file0</expected-output>
  9906. </comparator>
  9907. <comparator>
  9908. <type>RegexpComparator</type>
  9909. <expected-output>^drwxrwxrwx( )*-( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir2/dir1</expected-output>
  9910. </comparator>
  9911. <comparator>
  9912. <type>RegexpComparator</type>
  9913. <expected-output>^-rwxrwxrwx( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir2/dir1/file1</expected-output>
  9914. </comparator>
  9915. <comparator>
  9916. <type>RegexpComparator</type>
  9917. <expected-output>^-rwxrwxrwx( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir2/dir1/file2</expected-output>
  9918. </comparator>
  9919. <comparator>
  9920. <type>RegexpComparator</type>
  9921. <expected-output>^-rwxrwxrwx( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir2/file0</expected-output>
  9922. </comparator>
  9923. </comparators>
  9924. </test>
  9925. <test> <!-- TESTED -->
  9926. <description>chmod: change permission(octal mode) of multiple directories in relative path recursively without globbing</description>
  9927. <test-commands>
  9928. <command>-fs NAMENODE -mkdir -p dir0</command>
  9929. <command>-fs NAMENODE -mkdir -p dir0/dir1</command>
  9930. <command>-fs NAMENODE -touchz dir0/file0</command>
  9931. <command>-fs NAMENODE -touchz dir0/dir1/file1</command>
  9932. <command>-fs NAMENODE -touchz dir0/dir1/file2</command>
  9933. <command>-fs NAMENODE -mkdir -p dir2</command>
  9934. <command>-fs NAMENODE -mkdir -p dir2/dir1</command>
  9935. <command>-fs NAMENODE -touchz dir2/file0</command>
  9936. <command>-fs NAMENODE -touchz dir2/dir1/file1</command>
  9937. <command>-fs NAMENODE -touchz dir2/dir1/file2</command>
  9938. <command>-fs NAMENODE -chmod -R 777 dir0 dir2</command>
  9939. <command>-fs NAMENODE -ls -R dir*</command>
  9940. </test-commands>
  9941. <cleanup-commands>
  9942. <command>-fs NAMENODE -rm -r dir*</command>
  9943. </cleanup-commands>
  9944. <comparators>
  9945. <comparator>
  9946. <type>RegexpComparator</type>
  9947. <expected-output>^drwxrwxrwx( )*-( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/dir1</expected-output>
  9948. </comparator>
  9949. <comparator>
  9950. <type>RegexpComparator</type>
  9951. <expected-output>^-rwxrwxrwx( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/dir1/file1</expected-output>
  9952. </comparator>
  9953. <comparator>
  9954. <type>RegexpComparator</type>
  9955. <expected-output>^-rwxrwxrwx( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/dir1/file2</expected-output>
  9956. </comparator>
  9957. <comparator>
  9958. <type>RegexpComparator</type>
  9959. <expected-output>^-rwxrwxrwx( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/file0</expected-output>
  9960. </comparator>
  9961. <comparator>
  9962. <type>RegexpComparator</type>
  9963. <expected-output>^drwxrwxrwx( )*-( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir2/dir1</expected-output>
  9964. </comparator>
  9965. <comparator>
  9966. <type>RegexpComparator</type>
  9967. <expected-output>^-rwxrwxrwx( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir2/dir1/file1</expected-output>
  9968. </comparator>
  9969. <comparator>
  9970. <type>RegexpComparator</type>
  9971. <expected-output>^-rwxrwxrwx( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir2/dir1/file2</expected-output>
  9972. </comparator>
  9973. <comparator>
  9974. <type>RegexpComparator</type>
  9975. <expected-output>^-rwxrwxrwx( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir2/file0</expected-output>
  9976. </comparator>
  9977. </comparators>
  9978. </test>
  9979. <test> <!-- TESTED -->
  9980. <description>chmod: change permission(normal mode) of multiple directories in absolute path recursively using globbing</description>
  9981. <test-commands>
  9982. <command>-fs NAMENODE -mkdir /dir0</command>
  9983. <command>-fs NAMENODE -mkdir /dir0/dir1</command>
  9984. <command>-fs NAMENODE -touchz /dir0/file0</command>
  9985. <command>-fs NAMENODE -touchz /dir0/dir1/file1</command>
  9986. <command>-fs NAMENODE -touchz /dir0/dir1/file2</command>
  9987. <command>-fs NAMENODE -mkdir /dir2</command>
  9988. <command>-fs NAMENODE -mkdir /dir2/dir1</command>
  9989. <command>-fs NAMENODE -touchz /dir2/file0</command>
  9990. <command>-fs NAMENODE -touchz /dir2/dir1/file1</command>
  9991. <command>-fs NAMENODE -touchz /dir2/dir1/file2</command>
  9992. <command>-fs NAMENODE -chmod -R a+rwx /dir*</command>
  9993. <command>-fs NAMENODE -ls -R /dir*</command>
  9994. </test-commands>
  9995. <cleanup-commands>
  9996. <command>-fs NAMENODE -rm -r /dir*</command>
  9997. </cleanup-commands>
  9998. <comparators>
  9999. <comparator>
  10000. <type>RegexpComparator</type>
  10001. <expected-output>^drwxrwxrwx( )*-( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1</expected-output>
  10002. </comparator>
  10003. <comparator>
  10004. <type>RegexpComparator</type>
  10005. <expected-output>^-rwxrwxrwx( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1/file1</expected-output>
  10006. </comparator>
  10007. <comparator>
  10008. <type>RegexpComparator</type>
  10009. <expected-output>^-rwxrwxrwx( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1/file2</expected-output>
  10010. </comparator>
  10011. <comparator>
  10012. <type>RegexpComparator</type>
  10013. <expected-output>^-rwxrwxrwx( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/file0</expected-output>
  10014. </comparator>
  10015. <comparator>
  10016. <type>RegexpComparator</type>
  10017. <expected-output>^drwxrwxrwx( )*-( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir2/dir1</expected-output>
  10018. </comparator>
  10019. <comparator>
  10020. <type>RegexpComparator</type>
  10021. <expected-output>^-rwxrwxrwx( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir2/dir1/file1</expected-output>
  10022. </comparator>
  10023. <comparator>
  10024. <type>RegexpComparator</type>
  10025. <expected-output>^-rwxrwxrwx( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir2/dir1/file2</expected-output>
  10026. </comparator>
  10027. <comparator>
  10028. <type>RegexpComparator</type>
  10029. <expected-output>^-rwxrwxrwx( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir2/file0</expected-output>
  10030. </comparator>
  10031. </comparators>
  10032. </test>
  10033. <test> <!-- TESTED -->
  10034. <description>chmod: change permission(normal mode) of multiple directories in relative path recursively using globbing</description>
  10035. <test-commands>
  10036. <command>-fs NAMENODE -mkdir -p dir0</command>
  10037. <command>-fs NAMENODE -mkdir -p dir0/dir1</command>
  10038. <command>-fs NAMENODE -touchz dir0/file0</command>
  10039. <command>-fs NAMENODE -touchz dir0/dir1/file1</command>
  10040. <command>-fs NAMENODE -touchz dir0/dir1/file2</command>
  10041. <command>-fs NAMENODE -mkdir -p dir2</command>
  10042. <command>-fs NAMENODE -mkdir -p dir2/dir1</command>
  10043. <command>-fs NAMENODE -touchz dir2/file0</command>
  10044. <command>-fs NAMENODE -touchz dir2/dir1/file1</command>
  10045. <command>-fs NAMENODE -touchz dir2/dir1/file2</command>
  10046. <command>-fs NAMENODE -chmod -R a+rwx dir*</command>
  10047. <command>-fs NAMENODE -ls -R dir*</command>
  10048. </test-commands>
  10049. <cleanup-commands>
  10050. <command>-fs NAMENODE -rm -r dir*</command>
  10051. </cleanup-commands>
  10052. <comparators>
  10053. <comparator>
  10054. <type>RegexpComparator</type>
  10055. <expected-output>^drwxrwxrwx( )*-( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/dir1</expected-output>
  10056. </comparator>
  10057. <comparator>
  10058. <type>RegexpComparator</type>
  10059. <expected-output>^-rwxrwxrwx( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/dir1/file1</expected-output>
  10060. </comparator>
  10061. <comparator>
  10062. <type>RegexpComparator</type>
  10063. <expected-output>^-rwxrwxrwx( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/dir1/file2</expected-output>
  10064. </comparator>
  10065. <comparator>
  10066. <type>RegexpComparator</type>
  10067. <expected-output>^-rwxrwxrwx( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/file0</expected-output>
  10068. </comparator>
  10069. <comparator>
  10070. <type>RegexpComparator</type>
  10071. <expected-output>^drwxrwxrwx( )*-( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir2/dir1</expected-output>
  10072. </comparator>
  10073. <comparator>
  10074. <type>RegexpComparator</type>
  10075. <expected-output>^-rwxrwxrwx( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir2/dir1/file1</expected-output>
  10076. </comparator>
  10077. <comparator>
  10078. <type>RegexpComparator</type>
  10079. <expected-output>^-rwxrwxrwx( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir2/dir1/file2</expected-output>
  10080. </comparator>
  10081. <comparator>
  10082. <type>RegexpComparator</type>
  10083. <expected-output>^-rwxrwxrwx( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir2/file0</expected-output>
  10084. </comparator>
  10085. </comparators>
  10086. </test>
  10087. <test> <!-- TESTED -->
  10088. <description>chmod: change permission(normal mode) of multiple directories in absolute path recursively without globbing</description>
  10089. <test-commands>
  10090. <command>-fs NAMENODE -mkdir /dir0</command>
  10091. <command>-fs NAMENODE -mkdir /dir0/dir1</command>
  10092. <command>-fs NAMENODE -touchz /dir0/file0</command>
  10093. <command>-fs NAMENODE -touchz /dir0/dir1/file1</command>
  10094. <command>-fs NAMENODE -touchz /dir0/dir1/file2</command>
  10095. <command>-fs NAMENODE -mkdir /dir2</command>
  10096. <command>-fs NAMENODE -mkdir /dir2/dir1</command>
  10097. <command>-fs NAMENODE -touchz /dir2/file0</command>
  10098. <command>-fs NAMENODE -touchz /dir2/dir1/file1</command>
  10099. <command>-fs NAMENODE -touchz /dir2/dir1/file2</command>
  10100. <command>-fs NAMENODE -chmod -R a+rwx /dir0 /dir2</command>
  10101. <command>-fs NAMENODE -ls -R /dir*</command>
  10102. </test-commands>
  10103. <cleanup-commands>
  10104. <command>-fs NAMENODE -rm -r /dir*</command>
  10105. </cleanup-commands>
  10106. <comparators>
  10107. <comparator>
  10108. <type>RegexpComparator</type>
  10109. <expected-output>^drwxrwxrwx( )*-( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1</expected-output>
  10110. </comparator>
  10111. <comparator>
  10112. <type>RegexpComparator</type>
  10113. <expected-output>^-rwxrwxrwx( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1/file1</expected-output>
  10114. </comparator>
  10115. <comparator>
  10116. <type>RegexpComparator</type>
  10117. <expected-output>^-rwxrwxrwx( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1/file2</expected-output>
  10118. </comparator>
  10119. <comparator>
  10120. <type>RegexpComparator</type>
  10121. <expected-output>^-rwxrwxrwx( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/file0</expected-output>
  10122. </comparator>
  10123. <comparator>
  10124. <type>RegexpComparator</type>
  10125. <expected-output>^drwxrwxrwx( )*-( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir2/dir1</expected-output>
  10126. </comparator>
  10127. <comparator>
  10128. <type>RegexpComparator</type>
  10129. <expected-output>^-rwxrwxrwx( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir2/dir1/file1</expected-output>
  10130. </comparator>
  10131. <comparator>
  10132. <type>RegexpComparator</type>
  10133. <expected-output>^-rwxrwxrwx( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir2/dir1/file2</expected-output>
  10134. </comparator>
  10135. <comparator>
  10136. <type>RegexpComparator</type>
  10137. <expected-output>^-rwxrwxrwx( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir2/file0</expected-output>
  10138. </comparator>
  10139. </comparators>
  10140. </test>
  10141. <test> <!-- TESTED -->
  10142. <description>chmod: change permission(normal mode) of multiple directories in relative path recursively without globbing</description>
  10143. <test-commands>
  10144. <command>-fs NAMENODE -mkdir -p dir0</command>
  10145. <command>-fs NAMENODE -mkdir -p dir0/dir1</command>
  10146. <command>-fs NAMENODE -touchz dir0/file0</command>
  10147. <command>-fs NAMENODE -touchz dir0/dir1/file1</command>
  10148. <command>-fs NAMENODE -touchz dir0/dir1/file2</command>
  10149. <command>-fs NAMENODE -mkdir -p dir2</command>
  10150. <command>-fs NAMENODE -mkdir -p dir2/dir1</command>
  10151. <command>-fs NAMENODE -touchz dir2/file0</command>
  10152. <command>-fs NAMENODE -touchz dir2/dir1/file1</command>
  10153. <command>-fs NAMENODE -touchz dir2/dir1/file2</command>
  10154. <command>-fs NAMENODE -chmod -R a+rwx dir0 dir2</command>
  10155. <command>-fs NAMENODE -ls -R dir*</command>
  10156. </test-commands>
  10157. <cleanup-commands>
  10158. <command>-fs NAMENODE -rm -r dir*</command>
  10159. </cleanup-commands>
  10160. <comparators>
  10161. <comparator>
  10162. <type>RegexpComparator</type>
  10163. <expected-output>^drwxrwxrwx( )*-( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/dir1</expected-output>
  10164. </comparator>
  10165. <comparator>
  10166. <type>RegexpComparator</type>
  10167. <expected-output>^-rwxrwxrwx( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/dir1/file1</expected-output>
  10168. </comparator>
  10169. <comparator>
  10170. <type>RegexpComparator</type>
  10171. <expected-output>^-rwxrwxrwx( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/dir1/file2</expected-output>
  10172. </comparator>
  10173. <comparator>
  10174. <type>RegexpComparator</type>
  10175. <expected-output>^-rwxrwxrwx( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/file0</expected-output>
  10176. </comparator>
  10177. <comparator>
  10178. <type>RegexpComparator</type>
  10179. <expected-output>^drwxrwxrwx( )*-( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir2/dir1</expected-output>
  10180. </comparator>
  10181. <comparator>
  10182. <type>RegexpComparator</type>
  10183. <expected-output>^-rwxrwxrwx( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir2/dir1/file1</expected-output>
  10184. </comparator>
  10185. <comparator>
  10186. <type>RegexpComparator</type>
  10187. <expected-output>^-rwxrwxrwx( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir2/dir1/file2</expected-output>
  10188. </comparator>
  10189. <comparator>
  10190. <type>RegexpComparator</type>
  10191. <expected-output>^-rwxrwxrwx( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir2/file0</expected-output>
  10192. </comparator>
  10193. </comparators>
  10194. </test>
  10195. <test> <!-- TESTED -->
  10196. <description>chmod: invalid value in octal mode of file in absolute path</description>
  10197. <test-commands>
  10198. <command>-fs NAMENODE -touchz /file1</command>
  10199. <command>-fs NAMENODE -chmod 999 /file1</command>
  10200. </test-commands>
  10201. <cleanup-commands>
  10202. <command>-fs NAMENODE -rm /file1</command>
  10203. </cleanup-commands>
  10204. <comparators>
  10205. <comparator>
  10206. <type>RegexpComparator</type>
  10207. <expected-output>^-chmod: chmod : mode '999' does not match the expected pattern.</expected-output>
  10208. </comparator>
  10209. </comparators>
  10210. </test>
  10211. <test> <!-- TESTED -->
  10212. <description>chmod: invalid value in octal mode of file in relative path</description>
  10213. <test-commands>
  10214. <command>-fs NAMENODE -touchz file1</command>
  10215. <command>-fs NAMENODE -chmod 999 file1</command>
  10216. </test-commands>
  10217. <cleanup-commands>
  10218. <command>-fs NAMENODE -rm file1</command>
  10219. </cleanup-commands>
  10220. <comparators>
  10221. <comparator>
  10222. <type>RegexpComparator</type>
  10223. <expected-output>^-chmod: chmod : mode '999' does not match the expected pattern.</expected-output>
  10224. </comparator>
  10225. </comparators>
  10226. </test>
  10227. <test> <!-- TESTED -->
  10228. <description>chmod: invalid value in normal mode of file in absolute path</description>
  10229. <test-commands>
  10230. <command>-fs NAMENODE -touchz /file1</command>
  10231. <command>-fs NAMENODE -chmod r+def /file1</command>
  10232. </test-commands>
  10233. <cleanup-commands>
  10234. <command>-fs NAMENODE -rm /file1</command>
  10235. </cleanup-commands>
  10236. <comparators>
  10237. <comparator>
  10238. <type>RegexpComparator</type>
  10239. <expected-output>^-chmod: chmod : mode \'r\+def\' does not match the expected pattern.</expected-output>
  10240. </comparator>
  10241. </comparators>
  10242. </test>
  10243. <test> <!-- TESTED -->
  10244. <description>chmod: invalid value in normal mode of file in relative path</description>
  10245. <test-commands>
  10246. <command>-fs NAMENODE -touchz file1</command>
  10247. <command>-fs NAMENODE -chmod r+def file1</command>
  10248. </test-commands>
  10249. <cleanup-commands>
  10250. <command>-fs NAMENODE -rm file1</command>
  10251. </cleanup-commands>
  10252. <comparators>
  10253. <comparator>
  10254. <type>RegexpComparator</type>
  10255. <expected-output>^-chmod: chmod : mode \'r\+def\' does not match the expected pattern.</expected-output>
  10256. </comparator>
  10257. </comparators>
  10258. </test>
  10259. <test> <!-- TESTED -->
  10260. <description>chmod: change permission(octal mode) of file in hdfs:// path</description>
  10261. <test-commands>
  10262. <command>-fs NAMENODE -touchz hdfs:///file1</command>
  10263. <command>-fs NAMENODE -chmod 777 hdfs:///file1</command>
  10264. <command>-fs NAMENODE -ls hdfs:///file1</command>
  10265. </test-commands>
  10266. <cleanup-commands>
  10267. <command>-fs NAMENODE -rm hdfs:///file1</command>
  10268. </cleanup-commands>
  10269. <comparators>
  10270. <comparator>
  10271. <type>RegexpComparator</type>
  10272. <expected-output>^-rwxrwxrwx( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///file1</expected-output>
  10273. </comparator>
  10274. </comparators>
  10275. </test>
  10276. <test> <!-- TESTED -->
  10277. <description>chmod: change permission(octal mode) of directory in hdfs:// path</description>
  10278. <test-commands>
  10279. <command>-fs NAMENODE -mkdir hdfs:///dir0</command>
  10280. <command>-fs NAMENODE -mkdir hdfs:///dir0/dir1</command>
  10281. <command>-fs NAMENODE -touchz hdfs:///dir0/file0</command>
  10282. <command>-fs NAMENODE -touchz hdfs:///dir0/dir1/file1</command>
  10283. <command>-fs NAMENODE -touchz hdfs:///dir0/dir1/file2</command>
  10284. <command>-fs NAMENODE -chmod 777 hdfs:///dir0/dir1</command>
  10285. <command>-fs NAMENODE -ls -R hdfs:///dir0</command>
  10286. </test-commands>
  10287. <cleanup-commands>
  10288. <command>-fs NAMENODE -rm -r hdfs:///dir0</command>
  10289. </cleanup-commands>
  10290. <comparators>
  10291. <comparator>
  10292. <type>RegexpComparator</type>
  10293. <expected-output>^drwxrwxrwx( )*-( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir0/dir1</expected-output>
  10294. </comparator>
  10295. <comparator>
  10296. <type>RegexpComparator</type>
  10297. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir0/dir1/file1</expected-output>
  10298. </comparator>
  10299. <comparator>
  10300. <type>RegexpComparator</type>
  10301. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir0/dir1/file2</expected-output>
  10302. </comparator>
  10303. <comparator>
  10304. <type>RegexpComparator</type>
  10305. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir0/file0</expected-output>
  10306. </comparator>
  10307. </comparators>
  10308. </test>
  10309. <test> <!-- TESTED -->
  10310. <description>chmod: change permission(normal mode) of file in hdfs:// path</description>
  10311. <test-commands>
  10312. <command>-fs NAMENODE -touchz hdfs:///file1</command>
  10313. <command>-fs NAMENODE -chmod a+rw hdfs:///file1</command>
  10314. <command>-fs NAMENODE -ls hdfs:///file1</command>
  10315. </test-commands>
  10316. <cleanup-commands>
  10317. <command>-fs NAMENODE -rm hdfs:///file1</command>
  10318. </cleanup-commands>
  10319. <comparators>
  10320. <comparator>
  10321. <type>RegexpComparator</type>
  10322. <expected-output>^-rw-rw-rw-( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///file1</expected-output>
  10323. </comparator>
  10324. </comparators>
  10325. </test>
  10326. <test> <!-- TESTED -->
  10327. <description>chmod: change permission(normal mode) of directory in hdfs:// path</description>
  10328. <test-commands>
  10329. <command>-fs NAMENODE -mkdir hdfs:///dir0</command>
  10330. <command>-fs NAMENODE -mkdir hdfs:///dir0/dir1</command>
  10331. <command>-fs NAMENODE -touchz hdfs:///dir0/file0</command>
  10332. <command>-fs NAMENODE -touchz hdfs:///dir0/dir1/file1</command>
  10333. <command>-fs NAMENODE -touchz hdfs:///dir0/dir1/file2</command>
  10334. <command>-fs NAMENODE -chmod a+rwx hdfs:///dir0/dir1</command>
  10335. <command>-fs NAMENODE -ls -R hdfs:///dir0</command>
  10336. </test-commands>
  10337. <cleanup-commands>
  10338. <command>-fs NAMENODE -rm -r hdfs:///dir0</command>
  10339. </cleanup-commands>
  10340. <comparators>
  10341. <comparator>
  10342. <type>RegexpComparator</type>
  10343. <expected-output>^drwxrwxrwx( )*-( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir0/dir1</expected-output>
  10344. </comparator>
  10345. <comparator>
  10346. <type>RegexpComparator</type>
  10347. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir0/dir1/file1</expected-output>
  10348. </comparator>
  10349. <comparator>
  10350. <type>RegexpComparator</type>
  10351. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir0/dir1/file2</expected-output>
  10352. </comparator>
  10353. <comparator>
  10354. <type>RegexpComparator</type>
  10355. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir0/file0</expected-output>
  10356. </comparator>
  10357. </comparators>
  10358. </test>
  10359. <test> <!-- TESTED -->
  10360. <description>chmod: change permission(octal mode) of directory in hdfs:// path recursively </description>
  10361. <test-commands>
  10362. <command>-fs NAMENODE -mkdir hdfs:///dir0</command>
  10363. <command>-fs NAMENODE -mkdir hdfs:///dir0/dir1</command>
  10364. <command>-fs NAMENODE -touchz hdfs:///dir0/file0</command>
  10365. <command>-fs NAMENODE -touchz hdfs:///dir0/dir1/file1</command>
  10366. <command>-fs NAMENODE -touchz hdfs:///dir0/dir1/file2</command>
  10367. <command>-fs NAMENODE -chmod -R 777 hdfs:///dir0/dir1</command>
  10368. <command>-fs NAMENODE -ls -R hdfs:///dir0</command>
  10369. </test-commands>
  10370. <cleanup-commands>
  10371. <command>-fs NAMENODE -rm -r hdfs:///dir0</command>
  10372. </cleanup-commands>
  10373. <comparators>
  10374. <comparator>
  10375. <type>RegexpComparator</type>
  10376. <expected-output>^drwxrwxrwx( )*-( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir0/dir1</expected-output>
  10377. </comparator>
  10378. <comparator>
  10379. <type>RegexpComparator</type>
  10380. <expected-output>^-rwxrwxrwx( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir0/dir1/file1</expected-output>
  10381. </comparator>
  10382. <comparator>
  10383. <type>RegexpComparator</type>
  10384. <expected-output>^-rwxrwxrwx( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir0/dir1/file2</expected-output>
  10385. </comparator>
  10386. <comparator>
  10387. <type>RegexpComparator</type>
  10388. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir0/file0</expected-output>
  10389. </comparator>
  10390. </comparators>
  10391. </test>
  10392. <test> <!-- TESTED -->
  10393. <description>chmod: change permission(normal mode) of directory in hdfs:// path recursively</description>
  10394. <test-commands>
  10395. <command>-fs NAMENODE -mkdir hdfs:///dir0</command>
  10396. <command>-fs NAMENODE -mkdir hdfs:///dir0/dir1</command>
  10397. <command>-fs NAMENODE -touchz hdfs:///dir0/file0</command>
  10398. <command>-fs NAMENODE -touchz hdfs:///dir0/dir1/file1</command>
  10399. <command>-fs NAMENODE -touchz hdfs:///dir0/dir1/file2</command>
  10400. <command>-fs NAMENODE -chmod -R a+rwx hdfs:///dir0/dir1</command>
  10401. <command>-fs NAMENODE -ls -R hdfs:///dir0</command>
  10402. </test-commands>
  10403. <cleanup-commands>
  10404. <command>-fs NAMENODE -rm -r hdfs:///dir0</command>
  10405. </cleanup-commands>
  10406. <comparators>
  10407. <comparator>
  10408. <type>RegexpComparator</type>
  10409. <expected-output>^drwxrwxrwx( )*-( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir0/dir1</expected-output>
  10410. </comparator>
  10411. <comparator>
  10412. <type>RegexpComparator</type>
  10413. <expected-output>^-rwxrwxrwx( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir0/dir1/file1</expected-output>
  10414. </comparator>
  10415. <comparator>
  10416. <type>RegexpComparator</type>
  10417. <expected-output>^-rwxrwxrwx( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir0/dir1/file2</expected-output>
  10418. </comparator>
  10419. <comparator>
  10420. <type>RegexpComparator</type>
  10421. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir0/file0</expected-output>
  10422. </comparator>
  10423. </comparators>
  10424. </test>
  10425. <test> <!-- TESTED -->
  10426. <description>chmod: change permission(octal mode) of non existent file in hdfs:// path</description>
  10427. <test-commands>
  10428. <command>-fs NAMENODE -chmod 777 hdfs:///file1</command>
  10429. </test-commands>
  10430. <cleanup-commands>
  10431. <command>-fs NAMENODE -rm hdfs:///file1</command>
  10432. </cleanup-commands>
  10433. <comparators>
  10434. <comparator>
  10435. <type>RegexpComparator</type>
  10436. <expected-output>^chmod: `hdfs:///file1': No such file or directory</expected-output>
  10437. </comparator>
  10438. </comparators>
  10439. </test>
  10440. <test> <!-- TESTED -->
  10441. <description>chmod: change permission(normal mode) of non existent file in hdfs:// path</description>
  10442. <test-commands>
  10443. <command>-fs NAMENODE -chmod a+rw hdfs:///file1</command>
  10444. </test-commands>
  10445. <cleanup-commands>
  10446. <command>-fs NAMENODE -rm hdfs:///file1</command>
  10447. </cleanup-commands>
  10448. <comparators>
  10449. <comparator>
  10450. <type>RegexpComparator</type>
  10451. <expected-output>^chmod: `hdfs:///file1': No such file or directory</expected-output>
  10452. </comparator>
  10453. </comparators>
  10454. </test>
  10455. <test> <!-- TESTED -->
  10456. <description>chmod: change permission(octal mode) of multiple files in hdfs:// path using globbing</description>
  10457. <test-commands>
  10458. <command>-fs NAMENODE -touchz hdfs:///file1</command>
  10459. <command>-fs NAMENODE -touchz hdfs:///file2</command>
  10460. <command>-fs NAMENODE -touchz hdfs:///file3</command>
  10461. <command>-fs NAMENODE -touchz hdfs:///file4</command>
  10462. <command>-fs NAMENODE -chmod 777 hdfs:///file* </command>
  10463. <command>-fs NAMENODE -ls -R hdfs:///file*</command>
  10464. </test-commands>
  10465. <cleanup-commands>
  10466. <command>-fs NAMENODE -rm hdfs:///file*</command>
  10467. </cleanup-commands>
  10468. <comparators>
  10469. <comparator>
  10470. <type>RegexpComparator</type>
  10471. <expected-output>^-rwxrwxrwx( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///file1</expected-output>
  10472. </comparator>
  10473. <comparator>
  10474. <type>RegexpComparator</type>
  10475. <expected-output>^-rwxrwxrwx( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///file2</expected-output>
  10476. </comparator>
  10477. <comparator>
  10478. <type>RegexpComparator</type>
  10479. <expected-output>^-rwxrwxrwx( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///file3</expected-output>
  10480. </comparator>
  10481. <comparator>
  10482. <type>RegexpComparator</type>
  10483. <expected-output>^-rwxrwxrwx( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///file4</expected-output>
  10484. </comparator>
  10485. </comparators>
  10486. </test>
  10487. <test> <!-- TESTED -->
  10488. <description>chmod: change permission(octal mode) of multiple directories in hdfs:// path using globbing</description>
  10489. <test-commands>
  10490. <command>-fs NAMENODE -mkdir hdfs:///dir0</command>
  10491. <command>-fs NAMENODE -mkdir hdfs:///dir0/dir1</command>
  10492. <command>-fs NAMENODE -touchz hdfs:///dir0/file0</command>
  10493. <command>-fs NAMENODE -touchz hdfs:///dir0/dir1/file1</command>
  10494. <command>-fs NAMENODE -touchz hdfs:///dir0/dir1/file2</command>
  10495. <command>-fs NAMENODE -mkdir hdfs:///dir2</command>
  10496. <command>-fs NAMENODE -mkdir hdfs:///dir2/dir1</command>
  10497. <command>-fs NAMENODE -touchz hdfs:///dir2/file0</command>
  10498. <command>-fs NAMENODE -touchz hdfs:///dir2/dir1/file1</command>
  10499. <command>-fs NAMENODE -touchz hdfs:///dir2/dir1/file2</command>
  10500. <command>-fs NAMENODE -chmod 777 hdfs:///dir*</command>
  10501. <command>-fs NAMENODE -ls -R hdfs:///dir*</command>
  10502. </test-commands>
  10503. <cleanup-commands>
  10504. <command>-fs NAMENODE -rm -r hdfs:///dir*</command>
  10505. </cleanup-commands>
  10506. <comparators>
  10507. <comparator>
  10508. <type>RegexpComparator</type>
  10509. <expected-output>^drwxr-xr-x( )*-( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir0/dir1</expected-output>
  10510. </comparator>
  10511. <comparator>
  10512. <type>RegexpComparator</type>
  10513. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir0/dir1/file1</expected-output>
  10514. </comparator>
  10515. <comparator>
  10516. <type>RegexpComparator</type>
  10517. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir0/dir1/file2</expected-output>
  10518. </comparator>
  10519. <comparator>
  10520. <type>RegexpComparator</type>
  10521. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir0/file0</expected-output>
  10522. </comparator>
  10523. <comparator>
  10524. <type>RegexpComparator</type>
  10525. <expected-output>^drwxr-xr-x( )*-( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir2/dir1</expected-output>
  10526. </comparator>
  10527. <comparator>
  10528. <type>RegexpComparator</type>
  10529. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir2/dir1/file1</expected-output>
  10530. </comparator>
  10531. <comparator>
  10532. <type>RegexpComparator</type>
  10533. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir2/dir1/file2</expected-output>
  10534. </comparator>
  10535. <comparator>
  10536. <type>RegexpComparator</type>
  10537. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir2/file0</expected-output>
  10538. </comparator>
  10539. </comparators>
  10540. </test>
  10541. <test> <!-- TESTED -->
  10542. <description>chmod: change permission(octal mode) of multiple files in hdfs:// path without globbing</description>
  10543. <test-commands>
  10544. <command>-fs NAMENODE -touchz hdfs:///file1</command>
  10545. <command>-fs NAMENODE -touchz hdfs:///file2</command>
  10546. <command>-fs NAMENODE -touchz hdfs:///file3</command>
  10547. <command>-fs NAMENODE -touchz hdfs:///file4</command>
  10548. <command>-fs NAMENODE -chmod 777 hdfs:///file1 hdfs:///file2 hdfs:///file3 hdfs:///file4 </command>
  10549. <command>-fs NAMENODE -ls -R hdfs:///file*</command>
  10550. </test-commands>
  10551. <cleanup-commands>
  10552. <command>-fs NAMENODE -rm hdfs:///file*</command>
  10553. </cleanup-commands>
  10554. <comparators>
  10555. <comparator>
  10556. <type>RegexpComparator</type>
  10557. <expected-output>^-rwxrwxrwx( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///file1</expected-output>
  10558. </comparator>
  10559. <comparator>
  10560. <type>RegexpComparator</type>
  10561. <expected-output>^-rwxrwxrwx( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///file2</expected-output>
  10562. </comparator>
  10563. <comparator>
  10564. <type>RegexpComparator</type>
  10565. <expected-output>^-rwxrwxrwx( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///file3</expected-output>
  10566. </comparator>
  10567. <comparator>
  10568. <type>RegexpComparator</type>
  10569. <expected-output>^-rwxrwxrwx( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///file4</expected-output>
  10570. </comparator>
  10571. </comparators>
  10572. </test>
  10573. <test> <!-- TESTED -->
  10574. <description>chmod: change permission(octal mode) of multiple directories in hdfs:// path without globbing</description>
  10575. <test-commands>
  10576. <command>-fs NAMENODE -mkdir hdfs:///dir0</command>
  10577. <command>-fs NAMENODE -mkdir hdfs:///dir0/dir1</command>
  10578. <command>-fs NAMENODE -touchz hdfs:///dir0/file0</command>
  10579. <command>-fs NAMENODE -touchz hdfs:///dir0/dir1/file1</command>
  10580. <command>-fs NAMENODE -touchz hdfs:///dir0/dir1/file2</command>
  10581. <command>-fs NAMENODE -mkdir hdfs:///dir2</command>
  10582. <command>-fs NAMENODE -mkdir hdfs:///dir2/dir1</command>
  10583. <command>-fs NAMENODE -touchz hdfs:///dir2/file0</command>
  10584. <command>-fs NAMENODE -touchz hdfs:///dir2/dir1/file1</command>
  10585. <command>-fs NAMENODE -touchz hdfs:///dir2/dir1/file2</command>
  10586. <command>-fs NAMENODE -chmod 777 hdfs:///dir0 hdfs:///dir2</command>
  10587. <command>-fs NAMENODE -ls -R hdfs:///dir*</command>
  10588. </test-commands>
  10589. <cleanup-commands>
  10590. <command>-fs NAMENODE -rm -r hdfs:///dir*</command>
  10591. </cleanup-commands>
  10592. <comparators>
  10593. <comparator>
  10594. <type>RegexpComparator</type>
  10595. <expected-output>^drwxr-xr-x( )*-( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir0/dir1</expected-output>
  10596. </comparator>
  10597. <comparator>
  10598. <type>RegexpComparator</type>
  10599. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir0/dir1/file1</expected-output>
  10600. </comparator>
  10601. <comparator>
  10602. <type>RegexpComparator</type>
  10603. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir0/dir1/file2</expected-output>
  10604. </comparator>
  10605. <comparator>
  10606. <type>RegexpComparator</type>
  10607. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir0/file0</expected-output>
  10608. </comparator>
  10609. <comparator>
  10610. <type>RegexpComparator</type>
  10611. <expected-output>^drwxr-xr-x( )*-( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir2/dir1</expected-output>
  10612. </comparator>
  10613. <comparator>
  10614. <type>RegexpComparator</type>
  10615. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir2/dir1/file1</expected-output>
  10616. </comparator>
  10617. <comparator>
  10618. <type>RegexpComparator</type>
  10619. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir2/dir1/file2</expected-output>
  10620. </comparator>
  10621. <comparator>
  10622. <type>RegexpComparator</type>
  10623. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir2/file0</expected-output>
  10624. </comparator>
  10625. </comparators>
  10626. </test>
  10627. <test> <!-- TESTED -->
  10628. <description>chmod: change permission(normal mode) of multiple files in hdfs:// path using globbing</description>
  10629. <test-commands>
  10630. <command>-fs NAMENODE -touchz hdfs:///file1</command>
  10631. <command>-fs NAMENODE -touchz hdfs:///file2</command>
  10632. <command>-fs NAMENODE -touchz hdfs:///file3</command>
  10633. <command>-fs NAMENODE -touchz hdfs:///file4</command>
  10634. <command>-fs NAMENODE -chmod a+rw hdfs:///file* </command>
  10635. <command>-fs NAMENODE -ls -R hdfs:///file*</command>
  10636. </test-commands>
  10637. <cleanup-commands>
  10638. <command>-fs NAMENODE -rm hdfs:///file*</command>
  10639. </cleanup-commands>
  10640. <comparators>
  10641. <comparator>
  10642. <type>RegexpComparator</type>
  10643. <expected-output>^-rw-rw-rw-( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///file1</expected-output>
  10644. </comparator>
  10645. <comparator>
  10646. <type>RegexpComparator</type>
  10647. <expected-output>^-rw-rw-rw-( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///file2</expected-output>
  10648. </comparator>
  10649. <comparator>
  10650. <type>RegexpComparator</type>
  10651. <expected-output>^-rw-rw-rw-( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///file3</expected-output>
  10652. </comparator>
  10653. <comparator>
  10654. <type>RegexpComparator</type>
  10655. <expected-output>^-rw-rw-rw-( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///file4</expected-output>
  10656. </comparator>
  10657. </comparators>
  10658. </test>
  10659. <test> <!-- TESTED -->
  10660. <description>chmod: change permission(normal mode) of multiple directories in hdfs:// path using globbing</description>
  10661. <test-commands>
  10662. <command>-fs NAMENODE -mkdir hdfs:///dir0</command>
  10663. <command>-fs NAMENODE -mkdir hdfs:///dir0/dir1</command>
  10664. <command>-fs NAMENODE -touchz hdfs:///dir0/file0</command>
  10665. <command>-fs NAMENODE -touchz hdfs:///dir0/dir1/file1</command>
  10666. <command>-fs NAMENODE -touchz hdfs:///dir0/dir1/file2</command>
  10667. <command>-fs NAMENODE -mkdir hdfs:///dir2</command>
  10668. <command>-fs NAMENODE -mkdir hdfs:///dir2/dir1</command>
  10669. <command>-fs NAMENODE -touchz hdfs:///dir2/file0</command>
  10670. <command>-fs NAMENODE -touchz hdfs:///dir2/dir1/file1</command>
  10671. <command>-fs NAMENODE -touchz hdfs:///dir2/dir1/file2</command>
  10672. <command>-fs NAMENODE -chmod a+rwx hdfs:///dir*</command>
  10673. <command>-fs NAMENODE -ls -R hdfs:///dir*</command>
  10674. </test-commands>
  10675. <cleanup-commands>
  10676. <command>-fs NAMENODE -rm -r hdfs:///dir*</command>
  10677. </cleanup-commands>
  10678. <comparators>
  10679. <comparator>
  10680. <type>RegexpComparator</type>
  10681. <expected-output>^drwxr-xr-x( )*-( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir0/dir1</expected-output>
  10682. </comparator>
  10683. <comparator>
  10684. <type>RegexpComparator</type>
  10685. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir0/dir1/file1</expected-output>
  10686. </comparator>
  10687. <comparator>
  10688. <type>RegexpComparator</type>
  10689. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir0/dir1/file2</expected-output>
  10690. </comparator>
  10691. <comparator>
  10692. <type>RegexpComparator</type>
  10693. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir0/file0</expected-output>
  10694. </comparator>
  10695. <comparator>
  10696. <type>RegexpComparator</type>
  10697. <expected-output>^drwxr-xr-x( )*-( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir2/dir1</expected-output>
  10698. </comparator>
  10699. <comparator>
  10700. <type>RegexpComparator</type>
  10701. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir2/dir1/file1</expected-output>
  10702. </comparator>
  10703. <comparator>
  10704. <type>RegexpComparator</type>
  10705. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir2/dir1/file2</expected-output>
  10706. </comparator>
  10707. <comparator>
  10708. <type>RegexpComparator</type>
  10709. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir2/file0</expected-output>
  10710. </comparator>
  10711. </comparators>
  10712. </test>
  10713. <test> <!-- TESTED -->
  10714. <description>chmod: change permission(normal mode) of multiple files in hdfs:// path without globbing</description>
  10715. <test-commands>
  10716. <command>-fs NAMENODE -touchz hdfs:///file1</command>
  10717. <command>-fs NAMENODE -touchz hdfs:///file2</command>
  10718. <command>-fs NAMENODE -touchz hdfs:///file3</command>
  10719. <command>-fs NAMENODE -touchz hdfs:///file4</command>
  10720. <command>-fs NAMENODE -chmod a+rw hdfs:///file1 hdfs:///file2 hdfs:///file3 hdfs:///file4 </command>
  10721. <command>-fs NAMENODE -ls -R hdfs:///file*</command>
  10722. </test-commands>
  10723. <cleanup-commands>
  10724. <command>-fs NAMENODE -rm hdfs:///file*</command>
  10725. </cleanup-commands>
  10726. <comparators>
  10727. <comparator>
  10728. <type>RegexpComparator</type>
  10729. <expected-output>^-rw-rw-rw-( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///file1</expected-output>
  10730. </comparator>
  10731. <comparator>
  10732. <type>RegexpComparator</type>
  10733. <expected-output>^-rw-rw-rw-( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///file2</expected-output>
  10734. </comparator>
  10735. <comparator>
  10736. <type>RegexpComparator</type>
  10737. <expected-output>^-rw-rw-rw-( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///file3</expected-output>
  10738. </comparator>
  10739. <comparator>
  10740. <type>RegexpComparator</type>
  10741. <expected-output>^-rw-rw-rw-( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///file4</expected-output>
  10742. </comparator>
  10743. </comparators>
  10744. </test>
  10745. <test> <!-- TESTED -->
  10746. <description>chmod: change permission(normal mode) of multiple directories in hdfs:// path without globbing</description>
  10747. <test-commands>
  10748. <command>-fs NAMENODE -mkdir hdfs:///dir0</command>
  10749. <command>-fs NAMENODE -mkdir hdfs:///dir0/dir1</command>
  10750. <command>-fs NAMENODE -touchz hdfs:///dir0/file0</command>
  10751. <command>-fs NAMENODE -touchz hdfs:///dir0/dir1/file1</command>
  10752. <command>-fs NAMENODE -touchz hdfs:///dir0/dir1/file2</command>
  10753. <command>-fs NAMENODE -mkdir hdfs:///dir2</command>
  10754. <command>-fs NAMENODE -mkdir hdfs:///dir2/dir1</command>
  10755. <command>-fs NAMENODE -touchz hdfs:///dir2/file0</command>
  10756. <command>-fs NAMENODE -touchz hdfs:///dir2/dir1/file1</command>
  10757. <command>-fs NAMENODE -touchz hdfs:///dir2/dir1/file2</command>
  10758. <command>-fs NAMENODE -chmod a+rwx hdfs:///dir0 hdfs:///dir2</command>
  10759. <command>-fs NAMENODE -ls -R hdfs:///dir*</command>
  10760. </test-commands>
  10761. <cleanup-commands>
  10762. <command>-fs NAMENODE -rm -r hdfs:///dir*</command>
  10763. </cleanup-commands>
  10764. <comparators>
  10765. <comparator>
  10766. <type>RegexpComparator</type>
  10767. <expected-output>^drwxr-xr-x( )*-( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir0/dir1</expected-output>
  10768. </comparator>
  10769. <comparator>
  10770. <type>RegexpComparator</type>
  10771. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir0/dir1/file1</expected-output>
  10772. </comparator>
  10773. <comparator>
  10774. <type>RegexpComparator</type>
  10775. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir0/dir1/file2</expected-output>
  10776. </comparator>
  10777. <comparator>
  10778. <type>RegexpComparator</type>
  10779. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir0/file0</expected-output>
  10780. </comparator>
  10781. <comparator>
  10782. <type>RegexpComparator</type>
  10783. <expected-output>^drwxr-xr-x( )*-( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir2/dir1</expected-output>
  10784. </comparator>
  10785. <comparator>
  10786. <type>RegexpComparator</type>
  10787. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir2/dir1/file1</expected-output>
  10788. </comparator>
  10789. <comparator>
  10790. <type>RegexpComparator</type>
  10791. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir2/dir1/file2</expected-output>
  10792. </comparator>
  10793. <comparator>
  10794. <type>RegexpComparator</type>
  10795. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir2/file0</expected-output>
  10796. </comparator>
  10797. </comparators>
  10798. </test>
  10799. <test> <!-- TESTED -->
  10800. <description>chmod: change permission(octal mode) of multiple directories in hdfs:// path recursively using globbing</description>
  10801. <test-commands>
  10802. <command>-fs NAMENODE -mkdir hdfs:///dir0</command>
  10803. <command>-fs NAMENODE -mkdir hdfs:///dir0/dir1</command>
  10804. <command>-fs NAMENODE -touchz hdfs:///dir0/file0</command>
  10805. <command>-fs NAMENODE -touchz hdfs:///dir0/dir1/file1</command>
  10806. <command>-fs NAMENODE -touchz hdfs:///dir0/dir1/file2</command>
  10807. <command>-fs NAMENODE -mkdir hdfs:///dir2</command>
  10808. <command>-fs NAMENODE -mkdir hdfs:///dir2/dir1</command>
  10809. <command>-fs NAMENODE -touchz hdfs:///dir2/file0</command>
  10810. <command>-fs NAMENODE -touchz hdfs:///dir2/dir1/file1</command>
  10811. <command>-fs NAMENODE -touchz hdfs:///dir2/dir1/file2</command>
  10812. <command>-fs NAMENODE -chmod -R 777 hdfs:///dir*</command>
  10813. <command>-fs NAMENODE -ls -R hdfs:///dir*</command>
  10814. </test-commands>
  10815. <cleanup-commands>
  10816. <command>-fs NAMENODE -rm -r hdfs:///dir*</command>
  10817. </cleanup-commands>
  10818. <comparators>
  10819. <comparator>
  10820. <type>RegexpComparator</type>
  10821. <expected-output>^drwxrwxrwx( )*-( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir0/dir1</expected-output>
  10822. </comparator>
  10823. <comparator>
  10824. <type>RegexpComparator</type>
  10825. <expected-output>^-rwxrwxrwx( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir0/dir1/file1</expected-output>
  10826. </comparator>
  10827. <comparator>
  10828. <type>RegexpComparator</type>
  10829. <expected-output>^-rwxrwxrwx( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir0/dir1/file2</expected-output>
  10830. </comparator>
  10831. <comparator>
  10832. <type>RegexpComparator</type>
  10833. <expected-output>^-rwxrwxrwx( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir0/file0</expected-output>
  10834. </comparator>
  10835. <comparator>
  10836. <type>RegexpComparator</type>
  10837. <expected-output>^drwxrwxrwx( )*-( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir2/dir1</expected-output>
  10838. </comparator>
  10839. <comparator>
  10840. <type>RegexpComparator</type>
  10841. <expected-output>^-rwxrwxrwx( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir2/dir1/file1</expected-output>
  10842. </comparator>
  10843. <comparator>
  10844. <type>RegexpComparator</type>
  10845. <expected-output>^-rwxrwxrwx( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir2/dir1/file2</expected-output>
  10846. </comparator>
  10847. <comparator>
  10848. <type>RegexpComparator</type>
  10849. <expected-output>^-rwxrwxrwx( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir2/file0</expected-output>
  10850. </comparator>
  10851. </comparators>
  10852. </test>
  10853. <test> <!-- TESTED -->
  10854. <description>chmod: change permission(octal mode) of multiple directories in hdfs:// path recursively without globbing</description>
  10855. <test-commands>
  10856. <command>-fs NAMENODE -mkdir hdfs:///dir0</command>
  10857. <command>-fs NAMENODE -mkdir hdfs:///dir0/dir1</command>
  10858. <command>-fs NAMENODE -touchz hdfs:///dir0/file0</command>
  10859. <command>-fs NAMENODE -touchz hdfs:///dir0/dir1/file1</command>
  10860. <command>-fs NAMENODE -touchz hdfs:///dir0/dir1/file2</command>
  10861. <command>-fs NAMENODE -mkdir hdfs:///dir2</command>
  10862. <command>-fs NAMENODE -mkdir hdfs:///dir2/dir1</command>
  10863. <command>-fs NAMENODE -touchz hdfs:///dir2/file0</command>
  10864. <command>-fs NAMENODE -touchz hdfs:///dir2/dir1/file1</command>
  10865. <command>-fs NAMENODE -touchz hdfs:///dir2/dir1/file2</command>
  10866. <command>-fs NAMENODE -chmod -R 777 hdfs:///dir0 hdfs:///dir2</command>
  10867. <command>-fs NAMENODE -ls -R hdfs:///dir*</command>
  10868. </test-commands>
  10869. <cleanup-commands>
  10870. <command>-fs NAMENODE -rm -r hdfs:///dir*</command>
  10871. </cleanup-commands>
  10872. <comparators>
  10873. <comparator>
  10874. <type>RegexpComparator</type>
  10875. <expected-output>^drwxrwxrwx( )*-( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir0/dir1</expected-output>
  10876. </comparator>
  10877. <comparator>
  10878. <type>RegexpComparator</type>
  10879. <expected-output>^-rwxrwxrwx( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir0/dir1/file1</expected-output>
  10880. </comparator>
  10881. <comparator>
  10882. <type>RegexpComparator</type>
  10883. <expected-output>^-rwxrwxrwx( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir0/dir1/file2</expected-output>
  10884. </comparator>
  10885. <comparator>
  10886. <type>RegexpComparator</type>
  10887. <expected-output>^-rwxrwxrwx( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir0/file0</expected-output>
  10888. </comparator>
  10889. <comparator>
  10890. <type>RegexpComparator</type>
  10891. <expected-output>^drwxrwxrwx( )*-( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir2/dir1</expected-output>
  10892. </comparator>
  10893. <comparator>
  10894. <type>RegexpComparator</type>
  10895. <expected-output>^-rwxrwxrwx( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir2/dir1/file1</expected-output>
  10896. </comparator>
  10897. <comparator>
  10898. <type>RegexpComparator</type>
  10899. <expected-output>^-rwxrwxrwx( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir2/dir1/file2</expected-output>
  10900. </comparator>
  10901. <comparator>
  10902. <type>RegexpComparator</type>
  10903. <expected-output>^-rwxrwxrwx( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir2/file0</expected-output>
  10904. </comparator>
  10905. </comparators>
  10906. </test>
  10907. <test> <!-- TESTED -->
  10908. <description>chmod: change permission(normal mode) of multiple directories in hdfs:// path recursively using globbing</description>
  10909. <test-commands>
  10910. <command>-fs NAMENODE -mkdir hdfs:///dir0</command>
  10911. <command>-fs NAMENODE -mkdir hdfs:///dir0/dir1</command>
  10912. <command>-fs NAMENODE -touchz hdfs:///dir0/file0</command>
  10913. <command>-fs NAMENODE -touchz hdfs:///dir0/dir1/file1</command>
  10914. <command>-fs NAMENODE -touchz hdfs:///dir0/dir1/file2</command>
  10915. <command>-fs NAMENODE -mkdir hdfs:///dir2</command>
  10916. <command>-fs NAMENODE -mkdir hdfs:///dir2/dir1</command>
  10917. <command>-fs NAMENODE -touchz hdfs:///dir2/file0</command>
  10918. <command>-fs NAMENODE -touchz hdfs:///dir2/dir1/file1</command>
  10919. <command>-fs NAMENODE -touchz hdfs:///dir2/dir1/file2</command>
  10920. <command>-fs NAMENODE -chmod -R a+rwx hdfs:///dir*</command>
  10921. <command>-fs NAMENODE -ls -R hdfs:///dir*</command>
  10922. </test-commands>
  10923. <cleanup-commands>
  10924. <command>-fs NAMENODE -rm -r hdfs:///dir*</command>
  10925. </cleanup-commands>
  10926. <comparators>
  10927. <comparator>
  10928. <type>RegexpComparator</type>
  10929. <expected-output>^drwxrwxrwx( )*-( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir0/dir1</expected-output>
  10930. </comparator>
  10931. <comparator>
  10932. <type>RegexpComparator</type>
  10933. <expected-output>^-rwxrwxrwx( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir0/dir1/file1</expected-output>
  10934. </comparator>
  10935. <comparator>
  10936. <type>RegexpComparator</type>
  10937. <expected-output>^-rwxrwxrwx( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir0/dir1/file2</expected-output>
  10938. </comparator>
  10939. <comparator>
  10940. <type>RegexpComparator</type>
  10941. <expected-output>^-rwxrwxrwx( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir0/file0</expected-output>
  10942. </comparator>
  10943. <comparator>
  10944. <type>RegexpComparator</type>
  10945. <expected-output>^drwxrwxrwx( )*-( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir2/dir1</expected-output>
  10946. </comparator>
  10947. <comparator>
  10948. <type>RegexpComparator</type>
  10949. <expected-output>^-rwxrwxrwx( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir2/dir1/file1</expected-output>
  10950. </comparator>
  10951. <comparator>
  10952. <type>RegexpComparator</type>
  10953. <expected-output>^-rwxrwxrwx( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir2/dir1/file2</expected-output>
  10954. </comparator>
  10955. <comparator>
  10956. <type>RegexpComparator</type>
  10957. <expected-output>^-rwxrwxrwx( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir2/file0</expected-output>
  10958. </comparator>
  10959. </comparators>
  10960. </test>
  10961. <test> <!-- TESTED -->
  10962. <description>chmod: change permission(normal mode) of multiple directories in hdfs:// path recursively without globbing</description>
  10963. <test-commands>
  10964. <command>-fs NAMENODE -mkdir hdfs:///dir0</command>
  10965. <command>-fs NAMENODE -mkdir hdfs:///dir0/dir1</command>
  10966. <command>-fs NAMENODE -touchz hdfs:///dir0/file0</command>
  10967. <command>-fs NAMENODE -touchz hdfs:///dir0/dir1/file1</command>
  10968. <command>-fs NAMENODE -touchz hdfs:///dir0/dir1/file2</command>
  10969. <command>-fs NAMENODE -mkdir hdfs:///dir2</command>
  10970. <command>-fs NAMENODE -mkdir hdfs:///dir2/dir1</command>
  10971. <command>-fs NAMENODE -touchz hdfs:///dir2/file0</command>
  10972. <command>-fs NAMENODE -touchz hdfs:///dir2/dir1/file1</command>
  10973. <command>-fs NAMENODE -touchz hdfs:///dir2/dir1/file2</command>
  10974. <command>-fs NAMENODE -chmod -R a+rwx hdfs:///dir0 hdfs:///dir2</command>
  10975. <command>-fs NAMENODE -ls -R hdfs:///dir*</command>
  10976. </test-commands>
  10977. <cleanup-commands>
  10978. <command>-fs NAMENODE -rm -r hdfs:///dir*</command>
  10979. </cleanup-commands>
  10980. <comparators>
  10981. <comparator>
  10982. <type>RegexpComparator</type>
  10983. <expected-output>^drwxrwxrwx( )*-( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir0/dir1</expected-output>
  10984. </comparator>
  10985. <comparator>
  10986. <type>RegexpComparator</type>
  10987. <expected-output>^-rwxrwxrwx( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir0/dir1/file1</expected-output>
  10988. </comparator>
  10989. <comparator>
  10990. <type>RegexpComparator</type>
  10991. <expected-output>^-rwxrwxrwx( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir0/dir1/file2</expected-output>
  10992. </comparator>
  10993. <comparator>
  10994. <type>RegexpComparator</type>
  10995. <expected-output>^-rwxrwxrwx( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir0/file0</expected-output>
  10996. </comparator>
  10997. <comparator>
  10998. <type>RegexpComparator</type>
  10999. <expected-output>^drwxrwxrwx( )*-( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir2/dir1</expected-output>
  11000. </comparator>
  11001. <comparator>
  11002. <type>RegexpComparator</type>
  11003. <expected-output>^-rwxrwxrwx( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir2/dir1/file1</expected-output>
  11004. </comparator>
  11005. <comparator>
  11006. <type>RegexpComparator</type>
  11007. <expected-output>^-rwxrwxrwx( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir2/dir1/file2</expected-output>
  11008. </comparator>
  11009. <comparator>
  11010. <type>RegexpComparator</type>
  11011. <expected-output>^-rwxrwxrwx( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir2/file0</expected-output>
  11012. </comparator>
  11013. </comparators>
  11014. </test>
  11015. <test> <!-- TESTED -->
  11016. <description>chmod: invalid value in octal mode of file in hdfs:// path</description>
  11017. <test-commands>
  11018. <command>-fs NAMENODE -touchz hdfs:///file1</command>
  11019. <command>-fs NAMENODE -chmod 999 hdfs:///file1</command>
  11020. </test-commands>
  11021. <cleanup-commands>
  11022. <command>-fs NAMENODE -rm hdfs:///file1</command>
  11023. </cleanup-commands>
  11024. <comparators>
  11025. <comparator>
  11026. <type>RegexpComparator</type>
  11027. <expected-output>^-chmod: chmod : mode '999' does not match the expected pattern.</expected-output>
  11028. </comparator>
  11029. </comparators>
  11030. </test>
  11031. <test> <!-- TESTED -->
  11032. <description>chmod: invalid value in normal mode of file in hdfs:// path</description>
  11033. <test-commands>
  11034. <command>-fs NAMENODE -touchz hdfs:///file1</command>
  11035. <command>-fs NAMENODE -chmod rdef hdfs:///file1</command>
  11036. </test-commands>
  11037. <cleanup-commands>
  11038. <command>-fs NAMENODE -rm hdfs:///file1</command>
  11039. </cleanup-commands>
  11040. <comparators>
  11041. <comparator>
  11042. <type>RegexpComparator</type>
  11043. <expected-output>^-chmod: chmod : mode \'rdef\' does not match the expected pattern.</expected-output>
  11044. </comparator>
  11045. </comparators>
  11046. </test>
  11047. <!-- Tests for chmod -->
  11048. <test> <!-- TESTED -->
  11049. <description>chmod: change permission(octal mode) of file in Namenode's path</description>
  11050. <test-commands>
  11051. <command>-fs NAMENODE -touchz NAMENODE/file1</command>
  11052. <command>-fs NAMENODE -chmod 777 NAMENODE/file1</command>
  11053. <command>-fs NAMENODE -ls NAMENODE/file1</command>
  11054. </test-commands>
  11055. <cleanup-commands>
  11056. <command>-fs NAMENODE -rm NAMENODE/file1</command>
  11057. </cleanup-commands>
  11058. <comparators>
  11059. <comparator>
  11060. <type>RegexpComparator</type>
  11061. <expected-output>^-rwxrwxrwx( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/file1</expected-output>
  11062. </comparator>
  11063. </comparators>
  11064. </test>
  11065. <test> <!-- TESTED -->
  11066. <description>chmod: change permission(octal mode) of directory in Namenode's path</description>
  11067. <test-commands>
  11068. <command>-fs NAMENODE -mkdir NAMENODE/dir0</command>
  11069. <command>-fs NAMENODE -mkdir NAMENODE/dir0/dir1</command>
  11070. <command>-fs NAMENODE -touchz NAMENODE/dir0/file0</command>
  11071. <command>-fs NAMENODE -touchz NAMENODE/dir0/dir1/file1</command>
  11072. <command>-fs NAMENODE -touchz NAMENODE/dir0/dir1/file2</command>
  11073. <command>-fs NAMENODE -chmod 777 NAMENODE/dir0/dir1</command>
  11074. <command>-fs NAMENODE -ls -R NAMENODE/dir0</command>
  11075. </test-commands>
  11076. <cleanup-commands>
  11077. <command>-fs NAMENODE -rm -r NAMENODE/dir0</command>
  11078. </cleanup-commands>
  11079. <comparators>
  11080. <comparator>
  11081. <type>RegexpComparator</type>
  11082. <expected-output>^drwxrwxrwx( )*-( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir0/dir1</expected-output>
  11083. </comparator>
  11084. <comparator>
  11085. <type>RegexpComparator</type>
  11086. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir0/dir1/file1</expected-output>
  11087. </comparator>
  11088. <comparator>
  11089. <type>RegexpComparator</type>
  11090. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir0/dir1/file2</expected-output>
  11091. </comparator>
  11092. <comparator>
  11093. <type>RegexpComparator</type>
  11094. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir0/file0</expected-output>
  11095. </comparator>
  11096. </comparators>
  11097. </test>
  11098. <test> <!-- TESTED -->
  11099. <description>chmod: change permission(normal mode) of file in Namenode's path</description>
  11100. <test-commands>
  11101. <command>-fs NAMENODE -touchz NAMENODE/file1</command>
  11102. <command>-fs NAMENODE -chmod a+rw NAMENODE/file1</command>
  11103. <command>-fs NAMENODE -ls NAMENODE/file1</command>
  11104. </test-commands>
  11105. <cleanup-commands>
  11106. <command>-fs NAMENODE -rm NAMENODE/file1</command>
  11107. </cleanup-commands>
  11108. <comparators>
  11109. <comparator>
  11110. <type>RegexpComparator</type>
  11111. <expected-output>^-rw-rw-rw-( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/file1</expected-output>
  11112. </comparator>
  11113. </comparators>
  11114. </test>
  11115. <test> <!-- TESTED -->
  11116. <description>chmod: change permission(normal mode) of directory in Namenode's path</description>
  11117. <test-commands>
  11118. <command>-fs NAMENODE -mkdir NAMENODE/dir0</command>
  11119. <command>-fs NAMENODE -mkdir NAMENODE/dir0/dir1</command>
  11120. <command>-fs NAMENODE -touchz NAMENODE/dir0/file0</command>
  11121. <command>-fs NAMENODE -touchz NAMENODE/dir0/dir1/file1</command>
  11122. <command>-fs NAMENODE -touchz NAMENODE/dir0/dir1/file2</command>
  11123. <command>-fs NAMENODE -chmod a+rwx NAMENODE/dir0/dir1</command>
  11124. <command>-fs NAMENODE -ls -R NAMENODE/dir0</command>
  11125. </test-commands>
  11126. <cleanup-commands>
  11127. <command>-fs NAMENODE -rm -r NAMENODE/dir0</command>
  11128. </cleanup-commands>
  11129. <comparators>
  11130. <comparator>
  11131. <type>RegexpComparator</type>
  11132. <expected-output>^drwxrwxrwx( )*-( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir0/dir1</expected-output>
  11133. </comparator>
  11134. <comparator>
  11135. <type>RegexpComparator</type>
  11136. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir0/dir1/file1</expected-output>
  11137. </comparator>
  11138. <comparator>
  11139. <type>RegexpComparator</type>
  11140. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir0/dir1/file2</expected-output>
  11141. </comparator>
  11142. <comparator>
  11143. <type>RegexpComparator</type>
  11144. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir0/file0</expected-output>
  11145. </comparator>
  11146. </comparators>
  11147. </test>
  11148. <test> <!-- TESTED -->
  11149. <description>chmod: change permission(octal mode) of directory in Namenode's path recursively </description>
  11150. <test-commands>
  11151. <command>-fs NAMENODE -mkdir NAMENODE/dir0</command>
  11152. <command>-fs NAMENODE -mkdir NAMENODE/dir0/dir1</command>
  11153. <command>-fs NAMENODE -touchz NAMENODE/dir0/file0</command>
  11154. <command>-fs NAMENODE -touchz NAMENODE/dir0/dir1/file1</command>
  11155. <command>-fs NAMENODE -touchz NAMENODE/dir0/dir1/file2</command>
  11156. <command>-fs NAMENODE -chmod -R 777 NAMENODE/dir0/dir1</command>
  11157. <command>-fs NAMENODE -ls -R NAMENODE/dir0</command>
  11158. </test-commands>
  11159. <cleanup-commands>
  11160. <command>-fs NAMENODE -rm -r NAMENODE/dir0</command>
  11161. </cleanup-commands>
  11162. <comparators>
  11163. <comparator>
  11164. <type>RegexpComparator</type>
  11165. <expected-output>^drwxrwxrwx( )*-( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir0/dir1</expected-output>
  11166. </comparator>
  11167. <comparator>
  11168. <type>RegexpComparator</type>
  11169. <expected-output>^-rwxrwxrwx( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir0/dir1/file1</expected-output>
  11170. </comparator>
  11171. <comparator>
  11172. <type>RegexpComparator</type>
  11173. <expected-output>^-rwxrwxrwx( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir0/dir1/file2</expected-output>
  11174. </comparator>
  11175. <comparator>
  11176. <type>RegexpComparator</type>
  11177. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir0/file0</expected-output>
  11178. </comparator>
  11179. </comparators>
  11180. </test>
  11181. <test> <!-- TESTED -->
  11182. <description>chmod: change permission(normal mode) of directory in Namenode's path recursively</description>
  11183. <test-commands>
  11184. <command>-fs NAMENODE -mkdir NAMENODE/dir0</command>
  11185. <command>-fs NAMENODE -mkdir NAMENODE/dir0/dir1</command>
  11186. <command>-fs NAMENODE -touchz NAMENODE/dir0/file0</command>
  11187. <command>-fs NAMENODE -touchz NAMENODE/dir0/dir1/file1</command>
  11188. <command>-fs NAMENODE -touchz NAMENODE/dir0/dir1/file2</command>
  11189. <command>-fs NAMENODE -chmod -R a+rwx NAMENODE/dir0/dir1</command>
  11190. <command>-fs NAMENODE -ls -R NAMENODE/dir0</command>
  11191. </test-commands>
  11192. <cleanup-commands>
  11193. <command>-fs NAMENODE -rm -r NAMENODE/dir0</command>
  11194. </cleanup-commands>
  11195. <comparators>
  11196. <comparator>
  11197. <type>RegexpComparator</type>
  11198. <expected-output>^drwxrwxrwx( )*-( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir0/dir1</expected-output>
  11199. </comparator>
  11200. <comparator>
  11201. <type>RegexpComparator</type>
  11202. <expected-output>^-rwxrwxrwx( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir0/dir1/file1</expected-output>
  11203. </comparator>
  11204. <comparator>
  11205. <type>RegexpComparator</type>
  11206. <expected-output>^-rwxrwxrwx( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir0/dir1/file2</expected-output>
  11207. </comparator>
  11208. <comparator>
  11209. <type>RegexpComparator</type>
  11210. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir0/file0</expected-output>
  11211. </comparator>
  11212. </comparators>
  11213. </test>
  11214. <test> <!-- TESTED -->
  11215. <description>chmod: change permission(octal mode) of non existent file in Namenode's path</description>
  11216. <test-commands>
  11217. <command>-fs NAMENODE -chmod 777 NAMENODE/file1</command>
  11218. </test-commands>
  11219. <cleanup-commands>
  11220. <command>-fs NAMENODE -rm NAMENODE/file1</command>
  11221. </cleanup-commands>
  11222. <comparators>
  11223. <comparator>
  11224. <type>RegexpComparator</type>
  11225. <expected-output>^chmod: `NAMENODE/file1': No such file or directory</expected-output>
  11226. </comparator>
  11227. </comparators>
  11228. </test>
  11229. <test> <!-- TESTED -->
  11230. <description>chmod: change permission(normal mode) of non existent file in Namenode's path</description>
  11231. <test-commands>
  11232. <command>-fs NAMENODE -chmod a+rw NAMENODE/file1</command>
  11233. </test-commands>
  11234. <cleanup-commands>
  11235. <command>-fs NAMENODE -rm NAMENODE/file1</command>
  11236. </cleanup-commands>
  11237. <comparators>
  11238. <comparator>
  11239. <type>RegexpComparator</type>
  11240. <expected-output>^chmod: `NAMENODE/file1': No such file or directory</expected-output>
  11241. </comparator>
  11242. </comparators>
  11243. </test>
  11244. <test> <!-- TESTED -->
  11245. <description>chmod: change permission(octal mode) of multiple files in Namenode's path using globbing</description>
  11246. <test-commands>
  11247. <command>-fs NAMENODE -touchz NAMENODE/file1</command>
  11248. <command>-fs NAMENODE -touchz NAMENODE/file2</command>
  11249. <command>-fs NAMENODE -touchz NAMENODE/file3</command>
  11250. <command>-fs NAMENODE -touchz NAMENODE/file4</command>
  11251. <command>-fs NAMENODE -chmod 777 NAMENODE/file* </command>
  11252. <command>-fs NAMENODE -ls -R NAMENODE/file*</command>
  11253. </test-commands>
  11254. <cleanup-commands>
  11255. <command>-fs NAMENODE -rm NAMENODE/file*</command>
  11256. </cleanup-commands>
  11257. <comparators>
  11258. <comparator>
  11259. <type>RegexpComparator</type>
  11260. <expected-output>^-rwxrwxrwx( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/file1</expected-output>
  11261. </comparator>
  11262. <comparator>
  11263. <type>RegexpComparator</type>
  11264. <expected-output>^-rwxrwxrwx( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/file2</expected-output>
  11265. </comparator>
  11266. <comparator>
  11267. <type>RegexpComparator</type>
  11268. <expected-output>^-rwxrwxrwx( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/file3</expected-output>
  11269. </comparator>
  11270. <comparator>
  11271. <type>RegexpComparator</type>
  11272. <expected-output>^-rwxrwxrwx( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/file4</expected-output>
  11273. </comparator>
  11274. </comparators>
  11275. </test>
  11276. <test> <!-- TESTED -->
  11277. <description>chmod: change permission(octal mode) of multiple directories in Namenode's path using globbing</description>
  11278. <test-commands>
  11279. <command>-fs NAMENODE -mkdir NAMENODE/dir0</command>
  11280. <command>-fs NAMENODE -mkdir NAMENODE/dir0/dir1</command>
  11281. <command>-fs NAMENODE -touchz NAMENODE/dir0/file0</command>
  11282. <command>-fs NAMENODE -touchz NAMENODE/dir0/dir1/file1</command>
  11283. <command>-fs NAMENODE -touchz NAMENODE/dir0/dir1/file2</command>
  11284. <command>-fs NAMENODE -mkdir NAMENODE/dir2</command>
  11285. <command>-fs NAMENODE -mkdir NAMENODE/dir2/dir1</command>
  11286. <command>-fs NAMENODE -touchz NAMENODE/dir2/file0</command>
  11287. <command>-fs NAMENODE -touchz NAMENODE/dir2/dir1/file1</command>
  11288. <command>-fs NAMENODE -touchz NAMENODE/dir2/dir1/file2</command>
  11289. <command>-fs NAMENODE -chmod 777 NAMENODE/dir*</command>
  11290. <command>-fs NAMENODE -ls -R NAMENODE/dir*</command>
  11291. </test-commands>
  11292. <cleanup-commands>
  11293. <command>-fs NAMENODE -rm -r NAMENODE/dir*</command>
  11294. </cleanup-commands>
  11295. <comparators>
  11296. <comparator>
  11297. <type>RegexpComparator</type>
  11298. <expected-output>^drwxr-xr-x( )*-( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir0/dir1</expected-output>
  11299. </comparator>
  11300. <comparator>
  11301. <type>RegexpComparator</type>
  11302. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir0/dir1/file1</expected-output>
  11303. </comparator>
  11304. <comparator>
  11305. <type>RegexpComparator</type>
  11306. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir0/dir1/file2</expected-output>
  11307. </comparator>
  11308. <comparator>
  11309. <type>RegexpComparator</type>
  11310. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir0/file0</expected-output>
  11311. </comparator>
  11312. <comparator>
  11313. <type>RegexpComparator</type>
  11314. <expected-output>^drwxr-xr-x( )*-( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir2/dir1</expected-output>
  11315. </comparator>
  11316. <comparator>
  11317. <type>RegexpComparator</type>
  11318. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir2/dir1/file1</expected-output>
  11319. </comparator>
  11320. <comparator>
  11321. <type>RegexpComparator</type>
  11322. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir2/dir1/file2</expected-output>
  11323. </comparator>
  11324. <comparator>
  11325. <type>RegexpComparator</type>
  11326. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir2/file0</expected-output>
  11327. </comparator>
  11328. </comparators>
  11329. </test>
  11330. <test> <!-- TESTED -->
  11331. <description>chmod: change permission(octal mode) of multiple files in Namenode's path without globbing</description>
  11332. <test-commands>
  11333. <command>-fs NAMENODE -touchz NAMENODE/file1</command>
  11334. <command>-fs NAMENODE -touchz NAMENODE/file2</command>
  11335. <command>-fs NAMENODE -touchz NAMENODE/file3</command>
  11336. <command>-fs NAMENODE -touchz NAMENODE/file4</command>
  11337. <command>-fs NAMENODE -chmod 777 NAMENODE/file1 NAMENODE/file2 NAMENODE/file3 NAMENODE/file4 </command>
  11338. <command>-fs NAMENODE -ls -R NAMENODE/file*</command>
  11339. </test-commands>
  11340. <cleanup-commands>
  11341. <command>-fs NAMENODE -rm NAMENODE/file*</command>
  11342. </cleanup-commands>
  11343. <comparators>
  11344. <comparator>
  11345. <type>RegexpComparator</type>
  11346. <expected-output>^-rwxrwxrwx( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/file1</expected-output>
  11347. </comparator>
  11348. <comparator>
  11349. <type>RegexpComparator</type>
  11350. <expected-output>^-rwxrwxrwx( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/file2</expected-output>
  11351. </comparator>
  11352. <comparator>
  11353. <type>RegexpComparator</type>
  11354. <expected-output>^-rwxrwxrwx( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/file3</expected-output>
  11355. </comparator>
  11356. <comparator>
  11357. <type>RegexpComparator</type>
  11358. <expected-output>^-rwxrwxrwx( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/file4</expected-output>
  11359. </comparator>
  11360. </comparators>
  11361. </test>
  11362. <test> <!-- TESTED -->
  11363. <description>chmod: change permission(octal mode) of multiple directories in Namenode's path without globbing</description>
  11364. <test-commands>
  11365. <command>-fs NAMENODE -mkdir NAMENODE/dir0</command>
  11366. <command>-fs NAMENODE -mkdir NAMENODE/dir0/dir1</command>
  11367. <command>-fs NAMENODE -touchz NAMENODE/dir0/file0</command>
  11368. <command>-fs NAMENODE -touchz NAMENODE/dir0/dir1/file1</command>
  11369. <command>-fs NAMENODE -touchz NAMENODE/dir0/dir1/file2</command>
  11370. <command>-fs NAMENODE -mkdir NAMENODE/dir2</command>
  11371. <command>-fs NAMENODE -mkdir NAMENODE/dir2/dir1</command>
  11372. <command>-fs NAMENODE -touchz NAMENODE/dir2/file0</command>
  11373. <command>-fs NAMENODE -touchz NAMENODE/dir2/dir1/file1</command>
  11374. <command>-fs NAMENODE -touchz NAMENODE/dir2/dir1/file2</command>
  11375. <command>-fs NAMENODE -chmod 777 NAMENODE/dir0 NAMENODE/dir2</command>
  11376. <command>-fs NAMENODE -ls -R NAMENODE/dir*</command>
  11377. </test-commands>
  11378. <cleanup-commands>
  11379. <command>-fs NAMENODE -rm -r NAMENODE/dir*</command>
  11380. </cleanup-commands>
  11381. <comparators>
  11382. <comparator>
  11383. <type>RegexpComparator</type>
  11384. <expected-output>^drwxr-xr-x( )*-( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir0/dir1</expected-output>
  11385. </comparator>
  11386. <comparator>
  11387. <type>RegexpComparator</type>
  11388. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir0/dir1/file1</expected-output>
  11389. </comparator>
  11390. <comparator>
  11391. <type>RegexpComparator</type>
  11392. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir0/dir1/file2</expected-output>
  11393. </comparator>
  11394. <comparator>
  11395. <type>RegexpComparator</type>
  11396. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir0/file0</expected-output>
  11397. </comparator>
  11398. <comparator>
  11399. <type>RegexpComparator</type>
  11400. <expected-output>^drwxr-xr-x( )*-( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir2/dir1</expected-output>
  11401. </comparator>
  11402. <comparator>
  11403. <type>RegexpComparator</type>
  11404. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir2/dir1/file1</expected-output>
  11405. </comparator>
  11406. <comparator>
  11407. <type>RegexpComparator</type>
  11408. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir2/dir1/file2</expected-output>
  11409. </comparator>
  11410. <comparator>
  11411. <type>RegexpComparator</type>
  11412. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir2/file0</expected-output>
  11413. </comparator>
  11414. </comparators>
  11415. </test>
  11416. <test> <!-- TESTED -->
  11417. <description>chmod: change permission(normal mode) of multiple files in Namenode's path using globbing</description>
  11418. <test-commands>
  11419. <command>-fs NAMENODE -touchz NAMENODE/file1</command>
  11420. <command>-fs NAMENODE -touchz NAMENODE/file2</command>
  11421. <command>-fs NAMENODE -touchz NAMENODE/file3</command>
  11422. <command>-fs NAMENODE -touchz NAMENODE/file4</command>
  11423. <command>-fs NAMENODE -chmod a+rw NAMENODE/file* </command>
  11424. <command>-fs NAMENODE -ls -R NAMENODE/file*</command>
  11425. </test-commands>
  11426. <cleanup-commands>
  11427. <command>-fs NAMENODE -rm NAMENODE/file*</command>
  11428. </cleanup-commands>
  11429. <comparators>
  11430. <comparator>
  11431. <type>RegexpComparator</type>
  11432. <expected-output>^-rw-rw-rw-( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/file1</expected-output>
  11433. </comparator>
  11434. <comparator>
  11435. <type>RegexpComparator</type>
  11436. <expected-output>^-rw-rw-rw-( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/file2</expected-output>
  11437. </comparator>
  11438. <comparator>
  11439. <type>RegexpComparator</type>
  11440. <expected-output>^-rw-rw-rw-( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/file3</expected-output>
  11441. </comparator>
  11442. <comparator>
  11443. <type>RegexpComparator</type>
  11444. <expected-output>^-rw-rw-rw-( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/file4</expected-output>
  11445. </comparator>
  11446. </comparators>
  11447. </test>
  11448. <test> <!-- TESTED -->
  11449. <description>chmod: change permission(normal mode) of multiple directories in Namenode's path using globbing</description>
  11450. <test-commands>
  11451. <command>-fs NAMENODE -mkdir NAMENODE/dir0</command>
  11452. <command>-fs NAMENODE -mkdir NAMENODE/dir0/dir1</command>
  11453. <command>-fs NAMENODE -touchz NAMENODE/dir0/file0</command>
  11454. <command>-fs NAMENODE -touchz NAMENODE/dir0/dir1/file1</command>
  11455. <command>-fs NAMENODE -touchz NAMENODE/dir0/dir1/file2</command>
  11456. <command>-fs NAMENODE -mkdir NAMENODE/dir2</command>
  11457. <command>-fs NAMENODE -mkdir NAMENODE/dir2/dir1</command>
  11458. <command>-fs NAMENODE -touchz NAMENODE/dir2/file0</command>
  11459. <command>-fs NAMENODE -touchz NAMENODE/dir2/dir1/file1</command>
  11460. <command>-fs NAMENODE -touchz NAMENODE/dir2/dir1/file2</command>
  11461. <command>-fs NAMENODE -chmod a+rwx NAMENODE/dir*</command>
  11462. <command>-fs NAMENODE -ls -R NAMENODE/dir*</command>
  11463. </test-commands>
  11464. <cleanup-commands>
  11465. <command>-fs NAMENODE -rm -r NAMENODE/dir*</command>
  11466. </cleanup-commands>
  11467. <comparators>
  11468. <comparator>
  11469. <type>RegexpComparator</type>
  11470. <expected-output>^drwxr-xr-x( )*-( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir0/dir1</expected-output>
  11471. </comparator>
  11472. <comparator>
  11473. <type>RegexpComparator</type>
  11474. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir0/dir1/file1</expected-output>
  11475. </comparator>
  11476. <comparator>
  11477. <type>RegexpComparator</type>
  11478. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir0/dir1/file2</expected-output>
  11479. </comparator>
  11480. <comparator>
  11481. <type>RegexpComparator</type>
  11482. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir0/file0</expected-output>
  11483. </comparator>
  11484. <comparator>
  11485. <type>RegexpComparator</type>
  11486. <expected-output>^drwxr-xr-x( )*-( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir2/dir1</expected-output>
  11487. </comparator>
  11488. <comparator>
  11489. <type>RegexpComparator</type>
  11490. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir2/dir1/file1</expected-output>
  11491. </comparator>
  11492. <comparator>
  11493. <type>RegexpComparator</type>
  11494. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir2/dir1/file2</expected-output>
  11495. </comparator>
  11496. <comparator>
  11497. <type>RegexpComparator</type>
  11498. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir2/file0</expected-output>
  11499. </comparator>
  11500. </comparators>
  11501. </test>
  11502. <test> <!-- TESTED -->
  11503. <description>chmod: change permission(normal mode) of multiple files in Namenode's path without globbing</description>
  11504. <test-commands>
  11505. <command>-fs NAMENODE -touchz NAMENODE/file1</command>
  11506. <command>-fs NAMENODE -touchz NAMENODE/file2</command>
  11507. <command>-fs NAMENODE -touchz NAMENODE/file3</command>
  11508. <command>-fs NAMENODE -touchz NAMENODE/file4</command>
  11509. <command>-fs NAMENODE -chmod a+rw NAMENODE/file1 NAMENODE/file2 NAMENODE/file3 NAMENODE/file4 </command>
  11510. <command>-fs NAMENODE -ls -R NAMENODE/file*</command>
  11511. </test-commands>
  11512. <cleanup-commands>
  11513. <command>-fs NAMENODE -rm NAMENODE/file*</command>
  11514. </cleanup-commands>
  11515. <comparators>
  11516. <comparator>
  11517. <type>RegexpComparator</type>
  11518. <expected-output>^-rw-rw-rw-( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/file1</expected-output>
  11519. </comparator>
  11520. <comparator>
  11521. <type>RegexpComparator</type>
  11522. <expected-output>^-rw-rw-rw-( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/file2</expected-output>
  11523. </comparator>
  11524. <comparator>
  11525. <type>RegexpComparator</type>
  11526. <expected-output>^-rw-rw-rw-( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/file3</expected-output>
  11527. </comparator>
  11528. <comparator>
  11529. <type>RegexpComparator</type>
  11530. <expected-output>^-rw-rw-rw-( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/file4</expected-output>
  11531. </comparator>
  11532. </comparators>
  11533. </test>
  11534. <test> <!-- TESTED -->
  11535. <description>chmod: change permission(normal mode) of multiple directories in Namenode's path without globbing</description>
  11536. <test-commands>
  11537. <command>-fs NAMENODE -mkdir NAMENODE/dir0</command>
  11538. <command>-fs NAMENODE -mkdir NAMENODE/dir0/dir1</command>
  11539. <command>-fs NAMENODE -touchz NAMENODE/dir0/file0</command>
  11540. <command>-fs NAMENODE -touchz NAMENODE/dir0/dir1/file1</command>
  11541. <command>-fs NAMENODE -touchz NAMENODE/dir0/dir1/file2</command>
  11542. <command>-fs NAMENODE -mkdir NAMENODE/dir2</command>
  11543. <command>-fs NAMENODE -mkdir NAMENODE/dir2/dir1</command>
  11544. <command>-fs NAMENODE -touchz NAMENODE/dir2/file0</command>
  11545. <command>-fs NAMENODE -touchz NAMENODE/dir2/dir1/file1</command>
  11546. <command>-fs NAMENODE -touchz NAMENODE/dir2/dir1/file2</command>
  11547. <command>-fs NAMENODE -chmod a+rwx NAMENODE/dir0 NAMENODE/dir2</command>
  11548. <command>-fs NAMENODE -ls -R NAMENODE/dir*</command>
  11549. </test-commands>
  11550. <cleanup-commands>
  11551. <command>-fs NAMENODE -rm -r NAMENODE/dir*</command>
  11552. </cleanup-commands>
  11553. <comparators>
  11554. <comparator>
  11555. <type>RegexpComparator</type>
  11556. <expected-output>^drwxr-xr-x( )*-( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir0/dir1</expected-output>
  11557. </comparator>
  11558. <comparator>
  11559. <type>RegexpComparator</type>
  11560. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir0/dir1/file1</expected-output>
  11561. </comparator>
  11562. <comparator>
  11563. <type>RegexpComparator</type>
  11564. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir0/dir1/file2</expected-output>
  11565. </comparator>
  11566. <comparator>
  11567. <type>RegexpComparator</type>
  11568. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir0/file0</expected-output>
  11569. </comparator>
  11570. <comparator>
  11571. <type>RegexpComparator</type>
  11572. <expected-output>^drwxr-xr-x( )*-( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir2/dir1</expected-output>
  11573. </comparator>
  11574. <comparator>
  11575. <type>RegexpComparator</type>
  11576. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir2/dir1/file1</expected-output>
  11577. </comparator>
  11578. <comparator>
  11579. <type>RegexpComparator</type>
  11580. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir2/dir1/file2</expected-output>
  11581. </comparator>
  11582. <comparator>
  11583. <type>RegexpComparator</type>
  11584. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir2/file0</expected-output>
  11585. </comparator>
  11586. </comparators>
  11587. </test>
  11588. <test> <!-- TESTED -->
  11589. <description>chmod: change permission(octal mode) of multiple directories in Namenode's path recursively using globbing</description>
  11590. <test-commands>
  11591. <command>-fs NAMENODE -mkdir NAMENODE/dir0</command>
  11592. <command>-fs NAMENODE -mkdir NAMENODE/dir0/dir1</command>
  11593. <command>-fs NAMENODE -touchz NAMENODE/dir0/file0</command>
  11594. <command>-fs NAMENODE -touchz NAMENODE/dir0/dir1/file1</command>
  11595. <command>-fs NAMENODE -touchz NAMENODE/dir0/dir1/file2</command>
  11596. <command>-fs NAMENODE -mkdir NAMENODE/dir2</command>
  11597. <command>-fs NAMENODE -mkdir NAMENODE/dir2/dir1</command>
  11598. <command>-fs NAMENODE -touchz NAMENODE/dir2/file0</command>
  11599. <command>-fs NAMENODE -touchz NAMENODE/dir2/dir1/file1</command>
  11600. <command>-fs NAMENODE -touchz NAMENODE/dir2/dir1/file2</command>
  11601. <command>-fs NAMENODE -chmod -R 777 NAMENODE/dir*</command>
  11602. <command>-fs NAMENODE -ls -R NAMENODE/dir*</command>
  11603. </test-commands>
  11604. <cleanup-commands>
  11605. <command>-fs NAMENODE -rm -r NAMENODE/dir*</command>
  11606. </cleanup-commands>
  11607. <comparators>
  11608. <comparator>
  11609. <type>RegexpComparator</type>
  11610. <expected-output>^drwxrwxrwx( )*-( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir0/dir1</expected-output>
  11611. </comparator>
  11612. <comparator>
  11613. <type>RegexpComparator</type>
  11614. <expected-output>^-rwxrwxrwx( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir0/dir1/file1</expected-output>
  11615. </comparator>
  11616. <comparator>
  11617. <type>RegexpComparator</type>
  11618. <expected-output>^-rwxrwxrwx( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir0/dir1/file2</expected-output>
  11619. </comparator>
  11620. <comparator>
  11621. <type>RegexpComparator</type>
  11622. <expected-output>^-rwxrwxrwx( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir0/file0</expected-output>
  11623. </comparator>
  11624. <comparator>
  11625. <type>RegexpComparator</type>
  11626. <expected-output>^drwxrwxrwx( )*-( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir2/dir1</expected-output>
  11627. </comparator>
  11628. <comparator>
  11629. <type>RegexpComparator</type>
  11630. <expected-output>^-rwxrwxrwx( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir2/dir1/file1</expected-output>
  11631. </comparator>
  11632. <comparator>
  11633. <type>RegexpComparator</type>
  11634. <expected-output>^-rwxrwxrwx( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir2/dir1/file2</expected-output>
  11635. </comparator>
  11636. <comparator>
  11637. <type>RegexpComparator</type>
  11638. <expected-output>^-rwxrwxrwx( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir2/file0</expected-output>
  11639. </comparator>
  11640. </comparators>
  11641. </test>
  11642. <test> <!-- TESTED -->
  11643. <description>chmod: change permission(octal mode) of multiple directories in Namenode's path recursively without globbing</description>
  11644. <test-commands>
  11645. <command>-fs NAMENODE -mkdir NAMENODE/dir0</command>
  11646. <command>-fs NAMENODE -mkdir NAMENODE/dir0/dir1</command>
  11647. <command>-fs NAMENODE -touchz NAMENODE/dir0/file0</command>
  11648. <command>-fs NAMENODE -touchz NAMENODE/dir0/dir1/file1</command>
  11649. <command>-fs NAMENODE -touchz NAMENODE/dir0/dir1/file2</command>
  11650. <command>-fs NAMENODE -mkdir NAMENODE/dir2</command>
  11651. <command>-fs NAMENODE -mkdir NAMENODE/dir2/dir1</command>
  11652. <command>-fs NAMENODE -touchz NAMENODE/dir2/file0</command>
  11653. <command>-fs NAMENODE -touchz NAMENODE/dir2/dir1/file1</command>
  11654. <command>-fs NAMENODE -touchz NAMENODE/dir2/dir1/file2</command>
  11655. <command>-fs NAMENODE -chmod -R 777 NAMENODE/dir0 NAMENODE/dir2</command>
  11656. <command>-fs NAMENODE -ls -R NAMENODE/dir*</command>
  11657. </test-commands>
  11658. <cleanup-commands>
  11659. <command>-fs NAMENODE -rm -r NAMENODE/dir*</command>
  11660. </cleanup-commands>
  11661. <comparators>
  11662. <comparator>
  11663. <type>RegexpComparator</type>
  11664. <expected-output>^drwxrwxrwx( )*-( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir0/dir1</expected-output>
  11665. </comparator>
  11666. <comparator>
  11667. <type>RegexpComparator</type>
  11668. <expected-output>^-rwxrwxrwx( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir0/dir1/file1</expected-output>
  11669. </comparator>
  11670. <comparator>
  11671. <type>RegexpComparator</type>
  11672. <expected-output>^-rwxrwxrwx( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir0/dir1/file2</expected-output>
  11673. </comparator>
  11674. <comparator>
  11675. <type>RegexpComparator</type>
  11676. <expected-output>^-rwxrwxrwx( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir0/file0</expected-output>
  11677. </comparator>
  11678. <comparator>
  11679. <type>RegexpComparator</type>
  11680. <expected-output>^drwxrwxrwx( )*-( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir2/dir1</expected-output>
  11681. </comparator>
  11682. <comparator>
  11683. <type>RegexpComparator</type>
  11684. <expected-output>^-rwxrwxrwx( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir2/dir1/file1</expected-output>
  11685. </comparator>
  11686. <comparator>
  11687. <type>RegexpComparator</type>
  11688. <expected-output>^-rwxrwxrwx( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir2/dir1/file2</expected-output>
  11689. </comparator>
  11690. <comparator>
  11691. <type>RegexpComparator</type>
  11692. <expected-output>^-rwxrwxrwx( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir2/file0</expected-output>
  11693. </comparator>
  11694. </comparators>
  11695. </test>
  11696. <test> <!-- TESTED -->
  11697. <description>chmod: change permission(normal mode) of multiple directories in Namenode's path recursively using globbing</description>
  11698. <test-commands>
  11699. <command>-fs NAMENODE -mkdir NAMENODE/dir0</command>
  11700. <command>-fs NAMENODE -mkdir NAMENODE/dir0/dir1</command>
  11701. <command>-fs NAMENODE -touchz NAMENODE/dir0/file0</command>
  11702. <command>-fs NAMENODE -touchz NAMENODE/dir0/dir1/file1</command>
  11703. <command>-fs NAMENODE -touchz NAMENODE/dir0/dir1/file2</command>
  11704. <command>-fs NAMENODE -mkdir NAMENODE/dir2</command>
  11705. <command>-fs NAMENODE -mkdir NAMENODE/dir2/dir1</command>
  11706. <command>-fs NAMENODE -touchz NAMENODE/dir2/file0</command>
  11707. <command>-fs NAMENODE -touchz NAMENODE/dir2/dir1/file1</command>
  11708. <command>-fs NAMENODE -touchz NAMENODE/dir2/dir1/file2</command>
  11709. <command>-fs NAMENODE -chmod -R a+rwx NAMENODE/dir*</command>
  11710. <command>-fs NAMENODE -ls -R NAMENODE/dir*</command>
  11711. </test-commands>
  11712. <cleanup-commands>
  11713. <command>-fs NAMENODE -rm -r NAMENODE/dir*</command>
  11714. </cleanup-commands>
  11715. <comparators>
  11716. <comparator>
  11717. <type>RegexpComparator</type>
  11718. <expected-output>^drwxrwxrwx( )*-( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir0/dir1</expected-output>
  11719. </comparator>
  11720. <comparator>
  11721. <type>RegexpComparator</type>
  11722. <expected-output>^-rwxrwxrwx( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir0/dir1/file1</expected-output>
  11723. </comparator>
  11724. <comparator>
  11725. <type>RegexpComparator</type>
  11726. <expected-output>^-rwxrwxrwx( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir0/dir1/file2</expected-output>
  11727. </comparator>
  11728. <comparator>
  11729. <type>RegexpComparator</type>
  11730. <expected-output>^-rwxrwxrwx( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir0/file0</expected-output>
  11731. </comparator>
  11732. <comparator>
  11733. <type>RegexpComparator</type>
  11734. <expected-output>^drwxrwxrwx( )*-( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir2/dir1</expected-output>
  11735. </comparator>
  11736. <comparator>
  11737. <type>RegexpComparator</type>
  11738. <expected-output>^-rwxrwxrwx( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir2/dir1/file1</expected-output>
  11739. </comparator>
  11740. <comparator>
  11741. <type>RegexpComparator</type>
  11742. <expected-output>^-rwxrwxrwx( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir2/dir1/file2</expected-output>
  11743. </comparator>
  11744. <comparator>
  11745. <type>RegexpComparator</type>
  11746. <expected-output>^-rwxrwxrwx( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir2/file0</expected-output>
  11747. </comparator>
  11748. </comparators>
  11749. </test>
  11750. <test> <!-- TESTED -->
  11751. <description>chmod: change permission(normal mode) of multiple directories in Namenode's path recursively without globbing</description>
  11752. <test-commands>
  11753. <command>-fs NAMENODE -mkdir NAMENODE/dir0</command>
  11754. <command>-fs NAMENODE -mkdir NAMENODE/dir0/dir1</command>
  11755. <command>-fs NAMENODE -touchz NAMENODE/dir0/file0</command>
  11756. <command>-fs NAMENODE -touchz NAMENODE/dir0/dir1/file1</command>
  11757. <command>-fs NAMENODE -touchz NAMENODE/dir0/dir1/file2</command>
  11758. <command>-fs NAMENODE -mkdir NAMENODE/dir2</command>
  11759. <command>-fs NAMENODE -mkdir NAMENODE/dir2/dir1</command>
  11760. <command>-fs NAMENODE -touchz NAMENODE/dir2/file0</command>
  11761. <command>-fs NAMENODE -touchz NAMENODE/dir2/dir1/file1</command>
  11762. <command>-fs NAMENODE -touchz NAMENODE/dir2/dir1/file2</command>
  11763. <command>-fs NAMENODE -chmod -R a+rwx NAMENODE/dir0 NAMENODE/dir2</command>
  11764. <command>-fs NAMENODE -ls -R NAMENODE/dir*</command>
  11765. </test-commands>
  11766. <cleanup-commands>
  11767. <command>-fs NAMENODE -rm -r NAMENODE/dir*</command>
  11768. </cleanup-commands>
  11769. <comparators>
  11770. <comparator>
  11771. <type>RegexpComparator</type>
  11772. <expected-output>^drwxrwxrwx( )*-( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir0/dir1</expected-output>
  11773. </comparator>
  11774. <comparator>
  11775. <type>RegexpComparator</type>
  11776. <expected-output>^-rwxrwxrwx( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir0/dir1/file1</expected-output>
  11777. </comparator>
  11778. <comparator>
  11779. <type>RegexpComparator</type>
  11780. <expected-output>^-rwxrwxrwx( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir0/dir1/file2</expected-output>
  11781. </comparator>
  11782. <comparator>
  11783. <type>RegexpComparator</type>
  11784. <expected-output>^-rwxrwxrwx( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir0/file0</expected-output>
  11785. </comparator>
  11786. <comparator>
  11787. <type>RegexpComparator</type>
  11788. <expected-output>^drwxrwxrwx( )*-( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir2/dir1</expected-output>
  11789. </comparator>
  11790. <comparator>
  11791. <type>RegexpComparator</type>
  11792. <expected-output>^-rwxrwxrwx( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir2/dir1/file1</expected-output>
  11793. </comparator>
  11794. <comparator>
  11795. <type>RegexpComparator</type>
  11796. <expected-output>^-rwxrwxrwx( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir2/dir1/file2</expected-output>
  11797. </comparator>
  11798. <comparator>
  11799. <type>RegexpComparator</type>
  11800. <expected-output>^-rwxrwxrwx( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir2/file0</expected-output>
  11801. </comparator>
  11802. </comparators>
  11803. </test>
  11804. <test> <!-- TESTED -->
  11805. <description>chmod: invalid value in octal mode of file in Namenode's path</description>
  11806. <test-commands>
  11807. <command>-fs NAMENODE -touchz NAMENODE/file1</command>
  11808. <command>-fs NAMENODE -chmod 999 NAMENODE/file1</command>
  11809. </test-commands>
  11810. <cleanup-commands>
  11811. <command>-fs NAMENODE -rm NAMENODE/file1</command>
  11812. </cleanup-commands>
  11813. <comparators>
  11814. <comparator>
  11815. <type>RegexpComparator</type>
  11816. <expected-output>^-chmod: chmod : mode '999' does not match the expected pattern.</expected-output>
  11817. </comparator>
  11818. </comparators>
  11819. </test>
  11820. <test> <!-- TESTED -->
  11821. <description>chmod: invalid value in normal mode of file in Namenode's path</description>
  11822. <test-commands>
  11823. <command>-fs NAMENODE -touchz NAMENODE/file1</command>
  11824. <command>-fs NAMENODE -chmod rdef NAMENODE/file1</command>
  11825. </test-commands>
  11826. <cleanup-commands>
  11827. <command>-fs NAMENODE -rm NAMENODE/file1</command>
  11828. </cleanup-commands>
  11829. <comparators>
  11830. <comparator>
  11831. <type>RegexpComparator</type>
  11832. <expected-output>^-chmod: chmod : mode \'rdef\' does not match the expected pattern.</expected-output>
  11833. </comparator>
  11834. </comparators>
  11835. </test>
  11836. <!-- Tests for chown -->
  11837. <test> <!-- TESTED -->
  11838. <description>chown: change ownership of file in hdfs:// path</description>
  11839. <test-commands>
  11840. <command>-fs NAMENODE -touchz hdfs:///file1</command>
  11841. <command>-fs NAMENODE -chown newowner:newgroup hdfs:///file1</command>
  11842. <command>-fs NAMENODE -ls hdfs:///file1</command>
  11843. </test-commands>
  11844. <cleanup-commands>
  11845. <command>-fs NAMENODE -rm hdfs:///file1</command>
  11846. </cleanup-commands>
  11847. <comparators>
  11848. <comparator>
  11849. <type>RegexpComparator</type>
  11850. <expected-output>^-rw-r--r--( )*1( )*newowner( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///file1</expected-output>
  11851. </comparator>
  11852. </comparators>
  11853. </test>
  11854. <test> <!-- TESTED -->
  11855. <description>chown: change ownership of directory in hdfs:// path</description>
  11856. <test-commands>
  11857. <command>-fs NAMENODE -mkdir hdfs:///dir0</command>
  11858. <command>-fs NAMENODE -mkdir hdfs:///dir0/dir1</command>
  11859. <command>-fs NAMENODE -touchz hdfs:///dir0/file0</command>
  11860. <command>-fs NAMENODE -touchz hdfs:///dir0/dir1/file1</command>
  11861. <command>-fs NAMENODE -touchz hdfs:///dir0/dir1/file2</command>
  11862. <command>-fs NAMENODE -chown newowner:newgroup hdfs:///dir0/dir1</command>
  11863. <command>-fs NAMENODE -ls -R hdfs:///dir0</command>
  11864. </test-commands>
  11865. <cleanup-commands>
  11866. <command>-fs NAMENODE -rm -r hdfs:///dir0</command>
  11867. </cleanup-commands>
  11868. <comparators>
  11869. <comparator>
  11870. <type>RegexpComparator</type>
  11871. <expected-output>^drwxr-xr-x( )*-( )*newowner( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir0/dir1</expected-output>
  11872. </comparator>
  11873. <comparator>
  11874. <type>RegexpComparator</type>
  11875. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir0/dir1/file1</expected-output>
  11876. </comparator>
  11877. <comparator>
  11878. <type>RegexpComparator</type>
  11879. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir0/dir1/file2</expected-output>
  11880. </comparator>
  11881. <comparator>
  11882. <type>RegexpComparator</type>
  11883. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir0/file0</expected-output>
  11884. </comparator>
  11885. </comparators>
  11886. </test>
  11887. <test> <!-- TESTED -->
  11888. <description>chown: change ownership of directory in hdfs:// path recursively </description>
  11889. <test-commands>
  11890. <command>-fs NAMENODE -mkdir hdfs:///dir0</command>
  11891. <command>-fs NAMENODE -mkdir hdfs:///dir0/dir1</command>
  11892. <command>-fs NAMENODE -touchz hdfs:///dir0/file0</command>
  11893. <command>-fs NAMENODE -touchz hdfs:///dir0/dir1/file1</command>
  11894. <command>-fs NAMENODE -touchz hdfs:///dir0/dir1/file2</command>
  11895. <command>-fs NAMENODE -chown -R newowner:newgroup hdfs:///dir0/dir1</command>
  11896. <command>-fs NAMENODE -ls -R hdfs:///dir0</command>
  11897. </test-commands>
  11898. <cleanup-commands>
  11899. <command>-fs NAMENODE -rm -r hdfs:///dir0</command>
  11900. </cleanup-commands>
  11901. <comparators>
  11902. <comparator>
  11903. <type>RegexpComparator</type>
  11904. <expected-output>^drwxr-xr-x( )*-( )*newowner( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir0/dir1</expected-output>
  11905. </comparator>
  11906. <comparator>
  11907. <type>RegexpComparator</type>
  11908. <expected-output>^-rw-r--r--( )*1( )*newowner( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir0/dir1/file1</expected-output>
  11909. </comparator>
  11910. <comparator>
  11911. <type>RegexpComparator</type>
  11912. <expected-output>^-rw-r--r--( )*1( )*newowner( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir0/dir1/file2</expected-output>
  11913. </comparator>
  11914. <comparator>
  11915. <type>RegexpComparator</type>
  11916. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir0/file0</expected-output>
  11917. </comparator>
  11918. </comparators>
  11919. </test>
  11920. <test> <!-- TESTED -->
  11921. <description>chown: change ownership of non existent file in hdfs:// path</description>
  11922. <test-commands>
  11923. <command>-fs NAMENODE -chown newowner:newgroup hdfs:///file1</command>
  11924. </test-commands>
  11925. <cleanup-commands>
  11926. <command>-fs NAMENODE -rm hdfs:///file1</command>
  11927. </cleanup-commands>
  11928. <comparators>
  11929. <comparator>
  11930. <type>RegexpComparator</type>
  11931. <expected-output>^chown: `hdfs:///file1': No such file or directory</expected-output>
  11932. </comparator>
  11933. </comparators>
  11934. </test>
  11935. <test> <!-- TESTED -->
  11936. <description>chown: change ownership of multiple files in hdfs:// path using globbing</description>
  11937. <test-commands>
  11938. <command>-fs NAMENODE -touchz hdfs:///file1</command>
  11939. <command>-fs NAMENODE -touchz hdfs:///file2</command>
  11940. <command>-fs NAMENODE -touchz hdfs:///file3</command>
  11941. <command>-fs NAMENODE -touchz hdfs:///file4</command>
  11942. <command>-fs NAMENODE -chown newowner:newgroup hdfs:///file* </command>
  11943. <command>-fs NAMENODE -ls -R hdfs:///file*</command>
  11944. </test-commands>
  11945. <cleanup-commands>
  11946. <command>-fs NAMENODE -rm hdfs:///file*</command>
  11947. </cleanup-commands>
  11948. <comparators>
  11949. <comparator>
  11950. <type>RegexpComparator</type>
  11951. <expected-output>^-rw-r--r--( )*1( )*newowner( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///file1</expected-output>
  11952. </comparator>
  11953. <comparator>
  11954. <type>RegexpComparator</type>
  11955. <expected-output>^-rw-r--r--( )*1( )*newowner( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///file2</expected-output>
  11956. </comparator>
  11957. <comparator>
  11958. <type>RegexpComparator</type>
  11959. <expected-output>^-rw-r--r--( )*1( )*newowner( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///file3</expected-output>
  11960. </comparator>
  11961. <comparator>
  11962. <type>RegexpComparator</type>
  11963. <expected-output>^-rw-r--r--( )*1( )*newowner( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///file4</expected-output>
  11964. </comparator>
  11965. </comparators>
  11966. </test>
  11967. <test> <!-- TESTED -->
  11968. <description>chown: change ownership of multiple directories in hdfs:// path using globbing</description>
  11969. <test-commands>
  11970. <command>-fs NAMENODE -mkdir hdfs:///dir0</command>
  11971. <command>-fs NAMENODE -mkdir hdfs:///dir0/dir1</command>
  11972. <command>-fs NAMENODE -touchz hdfs:///dir0/file0</command>
  11973. <command>-fs NAMENODE -touchz hdfs:///dir0/dir1/file1</command>
  11974. <command>-fs NAMENODE -touchz hdfs:///dir0/dir1/file2</command>
  11975. <command>-fs NAMENODE -mkdir hdfs:///dir2</command>
  11976. <command>-fs NAMENODE -mkdir hdfs:///dir2/dir1</command>
  11977. <command>-fs NAMENODE -touchz hdfs:///dir2/file0</command>
  11978. <command>-fs NAMENODE -touchz hdfs:///dir2/dir1/file1</command>
  11979. <command>-fs NAMENODE -touchz hdfs:///dir2/dir1/file2</command>
  11980. <command>-fs NAMENODE -chown newowner:newgroup hdfs:///dir*</command>
  11981. <command>-fs NAMENODE -ls -R hdfs:///dir*</command>
  11982. </test-commands>
  11983. <cleanup-commands>
  11984. <command>-fs NAMENODE -rm -r hdfs:///dir*</command>
  11985. </cleanup-commands>
  11986. <comparators>
  11987. <comparator>
  11988. <type>RegexpComparator</type>
  11989. <expected-output>^drwxr-xr-x( )*-( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir0/dir1</expected-output>
  11990. </comparator>
  11991. <comparator>
  11992. <type>RegexpComparator</type>
  11993. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir0/dir1/file1</expected-output>
  11994. </comparator>
  11995. <comparator>
  11996. <type>RegexpComparator</type>
  11997. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir0/dir1/file2</expected-output>
  11998. </comparator>
  11999. <comparator>
  12000. <type>RegexpComparator</type>
  12001. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir0/file0</expected-output>
  12002. </comparator>
  12003. <comparator>
  12004. <type>RegexpComparator</type>
  12005. <expected-output>^drwxr-xr-x( )*-( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir2/dir1</expected-output>
  12006. </comparator>
  12007. <comparator>
  12008. <type>RegexpComparator</type>
  12009. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir2/dir1/file1</expected-output>
  12010. </comparator>
  12011. <comparator>
  12012. <type>RegexpComparator</type>
  12013. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir2/dir1/file2</expected-output>
  12014. </comparator>
  12015. <comparator>
  12016. <type>RegexpComparator</type>
  12017. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir2/file0</expected-output>
  12018. </comparator>
  12019. </comparators>
  12020. </test>
  12021. <test> <!-- TESTED -->
  12022. <description>chown: change ownership of multiple files in hdfs:// path without globbing</description>
  12023. <test-commands>
  12024. <command>-fs NAMENODE -touchz hdfs:///file1</command>
  12025. <command>-fs NAMENODE -touchz hdfs:///file2</command>
  12026. <command>-fs NAMENODE -touchz hdfs:///file3</command>
  12027. <command>-fs NAMENODE -touchz hdfs:///file4</command>
  12028. <command>-fs NAMENODE -chown newowner:newgroup hdfs:///file1 hdfs:///file2 hdfs:///file3 hdfs:///file4 </command>
  12029. <command>-fs NAMENODE -ls -R hdfs:///file*</command>
  12030. </test-commands>
  12031. <cleanup-commands>
  12032. <command>-fs NAMENODE -rm hdfs:///file*</command>
  12033. </cleanup-commands>
  12034. <comparators>
  12035. <comparator>
  12036. <type>RegexpComparator</type>
  12037. <expected-output>^-rw-r--r--( )*1( )*newowner( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///file1</expected-output>
  12038. </comparator>
  12039. <comparator>
  12040. <type>RegexpComparator</type>
  12041. <expected-output>^-rw-r--r--( )*1( )*newowner( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///file2</expected-output>
  12042. </comparator>
  12043. <comparator>
  12044. <type>RegexpComparator</type>
  12045. <expected-output>^-rw-r--r--( )*1( )*newowner( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///file3</expected-output>
  12046. </comparator>
  12047. <comparator>
  12048. <type>RegexpComparator</type>
  12049. <expected-output>^-rw-r--r--( )*1( )*newowner( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///file4</expected-output>
  12050. </comparator>
  12051. </comparators>
  12052. </test>
  12053. <test> <!-- TESTED -->
  12054. <description>chown: change ownership of multiple directories in hdfs:// path without globbing</description>
  12055. <test-commands>
  12056. <command>-fs NAMENODE -mkdir hdfs:///dir0</command>
  12057. <command>-fs NAMENODE -mkdir hdfs:///dir0/dir1</command>
  12058. <command>-fs NAMENODE -touchz hdfs:///dir0/file0</command>
  12059. <command>-fs NAMENODE -touchz hdfs:///dir0/dir1/file1</command>
  12060. <command>-fs NAMENODE -touchz hdfs:///dir0/dir1/file2</command>
  12061. <command>-fs NAMENODE -mkdir hdfs:///dir2</command>
  12062. <command>-fs NAMENODE -mkdir hdfs:///dir2/dir1</command>
  12063. <command>-fs NAMENODE -touchz hdfs:///dir2/file0</command>
  12064. <command>-fs NAMENODE -touchz hdfs:///dir2/dir1/file1</command>
  12065. <command>-fs NAMENODE -touchz hdfs:///dir2/dir1/file2</command>
  12066. <command>-fs NAMENODE -chown newowner:newgroup hdfs:///dir0 hdfs:///dir2</command>
  12067. <command>-fs NAMENODE -ls -R hdfs:///dir*</command>
  12068. </test-commands>
  12069. <cleanup-commands>
  12070. <command>-fs NAMENODE -rm -r hdfs:///dir*</command>
  12071. </cleanup-commands>
  12072. <comparators>
  12073. <comparator>
  12074. <type>RegexpComparator</type>
  12075. <expected-output>^drwxr-xr-x( )*-( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir0/dir1</expected-output>
  12076. </comparator>
  12077. <comparator>
  12078. <type>RegexpComparator</type>
  12079. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir0/dir1/file1</expected-output>
  12080. </comparator>
  12081. <comparator>
  12082. <type>RegexpComparator</type>
  12083. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir0/dir1/file2</expected-output>
  12084. </comparator>
  12085. <comparator>
  12086. <type>RegexpComparator</type>
  12087. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir0/file0</expected-output>
  12088. </comparator>
  12089. <comparator>
  12090. <type>RegexpComparator</type>
  12091. <expected-output>^drwxr-xr-x( )*-( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir2/dir1</expected-output>
  12092. </comparator>
  12093. <comparator>
  12094. <type>RegexpComparator</type>
  12095. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir2/dir1/file1</expected-output>
  12096. </comparator>
  12097. <comparator>
  12098. <type>RegexpComparator</type>
  12099. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir2/dir1/file2</expected-output>
  12100. </comparator>
  12101. <comparator>
  12102. <type>RegexpComparator</type>
  12103. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir2/file0</expected-output>
  12104. </comparator>
  12105. </comparators>
  12106. </test>
  12107. <test> <!-- TESTED -->
  12108. <description>chown: change ownership of multiple directories recursively in hdfs:// path using globbing</description>
  12109. <test-commands>
  12110. <command>-fs NAMENODE -mkdir hdfs:///dir0</command>
  12111. <command>-fs NAMENODE -mkdir hdfs:///dir0/dir1</command>
  12112. <command>-fs NAMENODE -touchz hdfs:///dir0/file0</command>
  12113. <command>-fs NAMENODE -touchz hdfs:///dir0/dir1/file1</command>
  12114. <command>-fs NAMENODE -touchz hdfs:///dir0/dir1/file2</command>
  12115. <command>-fs NAMENODE -mkdir hdfs:///dir2</command>
  12116. <command>-fs NAMENODE -mkdir hdfs:///dir2/dir1</command>
  12117. <command>-fs NAMENODE -touchz hdfs:///dir2/file0</command>
  12118. <command>-fs NAMENODE -touchz hdfs:///dir2/dir1/file1</command>
  12119. <command>-fs NAMENODE -touchz hdfs:///dir2/dir1/file2</command>
  12120. <command>-fs NAMENODE -chown -R newowner:newgroup hdfs:///dir*</command>
  12121. <command>-fs NAMENODE -ls -R hdfs:///dir*</command>
  12122. </test-commands>
  12123. <cleanup-commands>
  12124. <command>-fs NAMENODE -rm -r hdfs:///dir*</command>
  12125. </cleanup-commands>
  12126. <comparators>
  12127. <comparator>
  12128. <type>RegexpComparator</type>
  12129. <expected-output>^drwxr-xr-x( )*-( )*newowner( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir0/dir1</expected-output>
  12130. </comparator>
  12131. <comparator>
  12132. <type>RegexpComparator</type>
  12133. <expected-output>^-rw-r--r--( )*1( )*newowner( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir0/dir1/file1</expected-output>
  12134. </comparator>
  12135. <comparator>
  12136. <type>RegexpComparator</type>
  12137. <expected-output>^-rw-r--r--( )*1( )*newowner( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir0/dir1/file2</expected-output>
  12138. </comparator>
  12139. <comparator>
  12140. <type>RegexpComparator</type>
  12141. <expected-output>^-rw-r--r--( )*1( )*newowner( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir0/file0</expected-output>
  12142. </comparator>
  12143. <comparator>
  12144. <type>RegexpComparator</type>
  12145. <expected-output>^drwxr-xr-x( )*-( )*newowner( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir2/dir1</expected-output>
  12146. </comparator>
  12147. <comparator>
  12148. <type>RegexpComparator</type>
  12149. <expected-output>^-rw-r--r--( )*1( )*newowner( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir2/dir1/file1</expected-output>
  12150. </comparator>
  12151. <comparator>
  12152. <type>RegexpComparator</type>
  12153. <expected-output>^-rw-r--r--( )*1( )*newowner( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir2/dir1/file2</expected-output>
  12154. </comparator>
  12155. <comparator>
  12156. <type>RegexpComparator</type>
  12157. <expected-output>^-rw-r--r--( )*1( )*newowner( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir2/file0</expected-output>
  12158. </comparator>
  12159. </comparators>
  12160. </test>
  12161. <test> <!-- TESTED -->
  12162. <description>chown: change ownership of multiple directories recursively in hdfs:// path without globbing</description>
  12163. <test-commands>
  12164. <command>-fs NAMENODE -mkdir hdfs:///dir0</command>
  12165. <command>-fs NAMENODE -mkdir hdfs:///dir0/dir1</command>
  12166. <command>-fs NAMENODE -touchz hdfs:///dir0/file0</command>
  12167. <command>-fs NAMENODE -touchz hdfs:///dir0/dir1/file1</command>
  12168. <command>-fs NAMENODE -touchz hdfs:///dir0/dir1/file2</command>
  12169. <command>-fs NAMENODE -mkdir hdfs:///dir2</command>
  12170. <command>-fs NAMENODE -mkdir hdfs:///dir2/dir1</command>
  12171. <command>-fs NAMENODE -touchz hdfs:///dir2/file0</command>
  12172. <command>-fs NAMENODE -touchz hdfs:///dir2/dir1/file1</command>
  12173. <command>-fs NAMENODE -touchz hdfs:///dir2/dir1/file2</command>
  12174. <command>-fs NAMENODE -chown -R newowner:newgroup hdfs:///dir0 hdfs:///dir2</command>
  12175. <command>-fs NAMENODE -ls -R hdfs:///dir*</command>
  12176. </test-commands>
  12177. <cleanup-commands>
  12178. <command>-fs NAMENODE -rm -r hdfs:///dir*</command>
  12179. </cleanup-commands>
  12180. <comparators>
  12181. <comparator>
  12182. <type>RegexpComparator</type>
  12183. <expected-output>^drwxr-xr-x( )*-( )*newowner( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir0/dir1</expected-output>
  12184. </comparator>
  12185. <comparator>
  12186. <type>RegexpComparator</type>
  12187. <expected-output>^-rw-r--r--( )*1( )*newowner( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir0/dir1/file1</expected-output>
  12188. </comparator>
  12189. <comparator>
  12190. <type>RegexpComparator</type>
  12191. <expected-output>^-rw-r--r--( )*1( )*newowner( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir0/dir1/file2</expected-output>
  12192. </comparator>
  12193. <comparator>
  12194. <type>RegexpComparator</type>
  12195. <expected-output>^-rw-r--r--( )*1( )*newowner( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir0/file0</expected-output>
  12196. </comparator>
  12197. <comparator>
  12198. <type>RegexpComparator</type>
  12199. <expected-output>^drwxr-xr-x( )*-( )*newowner( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir2/dir1</expected-output>
  12200. </comparator>
  12201. <comparator>
  12202. <type>RegexpComparator</type>
  12203. <expected-output>^-rw-r--r--( )*1( )*newowner( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir2/dir1/file1</expected-output>
  12204. </comparator>
  12205. <comparator>
  12206. <type>RegexpComparator</type>
  12207. <expected-output>^-rw-r--r--( )*1( )*newowner( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir2/dir1/file2</expected-output>
  12208. </comparator>
  12209. <comparator>
  12210. <type>RegexpComparator</type>
  12211. <expected-output>^-rw-r--r--( )*1( )*newowner( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir2/file0</expected-output>
  12212. </comparator>
  12213. </comparators>
  12214. </test>
  12215. <test> <!-- TESTED -->
  12216. <description>chown: invalid option for owner of file in hdfs:// path</description>
  12217. <test-commands>
  12218. <command>-fs NAMENODE -touchz hdfs:///file1</command>
  12219. <command>-fs NAMENODE -chown %:newgroup hdfs:///file1</command>
  12220. </test-commands>
  12221. <cleanup-commands>
  12222. <command>-fs NAMENODE -rm hdfs:///file1</command>
  12223. </cleanup-commands>
  12224. <comparators>
  12225. <comparator>
  12226. <type>RegexpComparator</type>
  12227. <expected-output>^-chown: '%:newgroup' does not match expected pattern for \[owner\]\[:group\].</expected-output>
  12228. </comparator>
  12229. </comparators>
  12230. </test>
  12231. <test> <!-- TESTED -->
  12232. <description>chown: invalid option for group of file in hdfs:// path</description>
  12233. <test-commands>
  12234. <command>-fs NAMENODE -touchz hdfs:///file1</command>
  12235. <command>-fs NAMENODE -chown newowner:% hdfs:///file1</command>
  12236. </test-commands>
  12237. <cleanup-commands>
  12238. <command>-fs NAMENODE -rm hdfs:///file1</command>
  12239. </cleanup-commands>
  12240. <comparators>
  12241. <comparator>
  12242. <type>RegexpComparator</type>
  12243. <expected-output>^-chown: 'newowner:%' does not match expected pattern for \[owner\]\[:group\].</expected-output>
  12244. </comparator>
  12245. </comparators>
  12246. </test>
  12247. <!-- Tests for chown -->
  12248. <test> <!-- TESTED -->
  12249. <description>chown: change ownership of file in absolute path</description>
  12250. <test-commands>
  12251. <command>-fs NAMENODE -touchz /file1</command>
  12252. <command>-fs NAMENODE -chown newowner:newgroup /file1</command>
  12253. <command>-fs NAMENODE -ls /file1</command>
  12254. </test-commands>
  12255. <cleanup-commands>
  12256. <command>-fs NAMENODE -rm /file1</command>
  12257. </cleanup-commands>
  12258. <comparators>
  12259. <comparator>
  12260. <type>RegexpComparator</type>
  12261. <expected-output>^-rw-r--r--( )*1( )*newowner( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/file1</expected-output>
  12262. </comparator>
  12263. </comparators>
  12264. </test>
  12265. <test> <!-- TESTED -->
  12266. <description>chown: change ownership of file in relative path</description>
  12267. <test-commands>
  12268. <command>-fs NAMENODE -touchz file1</command>
  12269. <command>-fs NAMENODE -chown newowner:newgroup file1</command>
  12270. <command>-fs NAMENODE -ls file1</command>
  12271. </test-commands>
  12272. <cleanup-commands>
  12273. <command>-fs NAMENODE -rm file1</command>
  12274. </cleanup-commands>
  12275. <comparators>
  12276. <comparator>
  12277. <type>RegexpComparator</type>
  12278. <expected-output>^-rw-r--r--( )*1( )*newowner( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*file1</expected-output>
  12279. </comparator>
  12280. </comparators>
  12281. </test>
  12282. <test> <!-- TESTED -->
  12283. <description>chown: change ownership of directory in absolute path</description>
  12284. <test-commands>
  12285. <command>-fs NAMENODE -mkdir /dir0</command>
  12286. <command>-fs NAMENODE -mkdir /dir0/dir1</command>
  12287. <command>-fs NAMENODE -touchz /dir0/file0</command>
  12288. <command>-fs NAMENODE -touchz /dir0/dir1/file1</command>
  12289. <command>-fs NAMENODE -touchz /dir0/dir1/file2</command>
  12290. <command>-fs NAMENODE -chown newowner:newgroup /dir0/dir1</command>
  12291. <command>-fs NAMENODE -ls -R /dir0</command>
  12292. </test-commands>
  12293. <cleanup-commands>
  12294. <command>-fs NAMENODE -rm -r /dir0</command>
  12295. </cleanup-commands>
  12296. <comparators>
  12297. <comparator>
  12298. <type>RegexpComparator</type>
  12299. <expected-output>^drwxr-xr-x( )*-( )*newowner( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1</expected-output>
  12300. </comparator>
  12301. <comparator>
  12302. <type>RegexpComparator</type>
  12303. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1/file1</expected-output>
  12304. </comparator>
  12305. <comparator>
  12306. <type>RegexpComparator</type>
  12307. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1/file2</expected-output>
  12308. </comparator>
  12309. <comparator>
  12310. <type>RegexpComparator</type>
  12311. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/file0</expected-output>
  12312. </comparator>
  12313. </comparators>
  12314. </test>
  12315. <test> <!-- TESTED -->
  12316. <description>chown: change ownership of directory in relative path</description>
  12317. <test-commands>
  12318. <command>-fs NAMENODE -mkdir -p dir0</command>
  12319. <command>-fs NAMENODE -mkdir -p dir0/dir1</command>
  12320. <command>-fs NAMENODE -touchz dir0/file0</command>
  12321. <command>-fs NAMENODE -touchz dir0/dir1/file1</command>
  12322. <command>-fs NAMENODE -touchz dir0/dir1/file2</command>
  12323. <command>-fs NAMENODE -chown newowner:newgroup dir0/dir1</command>
  12324. <command>-fs NAMENODE -ls -R dir0</command>
  12325. </test-commands>
  12326. <cleanup-commands>
  12327. <command>-fs NAMENODE -rm -r dir0</command>
  12328. </cleanup-commands>
  12329. <comparators>
  12330. <comparator>
  12331. <type>RegexpComparator</type>
  12332. <expected-output>^drwxr-xr-x( )*-( )*newowner( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/dir1</expected-output>
  12333. </comparator>
  12334. <comparator>
  12335. <type>RegexpComparator</type>
  12336. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/dir1/file1</expected-output>
  12337. </comparator>
  12338. <comparator>
  12339. <type>RegexpComparator</type>
  12340. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/dir1/file2</expected-output>
  12341. </comparator>
  12342. <comparator>
  12343. <type>RegexpComparator</type>
  12344. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/file0</expected-output>
  12345. </comparator>
  12346. </comparators>
  12347. </test>
  12348. <test> <!-- TESTED -->
  12349. <description>chown: change ownership of directory in absolute path recursively </description>
  12350. <test-commands>
  12351. <command>-fs NAMENODE -mkdir /dir0</command>
  12352. <command>-fs NAMENODE -mkdir /dir0/dir1</command>
  12353. <command>-fs NAMENODE -touchz /dir0/file0</command>
  12354. <command>-fs NAMENODE -touchz /dir0/dir1/file1</command>
  12355. <command>-fs NAMENODE -touchz /dir0/dir1/file2</command>
  12356. <command>-fs NAMENODE -chown -R newowner:newgroup /dir0/dir1</command>
  12357. <command>-fs NAMENODE -ls -R /dir0</command>
  12358. </test-commands>
  12359. <cleanup-commands>
  12360. <command>-fs NAMENODE -rm -r /dir0</command>
  12361. </cleanup-commands>
  12362. <comparators>
  12363. <comparator>
  12364. <type>RegexpComparator</type>
  12365. <expected-output>^drwxr-xr-x( )*-( )*newowner( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1</expected-output>
  12366. </comparator>
  12367. <comparator>
  12368. <type>RegexpComparator</type>
  12369. <expected-output>^-rw-r--r--( )*1( )*newowner( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1/file1</expected-output>
  12370. </comparator>
  12371. <comparator>
  12372. <type>RegexpComparator</type>
  12373. <expected-output>^-rw-r--r--( )*1( )*newowner( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1/file2</expected-output>
  12374. </comparator>
  12375. <comparator>
  12376. <type>RegexpComparator</type>
  12377. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/file0</expected-output>
  12378. </comparator>
  12379. </comparators>
  12380. </test>
  12381. <test> <!-- TESTED -->
  12382. <description>chown: change ownership of directory in relative path recursively </description>
  12383. <test-commands>
  12384. <command>-fs NAMENODE -mkdir -p dir0</command>
  12385. <command>-fs NAMENODE -mkdir -p dir0/dir1</command>
  12386. <command>-fs NAMENODE -touchz dir0/file0</command>
  12387. <command>-fs NAMENODE -touchz dir0/dir1/file1</command>
  12388. <command>-fs NAMENODE -touchz dir0/dir1/file2</command>
  12389. <command>-fs NAMENODE -chown -R newowner:newgroup dir0/dir1</command>
  12390. <command>-fs NAMENODE -ls -R dir0</command>
  12391. </test-commands>
  12392. <cleanup-commands>
  12393. <command>-fs NAMENODE -rm -r dir0</command>
  12394. </cleanup-commands>
  12395. <comparators>
  12396. <comparator>
  12397. <type>RegexpComparator</type>
  12398. <expected-output>^drwxr-xr-x( )*-( )*newowner( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/dir1</expected-output>
  12399. </comparator>
  12400. <comparator>
  12401. <type>RegexpComparator</type>
  12402. <expected-output>^-rw-r--r--( )*1( )*newowner( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/dir1/file1</expected-output>
  12403. </comparator>
  12404. <comparator>
  12405. <type>RegexpComparator</type>
  12406. <expected-output>^-rw-r--r--( )*1( )*newowner( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/dir1/file2</expected-output>
  12407. </comparator>
  12408. <comparator>
  12409. <type>RegexpComparator</type>
  12410. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/file0</expected-output>
  12411. </comparator>
  12412. </comparators>
  12413. </test>
  12414. <test> <!-- TESTED -->
  12415. <description>chown: change ownership of non existent file in absolute path</description>
  12416. <test-commands>
  12417. <command>-fs NAMENODE -chown newowner:newgroup /file1</command>
  12418. </test-commands>
  12419. <cleanup-commands>
  12420. <command>-fs NAMENODE -rm /file1</command>
  12421. </cleanup-commands>
  12422. <comparators>
  12423. <comparator>
  12424. <type>RegexpComparator</type>
  12425. <expected-output>^chown: `/file1': No such file or directory</expected-output>
  12426. </comparator>
  12427. </comparators>
  12428. </test>
  12429. <test> <!-- TESTED -->
  12430. <description>chown: change ownership of non existent file in relative path</description>
  12431. <test-commands>
  12432. <command>-fs NAMENODE -chown newowner:newgroup file1</command>
  12433. </test-commands>
  12434. <cleanup-commands>
  12435. <command>-fs NAMENODE -rm file1</command>
  12436. </cleanup-commands>
  12437. <comparators>
  12438. <comparator>
  12439. <type>RegexpComparator</type>
  12440. <expected-output>^chown: `file1': No such file or directory</expected-output>
  12441. </comparator>
  12442. </comparators>
  12443. </test>
  12444. <test> <!-- TESTED -->
  12445. <description>chown: change ownership of multiple files in absolute path using globbing</description>
  12446. <test-commands>
  12447. <command>-fs NAMENODE -touchz /file1</command>
  12448. <command>-fs NAMENODE -touchz /file2</command>
  12449. <command>-fs NAMENODE -touchz /file3</command>
  12450. <command>-fs NAMENODE -touchz /file4</command>
  12451. <command>-fs NAMENODE -chown newowner:newgroup /file* </command>
  12452. <command>-fs NAMENODE -ls -R /file*</command>
  12453. </test-commands>
  12454. <cleanup-commands>
  12455. <command>-fs NAMENODE -rm /file*</command>
  12456. </cleanup-commands>
  12457. <comparators>
  12458. <comparator>
  12459. <type>RegexpComparator</type>
  12460. <expected-output>^-rw-r--r--( )*1( )*newowner( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/file1</expected-output>
  12461. </comparator>
  12462. <comparator>
  12463. <type>RegexpComparator</type>
  12464. <expected-output>^-rw-r--r--( )*1( )*newowner( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/file2</expected-output>
  12465. </comparator>
  12466. <comparator>
  12467. <type>RegexpComparator</type>
  12468. <expected-output>^-rw-r--r--( )*1( )*newowner( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/file3</expected-output>
  12469. </comparator>
  12470. <comparator>
  12471. <type>RegexpComparator</type>
  12472. <expected-output>^-rw-r--r--( )*1( )*newowner( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/file4</expected-output>
  12473. </comparator>
  12474. </comparators>
  12475. </test>
  12476. <test> <!-- TESTED -->
  12477. <description>chown: change ownership of multiple files in relative path using globbing</description>
  12478. <test-commands>
  12479. <command>-fs NAMENODE -touchz file1</command>
  12480. <command>-fs NAMENODE -touchz file2</command>
  12481. <command>-fs NAMENODE -touchz file3</command>
  12482. <command>-fs NAMENODE -touchz file4</command>
  12483. <command>-fs NAMENODE -chown newowner:newgroup file* </command>
  12484. <command>-fs NAMENODE -ls -R file*</command>
  12485. </test-commands>
  12486. <cleanup-commands>
  12487. <command>-fs NAMENODE -rm file*</command>
  12488. </cleanup-commands>
  12489. <comparators>
  12490. <comparator>
  12491. <type>RegexpComparator</type>
  12492. <expected-output>^-rw-r--r--( )*1( )*newowner( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*file1</expected-output>
  12493. </comparator>
  12494. <comparator>
  12495. <type>RegexpComparator</type>
  12496. <expected-output>^-rw-r--r--( )*1( )*newowner( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*file2</expected-output>
  12497. </comparator>
  12498. <comparator>
  12499. <type>RegexpComparator</type>
  12500. <expected-output>^-rw-r--r--( )*1( )*newowner( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*file3</expected-output>
  12501. </comparator>
  12502. <comparator>
  12503. <type>RegexpComparator</type>
  12504. <expected-output>^-rw-r--r--( )*1( )*newowner( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*file4</expected-output>
  12505. </comparator>
  12506. </comparators>
  12507. </test>
  12508. <test> <!-- TESTED -->
  12509. <description>chown: change ownership of multiple directories in absolute path using globbing</description>
  12510. <test-commands>
  12511. <command>-fs NAMENODE -mkdir /dir0</command>
  12512. <command>-fs NAMENODE -mkdir /dir0/dir1</command>
  12513. <command>-fs NAMENODE -touchz /dir0/file0</command>
  12514. <command>-fs NAMENODE -touchz /dir0/dir1/file1</command>
  12515. <command>-fs NAMENODE -touchz /dir0/dir1/file2</command>
  12516. <command>-fs NAMENODE -mkdir /dir2</command>
  12517. <command>-fs NAMENODE -mkdir /dir2/dir1</command>
  12518. <command>-fs NAMENODE -touchz /dir2/file0</command>
  12519. <command>-fs NAMENODE -touchz /dir2/dir1/file1</command>
  12520. <command>-fs NAMENODE -touchz /dir2/dir1/file2</command>
  12521. <command>-fs NAMENODE -chown newowner:newgroup /dir*</command>
  12522. <command>-fs NAMENODE -ls -R /dir*</command>
  12523. </test-commands>
  12524. <cleanup-commands>
  12525. <command>-fs NAMENODE -rm -r /dir*</command>
  12526. </cleanup-commands>
  12527. <comparators>
  12528. <comparator>
  12529. <type>RegexpComparator</type>
  12530. <expected-output>^drwxr-xr-x( )*-( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1</expected-output>
  12531. </comparator>
  12532. <comparator>
  12533. <type>RegexpComparator</type>
  12534. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1/file1</expected-output>
  12535. </comparator>
  12536. <comparator>
  12537. <type>RegexpComparator</type>
  12538. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1/file2</expected-output>
  12539. </comparator>
  12540. <comparator>
  12541. <type>RegexpComparator</type>
  12542. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/file0</expected-output>
  12543. </comparator>
  12544. <comparator>
  12545. <type>RegexpComparator</type>
  12546. <expected-output>^drwxr-xr-x( )*-( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir2/dir1</expected-output>
  12547. </comparator>
  12548. <comparator>
  12549. <type>RegexpComparator</type>
  12550. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir2/dir1/file1</expected-output>
  12551. </comparator>
  12552. <comparator>
  12553. <type>RegexpComparator</type>
  12554. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir2/dir1/file2</expected-output>
  12555. </comparator>
  12556. <comparator>
  12557. <type>RegexpComparator</type>
  12558. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir2/file0</expected-output>
  12559. </comparator>
  12560. </comparators>
  12561. </test>
  12562. <test> <!-- TESTED -->
  12563. <description>chown: change ownership of multiple directories in relative path using globbing</description>
  12564. <test-commands>
  12565. <command>-fs NAMENODE -mkdir -p dir0</command>
  12566. <command>-fs NAMENODE -mkdir -p dir0/dir1</command>
  12567. <command>-fs NAMENODE -touchz dir0/file0</command>
  12568. <command>-fs NAMENODE -touchz dir0/dir1/file1</command>
  12569. <command>-fs NAMENODE -touchz dir0/dir1/file2</command>
  12570. <command>-fs NAMENODE -mkdir -p dir2</command>
  12571. <command>-fs NAMENODE -mkdir -p dir2/dir1</command>
  12572. <command>-fs NAMENODE -touchz dir2/file0</command>
  12573. <command>-fs NAMENODE -touchz dir2/dir1/file1</command>
  12574. <command>-fs NAMENODE -touchz dir2/dir1/file2</command>
  12575. <command>-fs NAMENODE -chown newowner:newgroup dir*</command>
  12576. <command>-fs NAMENODE -ls -R dir*</command>
  12577. </test-commands>
  12578. <cleanup-commands>
  12579. <command>-fs NAMENODE -rm -r dir*</command>
  12580. </cleanup-commands>
  12581. <comparators>
  12582. <comparator>
  12583. <type>RegexpComparator</type>
  12584. <expected-output>^drwxr-xr-x( )*-( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/dir1</expected-output>
  12585. </comparator>
  12586. <comparator>
  12587. <type>RegexpComparator</type>
  12588. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/dir1/file1</expected-output>
  12589. </comparator>
  12590. <comparator>
  12591. <type>RegexpComparator</type>
  12592. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/dir1/file2</expected-output>
  12593. </comparator>
  12594. <comparator>
  12595. <type>RegexpComparator</type>
  12596. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/file0</expected-output>
  12597. </comparator>
  12598. <comparator>
  12599. <type>RegexpComparator</type>
  12600. <expected-output>^drwxr-xr-x( )*-( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir2/dir1</expected-output>
  12601. </comparator>
  12602. <comparator>
  12603. <type>RegexpComparator</type>
  12604. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir2/dir1/file1</expected-output>
  12605. </comparator>
  12606. <comparator>
  12607. <type>RegexpComparator</type>
  12608. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir2/dir1/file2</expected-output>
  12609. </comparator>
  12610. <comparator>
  12611. <type>RegexpComparator</type>
  12612. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir2/file0</expected-output>
  12613. </comparator>
  12614. </comparators>
  12615. </test>
  12616. <test> <!-- TESTED -->
  12617. <description>chown: change ownership of multiple files in absolute path without globbing</description>
  12618. <test-commands>
  12619. <command>-fs NAMENODE -touchz /file1</command>
  12620. <command>-fs NAMENODE -touchz /file2</command>
  12621. <command>-fs NAMENODE -touchz /file3</command>
  12622. <command>-fs NAMENODE -touchz /file4</command>
  12623. <command>-fs NAMENODE -chown newowner:newgroup /file1 /file2 /file3 /file4 </command>
  12624. <command>-fs NAMENODE -ls -R /file*</command>
  12625. </test-commands>
  12626. <cleanup-commands>
  12627. <command>-fs NAMENODE -rm /file*</command>
  12628. </cleanup-commands>
  12629. <comparators>
  12630. <comparator>
  12631. <type>RegexpComparator</type>
  12632. <expected-output>^-rw-r--r--( )*1( )*newowner( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/file1</expected-output>
  12633. </comparator>
  12634. <comparator>
  12635. <type>RegexpComparator</type>
  12636. <expected-output>^-rw-r--r--( )*1( )*newowner( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/file2</expected-output>
  12637. </comparator>
  12638. <comparator>
  12639. <type>RegexpComparator</type>
  12640. <expected-output>^-rw-r--r--( )*1( )*newowner( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/file3</expected-output>
  12641. </comparator>
  12642. <comparator>
  12643. <type>RegexpComparator</type>
  12644. <expected-output>^-rw-r--r--( )*1( )*newowner( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/file4</expected-output>
  12645. </comparator>
  12646. </comparators>
  12647. </test>
  12648. <test> <!-- TESTED -->
  12649. <description>chown: change ownership of multiple files in relative path without globbing</description>
  12650. <test-commands>
  12651. <command>-fs NAMENODE -touchz file1</command>
  12652. <command>-fs NAMENODE -touchz file2</command>
  12653. <command>-fs NAMENODE -touchz file3</command>
  12654. <command>-fs NAMENODE -touchz file4</command>
  12655. <command>-fs NAMENODE -chown newowner:newgroup file1 file2 file3 file4 </command>
  12656. <command>-fs NAMENODE -ls -R file*</command>
  12657. </test-commands>
  12658. <cleanup-commands>
  12659. <command>-fs NAMENODE -rm file*</command>
  12660. </cleanup-commands>
  12661. <comparators>
  12662. <comparator>
  12663. <type>RegexpComparator</type>
  12664. <expected-output>^-rw-r--r--( )*1( )*newowner( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*file1</expected-output>
  12665. </comparator>
  12666. <comparator>
  12667. <type>RegexpComparator</type>
  12668. <expected-output>^-rw-r--r--( )*1( )*newowner( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*file2</expected-output>
  12669. </comparator>
  12670. <comparator>
  12671. <type>RegexpComparator</type>
  12672. <expected-output>^-rw-r--r--( )*1( )*newowner( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*file3</expected-output>
  12673. </comparator>
  12674. <comparator>
  12675. <type>RegexpComparator</type>
  12676. <expected-output>^-rw-r--r--( )*1( )*newowner( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*file4</expected-output>
  12677. </comparator>
  12678. </comparators>
  12679. </test>
  12680. <test> <!-- TESTED -->
  12681. <description>chown: change ownership of multiple directories in absolute path without globbing</description>
  12682. <test-commands>
  12683. <command>-fs NAMENODE -mkdir /dir0</command>
  12684. <command>-fs NAMENODE -mkdir /dir0/dir1</command>
  12685. <command>-fs NAMENODE -touchz /dir0/file0</command>
  12686. <command>-fs NAMENODE -touchz /dir0/dir1/file1</command>
  12687. <command>-fs NAMENODE -touchz /dir0/dir1/file2</command>
  12688. <command>-fs NAMENODE -mkdir /dir2</command>
  12689. <command>-fs NAMENODE -mkdir /dir2/dir1</command>
  12690. <command>-fs NAMENODE -touchz /dir2/file0</command>
  12691. <command>-fs NAMENODE -touchz /dir2/dir1/file1</command>
  12692. <command>-fs NAMENODE -touchz /dir2/dir1/file2</command>
  12693. <command>-fs NAMENODE -chown newowner:newgroup /dir0 /dir2</command>
  12694. <command>-fs NAMENODE -ls -R /dir*</command>
  12695. </test-commands>
  12696. <cleanup-commands>
  12697. <command>-fs NAMENODE -rm -r /dir*</command>
  12698. </cleanup-commands>
  12699. <comparators>
  12700. <comparator>
  12701. <type>RegexpComparator</type>
  12702. <expected-output>^drwxr-xr-x( )*-( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1</expected-output>
  12703. </comparator>
  12704. <comparator>
  12705. <type>RegexpComparator</type>
  12706. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1/file1</expected-output>
  12707. </comparator>
  12708. <comparator>
  12709. <type>RegexpComparator</type>
  12710. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1/file2</expected-output>
  12711. </comparator>
  12712. <comparator>
  12713. <type>RegexpComparator</type>
  12714. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/file0</expected-output>
  12715. </comparator>
  12716. <comparator>
  12717. <type>RegexpComparator</type>
  12718. <expected-output>^drwxr-xr-x( )*-( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir2/dir1</expected-output>
  12719. </comparator>
  12720. <comparator>
  12721. <type>RegexpComparator</type>
  12722. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir2/dir1/file1</expected-output>
  12723. </comparator>
  12724. <comparator>
  12725. <type>RegexpComparator</type>
  12726. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir2/dir1/file2</expected-output>
  12727. </comparator>
  12728. <comparator>
  12729. <type>RegexpComparator</type>
  12730. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir2/file0</expected-output>
  12731. </comparator>
  12732. </comparators>
  12733. </test>
  12734. <test> <!-- TESTED -->
  12735. <description>chown: change ownership of multiple directories in relative path without globbing</description>
  12736. <test-commands>
  12737. <command>-fs NAMENODE -mkdir -p dir0</command>
  12738. <command>-fs NAMENODE -mkdir -p dir0/dir1</command>
  12739. <command>-fs NAMENODE -touchz dir0/file0</command>
  12740. <command>-fs NAMENODE -touchz dir0/dir1/file1</command>
  12741. <command>-fs NAMENODE -touchz dir0/dir1/file2</command>
  12742. <command>-fs NAMENODE -mkdir -p dir2</command>
  12743. <command>-fs NAMENODE -mkdir -p dir2/dir1</command>
  12744. <command>-fs NAMENODE -touchz dir2/file0</command>
  12745. <command>-fs NAMENODE -touchz dir2/dir1/file1</command>
  12746. <command>-fs NAMENODE -touchz dir2/dir1/file2</command>
  12747. <command>-fs NAMENODE -chown newowner:newgroup dir0 dir2</command>
  12748. <command>-fs NAMENODE -ls -R dir*</command>
  12749. </test-commands>
  12750. <cleanup-commands>
  12751. <command>-fs NAMENODE -rm -r dir*</command>
  12752. </cleanup-commands>
  12753. <comparators>
  12754. <comparator>
  12755. <type>RegexpComparator</type>
  12756. <expected-output>^drwxr-xr-x( )*-( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/dir1</expected-output>
  12757. </comparator>
  12758. <comparator>
  12759. <type>RegexpComparator</type>
  12760. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/dir1/file1</expected-output>
  12761. </comparator>
  12762. <comparator>
  12763. <type>RegexpComparator</type>
  12764. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/dir1/file2</expected-output>
  12765. </comparator>
  12766. <comparator>
  12767. <type>RegexpComparator</type>
  12768. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/file0</expected-output>
  12769. </comparator>
  12770. <comparator>
  12771. <type>RegexpComparator</type>
  12772. <expected-output>^drwxr-xr-x( )*-( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir2/dir1</expected-output>
  12773. </comparator>
  12774. <comparator>
  12775. <type>RegexpComparator</type>
  12776. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir2/dir1/file1</expected-output>
  12777. </comparator>
  12778. <comparator>
  12779. <type>RegexpComparator</type>
  12780. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir2/dir1/file2</expected-output>
  12781. </comparator>
  12782. <comparator>
  12783. <type>RegexpComparator</type>
  12784. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir2/file0</expected-output>
  12785. </comparator>
  12786. </comparators>
  12787. </test>
  12788. <test> <!-- TESTED -->
  12789. <description>chown: change ownership of multiple directories recursively in absolute path using globbing</description>
  12790. <test-commands>
  12791. <command>-fs NAMENODE -mkdir /dir0</command>
  12792. <command>-fs NAMENODE -mkdir /dir0/dir1</command>
  12793. <command>-fs NAMENODE -touchz /dir0/file0</command>
  12794. <command>-fs NAMENODE -touchz /dir0/dir1/file1</command>
  12795. <command>-fs NAMENODE -touchz /dir0/dir1/file2</command>
  12796. <command>-fs NAMENODE -mkdir /dir2</command>
  12797. <command>-fs NAMENODE -mkdir /dir2/dir1</command>
  12798. <command>-fs NAMENODE -touchz /dir2/file0</command>
  12799. <command>-fs NAMENODE -touchz /dir2/dir1/file1</command>
  12800. <command>-fs NAMENODE -touchz /dir2/dir1/file2</command>
  12801. <command>-fs NAMENODE -chown -R newowner:newgroup /dir*</command>
  12802. <command>-fs NAMENODE -ls -R /dir*</command>
  12803. </test-commands>
  12804. <cleanup-commands>
  12805. <command>-fs NAMENODE -rm -r /dir*</command>
  12806. </cleanup-commands>
  12807. <comparators>
  12808. <comparator>
  12809. <type>RegexpComparator</type>
  12810. <expected-output>^drwxr-xr-x( )*-( )*newowner( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1</expected-output>
  12811. </comparator>
  12812. <comparator>
  12813. <type>RegexpComparator</type>
  12814. <expected-output>^-rw-r--r--( )*1( )*newowner( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1/file1</expected-output>
  12815. </comparator>
  12816. <comparator>
  12817. <type>RegexpComparator</type>
  12818. <expected-output>^-rw-r--r--( )*1( )*newowner( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1/file2</expected-output>
  12819. </comparator>
  12820. <comparator>
  12821. <type>RegexpComparator</type>
  12822. <expected-output>^-rw-r--r--( )*1( )*newowner( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/file0</expected-output>
  12823. </comparator>
  12824. <comparator>
  12825. <type>RegexpComparator</type>
  12826. <expected-output>^drwxr-xr-x( )*-( )*newowner( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir2/dir1</expected-output>
  12827. </comparator>
  12828. <comparator>
  12829. <type>RegexpComparator</type>
  12830. <expected-output>^-rw-r--r--( )*1( )*newowner( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir2/dir1/file1</expected-output>
  12831. </comparator>
  12832. <comparator>
  12833. <type>RegexpComparator</type>
  12834. <expected-output>^-rw-r--r--( )*1( )*newowner( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir2/dir1/file2</expected-output>
  12835. </comparator>
  12836. <comparator>
  12837. <type>RegexpComparator</type>
  12838. <expected-output>^-rw-r--r--( )*1( )*newowner( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir2/file0</expected-output>
  12839. </comparator>
  12840. </comparators>
  12841. </test>
  12842. <test> <!-- TESTED -->
  12843. <description>chown: change ownership of multiple directories recursively in relative path using globbing</description>
  12844. <test-commands>
  12845. <command>-fs NAMENODE -mkdir -p dir0</command>
  12846. <command>-fs NAMENODE -mkdir -p dir0/dir1</command>
  12847. <command>-fs NAMENODE -touchz dir0/file0</command>
  12848. <command>-fs NAMENODE -touchz dir0/dir1/file1</command>
  12849. <command>-fs NAMENODE -touchz dir0/dir1/file2</command>
  12850. <command>-fs NAMENODE -mkdir -p dir2</command>
  12851. <command>-fs NAMENODE -mkdir -p dir2/dir1</command>
  12852. <command>-fs NAMENODE -touchz dir2/file0</command>
  12853. <command>-fs NAMENODE -touchz dir2/dir1/file1</command>
  12854. <command>-fs NAMENODE -touchz dir2/dir1/file2</command>
  12855. <command>-fs NAMENODE -chown -R newowner:newgroup dir*</command>
  12856. <command>-fs NAMENODE -ls -R dir*</command>
  12857. </test-commands>
  12858. <cleanup-commands>
  12859. <command>-fs NAMENODE -rm -r dir*</command>
  12860. </cleanup-commands>
  12861. <comparators>
  12862. <comparator>
  12863. <type>RegexpComparator</type>
  12864. <expected-output>^drwxr-xr-x( )*-( )*newowner( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/dir1</expected-output>
  12865. </comparator>
  12866. <comparator>
  12867. <type>RegexpComparator</type>
  12868. <expected-output>^-rw-r--r--( )*1( )*newowner( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/dir1/file1</expected-output>
  12869. </comparator>
  12870. <comparator>
  12871. <type>RegexpComparator</type>
  12872. <expected-output>^-rw-r--r--( )*1( )*newowner( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/dir1/file2</expected-output>
  12873. </comparator>
  12874. <comparator>
  12875. <type>RegexpComparator</type>
  12876. <expected-output>^-rw-r--r--( )*1( )*newowner( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/file0</expected-output>
  12877. </comparator>
  12878. <comparator>
  12879. <type>RegexpComparator</type>
  12880. <expected-output>^drwxr-xr-x( )*-( )*newowner( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir2/dir1</expected-output>
  12881. </comparator>
  12882. <comparator>
  12883. <type>RegexpComparator</type>
  12884. <expected-output>^-rw-r--r--( )*1( )*newowner( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir2/dir1/file1</expected-output>
  12885. </comparator>
  12886. <comparator>
  12887. <type>RegexpComparator</type>
  12888. <expected-output>^-rw-r--r--( )*1( )*newowner( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir2/dir1/file2</expected-output>
  12889. </comparator>
  12890. <comparator>
  12891. <type>RegexpComparator</type>
  12892. <expected-output>^-rw-r--r--( )*1( )*newowner( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir2/file0</expected-output>
  12893. </comparator>
  12894. </comparators>
  12895. </test>
  12896. <test> <!-- TESTED -->
  12897. <description>chown: change ownership of multiple directories recursively in absolute path without globbing</description>
  12898. <test-commands>
  12899. <command>-fs NAMENODE -mkdir /dir0</command>
  12900. <command>-fs NAMENODE -mkdir /dir0/dir1</command>
  12901. <command>-fs NAMENODE -touchz /dir0/file0</command>
  12902. <command>-fs NAMENODE -touchz /dir0/dir1/file1</command>
  12903. <command>-fs NAMENODE -touchz /dir0/dir1/file2</command>
  12904. <command>-fs NAMENODE -mkdir /dir2</command>
  12905. <command>-fs NAMENODE -mkdir /dir2/dir1</command>
  12906. <command>-fs NAMENODE -touchz /dir2/file0</command>
  12907. <command>-fs NAMENODE -touchz /dir2/dir1/file1</command>
  12908. <command>-fs NAMENODE -touchz /dir2/dir1/file2</command>
  12909. <command>-fs NAMENODE -chown -R newowner:newgroup /dir0 /dir2</command>
  12910. <command>-fs NAMENODE -ls -R /dir*</command>
  12911. </test-commands>
  12912. <cleanup-commands>
  12913. <command>-fs NAMENODE -rm -r /dir*</command>
  12914. </cleanup-commands>
  12915. <comparators>
  12916. <comparator>
  12917. <type>RegexpComparator</type>
  12918. <expected-output>^drwxr-xr-x( )*-( )*newowner( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1</expected-output>
  12919. </comparator>
  12920. <comparator>
  12921. <type>RegexpComparator</type>
  12922. <expected-output>^-rw-r--r--( )*1( )*newowner( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1/file1</expected-output>
  12923. </comparator>
  12924. <comparator>
  12925. <type>RegexpComparator</type>
  12926. <expected-output>^-rw-r--r--( )*1( )*newowner( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1/file2</expected-output>
  12927. </comparator>
  12928. <comparator>
  12929. <type>RegexpComparator</type>
  12930. <expected-output>^-rw-r--r--( )*1( )*newowner( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/file0</expected-output>
  12931. </comparator>
  12932. <comparator>
  12933. <type>RegexpComparator</type>
  12934. <expected-output>^drwxr-xr-x( )*-( )*newowner( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir2/dir1</expected-output>
  12935. </comparator>
  12936. <comparator>
  12937. <type>RegexpComparator</type>
  12938. <expected-output>^-rw-r--r--( )*1( )*newowner( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir2/dir1/file1</expected-output>
  12939. </comparator>
  12940. <comparator>
  12941. <type>RegexpComparator</type>
  12942. <expected-output>^-rw-r--r--( )*1( )*newowner( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir2/dir1/file2</expected-output>
  12943. </comparator>
  12944. <comparator>
  12945. <type>RegexpComparator</type>
  12946. <expected-output>^-rw-r--r--( )*1( )*newowner( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir2/file0</expected-output>
  12947. </comparator>
  12948. </comparators>
  12949. </test>
  12950. <test> <!-- TESTED -->
  12951. <description>chown: change ownership of multiple directories recursively in relative path without globbing</description>
  12952. <test-commands>
  12953. <command>-fs NAMENODE -mkdir -p dir0</command>
  12954. <command>-fs NAMENODE -mkdir -p dir0/dir1</command>
  12955. <command>-fs NAMENODE -touchz dir0/file0</command>
  12956. <command>-fs NAMENODE -touchz dir0/dir1/file1</command>
  12957. <command>-fs NAMENODE -touchz dir0/dir1/file2</command>
  12958. <command>-fs NAMENODE -mkdir -p dir2</command>
  12959. <command>-fs NAMENODE -mkdir -p dir2/dir1</command>
  12960. <command>-fs NAMENODE -touchz dir2/file0</command>
  12961. <command>-fs NAMENODE -touchz dir2/dir1/file1</command>
  12962. <command>-fs NAMENODE -touchz dir2/dir1/file2</command>
  12963. <command>-fs NAMENODE -chown -R newowner:newgroup dir0 dir2</command>
  12964. <command>-fs NAMENODE -ls -R dir*</command>
  12965. </test-commands>
  12966. <cleanup-commands>
  12967. <command>-fs NAMENODE -rm -r dir*</command>
  12968. </cleanup-commands>
  12969. <comparators>
  12970. <comparator>
  12971. <type>RegexpComparator</type>
  12972. <expected-output>^drwxr-xr-x( )*-( )*newowner( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/dir1</expected-output>
  12973. </comparator>
  12974. <comparator>
  12975. <type>RegexpComparator</type>
  12976. <expected-output>^-rw-r--r--( )*1( )*newowner( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/dir1/file1</expected-output>
  12977. </comparator>
  12978. <comparator>
  12979. <type>RegexpComparator</type>
  12980. <expected-output>^-rw-r--r--( )*1( )*newowner( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/dir1/file2</expected-output>
  12981. </comparator>
  12982. <comparator>
  12983. <type>RegexpComparator</type>
  12984. <expected-output>^-rw-r--r--( )*1( )*newowner( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/file0</expected-output>
  12985. </comparator>
  12986. <comparator>
  12987. <type>RegexpComparator</type>
  12988. <expected-output>^drwxr-xr-x( )*-( )*newowner( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir2/dir1</expected-output>
  12989. </comparator>
  12990. <comparator>
  12991. <type>RegexpComparator</type>
  12992. <expected-output>^-rw-r--r--( )*1( )*newowner( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir2/dir1/file1</expected-output>
  12993. </comparator>
  12994. <comparator>
  12995. <type>RegexpComparator</type>
  12996. <expected-output>^-rw-r--r--( )*1( )*newowner( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir2/dir1/file2</expected-output>
  12997. </comparator>
  12998. <comparator>
  12999. <type>RegexpComparator</type>
  13000. <expected-output>^-rw-r--r--( )*1( )*newowner( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir2/file0</expected-output>
  13001. </comparator>
  13002. </comparators>
  13003. </test>
  13004. <test> <!-- TESTED -->
  13005. <description>chown: invalid option for owner of file in absolute path</description>
  13006. <test-commands>
  13007. <command>-fs NAMENODE -touchz /file1</command>
  13008. <command>-fs NAMENODE -chown %:newgroup /file1</command>
  13009. </test-commands>
  13010. <cleanup-commands>
  13011. <command>-fs NAMENODE -rm /file1</command>
  13012. </cleanup-commands>
  13013. <comparators>
  13014. <comparator>
  13015. <type>RegexpComparator</type>
  13016. <expected-output>^-chown: '%:newgroup' does not match expected pattern for \[owner\]\[:group\].</expected-output>
  13017. </comparator>
  13018. </comparators>
  13019. </test>
  13020. <test> <!-- TESTED -->
  13021. <description>chown: invalid option for owner of file in relative path</description>
  13022. <test-commands>
  13023. <command>-fs NAMENODE -touchz file1</command>
  13024. <command>-fs NAMENODE -chown %:newgroup file1</command>
  13025. </test-commands>
  13026. <cleanup-commands>
  13027. <command>-fs NAMENODE -rm file1</command>
  13028. </cleanup-commands>
  13029. <comparators>
  13030. <comparator>
  13031. <type>RegexpComparator</type>
  13032. <expected-output>^-chown: '%:newgroup' does not match expected pattern for \[owner\]\[:group\].</expected-output>
  13033. </comparator>
  13034. </comparators>
  13035. </test>
  13036. <test> <!-- TESTED -->
  13037. <description>chown: invalid option for group of file in absolute path</description>
  13038. <test-commands>
  13039. <command>-fs NAMENODE -touchz /file1</command>
  13040. <command>-fs NAMENODE -chown newowner:% /file1</command>
  13041. </test-commands>
  13042. <cleanup-commands>
  13043. <command>-fs NAMENODE -rm /file1</command>
  13044. </cleanup-commands>
  13045. <comparators>
  13046. <comparator>
  13047. <type>RegexpComparator</type>
  13048. <expected-output>^-chown: 'newowner:%' does not match expected pattern for \[owner\]\[:group\].</expected-output>
  13049. </comparator>
  13050. </comparators>
  13051. </test>
  13052. <test> <!-- TESTED -->
  13053. <description>chown: invalid option for group of file in relative path</description>
  13054. <test-commands>
  13055. <command>-fs NAMENODE -touchz file1</command>
  13056. <command>-fs NAMENODE -chown newowner:% file1</command>
  13057. </test-commands>
  13058. <cleanup-commands>
  13059. <command>-fs NAMENODE -rm file1</command>
  13060. </cleanup-commands>
  13061. <comparators>
  13062. <comparator>
  13063. <type>RegexpComparator</type>
  13064. <expected-output>^-chown: 'newowner:%' does not match expected pattern for \[owner\]\[:group\].</expected-output>
  13065. </comparator>
  13066. </comparators>
  13067. </test>
  13068. <test> <!-- TESTED -->
  13069. <description>chown: change ownership of file in Namenode's path</description>
  13070. <test-commands>
  13071. <command>-fs NAMENODE -touchz NAMENODE/file1</command>
  13072. <command>-fs NAMENODE -chown newowner:newgroup NAMENODE/file1</command>
  13073. <command>-fs NAMENODE -ls NAMENODE/file1</command>
  13074. </test-commands>
  13075. <cleanup-commands>
  13076. <command>-fs NAMENODE -rm NAMENODE/file1</command>
  13077. </cleanup-commands>
  13078. <comparators>
  13079. <comparator>
  13080. <type>RegexpComparator</type>
  13081. <expected-output>^-rw-r--r--( )*1( )*newowner( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/file1</expected-output>
  13082. </comparator>
  13083. </comparators>
  13084. </test>
  13085. <test> <!-- TESTED -->
  13086. <description>chown: change ownership of directory in Namenode's path</description>
  13087. <test-commands>
  13088. <command>-fs NAMENODE -mkdir NAMENODE/dir0</command>
  13089. <command>-fs NAMENODE -mkdir NAMENODE/dir0/dir1</command>
  13090. <command>-fs NAMENODE -touchz NAMENODE/dir0/file0</command>
  13091. <command>-fs NAMENODE -touchz NAMENODE/dir0/dir1/file1</command>
  13092. <command>-fs NAMENODE -touchz NAMENODE/dir0/dir1/file2</command>
  13093. <command>-fs NAMENODE -chown newowner:newgroup NAMENODE/dir0/dir1</command>
  13094. <command>-fs NAMENODE -ls -R NAMENODE/dir0</command>
  13095. </test-commands>
  13096. <cleanup-commands>
  13097. <command>-fs NAMENODE -rm -r NAMENODE/dir0</command>
  13098. </cleanup-commands>
  13099. <comparators>
  13100. <comparator>
  13101. <type>RegexpComparator</type>
  13102. <expected-output>^drwxr-xr-x( )*-( )*newowner( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir0/dir1</expected-output>
  13103. </comparator>
  13104. <comparator>
  13105. <type>RegexpComparator</type>
  13106. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir0/dir1/file1</expected-output>
  13107. </comparator>
  13108. <comparator>
  13109. <type>RegexpComparator</type>
  13110. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir0/dir1/file2</expected-output>
  13111. </comparator>
  13112. <comparator>
  13113. <type>RegexpComparator</type>
  13114. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir0/file0</expected-output>
  13115. </comparator>
  13116. </comparators>
  13117. </test>
  13118. <test> <!-- TESTED -->
  13119. <description>chown: change ownership of directory in Namenode's path recursively </description>
  13120. <test-commands>
  13121. <command>-fs NAMENODE -mkdir NAMENODE/dir0</command>
  13122. <command>-fs NAMENODE -mkdir NAMENODE/dir0/dir1</command>
  13123. <command>-fs NAMENODE -touchz NAMENODE/dir0/file0</command>
  13124. <command>-fs NAMENODE -touchz NAMENODE/dir0/dir1/file1</command>
  13125. <command>-fs NAMENODE -touchz NAMENODE/dir0/dir1/file2</command>
  13126. <command>-fs NAMENODE -chown -R newowner:newgroup NAMENODE/dir0/dir1</command>
  13127. <command>-fs NAMENODE -ls -R NAMENODE/dir0</command>
  13128. </test-commands>
  13129. <cleanup-commands>
  13130. <command>-fs NAMENODE -rm -r NAMENODE/dir0</command>
  13131. </cleanup-commands>
  13132. <comparators>
  13133. <comparator>
  13134. <type>RegexpComparator</type>
  13135. <expected-output>^drwxr-xr-x( )*-( )*newowner( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir0/dir1</expected-output>
  13136. </comparator>
  13137. <comparator>
  13138. <type>RegexpComparator</type>
  13139. <expected-output>^-rw-r--r--( )*1( )*newowner( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir0/dir1/file1</expected-output>
  13140. </comparator>
  13141. <comparator>
  13142. <type>RegexpComparator</type>
  13143. <expected-output>^-rw-r--r--( )*1( )*newowner( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir0/dir1/file2</expected-output>
  13144. </comparator>
  13145. <comparator>
  13146. <type>RegexpComparator</type>
  13147. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir0/file0</expected-output>
  13148. </comparator>
  13149. </comparators>
  13150. </test>
  13151. <test> <!-- TESTED -->
  13152. <description>chown: change ownership of non existent file in Namenode's path</description>
  13153. <test-commands>
  13154. <command>-fs NAMENODE -chown newowner:newgroup NAMENODE/file1</command>
  13155. </test-commands>
  13156. <cleanup-commands>
  13157. <command>-fs NAMENODE -rm NAMENODE/file1</command>
  13158. </cleanup-commands>
  13159. <comparators>
  13160. <comparator>
  13161. <type>RegexpComparator</type>
  13162. <expected-output>^chown: `NAMENODE/file1': No such file or directory</expected-output>
  13163. </comparator>
  13164. </comparators>
  13165. </test>
  13166. <test> <!-- TESTED -->
  13167. <description>chown: change ownership of multiple files in Namenode's path using globbing</description>
  13168. <test-commands>
  13169. <command>-fs NAMENODE -touchz NAMENODE/file1</command>
  13170. <command>-fs NAMENODE -touchz NAMENODE/file2</command>
  13171. <command>-fs NAMENODE -touchz NAMENODE/file3</command>
  13172. <command>-fs NAMENODE -touchz NAMENODE/file4</command>
  13173. <command>-fs NAMENODE -chown newowner:newgroup NAMENODE/file* </command>
  13174. <command>-fs NAMENODE -ls -R NAMENODE/file*</command>
  13175. </test-commands>
  13176. <cleanup-commands>
  13177. <command>-fs NAMENODE -rm NAMENODE/file*</command>
  13178. </cleanup-commands>
  13179. <comparators>
  13180. <comparator>
  13181. <type>RegexpComparator</type>
  13182. <expected-output>^-rw-r--r--( )*1( )*newowner( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/file1</expected-output>
  13183. </comparator>
  13184. <comparator>
  13185. <type>RegexpComparator</type>
  13186. <expected-output>^-rw-r--r--( )*1( )*newowner( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/file2</expected-output>
  13187. </comparator>
  13188. <comparator>
  13189. <type>RegexpComparator</type>
  13190. <expected-output>^-rw-r--r--( )*1( )*newowner( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/file3</expected-output>
  13191. </comparator>
  13192. <comparator>
  13193. <type>RegexpComparator</type>
  13194. <expected-output>^-rw-r--r--( )*1( )*newowner( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/file4</expected-output>
  13195. </comparator>
  13196. </comparators>
  13197. </test>
  13198. <test> <!-- TESTED -->
  13199. <description>chown: change ownership of multiple directories in Namenode's path using globbing</description>
  13200. <test-commands>
  13201. <command>-fs NAMENODE -mkdir NAMENODE/dir0</command>
  13202. <command>-fs NAMENODE -mkdir NAMENODE/dir0/dir1</command>
  13203. <command>-fs NAMENODE -touchz NAMENODE/dir0/file0</command>
  13204. <command>-fs NAMENODE -touchz NAMENODE/dir0/dir1/file1</command>
  13205. <command>-fs NAMENODE -touchz NAMENODE/dir0/dir1/file2</command>
  13206. <command>-fs NAMENODE -mkdir NAMENODE/dir2</command>
  13207. <command>-fs NAMENODE -mkdir NAMENODE/dir2/dir1</command>
  13208. <command>-fs NAMENODE -touchz NAMENODE/dir2/file0</command>
  13209. <command>-fs NAMENODE -touchz NAMENODE/dir2/dir1/file1</command>
  13210. <command>-fs NAMENODE -touchz NAMENODE/dir2/dir1/file2</command>
  13211. <command>-fs NAMENODE -chown newowner:newgroup NAMENODE/dir*</command>
  13212. <command>-fs NAMENODE -ls -R NAMENODE/dir*</command>
  13213. </test-commands>
  13214. <cleanup-commands>
  13215. <command>-fs NAMENODE -rm -r NAMENODE/dir*</command>
  13216. </cleanup-commands>
  13217. <comparators>
  13218. <comparator>
  13219. <type>RegexpComparator</type>
  13220. <expected-output>^drwxr-xr-x( )*-( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir0/dir1</expected-output>
  13221. </comparator>
  13222. <comparator>
  13223. <type>RegexpComparator</type>
  13224. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir0/dir1/file1</expected-output>
  13225. </comparator>
  13226. <comparator>
  13227. <type>RegexpComparator</type>
  13228. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir0/dir1/file2</expected-output>
  13229. </comparator>
  13230. <comparator>
  13231. <type>RegexpComparator</type>
  13232. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir0/file0</expected-output>
  13233. </comparator>
  13234. <comparator>
  13235. <type>RegexpComparator</type>
  13236. <expected-output>^drwxr-xr-x( )*-( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir2/dir1</expected-output>
  13237. </comparator>
  13238. <comparator>
  13239. <type>RegexpComparator</type>
  13240. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir2/dir1/file1</expected-output>
  13241. </comparator>
  13242. <comparator>
  13243. <type>RegexpComparator</type>
  13244. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir2/dir1/file2</expected-output>
  13245. </comparator>
  13246. <comparator>
  13247. <type>RegexpComparator</type>
  13248. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir2/file0</expected-output>
  13249. </comparator>
  13250. </comparators>
  13251. </test>
  13252. <test> <!-- TESTED -->
  13253. <description>chown: change ownership of multiple files in Namenode's path without globbing</description>
  13254. <test-commands>
  13255. <command>-fs NAMENODE -touchz NAMENODE/file1</command>
  13256. <command>-fs NAMENODE -touchz NAMENODE/file2</command>
  13257. <command>-fs NAMENODE -touchz NAMENODE/file3</command>
  13258. <command>-fs NAMENODE -touchz NAMENODE/file4</command>
  13259. <command>-fs NAMENODE -chown newowner:newgroup NAMENODE/file1 NAMENODE/file2 NAMENODE/file3 NAMENODE/file4 </command>
  13260. <command>-fs NAMENODE -ls -R NAMENODE/file*</command>
  13261. </test-commands>
  13262. <cleanup-commands>
  13263. <command>-fs NAMENODE -rm NAMENODE/file*</command>
  13264. </cleanup-commands>
  13265. <comparators>
  13266. <comparator>
  13267. <type>RegexpComparator</type>
  13268. <expected-output>^-rw-r--r--( )*1( )*newowner( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/file1</expected-output>
  13269. </comparator>
  13270. <comparator>
  13271. <type>RegexpComparator</type>
  13272. <expected-output>^-rw-r--r--( )*1( )*newowner( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/file2</expected-output>
  13273. </comparator>
  13274. <comparator>
  13275. <type>RegexpComparator</type>
  13276. <expected-output>^-rw-r--r--( )*1( )*newowner( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/file3</expected-output>
  13277. </comparator>
  13278. <comparator>
  13279. <type>RegexpComparator</type>
  13280. <expected-output>^-rw-r--r--( )*1( )*newowner( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/file4</expected-output>
  13281. </comparator>
  13282. </comparators>
  13283. </test>
  13284. <test> <!-- TESTED -->
  13285. <description>chown: change ownership of multiple directories in Namenode's path without globbing</description>
  13286. <test-commands>
  13287. <command>-fs NAMENODE -mkdir NAMENODE/dir0</command>
  13288. <command>-fs NAMENODE -mkdir NAMENODE/dir0/dir1</command>
  13289. <command>-fs NAMENODE -touchz NAMENODE/dir0/file0</command>
  13290. <command>-fs NAMENODE -touchz NAMENODE/dir0/dir1/file1</command>
  13291. <command>-fs NAMENODE -touchz NAMENODE/dir0/dir1/file2</command>
  13292. <command>-fs NAMENODE -mkdir NAMENODE/dir2</command>
  13293. <command>-fs NAMENODE -mkdir NAMENODE/dir2/dir1</command>
  13294. <command>-fs NAMENODE -touchz NAMENODE/dir2/file0</command>
  13295. <command>-fs NAMENODE -touchz NAMENODE/dir2/dir1/file1</command>
  13296. <command>-fs NAMENODE -touchz NAMENODE/dir2/dir1/file2</command>
  13297. <command>-fs NAMENODE -chown newowner:newgroup NAMENODE/dir0 NAMENODE/dir2</command>
  13298. <command>-fs NAMENODE -ls -R NAMENODE/dir*</command>
  13299. </test-commands>
  13300. <cleanup-commands>
  13301. <command>-fs NAMENODE -rm -r NAMENODE/dir*</command>
  13302. </cleanup-commands>
  13303. <comparators>
  13304. <comparator>
  13305. <type>RegexpComparator</type>
  13306. <expected-output>^drwxr-xr-x( )*-( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir0/dir1</expected-output>
  13307. </comparator>
  13308. <comparator>
  13309. <type>RegexpComparator</type>
  13310. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir0/dir1/file1</expected-output>
  13311. </comparator>
  13312. <comparator>
  13313. <type>RegexpComparator</type>
  13314. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir0/dir1/file2</expected-output>
  13315. </comparator>
  13316. <comparator>
  13317. <type>RegexpComparator</type>
  13318. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir0/file0</expected-output>
  13319. </comparator>
  13320. <comparator>
  13321. <type>RegexpComparator</type>
  13322. <expected-output>^drwxr-xr-x( )*-( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir2/dir1</expected-output>
  13323. </comparator>
  13324. <comparator>
  13325. <type>RegexpComparator</type>
  13326. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir2/dir1/file1</expected-output>
  13327. </comparator>
  13328. <comparator>
  13329. <type>RegexpComparator</type>
  13330. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir2/dir1/file2</expected-output>
  13331. </comparator>
  13332. <comparator>
  13333. <type>RegexpComparator</type>
  13334. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir2/file0</expected-output>
  13335. </comparator>
  13336. </comparators>
  13337. </test>
  13338. <test> <!-- TESTED -->
  13339. <description>chown: change ownership of multiple directories recursively in Namenode's path using globbing</description>
  13340. <test-commands>
  13341. <command>-fs NAMENODE -mkdir NAMENODE/dir0</command>
  13342. <command>-fs NAMENODE -mkdir NAMENODE/dir0/dir1</command>
  13343. <command>-fs NAMENODE -touchz NAMENODE/dir0/file0</command>
  13344. <command>-fs NAMENODE -touchz NAMENODE/dir0/dir1/file1</command>
  13345. <command>-fs NAMENODE -touchz NAMENODE/dir0/dir1/file2</command>
  13346. <command>-fs NAMENODE -mkdir NAMENODE/dir2</command>
  13347. <command>-fs NAMENODE -mkdir NAMENODE/dir2/dir1</command>
  13348. <command>-fs NAMENODE -touchz NAMENODE/dir2/file0</command>
  13349. <command>-fs NAMENODE -touchz NAMENODE/dir2/dir1/file1</command>
  13350. <command>-fs NAMENODE -touchz NAMENODE/dir2/dir1/file2</command>
  13351. <command>-fs NAMENODE -chown -R newowner:newgroup NAMENODE/dir*</command>
  13352. <command>-fs NAMENODE -ls -R NAMENODE/dir*</command>
  13353. </test-commands>
  13354. <cleanup-commands>
  13355. <command>-fs NAMENODE -rm -r NAMENODE/dir*</command>
  13356. </cleanup-commands>
  13357. <comparators>
  13358. <comparator>
  13359. <type>RegexpComparator</type>
  13360. <expected-output>^drwxr-xr-x( )*-( )*newowner( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir0/dir1</expected-output>
  13361. </comparator>
  13362. <comparator>
  13363. <type>RegexpComparator</type>
  13364. <expected-output>^-rw-r--r--( )*1( )*newowner( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir0/dir1/file1</expected-output>
  13365. </comparator>
  13366. <comparator>
  13367. <type>RegexpComparator</type>
  13368. <expected-output>^-rw-r--r--( )*1( )*newowner( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir0/dir1/file2</expected-output>
  13369. </comparator>
  13370. <comparator>
  13371. <type>RegexpComparator</type>
  13372. <expected-output>^-rw-r--r--( )*1( )*newowner( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir0/file0</expected-output>
  13373. </comparator>
  13374. <comparator>
  13375. <type>RegexpComparator</type>
  13376. <expected-output>^drwxr-xr-x( )*-( )*newowner( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir2/dir1</expected-output>
  13377. </comparator>
  13378. <comparator>
  13379. <type>RegexpComparator</type>
  13380. <expected-output>^-rw-r--r--( )*1( )*newowner( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir2/dir1/file1</expected-output>
  13381. </comparator>
  13382. <comparator>
  13383. <type>RegexpComparator</type>
  13384. <expected-output>^-rw-r--r--( )*1( )*newowner( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir2/dir1/file2</expected-output>
  13385. </comparator>
  13386. <comparator>
  13387. <type>RegexpComparator</type>
  13388. <expected-output>^-rw-r--r--( )*1( )*newowner( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir2/file0</expected-output>
  13389. </comparator>
  13390. </comparators>
  13391. </test>
  13392. <test> <!-- TESTED -->
  13393. <description>chown: change ownership of multiple directories recursively in Namenode's path without globbing</description>
  13394. <test-commands>
  13395. <command>-fs NAMENODE -mkdir NAMENODE/dir0</command>
  13396. <command>-fs NAMENODE -mkdir NAMENODE/dir0/dir1</command>
  13397. <command>-fs NAMENODE -touchz NAMENODE/dir0/file0</command>
  13398. <command>-fs NAMENODE -touchz NAMENODE/dir0/dir1/file1</command>
  13399. <command>-fs NAMENODE -touchz NAMENODE/dir0/dir1/file2</command>
  13400. <command>-fs NAMENODE -mkdir NAMENODE/dir2</command>
  13401. <command>-fs NAMENODE -mkdir NAMENODE/dir2/dir1</command>
  13402. <command>-fs NAMENODE -touchz NAMENODE/dir2/file0</command>
  13403. <command>-fs NAMENODE -touchz NAMENODE/dir2/dir1/file1</command>
  13404. <command>-fs NAMENODE -touchz NAMENODE/dir2/dir1/file2</command>
  13405. <command>-fs NAMENODE -chown -R newowner:newgroup NAMENODE/dir0 NAMENODE/dir2</command>
  13406. <command>-fs NAMENODE -ls -R NAMENODE/dir*</command>
  13407. </test-commands>
  13408. <cleanup-commands>
  13409. <command>-fs NAMENODE -rm -r NAMENODE/dir*</command>
  13410. </cleanup-commands>
  13411. <comparators>
  13412. <comparator>
  13413. <type>RegexpComparator</type>
  13414. <expected-output>^drwxr-xr-x( )*-( )*newowner( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir0/dir1</expected-output>
  13415. </comparator>
  13416. <comparator>
  13417. <type>RegexpComparator</type>
  13418. <expected-output>^-rw-r--r--( )*1( )*newowner( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir0/dir1/file1</expected-output>
  13419. </comparator>
  13420. <comparator>
  13421. <type>RegexpComparator</type>
  13422. <expected-output>^-rw-r--r--( )*1( )*newowner( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir0/dir1/file2</expected-output>
  13423. </comparator>
  13424. <comparator>
  13425. <type>RegexpComparator</type>
  13426. <expected-output>^-rw-r--r--( )*1( )*newowner( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir0/file0</expected-output>
  13427. </comparator>
  13428. <comparator>
  13429. <type>RegexpComparator</type>
  13430. <expected-output>^drwxr-xr-x( )*-( )*newowner( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir2/dir1</expected-output>
  13431. </comparator>
  13432. <comparator>
  13433. <type>RegexpComparator</type>
  13434. <expected-output>^-rw-r--r--( )*1( )*newowner( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir2/dir1/file1</expected-output>
  13435. </comparator>
  13436. <comparator>
  13437. <type>RegexpComparator</type>
  13438. <expected-output>^-rw-r--r--( )*1( )*newowner( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir2/dir1/file2</expected-output>
  13439. </comparator>
  13440. <comparator>
  13441. <type>RegexpComparator</type>
  13442. <expected-output>^-rw-r--r--( )*1( )*newowner( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir2/file0</expected-output>
  13443. </comparator>
  13444. </comparators>
  13445. </test>
  13446. <test> <!-- TESTED -->
  13447. <description>chown: invalid option for owner of file in Namenode's path</description>
  13448. <test-commands>
  13449. <command>-fs NAMENODE -touchz NAMENODE/file1</command>
  13450. <command>-fs NAMENODE -chown %:newgroup NAMENODE/file1</command>
  13451. </test-commands>
  13452. <cleanup-commands>
  13453. <command>-fs NAMENODE -rm NAMENODE/file1</command>
  13454. </cleanup-commands>
  13455. <comparators>
  13456. <comparator>
  13457. <type>RegexpComparator</type>
  13458. <expected-output>^-chown: '%:newgroup' does not match expected pattern for \[owner\]\[:group\].</expected-output>
  13459. </comparator>
  13460. </comparators>
  13461. </test>
  13462. <test> <!-- TESTED -->
  13463. <description>chown: invalid option for group of file in Namenode's path</description>
  13464. <test-commands>
  13465. <command>-fs NAMENODE -touchz NAMENODE/file1</command>
  13466. <command>-fs NAMENODE -chown newowner:% NAMENODE/file1</command>
  13467. </test-commands>
  13468. <cleanup-commands>
  13469. <command>-fs NAMENODE -rm NAMENODE/file1</command>
  13470. </cleanup-commands>
  13471. <comparators>
  13472. <comparator>
  13473. <type>RegexpComparator</type>
  13474. <expected-output>^-chown: 'newowner:%' does not match expected pattern for \[owner\]\[:group\].</expected-output>
  13475. </comparator>
  13476. </comparators>
  13477. </test>
  13478. <!-- Tests for chgrp -->
  13479. <test> <!-- TESTED -->
  13480. <description>chgrp: change group of file in absolute path</description>
  13481. <test-commands>
  13482. <command>-fs NAMENODE -touchz /file1</command>
  13483. <command>-fs NAMENODE -chgrp newgroup /file1</command>
  13484. <command>-fs NAMENODE -ls /file1</command>
  13485. </test-commands>
  13486. <cleanup-commands>
  13487. <command>-fs NAMENODE -rm /file1</command>
  13488. </cleanup-commands>
  13489. <comparators>
  13490. <comparator>
  13491. <type>RegexpComparator</type>
  13492. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/file1</expected-output>
  13493. </comparator>
  13494. </comparators>
  13495. </test>
  13496. <test> <!-- TESTED -->
  13497. <description>chgrp: change group of file in relative path</description>
  13498. <test-commands>
  13499. <command>-fs NAMENODE -touchz file1</command>
  13500. <command>-fs NAMENODE -chgrp newgroup file1</command>
  13501. <command>-fs NAMENODE -ls file1</command>
  13502. </test-commands>
  13503. <cleanup-commands>
  13504. <command>-fs NAMENODE -rm file1</command>
  13505. </cleanup-commands>
  13506. <comparators>
  13507. <comparator>
  13508. <type>RegexpComparator</type>
  13509. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*file1</expected-output>
  13510. </comparator>
  13511. </comparators>
  13512. </test>
  13513. <test> <!-- TESTED -->
  13514. <description>chgrp: change group of directory in absolute path</description>
  13515. <test-commands>
  13516. <command>-fs NAMENODE -mkdir /dir0</command>
  13517. <command>-fs NAMENODE -mkdir /dir0/dir1</command>
  13518. <command>-fs NAMENODE -touchz /dir0/file0</command>
  13519. <command>-fs NAMENODE -touchz /dir0/dir1/file1</command>
  13520. <command>-fs NAMENODE -touchz /dir0/dir1/file2</command>
  13521. <command>-fs NAMENODE -chgrp newgroup /dir0/dir1</command>
  13522. <command>-fs NAMENODE -ls -R /dir0</command>
  13523. </test-commands>
  13524. <cleanup-commands>
  13525. <command>-fs NAMENODE -rm -r /dir0</command>
  13526. </cleanup-commands>
  13527. <comparators>
  13528. <comparator>
  13529. <type>RegexpComparator</type>
  13530. <expected-output>^drwxr-xr-x( )*-( )*USERNAME( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1</expected-output>
  13531. </comparator>
  13532. <comparator>
  13533. <type>RegexpComparator</type>
  13534. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1/file1</expected-output>
  13535. </comparator>
  13536. <comparator>
  13537. <type>RegexpComparator</type>
  13538. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1/file2</expected-output>
  13539. </comparator>
  13540. <comparator>
  13541. <type>RegexpComparator</type>
  13542. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/file0</expected-output>
  13543. </comparator>
  13544. </comparators>
  13545. </test>
  13546. <test> <!-- TESTED -->
  13547. <description>chgrp: change group of directory in relative path</description>
  13548. <test-commands>
  13549. <command>-fs NAMENODE -mkdir -p dir0</command>
  13550. <command>-fs NAMENODE -mkdir -p dir0/dir1</command>
  13551. <command>-fs NAMENODE -touchz dir0/file0</command>
  13552. <command>-fs NAMENODE -touchz dir0/dir1/file1</command>
  13553. <command>-fs NAMENODE -touchz dir0/dir1/file2</command>
  13554. <command>-fs NAMENODE -chgrp newgroup dir0/dir1</command>
  13555. <command>-fs NAMENODE -ls -R dir0</command>
  13556. </test-commands>
  13557. <cleanup-commands>
  13558. <command>-fs NAMENODE -rm -r dir0</command>
  13559. </cleanup-commands>
  13560. <comparators>
  13561. <comparator>
  13562. <type>RegexpComparator</type>
  13563. <expected-output>^drwxr-xr-x( )*-( )*USERNAME( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/dir1</expected-output>
  13564. </comparator>
  13565. <comparator>
  13566. <type>RegexpComparator</type>
  13567. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/dir1/file1</expected-output>
  13568. </comparator>
  13569. <comparator>
  13570. <type>RegexpComparator</type>
  13571. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/dir1/file2</expected-output>
  13572. </comparator>
  13573. <comparator>
  13574. <type>RegexpComparator</type>
  13575. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/file0</expected-output>
  13576. </comparator>
  13577. </comparators>
  13578. </test>
  13579. <test> <!-- TESTED -->
  13580. <description>chgrp: change group of directory in absolute path recursively </description>
  13581. <test-commands>
  13582. <command>-fs NAMENODE -mkdir /dir0</command>
  13583. <command>-fs NAMENODE -mkdir /dir0/dir1</command>
  13584. <command>-fs NAMENODE -touchz /dir0/file0</command>
  13585. <command>-fs NAMENODE -touchz /dir0/dir1/file1</command>
  13586. <command>-fs NAMENODE -touchz /dir0/dir1/file2</command>
  13587. <command>-fs NAMENODE -chgrp -R newgroup /dir0/dir1</command>
  13588. <command>-fs NAMENODE -ls -R /dir0</command>
  13589. </test-commands>
  13590. <cleanup-commands>
  13591. <command>-fs NAMENODE -rm -r /dir0</command>
  13592. </cleanup-commands>
  13593. <comparators>
  13594. <comparator>
  13595. <type>RegexpComparator</type>
  13596. <expected-output>^drwxr-xr-x( )*-( )*USERNAME( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1</expected-output>
  13597. </comparator>
  13598. <comparator>
  13599. <type>RegexpComparator</type>
  13600. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1/file1</expected-output>
  13601. </comparator>
  13602. <comparator>
  13603. <type>RegexpComparator</type>
  13604. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1/file2</expected-output>
  13605. </comparator>
  13606. <comparator>
  13607. <type>RegexpComparator</type>
  13608. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/file0</expected-output>
  13609. </comparator>
  13610. </comparators>
  13611. </test>
  13612. <test> <!-- TESTED -->
  13613. <description>chgrp: change group of directory in relative path recursively </description>
  13614. <test-commands>
  13615. <command>-fs NAMENODE -mkdir -p dir0</command>
  13616. <command>-fs NAMENODE -mkdir -p dir0/dir1</command>
  13617. <command>-fs NAMENODE -touchz dir0/file0</command>
  13618. <command>-fs NAMENODE -touchz dir0/dir1/file1</command>
  13619. <command>-fs NAMENODE -touchz dir0/dir1/file2</command>
  13620. <command>-fs NAMENODE -chgrp -R newgroup dir0/dir1</command>
  13621. <command>-fs NAMENODE -ls -R dir0</command>
  13622. </test-commands>
  13623. <cleanup-commands>
  13624. <command>-fs NAMENODE -rm -r dir0</command>
  13625. </cleanup-commands>
  13626. <comparators>
  13627. <comparator>
  13628. <type>RegexpComparator</type>
  13629. <expected-output>^drwxr-xr-x( )*-( )*USERNAME( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/dir1</expected-output>
  13630. </comparator>
  13631. <comparator>
  13632. <type>RegexpComparator</type>
  13633. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/dir1/file1</expected-output>
  13634. </comparator>
  13635. <comparator>
  13636. <type>RegexpComparator</type>
  13637. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/dir1/file2</expected-output>
  13638. </comparator>
  13639. <comparator>
  13640. <type>RegexpComparator</type>
  13641. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/file0</expected-output>
  13642. </comparator>
  13643. </comparators>
  13644. </test>
  13645. <test> <!-- TESTED -->
  13646. <description>chgrp: change group of non existent file in absolute path</description>
  13647. <test-commands>
  13648. <command>-fs NAMENODE -chgrp newgroup /file1</command>
  13649. </test-commands>
  13650. <cleanup-commands>
  13651. <command>-fs NAMENODE -rm /file1</command>
  13652. </cleanup-commands>
  13653. <comparators>
  13654. <comparator>
  13655. <type>RegexpComparator</type>
  13656. <expected-output>^chgrp: `/file1': No such file or directory</expected-output>
  13657. </comparator>
  13658. </comparators>
  13659. </test>
  13660. <test> <!-- TESTED -->
  13661. <description>chgrp: change group of non existent file in relative path</description>
  13662. <test-commands>
  13663. <command>-fs NAMENODE -chgrp newgroup file1</command>
  13664. </test-commands>
  13665. <cleanup-commands>
  13666. <command>-fs NAMENODE -rm file1</command>
  13667. </cleanup-commands>
  13668. <comparators>
  13669. <comparator>
  13670. <type>RegexpComparator</type>
  13671. <expected-output>^chgrp: `file1': No such file or directory</expected-output>
  13672. </comparator>
  13673. </comparators>
  13674. </test>
  13675. <test> <!-- TESTED -->
  13676. <description>chgrp: change group of multiple files in absolute path using globbing</description>
  13677. <test-commands>
  13678. <command>-fs NAMENODE -touchz /file1</command>
  13679. <command>-fs NAMENODE -touchz /file2</command>
  13680. <command>-fs NAMENODE -touchz /file3</command>
  13681. <command>-fs NAMENODE -touchz /file4</command>
  13682. <command>-fs NAMENODE -chgrp newgroup /file* </command>
  13683. <command>-fs NAMENODE -ls -R /file*</command>
  13684. </test-commands>
  13685. <cleanup-commands>
  13686. <command>-fs NAMENODE -rm /file*</command>
  13687. </cleanup-commands>
  13688. <comparators>
  13689. <comparator>
  13690. <type>RegexpComparator</type>
  13691. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/file1</expected-output>
  13692. </comparator>
  13693. <comparator>
  13694. <type>RegexpComparator</type>
  13695. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/file2</expected-output>
  13696. </comparator>
  13697. <comparator>
  13698. <type>RegexpComparator</type>
  13699. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/file3</expected-output>
  13700. </comparator>
  13701. <comparator>
  13702. <type>RegexpComparator</type>
  13703. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/file4</expected-output>
  13704. </comparator>
  13705. </comparators>
  13706. </test>
  13707. <test> <!-- TESTED -->
  13708. <description>chgrp: change group of multiple files in relative path using globbing</description>
  13709. <test-commands>
  13710. <command>-fs NAMENODE -touchz file1</command>
  13711. <command>-fs NAMENODE -touchz file2</command>
  13712. <command>-fs NAMENODE -touchz file3</command>
  13713. <command>-fs NAMENODE -touchz file4</command>
  13714. <command>-fs NAMENODE -chgrp newgroup file* </command>
  13715. <command>-fs NAMENODE -ls -R file*</command>
  13716. </test-commands>
  13717. <cleanup-commands>
  13718. <command>-fs NAMENODE -rm file*</command>
  13719. </cleanup-commands>
  13720. <comparators>
  13721. <comparator>
  13722. <type>RegexpComparator</type>
  13723. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*file1</expected-output>
  13724. </comparator>
  13725. <comparator>
  13726. <type>RegexpComparator</type>
  13727. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*file2</expected-output>
  13728. </comparator>
  13729. <comparator>
  13730. <type>RegexpComparator</type>
  13731. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*file3</expected-output>
  13732. </comparator>
  13733. <comparator>
  13734. <type>RegexpComparator</type>
  13735. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*file4</expected-output>
  13736. </comparator>
  13737. </comparators>
  13738. </test>
  13739. <test> <!-- TESTED -->
  13740. <description>chgrp: change group of multiple directories in absolute path using globbing</description>
  13741. <test-commands>
  13742. <command>-fs NAMENODE -mkdir /dir0</command>
  13743. <command>-fs NAMENODE -mkdir /dir0/dir1</command>
  13744. <command>-fs NAMENODE -touchz /dir0/file0</command>
  13745. <command>-fs NAMENODE -touchz /dir0/dir1/file1</command>
  13746. <command>-fs NAMENODE -touchz /dir0/dir1/file2</command>
  13747. <command>-fs NAMENODE -mkdir /dir2</command>
  13748. <command>-fs NAMENODE -mkdir /dir2/dir1</command>
  13749. <command>-fs NAMENODE -touchz /dir2/file0</command>
  13750. <command>-fs NAMENODE -touchz /dir2/dir1/file1</command>
  13751. <command>-fs NAMENODE -touchz /dir2/dir1/file2</command>
  13752. <command>-fs NAMENODE -chgrp newgroup /dir*</command>
  13753. <command>-fs NAMENODE -ls -R /dir*</command>
  13754. </test-commands>
  13755. <cleanup-commands>
  13756. <command>-fs NAMENODE -rm -r /dir*</command>
  13757. </cleanup-commands>
  13758. <comparators>
  13759. <comparator>
  13760. <type>RegexpComparator</type>
  13761. <expected-output>^drwxr-xr-x( )*-( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1</expected-output>
  13762. </comparator>
  13763. <comparator>
  13764. <type>RegexpComparator</type>
  13765. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1/file1</expected-output>
  13766. </comparator>
  13767. <comparator>
  13768. <type>RegexpComparator</type>
  13769. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1/file2</expected-output>
  13770. </comparator>
  13771. <comparator>
  13772. <type>RegexpComparator</type>
  13773. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/file0</expected-output>
  13774. </comparator>
  13775. <comparator>
  13776. <type>RegexpComparator</type>
  13777. <expected-output>^drwxr-xr-x( )*-( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir2/dir1</expected-output>
  13778. </comparator>
  13779. <comparator>
  13780. <type>RegexpComparator</type>
  13781. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir2/dir1/file1</expected-output>
  13782. </comparator>
  13783. <comparator>
  13784. <type>RegexpComparator</type>
  13785. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir2/dir1/file2</expected-output>
  13786. </comparator>
  13787. <comparator>
  13788. <type>RegexpComparator</type>
  13789. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir2/file0</expected-output>
  13790. </comparator>
  13791. </comparators>
  13792. </test>
  13793. <test> <!-- TESTED -->
  13794. <description>chgrp: change group of multiple directories in relative path using globbing</description>
  13795. <test-commands>
  13796. <command>-fs NAMENODE -mkdir -p dir0</command>
  13797. <command>-fs NAMENODE -mkdir -p dir0/dir1</command>
  13798. <command>-fs NAMENODE -touchz dir0/file0</command>
  13799. <command>-fs NAMENODE -touchz dir0/dir1/file1</command>
  13800. <command>-fs NAMENODE -touchz dir0/dir1/file2</command>
  13801. <command>-fs NAMENODE -mkdir -p dir2</command>
  13802. <command>-fs NAMENODE -mkdir -p dir2/dir1</command>
  13803. <command>-fs NAMENODE -touchz dir2/file0</command>
  13804. <command>-fs NAMENODE -touchz dir2/dir1/file1</command>
  13805. <command>-fs NAMENODE -touchz dir2/dir1/file2</command>
  13806. <command>-fs NAMENODE -chgrp newgroup dir*</command>
  13807. <command>-fs NAMENODE -ls -R dir*</command>
  13808. </test-commands>
  13809. <cleanup-commands>
  13810. <command>-fs NAMENODE -rm -r dir*</command>
  13811. </cleanup-commands>
  13812. <comparators>
  13813. <comparator>
  13814. <type>RegexpComparator</type>
  13815. <expected-output>^drwxr-xr-x( )*-( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/dir1</expected-output>
  13816. </comparator>
  13817. <comparator>
  13818. <type>RegexpComparator</type>
  13819. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/dir1/file1</expected-output>
  13820. </comparator>
  13821. <comparator>
  13822. <type>RegexpComparator</type>
  13823. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/dir1/file2</expected-output>
  13824. </comparator>
  13825. <comparator>
  13826. <type>RegexpComparator</type>
  13827. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/file0</expected-output>
  13828. </comparator>
  13829. <comparator>
  13830. <type>RegexpComparator</type>
  13831. <expected-output>^drwxr-xr-x( )*-( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir2/dir1</expected-output>
  13832. </comparator>
  13833. <comparator>
  13834. <type>RegexpComparator</type>
  13835. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir2/dir1/file1</expected-output>
  13836. </comparator>
  13837. <comparator>
  13838. <type>RegexpComparator</type>
  13839. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir2/dir1/file2</expected-output>
  13840. </comparator>
  13841. <comparator>
  13842. <type>RegexpComparator</type>
  13843. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir2/file0</expected-output>
  13844. </comparator>
  13845. </comparators>
  13846. </test>
  13847. <test> <!-- TESTED -->
  13848. <description>chgrp: change of multiple files in absolute path without globbing</description>
  13849. <test-commands>
  13850. <command>-fs NAMENODE -touchz /file1</command>
  13851. <command>-fs NAMENODE -touchz /file2</command>
  13852. <command>-fs NAMENODE -touchz /file3</command>
  13853. <command>-fs NAMENODE -touchz /file4</command>
  13854. <command>-fs NAMENODE -chgrp newgroup /file1 /file2 /file3 /file4 </command>
  13855. <command>-fs NAMENODE -ls -R /file*</command>
  13856. </test-commands>
  13857. <cleanup-commands>
  13858. <command>-fs NAMENODE -rm /file*</command>
  13859. </cleanup-commands>
  13860. <comparators>
  13861. <comparator>
  13862. <type>RegexpComparator</type>
  13863. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/file1</expected-output>
  13864. </comparator>
  13865. <comparator>
  13866. <type>RegexpComparator</type>
  13867. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/file2</expected-output>
  13868. </comparator>
  13869. <comparator>
  13870. <type>RegexpComparator</type>
  13871. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/file3</expected-output>
  13872. </comparator>
  13873. <comparator>
  13874. <type>RegexpComparator</type>
  13875. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/file4</expected-output>
  13876. </comparator>
  13877. </comparators>
  13878. </test>
  13879. <test> <!-- TESTED -->
  13880. <description>chgrp: change group of multiple files in relative path without globbing</description>
  13881. <test-commands>
  13882. <command>-fs NAMENODE -touchz file1</command>
  13883. <command>-fs NAMENODE -touchz file2</command>
  13884. <command>-fs NAMENODE -touchz file3</command>
  13885. <command>-fs NAMENODE -touchz file4</command>
  13886. <command>-fs NAMENODE -chgrp newgroup file1 file2 file3 file4 </command>
  13887. <command>-fs NAMENODE -ls -R file*</command>
  13888. </test-commands>
  13889. <cleanup-commands>
  13890. <command>-fs NAMENODE -rm file*</command>
  13891. </cleanup-commands>
  13892. <comparators>
  13893. <comparator>
  13894. <type>RegexpComparator</type>
  13895. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*file1</expected-output>
  13896. </comparator>
  13897. <comparator>
  13898. <type>RegexpComparator</type>
  13899. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*file2</expected-output>
  13900. </comparator>
  13901. <comparator>
  13902. <type>RegexpComparator</type>
  13903. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*file3</expected-output>
  13904. </comparator>
  13905. <comparator>
  13906. <type>RegexpComparator</type>
  13907. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*file4</expected-output>
  13908. </comparator>
  13909. </comparators>
  13910. </test>
  13911. <test> <!-- TESTED -->
  13912. <description>chgrp: change group of multiple directories in absolute path without globbing</description>
  13913. <test-commands>
  13914. <command>-fs NAMENODE -mkdir /dir0</command>
  13915. <command>-fs NAMENODE -mkdir /dir0/dir1</command>
  13916. <command>-fs NAMENODE -touchz /dir0/file0</command>
  13917. <command>-fs NAMENODE -touchz /dir0/dir1/file1</command>
  13918. <command>-fs NAMENODE -touchz /dir0/dir1/file2</command>
  13919. <command>-fs NAMENODE -mkdir /dir2</command>
  13920. <command>-fs NAMENODE -mkdir /dir2/dir1</command>
  13921. <command>-fs NAMENODE -touchz /dir2/file0</command>
  13922. <command>-fs NAMENODE -touchz /dir2/dir1/file1</command>
  13923. <command>-fs NAMENODE -touchz /dir2/dir1/file2</command>
  13924. <command>-fs NAMENODE -chgrp newgroup /dir0 /dir2</command>
  13925. <command>-fs NAMENODE -ls -R /dir*</command>
  13926. </test-commands>
  13927. <cleanup-commands>
  13928. <command>-fs NAMENODE -rm -r /dir*</command>
  13929. </cleanup-commands>
  13930. <comparators>
  13931. <comparator>
  13932. <type>RegexpComparator</type>
  13933. <expected-output>^drwxr-xr-x( )*-( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1</expected-output>
  13934. </comparator>
  13935. <comparator>
  13936. <type>RegexpComparator</type>
  13937. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1/file1</expected-output>
  13938. </comparator>
  13939. <comparator>
  13940. <type>RegexpComparator</type>
  13941. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1/file2</expected-output>
  13942. </comparator>
  13943. <comparator>
  13944. <type>RegexpComparator</type>
  13945. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/file0</expected-output>
  13946. </comparator>
  13947. <comparator>
  13948. <type>RegexpComparator</type>
  13949. <expected-output>^drwxr-xr-x( )*-( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir2/dir1</expected-output>
  13950. </comparator>
  13951. <comparator>
  13952. <type>RegexpComparator</type>
  13953. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir2/dir1/file1</expected-output>
  13954. </comparator>
  13955. <comparator>
  13956. <type>RegexpComparator</type>
  13957. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir2/dir1/file2</expected-output>
  13958. </comparator>
  13959. <comparator>
  13960. <type>RegexpComparator</type>
  13961. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir2/file0</expected-output>
  13962. </comparator>
  13963. </comparators>
  13964. </test>
  13965. <test> <!-- TESTED -->
  13966. <description>chgrp: change group of multiple directories in relative path without globbing</description>
  13967. <test-commands>
  13968. <command>-fs NAMENODE -mkdir -p dir0</command>
  13969. <command>-fs NAMENODE -mkdir -p dir0/dir1</command>
  13970. <command>-fs NAMENODE -touchz dir0/file0</command>
  13971. <command>-fs NAMENODE -touchz dir0/dir1/file1</command>
  13972. <command>-fs NAMENODE -touchz dir0/dir1/file2</command>
  13973. <command>-fs NAMENODE -mkdir -p dir2</command>
  13974. <command>-fs NAMENODE -mkdir -p dir2/dir1</command>
  13975. <command>-fs NAMENODE -touchz dir2/file0</command>
  13976. <command>-fs NAMENODE -touchz dir2/dir1/file1</command>
  13977. <command>-fs NAMENODE -touchz dir2/dir1/file2</command>
  13978. <command>-fs NAMENODE -chgrp newgroup dir0 dir2</command>
  13979. <command>-fs NAMENODE -ls -R dir*</command>
  13980. </test-commands>
  13981. <cleanup-commands>
  13982. <command>-fs NAMENODE -rm -r dir*</command>
  13983. </cleanup-commands>
  13984. <comparators>
  13985. <comparator>
  13986. <type>RegexpComparator</type>
  13987. <expected-output>^drwxr-xr-x( )*-( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/dir1</expected-output>
  13988. </comparator>
  13989. <comparator>
  13990. <type>RegexpComparator</type>
  13991. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/dir1/file1</expected-output>
  13992. </comparator>
  13993. <comparator>
  13994. <type>RegexpComparator</type>
  13995. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/dir1/file2</expected-output>
  13996. </comparator>
  13997. <comparator>
  13998. <type>RegexpComparator</type>
  13999. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/file0</expected-output>
  14000. </comparator>
  14001. <comparator>
  14002. <type>RegexpComparator</type>
  14003. <expected-output>^drwxr-xr-x( )*-( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir2/dir1</expected-output>
  14004. </comparator>
  14005. <comparator>
  14006. <type>RegexpComparator</type>
  14007. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir2/dir1/file1</expected-output>
  14008. </comparator>
  14009. <comparator>
  14010. <type>RegexpComparator</type>
  14011. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir2/dir1/file2</expected-output>
  14012. </comparator>
  14013. <comparator>
  14014. <type>RegexpComparator</type>
  14015. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir2/file0</expected-output>
  14016. </comparator>
  14017. </comparators>
  14018. </test>
  14019. <test> <!-- TESTED -->
  14020. <description>chgrp: change group of multiple directories recursively in absolute path using globbing</description>
  14021. <test-commands>
  14022. <command>-fs NAMENODE -mkdir /dir0</command>
  14023. <command>-fs NAMENODE -mkdir /dir0/dir1</command>
  14024. <command>-fs NAMENODE -touchz /dir0/file0</command>
  14025. <command>-fs NAMENODE -touchz /dir0/dir1/file1</command>
  14026. <command>-fs NAMENODE -touchz /dir0/dir1/file2</command>
  14027. <command>-fs NAMENODE -mkdir /dir2</command>
  14028. <command>-fs NAMENODE -mkdir /dir2/dir1</command>
  14029. <command>-fs NAMENODE -touchz /dir2/file0</command>
  14030. <command>-fs NAMENODE -touchz /dir2/dir1/file1</command>
  14031. <command>-fs NAMENODE -touchz /dir2/dir1/file2</command>
  14032. <command>-fs NAMENODE -chgrp -R newgroup /dir*</command>
  14033. <command>-fs NAMENODE -ls -R /dir*</command>
  14034. </test-commands>
  14035. <cleanup-commands>
  14036. <command>-fs NAMENODE -rm -r /dir*</command>
  14037. </cleanup-commands>
  14038. <comparators>
  14039. <comparator>
  14040. <type>RegexpComparator</type>
  14041. <expected-output>^drwxr-xr-x( )*-( )*USERNAME( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1</expected-output>
  14042. </comparator>
  14043. <comparator>
  14044. <type>RegexpComparator</type>
  14045. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1/file1</expected-output>
  14046. </comparator>
  14047. <comparator>
  14048. <type>RegexpComparator</type>
  14049. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1/file2</expected-output>
  14050. </comparator>
  14051. <comparator>
  14052. <type>RegexpComparator</type>
  14053. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/file0</expected-output>
  14054. </comparator>
  14055. <comparator>
  14056. <type>RegexpComparator</type>
  14057. <expected-output>^drwxr-xr-x( )*-( )*USERNAME( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir2/dir1</expected-output>
  14058. </comparator>
  14059. <comparator>
  14060. <type>RegexpComparator</type>
  14061. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir2/dir1/file1</expected-output>
  14062. </comparator>
  14063. <comparator>
  14064. <type>RegexpComparator</type>
  14065. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir2/dir1/file2</expected-output>
  14066. </comparator>
  14067. <comparator>
  14068. <type>RegexpComparator</type>
  14069. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir2/file0</expected-output>
  14070. </comparator>
  14071. </comparators>
  14072. </test>
  14073. <test> <!-- TESTED -->
  14074. <description>chgrp: change group of multiple directories recursively in relative path using globbing</description>
  14075. <test-commands>
  14076. <command>-fs NAMENODE -mkdir -p dir0</command>
  14077. <command>-fs NAMENODE -mkdir -p dir0/dir1</command>
  14078. <command>-fs NAMENODE -touchz dir0/file0</command>
  14079. <command>-fs NAMENODE -touchz dir0/dir1/file1</command>
  14080. <command>-fs NAMENODE -touchz dir0/dir1/file2</command>
  14081. <command>-fs NAMENODE -mkdir -p dir2</command>
  14082. <command>-fs NAMENODE -mkdir -p dir2/dir1</command>
  14083. <command>-fs NAMENODE -touchz dir2/file0</command>
  14084. <command>-fs NAMENODE -touchz dir2/dir1/file1</command>
  14085. <command>-fs NAMENODE -touchz dir2/dir1/file2</command>
  14086. <command>-fs NAMENODE -chgrp -R newgroup dir*</command>
  14087. <command>-fs NAMENODE -ls -R dir*</command>
  14088. </test-commands>
  14089. <cleanup-commands>
  14090. <command>-fs NAMENODE -rm -r dir*</command>
  14091. </cleanup-commands>
  14092. <comparators>
  14093. <comparator>
  14094. <type>RegexpComparator</type>
  14095. <expected-output>^drwxr-xr-x( )*-( )*USERNAME( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/dir1</expected-output>
  14096. </comparator>
  14097. <comparator>
  14098. <type>RegexpComparator</type>
  14099. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/dir1/file1</expected-output>
  14100. </comparator>
  14101. <comparator>
  14102. <type>RegexpComparator</type>
  14103. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/dir1/file2</expected-output>
  14104. </comparator>
  14105. <comparator>
  14106. <type>RegexpComparator</type>
  14107. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/file0</expected-output>
  14108. </comparator>
  14109. <comparator>
  14110. <type>RegexpComparator</type>
  14111. <expected-output>^drwxr-xr-x( )*-( )*USERNAME( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir2/dir1</expected-output>
  14112. </comparator>
  14113. <comparator>
  14114. <type>RegexpComparator</type>
  14115. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir2/dir1/file1</expected-output>
  14116. </comparator>
  14117. <comparator>
  14118. <type>RegexpComparator</type>
  14119. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir2/dir1/file2</expected-output>
  14120. </comparator>
  14121. <comparator>
  14122. <type>RegexpComparator</type>
  14123. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir2/file0</expected-output>
  14124. </comparator>
  14125. </comparators>
  14126. </test>
  14127. <test> <!-- TESTED -->
  14128. <description>chgrp: change group of multiple directories recursively in absolute path without globbing</description>
  14129. <test-commands>
  14130. <command>-fs NAMENODE -mkdir /dir0</command>
  14131. <command>-fs NAMENODE -mkdir /dir0/dir1</command>
  14132. <command>-fs NAMENODE -touchz /dir0/file0</command>
  14133. <command>-fs NAMENODE -touchz /dir0/dir1/file1</command>
  14134. <command>-fs NAMENODE -touchz /dir0/dir1/file2</command>
  14135. <command>-fs NAMENODE -mkdir /dir2</command>
  14136. <command>-fs NAMENODE -mkdir /dir2/dir1</command>
  14137. <command>-fs NAMENODE -touchz /dir2/file0</command>
  14138. <command>-fs NAMENODE -touchz /dir2/dir1/file1</command>
  14139. <command>-fs NAMENODE -touchz /dir2/dir1/file2</command>
  14140. <command>-fs NAMENODE -chgrp -R newgroup /dir0 /dir2</command>
  14141. <command>-fs NAMENODE -ls -R /dir*</command>
  14142. </test-commands>
  14143. <cleanup-commands>
  14144. <command>-fs NAMENODE -rm -r /dir*</command>
  14145. </cleanup-commands>
  14146. <comparators>
  14147. <comparator>
  14148. <type>RegexpComparator</type>
  14149. <expected-output>^drwxr-xr-x( )*-( )*USERNAME( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1</expected-output>
  14150. </comparator>
  14151. <comparator>
  14152. <type>RegexpComparator</type>
  14153. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1/file1</expected-output>
  14154. </comparator>
  14155. <comparator>
  14156. <type>RegexpComparator</type>
  14157. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/dir1/file2</expected-output>
  14158. </comparator>
  14159. <comparator>
  14160. <type>RegexpComparator</type>
  14161. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir0/file0</expected-output>
  14162. </comparator>
  14163. <comparator>
  14164. <type>RegexpComparator</type>
  14165. <expected-output>^drwxr-xr-x( )*-( )*USERNAME( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir2/dir1</expected-output>
  14166. </comparator>
  14167. <comparator>
  14168. <type>RegexpComparator</type>
  14169. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir2/dir1/file1</expected-output>
  14170. </comparator>
  14171. <comparator>
  14172. <type>RegexpComparator</type>
  14173. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir2/dir1/file2</expected-output>
  14174. </comparator>
  14175. <comparator>
  14176. <type>RegexpComparator</type>
  14177. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/dir2/file0</expected-output>
  14178. </comparator>
  14179. </comparators>
  14180. </test>
  14181. <test> <!-- TESTED -->
  14182. <description>chgrp: change group of multiple directories recursively in relative path without globbing</description>
  14183. <test-commands>
  14184. <command>-fs NAMENODE -mkdir -p dir0</command>
  14185. <command>-fs NAMENODE -mkdir -p dir0/dir1</command>
  14186. <command>-fs NAMENODE -touchz dir0/file0</command>
  14187. <command>-fs NAMENODE -touchz dir0/dir1/file1</command>
  14188. <command>-fs NAMENODE -touchz dir0/dir1/file2</command>
  14189. <command>-fs NAMENODE -mkdir -p dir2</command>
  14190. <command>-fs NAMENODE -mkdir -p dir2/dir1</command>
  14191. <command>-fs NAMENODE -touchz dir2/file0</command>
  14192. <command>-fs NAMENODE -touchz dir2/dir1/file1</command>
  14193. <command>-fs NAMENODE -touchz dir2/dir1/file2</command>
  14194. <command>-fs NAMENODE -chgrp -R newgroup dir0 dir2</command>
  14195. <command>-fs NAMENODE -ls -R dir*</command>
  14196. </test-commands>
  14197. <cleanup-commands>
  14198. <command>-fs NAMENODE -rm -r dir*</command>
  14199. </cleanup-commands>
  14200. <comparators>
  14201. <comparator>
  14202. <type>RegexpComparator</type>
  14203. <expected-output>^drwxr-xr-x( )*-( )*USERNAME( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/dir1</expected-output>
  14204. </comparator>
  14205. <comparator>
  14206. <type>RegexpComparator</type>
  14207. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/dir1/file1</expected-output>
  14208. </comparator>
  14209. <comparator>
  14210. <type>RegexpComparator</type>
  14211. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/dir1/file2</expected-output>
  14212. </comparator>
  14213. <comparator>
  14214. <type>RegexpComparator</type>
  14215. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/file0</expected-output>
  14216. </comparator>
  14217. <comparator>
  14218. <type>RegexpComparator</type>
  14219. <expected-output>^drwxr-xr-x( )*-( )*USERNAME( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir2/dir1</expected-output>
  14220. </comparator>
  14221. <comparator>
  14222. <type>RegexpComparator</type>
  14223. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir2/dir1/file1</expected-output>
  14224. </comparator>
  14225. <comparator>
  14226. <type>RegexpComparator</type>
  14227. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir2/dir1/file2</expected-output>
  14228. </comparator>
  14229. <comparator>
  14230. <type>RegexpComparator</type>
  14231. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir2/file0</expected-output>
  14232. </comparator>
  14233. </comparators>
  14234. </test>
  14235. <test> <!-- TESTED -->
  14236. <description>chgrp: invalid option for group of file in absolute path</description>
  14237. <test-commands>
  14238. <command>-fs NAMENODE -touchz /file1</command>
  14239. <command>-fs NAMENODE -chgrp % /file1</command>
  14240. </test-commands>
  14241. <cleanup-commands>
  14242. <command>-fs NAMENODE -rm /file1</command>
  14243. </cleanup-commands>
  14244. <comparators>
  14245. <comparator>
  14246. <type>RegexpComparator</type>
  14247. <expected-output>^-chgrp: '%' does not match expected pattern for group</expected-output>
  14248. </comparator>
  14249. </comparators>
  14250. </test>
  14251. <test> <!-- TESTED -->
  14252. <description>chgrp: invalid option for group of file in relative path</description>
  14253. <test-commands>
  14254. <command>-fs NAMENODE -touchz file1</command>
  14255. <command>-fs NAMENODE -chgrp % file1</command>
  14256. </test-commands>
  14257. <cleanup-commands>
  14258. <command>-fs NAMENODE -rm file1</command>
  14259. </cleanup-commands>
  14260. <comparators>
  14261. <comparator>
  14262. <type>RegexpComparator</type>
  14263. <expected-output>^-chgrp: '%' does not match expected pattern for group</expected-output>
  14264. </comparator>
  14265. </comparators>
  14266. </test>
  14267. <test> <!-- TESTED -->
  14268. <description>chgrp: change group of file in hdfs:// path</description>
  14269. <test-commands>
  14270. <command>-fs NAMENODE -touchz hdfs:///file1</command>
  14271. <command>-fs NAMENODE -chgrp newgroup hdfs:///file1</command>
  14272. <command>-fs NAMENODE -ls hdfs:///file1</command>
  14273. </test-commands>
  14274. <cleanup-commands>
  14275. <command>-fs NAMENODE -rm hdfs:///file1</command>
  14276. </cleanup-commands>
  14277. <comparators>
  14278. <comparator>
  14279. <type>RegexpComparator</type>
  14280. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///file1</expected-output>
  14281. </comparator>
  14282. </comparators>
  14283. </test>
  14284. <test> <!-- TESTED -->
  14285. <description>chgrp: change group of directory in hdfs:// path</description>
  14286. <test-commands>
  14287. <command>-fs NAMENODE -mkdir hdfs:///dir0</command>
  14288. <command>-fs NAMENODE -mkdir hdfs:///dir0/dir1</command>
  14289. <command>-fs NAMENODE -touchz hdfs:///dir0/file0</command>
  14290. <command>-fs NAMENODE -touchz hdfs:///dir0/dir1/file1</command>
  14291. <command>-fs NAMENODE -touchz hdfs:///dir0/dir1/file2</command>
  14292. <command>-fs NAMENODE -chgrp newgroup hdfs:///dir0/dir1</command>
  14293. <command>-fs NAMENODE -ls -R hdfs:///dir0</command>
  14294. </test-commands>
  14295. <cleanup-commands>
  14296. <command>-fs NAMENODE -rm -r hdfs:///dir0</command>
  14297. </cleanup-commands>
  14298. <comparators>
  14299. <comparator>
  14300. <type>RegexpComparator</type>
  14301. <expected-output>^drwxr-xr-x( )*-( )*USERNAME( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir0/dir1</expected-output>
  14302. </comparator>
  14303. <comparator>
  14304. <type>RegexpComparator</type>
  14305. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir0/dir1/file1</expected-output>
  14306. </comparator>
  14307. <comparator>
  14308. <type>RegexpComparator</type>
  14309. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir0/dir1/file2</expected-output>
  14310. </comparator>
  14311. <comparator>
  14312. <type>RegexpComparator</type>
  14313. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir0/file0</expected-output>
  14314. </comparator>
  14315. </comparators>
  14316. </test>
  14317. <test> <!-- TESTED -->
  14318. <description>chgrp: change group of directory in hdfs:// path recursively </description>
  14319. <test-commands>
  14320. <command>-fs NAMENODE -mkdir hdfs:///dir0</command>
  14321. <command>-fs NAMENODE -mkdir hdfs:///dir0/dir1</command>
  14322. <command>-fs NAMENODE -touchz hdfs:///dir0/file0</command>
  14323. <command>-fs NAMENODE -touchz hdfs:///dir0/dir1/file1</command>
  14324. <command>-fs NAMENODE -touchz hdfs:///dir0/dir1/file2</command>
  14325. <command>-fs NAMENODE -chgrp -R newgroup hdfs:///dir0/dir1</command>
  14326. <command>-fs NAMENODE -ls -R hdfs:///dir0</command>
  14327. </test-commands>
  14328. <cleanup-commands>
  14329. <command>-fs NAMENODE -rm -r hdfs:///dir0</command>
  14330. </cleanup-commands>
  14331. <comparators>
  14332. <comparator>
  14333. <type>RegexpComparator</type>
  14334. <expected-output>^drwxr-xr-x( )*-( )*USERNAME( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir0/dir1</expected-output>
  14335. </comparator>
  14336. <comparator>
  14337. <type>RegexpComparator</type>
  14338. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir0/dir1/file1</expected-output>
  14339. </comparator>
  14340. <comparator>
  14341. <type>RegexpComparator</type>
  14342. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir0/dir1/file2</expected-output>
  14343. </comparator>
  14344. <comparator>
  14345. <type>RegexpComparator</type>
  14346. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir0/file0</expected-output>
  14347. </comparator>
  14348. </comparators>
  14349. </test>
  14350. <test> <!-- TESTED -->
  14351. <description>chgrp: change group of non existent file in hdfs:// path</description>
  14352. <test-commands>
  14353. <command>-fs NAMENODE -chgrp newgroup hdfs:///file1</command>
  14354. </test-commands>
  14355. <cleanup-commands>
  14356. <command>-fs NAMENODE -rm hdfs:///file1</command>
  14357. </cleanup-commands>
  14358. <comparators>
  14359. <comparator>
  14360. <type>RegexpComparator</type>
  14361. <expected-output>^chgrp: `hdfs:///file1': No such file or directory</expected-output>
  14362. </comparator>
  14363. </comparators>
  14364. </test>
  14365. <test> <!-- TESTED -->
  14366. <description>chgrp: change group of multiple files in hdfs:// path using globbing</description>
  14367. <test-commands>
  14368. <command>-fs NAMENODE -touchz hdfs:///file1</command>
  14369. <command>-fs NAMENODE -touchz hdfs:///file2</command>
  14370. <command>-fs NAMENODE -touchz hdfs:///file3</command>
  14371. <command>-fs NAMENODE -touchz hdfs:///file4</command>
  14372. <command>-fs NAMENODE -chgrp newgroup hdfs:///file* </command>
  14373. <command>-fs NAMENODE -ls -R hdfs:///file*</command>
  14374. </test-commands>
  14375. <cleanup-commands>
  14376. <command>-fs NAMENODE -rm hdfs:///file*</command>
  14377. </cleanup-commands>
  14378. <comparators>
  14379. <comparator>
  14380. <type>RegexpComparator</type>
  14381. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///file1</expected-output>
  14382. </comparator>
  14383. <comparator>
  14384. <type>RegexpComparator</type>
  14385. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///file2</expected-output>
  14386. </comparator>
  14387. <comparator>
  14388. <type>RegexpComparator</type>
  14389. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///file3</expected-output>
  14390. </comparator>
  14391. <comparator>
  14392. <type>RegexpComparator</type>
  14393. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///file4</expected-output>
  14394. </comparator>
  14395. </comparators>
  14396. </test>
  14397. <test> <!-- TESTED -->
  14398. <description>chgrp: change group of multiple directories in hdfs:// path using globbing</description>
  14399. <test-commands>
  14400. <command>-fs NAMENODE -mkdir hdfs:///dir0</command>
  14401. <command>-fs NAMENODE -mkdir hdfs:///dir0/dir1</command>
  14402. <command>-fs NAMENODE -touchz hdfs:///dir0/file0</command>
  14403. <command>-fs NAMENODE -touchz hdfs:///dir0/dir1/file1</command>
  14404. <command>-fs NAMENODE -touchz hdfs:///dir0/dir1/file2</command>
  14405. <command>-fs NAMENODE -mkdir hdfs:///dir2</command>
  14406. <command>-fs NAMENODE -mkdir hdfs:///dir2/dir1</command>
  14407. <command>-fs NAMENODE -touchz hdfs:///dir2/file0</command>
  14408. <command>-fs NAMENODE -touchz hdfs:///dir2/dir1/file1</command>
  14409. <command>-fs NAMENODE -touchz hdfs:///dir2/dir1/file2</command>
  14410. <command>-fs NAMENODE -chgrp newgroup hdfs:///dir*</command>
  14411. <command>-fs NAMENODE -ls -R hdfs:///dir*</command>
  14412. </test-commands>
  14413. <cleanup-commands>
  14414. <command>-fs NAMENODE -rm -r hdfs:///dir*</command>
  14415. </cleanup-commands>
  14416. <comparators>
  14417. <comparator>
  14418. <type>RegexpComparator</type>
  14419. <expected-output>^drwxr-xr-x( )*-( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir0/dir1</expected-output>
  14420. </comparator>
  14421. <comparator>
  14422. <type>RegexpComparator</type>
  14423. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir0/dir1/file1</expected-output>
  14424. </comparator>
  14425. <comparator>
  14426. <type>RegexpComparator</type>
  14427. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir0/dir1/file2</expected-output>
  14428. </comparator>
  14429. <comparator>
  14430. <type>RegexpComparator</type>
  14431. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir0/file0</expected-output>
  14432. </comparator>
  14433. <comparator>
  14434. <type>RegexpComparator</type>
  14435. <expected-output>^drwxr-xr-x( )*-( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir2/dir1</expected-output>
  14436. </comparator>
  14437. <comparator>
  14438. <type>RegexpComparator</type>
  14439. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir2/dir1/file1</expected-output>
  14440. </comparator>
  14441. <comparator>
  14442. <type>RegexpComparator</type>
  14443. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir2/dir1/file2</expected-output>
  14444. </comparator>
  14445. <comparator>
  14446. <type>RegexpComparator</type>
  14447. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir2/file0</expected-output>
  14448. </comparator>
  14449. </comparators>
  14450. </test>
  14451. <test> <!-- TESTED -->
  14452. <description>chgrp: change of multiple files in hdfs:// path without globbing</description>
  14453. <test-commands>
  14454. <command>-fs NAMENODE -touchz hdfs:///file1</command>
  14455. <command>-fs NAMENODE -touchz hdfs:///file2</command>
  14456. <command>-fs NAMENODE -touchz hdfs:///file3</command>
  14457. <command>-fs NAMENODE -touchz hdfs:///file4</command>
  14458. <command>-fs NAMENODE -chgrp newgroup hdfs:///file1 hdfs:///file2 hdfs:///file3 hdfs:///file4 </command>
  14459. <command>-fs NAMENODE -ls -R hdfs:///file*</command>
  14460. </test-commands>
  14461. <cleanup-commands>
  14462. <command>-fs NAMENODE -rm hdfs:///file*</command>
  14463. </cleanup-commands>
  14464. <comparators>
  14465. <comparator>
  14466. <type>RegexpComparator</type>
  14467. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///file1</expected-output>
  14468. </comparator>
  14469. <comparator>
  14470. <type>RegexpComparator</type>
  14471. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///file2</expected-output>
  14472. </comparator>
  14473. <comparator>
  14474. <type>RegexpComparator</type>
  14475. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///file3</expected-output>
  14476. </comparator>
  14477. <comparator>
  14478. <type>RegexpComparator</type>
  14479. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///file4</expected-output>
  14480. </comparator>
  14481. </comparators>
  14482. </test>
  14483. <test> <!-- TESTED -->
  14484. <description>chgrp: change group of multiple directories in hdfs:// path without globbing</description>
  14485. <test-commands>
  14486. <command>-fs NAMENODE -mkdir hdfs:///dir0</command>
  14487. <command>-fs NAMENODE -mkdir hdfs:///dir0/dir1</command>
  14488. <command>-fs NAMENODE -touchz hdfs:///dir0/file0</command>
  14489. <command>-fs NAMENODE -touchz hdfs:///dir0/dir1/file1</command>
  14490. <command>-fs NAMENODE -touchz hdfs:///dir0/dir1/file2</command>
  14491. <command>-fs NAMENODE -mkdir hdfs:///dir2</command>
  14492. <command>-fs NAMENODE -mkdir hdfs:///dir2/dir1</command>
  14493. <command>-fs NAMENODE -touchz hdfs:///dir2/file0</command>
  14494. <command>-fs NAMENODE -touchz hdfs:///dir2/dir1/file1</command>
  14495. <command>-fs NAMENODE -touchz hdfs:///dir2/dir1/file2</command>
  14496. <command>-fs NAMENODE -chgrp newgroup hdfs:///dir0 hdfs:///dir2</command>
  14497. <command>-fs NAMENODE -ls -R hdfs:///dir*</command>
  14498. </test-commands>
  14499. <cleanup-commands>
  14500. <command>-fs NAMENODE -rm -r hdfs:///dir*</command>
  14501. </cleanup-commands>
  14502. <comparators>
  14503. <comparator>
  14504. <type>RegexpComparator</type>
  14505. <expected-output>^drwxr-xr-x( )*-( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir0/dir1</expected-output>
  14506. </comparator>
  14507. <comparator>
  14508. <type>RegexpComparator</type>
  14509. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir0/dir1/file1</expected-output>
  14510. </comparator>
  14511. <comparator>
  14512. <type>RegexpComparator</type>
  14513. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir0/dir1/file2</expected-output>
  14514. </comparator>
  14515. <comparator>
  14516. <type>RegexpComparator</type>
  14517. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir0/file0</expected-output>
  14518. </comparator>
  14519. <comparator>
  14520. <type>RegexpComparator</type>
  14521. <expected-output>^drwxr-xr-x( )*-( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir2/dir1</expected-output>
  14522. </comparator>
  14523. <comparator>
  14524. <type>RegexpComparator</type>
  14525. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir2/dir1/file1</expected-output>
  14526. </comparator>
  14527. <comparator>
  14528. <type>RegexpComparator</type>
  14529. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir2/dir1/file2</expected-output>
  14530. </comparator>
  14531. <comparator>
  14532. <type>RegexpComparator</type>
  14533. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir2/file0</expected-output>
  14534. </comparator>
  14535. </comparators>
  14536. </test>
  14537. <test> <!-- TESTED -->
  14538. <description>chgrp: change group of multiple directories recursively in hdfs:// path using globbing</description>
  14539. <test-commands>
  14540. <command>-fs NAMENODE -mkdir hdfs:///dir0</command>
  14541. <command>-fs NAMENODE -mkdir hdfs:///dir0/dir1</command>
  14542. <command>-fs NAMENODE -touchz hdfs:///dir0/file0</command>
  14543. <command>-fs NAMENODE -touchz hdfs:///dir0/dir1/file1</command>
  14544. <command>-fs NAMENODE -touchz hdfs:///dir0/dir1/file2</command>
  14545. <command>-fs NAMENODE -mkdir hdfs:///dir2</command>
  14546. <command>-fs NAMENODE -mkdir hdfs:///dir2/dir1</command>
  14547. <command>-fs NAMENODE -touchz hdfs:///dir2/file0</command>
  14548. <command>-fs NAMENODE -touchz hdfs:///dir2/dir1/file1</command>
  14549. <command>-fs NAMENODE -touchz hdfs:///dir2/dir1/file2</command>
  14550. <command>-fs NAMENODE -chgrp -R newgroup hdfs:///dir*</command>
  14551. <command>-fs NAMENODE -ls -R hdfs:///dir*</command>
  14552. </test-commands>
  14553. <cleanup-commands>
  14554. <command>-fs NAMENODE -rm -r hdfs:///dir*</command>
  14555. </cleanup-commands>
  14556. <comparators>
  14557. <comparator>
  14558. <type>RegexpComparator</type>
  14559. <expected-output>^drwxr-xr-x( )*-( )*USERNAME( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir0/dir1</expected-output>
  14560. </comparator>
  14561. <comparator>
  14562. <type>RegexpComparator</type>
  14563. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir0/dir1/file1</expected-output>
  14564. </comparator>
  14565. <comparator>
  14566. <type>RegexpComparator</type>
  14567. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir0/dir1/file2</expected-output>
  14568. </comparator>
  14569. <comparator>
  14570. <type>RegexpComparator</type>
  14571. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir0/file0</expected-output>
  14572. </comparator>
  14573. <comparator>
  14574. <type>RegexpComparator</type>
  14575. <expected-output>^drwxr-xr-x( )*-( )*USERNAME( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir2/dir1</expected-output>
  14576. </comparator>
  14577. <comparator>
  14578. <type>RegexpComparator</type>
  14579. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir2/dir1/file1</expected-output>
  14580. </comparator>
  14581. <comparator>
  14582. <type>RegexpComparator</type>
  14583. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir2/dir1/file2</expected-output>
  14584. </comparator>
  14585. <comparator>
  14586. <type>RegexpComparator</type>
  14587. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir2/file0</expected-output>
  14588. </comparator>
  14589. </comparators>
  14590. </test>
  14591. <test> <!-- TESTED -->
  14592. <description>chgrp: change group of multiple directories recursively in hdfs:// path without globbing</description>
  14593. <test-commands>
  14594. <command>-fs NAMENODE -mkdir hdfs:///dir0</command>
  14595. <command>-fs NAMENODE -mkdir hdfs:///dir0/dir1</command>
  14596. <command>-fs NAMENODE -touchz hdfs:///dir0/file0</command>
  14597. <command>-fs NAMENODE -touchz hdfs:///dir0/dir1/file1</command>
  14598. <command>-fs NAMENODE -touchz hdfs:///dir0/dir1/file2</command>
  14599. <command>-fs NAMENODE -mkdir hdfs:///dir2</command>
  14600. <command>-fs NAMENODE -mkdir hdfs:///dir2/dir1</command>
  14601. <command>-fs NAMENODE -touchz hdfs:///dir2/file0</command>
  14602. <command>-fs NAMENODE -touchz hdfs:///dir2/dir1/file1</command>
  14603. <command>-fs NAMENODE -touchz hdfs:///dir2/dir1/file2</command>
  14604. <command>-fs NAMENODE -chgrp -R newgroup hdfs:///dir0 hdfs:///dir2</command>
  14605. <command>-fs NAMENODE -ls -R hdfs:///dir*</command>
  14606. </test-commands>
  14607. <cleanup-commands>
  14608. <command>-fs NAMENODE -rm -r hdfs:///dir*</command>
  14609. </cleanup-commands>
  14610. <comparators>
  14611. <comparator>
  14612. <type>RegexpComparator</type>
  14613. <expected-output>^drwxr-xr-x( )*-( )*USERNAME( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir0/dir1</expected-output>
  14614. </comparator>
  14615. <comparator>
  14616. <type>RegexpComparator</type>
  14617. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir0/dir1/file1</expected-output>
  14618. </comparator>
  14619. <comparator>
  14620. <type>RegexpComparator</type>
  14621. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir0/dir1/file2</expected-output>
  14622. </comparator>
  14623. <comparator>
  14624. <type>RegexpComparator</type>
  14625. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir0/file0</expected-output>
  14626. </comparator>
  14627. <comparator>
  14628. <type>RegexpComparator</type>
  14629. <expected-output>^drwxr-xr-x( )*-( )*USERNAME( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir2/dir1</expected-output>
  14630. </comparator>
  14631. <comparator>
  14632. <type>RegexpComparator</type>
  14633. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir2/dir1/file1</expected-output>
  14634. </comparator>
  14635. <comparator>
  14636. <type>RegexpComparator</type>
  14637. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir2/dir1/file2</expected-output>
  14638. </comparator>
  14639. <comparator>
  14640. <type>RegexpComparator</type>
  14641. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///dir2/file0</expected-output>
  14642. </comparator>
  14643. </comparators>
  14644. </test>
  14645. <test> <!-- TESTED -->
  14646. <description>chgrp: invalid option for group of file in hdfs:// path</description>
  14647. <test-commands>
  14648. <command>-fs NAMENODE -touchz hdfs:///file1</command>
  14649. <command>-fs NAMENODE -chgrp % hdfs:///file1</command>
  14650. </test-commands>
  14651. <cleanup-commands>
  14652. <command>-fs NAMENODE -rm hdfs:///file1</command>
  14653. </cleanup-commands>
  14654. <comparators>
  14655. <comparator>
  14656. <type>RegexpComparator</type>
  14657. <expected-output>^-chgrp: '%' does not match expected pattern for group</expected-output>
  14658. </comparator>
  14659. </comparators>
  14660. </test>
  14661. <!-- Tests for chgrp -->
  14662. <test> <!-- TESTED -->
  14663. <description>chgrp: change group of file in Namenode's path</description>
  14664. <test-commands>
  14665. <command>-fs NAMENODE -touchz NAMENODE/file1</command>
  14666. <command>-fs NAMENODE -chgrp newgroup NAMENODE/file1</command>
  14667. <command>-fs NAMENODE -ls NAMENODE/file1</command>
  14668. </test-commands>
  14669. <cleanup-commands>
  14670. <command>-fs NAMENODE -rm NAMENODE/file1</command>
  14671. </cleanup-commands>
  14672. <comparators>
  14673. <comparator>
  14674. <type>RegexpComparator</type>
  14675. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/file1</expected-output>
  14676. </comparator>
  14677. </comparators>
  14678. </test>
  14679. <test> <!-- TESTED -->
  14680. <description>chgrp: change group of directory in Namenode's path</description>
  14681. <test-commands>
  14682. <command>-fs NAMENODE -mkdir NAMENODE/dir0</command>
  14683. <command>-fs NAMENODE -mkdir NAMENODE/dir0/dir1</command>
  14684. <command>-fs NAMENODE -touchz NAMENODE/dir0/file0</command>
  14685. <command>-fs NAMENODE -touchz NAMENODE/dir0/dir1/file1</command>
  14686. <command>-fs NAMENODE -touchz NAMENODE/dir0/dir1/file2</command>
  14687. <command>-fs NAMENODE -chgrp newgroup NAMENODE/dir0/dir1</command>
  14688. <command>-fs NAMENODE -ls -R NAMENODE/dir0</command>
  14689. </test-commands>
  14690. <cleanup-commands>
  14691. <command>-fs NAMENODE -rm -r NAMENODE/dir0</command>
  14692. </cleanup-commands>
  14693. <comparators>
  14694. <comparator>
  14695. <type>RegexpComparator</type>
  14696. <expected-output>^drwxr-xr-x( )*-( )*USERNAME( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir0/dir1</expected-output>
  14697. </comparator>
  14698. <comparator>
  14699. <type>RegexpComparator</type>
  14700. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir0/dir1/file1</expected-output>
  14701. </comparator>
  14702. <comparator>
  14703. <type>RegexpComparator</type>
  14704. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir0/dir1/file2</expected-output>
  14705. </comparator>
  14706. <comparator>
  14707. <type>RegexpComparator</type>
  14708. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir0/file0</expected-output>
  14709. </comparator>
  14710. </comparators>
  14711. </test>
  14712. <test> <!-- TESTED -->
  14713. <description>chgrp: change group of directory in Namenode's path recursively </description>
  14714. <test-commands>
  14715. <command>-fs NAMENODE -mkdir NAMENODE/dir0</command>
  14716. <command>-fs NAMENODE -mkdir NAMENODE/dir0/dir1</command>
  14717. <command>-fs NAMENODE -touchz NAMENODE/dir0/file0</command>
  14718. <command>-fs NAMENODE -touchz NAMENODE/dir0/dir1/file1</command>
  14719. <command>-fs NAMENODE -touchz NAMENODE/dir0/dir1/file2</command>
  14720. <command>-fs NAMENODE -chgrp -R newgroup NAMENODE/dir0/dir1</command>
  14721. <command>-fs NAMENODE -ls -R NAMENODE/dir0</command>
  14722. </test-commands>
  14723. <cleanup-commands>
  14724. <command>-fs NAMENODE -rm -r NAMENODE/dir0</command>
  14725. </cleanup-commands>
  14726. <comparators>
  14727. <comparator>
  14728. <type>RegexpComparator</type>
  14729. <expected-output>^drwxr-xr-x( )*-( )*USERNAME( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir0/dir1</expected-output>
  14730. </comparator>
  14731. <comparator>
  14732. <type>RegexpComparator</type>
  14733. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir0/dir1/file1</expected-output>
  14734. </comparator>
  14735. <comparator>
  14736. <type>RegexpComparator</type>
  14737. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir0/dir1/file2</expected-output>
  14738. </comparator>
  14739. <comparator>
  14740. <type>RegexpComparator</type>
  14741. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir0/file0</expected-output>
  14742. </comparator>
  14743. </comparators>
  14744. </test>
  14745. <test> <!-- TESTED -->
  14746. <description>chgrp: change group of non existent file in Namenode's path</description>
  14747. <test-commands>
  14748. <command>-fs NAMENODE -chgrp newgroup NAMENODE/file1</command>
  14749. </test-commands>
  14750. <cleanup-commands>
  14751. <command>-fs NAMENODE -rm NAMENODE/file1</command>
  14752. </cleanup-commands>
  14753. <comparators>
  14754. <comparator>
  14755. <type>RegexpComparator</type>
  14756. <expected-output>^chgrp: `NAMENODE/file1': No such file or directory</expected-output>
  14757. </comparator>
  14758. </comparators>
  14759. </test>
  14760. <test> <!-- TESTED -->
  14761. <description>chgrp: change group of multiple files in Namenode's path using globbing</description>
  14762. <test-commands>
  14763. <command>-fs NAMENODE -touchz NAMENODE/file1</command>
  14764. <command>-fs NAMENODE -touchz NAMENODE/file2</command>
  14765. <command>-fs NAMENODE -touchz NAMENODE/file3</command>
  14766. <command>-fs NAMENODE -touchz NAMENODE/file4</command>
  14767. <command>-fs NAMENODE -chgrp newgroup NAMENODE/file* </command>
  14768. <command>-fs NAMENODE -ls -R NAMENODE/file*</command>
  14769. </test-commands>
  14770. <cleanup-commands>
  14771. <command>-fs NAMENODE -rm NAMENODE/file*</command>
  14772. </cleanup-commands>
  14773. <comparators>
  14774. <comparator>
  14775. <type>RegexpComparator</type>
  14776. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/file1</expected-output>
  14777. </comparator>
  14778. <comparator>
  14779. <type>RegexpComparator</type>
  14780. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/file2</expected-output>
  14781. </comparator>
  14782. <comparator>
  14783. <type>RegexpComparator</type>
  14784. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/file3</expected-output>
  14785. </comparator>
  14786. <comparator>
  14787. <type>RegexpComparator</type>
  14788. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/file4</expected-output>
  14789. </comparator>
  14790. </comparators>
  14791. </test>
  14792. <test> <!-- TESTED -->
  14793. <description>chgrp: change group of multiple directories in Namenode's path using globbing</description>
  14794. <test-commands>
  14795. <command>-fs NAMENODE -mkdir NAMENODE/dir0</command>
  14796. <command>-fs NAMENODE -mkdir NAMENODE/dir0/dir1</command>
  14797. <command>-fs NAMENODE -touchz NAMENODE/dir0/file0</command>
  14798. <command>-fs NAMENODE -touchz NAMENODE/dir0/dir1/file1</command>
  14799. <command>-fs NAMENODE -touchz NAMENODE/dir0/dir1/file2</command>
  14800. <command>-fs NAMENODE -mkdir NAMENODE/dir2</command>
  14801. <command>-fs NAMENODE -mkdir NAMENODE/dir2/dir1</command>
  14802. <command>-fs NAMENODE -touchz NAMENODE/dir2/file0</command>
  14803. <command>-fs NAMENODE -touchz NAMENODE/dir2/dir1/file1</command>
  14804. <command>-fs NAMENODE -touchz NAMENODE/dir2/dir1/file2</command>
  14805. <command>-fs NAMENODE -chgrp newgroup NAMENODE/dir*</command>
  14806. <command>-fs NAMENODE -ls -R NAMENODE/dir*</command>
  14807. </test-commands>
  14808. <cleanup-commands>
  14809. <command>-fs NAMENODE -rm -r NAMENODE/dir*</command>
  14810. </cleanup-commands>
  14811. <comparators>
  14812. <comparator>
  14813. <type>RegexpComparator</type>
  14814. <expected-output>^drwxr-xr-x( )*-( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir0/dir1</expected-output>
  14815. </comparator>
  14816. <comparator>
  14817. <type>RegexpComparator</type>
  14818. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir0/dir1/file1</expected-output>
  14819. </comparator>
  14820. <comparator>
  14821. <type>RegexpComparator</type>
  14822. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir0/dir1/file2</expected-output>
  14823. </comparator>
  14824. <comparator>
  14825. <type>RegexpComparator</type>
  14826. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir0/file0</expected-output>
  14827. </comparator>
  14828. <comparator>
  14829. <type>RegexpComparator</type>
  14830. <expected-output>^drwxr-xr-x( )*-( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir2/dir1</expected-output>
  14831. </comparator>
  14832. <comparator>
  14833. <type>RegexpComparator</type>
  14834. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir2/dir1/file1</expected-output>
  14835. </comparator>
  14836. <comparator>
  14837. <type>RegexpComparator</type>
  14838. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir2/dir1/file2</expected-output>
  14839. </comparator>
  14840. <comparator>
  14841. <type>RegexpComparator</type>
  14842. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir2/file0</expected-output>
  14843. </comparator>
  14844. </comparators>
  14845. </test>
  14846. <test> <!-- TESTED -->
  14847. <description>chgrp: change of multiple files in Namenode's path without globbing</description>
  14848. <test-commands>
  14849. <command>-fs NAMENODE -touchz NAMENODE/file1</command>
  14850. <command>-fs NAMENODE -touchz NAMENODE/file2</command>
  14851. <command>-fs NAMENODE -touchz NAMENODE/file3</command>
  14852. <command>-fs NAMENODE -touchz NAMENODE/file4</command>
  14853. <command>-fs NAMENODE -chgrp newgroup NAMENODE/file1 NAMENODE/file2 NAMENODE/file3 NAMENODE/file4 </command>
  14854. <command>-fs NAMENODE -ls -R NAMENODE/file*</command>
  14855. </test-commands>
  14856. <cleanup-commands>
  14857. <command>-fs NAMENODE -rm NAMENODE/file*</command>
  14858. </cleanup-commands>
  14859. <comparators>
  14860. <comparator>
  14861. <type>RegexpComparator</type>
  14862. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/file1</expected-output>
  14863. </comparator>
  14864. <comparator>
  14865. <type>RegexpComparator</type>
  14866. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/file2</expected-output>
  14867. </comparator>
  14868. <comparator>
  14869. <type>RegexpComparator</type>
  14870. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/file3</expected-output>
  14871. </comparator>
  14872. <comparator>
  14873. <type>RegexpComparator</type>
  14874. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/file4</expected-output>
  14875. </comparator>
  14876. </comparators>
  14877. </test>
  14878. <test> <!-- TESTED -->
  14879. <description>chgrp: change group of multiple directories in Namenode's path without globbing</description>
  14880. <test-commands>
  14881. <command>-fs NAMENODE -mkdir NAMENODE/dir0</command>
  14882. <command>-fs NAMENODE -mkdir NAMENODE/dir0/dir1</command>
  14883. <command>-fs NAMENODE -touchz NAMENODE/dir0/file0</command>
  14884. <command>-fs NAMENODE -touchz NAMENODE/dir0/dir1/file1</command>
  14885. <command>-fs NAMENODE -touchz NAMENODE/dir0/dir1/file2</command>
  14886. <command>-fs NAMENODE -mkdir NAMENODE/dir2</command>
  14887. <command>-fs NAMENODE -mkdir NAMENODE/dir2/dir1</command>
  14888. <command>-fs NAMENODE -touchz NAMENODE/dir2/file0</command>
  14889. <command>-fs NAMENODE -touchz NAMENODE/dir2/dir1/file1</command>
  14890. <command>-fs NAMENODE -touchz NAMENODE/dir2/dir1/file2</command>
  14891. <command>-fs NAMENODE -chgrp newgroup NAMENODE/dir0 NAMENODE/dir2</command>
  14892. <command>-fs NAMENODE -ls -R NAMENODE/dir*</command>
  14893. </test-commands>
  14894. <cleanup-commands>
  14895. <command>-fs NAMENODE -rm -r NAMENODE/dir*</command>
  14896. </cleanup-commands>
  14897. <comparators>
  14898. <comparator>
  14899. <type>RegexpComparator</type>
  14900. <expected-output>^drwxr-xr-x( )*-( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir0/dir1</expected-output>
  14901. </comparator>
  14902. <comparator>
  14903. <type>RegexpComparator</type>
  14904. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir0/dir1/file1</expected-output>
  14905. </comparator>
  14906. <comparator>
  14907. <type>RegexpComparator</type>
  14908. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir0/dir1/file2</expected-output>
  14909. </comparator>
  14910. <comparator>
  14911. <type>RegexpComparator</type>
  14912. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir0/file0</expected-output>
  14913. </comparator>
  14914. <comparator>
  14915. <type>RegexpComparator</type>
  14916. <expected-output>^drwxr-xr-x( )*-( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir2/dir1</expected-output>
  14917. </comparator>
  14918. <comparator>
  14919. <type>RegexpComparator</type>
  14920. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir2/dir1/file1</expected-output>
  14921. </comparator>
  14922. <comparator>
  14923. <type>RegexpComparator</type>
  14924. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir2/dir1/file2</expected-output>
  14925. </comparator>
  14926. <comparator>
  14927. <type>RegexpComparator</type>
  14928. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir2/file0</expected-output>
  14929. </comparator>
  14930. </comparators>
  14931. </test>
  14932. <test> <!-- TESTED -->
  14933. <description>chgrp: change group of multiple directories recursively in Namenode's path using globbing</description>
  14934. <test-commands>
  14935. <command>-fs NAMENODE -mkdir NAMENODE/dir0</command>
  14936. <command>-fs NAMENODE -mkdir NAMENODE/dir0/dir1</command>
  14937. <command>-fs NAMENODE -touchz NAMENODE/dir0/file0</command>
  14938. <command>-fs NAMENODE -touchz NAMENODE/dir0/dir1/file1</command>
  14939. <command>-fs NAMENODE -touchz NAMENODE/dir0/dir1/file2</command>
  14940. <command>-fs NAMENODE -mkdir NAMENODE/dir2</command>
  14941. <command>-fs NAMENODE -mkdir NAMENODE/dir2/dir1</command>
  14942. <command>-fs NAMENODE -touchz NAMENODE/dir2/file0</command>
  14943. <command>-fs NAMENODE -touchz NAMENODE/dir2/dir1/file1</command>
  14944. <command>-fs NAMENODE -touchz NAMENODE/dir2/dir1/file2</command>
  14945. <command>-fs NAMENODE -chgrp -R newgroup NAMENODE/dir*</command>
  14946. <command>-fs NAMENODE -ls -R NAMENODE/dir*</command>
  14947. </test-commands>
  14948. <cleanup-commands>
  14949. <command>-fs NAMENODE -rm -r NAMENODE/dir*</command>
  14950. </cleanup-commands>
  14951. <comparators>
  14952. <comparator>
  14953. <type>RegexpComparator</type>
  14954. <expected-output>^drwxr-xr-x( )*-( )*USERNAME( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir0/dir1</expected-output>
  14955. </comparator>
  14956. <comparator>
  14957. <type>RegexpComparator</type>
  14958. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir0/dir1/file1</expected-output>
  14959. </comparator>
  14960. <comparator>
  14961. <type>RegexpComparator</type>
  14962. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir0/dir1/file2</expected-output>
  14963. </comparator>
  14964. <comparator>
  14965. <type>RegexpComparator</type>
  14966. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir0/file0</expected-output>
  14967. </comparator>
  14968. <comparator>
  14969. <type>RegexpComparator</type>
  14970. <expected-output>^drwxr-xr-x( )*-( )*USERNAME( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir2/dir1</expected-output>
  14971. </comparator>
  14972. <comparator>
  14973. <type>RegexpComparator</type>
  14974. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir2/dir1/file1</expected-output>
  14975. </comparator>
  14976. <comparator>
  14977. <type>RegexpComparator</type>
  14978. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir2/dir1/file2</expected-output>
  14979. </comparator>
  14980. <comparator>
  14981. <type>RegexpComparator</type>
  14982. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir2/file0</expected-output>
  14983. </comparator>
  14984. </comparators>
  14985. </test>
  14986. <test> <!-- TESTED -->
  14987. <description>chgrp: change group of multiple directories recursively in Namenode's path without globbing</description>
  14988. <test-commands>
  14989. <command>-fs NAMENODE -mkdir NAMENODE/dir0</command>
  14990. <command>-fs NAMENODE -mkdir NAMENODE/dir0/dir1</command>
  14991. <command>-fs NAMENODE -touchz NAMENODE/dir0/file0</command>
  14992. <command>-fs NAMENODE -touchz NAMENODE/dir0/dir1/file1</command>
  14993. <command>-fs NAMENODE -touchz NAMENODE/dir0/dir1/file2</command>
  14994. <command>-fs NAMENODE -mkdir NAMENODE/dir2</command>
  14995. <command>-fs NAMENODE -mkdir NAMENODE/dir2/dir1</command>
  14996. <command>-fs NAMENODE -touchz NAMENODE/dir2/file0</command>
  14997. <command>-fs NAMENODE -touchz NAMENODE/dir2/dir1/file1</command>
  14998. <command>-fs NAMENODE -touchz NAMENODE/dir2/dir1/file2</command>
  14999. <command>-fs NAMENODE -chgrp -R newgroup NAMENODE/dir0 NAMENODE/dir2</command>
  15000. <command>-fs NAMENODE -ls -R NAMENODE/dir*</command>
  15001. </test-commands>
  15002. <cleanup-commands>
  15003. <command>-fs NAMENODE -rm -r NAMENODE/dir*</command>
  15004. </cleanup-commands>
  15005. <comparators>
  15006. <comparator>
  15007. <type>RegexpComparator</type>
  15008. <expected-output>^drwxr-xr-x( )*-( )*USERNAME( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir0/dir1</expected-output>
  15009. </comparator>
  15010. <comparator>
  15011. <type>RegexpComparator</type>
  15012. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir0/dir1/file1</expected-output>
  15013. </comparator>
  15014. <comparator>
  15015. <type>RegexpComparator</type>
  15016. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir0/dir1/file2</expected-output>
  15017. </comparator>
  15018. <comparator>
  15019. <type>RegexpComparator</type>
  15020. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir0/file0</expected-output>
  15021. </comparator>
  15022. <comparator>
  15023. <type>RegexpComparator</type>
  15024. <expected-output>^drwxr-xr-x( )*-( )*USERNAME( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir2/dir1</expected-output>
  15025. </comparator>
  15026. <comparator>
  15027. <type>RegexpComparator</type>
  15028. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir2/dir1/file1</expected-output>
  15029. </comparator>
  15030. <comparator>
  15031. <type>RegexpComparator</type>
  15032. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir2/dir1/file2</expected-output>
  15033. </comparator>
  15034. <comparator>
  15035. <type>RegexpComparator</type>
  15036. <expected-output>^-rw-r--r--( )*1( )*USERNAME( )*newgroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODE/dir2/file0</expected-output>
  15037. </comparator>
  15038. </comparators>
  15039. </test>
  15040. <test> <!-- TESTED -->
  15041. <description>chgrp: invalid option for group of file in Namenode's path</description>
  15042. <test-commands>
  15043. <command>-fs NAMENODE -touchz NAMENODE/file1</command>
  15044. <command>-fs NAMENODE -chgrp % NAMENODE/file1</command>
  15045. </test-commands>
  15046. <cleanup-commands>
  15047. <command>-fs NAMENODE -rm NAMENODE/file1</command>
  15048. </cleanup-commands>
  15049. <comparators>
  15050. <comparator>
  15051. <type>RegexpComparator</type>
  15052. <expected-output>^-chgrp: '%' does not match expected pattern for group</expected-output>
  15053. </comparator>
  15054. </comparators>
  15055. </test>
  15056. <test> <!--Tested -->
  15057. <description>help: help for dfsadmin report</description>
  15058. <test-commands>
  15059. <dfs-admin-command>-fs NAMENODE -help report</dfs-admin-command>
  15060. </test-commands>
  15061. <cleanup-commands>
  15062. </cleanup-commands>
  15063. <comparators>
  15064. <comparator>
  15065. <type>RegexpComparator</type>
  15066. <expected-output>^-report \[-live\] \[-dead\] \[-decommissioning\]:(.)*</expected-output>
  15067. </comparator>
  15068. <comparator>
  15069. <type>RegexpComparator</type>
  15070. <expected-output>^[ \t]*Reports basic filesystem information and statistics.( )*</expected-output>
  15071. </comparator>
  15072. </comparators>
  15073. </test>
  15074. <test> <!--Tested -->
  15075. <description>help: help for dfsadmin safemode</description>
  15076. <test-commands>
  15077. <dfs-admin-command>-fs NAMENODE -help safemode</dfs-admin-command>
  15078. </test-commands>
  15079. <cleanup-commands>
  15080. </cleanup-commands>
  15081. <comparators>
  15082. <comparator>
  15083. <type>RegexpComparator</type>
  15084. <expected-output>^-safemode &lt;enter\|leave\|get\|wait\|forceExit&gt;:( |\t)*Safe mode maintenance command.( )*</expected-output>
  15085. </comparator>
  15086. <comparator>
  15087. <type>RegexpComparator</type>
  15088. <expected-output>^( |\t)*Safe mode is a Namenode state in which it( )*</expected-output>
  15089. </comparator>
  15090. <comparator>
  15091. <type>RegexpComparator</type>
  15092. <expected-output>^( |\t)*1.( )*does not accept changes to the name space \(read-only\)( )*</expected-output>
  15093. </comparator>
  15094. <comparator>
  15095. <type>RegexpComparator</type>
  15096. <expected-output>^( |\t)*2.( )*does not replicate or delete blocks.( )*</expected-output>
  15097. </comparator>
  15098. <comparator>
  15099. <type>RegexpComparator</type>
  15100. <expected-output>^( |\t)*Safe mode is entered automatically at Namenode startup, and( )*</expected-output>
  15101. </comparator>
  15102. <comparator>
  15103. <type>RegexpComparator</type>
  15104. <expected-output>^( |\t)*leaves safe mode automatically when the configured minimum( )*</expected-output>
  15105. </comparator>
  15106. <comparator>
  15107. <type>RegexpComparator</type>
  15108. <expected-output>^( |\t)*percentage of blocks satisfies the minimum replication( )*</expected-output>
  15109. </comparator>
  15110. <comparator>
  15111. <type>RegexpComparator</type>
  15112. <expected-output>^( |\t)*condition. Safe mode can also be entered manually, but then( )*</expected-output>
  15113. </comparator>
  15114. <comparator>
  15115. <type>RegexpComparator</type>
  15116. <expected-output>^( |\t)*it can only be turned off manually as well.( )*</expected-output>
  15117. </comparator>
  15118. </comparators>
  15119. </test>
  15120. <test> <!--Tested -->
  15121. <description>help: help for dfsadmin refreshNodes</description>
  15122. <test-commands>
  15123. <dfs-admin-command>-fs NAMENODE -help refreshNodes</dfs-admin-command>
  15124. </test-commands>
  15125. <cleanup-commands>
  15126. </cleanup-commands>
  15127. <comparators>
  15128. <comparator>
  15129. <type>RegexpComparator</type>
  15130. <expected-output>^-refreshNodes:( |\t)*Updates the namenode with the set of datanodes allowed to connect to the namenode.( )*</expected-output>
  15131. </comparator>
  15132. <comparator>
  15133. <type>RegexpComparator</type>
  15134. <expected-output>^( |\t)*Namenode re-reads datanode hostnames from the file defined by( )*</expected-output>
  15135. </comparator>
  15136. <comparator>
  15137. <type>RegexpComparator</type>
  15138. <expected-output>^( |\t)*dfs.hosts, dfs.hosts.exclude configuration parameters.( )*</expected-output>
  15139. </comparator>
  15140. <comparator>
  15141. <type>RegexpComparator</type>
  15142. <expected-output>^( |\t)*Hosts defined in dfs.hosts are the datanodes that are part of( )*</expected-output>
  15143. </comparator>
  15144. <comparator>
  15145. <type>RegexpComparator</type>
  15146. <expected-output>^( |\t)*the cluster. If there are entries in dfs.hosts, only the hosts( )*</expected-output>
  15147. </comparator>
  15148. <comparator>
  15149. <type>RegexpComparator</type>
  15150. <expected-output>^( |\t)*in it are allowed to register with the namenode.( )*</expected-output>
  15151. </comparator>
  15152. <comparator>
  15153. <type>RegexpComparator</type>
  15154. <expected-output>^( |\t)*Entries in dfs.hosts.exclude are datanodes that need to be( )*</expected-output>
  15155. </comparator>
  15156. <comparator>
  15157. <type>RegexpComparator</type>
  15158. <expected-output>^( |\t)*decommissioned. Datanodes complete decommissioning when ( )*</expected-output>
  15159. </comparator>
  15160. <comparator>
  15161. <type>RegexpComparator</type>
  15162. <expected-output>^( |\t)*all the replicas from them are replicated to other datanodes.( )*</expected-output>
  15163. </comparator>
  15164. <comparator>
  15165. <type>RegexpComparator</type>
  15166. <expected-output>^( |\t)*Decommissioned nodes are not automatically shutdown and( )*</expected-output>
  15167. </comparator>
  15168. <comparator>
  15169. <type>RegexpComparator</type>
  15170. <expected-output>^( |\t)*are not chosen for writing new replicas.( )*</expected-output>
  15171. </comparator>
  15172. </comparators>
  15173. </test>
  15174. <test> <!--Tested -->
  15175. <description>help: help for dfsadmin finalizeUpgrade</description>
  15176. <test-commands>
  15177. <dfs-admin-command>-fs NAMENODE -help finalizeUpgrade</dfs-admin-command>
  15178. </test-commands>
  15179. <cleanup-commands>
  15180. </cleanup-commands>
  15181. <comparators>
  15182. <comparator>
  15183. <type>RegexpComparator</type>
  15184. <expected-output>^-finalizeUpgrade:( )*Finalize upgrade of HDFS.( )*</expected-output>
  15185. </comparator>
  15186. <comparator>
  15187. <type>RegexpComparator</type>
  15188. <expected-output>^( |\t)*Datanodes delete their previous version working directories,( )*</expected-output>
  15189. </comparator>
  15190. <comparator>
  15191. <type>RegexpComparator</type>
  15192. <expected-output>^( |\t)*followed by Namenode doing the same.( )*</expected-output>
  15193. </comparator>
  15194. <comparator>
  15195. <type>RegexpComparator</type>
  15196. <expected-output>^( |\t)*This completes the upgrade process.( )*</expected-output>
  15197. </comparator>
  15198. </comparators>
  15199. </test>
  15200. <test> <!--Tested -->
  15201. <description>help: help for dfsadmin metasave</description>
  15202. <test-commands>
  15203. <dfs-admin-command>-fs NAMENODE -help metasave</dfs-admin-command>
  15204. </test-commands>
  15205. <cleanup-commands>
  15206. </cleanup-commands>
  15207. <comparators>
  15208. <comparator>
  15209. <type>RegexpComparator</type>
  15210. <expected-output>^-metasave &lt;filename&gt;:( |\t)*Save Namenode's primary data structures( )*</expected-output>
  15211. </comparator>
  15212. <comparator>
  15213. <type>RegexpComparator</type>
  15214. <expected-output>^( |\t)*to &lt;filename&gt; in the directory specified by hadoop.log.dir property.( )*</expected-output>
  15215. </comparator>
  15216. <comparator>
  15217. <type>RegexpComparator</type>
  15218. <expected-output>^( |\t)*&lt;filename&gt; will contain one line for each of the following( )*</expected-output>
  15219. </comparator>
  15220. <comparator>
  15221. <type>RegexpComparator</type>
  15222. <expected-output>^( |\t)*1. Datanodes heart beating with Namenode( )*</expected-output>
  15223. </comparator>
  15224. <comparator>
  15225. <type>RegexpComparator</type>
  15226. <expected-output>^( |\t)*2. Blocks waiting to be replicated( )*</expected-output>
  15227. </comparator>
  15228. <comparator>
  15229. <type>RegexpComparator</type>
  15230. <expected-output>^( |\t)*3. Blocks currrently being replicated( )*</expected-output>
  15231. </comparator>
  15232. <comparator>
  15233. <type>RegexpComparator</type>
  15234. <expected-output>^( |\t)*4. Blocks waiting to be deleted( )*</expected-output>
  15235. </comparator>
  15236. </comparators>
  15237. </test>
  15238. <test> <!--Tested -->
  15239. <description>help: help for dfsadmin setQuota</description>
  15240. <test-commands>
  15241. <dfs-admin-command>-fs NAMENODE -help setQuota</dfs-admin-command>
  15242. </test-commands>
  15243. <cleanup-commands>
  15244. </cleanup-commands>
  15245. <comparators>
  15246. <comparator>
  15247. <type>RegexpComparator</type>
  15248. <expected-output>^-setQuota &lt;quota&gt; &lt;dirname&gt;...&lt;dirname&gt;: Set the quota &lt;quota&gt; for each directory &lt;dirName&gt;.( )*</expected-output>
  15249. </comparator>
  15250. <comparator>
  15251. <type>RegexpComparator</type>
  15252. <expected-output>^( |\t)*The directory quota is a long integer that puts a hard limit( )*</expected-output>
  15253. </comparator>
  15254. <comparator>
  15255. <type>RegexpComparator</type>
  15256. <expected-output>^( |\t)*on the number of names in the directory tree( )*</expected-output>
  15257. </comparator>
  15258. <comparator>
  15259. <type>RegexpComparator</type>
  15260. <expected-output>^( |\t)*For each directory, attempt to set the quota. An error will be reported if( )*</expected-output>
  15261. </comparator>
  15262. <comparator>
  15263. <type>RegexpComparator</type>
  15264. <expected-output>^( |\t)*1. quota is not a positive integer, or( )*</expected-output>
  15265. </comparator>
  15266. <comparator>
  15267. <type>RegexpComparator</type>
  15268. <expected-output>^( |\t)*2. User is not an administrator, or( )*</expected-output>
  15269. </comparator>
  15270. <comparator>
  15271. <type>RegexpComparator</type>
  15272. <expected-output>^( |\t)*3. The directory does not exist or is a file.( )*</expected-output>
  15273. </comparator>
  15274. </comparators>
  15275. </test>
  15276. <test> <!--Tested -->
  15277. <description>help: help for dfsadmin clrQuota</description>
  15278. <test-commands>
  15279. <dfs-admin-command>-fs NAMENODE -help clrQuota</dfs-admin-command>
  15280. </test-commands>
  15281. <cleanup-commands>
  15282. </cleanup-commands>
  15283. <comparators>
  15284. <comparator>
  15285. <type>RegexpComparator</type>
  15286. <expected-output>^-clrQuota &lt;dirname&gt;...&lt;dirname&gt;: Clear the quota for each directory &lt;dirName&gt;.( )*</expected-output>
  15287. </comparator>
  15288. <comparator>
  15289. <type>RegexpComparator</type>
  15290. <expected-output>^( |\t)*For each directory, attempt to clear the quota. An error will be reported if( )*</expected-output>
  15291. </comparator>
  15292. <comparator>
  15293. <type>RegexpComparator</type>
  15294. <expected-output>^( |\t)*1. the directory does not exist or is a file, or( )*</expected-output>
  15295. </comparator>
  15296. <comparator>
  15297. <type>RegexpComparator</type>
  15298. <expected-output>^( |\t)*2. user is not an administrator.( )*</expected-output>
  15299. </comparator>
  15300. <comparator>
  15301. <type>RegexpComparator</type>
  15302. <expected-output>^( |\t)*It does not fault if the directory has no quota.( )*</expected-output>
  15303. </comparator>
  15304. </comparators>
  15305. </test>
  15306. <test> <!--Tested -->
  15307. <description>help: help for dfsadmin setSpaceQuota</description>
  15308. <test-commands>
  15309. <dfs-admin-command>-fs NAMENODE -help setSpaceQuota</dfs-admin-command>
  15310. </test-commands>
  15311. <cleanup-commands>
  15312. </cleanup-commands>
  15313. <comparators>
  15314. <comparator>
  15315. <type>RegexpComparator</type>
  15316. <expected-output>^-setSpaceQuota &lt;quota&gt; \[-storageType &lt;storagetype&gt;\] &lt;dirname&gt;...&lt;dirname&gt;: Set the space quota &lt;quota&gt; for each directory &lt;dirName&gt;.( )*</expected-output>
  15317. </comparator>
  15318. <comparator>
  15319. <type>RegexpComparator</type>
  15320. <expected-output>^( |\t)*The space quota is a long integer that puts a hard limit( )*</expected-output>
  15321. </comparator>
  15322. <comparator>
  15323. <type>RegexpComparator</type>
  15324. <expected-output>^( |\t)*on the total size of all the files under the directory tree.( )*</expected-output>
  15325. </comparator>
  15326. <comparator>
  15327. <type>RegexpComparator</type>
  15328. <expected-output>^( |\t)*2. user is not an administrator, or( )*</expected-output>
  15329. </comparator>
  15330. <comparator>
  15331. <type>RegexpComparator</type>
  15332. <expected-output>^( |\t)*3. the directory does not exist or is a file.( )*</expected-output>
  15333. </comparator>
  15334. <comparator>
  15335. <type>RegexpComparator</type>
  15336. <expected-output>^( |\t)*The storage type specific quota is set when -storageType option is specified.( )*</expected-output>
  15337. </comparator>
  15338. </comparators>
  15339. </test>
  15340. <test> <!--Tested -->
  15341. <description>help: help for dfsadmin clrSpaceQuota</description>
  15342. <test-commands>
  15343. <dfs-admin-command>-fs NAMENODE -help clrSpaceQuota</dfs-admin-command>
  15344. </test-commands>
  15345. <cleanup-commands>
  15346. </cleanup-commands>
  15347. <comparators>
  15348. <comparator>
  15349. <type>RegexpComparator</type>
  15350. <expected-output>^-clrSpaceQuota \[-storageType &lt;storagetype&gt;\] &lt;dirname&gt;...&lt;dirname&gt;: Clear the space quota for each directory &lt;dirName&gt;.( )*</expected-output>
  15351. </comparator>
  15352. <comparator>
  15353. <type>RegexpComparator</type>
  15354. <expected-output>^( |\t)*For each directory, attempt to clear the quota. An error will be reported if( )*</expected-output>
  15355. </comparator>
  15356. <comparator>
  15357. <type>RegexpComparator</type>
  15358. <expected-output>^( |\t)*1. the directory does not exist or is a file, or( )*</expected-output>
  15359. </comparator>
  15360. <comparator>
  15361. <type>RegexpComparator</type>
  15362. <expected-output>^( |\t)*2. user is not an administrator.( )*</expected-output>
  15363. </comparator>
  15364. <comparator>
  15365. <type>RegexpComparator</type>
  15366. <expected-output>^( |\t)*It does not fault if the directory has no quota.( )*</expected-output>
  15367. </comparator>
  15368. <comparator>
  15369. <type>RegexpComparator</type>
  15370. <expected-output>^( |\t)*The storage type specific quota is cleared when -storageType option is specified.( )*</expected-output>
  15371. </comparator>
  15372. <comparator>
  15373. <type>RegexpComparator</type>
  15374. <expected-output>^( |\t)*Available storageTypes are( )*</expected-output>
  15375. </comparator>
  15376. <comparator>
  15377. <type>RegexpComparator</type>
  15378. <expected-output>^( |\t)*- RAM_DISK( )*</expected-output>
  15379. </comparator>
  15380. <comparator>
  15381. <type>RegexpComparator</type>
  15382. <expected-output>^( |\t)*- DISK( )*</expected-output>
  15383. </comparator>
  15384. <comparator>
  15385. <type>RegexpComparator</type>
  15386. <expected-output>^( |\t)*- SSD( )*</expected-output>
  15387. </comparator>
  15388. <comparator>
  15389. <type>RegexpComparator</type>
  15390. <expected-output>^( |\t)*- ARCHIVE( )*</expected-output>
  15391. </comparator>
  15392. </comparators>
  15393. </test>
  15394. <test> <!--Tested -->
  15395. <description>help: help for dfsadmin refreshServiceAcl</description>
  15396. <test-commands>
  15397. <dfs-admin-command>-fs NAMENODE -help refreshServiceAcl</dfs-admin-command>
  15398. </test-commands>
  15399. <cleanup-commands>
  15400. </cleanup-commands>
  15401. <comparators>
  15402. <comparator>
  15403. <type>RegexpComparator</type>
  15404. <expected-output>^-refreshServiceAcl: Reload the service-level authorization policy file( )*</expected-output>
  15405. </comparator>
  15406. <comparator>
  15407. <type>RegexpComparator</type>
  15408. <expected-output>^( |\t)*Namenode will reload the authorization policy file.( )*</expected-output>
  15409. </comparator>
  15410. </comparators>
  15411. </test>
  15412. <test> <!--Tested -->
  15413. <description>help: help for dfsadmin help</description>
  15414. <test-commands>
  15415. <dfs-admin-command>-fs NAMENODE -help help</dfs-admin-command>
  15416. </test-commands>
  15417. <cleanup-commands>
  15418. </cleanup-commands>
  15419. <comparators>
  15420. <comparator>
  15421. <type>RegexpComparator</type>
  15422. <expected-output>^-help \[cmd\]:( |\t)*Displays help for the given command or all commands if none( )*</expected-output>
  15423. </comparator>
  15424. <comparator>
  15425. <type>RegexpComparator</type>
  15426. <expected-output>^( |\t)*is specified.( )*</expected-output>
  15427. </comparator>
  15428. </comparators>
  15429. </test>
  15430. <test> <!--Tested -->
  15431. <description>verifying error messages for quota commands - setting quota on a file</description>
  15432. <test-commands>
  15433. <command>-fs NAMENODE -mkdir /test </command>
  15434. <command>-fs NAMENODE -touchz /test/file1 </command>
  15435. <dfs-admin-command>-fs NAMENODE -setQuota 1 /test/file1 </dfs-admin-command>
  15436. </test-commands>
  15437. <cleanup-commands>
  15438. <dfs-admin-command>-fs NAMENODE -setQuota 5 /test </dfs-admin-command>
  15439. <!-- Same directory will be used in the next test -->
  15440. </cleanup-commands>
  15441. <comparators>
  15442. <comparator>
  15443. <type>SubstringComparator</type>
  15444. <expected-output>setQuota: `/test/file1': Is not a directory</expected-output>
  15445. </comparator>
  15446. </comparators>
  15447. </test>
  15448. <test> <!--Tested -->
  15449. <description>verifying error messages for quota commands - setting quota on non-existing file</description>
  15450. <test-commands>
  15451. <dfs-admin-command>-fs NAMENODE -setSpaceQuota 1g /test1 </dfs-admin-command>
  15452. </test-commands>
  15453. <cleanup-commands>
  15454. <!-- Same directory will be used in the next test -->
  15455. </cleanup-commands>
  15456. <comparators>
  15457. <comparator>
  15458. <type>SubstringComparator</type>
  15459. <expected-output>setSpaceQuota: Directory does not exist: /test1</expected-output>
  15460. </comparator>
  15461. </comparators>
  15462. </test>
  15463. <test> <!--Tested -->
  15464. <description>verifying error messages for quota commands - exceeding quota</description>
  15465. <test-commands>
  15466. <dfs-admin-command>-fs NAMENODE -setQuota 3 /test </dfs-admin-command>
  15467. <command>-fs NAMENODE -touchz /test/file0 </command>
  15468. <command>-fs NAMENODE -mkdir /test/test1 </command>
  15469. </test-commands>
  15470. <cleanup-commands>
  15471. <!-- Same directory(/test) will be used in the next test -->
  15472. </cleanup-commands>
  15473. <comparators>
  15474. <comparator>
  15475. <type>SubstringComparator</type>
  15476. <expected-output>The NameSpace quota (directories and files) of directory /test is exceeded</expected-output>
  15477. </comparator>
  15478. </comparators>
  15479. </test>
  15480. <test> <!--Tested -->
  15481. <description>verifying error messages for quota commands - setting not valid quota</description>
  15482. <test-commands>
  15483. <dfs-admin-command>-fs NAMENODE -setQuota 0 /test </dfs-admin-command>
  15484. </test-commands>
  15485. <cleanup-commands>
  15486. <!-- Same directory will be used in the next test -->
  15487. </cleanup-commands>
  15488. <comparators>
  15489. <comparator>
  15490. <type>SubstringComparator</type>
  15491. <expected-output>Invalid values for quota : 0</expected-output>
  15492. </comparator>
  15493. </comparators>
  15494. </test>
  15495. <test> <!--Tested -->
  15496. <description>verifying error messages for quota commands - setting not valid space quota</description>
  15497. <test-commands>
  15498. <dfs-admin-command>-fs NAMENODE -setSpaceQuota a5 /test </dfs-admin-command>
  15499. </test-commands>
  15500. <cleanup-commands>
  15501. <!-- Same directory will be used in the next test -->
  15502. </cleanup-commands>
  15503. <comparators>
  15504. <comparator>
  15505. <type>SubstringComparator</type>
  15506. <expected-output>setSpaceQuota: "a5" is not a valid value for a quota.</expected-output>
  15507. </comparator>
  15508. </comparators>
  15509. </test>
  15510. <test> <!--Tested -->
  15511. <description>verifying error messages for quota commands - clearQuota on non existing file</description>
  15512. <test-commands>
  15513. <dfs-admin-command>-fs NAMENODE -clrQuota /test1 </dfs-admin-command>
  15514. </test-commands>
  15515. <cleanup-commands>
  15516. <command>-fs NAMENODE -rm -r /test </command>
  15517. </cleanup-commands>
  15518. <comparators>
  15519. <comparator>
  15520. <type>SubstringComparator</type>
  15521. <expected-output>clrQuota: Directory does not exist: /test1</expected-output>
  15522. </comparator>
  15523. </comparators>
  15524. </test>
  15525. <test> <!--Tested -->
  15526. <description>verifying error messages for quota commands - using globing</description>
  15527. <test-commands>
  15528. <command>-fs NAMENODE -mkdir /dir1</command>
  15529. <command>-fs NAMENODE -mkdir /dir2</command>
  15530. <command>-fs NAMENODE -mkdir /dir3</command>
  15531. <dfs-admin-command>-fs NAMENODE -setSpaceQuota 1k /dir* </dfs-admin-command>
  15532. <command>-fs NAMENODE -put CLITEST_DATA/data15bytes /dir1/</command>
  15533. </test-commands>
  15534. <cleanup-commands>
  15535. <command>-fs NAMENODE -rm -r /dir* </command>
  15536. </cleanup-commands>
  15537. <comparators>
  15538. <comparator>
  15539. <type>RegexpComparator</type>
  15540. <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>
  15541. </comparator>
  15542. </comparators>
  15543. </test>
  15544. <test> <!--Tested -->
  15545. <description>verifying error messages for quota commands - setting quota using globing</description>
  15546. <test-commands>
  15547. <command>-fs NAMENODE -mkdir /dir1</command>
  15548. <command>-fs NAMENODE -mkdir /dir2</command>
  15549. <command>-fs NAMENODE -mkdir /dir3</command>
  15550. <dfs-admin-command>-fs NAMENODE -setQuota 1 /dir* </dfs-admin-command>
  15551. <command>-fs NAMENODE -mkdir /dir1/dir4</command>
  15552. </test-commands>
  15553. <cleanup-commands>
  15554. <command>-fs NAMENODE -rm -r /dir* </command>
  15555. </cleanup-commands>
  15556. <comparators>
  15557. <comparator>
  15558. <type>SubstringComparator</type>
  15559. <expected-output>mkdir: The NameSpace quota (directories and files) of directory /dir1 is exceeded: quota=1 file count=2</expected-output>
  15560. </comparator>
  15561. </comparators>
  15562. </test>
  15563. <test> <!--Tested -->
  15564. <description>refreshServiceAcl: refreshing security authorization policy for namenode</description>
  15565. <test-commands>
  15566. <dfs-admin-command>-fs NAMENODE -refreshServiceAcl </dfs-admin-command>
  15567. </test-commands>
  15568. <cleanup-commands>
  15569. <!-- No cleanup -->
  15570. </cleanup-commands>
  15571. <comparators>
  15572. <comparator>
  15573. <type>RegexpComparator</type>
  15574. <expected-output>Refresh service acl successful(\n)*</expected-output>
  15575. </comparator>
  15576. </comparators>
  15577. </test><!--
  15578. <test> Tested
  15579. <description>refreshServiceAcl: verifying error message while refreshing security authorization policy for namenode</description>
  15580. <test-commands>
  15581. hadoop-policy.xml for tests has
  15582. security.refresh.policy.protocol.acl = ${user.name}
  15583. <dfs-admin-command>-fs NAMENODE -Dhadoop.job.ugi=blah,blah -refreshServiceAcl </dfs-admin-command>
  15584. </test-commands>
  15585. <cleanup-commands>
  15586. No cleanup
  15587. </cleanup-commands>
  15588. <comparators>
  15589. <comparator>
  15590. <type>SubstringComparator</type>
  15591. <expected-output>access denied</expected-output>
  15592. </comparator>
  15593. </comparators>
  15594. </test>
  15595. --><!-- Test for safemode -->
  15596. <test> <!-- TESTED -->
  15597. <description>safemode: Test for enter - Namenode is not in safemode</description>
  15598. <test-commands>
  15599. <dfs-admin-command>-fs NAMENODE -safemode enter</dfs-admin-command>
  15600. </test-commands>
  15601. <cleanup-commands>
  15602. <dfs-admin-command>-fs NAMENODE -safemode leave</dfs-admin-command>
  15603. </cleanup-commands>
  15604. <comparators>
  15605. <comparator>
  15606. <type>TokenComparator</type>
  15607. <expected-output>Safe mode is ON</expected-output>
  15608. </comparator>
  15609. </comparators>
  15610. </test>
  15611. <test> <!-- TESTED -->
  15612. <description>safemode: Test for enter - Namenode is already in safemode</description>
  15613. <test-commands>
  15614. <dfs-admin-command>-fs NAMENODE -safemode enter</dfs-admin-command>
  15615. <dfs-admin-command>-fs NAMENODE -safemode enter</dfs-admin-command>
  15616. </test-commands>
  15617. <cleanup-commands>
  15618. <dfs-admin-command>-fs NAMENODE -safemode leave</dfs-admin-command>
  15619. </cleanup-commands>
  15620. <comparators>
  15621. <comparator>
  15622. <type>TokenComparator</type>
  15623. <expected-output>Safe mode is ON</expected-output>
  15624. </comparator>
  15625. </comparators>
  15626. </test>
  15627. <test> <!-- TESTED -->
  15628. <description>safemode: Test for foceExit </description>
  15629. <test-commands>
  15630. <dfs-admin-command>-fs NAMENODE -safemode enter</dfs-admin-command>
  15631. <dfs-admin-command>-fs NAMENODE -safemode forceExit</dfs-admin-command>
  15632. </test-commands>
  15633. <cleanup-commands>
  15634. <!-- No cleanup -->
  15635. </cleanup-commands>
  15636. <comparators>
  15637. <comparator>
  15638. <type>TokenComparator</type>
  15639. <expected-output>Safe mode is OFF</expected-output>
  15640. </comparator>
  15641. </comparators>
  15642. </test>
  15643. <test> <!-- TESTED -->
  15644. <description>safemode: Test for leave - Namenode is already in safemode</description>
  15645. <test-commands>
  15646. <dfs-admin-command>-fs NAMENODE -safemode enter</dfs-admin-command>
  15647. <dfs-admin-command>-fs NAMENODE -safemode leave</dfs-admin-command>
  15648. </test-commands>
  15649. <cleanup-commands>
  15650. <!-- No cleanup -->
  15651. </cleanup-commands>
  15652. <comparators>
  15653. <comparator>
  15654. <type>TokenComparator</type>
  15655. <expected-output>Safe mode is OFF</expected-output>
  15656. </comparator>
  15657. </comparators>
  15658. </test>
  15659. <test> <!-- TESTED -->
  15660. <description>safemode: Test for leave - Namenode is not in safemode</description>
  15661. <test-commands>
  15662. <dfs-admin-command>-fs NAMENODE -safemode leave</dfs-admin-command>
  15663. </test-commands>
  15664. <cleanup-commands>
  15665. <!-- No cleanup -->
  15666. </cleanup-commands>
  15667. <comparators>
  15668. <comparator>
  15669. <type>TokenComparator</type>
  15670. <expected-output>Safe mode is OFF</expected-output>
  15671. </comparator>
  15672. </comparators>
  15673. </test>
  15674. <test> <!-- TESTED -->
  15675. <description>safemode: Test for get - Namenode is not in safemode</description>
  15676. <test-commands>
  15677. <dfs-admin-command>-fs NAMENODE -safemode leave</dfs-admin-command>
  15678. <dfs-admin-command>-fs NAMENODE -safemode get</dfs-admin-command>
  15679. </test-commands>
  15680. <cleanup-commands>
  15681. <!-- No cleanup -->
  15682. </cleanup-commands>
  15683. <comparators>
  15684. <comparator>
  15685. <type>TokenComparator</type>
  15686. <expected-output>Safe mode is OFF</expected-output>
  15687. </comparator>
  15688. </comparators>
  15689. </test>
  15690. <test> <!-- TESTED -->
  15691. <description>safemode:Test for get - Namenode is already in safemode</description>
  15692. <test-commands>
  15693. <dfs-admin-command>-fs NAMENODE -safemode enter</dfs-admin-command>
  15694. <dfs-admin-command>-fs NAMENODE -safemode get</dfs-admin-command>
  15695. </test-commands>
  15696. <cleanup-commands>
  15697. <dfs-admin-command>-fs NAMENODE -safemode leave</dfs-admin-command>
  15698. </cleanup-commands>
  15699. <comparators>
  15700. <comparator>
  15701. <type>TokenComparator</type>
  15702. <expected-output>Safe mode is ON</expected-output>
  15703. </comparator>
  15704. </comparators>
  15705. </test>
  15706. <test> <!-- TESTED -->
  15707. <description>safemode: Test for wait - Namenode is not in safemode</description>
  15708. <test-commands>
  15709. <dfs-admin-command>-fs NAMENODE -safemode leave</dfs-admin-command>
  15710. <dfs-admin-command>-fs NAMENODE -safemode wait</dfs-admin-command>
  15711. </test-commands>
  15712. <cleanup-commands>
  15713. <!-- No cleanup -->
  15714. </cleanup-commands>
  15715. <comparators>
  15716. <comparator>
  15717. <type>TokenComparator</type>
  15718. <expected-output>Safe mode is OFF</expected-output>
  15719. </comparator>
  15720. </comparators>
  15721. </test>
  15722. <test> <!-- TESTED -->
  15723. <description>safemode: Test for wait - Namenode is already in safemode</description>
  15724. <test-commands>
  15725. <dfs-admin-command>-fs NAMENODE -safemode enter</dfs-admin-command>
  15726. <dfs-admin-command>-fs NAMENODE -safemode wait &amp;</dfs-admin-command>
  15727. <dfs-admin-command>-fs NAMENODE -safemode leave</dfs-admin-command>
  15728. </test-commands>
  15729. <cleanup-commands>
  15730. <!-- No cleanup -->
  15731. </cleanup-commands>
  15732. <comparators>
  15733. <comparator>
  15734. <type>TokenComparator</type>
  15735. <expected-output>Safe mode is OFF</expected-output>
  15736. </comparator>
  15737. </comparators>
  15738. </test>
  15739. <!-- Test for report -->
  15740. <test> <!-- TESTED -->
  15741. <description>report: Displays the report about the Datanodes</description>
  15742. <test-commands>
  15743. <dfs-admin-command>-fs NAMENODE -report</dfs-admin-command>
  15744. </test-commands>
  15745. <cleanup-commands>
  15746. <!-- no cleanup cmd -->
  15747. </cleanup-commands>
  15748. <comparators>
  15749. <comparator>
  15750. <type>RegexpComparator</type>
  15751. <expected-output>Configured Capacity: [0-9]+ \([0-9]+\.[0-9]+ [BKMGT]+\)</expected-output>
  15752. </comparator>
  15753. <comparator>
  15754. <type>RegexpComparator</type>
  15755. <expected-output>Present Capacity: [0-9]+ \([0-9\.]+ [BKMGT]+\)</expected-output>
  15756. </comparator>
  15757. <comparator>
  15758. <type>RegexpComparator</type>
  15759. <expected-output>DFS Remaining: [0-9]+ \([0-9\.]+ [BKMGT]+\)</expected-output>
  15760. </comparator>
  15761. <comparator>
  15762. <type>RegexpComparator</type>
  15763. <expected-output>DFS Used: [0-9]+ \([0-9\.]+ [BKMGT]+\)</expected-output>
  15764. </comparator>
  15765. <comparator>
  15766. <type>RegexpComparator</type>
  15767. <expected-output>DFS Used\%: [0-9\.]+%</expected-output>
  15768. </comparator>
  15769. <comparator>
  15770. <type>RegexpComparator</type>
  15771. <expected-output>Live datanodes \([0-9]+\):</expected-output>
  15772. </comparator>
  15773. <comparator>
  15774. <type>RegexpComparator</type>
  15775. <expected-output>Name: [0-9\.:]+ \([-.a-zA-z0-9\.]+\)</expected-output>
  15776. </comparator>
  15777. <comparator>
  15778. <type>RegexpComparator</type>
  15779. <expected-output>Hostname: [-.a-zA-z0-9\.]+</expected-output>
  15780. </comparator>
  15781. <comparator>
  15782. <type>RegexpComparator</type>
  15783. <expected-output>Decommission Status : [a-zA-Z]+</expected-output>
  15784. </comparator>
  15785. <comparator>
  15786. <type>RegexpComparator</type>
  15787. <expected-output>Non DFS Used: [0-9]+ \([0-9\.]+ [BKMGT]+\)</expected-output>
  15788. </comparator>
  15789. <comparator>
  15790. <type>RegexpComparator</type>
  15791. <expected-output>DFS Remaining%: [0-9\.]+%</expected-output>
  15792. </comparator>
  15793. <comparator>
  15794. <type>RegexpComparator</type>
  15795. <expected-output>Last contact: [a-zA-Z]+ [a-zA-Z]+ [0-9]+ [0-9:]+ [A-Z\-\+\:0-9]+ [0-9]+</expected-output>
  15796. </comparator>
  15797. <comparator>
  15798. <type>TokenComparator</type>
  15799. <expected-output>Live datanodes</expected-output>
  15800. </comparator>
  15801. </comparators>
  15802. </test>
  15803. <!-- Test for saveNamespace -->
  15804. <test> <!-- TESTED -->
  15805. <description>saveNamespace: to save the namespace when safemode is ON</description>
  15806. <test-commands>
  15807. <dfs-admin-command>-fs NAMENODE -safemode enter</dfs-admin-command>
  15808. <dfs-admin-command>-fs NAMENODE -saveNamespace</dfs-admin-command>
  15809. </test-commands>
  15810. <cleanup-commands>
  15811. <dfs-admin-command>-fs NAMENODE -safemode leave</dfs-admin-command>
  15812. </cleanup-commands>
  15813. <comparators>
  15814. <comparator>
  15815. <type>RegexpComparator</type>
  15816. <expected-output>Save namespace successful(\n)*</expected-output>
  15817. </comparator>
  15818. </comparators>
  15819. </test>
  15820. <test> <!-- TESTED -->
  15821. <description>saveNamespace: to save the namespace when safemode is OFF</description>
  15822. <test-commands>
  15823. <dfs-admin-command>-fs NAMENODE -safemode leave</dfs-admin-command>
  15824. <dfs-admin-command>-fs NAMENODE -saveNamespace</dfs-admin-command>
  15825. </test-commands>
  15826. <cleanup-commands>
  15827. <dfs-admin-command>-fs NAMENODE -safemode leave</dfs-admin-command>
  15828. </cleanup-commands>
  15829. <comparators>
  15830. <comparator>
  15831. <type>TokenComparator</type>
  15832. <expected-output>saveNamespace: Safe mode should be turned ON in order to create namespace image.</expected-output>
  15833. </comparator>
  15834. </comparators>
  15835. </test>
  15836. <!-- Test for rollEdits -->
  15837. <test> <!-- TESTED -->
  15838. <description>rollEdits: test rollEdits admin command</description>
  15839. <test-commands>
  15840. <dfs-admin-command>-fs NAMENODE -rollEdits</dfs-admin-command>
  15841. </test-commands>
  15842. <cleanup-commands>
  15843. <!-- no cleanup -->
  15844. </cleanup-commands>
  15845. <comparators>
  15846. <comparator>
  15847. <type>RegexpComparator</type>
  15848. <expected-output>New segment starts at txid \d+</expected-output>
  15849. </comparator>
  15850. </comparators>
  15851. </test>
  15852. <!-- Test for refreshNodes -->
  15853. <test> <!-- TESTED -->
  15854. <description>refreshNodes: to refresh the nodes</description>
  15855. <test-commands>
  15856. <dfs-admin-command>-fs NAMENODE -refreshNodes</dfs-admin-command>
  15857. <dfs-admin-command>-fs NAMENODE -report</dfs-admin-command>
  15858. </test-commands>
  15859. <cleanup-commands>
  15860. <!-- no cleanup -->
  15861. </cleanup-commands>
  15862. <comparators>
  15863. <comparator>
  15864. <type>RegexpComparator</type>
  15865. <expected-output>Configured Capacity: [0-9]+ \([0-9]+\.[0-9]+ [BKMGT]+\)</expected-output>
  15866. </comparator>
  15867. <comparator>
  15868. <type>RegexpComparator</type>
  15869. <expected-output>Present Capacity: [0-9]+ \([0-9\.]+ [BKMGT]+\)</expected-output>
  15870. </comparator>
  15871. <comparator>
  15872. <type>RegexpComparator</type>
  15873. <expected-output>DFS Remaining: [0-9]+ \([0-9\.]+ [BKMGT]+\)</expected-output>
  15874. </comparator>
  15875. <comparator>
  15876. <type>RegexpComparator</type>
  15877. <expected-output>DFS Used: [0-9]+ \([0-9\.]+ [BKMGT]+\)</expected-output>
  15878. </comparator>
  15879. <comparator>
  15880. <type>RegexpComparator</type>
  15881. <expected-output>DFS Used\%: [0-9\.]+%</expected-output>
  15882. </comparator>
  15883. <comparator>
  15884. <type>RegexpComparator</type>
  15885. <expected-output>Name: [0-9\.:]+ \([-.a-zA-z0-9\.]+\)</expected-output>
  15886. </comparator>
  15887. <comparator>
  15888. <type>RegexpComparator</type>
  15889. <expected-output>Hostname: [-.a-zA-z0-9\.]+</expected-output>
  15890. </comparator>
  15891. <comparator>
  15892. <type>RegexpComparator</type>
  15893. <expected-output>Decommission Status : [a-zA-Z]+</expected-output>
  15894. </comparator>
  15895. <comparator>
  15896. <type>RegexpComparator</type>
  15897. <expected-output>Non DFS Used: [0-9]+ \([0-9\.]+ [BKMGT]+\)</expected-output>
  15898. </comparator>
  15899. <comparator>
  15900. <type>RegexpComparator</type>
  15901. <expected-output>DFS Remaining%: [0-9\.]+%</expected-output>
  15902. </comparator>
  15903. <comparator>
  15904. <type>RegexpComparator</type>
  15905. <expected-output>Last contact: [a-zA-Z]+ [a-zA-Z]+ [0-9]+ [0-9:]+ [A-Z\-\+\:0-9]+ [0-9]+</expected-output>
  15906. </comparator>
  15907. <comparator>
  15908. <type>TokenComparator</type>
  15909. <expected-output>Live datanodes</expected-output>
  15910. </comparator>
  15911. </comparators>
  15912. </test>
  15913. <!-- Test for metasave -->
  15914. <test> <!-- TESTED -->
  15915. <description>metasave: to save metadata</description>
  15916. <test-commands>
  15917. <dfs-admin-command>-fs NAMENODE -metasave metafile</dfs-admin-command>
  15918. </test-commands>
  15919. <cleanup-commands>
  15920. <!-- No cleanup -->
  15921. </cleanup-commands>
  15922. <comparators>
  15923. <comparator>
  15924. <type>RegexpComparator</type>
  15925. <expected-output>Created metasave file metafile in the log directory of namenode hdfs:\/\/[-.a-zA-Z0-9\.:]+</expected-output>
  15926. </comparator>
  15927. </comparators>
  15928. </test>
  15929. <!-- Test for clrSpacequota -->
  15930. <test> <!-- TESTED -->
  15931. <description>clrSpaceQuota: Namenode is already in safemode</description>
  15932. <test-commands>
  15933. <command>-fs NAMENODE -mkdir test</command>
  15934. <dfs-admin-command>-fs NAMENODE -setSpaceQuota 15 test</dfs-admin-command>
  15935. <dfs-admin-command>-fs NAMENODE -clrSpaceQuota test</dfs-admin-command>
  15936. </test-commands>
  15937. <cleanup-commands>
  15938. <command>-fs NAMENODE -rm -r test</command>
  15939. </cleanup-commands>
  15940. <comparators>
  15941. <comparator>
  15942. <type>ExactComparator</type>
  15943. <expected-output></expected-output>
  15944. </comparator>
  15945. </comparators>
  15946. </test>
  15947. <test> <!-- Tested -->
  15948. <description>printTopology: verifying that the topology map is what we expect</description>
  15949. <test-commands>
  15950. <dfs-admin-command>-fs NAMENODE -printTopology</dfs-admin-command>
  15951. </test-commands>
  15952. <cleanup-commands>
  15953. <!-- No cleanup -->
  15954. </cleanup-commands>
  15955. <comparators>
  15956. <!-- miniDFS cluster started in CLITestHelper is set to match this output -->
  15957. <comparator>
  15958. <type>RegexpAcrossOutputComparator</type>
  15959. <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>
  15960. </comparator>
  15961. <comparator>
  15962. <type>RegexpAcrossOutputComparator</type>
  15963. <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>
  15964. </comparator>
  15965. <comparator>
  15966. <type>RegexpAcrossOutputComparator</type>
  15967. <expected-output>Rack: \/rack3\s*127\.0\.0\.1:\d+\s\([-.a-zA-Z0-9]+\)</expected-output>
  15968. </comparator>
  15969. <comparator>
  15970. <type>RegexpAcrossOutputComparator</type>
  15971. <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>
  15972. </comparator>
  15973. </comparators>
  15974. </test>
  15975. <!-- DFS tests -->
  15976. <test>
  15977. <description>appendToFile</description>
  15978. <test-commands>
  15979. <command>-fs NAMENODE -mkdir -p /user/USERNAME/dir1</command>
  15980. <command>-fs NAMENODE -touchz /user/USERNAME/dir1/file0</command>
  15981. <command>-fs NAMENODE -appendToFile CLITEST_DATA/data15bytes /user/USERNAME/dir1/file0</command>
  15982. <command>-fs NAMENODE -cat /user/USERNAME/dir1/file0</command>
  15983. </test-commands>
  15984. <cleanup-commands>
  15985. <command>-fs NAMENODE -rm -r /user/USERNAME</command>
  15986. </cleanup-commands>
  15987. <comparators>
  15988. <comparator>
  15989. <type>RegexpComparator</type>
  15990. <expected-output>12345678901234</expected-output>
  15991. </comparator>
  15992. </comparators>
  15993. </test>
  15994. <test>
  15995. <description>text</description>
  15996. <test-commands>
  15997. <command>-fs NAMENODE -mkdir -p /user/USERNAME/dir1</command>
  15998. <command>-fs NAMENODE -put CLITEST_DATA/data15bytes /user/USERNAME/dir1/file0</command>
  15999. <command>-fs NAMENODE -text /user/USERNAME/dir1/file0</command>
  16000. </test-commands>
  16001. <cleanup-commands>
  16002. <command>-fs NAMENODE -rm -r /user/USERNAME/dir1</command>
  16003. </cleanup-commands>
  16004. <comparators>
  16005. <comparator>
  16006. <type>RegexpComparator</type>
  16007. <expected-output>12345678901234</expected-output>
  16008. </comparator>
  16009. </comparators>
  16010. </test>
  16011. <test>
  16012. <description>rmdir</description>
  16013. <test-commands>
  16014. <command>-fs NAMENODE -mkdir -p /user/USERNAME/dir1</command>
  16015. <command>-fs NAMENODE -rmdir /user/USERNAME/dir1</command>
  16016. <command>-fs NAMENODE -ls /user/USERNAME/</command>
  16017. </test-commands>
  16018. <cleanup-commands>
  16019. <command>-fs NAMENODE -rm -r /user/USERNAME</command>
  16020. </cleanup-commands>
  16021. <comparators>
  16022. <comparator>
  16023. <type>ExactComparator</type>
  16024. <expected-output></expected-output>
  16025. </comparator>
  16026. </comparators>
  16027. </test>
  16028. <test>
  16029. <description>rmdir with ignore-fail-on-non-empty</description>
  16030. <test-commands>
  16031. <command>-fs NAMENODE -mkdir -p /user/USERNAME/dir1</command>
  16032. <command>-fs NAMENODE -put CLITEST_DATA/data15bytes /user/USERNAME/dir1/file0</command>
  16033. <command>-fs NAMENODE -rmdir --ignore-fail-on-non-empty /user/USERNAME/dir1</command>
  16034. <command>-fs NAMENODE -ls /user/USERNAME/</command>
  16035. </test-commands>
  16036. <cleanup-commands>
  16037. <command>-fs NAMENODE -rm -r /user/USERNAME</command>
  16038. </cleanup-commands>
  16039. <comparators>
  16040. <comparator>
  16041. <type>RegexpComparator</type>
  16042. <expected-output>Found 1 items</expected-output>
  16043. </comparator>
  16044. <comparator>
  16045. <type>RegexpComparator</type>
  16046. <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>
  16047. </comparator>
  16048. </comparators>
  16049. </test>
  16050. <test>
  16051. <description>df</description>
  16052. <test-commands>
  16053. <command>-fs NAMENODE -mkdir -p /user/USERNAME/dir1</command>
  16054. <command>-fs NAMENODE -put CLITEST_DATA/data15bytes /user/USERNAME/dir1/file0</command>
  16055. <command>-fs NAMENODE -df /user/USERNAME</command>
  16056. </test-commands>
  16057. <cleanup-commands>
  16058. <command>-fs NAMENODE -rm -r /user/USERNAME</command>
  16059. </cleanup-commands>
  16060. <comparators>
  16061. <comparator>
  16062. <type>RegexpComparator</type>
  16063. <expected-output>Filesystem( )*Size( )*Used( )*Available( )*Use%.*</expected-output>
  16064. </comparator>
  16065. </comparators>
  16066. </test>
  16067. <test>
  16068. <description>expunge</description>
  16069. <test-commands>
  16070. <command>-fs NAMENODE -expunge</command>
  16071. </test-commands>
  16072. <cleanup-commands>
  16073. <command></command>
  16074. </cleanup-commands>
  16075. <comparators>
  16076. <comparator>
  16077. <type>ExactComparator</type>
  16078. <expected-output></expected-output>
  16079. </comparator>
  16080. </comparators>
  16081. </test>
  16082. <!-- Tests for snapshots -->
  16083. <test>
  16084. <description>allowSnapshot</description>
  16085. <test-commands>
  16086. <command>-fs NAMENODE -mkdir -p /user/USERNAME/dir1</command>
  16087. <dfs-admin-command>-fs NAMENODE -allowSnapshot /user/USERNAME/dir1</dfs-admin-command>
  16088. </test-commands>
  16089. <cleanup-commands>
  16090. <dfs-admin-command>-fs NAMENODE -disallowSnapshot /user/USERNAME/dir1</dfs-admin-command>
  16091. <command>-fs NAMENODE -rm -r /user/USERNAME</command>
  16092. </cleanup-commands>
  16093. <comparators>
  16094. <comparator>
  16095. <type>RegexpComparator</type>
  16096. <expected-output>Allowing snaphot on /user/USERNAME/dir1 succeeded</expected-output>
  16097. </comparator>
  16098. </comparators>
  16099. </test>
  16100. <test>
  16101. <description>disallowSnapshot</description>
  16102. <test-commands>
  16103. <command>-fs NAMENODE -mkdir -p /user/USERNAME/dir1</command>
  16104. <dfs-admin-command>-fs NAMENODE -allowSnapshot /user/USERNAME/dir1</dfs-admin-command>
  16105. <dfs-admin-command>-fs NAMENODE -disallowSnapshot /user/USERNAME/dir1</dfs-admin-command>
  16106. </test-commands>
  16107. <cleanup-commands>
  16108. <command>-fs NAMENODE -rm -r /user/USERNAME</command>
  16109. </cleanup-commands>
  16110. <comparators>
  16111. <comparator>
  16112. <type>RegexpComparator</type>
  16113. <expected-output>Disallowing snaphot on /user/USERNAME/dir1 succeeded</expected-output>
  16114. </comparator>
  16115. </comparators>
  16116. </test>
  16117. <test>
  16118. <description>createSnapshot</description>
  16119. <test-commands>
  16120. <command>-fs NAMENODE -mkdir -p /user/USERNAME/dir1</command>
  16121. <dfs-admin-command>-fs NAMENODE -allowSnapshot /user/USERNAME/dir1</dfs-admin-command>
  16122. <command>-fs NAMENODE -createSnapshot /user/USERNAME/dir1 snapshot1</command>
  16123. </test-commands>
  16124. <cleanup-commands>
  16125. <command>-fs NAMENODE -deleteSnapshot /user/USERNAME/dir1 snapshot1</command>
  16126. <dfs-admin-command>-fs NAMENODE -disallowSnapshot /user/USERNAME/dir1</dfs-admin-command>
  16127. <command>-fs NAMENODE -rm -r /user/USERNAME</command>
  16128. </cleanup-commands>
  16129. <comparators>
  16130. <comparator>
  16131. <type>RegexpComparator</type>
  16132. <expected-output>Created snapshot /user/USERNAME/dir1/.snapshot/snapshot1</expected-output>
  16133. </comparator>
  16134. </comparators>
  16135. </test>
  16136. <test>
  16137. <description>renameSnapshot</description>
  16138. <test-commands>
  16139. <command>-fs NAMENODE -mkdir -p /user/USERNAME/dir1</command>
  16140. <dfs-admin-command>-fs NAMENODE -allowSnapshot /user/USERNAME/dir1</dfs-admin-command>
  16141. <command>-fs NAMENODE -createSnapshot /user/USERNAME/dir1 snapshot1</command>
  16142. <command>-fs NAMENODE -renameSnapshot /user/USERNAME/dir1 snapshot1 snapshot2</command>
  16143. <command>-fs NAMENODE -ls /user/USERNAME/dir1/.snapshot</command>
  16144. </test-commands>
  16145. <cleanup-commands>
  16146. <command>-fs NAMENODE -deleteSnapshot /user/USERNAME/dir1 snapshot2</command>
  16147. <dfs-admin-command>-fs NAMENODE -disallowSnapshot /user/USERNAME/dir1</dfs-admin-command>
  16148. <command>-fs NAMENODE -rm -r /user/USERNAME</command>
  16149. </cleanup-commands>
  16150. <comparators>
  16151. <comparator>
  16152. <type>RegexpComparator</type>
  16153. <expected-output>Found 1 items</expected-output>
  16154. </comparator>
  16155. <comparator>
  16156. <type>RegexpComparator</type>
  16157. <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>
  16158. </comparator>
  16159. </comparators>
  16160. </test>
  16161. <test>
  16162. <description>deleteSnapshot</description>
  16163. <test-commands>
  16164. <command>-fs NAMENODE -mkdir -p /user/USERNAME/dir1</command>
  16165. <dfs-admin-command>-fs NAMENODE -allowSnapshot /user/USERNAME/dir1</dfs-admin-command>
  16166. <command>-fs NAMENODE -createSnapshot /user/USERNAME/dir1 snapshot1</command>
  16167. <command>-fs NAMENODE -deleteSnapshot /user/USERNAME/dir1 snapshot1</command>
  16168. <command>-fs NAMENODE -ls /user/USERNAME/dir1/.snapshot</command>
  16169. </test-commands>
  16170. <cleanup-commands>
  16171. <dfs-admin-command>-fs NAMENODE -disallowSnapshot /user/USERNAME/dir1</dfs-admin-command>
  16172. <command>-fs NAMENODE -rm -r /user/USERNAME</command>
  16173. </cleanup-commands>
  16174. <comparators>
  16175. <comparator>
  16176. <type>ExactComparator</type>
  16177. <expected-output></expected-output>
  16178. </comparator>
  16179. </comparators>
  16180. </test>
  16181. <!-- DFSadmin tests -->
  16182. <test>
  16183. <description>refreshUserToGroupsMappings</description>
  16184. <test-commands>
  16185. <dfs-admin-command>-fs NAMENODE -refreshUserToGroupsMappings</dfs-admin-command>
  16186. </test-commands>
  16187. <cleanup-commands>
  16188. <command></command>
  16189. </cleanup-commands>
  16190. <comparators>
  16191. <comparator>
  16192. <type>RegexpComparator</type>
  16193. <expected-output>Refresh user to groups mapping successful(\n)*</expected-output>
  16194. </comparator>
  16195. </comparators>
  16196. </test>
  16197. <test>
  16198. <description>refreshSuperUserGroupsConfiguration</description>
  16199. <test-commands>
  16200. <dfs-admin-command>-fs NAMENODE -refreshSuperUserGroupsConfiguration</dfs-admin-command>
  16201. </test-commands>
  16202. <cleanup-commands>
  16203. <command></command>
  16204. </cleanup-commands>
  16205. <comparators>
  16206. <comparator>
  16207. <type>RegexpComparator</type>
  16208. <expected-output>Refresh super user groups configuration successful(\n)*</expected-output>
  16209. </comparator>
  16210. </comparators>
  16211. </test>
  16212. <test>
  16213. <description>setQuota</description>
  16214. <test-commands>
  16215. <command>-fs NAMENODE -mkdir -p /user/USERNAME/dir1</command>
  16216. <dfs-admin-command>-fs NAMENODE -setQuota 3 /user/USERNAME/dir1</dfs-admin-command>
  16217. <command>-fs NAMENODE -count -q /user/USERNAME/dir1</command>
  16218. </test-commands>
  16219. <cleanup-commands>
  16220. <command>-fs NAMENODE -rm -r /user/USERNAME</command>
  16221. </cleanup-commands>
  16222. <comparators>
  16223. <comparator>
  16224. <type>RegexpComparator</type>
  16225. <expected-output>( )*3.*/user/USERNAME/dir1</expected-output>
  16226. </comparator>
  16227. </comparators>
  16228. </test>
  16229. <test>
  16230. <description>clrQuota</description>
  16231. <test-commands>
  16232. <command>-fs NAMENODE -mkdir -p /user/USERNAME/dir1</command>
  16233. <dfs-admin-command>-fs NAMENODE -setQuota 3 /user/USERNAME/dir1</dfs-admin-command>
  16234. <dfs-admin-command>-fs NAMENODE -clrQuota /user/USERNAME/dir1</dfs-admin-command>
  16235. <command>-fs NAMENODE -count -q /user/USERNAME/dir1</command>
  16236. </test-commands>
  16237. <cleanup-commands>
  16238. <command>-fs NAMENODE -rm -r /user/USERNAME</command>
  16239. </cleanup-commands>
  16240. <comparators>
  16241. <comparator>
  16242. <type>RegexpComparator</type>
  16243. <expected-output>( )*none.*/user/USERNAME/dir1</expected-output>
  16244. </comparator>
  16245. </comparators>
  16246. </test>
  16247. <test>
  16248. <description>setSpaceQuota</description>
  16249. <test-commands>
  16250. <command>-fs NAMENODE -mkdir -p /user/USERNAME/dir1</command>
  16251. <dfs-admin-command>-fs NAMENODE -setSpaceQuota 1G /user/USERNAME/dir1</dfs-admin-command>
  16252. </test-commands>
  16253. <cleanup-commands>
  16254. <command>-fs NAMENODE -rm -r /user/USERNAME/dir1</command>
  16255. </cleanup-commands>
  16256. <comparators>
  16257. <comparator>
  16258. <type>ExactComparator</type>
  16259. <expected-output></expected-output>
  16260. </comparator>
  16261. </comparators>
  16262. </test>
  16263. <test>
  16264. <description>setBalancerBandwidth</description>
  16265. <test-commands>
  16266. <dfs-admin-command>-fs NAMENODE -setBalancerBandwidth 104857600</dfs-admin-command>
  16267. </test-commands>
  16268. <cleanup-commands>
  16269. <command></command>
  16270. </cleanup-commands>
  16271. <comparators>
  16272. <comparator>
  16273. <type>RegexpComparator</type>
  16274. <expected-output>Balancer bandwidth is set to 104857600(\n)*</expected-output>
  16275. </comparator>
  16276. </comparators>
  16277. </test>
  16278. <test>
  16279. <description>finalizeUpgrade</description>
  16280. <test-commands>
  16281. <dfs-admin-command>-fs NAMENODE -finalizeUpgrade</dfs-admin-command>
  16282. </test-commands>
  16283. <cleanup-commands>
  16284. <command></command>
  16285. </cleanup-commands>
  16286. <comparators>
  16287. <comparator>
  16288. <type>SubstringComparator</type>
  16289. <expected-output>Finalize upgrade successful</expected-output>
  16290. </comparator>
  16291. </comparators>
  16292. </test>
  16293. <!-- Tests for moveFromLocal -->
  16294. <test> <!-- TESTED -->
  16295. <description>moveFromLocal: moving non existent file(absolute path)</description>
  16296. <test-commands>
  16297. <command>-fs NAMENODE -mkdir -p /user/USERNAME/dir</command>
  16298. <command>-fs NAMENODE -moveFromLocal /user/wrongdata /user/USERNAME/dir</command>
  16299. </test-commands>
  16300. <cleanup-commands>
  16301. <command>-fs NAMENODE -rm -r /user/USERNAME</command>
  16302. </cleanup-commands>
  16303. <comparators>
  16304. <comparator>
  16305. <type>TokenComparator</type>
  16306. <expected-output>moveFromLocal: `/user/wrongdata': No such file or directory</expected-output>
  16307. </comparator>
  16308. </comparators>
  16309. </test>
  16310. <test> <!-- TESTED -->
  16311. <description>moveFromLocal: moving non existent file(relative path)</description>
  16312. <test-commands>
  16313. <command>-fs NAMENODE -mkdir -p /user/USERNAME/dir</command> <!-- make sure user home dir exists -->
  16314. <command>-fs NAMENODE -moveFromLocal wrongdata /user/USERNAME/dir</command>
  16315. </test-commands>
  16316. <cleanup-commands>
  16317. <command>-fs NAMENODE -rm -r /user/USERNAME</command>
  16318. </cleanup-commands>
  16319. <comparators>
  16320. <comparator>
  16321. <type>TokenComparator</type>
  16322. <expected-output>moveFromLocal: `wrongdata': No such file or directory</expected-output>
  16323. </comparator>
  16324. </comparators>
  16325. </test>
  16326. <test> <!-- TESTED -->
  16327. <description>moveFromLocal: moving many files into an existing file</description>
  16328. <test-commands>
  16329. <command>-fs NAMENODE -cp CLITEST_DATA/data15bytes data15bytes</command>
  16330. <command>-fs NAMENODE -cp CLITEST_DATA/data30bytes data30bytes</command>
  16331. <command>-fs NAMENODE -mkdir -p /user/USERNAME/dir</command>
  16332. <command>-fs NAMENODE -touchz /user/USERNAME/dir/file0</command>
  16333. <command>-fs NAMENODE -moveFromLocal data15bytes data30bytes /user/USERNAME/dir/file0</command>
  16334. </test-commands>
  16335. <cleanup-commands>
  16336. <command>-fs NAMENODE -rm -r /user/USERNAME</command>
  16337. </cleanup-commands>
  16338. <comparators>
  16339. <comparator>
  16340. <type>RegexpComparator</type>
  16341. <expected-output>moveFromLocal: `/user/USERNAME/dir/file0': Is not a directory</expected-output>
  16342. </comparator>
  16343. </comparators>
  16344. </test>
  16345. <test> <!-- TESTED -->
  16346. <description>moveFromLocal: moving many files into a non existent directory</description>
  16347. <test-commands>
  16348. <command>-fs NAMENODE -cp CLITEST_DATA/data15bytes data15bytes</command>
  16349. <command>-fs NAMENODE -cp CLITEST_DATA/data30bytes data30bytes</command>
  16350. <command>-fs NAMENODE -moveFromLocal data15bytes data30bytes /user/USERNAME/dir/wrongdir</command>
  16351. </test-commands>
  16352. <cleanup-commands>
  16353. <command>-fs NAMENODE -rm -r /user/USERNAME</command>
  16354. </cleanup-commands>
  16355. <comparators>
  16356. <comparator>
  16357. <type>RegexpComparator</type>
  16358. <expected-output>^moveFromLocal: `/user/USERNAME/dir/wrongdir': No such file or directory</expected-output>
  16359. </comparator>
  16360. </comparators>
  16361. </test>
  16362. <test> <!-- TESTED -->
  16363. <description>moveFromLocal: Test for hdfs:// path - moving non existent file</description>
  16364. <test-commands>
  16365. <command>-fs NAMENODE -mkdir -p /user/USERNAME/dir</command>
  16366. <command>-fs NAMENODE -moveFromLocal /user/wrongdata hdfs:///user/USERNAME/dir/file</command>
  16367. </test-commands>
  16368. <cleanup-commands>
  16369. <command>-fs NAMENODE -rm -r hdfs:///*</command>
  16370. </cleanup-commands>
  16371. <comparators>
  16372. <comparator>
  16373. <type>TokenComparator</type>
  16374. <expected-output>moveFromLocal: `/user/wrongdata': No such file or directory</expected-output>
  16375. </comparator>
  16376. </comparators>
  16377. </test>
  16378. <test> <!-- TESTED -->
  16379. <description>moveFromLocal: Test for hdfs:// path - moving many files into an existing file</description>
  16380. <test-commands>
  16381. <command>-fs NAMENODE -cp CLITEST_DATA/data15bytes data15bytes</command>
  16382. <command>-fs NAMENODE -cp CLITEST_DATA/data30bytes data30bytes</command>
  16383. <command>-fs NAMENODE -mkdir -p /user/USERNAME/dir</command>
  16384. <command>-fs NAMENODE -touchz hdfs:///user/USERNAME/dir/file</command>
  16385. <command>-fs NAMENODE -moveFromLocal data15bytes data30bytes hdfs:///user/USERNAME/dir/file</command>
  16386. </test-commands>
  16387. <cleanup-commands>
  16388. <command>-fs NAMENODE -rm -r hdfs:///*</command>
  16389. </cleanup-commands>
  16390. <comparators>
  16391. <comparator>
  16392. <type>RegexpComparator</type>
  16393. <expected-output>moveFromLocal: `hdfs:///user/USERNAME/dir/file': Is not a directory</expected-output>
  16394. </comparator>
  16395. </comparators>
  16396. </test>
  16397. <test> <!-- TESTED -->
  16398. <description>moveFromLocal: Test for hdfs:// path - moving many files into a non existent directory</description>
  16399. <test-commands>
  16400. <command>-fs NAMENODE -cp CLITEST_DATA/data15bytes data15bytes</command>
  16401. <command>-fs NAMENODE -cp CLITEST_DATA/data30bytes data30bytes</command>
  16402. <command>-fs NAMENODE -moveFromLocal data15bytes data30bytes hdfs:///user/USERNAME/dir/wrongdir</command>
  16403. </test-commands>
  16404. <cleanup-commands>
  16405. <command>-fs NAMENODE -rm -r hdfs:///*</command>
  16406. </cleanup-commands>
  16407. <comparators>
  16408. <comparator>
  16409. <type>RegexpComparator</type>
  16410. <expected-output>moveFromLocal: `hdfs:///user/USERNAME/dir/wrongdir': No such file or directory</expected-output>
  16411. </comparator>
  16412. </comparators>
  16413. </test>
  16414. <test> <!-- TESTED -->
  16415. <description>moveFromLocal: Test for Namenode's path - moving non existent file</description>
  16416. <test-commands>
  16417. <command>-fs NAMENODE -mkdir -p NAMENODE/user/USERNAME/dir</command>
  16418. <command>-fs NAMENODE -moveFromLocal /user/wrongdata NAMENODE/user/USERNAME/dir</command>
  16419. </test-commands>
  16420. <cleanup-commands>
  16421. <command>-fs NAMENODE -rm -r NAMENODE/*</command>
  16422. </cleanup-commands>
  16423. <comparators>
  16424. <comparator>
  16425. <type>TokenComparator</type>
  16426. <expected-output>moveFromLocal: `/user/wrongdata': No such file or directory</expected-output>
  16427. </comparator>
  16428. </comparators>
  16429. </test>
  16430. <test> <!-- TESTED -->
  16431. <description>moveFromLocal: Test for Namenode's path - moving many files into an existing file</description>
  16432. <test-commands>
  16433. <command>-fs NAMENODE -mkdir -p NAMENODE/user/USERNAME/dir</command>
  16434. <command>-fs NAMENODE -touchz NAMENODE/user/USERNAME/dir/file0</command>
  16435. <command>-fs NAMENODE -cp CLITEST_DATA/data15bytes data15bytes</command>
  16436. <command>-fs NAMENODE -cp CLITEST_DATA/data30bytes data30bytes</command>
  16437. <command>-fs NAMENODE -moveFromLocal data15bytes data30bytes NAMENODE/user/USERNAME/dir/file0</command>
  16438. </test-commands>
  16439. <cleanup-commands>
  16440. <command>-fs NAMENODE -rm -r NAMENODE/*</command>
  16441. </cleanup-commands>
  16442. <comparators>
  16443. <comparator>
  16444. <type>RegexpComparator</type>
  16445. <expected-output>moveFromLocal: `hdfs://\w+[-.a-z0-9]*:[0-9]+/user/USERNAME/dir/file0': Is not a directory</expected-output>
  16446. </comparator>
  16447. </comparators>
  16448. </test>
  16449. <test> <!-- TESTED -->
  16450. <description>moveFromLocal: Test for Namenode's path - moving many files into a non existent directory</description>
  16451. <test-commands>
  16452. <command>-fs NAMENODE -mkdir -p NAMENODE/user/USERNAME</command>
  16453. <command>-fs NAMENODE -touchz NAMENODE/user/USERNAME/dir/file0</command>
  16454. <command>-fs NAMENODE -cp CLITEST_DATA/data15bytes data15bytes</command>
  16455. <command>-fs NAMENODE -cp CLITEST_DATA/data30bytes data30bytes</command>
  16456. <command>-fs NAMENODE -moveFromLocal data15bytes data30bytes NAMENODE/user/USERNAME/wrongdir</command>
  16457. </test-commands>
  16458. <cleanup-commands>
  16459. <command>-fs NAMENODE -rm -r NAMENODE/*</command>
  16460. </cleanup-commands>
  16461. <comparators>
  16462. <comparator>
  16463. <type>RegexpComparator</type>
  16464. <expected-output>moveFromLocal: `hdfs://\w+[-.a-z0-9]*:[0-9]+/user/USERNAME/wrongdir': No such file or directory</expected-output>
  16465. </comparator>
  16466. </comparators>
  16467. </test>
  16468. <test> <!--Tested -->
  16469. <description>Verifying chmod operation is not permitted in safemode</description>
  16470. <test-commands>
  16471. <command>-fs NAMENODE -mkdir /test </command>
  16472. <command>-fs NAMENODE -touchz /test/file1 </command>
  16473. <dfs-admin-command>-fs NAMENODE -safemode enter </dfs-admin-command>
  16474. <command>-fs NAMENODE -chmod 777 /test/file1 </command>
  16475. </test-commands>
  16476. <cleanup-commands>
  16477. <dfs-admin-command>-fs NAMENODE -safemode leave </dfs-admin-command>
  16478. <dfs-admin-command>-fs NAMENODE -rm -r /test </dfs-admin-command>
  16479. </cleanup-commands>
  16480. <comparators>
  16481. <comparator>
  16482. <type>SubstringComparator</type>
  16483. <expected-output>Cannot set permission for /test/file1. Name node is in safe mode.</expected-output>
  16484. </comparator>
  16485. </comparators>
  16486. </test>
  16487. <test> <!--Tested -->
  16488. <description>Verifying chown operation is not permitted in safemode</description>
  16489. <test-commands>
  16490. <command>-fs NAMENODE -mkdir /test </command>
  16491. <command>-fs NAMENODE -touchz /test/file1 </command>
  16492. <dfs-admin-command>-fs NAMENODE -safemode enter </dfs-admin-command>
  16493. <command>-fs NAMENODE -chown newgroup /test/file1 </command>
  16494. </test-commands>
  16495. <cleanup-commands>
  16496. <dfs-admin-command>-fs NAMENODE -safemode leave </dfs-admin-command>
  16497. <dfs-admin-command>-fs NAMENODE -rm -r /test </dfs-admin-command>
  16498. </cleanup-commands>
  16499. <comparators>
  16500. <comparator>
  16501. <type>SubstringComparator</type>
  16502. <expected-output>Cannot set owner for /test/file1. Name node is in safe mode.</expected-output>
  16503. </comparator>
  16504. </comparators>
  16505. </test>
  16506. <test> <!--Tested -->
  16507. <description>Verifying chgrp operation is not permitted in safemode</description>
  16508. <test-commands>
  16509. <command>-fs NAMENODE -mkdir /test </command>
  16510. <command>-fs NAMENODE -touchz /test/file1 </command>
  16511. <dfs-admin-command>-fs NAMENODE -safemode enter </dfs-admin-command>
  16512. <command>-fs NAMENODE -chgrp newgroup /test/file1 </command>
  16513. </test-commands>
  16514. <cleanup-commands>
  16515. <dfs-admin-command>-fs NAMENODE -safemode leave </dfs-admin-command>
  16516. <dfs-admin-command>-fs NAMENODE -rm -r /test </dfs-admin-command>
  16517. </cleanup-commands>
  16518. <comparators>
  16519. <comparator>
  16520. <type>SubstringComparator</type>
  16521. <expected-output>Cannot set owner for /test/file1. Name node is in safe mode.</expected-output>
  16522. </comparator>
  16523. </comparators>
  16524. </test>
  16525. <test> <!--Tested -->
  16526. <description>Verifying setQuota operation is not permitted in safemode</description>
  16527. <test-commands>
  16528. <command>-fs NAMENODE -mkdir /test </command>
  16529. <dfs-admin-command>-fs NAMENODE -safemode enter </dfs-admin-command>
  16530. <dfs-admin-command>-fs NAMENODE -setQuota 100 /test </dfs-admin-command>
  16531. </test-commands>
  16532. <cleanup-commands>
  16533. <dfs-admin-command>-fs NAMENODE -safemode leave </dfs-admin-command>
  16534. <dfs-admin-command>-fs NAMENODE -rm -r /test </dfs-admin-command>
  16535. </cleanup-commands>
  16536. <comparators>
  16537. <comparator>
  16538. <type>SubstringComparator</type>
  16539. <expected-output>setQuota: Cannot set quota on /test. Name node is in safe mode.</expected-output>
  16540. </comparator>
  16541. </comparators>
  16542. </test>
  16543. <test> <!--Tested -->
  16544. <description>Verifying clrQuota operation is not permitted in safemode</description>
  16545. <test-commands>
  16546. <command>-fs NAMENODE -mkdir /test </command>
  16547. <dfs-admin-command>-fs NAMENODE -safemode enter </dfs-admin-command>
  16548. <dfs-admin-command>-fs NAMENODE -clrQuota /test </dfs-admin-command>
  16549. </test-commands>
  16550. <cleanup-commands>
  16551. <dfs-admin-command>-fs NAMENODE -safemode leave </dfs-admin-command>
  16552. <dfs-admin-command>-fs NAMENODE -rm -r /test </dfs-admin-command>
  16553. </cleanup-commands>
  16554. <comparators>
  16555. <comparator>
  16556. <type>SubstringComparator</type>
  16557. <expected-output>clrQuota: Cannot set quota on /test. Name node is in safe mode.</expected-output>
  16558. </comparator>
  16559. </comparators>
  16560. </test>
  16561. <test> <!--Tested -->
  16562. <description>Verifying setSpaceQuota operation is not permitted in safemode</description>
  16563. <test-commands>
  16564. <command>-fs NAMENODE -mkdir /test </command>
  16565. <dfs-admin-command>-fs NAMENODE -safemode enter </dfs-admin-command>
  16566. <dfs-admin-command>-fs NAMENODE -setSpaceQuota 100 /test </dfs-admin-command>
  16567. </test-commands>
  16568. <cleanup-commands>
  16569. <dfs-admin-command>-fs NAMENODE -safemode leave </dfs-admin-command>
  16570. <dfs-admin-command>-fs NAMENODE -rm -r /test </dfs-admin-command>
  16571. </cleanup-commands>
  16572. <comparators>
  16573. <comparator>
  16574. <type>SubstringComparator</type>
  16575. <expected-output>setSpaceQuota: Cannot set quota on /test. Name node is in safe mode.</expected-output>
  16576. </comparator>
  16577. </comparators>
  16578. </test>
  16579. <test> <!--Tested -->
  16580. <description>Verifying clrSpaceQuota operation is not permitted in safemode</description>
  16581. <test-commands>
  16582. <command>-fs NAMENODE -mkdir /test </command>
  16583. <dfs-admin-command>-fs NAMENODE -safemode enter </dfs-admin-command>
  16584. <dfs-admin-command>-fs NAMENODE -clrSpaceQuota /test </dfs-admin-command>
  16585. </test-commands>
  16586. <cleanup-commands>
  16587. <dfs-admin-command>-fs NAMENODE -safemode leave </dfs-admin-command>
  16588. <dfs-admin-command>-fs NAMENODE -rm -r /test </dfs-admin-command>
  16589. </cleanup-commands>
  16590. <comparators>
  16591. <comparator>
  16592. <type>SubstringComparator</type>
  16593. <expected-output>clrSpaceQuota: Cannot set quota on /test. Name node is in safe mode.</expected-output>
  16594. </comparator>
  16595. </comparators>
  16596. </test>
  16597. <!-- Tests for find -->
  16598. <test> <!-- TESTED -->
  16599. <description>find: default expression</description>
  16600. <test-commands>
  16601. <command>-fs NAMENODE -mkdir /donotfind</command>
  16602. <command>-fs NAMENODE -mkdir donotfind</command>
  16603. <command>-fs NAMENODE -mkdir /findtest</command>
  16604. <command>-fs NAMENODE -mkdir /findtest/item1</command>
  16605. <command>-fs NAMENODE -mkdir /findtest/item1/item1a</command>
  16606. <command>-fs NAMENODE -touchz /findtest/item1/item1a/item1aa</command>
  16607. <command>-fs NAMENODE -put CLITEST_DATA/data60bytes /findtest/item1/item1b</command>
  16608. <command>-fs NAMENODE -put CLITEST_DATA/data60bytes /findtest/item2</command>
  16609. <command>-fs NAMENODE -mkdir /findtest/item3</command>
  16610. <command>-fs NAMENODE -mkdir /findtest/item4</command>
  16611. <command>-fs NAMENODE -mkdir /findtest/item4/item4a</command>
  16612. <command>-fs NAMENODE -put CLITEST_DATA/data120bytes /findtest/item4/item4b</command>
  16613. <command>-fs NAMENODE -put CLITEST_DATA/data1k /findtest/item5</command>
  16614. <command>-fs NAMENODE -find /findtest</command>
  16615. </test-commands>
  16616. <cleanup-commands>
  16617. <command>-fs NAMENODE -rm -r /donotfind</command>
  16618. <command>-fs NAMENODE -rm -r donotfind</command>
  16619. <command>-fs NAMENODE -rm -r /findtest</command>
  16620. </cleanup-commands>
  16621. <comparators>
  16622. <comparator>
  16623. <type>RegexpAcrossOutputComparator</type>
  16624. <expected-output>^/findtest
  16625. /findtest/item1
  16626. /findtest/item1/item1a
  16627. /findtest/item1/item1a/item1aa
  16628. /findtest/item1/item1b
  16629. /findtest/item2
  16630. /findtest/item3
  16631. /findtest/item4
  16632. /findtest/item4/item4a
  16633. /findtest/item4/item4b
  16634. /findtest/item5
  16635. $</expected-output>
  16636. </comparator>
  16637. </comparators>
  16638. </test>
  16639. <test> <!-- TESTED -->
  16640. <description>find: -print </description>
  16641. <test-commands>
  16642. <command>-fs NAMENODE -mkdir /donotfind</command>
  16643. <command>-fs NAMENODE -mkdir donotfind</command>
  16644. <command>-fs NAMENODE -mkdir /findtest</command>
  16645. <command>-fs NAMENODE -mkdir /findtest/item1</command>
  16646. <command>-fs NAMENODE -mkdir /findtest/item1/item1a</command>
  16647. <command>-fs NAMENODE -touchz /findtest/item1/item1a/item1aa</command>
  16648. <command>-fs NAMENODE -put CLITEST_DATA/data60bytes /findtest/item1/item1b</command>
  16649. <command>-fs NAMENODE -put CLITEST_DATA/data60bytes /findtest/item2</command>
  16650. <command>-fs NAMENODE -mkdir /findtest/item3</command>
  16651. <command>-fs NAMENODE -mkdir /findtest/item4</command>
  16652. <command>-fs NAMENODE -mkdir /findtest/item4/item4a</command>
  16653. <command>-fs NAMENODE -put CLITEST_DATA/data120bytes /findtest/item4/item4b</command>
  16654. <command>-fs NAMENODE -put CLITEST_DATA/data1k /findtest/item5</command>
  16655. <command>-fs NAMENODE -find /findtest -print</command>
  16656. </test-commands>
  16657. <cleanup-commands>
  16658. <command>-fs NAMENODE -rm -r /donotfind</command>
  16659. <command>-fs NAMENODE -rm -r donotfind</command>
  16660. <command>-fs NAMENODE -rm -r /findtest</command>
  16661. </cleanup-commands>
  16662. <comparators>
  16663. <comparator>
  16664. <type>RegexpAcrossOutputComparator</type>
  16665. <expected-output>^/findtest
  16666. /findtest/item1
  16667. /findtest/item1/item1a
  16668. /findtest/item1/item1a/item1aa
  16669. /findtest/item1/item1b
  16670. /findtest/item2
  16671. /findtest/item3
  16672. /findtest/item4
  16673. /findtest/item4/item4a
  16674. /findtest/item4/item4b
  16675. /findtest/item5
  16676. $</expected-output>
  16677. </comparator>
  16678. </comparators>
  16679. </test>
  16680. <test> <!-- TESTED -->
  16681. <description>find: -print (relative path) </description>
  16682. <test-commands>
  16683. <command>-fs NAMENODE -mkdir /donotfind</command>
  16684. <command>-fs NAMENODE -mkdir -p donotfind</command>
  16685. <command>-fs NAMENODE -mkdir -p findtest</command>
  16686. <command>-fs NAMENODE -mkdir -p findtest/item1</command>
  16687. <command>-fs NAMENODE -mkdir -p findtest/item1/item1a</command>
  16688. <command>-fs NAMENODE -touchz findtest/item1/item1a/item1aa</command>
  16689. <command>-fs NAMENODE -put CLITEST_DATA/data60bytes findtest/item1/item1b</command>
  16690. <command>-fs NAMENODE -put CLITEST_DATA/data60bytes findtest/item2</command>
  16691. <command>-fs NAMENODE -mkdir -p findtest/item3</command>
  16692. <command>-fs NAMENODE -mkdir -p findtest/item4</command>
  16693. <command>-fs NAMENODE -mkdir -p findtest/item4/item4a</command>
  16694. <command>-fs NAMENODE -put CLITEST_DATA/data120bytes findtest/item4/item4b</command>
  16695. <command>-fs NAMENODE -put CLITEST_DATA/data1k findtest/item5</command>
  16696. <command>-fs NAMENODE -find findtest -print</command>
  16697. </test-commands>
  16698. <cleanup-commands>
  16699. <command>-fs NAMENODE -rm -r /donotfind</command>
  16700. <command>-fs NAMENODE -rm -r donotfind</command>
  16701. <command>-fs NAMENODE -rm -r findtest</command>
  16702. </cleanup-commands>
  16703. <comparators>
  16704. <comparator>
  16705. <type>RegexpAcrossOutputComparator</type>
  16706. <expected-output>^findtest
  16707. findtest/item1
  16708. findtest/item1/item1a
  16709. findtest/item1/item1a/item1aa
  16710. findtest/item1/item1b
  16711. findtest/item2
  16712. findtest/item3
  16713. findtest/item4
  16714. findtest/item4/item4a
  16715. findtest/item4/item4b
  16716. findtest/item5
  16717. $</expected-output>
  16718. </comparator>
  16719. </comparators>
  16720. </test>
  16721. <test> <!-- TESTED -->
  16722. <description>find: -print (cwd) </description>
  16723. <test-commands>
  16724. <command>-fs NAMENODE -mkdir /donotfind</command>
  16725. <command>-fs NAMENODE -mkdir findtest</command>
  16726. <command>-fs NAMENODE -mkdir findtest/item1</command>
  16727. <command>-fs NAMENODE -mkdir findtest/item1/item1a</command>
  16728. <command>-fs NAMENODE -touchz findtest/item1/item1a/item1aa</command>
  16729. <command>-fs NAMENODE -put CLITEST_DATA/data60bytes findtest/item1/item1b</command>
  16730. <command>-fs NAMENODE -put CLITEST_DATA/data60bytes findtest/item2</command>
  16731. <command>-fs NAMENODE -mkdir findtest/item3</command>
  16732. <command>-fs NAMENODE -mkdir findtest/item4</command>
  16733. <command>-fs NAMENODE -mkdir findtest/item4/item4a</command>
  16734. <command>-fs NAMENODE -put CLITEST_DATA/data120bytes findtest/item4/item4b</command>
  16735. <command>-fs NAMENODE -put CLITEST_DATA/data1k findtest/item5</command>
  16736. <command>-fs NAMENODE -find -print</command>
  16737. </test-commands>
  16738. <cleanup-commands>
  16739. <command>-fs NAMENODE -rm -r findtest</command>
  16740. <command>-fs NAMENODE -rm -r /donotfind</command>
  16741. </cleanup-commands>
  16742. <comparators>
  16743. <comparator>
  16744. <type>RegexpAcrossOutputComparator</type>
  16745. <expected-output>^.
  16746. findtest
  16747. findtest/item1
  16748. findtest/item1/item1a
  16749. findtest/item1/item1a/item1aa
  16750. findtest/item1/item1b
  16751. findtest/item2
  16752. findtest/item3
  16753. findtest/item4
  16754. findtest/item4/item4a
  16755. findtest/item4/item4b
  16756. findtest/item5
  16757. $</expected-output>
  16758. </comparator>
  16759. </comparators>
  16760. </test>
  16761. <test> <!-- TESTED -->
  16762. <description>find: -name </description>
  16763. <test-commands>
  16764. <command>-fs NAMENODE -mkdir /findtest</command>
  16765. <command>-fs NAMENODE -mkdir /findtest/item1</command>
  16766. <command>-fs NAMENODE -mkdir /findtest/item1/item1a</command>
  16767. <command>-fs NAMENODE -touchz /findtest/item1/item1a/item1aa</command>
  16768. <command>-fs NAMENODE -put CLITEST_DATA/data60bytes /findtest/item1/item1b</command>
  16769. <command>-fs NAMENODE -put CLITEST_DATA/data60bytes /findtest/item2</command>
  16770. <command>-fs NAMENODE -mkdir /findtest/item3</command>
  16771. <command>-fs NAMENODE -mkdir /findtest/item4</command>
  16772. <command>-fs NAMENODE -mkdir /findtest/item4/item4a</command>
  16773. <command>-fs NAMENODE -put CLITEST_DATA/data120bytes /findtest/item4/item4b</command>
  16774. <command>-fs NAMENODE -put CLITEST_DATA/data1k /findtest/item5</command>
  16775. <command>-fs NAMENODE -find /findtest -name item*a</command>
  16776. </test-commands>
  16777. <cleanup-commands>
  16778. <command>-fs NAMENODE -rm -r /findtest</command>
  16779. </cleanup-commands>
  16780. <comparators>
  16781. <comparator>
  16782. <type>RegexpAcrossOutputComparator</type>
  16783. <expected-output>^/findtest/item1/item1a
  16784. /findtest/item1/item1a/item1aa
  16785. /findtest/item4/item4a
  16786. $</expected-output>
  16787. </comparator>
  16788. </comparators>
  16789. </test>
  16790. <test> <!-- TESTED -->
  16791. <description>find: -iname </description>
  16792. <test-commands>
  16793. <command>-fs NAMENODE -mkdir /findtest</command>
  16794. <command>-fs NAMENODE -mkdir /findtest/item1</command>
  16795. <command>-fs NAMENODE -mkdir /findtest/item1/item1a</command>
  16796. <command>-fs NAMENODE -touchz /findtest/item1/item1a/item1aa</command>
  16797. <command>-fs NAMENODE -put CLITEST_DATA/data60bytes /findtest/item1/item1b</command>
  16798. <command>-fs NAMENODE -put CLITEST_DATA/data60bytes /findtest/item2</command>
  16799. <command>-fs NAMENODE -mkdir /findtest/item3</command>
  16800. <command>-fs NAMENODE -mkdir /findtest/item4</command>
  16801. <command>-fs NAMENODE -mkdir /findtest/item4/item4a</command>
  16802. <command>-fs NAMENODE -put CLITEST_DATA/data120bytes /findtest/item4/item4b</command>
  16803. <command>-fs NAMENODE -put CLITEST_DATA/data1k /findtest/item5</command>
  16804. <command>-fs NAMENODE -find /findtest -iname ITEM*a</command>
  16805. </test-commands>
  16806. <cleanup-commands>
  16807. <command>-fs NAMENODE -rm -r /findtest</command>
  16808. </cleanup-commands>
  16809. <comparators>
  16810. <comparator>
  16811. <type>RegexpAcrossOutputComparator</type>
  16812. <expected-output>^/findtest/item1/item1a
  16813. /findtest/item1/item1a/item1aa
  16814. /findtest/item4/item4a
  16815. $</expected-output>
  16816. </comparator>
  16817. </comparators>
  16818. </test>
  16819. <test> <!-- TESTED -->
  16820. <description>truncate to 5 bytes after waiting for block recovery to complete</description>
  16821. <test-commands>
  16822. <command>-fs NAMENODE -mkdir -p /user/USERNAME/dir0</command>
  16823. <command>-fs NAMENODE -put CLITEST_DATA/data120bytes /user/USERNAME/dir0</command>
  16824. <command>-fs NAMENODE -truncate -w 5 /user/USERNAME/dir0/data120bytes</command>
  16825. <command>-fs NAMENODE -cat /user/USERNAME/dir0/data120bytes</command>
  16826. </test-commands>
  16827. <cleanup-commands>
  16828. <command>-fs NAMENODE -rm -r /user/USERNAME/dir0</command>
  16829. </cleanup-commands>
  16830. <comparators>
  16831. <comparator>
  16832. <type>RegexpComparator</type>
  16833. <expected-output>12345</expected-output>
  16834. </comparator>
  16835. </comparators>
  16836. </test>
  16837. <test> <!-- TESTED -->
  16838. <description>truncate to greater length than length of file</description>
  16839. <test-commands>
  16840. <command>-fs NAMENODE -mkdir /user/USERNAME/dir0</command>
  16841. <command>-fs NAMENODE -put CLITEST_DATA/data15bytes /user/USERNAME/dir0</command>
  16842. <command>-fs NAMENODE -truncate -w 50 /user/USERNAME/dir0/data15bytes</command>
  16843. <command>-fs NAMENODE -cat /user/USERNAME/dir0/data15bytes</command>
  16844. </test-commands>
  16845. <cleanup-commands>
  16846. <command>-fs NAMENODE -rm -r /user/USERNAME/dir0</command>
  16847. </cleanup-commands>
  16848. <comparators>
  16849. <comparator>
  16850. <type>RegexpComparator</type>
  16851. <expected-output>12345678901234</expected-output>
  16852. </comparator>
  16853. </comparators>
  16854. </test>
  16855. </tests>
  16856. </configuration>