filextestcontrol.c 215 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547354835493550355135523553355435553556355735583559356035613562356335643565356635673568356935703571357235733574357535763577357835793580358135823583358435853586358735883589359035913592359335943595359635973598359936003601360236033604360536063607360836093610361136123613361436153616361736183619362036213622362336243625362636273628362936303631363236333634363536363637363836393640364136423643364436453646364736483649365036513652365336543655365636573658365936603661366236633664366536663667366836693670367136723673367436753676367736783679368036813682368336843685368636873688368936903691369236933694369536963697369836993700370137023703370437053706370737083709371037113712371337143715371637173718371937203721372237233724372537263727372837293730373137323733373437353736373737383739374037413742374337443745374637473748374937503751375237533754375537563757375837593760376137623763376437653766376737683769377037713772377337743775377637773778377937803781378237833784378537863787378837893790379137923793379437953796379737983799380038013802380338043805380638073808380938103811381238133814381538163817381838193820382138223823382438253826382738283829383038313832383338343835383638373838383938403841384238433844384538463847384838493850385138523853385438553856385738583859386038613862386338643865386638673868386938703871387238733874387538763877387838793880388138823883388438853886388738883889389038913892389338943895389638973898389939003901390239033904390539063907390839093910391139123913391439153916391739183919392039213922392339243925392639273928392939303931393239333934393539363937393839393940394139423943394439453946394739483949395039513952395339543955395639573958395939603961396239633964396539663967396839693970397139723973397439753976397739783979398039813982398339843985398639873988398939903991399239933994399539963997399839994000400140024003400440054006400740084009401040114012401340144015401640174018401940204021402240234024402540264027402840294030403140324033403440354036403740384039404040414042404340444045404640474048404940504051405240534054405540564057405840594060406140624063406440654066406740684069407040714072407340744075407640774078407940804081408240834084408540864087408840894090409140924093409440954096409740984099410041014102410341044105410641074108410941104111411241134114411541164117411841194120412141224123412441254126412741284129413041314132413341344135413641374138413941404141414241434144414541464147414841494150415141524153415441554156415741584159416041614162416341644165416641674168416941704171417241734174417541764177417841794180418141824183418441854186418741884189419041914192419341944195419641974198419942004201420242034204420542064207420842094210421142124213421442154216421742184219422042214222422342244225422642274228422942304231423242334234423542364237423842394240424142424243424442454246424742484249425042514252425342544255425642574258425942604261426242634264426542664267426842694270427142724273427442754276427742784279428042814282428342844285428642874288428942904291429242934294429542964297429842994300430143024303430443054306430743084309431043114312431343144315431643174318431943204321432243234324432543264327432843294330433143324333433443354336433743384339434043414342434343444345434643474348434943504351435243534354435543564357435843594360436143624363436443654366436743684369437043714372437343744375437643774378437943804381438243834384438543864387438843894390439143924393439443954396439743984399440044014402440344044405440644074408440944104411441244134414441544164417441844194420442144224423442444254426442744284429443044314432443344344435443644374438443944404441444244434444444544464447444844494450445144524453445444554456445744584459446044614462446344644465446644674468446944704471447244734474447544764477447844794480448144824483448444854486448744884489449044914492449344944495449644974498449945004501450245034504450545064507450845094510451145124513451445154516451745184519452045214522452345244525452645274528452945304531453245334534453545364537453845394540454145424543454445454546454745484549455045514552455345544555455645574558455945604561456245634564456545664567456845694570457145724573457445754576457745784579458045814582458345844585458645874588458945904591459245934594459545964597459845994600460146024603460446054606460746084609461046114612461346144615461646174618461946204621462246234624462546264627462846294630463146324633463446354636463746384639464046414642464346444645464646474648464946504651465246534654465546564657465846594660466146624663466446654666466746684669467046714672467346744675467646774678467946804681468246834684468546864687468846894690469146924693469446954696469746984699470047014702470347044705470647074708470947104711471247134714471547164717471847194720472147224723472447254726472747284729473047314732473347344735473647374738473947404741474247434744474547464747474847494750475147524753475447554756475747584759476047614762476347644765476647674768476947704771477247734774477547764777477847794780478147824783478447854786478747884789479047914792479347944795479647974798479948004801480248034804480548064807480848094810481148124813481448154816481748184819482048214822482348244825482648274828482948304831483248334834483548364837483848394840484148424843484448454846484748484849485048514852485348544855485648574858485948604861486248634864486548664867486848694870487148724873487448754876487748784879488048814882488348844885488648874888488948904891489248934894489548964897489848994900490149024903490449054906490749084909491049114912491349144915491649174918491949204921492249234924492549264927492849294930493149324933493449354936493749384939494049414942494349444945494649474948494949504951495249534954495549564957495849594960496149624963496449654966496749684969497049714972497349744975497649774978497949804981498249834984498549864987498849894990499149924993499449954996499749984999500050015002500350045005500650075008500950105011501250135014501550165017501850195020502150225023502450255026502750285029503050315032503350345035503650375038503950405041504250435044504550465047504850495050505150525053505450555056505750585059506050615062506350645065506650675068506950705071507250735074507550765077507850795080508150825083508450855086508750885089509050915092509350945095509650975098509951005101510251035104510551065107510851095110511151125113511451155116511751185119512051215122512351245125512651275128512951305131513251335134513551365137513851395140514151425143514451455146514751485149515051515152515351545155515651575158515951605161516251635164516551665167516851695170517151725173517451755176517751785179518051815182518351845185518651875188518951905191519251935194519551965197519851995200520152025203520452055206520752085209521052115212521352145215521652175218521952205221522252235224522552265227522852295230523152325233523452355236523752385239524052415242524352445245524652475248524952505251525252535254525552565257525852595260526152625263526452655266526752685269527052715272527352745275527652775278527952805281528252835284528552865287528852895290529152925293529452955296529752985299530053015302530353045305530653075308530953105311531253135314531553165317531853195320532153225323532453255326532753285329533053315332533353345335533653375338533953405341534253435344534553465347534853495350535153525353535453555356535753585359536053615362536353645365536653675368536953705371537253735374537553765377537853795380538153825383538453855386538753885389539053915392539353945395539653975398539954005401540254035404540554065407540854095410541154125413541454155416541754185419542054215422542354245425542654275428542954305431543254335434543554365437543854395440544154425443544454455446544754485449545054515452545354545455545654575458545954605461546254635464546554665467546854695470547154725473547454755476547754785479548054815482548354845485548654875488548954905491549254935494549554965497549854995500550155025503550455055506550755085509551055115512551355145515551655175518551955205521552255235524552555265527552855295530553155325533553455355536553755385539554055415542554355445545554655475548554955505551555255535554555555565557555855595560556155625563556455655566556755685569557055715572557355745575557655775578557955805581558255835584558555865587558855895590559155925593559455955596559755985599560056015602560356045605560656075608560956105611561256135614561556165617561856195620562156225623562456255626562756285629563056315632563356345635563656375638563956405641564256435644564556465647564856495650565156525653565456555656565756585659566056615662566356645665566656675668566956705671567256735674567556765677567856795680568156825683568456855686568756885689569056915692569356945695569656975698569957005701570257035704570557065707570857095710571157125713571457155716571757185719572057215722572357245725572657275728572957305731573257335734573557365737573857395740574157425743574457455746574757485749575057515752575357545755575657575758575957605761576257635764576557665767576857695770577157725773577457755776577757785779578057815782578357845785578657875788578957905791579257935794579557965797579857995800580158025803580458055806580758085809581058115812581358145815581658175818581958205821582258235824582558265827582858295830583158325833583458355836583758385839584058415842584358445845584658475848584958505851585258535854585558565857585858595860586158625863586458655866586758685869587058715872587358745875587658775878587958805881588258835884588558865887588858895890589158925893589458955896589758985899590059015902590359045905590659075908590959105911591259135914591559165917591859195920592159225923592459255926592759285929593059315932593359345935593659375938593959405941594259435944594559465947594859495950595159525953595459555956595759585959596059615962596359645965596659675968596959705971597259735974597559765977597859795980598159825983598459855986598759885989599059915992599359945995599659975998599960006001600260036004600560066007600860096010601160126013601460156016601760186019602060216022602360246025602660276028602960306031603260336034603560366037603860396040604160426043604460456046604760486049605060516052605360546055605660576058605960606061606260636064606560666067606860696070607160726073607460756076607760786079608060816082608360846085608660876088608960906091609260936094609560966097609860996100610161026103610461056106610761086109611061116112611361146115611661176118611961206121612261236124612561266127612861296130613161326133613461356136613761386139614061416142614361446145614661476148614961506151615261536154615561566157615861596160616161626163616461656166616761686169617061716172617361746175617661776178617961806181618261836184618561866187618861896190619161926193619461956196619761986199620062016202620362046205620662076208620962106211621262136214621562166217621862196220622162226223622462256226622762286229623062316232623362346235623662376238623962406241624262436244624562466247624862496250625162526253625462556256625762586259626062616262626362646265626662676268626962706271627262736274627562766277627862796280628162826283628462856286628762886289629062916292629362946295629662976298629963006301630263036304630563066307630863096310631163126313631463156316631763186319632063216322632363246325632663276328632963306331633263336334633563366337633863396340634163426343634463456346634763486349635063516352635363546355635663576358635963606361636263636364636563666367636863696370637163726373637463756376637763786379638063816382638363846385638663876388638963906391639263936394639563966397639863996400640164026403640464056406640764086409641064116412641364146415641664176418641964206421642264236424642564266427642864296430643164326433643464356436643764386439644064416442644364446445644664476448644964506451645264536454645564566457645864596460646164626463646464656466646764686469647064716472647364746475647664776478647964806481648264836484648564866487648864896490649164926493649464956496649764986499650065016502650365046505650665076508650965106511651265136514651565166517651865196520652165226523652465256526652765286529653065316532653365346535653665376538653965406541654265436544654565466547654865496550655165526553655465556556
  1. /* This is the test control routine for the FileX FAT file system. All tests are dispatched from this routine. */
  2. #ifndef FX_STANDALONE_ENABLE
  3. #include "tx_api.h"
  4. #else
  5. #include <pthread.h>
  6. #endif
  7. #include "fx_api.h"
  8. #include "fx_file.h"
  9. #include "fx_directory.h"
  10. #include "fx_fault_tolerant.h"
  11. #include "fx_media.h"
  12. #include "fx_system.h"
  13. #include "fx_unicode.h"
  14. #include <stdio.h>
  15. #include <stdlib.h>
  16. #if defined(EXPECTED_MAJOR_VERSION) && (!defined(FILEX_MAJOR_VERSION) || FILEX_MAJOR_VERSION != EXPECTED_MAJOR_VERSION)
  17. #error "FILEX_MAJOR_VERSION"
  18. #endif /* Check FILEX_MAJOR_VERSION */
  19. #if defined(EXPECTED_MINOR_VERSION) && (!defined(FILEX_MINOR_VERSION) || FILEX_MINOR_VERSION != EXPECTED_MINOR_VERSION)
  20. #error "FILEX_MINOR_VERSION"
  21. #endif /* Check FILEX_MINOR_VERSION */
  22. #define TEST_STACK_SIZE 8192 * 2
  23. #ifndef TEST_TIMEOUT_BASE
  24. #define TEST_TIMEOUT_BASE 1
  25. #endif
  26. /* 1 minute. */
  27. #define TEST_TIMEOUT_LOW (6000 * TEST_TIMEOUT_BASE)
  28. /* 15 minutes. */
  29. #define TEST_TIMEOUT_MID (90000 * TEST_TIMEOUT_BASE)
  30. /* 60 minutes. */
  31. #define TEST_TIMEOUT_HIGH (360000 * TEST_TIMEOUT_BASE * 12)
  32. #ifdef FX_ENABLE_FAULT_TOLERANT
  33. /* buffer for fault tolerant */
  34. #define FAULT_TOLERANT_SIZE FX_FAULT_TOLERANT_MINIMAL_BUFFER_SIZE
  35. #else
  36. #define FAULT_TOLERANT_SIZE 0
  37. #endif
  38. /* Define the test control ThreadX objects... */
  39. #ifndef FX_STANDALONE_ENABLE
  40. TX_THREAD test_control_thread;
  41. #ifndef TEST_TIMEOUT_DISABLE
  42. TX_SEMAPHORE test_control_sema;
  43. UCHAR test_control_thread_stack[TEST_STACK_SIZE];
  44. #endif
  45. #endif
  46. #ifdef FX_STANDALONE_ENABLE
  47. void tx_application_define(void *first_unused_memory);
  48. #define tx_kernel_enter() tx_application_define(0);
  49. #endif
  50. /* Define the test control global variables. */
  51. ULONG test_control_return_status;
  52. ULONG test_control_successful_tests;
  53. ULONG test_control_failed_tests;
  54. ULONG test_control_na_tests;
  55. /* Remember the start of free memory. */
  56. //static ULONG test_memory_space[1024 * 1024];
  57. ULONG test_memory_space[10000000];
  58. UCHAR *test_free_memory_ptr = (UCHAR*)test_memory_space;
  59. #ifndef FX_STANDALONE_ENABLE
  60. extern volatile UINT _tx_thread_preempt_disable;
  61. extern volatile ULONG _tx_thread_system_state;
  62. extern TX_THREAD *_tx_thread_current_ptr;
  63. extern TX_THREAD _tx_timer_thread;
  64. #endif
  65. /* Define test entry pointer type. */
  66. typedef struct TEST_ENTRY_STRUCT
  67. {
  68. VOID (*test_entry)(void *);
  69. UINT timeout;
  70. } TEST_ENTRY;
  71. /* Define the prototypes for the test entry points. */
  72. void filex_fault_tolerant_corrupted_log_file_test_application_define(void *);
  73. void filex_fault_tolerant_enable_test_application_define(void *);
  74. void filex_fault_tolerant_enable_1_test_application_define(void *first_unused_memory);
  75. void filex_fault_tolerant_enable_2_test_application_define(void *first_unused_memory);
  76. void filex_fault_tolerant_enable_3_test_application_define(void *first_unused_memory);
  77. void filex_fault_tolerant_enable_4_test_application_define(void *first_unused_memory);
  78. void filex_fault_tolerant_media_check_application_define(void *);
  79. void filex_fault_tolerant_media_full_test_application_define(void *);
  80. void filex_fault_tolerant_loop_write_data_test_application_define(void *);
  81. void filex_fault_tolerant_file_seek_test_application_define(void *);
  82. void filex_fault_tolerant_file_random_seek_test_application_define(void *);
  83. void filex_fault_tolerant_file_write_available_test_application_define(void *);
  84. void filex_fault_tolerant_file_write_data_interrupt_test_application_define(void *);
  85. void filex_fault_tolerant_file_write_fat_interrupt_test_application_define(void *);
  86. void filex_fault_tolerant_file_write_directory_interrupt_test_application_define(void *);
  87. void filex_fault_tolerant_file_write_undo_log_interrupt_test_application_define(void *);
  88. void filex_fault_tolerant_file_write_redo_log_interrupt_test_application_define(void *);
  89. void filex_fault_tolerant_file_write_fat_crossover_test_application_define(void *);
  90. void filex_fault_tolerant_file_write_fat_crossover_2_test_application_define(void *first_unused_memory);
  91. void filex_fault_tolerant_file_create_directory_interrupt_test_application_define(void *);
  92. void filex_fault_tolerant_file_create_redo_log_interrupt_test_application_define(void *);
  93. void filex_fault_tolerant_file_delete_fat_interrupt_test_application_define(void *);
  94. void filex_fault_tolerant_file_delete_fat_multple_sectors_test_application_define(void *);
  95. void filex_fault_tolerant_file_delete_directory_interrupt_test_application_define(void *);
  96. void filex_fault_tolerant_file_delete_test_application_define(void *);
  97. void filex_fault_tolerant_file_delete_undo_log_interrupt_test_application_define(void *);
  98. void filex_fault_tolerant_file_delete_redo_log_interrupt_test_application_define(void *);
  99. void filex_fault_tolerant_file_rename_directory_interrupt_test_application_define(void *);
  100. void filex_fault_tolerant_file_rename_redo_log_interrupt_test_application_define(void *);
  101. void filex_fault_tolerant_file_allocate_fat_crossover_test_application_define(void *first_unused_memory);
  102. void filex_fault_tolerant_file_best_effort_allocate_fat_crossover_test_application_define(void *first_unused_memory);
  103. void filex_fault_tolerant_file_allocate_fat_interrupt_test_application_define(void *);
  104. void filex_fault_tolerant_file_allocate_directory_interrupt_test_application_define(void *);
  105. void filex_fault_tolerant_file_allocate_undo_log_interrupt_test_application_define(void *);
  106. void filex_fault_tolerant_file_allocate_redo_log_interrupt_test_application_define(void *);
  107. void filex_fault_tolerant_file_allocate_test_application_define(void *);
  108. void filex_fault_tolerant_file_best_allocate_fat_interrupt_test_application_define(void *);
  109. void filex_fault_tolerant_file_best_allocate_directory_interrupt_test_application_define(void *);
  110. void filex_fault_tolerant_file_best_allocate_undo_log_interrupt_test_application_define(void *);
  111. void filex_fault_tolerant_file_best_allocate_redo_log_interrupt_test_application_define(void *);
  112. void filex_fault_tolerant_file_truncate_release_available_test_application_define(void *first_unused_memory);
  113. void filex_fault_tolerant_file_truncate_directory_interrupt_test_application_define(void *);
  114. void filex_fault_tolerant_file_truncate_redo_log_interrupt_test_application_define(void *);
  115. void filex_fault_tolerant_file_truncate_release_fat_interrupt_test_application_define(void *);
  116. void filex_fault_tolerant_file_truncate_release_directory_interrupt_test_application_define(void *);
  117. void filex_fault_tolerant_file_truncate_release_undo_log_interrupt_test_application_define(void *);
  118. void filex_fault_tolerant_file_truncate_release_redo_log_interrupt_test_application_define(void *);
  119. void filex_fault_tolerant_file_attributes_set_directory_interrupt_test_application_define(void *);
  120. void filex_fault_tolerant_file_attributes_set_redo_log_interrupt_test_application_define(void *);
  121. void filex_fault_tolerant_file_corruption_test_application_define(void *first_unused_memory);
  122. void filex_fault_tolerant_directory_create_directory_interrupt_test_application_define(void *);
  123. void filex_fault_tolerant_directory_create_redo_log_interrupt_test_application_define(void *);
  124. void filex_fault_tolerant_directory_delete_directory_interrupt_test_application_define(void *);
  125. void filex_fault_tolerant_directory_delete_redo_log_interrupt_test_application_define(void *);
  126. void filex_fault_tolerant_directory_rename_directory_interrupt_test_application_define(void *);
  127. void filex_fault_tolerant_directory_rename_redo_log_interrupt_test_application_define(void *);
  128. void filex_fault_tolerant_directory_attributes_set_directory_interrupt_test_application_define(void *);
  129. void filex_fault_tolerant_directory_attributes_set_redo_log_interrupt_test_application_define(void *);
  130. void filex_fault_tolerant_log_recover_fat_test_application_define(void *);
  131. void filex_fault_tolerant_log_recover_directory_test_application_define(void *);
  132. void filex_fault_tolerant_log_full_test_application_define(void *);
  133. void filex_fault_tolerant_log_expand_test_application_define(void *);
  134. void filex_fault_tolerant_log_expand_interrupt_test_application_define(void *);
  135. void filex_fault_tolerant_long_directory_create_directory_interrupt_test_application_define(void *first_unused_memory);
  136. void filex_fault_tolerant_long_directory_create_redo_log_interrupt_test_application_define(void *first_unused_memory);
  137. void filex_fault_tolerant_long_directory_rename_directory_interrupt_test_application_define(void *first_unused_memory);
  138. void filex_fault_tolerant_long_directory_rename_redo_log_interrupt_test_application_define(void *first_unused_memory);
  139. void filex_fault_tolerant_long_file_create_directory_interrupt_test_application_define(void *first_unused_memory);
  140. void filex_fault_tolerant_long_file_create_redo_log_interrupt_test_application_define(void *first_unused_memory);
  141. void filex_fault_tolerant_long_directory_rename_io_error_test_application_define(void *first_unused_memory);
  142. void filex_fault_tolerant_write_large_data_test_application_define(void *);
  143. void filex_fault_tolerant_write_large_data_interrupt_test_application_define(void *);
  144. void filex_fault_tolerant_write_large_data_fat_chain_cleanup_interrupt_test_application_define(void *);
  145. void filex_fault_tolerant_write_large_data_fat_interrupt_test_application_define(void *);
  146. void filex_fault_tolerant_write_large_data_directory_interrupt_test_application_define(void *);
  147. void filex_fault_tolerant_write_large_data_undo_log_interrupt_test_application_define(void *);
  148. void filex_fault_tolerant_write_large_data_redo_log_interrupt_test_application_define(void *);
  149. void filex_fault_tolerant_delete_large_data_test_application_define(void *);
  150. void filex_fault_tolerant_recover_fail_test_application_define(void *first_unused_memory);
  151. void filex_fault_tolerant_unicode_directory_create_directory_interrupt_test_application_define(void *);
  152. void filex_fault_tolerant_unicode_directory_create_redo_log_interrupt_test_application_define(void *);
  153. void filex_fault_tolerant_unicode_directory_rename_directory_interrupt_test_application_define(void *);
  154. void filex_fault_tolerant_unicode_directory_rename_redo_log_interrupt_test_application_define(void *);
  155. void filex_fault_tolerant_unicode_file_create_directory_interrupt_test_application_define(void *);
  156. void filex_fault_tolerant_unicode_file_create_redo_log_interrupt_test_application_define(void *);
  157. void filex_fault_tolerant_unicode_file_rename_directory_interrupt_test_application_define(void *);
  158. void filex_fault_tolerant_unicode_file_rename_redo_log_interrupt_test_application_define(void *);
  159. void filex_media_format_open_close_application_define(void *);
  160. void filex_media_multiple_format_open_close_application_define(void *first_unused_memory);
  161. void filex_media_flush_application_define(void *first_unused_memory);
  162. void filex_media_abort_application_define(void *first_unused_memory);
  163. void filex_media_cache_invalidate_application_define(void *first_unused_memory);
  164. void filex_media_volume_get_set_application_define(void *first_unused_memory);
  165. void filex_media_read_write_sector_application_define(void *first_unused_memory);
  166. void filex_media_check_application_define(void *first_unused_memory);
  167. void filex_media_hidden_sectors_test_application_define(void *first_unused_memory);
  168. void filex_system_date_time_application_define(void *first_unused_memory);
  169. void filex_directory_create_delete_application_define(void *first_unused_memory);
  170. void filex_directory_default_get_set_application_define(void *first_unused_memory);
  171. void filex_directory_duplicate_entries_application_define(void *first_unused_memory);
  172. void filex_directory_naming_application_define(void *first_unused_memory);
  173. void filex_directory_first_next_find_application_define(void *first_unused_memory);
  174. void filex_directory_local_path_application_define(void *first_unused_memory);
  175. void filex_directory_rename_application_define(void *first_unused_memory);
  176. void filex_directory_long_short_get_application_define(void *first_unused_memory);
  177. void filex_directory_attributes_read_set_application_define(void *first_unused_memory);
  178. void filex_file_create_delete_application_define(void *first_unused_memory);
  179. void filex_file_naming_application_define(void *first_unused_memory);
  180. void filex_file_read_write_application_define(void *first_unused_memory);
  181. void filex_file_write_seek_application_define(void *first_unused_memory);
  182. void filex_file_name_application_define(void *first_unused_memory);
  183. void filex_file_write_notify_application_define(void *first_unused_memory);
  184. void filex_file_write_available_cluster_application_define(void *first_unused_memory);
  185. void filex_file_seek_application_define(void *first_unused_memory);
  186. void filex_file_allocate_truncate_application_define(void *first_unused_memory);
  187. void filex_file_allocate_application_define(void *first_unused_memory);
  188. void filex_file_attributes_read_set_application_define(void *first_unused_memory);
  189. void filex_file_date_time_set_application_define(void *first_unused_memory);
  190. void filex_file_rename_application_define(void *first_unused_memory);
  191. void filex_unicode_application_define(void *first_unused_memory);
  192. void filex_unicode_2_application_define(void *first_unused_memory);
  193. void filex_unicode_3_application_define(void *first_unused_memory);
  194. void filex_unicode_4_application_define(void *first_unused_memory);
  195. void filex_unicode_directory_rename_application_define(void *first_unused_memory);
  196. void filex_unicode_file_directory_rename_extra_test_application_define(void *first_unused_memory);
  197. void filex_unicode_file_directory_rename_extra_2_test_application_define(void *first_unused_memory);
  198. void filex_unicode_file_rename_application_define(void *first_unused_memory);
  199. void filex_unicode_name_string_application_define(void *first_ununsed_memory);
  200. void filex_unicode_directory_entry_test_application_define(void *first_unused_memory);
  201. void filex_unicode_directory_entry_2_test_application_define(void *first_unused_memory);
  202. void filex_unicode_directory_entry_change_test_application_define(void *first_unused_memory);
  203. void filex_unicode_fat_entry_test_application_define(void *first_unused_memory);
  204. void filex_unicode_fat_entry_1_test_application_define(void *first_unused_memory);
  205. void filex_unicode_fat_entry_2_test_application_define(void *first_unused_memory);
  206. void filex_unicode_fat_entry_3_test_application_define(void *first_unused_memory);
  207. void filex_utility_application_define(void *first_unused_memory);
  208. void filex_utility_fat_flush_application_define(void *first_unused_memory);
  209. void test_application_define(void *first_unused_memory);
  210. /* Define the array of test entry points. */
  211. TEST_ENTRY test_control_tests[] =
  212. {
  213. #ifdef CTEST
  214. {test_application_define, TEST_TIMEOUT_HIGH},
  215. #else /* CTEST */
  216. {filex_fault_tolerant_corrupted_log_file_test_application_define, TEST_TIMEOUT_LOW},
  217. {filex_fault_tolerant_enable_test_application_define, TEST_TIMEOUT_LOW},
  218. {filex_fault_tolerant_enable_1_test_application_define, TEST_TIMEOUT_LOW},
  219. {filex_fault_tolerant_enable_2_test_application_define, TEST_TIMEOUT_LOW},
  220. {filex_fault_tolerant_enable_3_test_application_define, TEST_TIMEOUT_LOW},
  221. {filex_fault_tolerant_enable_4_test_application_define, TEST_TIMEOUT_LOW},
  222. {filex_fault_tolerant_media_check_application_define, TEST_TIMEOUT_LOW},
  223. //{filex_fault_tolerant_media_full_test_application_define, TEST_TIMEOUT_HIGH},
  224. {filex_fault_tolerant_loop_write_data_test_application_define, TEST_TIMEOUT_HIGH},
  225. {filex_fault_tolerant_file_seek_test_application_define, TEST_TIMEOUT_LOW},
  226. {filex_fault_tolerant_file_random_seek_test_application_define, TEST_TIMEOUT_MID},
  227. {filex_fault_tolerant_file_write_data_interrupt_test_application_define, TEST_TIMEOUT_LOW},
  228. {filex_fault_tolerant_file_write_available_test_application_define, TEST_TIMEOUT_LOW},
  229. {filex_fault_tolerant_file_write_fat_interrupt_test_application_define, TEST_TIMEOUT_LOW},
  230. {filex_fault_tolerant_file_write_directory_interrupt_test_application_define, TEST_TIMEOUT_LOW},
  231. {filex_fault_tolerant_file_write_undo_log_interrupt_test_application_define, TEST_TIMEOUT_LOW},
  232. {filex_fault_tolerant_file_write_redo_log_interrupt_test_application_define, TEST_TIMEOUT_LOW},
  233. {filex_fault_tolerant_file_write_fat_crossover_test_application_define, TEST_TIMEOUT_LOW},
  234. {filex_fault_tolerant_file_write_fat_crossover_2_test_application_define, TEST_TIMEOUT_LOW},
  235. {filex_fault_tolerant_file_allocate_fat_crossover_test_application_define, TEST_TIMEOUT_LOW},
  236. {filex_fault_tolerant_file_best_effort_allocate_fat_crossover_test_application_define, TEST_TIMEOUT_LOW},
  237. {filex_fault_tolerant_file_create_directory_interrupt_test_application_define, TEST_TIMEOUT_LOW},
  238. {filex_fault_tolerant_file_create_redo_log_interrupt_test_application_define, TEST_TIMEOUT_LOW},
  239. {filex_fault_tolerant_file_delete_fat_interrupt_test_application_define, TEST_TIMEOUT_LOW},
  240. {filex_fault_tolerant_file_delete_fat_multple_sectors_test_application_define, TEST_TIMEOUT_LOW},
  241. {filex_fault_tolerant_file_delete_directory_interrupt_test_application_define, TEST_TIMEOUT_LOW},
  242. {filex_fault_tolerant_file_delete_test_application_define,TEST_TIMEOUT_LOW },
  243. {filex_fault_tolerant_file_delete_undo_log_interrupt_test_application_define, TEST_TIMEOUT_LOW},
  244. {filex_fault_tolerant_file_delete_redo_log_interrupt_test_application_define, TEST_TIMEOUT_LOW},
  245. {filex_fault_tolerant_file_rename_directory_interrupt_test_application_define, TEST_TIMEOUT_LOW},
  246. {filex_fault_tolerant_file_rename_redo_log_interrupt_test_application_define, TEST_TIMEOUT_LOW},
  247. {filex_fault_tolerant_file_allocate_fat_interrupt_test_application_define, TEST_TIMEOUT_LOW},
  248. {filex_fault_tolerant_file_allocate_directory_interrupt_test_application_define, TEST_TIMEOUT_LOW},
  249. {filex_fault_tolerant_file_allocate_undo_log_interrupt_test_application_define, TEST_TIMEOUT_LOW},
  250. {filex_fault_tolerant_file_allocate_redo_log_interrupt_test_application_define, TEST_TIMEOUT_LOW},
  251. {filex_fault_tolerant_file_allocate_test_application_define, TEST_TIMEOUT_LOW},
  252. {filex_fault_tolerant_file_best_allocate_fat_interrupt_test_application_define, TEST_TIMEOUT_LOW},
  253. {filex_fault_tolerant_file_best_allocate_directory_interrupt_test_application_define, TEST_TIMEOUT_LOW},
  254. {filex_fault_tolerant_file_best_allocate_undo_log_interrupt_test_application_define, TEST_TIMEOUT_LOW},
  255. {filex_fault_tolerant_file_best_allocate_redo_log_interrupt_test_application_define, TEST_TIMEOUT_LOW},
  256. {filex_fault_tolerant_file_truncate_release_available_test_application_define, TEST_TIMEOUT_LOW},
  257. {filex_fault_tolerant_file_truncate_directory_interrupt_test_application_define, TEST_TIMEOUT_LOW},
  258. {filex_fault_tolerant_file_truncate_redo_log_interrupt_test_application_define, TEST_TIMEOUT_LOW},
  259. {filex_fault_tolerant_file_truncate_release_fat_interrupt_test_application_define, TEST_TIMEOUT_LOW},
  260. {filex_fault_tolerant_file_truncate_release_directory_interrupt_test_application_define, TEST_TIMEOUT_LOW},
  261. {filex_fault_tolerant_file_truncate_release_undo_log_interrupt_test_application_define, TEST_TIMEOUT_LOW},
  262. {filex_fault_tolerant_file_truncate_release_redo_log_interrupt_test_application_define, TEST_TIMEOUT_LOW},
  263. {filex_fault_tolerant_file_attributes_set_directory_interrupt_test_application_define, TEST_TIMEOUT_LOW},
  264. {filex_fault_tolerant_file_attributes_set_redo_log_interrupt_test_application_define, TEST_TIMEOUT_LOW},
  265. {filex_fault_tolerant_file_corruption_test_application_define, TEST_TIMEOUT_HIGH},
  266. {filex_fault_tolerant_directory_create_directory_interrupt_test_application_define, TEST_TIMEOUT_LOW},
  267. {filex_fault_tolerant_directory_create_redo_log_interrupt_test_application_define, TEST_TIMEOUT_LOW},
  268. {filex_fault_tolerant_directory_delete_directory_interrupt_test_application_define, TEST_TIMEOUT_LOW},
  269. {filex_fault_tolerant_directory_delete_redo_log_interrupt_test_application_define, TEST_TIMEOUT_LOW},
  270. {filex_fault_tolerant_directory_rename_directory_interrupt_test_application_define, TEST_TIMEOUT_LOW},
  271. {filex_fault_tolerant_directory_rename_redo_log_interrupt_test_application_define, TEST_TIMEOUT_LOW},
  272. {filex_fault_tolerant_directory_attributes_set_directory_interrupt_test_application_define, TEST_TIMEOUT_LOW},
  273. {filex_fault_tolerant_directory_attributes_set_redo_log_interrupt_test_application_define, TEST_TIMEOUT_LOW},
  274. {filex_fault_tolerant_log_recover_fat_test_application_define, TEST_TIMEOUT_LOW},
  275. {filex_fault_tolerant_log_recover_directory_test_application_define, TEST_TIMEOUT_LOW},
  276. {filex_fault_tolerant_log_full_test_application_define, TEST_TIMEOUT_LOW},
  277. {filex_fault_tolerant_long_directory_create_directory_interrupt_test_application_define, TEST_TIMEOUT_HIGH},
  278. {filex_fault_tolerant_long_directory_create_redo_log_interrupt_test_application_define, TEST_TIMEOUT_HIGH},
  279. #if 1
  280. {filex_fault_tolerant_long_directory_rename_directory_interrupt_test_application_define, TEST_TIMEOUT_HIGH},
  281. {filex_fault_tolerant_long_directory_rename_redo_log_interrupt_test_application_define, TEST_TIMEOUT_HIGH},
  282. #endif
  283. {filex_fault_tolerant_long_file_create_directory_interrupt_test_application_define, TEST_TIMEOUT_HIGH},
  284. {filex_fault_tolerant_long_file_create_redo_log_interrupt_test_application_define, TEST_TIMEOUT_HIGH},
  285. {filex_fault_tolerant_long_directory_rename_io_error_test_application_define, TEST_TIMEOUT_HIGH},
  286. {filex_fault_tolerant_recover_fail_test_application_define, TEST_TIMEOUT_LOW},
  287. {filex_fault_tolerant_write_large_data_test_application_define, TEST_TIMEOUT_HIGH},
  288. {filex_fault_tolerant_write_large_data_interrupt_test_application_define, TEST_TIMEOUT_HIGH},
  289. {filex_fault_tolerant_write_large_data_fat_chain_cleanup_interrupt_test_application_define, TEST_TIMEOUT_HIGH},
  290. {filex_fault_tolerant_write_large_data_fat_interrupt_test_application_define, TEST_TIMEOUT_HIGH},
  291. {filex_fault_tolerant_write_large_data_directory_interrupt_test_application_define, TEST_TIMEOUT_HIGH},
  292. {filex_fault_tolerant_write_large_data_undo_log_interrupt_test_application_define, TEST_TIMEOUT_HIGH},
  293. {filex_fault_tolerant_write_large_data_redo_log_interrupt_test_application_define, TEST_TIMEOUT_HIGH},
  294. {filex_fault_tolerant_delete_large_data_test_application_define, TEST_TIMEOUT_HIGH},
  295. {filex_fault_tolerant_unicode_directory_create_directory_interrupt_test_application_define, TEST_TIMEOUT_LOW},
  296. {filex_fault_tolerant_unicode_directory_create_redo_log_interrupt_test_application_define, TEST_TIMEOUT_LOW},
  297. {filex_fault_tolerant_unicode_directory_rename_directory_interrupt_test_application_define, TEST_TIMEOUT_LOW},
  298. {filex_fault_tolerant_unicode_directory_rename_redo_log_interrupt_test_application_define, TEST_TIMEOUT_LOW},
  299. {filex_fault_tolerant_unicode_file_create_directory_interrupt_test_application_define, TEST_TIMEOUT_LOW},
  300. {filex_fault_tolerant_unicode_file_create_redo_log_interrupt_test_application_define, TEST_TIMEOUT_LOW},
  301. {filex_fault_tolerant_unicode_file_rename_directory_interrupt_test_application_define, TEST_TIMEOUT_LOW},
  302. {filex_fault_tolerant_unicode_file_rename_redo_log_interrupt_test_application_define, TEST_TIMEOUT_LOW},
  303. {filex_media_format_open_close_application_define, TEST_TIMEOUT_LOW},
  304. {filex_media_multiple_format_open_close_application_define, TEST_TIMEOUT_LOW},
  305. {filex_media_flush_application_define, TEST_TIMEOUT_LOW},
  306. {filex_media_abort_application_define, TEST_TIMEOUT_LOW},
  307. {filex_media_cache_invalidate_application_define, TEST_TIMEOUT_LOW},
  308. {filex_media_volume_directory_entry_application_define, TEST_TIMEOUT_LOW},
  309. {filex_media_volume_get_set_application_define, TEST_TIMEOUT_LOW},
  310. {filex_media_read_write_sector_application_define, TEST_TIMEOUT_LOW},
  311. {filex_media_check_application_define, TEST_TIMEOUT_LOW},
  312. {filex_media_hidden_sectors_test_application_define, TEST_TIMEOUT_LOW},
  313. {filex_system_date_time_application_define, TEST_TIMEOUT_LOW},
  314. {filex_directory_create_delete_application_define, TEST_TIMEOUT_LOW},
  315. {filex_directory_default_get_set_application_define, TEST_TIMEOUT_LOW},
  316. {filex_directory_duplicate_entries_application_define, TEST_TIMEOUT_LOW},
  317. {filex_directory_naming_application_define, TEST_TIMEOUT_LOW},
  318. {filex_directory_first_next_find_application_define, TEST_TIMEOUT_LOW},
  319. #if 1
  320. {filex_directory_local_path_application_define, TEST_TIMEOUT_LOW},
  321. #endif
  322. {filex_directory_rename_application_define, TEST_TIMEOUT_LOW},
  323. {filex_directory_long_short_get_application_define, TEST_TIMEOUT_LOW},
  324. {filex_directory_attributes_read_set_application_define, TEST_TIMEOUT_LOW},
  325. {filex_file_create_delete_application_define, TEST_TIMEOUT_LOW},
  326. {filex_file_naming_application_define, TEST_TIMEOUT_LOW},
  327. #if 1
  328. {filex_file_read_write_application_define, TEST_TIMEOUT_LOW},
  329. {filex_file_write_seek_application_define, TEST_TIMEOUT_LOW},
  330. {filex_file_name_application_define, TEST_TIMEOUT_LOW},
  331. {filex_file_write_notify_application_define, TEST_TIMEOUT_LOW},
  332. {filex_file_write_available_cluster_application_define, TEST_TIMEOUT_LOW},
  333. {filex_file_seek_application_define, TEST_TIMEOUT_LOW},
  334. {filex_file_allocate_truncate_application_define, TEST_TIMEOUT_LOW},
  335. {filex_file_allocate_application_define, TEST_TIMEOUT_LOW},
  336. #endif
  337. {filex_file_attributes_read_set_application_define, TEST_TIMEOUT_LOW},
  338. {filex_file_date_time_set_application_define, TEST_TIMEOUT_LOW},
  339. {filex_file_rename_application_define, TEST_TIMEOUT_LOW},
  340. {filex_unicode_application_define, TEST_TIMEOUT_LOW},
  341. {filex_unicode_2_application_define, TEST_TIMEOUT_LOW},
  342. {filex_unicode_3_application_define, TEST_TIMEOUT_LOW},
  343. {filex_unicode_4_application_define, TEST_TIMEOUT_LOW},
  344. {filex_unicode_directory_entry_test_application_define, TEST_TIMEOUT_LOW},
  345. {filex_unicode_directory_entry_2_test_application_define, TEST_TIMEOUT_LOW},
  346. {filex_unicode_directory_entry_change_test_application_define,TEST_TIMEOUT_LOW },
  347. {filex_unicode_directory_rename_application_define, TEST_TIMEOUT_LOW},
  348. {filex_unicode_fat_entry_test_application_define, TEST_TIMEOUT_LOW},
  349. {filex_unicode_fat_entry_1_test_application_define, TEST_TIMEOUT_LOW},
  350. {filex_unicode_fat_entry_2_test_application_define, TEST_TIMEOUT_LOW},
  351. {filex_unicode_fat_entry_3_test_application_define, TEST_TIMEOUT_LOW},
  352. {filex_unicode_file_directory_rename_extra_test_application_define, TEST_TIMEOUT_LOW},
  353. {filex_unicode_file_directory_rename_extra_2_test_application_define, TEST_TIMEOUT_LOW},
  354. {filex_unicode_file_rename_application_define, TEST_TIMEOUT_LOW},
  355. {filex_unicode_name_string_application_define, TEST_TIMEOUT_LOW},
  356. {filex_utility_application_define, TEST_TIMEOUT_LOW},
  357. {filex_utility_fat_flush_application_define, TEST_TIMEOUT_LOW},
  358. #endif /* CTEST */
  359. {FX_NULL, TEST_TIMEOUT_LOW}
  360. };
  361. /* Define thread prototypes. */
  362. void test_control_thread_entry(ULONG thread_input);
  363. void test_control_return(UINT status);
  364. void test_control_cleanup(void);
  365. /* Define necessary exernal references. */
  366. #ifndef FX_STANDALONE_ENABLE
  367. #ifdef __ghs
  368. extern TX_MUTEX __ghLockMutex;
  369. #endif
  370. extern TX_TIMER *_tx_timer_created_ptr;
  371. extern ULONG _tx_timer_created_count;
  372. #ifndef TX_TIMER_PROCESS_IN_ISR
  373. extern TX_THREAD _tx_timer_thread;
  374. #endif
  375. extern TX_THREAD *_tx_thread_created_ptr;
  376. extern ULONG _tx_thread_created_count;
  377. extern TX_SEMAPHORE *_tx_semaphore_created_ptr;
  378. extern ULONG _tx_semaphore_created_count;
  379. extern TX_QUEUE *_tx_queue_created_ptr;
  380. extern ULONG _tx_queue_created_count;
  381. extern TX_MUTEX *_tx_mutex_created_ptr;
  382. extern ULONG _tx_mutex_created_count;
  383. extern TX_EVENT_FLAGS_GROUP *_tx_event_flags_created_ptr;
  384. extern ULONG _tx_event_flags_created_count;
  385. extern TX_BYTE_POOL *_tx_byte_pool_created_ptr;
  386. extern ULONG _tx_byte_pool_created_count;
  387. extern TX_BLOCK_POOL *_tx_block_pool_created_ptr;
  388. extern ULONG _tx_block_pool_created_count;
  389. #endif
  390. extern FX_MEDIA * _fx_system_media_opened_ptr;
  391. extern ULONG _fx_system_media_opened_count;
  392. static FX_MEDIA media_instance;
  393. static FX_FILE file_instance;
  394. static FX_LOCAL_PATH local_path_instance;
  395. static void fake_driver(FX_MEDIA *media_ptr)
  396. {
  397. FX_PARAMETER_NOT_USED(media_ptr);
  398. }
  399. /* Define main entry point. */
  400. int main()
  401. {
  402. ULONG actual;
  403. /* Print out some test information banners. */
  404. printf("%s\n", _fx_version_id);
  405. actual = FX_MAX_LONG_NAME_LEN;
  406. if (actual < 256)
  407. printf("**** ERROR ***** FileX and tests must be built with FX_MAX_LONG_NAME_LEN=256\n");
  408. actual = FX_MAX_LAST_NAME_LEN;
  409. if (actual < 256)
  410. printf("**** ERROR ***** FileX and tests must be built with FX_MAX_LAST_NAME_LEN=256\n");
  411. #ifdef FX_FAULT_TOLERANT
  412. printf("Immediately write feature is built-in.\n");
  413. #else
  414. printf("immediately write feature is not built-in.\n");
  415. #endif
  416. #ifdef FX_ENABLE_FAULT_TOLERANT
  417. printf("Fault tolerant feature is built-in.\n");
  418. #else
  419. printf("Fault tolerant feature is not built-in.\n");
  420. #endif
  421. printf("\n");
  422. /* Enter the ThreadX kernel. */
  423. tx_kernel_enter();
  424. }
  425. /* Define what the initial system looks like. */
  426. void tx_application_define(void *first_unused_memory)
  427. {
  428. #ifndef FX_STANDALONE_ENABLE
  429. ULONG saved_system_state;
  430. UINT status;
  431. ULONG64 available_bytes;
  432. ULONG temp;
  433. CHAR *string_ptr;
  434. UINT attributes;
  435. UCHAR buffer[100];
  436. UCHAR unicode_name[] = { 1,0,2,0,3,0,4,0,5,0,6,0,0,0};
  437. #ifdef FX_ENABLE_FAULT_TOLERANT
  438. UCHAR fault_tolerant_buffer[FAULT_TOLERANT_SIZE];
  439. #endif /* FX_ENABLE_FAULT_TOLERANT */
  440. FX_PARAMETER_NOT_USED(first_unused_memory);
  441. #ifdef FX_ENABLE_FAULT_TOLERANT
  442. /* Perform initialization, NULL thread, and time thread tests against the error checking shell. */
  443. /* Check caller error checking for fx_fault_tolerant_enable. */
  444. /* Save the system state. */
  445. saved_system_state = _tx_thread_system_state;
  446. /* Setup the fake media structure. */
  447. media_instance.fx_media_id = FX_MEDIA_ID;
  448. /* Call the _fxe_media_abort to cause and error. */
  449. status = _fxe_fault_tolerant_enable(&media_instance, fault_tolerant_buffer, FAULT_TOLERANT_SIZE);
  450. /* Check for the error. */
  451. if (status != FX_CALLER_ERROR)
  452. {
  453. /* Increment the failed tests counter. */
  454. test_control_failed_tests++;
  455. /* Print error message. */
  456. printf("Error in checking of fxe_fault_tolerant_enable!\n");
  457. }
  458. /* Clear the system state to simulate an ISR caller. */
  459. _tx_thread_system_state = 0;
  460. /* Call the _fxe_media_abort to cause and error. */
  461. status = _fxe_fault_tolerant_enable(&media_instance, fault_tolerant_buffer, FAULT_TOLERANT_SIZE);
  462. /* Check for the error. */
  463. if (status != FX_CALLER_ERROR)
  464. {
  465. /* Increment the failed tests counter. */
  466. test_control_failed_tests++;
  467. /* Print error message. */
  468. printf("Error in checking of fxe_fault_tolerant_enable!\n");
  469. }
  470. #ifndef TX_TIMER_PROCESS_IN_ISR
  471. /* Set the current thread to the timer thread, for caller checking. */
  472. _tx_thread_current_ptr = &_tx_timer_thread;
  473. /* Call the _fxe_media_abort to cause and error. */
  474. status = _fxe_fault_tolerant_enable(&media_instance, fault_tolerant_buffer, FAULT_TOLERANT_SIZE);
  475. /* Set the current thread back to NULL. */
  476. _tx_thread_current_ptr = FX_NULL;
  477. /* Check for the error. */
  478. if (status != FX_CALLER_ERROR)
  479. {
  480. /* Increment the failed tests counter. */
  481. test_control_failed_tests++;
  482. /* Print error message. */
  483. printf("Error in checking of fxe_fault_tolerant_enable!\n");
  484. }
  485. #endif
  486. /* Restore the system state. */
  487. _tx_thread_system_state = saved_system_state;
  488. #endif /* FX_ENABLE_FAULT_TOLERANT */
  489. /* Perform initialization, NULL thread, and time thread tests against the error checking shell. */
  490. /* Check caller error checking for fx_media_abort. */
  491. /* Save the system state. */
  492. #ifndef FX_STANDALONE_ENABLE
  493. saved_system_state = _tx_thread_system_state;
  494. #endif
  495. /* Setup the fake media structure. */
  496. media_instance.fx_media_id = FX_MEDIA_ID;
  497. /* Call the _fxe_media_abort to cause and error. */
  498. status = _fxe_media_abort(&media_instance);
  499. /* Check for the error. */
  500. if (status != FX_CALLER_ERROR)
  501. {
  502. /* Increment the failed tests counter. */
  503. test_control_failed_tests++;
  504. /* Print error message. */
  505. printf("Error in checking of fxe_media_abort!\n");
  506. }
  507. /* Clear the system state to simulate an ISR caller. */
  508. _tx_thread_system_state = 0;
  509. /* Call the _fxe_media_abort to cause and error. */
  510. status = _fxe_media_abort(&media_instance);
  511. /* Check for the error. */
  512. if (status != FX_CALLER_ERROR)
  513. {
  514. /* Increment the failed tests counter. */
  515. test_control_failed_tests++;
  516. /* Print error message. */
  517. printf("Error in checking of fxe_media_abort!\n");
  518. }
  519. #ifndef TX_TIMER_PROCESS_IN_ISR
  520. /* Set the current thread to the timer thread, for caller checking. */
  521. _tx_thread_current_ptr = &_tx_timer_thread;
  522. /* Call the _fxe_media_abort to cause and error. */
  523. status = _fxe_media_abort(&media_instance);
  524. /* Set the current thread back to NULL. */
  525. _tx_thread_current_ptr = FX_NULL;
  526. /* Check for the error. */
  527. if (status != FX_CALLER_ERROR)
  528. {
  529. /* Increment the failed tests counter. */
  530. test_control_failed_tests++;
  531. /* Print error message. */
  532. printf("Error in checking of fxe_media_abort!\n");
  533. }
  534. #endif
  535. /* Restore the system state. */
  536. _tx_thread_system_state = saved_system_state;
  537. /* Check caller error checking for fx_media_invalidate. */
  538. /* Save the system state. */
  539. saved_system_state = _tx_thread_system_state;
  540. /* Setup the fake media structure. */
  541. media_instance.fx_media_id = FX_MEDIA_ID;
  542. /* Call the _fxe_media_cache_invalidate to cause and error. */
  543. status = _fxe_media_cache_invalidate(&media_instance);
  544. /* Check for the error. */
  545. if (status != FX_CALLER_ERROR)
  546. {
  547. /* Increment the failed tests counter. */
  548. test_control_failed_tests++;
  549. /* Print error message. */
  550. printf("Error in checking of fxe_media_invalidate!\n");
  551. }
  552. /* Clear the system state to simulate an ISR caller. */
  553. _tx_thread_system_state = 0;
  554. /* Call the _fxe_media_cache_invalidate to cause and error. */
  555. status = _fxe_media_cache_invalidate(&media_instance);
  556. /* Check for the error. */
  557. if (status != FX_CALLER_ERROR)
  558. {
  559. /* Increment the failed tests counter. */
  560. test_control_failed_tests++;
  561. /* Print error message. */
  562. printf("Error in checking of fxe_media_invalidate!\n");
  563. }
  564. #ifndef TX_TIMER_PROCESS_IN_ISR
  565. /* Set the current thread to the timer thread, for caller checking. */
  566. _tx_thread_current_ptr = &_tx_timer_thread;
  567. /* Call the _fxe_media_cache_invalidate to cause and error. */
  568. status = _fxe_media_cache_invalidate(&media_instance);
  569. /* Set the current thread back to NULL. */
  570. _tx_thread_current_ptr = FX_NULL;
  571. /* Check for the error. */
  572. if (status != FX_CALLER_ERROR)
  573. {
  574. /* Increment the failed tests counter. */
  575. test_control_failed_tests++;
  576. /* Print error message. */
  577. printf("Error in checking of fxe_media_cache_invalidate!\n");
  578. }
  579. #endif
  580. /* Restore the system state. */
  581. _tx_thread_system_state = saved_system_state;
  582. /* Check caller error checking for fx_media_check. */
  583. /* Save the system state. */
  584. saved_system_state = _tx_thread_system_state;
  585. /* Setup the fake media structure. */
  586. media_instance.fx_media_id = FX_MEDIA_ID;
  587. /* Call the _fxe_media_check to cause and error. */
  588. status = _fxe_media_check(&media_instance, (UCHAR *) &media_instance, 0, 0, FX_NULL);
  589. /* Check for the error. */
  590. if (status != FX_CALLER_ERROR)
  591. {
  592. /* Increment the failed tests counter. */
  593. test_control_failed_tests++;
  594. /* Print error message. */
  595. printf("Error in checking of fxe_media_check!\n");
  596. }
  597. /* Clear the system state to simulate an ISR caller. */
  598. _tx_thread_system_state = 0;
  599. /* Call the _fxe_media_check to cause and error. */
  600. status = _fxe_media_check(&media_instance, (UCHAR *) &media_instance, 0, 0, FX_NULL);
  601. /* Check for the error. */
  602. if (status != FX_CALLER_ERROR)
  603. {
  604. /* Increment the failed tests counter. */
  605. test_control_failed_tests++;
  606. /* Print error message. */
  607. printf("Error in checking of fxe_media_check!\n");
  608. }
  609. #ifndef TX_TIMER_PROCESS_IN_ISR
  610. /* Set the current thread to the timer thread, for caller checking. */
  611. _tx_thread_current_ptr = &_tx_timer_thread;
  612. /* Call the _fxe_media_check to cause and error. */
  613. status = _fxe_media_check(&media_instance, (UCHAR *) &media_instance, 0, 0, FX_NULL);
  614. /* Set the current thread back to NULL. */
  615. _tx_thread_current_ptr = FX_NULL;
  616. /* Check for the error. */
  617. if (status != FX_CALLER_ERROR)
  618. {
  619. /* Increment the failed tests counter. */
  620. test_control_failed_tests++;
  621. /* Print error message. */
  622. printf("Error in checking of fxe_media_check!\n");
  623. }
  624. #endif
  625. /* Restore the system state. */
  626. _tx_thread_system_state = saved_system_state;
  627. /* Check caller error checking for fx_media_close. */
  628. /* Save the system state. */
  629. saved_system_state = _tx_thread_system_state;
  630. /* Setup the fake media structure. */
  631. media_instance.fx_media_id = FX_MEDIA_ID;
  632. /* Call the _fxe_media_close to cause and error. */
  633. status = _fxe_media_close(&media_instance);
  634. /* Check for the error. */
  635. if (status != FX_CALLER_ERROR)
  636. {
  637. /* Increment the failed tests counter. */
  638. test_control_failed_tests++;
  639. /* Print error message. */
  640. printf("Error in checking of fxe_media_close!\n");
  641. }
  642. /* Call the _fxe_media_close to cause and error. */
  643. status = _fxe_media_close(&media_instance);
  644. /* Check for the error. */
  645. if (status != FX_CALLER_ERROR)
  646. {
  647. /* Increment the failed tests counter. */
  648. test_control_failed_tests++;
  649. /* Print error message. */
  650. printf("Error in checking of fxe_media_close!\n");
  651. }
  652. /* Clear the system state to simulate an ISR caller. */
  653. _tx_thread_system_state = 0;
  654. /* Call the _fxe_media_close to cause and error. */
  655. status = _fxe_media_close(&media_instance);
  656. /* Check for the error. */
  657. if (status != FX_CALLER_ERROR)
  658. {
  659. /* Increment the failed tests counter. */
  660. test_control_failed_tests++;
  661. /* Print error message. */
  662. printf("Error in checking of fxe_media_close!\n");
  663. }
  664. #ifndef TX_TIMER_PROCESS_IN_ISR
  665. /* Set the current thread to the timer thread, for caller checking. */
  666. _tx_thread_current_ptr = &_tx_timer_thread;
  667. /* Call the _fxe_media_close to cause and error. */
  668. status = _fxe_media_close(&media_instance);
  669. /* Set the current thread back to NULL. */
  670. _tx_thread_current_ptr = FX_NULL;
  671. /* Check for the error. */
  672. if (status != FX_CALLER_ERROR)
  673. {
  674. /* Increment the failed tests counter. */
  675. test_control_failed_tests++;
  676. /* Print error message. */
  677. printf("Error in checking of fxe_media_close!\n");
  678. }
  679. #endif
  680. /* Restore the system state. */
  681. _tx_thread_system_state = saved_system_state;
  682. /* Check caller error checking for fx_media_close_notify_set. */
  683. /* Save the system state. */
  684. saved_system_state = _tx_thread_system_state;
  685. /* Call the _fxe_media_close_notify_set to cause and error. */
  686. status = _fxe_media_close_notify_set(FX_NULL, FX_NULL);
  687. /* Check for the error. */
  688. if (status != FX_PTR_ERROR)
  689. {
  690. /* Increment the failed tests counter. */
  691. test_control_failed_tests++;
  692. /* Print error message. */
  693. printf("Error in checking of fxe_media_close_notify_set!\n");
  694. }
  695. /* Call the _fxe_media_close_notify_set to cause and error. */
  696. status = _fxe_media_close_notify_set(&media_instance, FX_NULL);
  697. /* Check for the error. */
  698. if (status != FX_CALLER_ERROR)
  699. {
  700. /* Increment the failed tests counter. */
  701. test_control_failed_tests++;
  702. /* Print error message. */
  703. printf("Error in checking of fxe_media_close_notify_set!\n");
  704. }
  705. /* Clear the system state to simulate an ISR caller. */
  706. _tx_thread_system_state = 0;
  707. /* Call the _fxe_media_close_notify_set to cause and error. */
  708. status = _fxe_media_close_notify_set(&media_instance, FX_NULL);
  709. /* Check for the error. */
  710. if (status != FX_CALLER_ERROR)
  711. {
  712. /* Increment the failed tests counter. */
  713. test_control_failed_tests++;
  714. /* Print error message. */
  715. printf("Error in checking of fxe_media_close_notify_set!\n");
  716. }
  717. #ifndef TX_TIMER_PROCESS_IN_ISR
  718. /* Set the current thread to the timer thread, for caller checking. */
  719. _tx_thread_current_ptr = &_tx_timer_thread;
  720. /* Call the _fxe_media_close_notify_set to cause and error. */
  721. status = _fxe_media_close_notify_set(&media_instance, FX_NULL);
  722. /* Set the current thread back to NULL. */
  723. _tx_thread_current_ptr = FX_NULL;
  724. /* Check for the error. */
  725. if (status != FX_CALLER_ERROR)
  726. {
  727. /* Increment the failed tests counter. */
  728. test_control_failed_tests++;
  729. /* Print error message. */
  730. printf("Error in checking of fxe_media_close_notify_set!\n");
  731. }
  732. #endif
  733. /* Restore the system state. */
  734. _tx_thread_system_state = saved_system_state;
  735. /* Check caller error checking for fx_media_extended_space_available. */
  736. /* Save the system state. */
  737. saved_system_state = _tx_thread_system_state;
  738. /* Setup the fake media structure. */
  739. media_instance.fx_media_id = 0;
  740. /* Fake test control thread running. */
  741. _tx_thread_system_state = 0;
  742. _tx_thread_current_ptr = &test_control_thread;
  743. /* Call the _fxe_media_extended_space_available to cause and error. */
  744. status = _fxe_media_extended_space_available(&media_instance, &available_bytes);
  745. _tx_thread_system_state = saved_system_state;
  746. _tx_thread_current_ptr = FX_NULL;
  747. /* Check for the error. */
  748. if (status != FX_MEDIA_NOT_OPEN)
  749. {
  750. /* Increment the failed tests counter. */
  751. test_control_failed_tests++;
  752. /* Print error message. */
  753. printf("Error in checking of fxe_media_extended_space_available!\n");
  754. }
  755. /* Setup the fake media structure. */
  756. media_instance.fx_media_id = FX_MEDIA_ID;
  757. /* Call the _fxe_media_extended_space_available to cause and error. */
  758. status = _fxe_media_extended_space_available(FX_NULL, &available_bytes);
  759. /* Check for the error. */
  760. if (status != FX_PTR_ERROR)
  761. {
  762. /* Increment the failed tests counter. */
  763. test_control_failed_tests++;
  764. /* Print error message. */
  765. printf("Error in checking of fxe_media_extended_space_available!\n");
  766. }
  767. /* Call the _fxe_media_extended_space_available to cause and error. */
  768. status = _fxe_media_extended_space_available(&media_instance, FX_NULL);
  769. /* Check for the error. */
  770. if (status != FX_PTR_ERROR)
  771. {
  772. /* Increment the failed tests counter. */
  773. test_control_failed_tests++;
  774. /* Print error message. */
  775. printf("Error in checking of fxe_media_extended_space_available!\n");
  776. }
  777. /* Call the _fxe_media_extended_space_available to cause and error. */
  778. status = _fxe_media_extended_space_available(&media_instance, &available_bytes);
  779. /* Check for the error. */
  780. if (status != FX_CALLER_ERROR)
  781. {
  782. /* Increment the failed tests counter. */
  783. test_control_failed_tests++;
  784. /* Print error message. */
  785. printf("Error in checking of fxe_media_extended_space_available!\n");
  786. }
  787. /* Clear the system state to simulate an ISR caller. */
  788. _tx_thread_system_state = 0;
  789. /* Call the _fxe_media_extended_space_available to cause and error. */
  790. status = _fxe_media_extended_space_available(&media_instance, &available_bytes);
  791. /* Check for the error. */
  792. if (status != FX_CALLER_ERROR)
  793. {
  794. /* Increment the failed tests counter. */
  795. test_control_failed_tests++;
  796. /* Print error message. */
  797. printf("Error in checking of fxe_media_extended_space_available!\n");
  798. }
  799. #ifndef TX_TIMER_PROCESS_IN_ISR
  800. /* Set the current thread to the timer thread, for caller checking. */
  801. _tx_thread_current_ptr = &_tx_timer_thread;
  802. /* Call the _fxe_media_extended_space_available to cause and error. */
  803. status = _fxe_media_extended_space_available(&media_instance, &available_bytes);
  804. /* Set the current thread back to NULL. */
  805. _tx_thread_current_ptr = FX_NULL;
  806. /* Check for the error. */
  807. if (status != FX_CALLER_ERROR)
  808. {
  809. /* Increment the failed tests counter. */
  810. test_control_failed_tests++;
  811. /* Print error message. */
  812. printf("Error in checking of fxe_media_extended_space_available!\n");
  813. }
  814. #endif
  815. /* Restore the system state. */
  816. _tx_thread_system_state = saved_system_state;
  817. /* Check caller error checking for fx_media_flush. */
  818. /* Save the system state. */
  819. saved_system_state = _tx_thread_system_state;
  820. /* Setup the fake media structure. */
  821. media_instance.fx_media_id = FX_MEDIA_ID;
  822. /* Call the _fxe_media_flush to cause and error. */
  823. status = _fxe_media_flush(&media_instance);
  824. /* Check for the error. */
  825. if (status != FX_CALLER_ERROR)
  826. {
  827. /* Increment the failed tests counter. */
  828. test_control_failed_tests++;
  829. /* Print error message. */
  830. printf("Error in checking of fxe_media_flush!\n");
  831. }
  832. /* Clear the system state to simulate an ISR caller. */
  833. _tx_thread_system_state = 0;
  834. /* Call the _fxe_media_flush to cause and error. */
  835. status = _fxe_media_flush(&media_instance);
  836. /* Check for the error. */
  837. if (status != FX_CALLER_ERROR)
  838. {
  839. /* Increment the failed tests counter. */
  840. test_control_failed_tests++;
  841. /* Print error message. */
  842. printf("Error in checking of fxe_media_flush!\n");
  843. }
  844. #ifndef TX_TIMER_PROCESS_IN_ISR
  845. /* Set the current thread to the timer thread, for caller checking. */
  846. _tx_thread_current_ptr = &_tx_timer_thread;
  847. /* Call the _fxe_media_flush to cause and error. */
  848. status = _fxe_media_flush(&media_instance);
  849. /* Set the current thread back to NULL. */
  850. _tx_thread_current_ptr = FX_NULL;
  851. /* Check for the error. */
  852. if (status != FX_CALLER_ERROR)
  853. {
  854. /* Increment the failed tests counter. */
  855. test_control_failed_tests++;
  856. /* Print error message. */
  857. printf("Error in checking of fxe_media_flush!\n");
  858. }
  859. #endif
  860. /* Restore the system state. */
  861. _tx_thread_system_state = saved_system_state;
  862. /* Check caller error checking for fx_media_format. */
  863. /* Save the system state. */
  864. saved_system_state = _tx_thread_system_state;
  865. /* Call the _fxe_media_format to cause an error. */
  866. status = _fxe_media_format(&media_instance, FX_NULL, FX_NULL, FX_NULL, 0,
  867. FX_NULL, 0, 0, 0, 0, 0, 0, 0, 0);
  868. /* Check for the error. */
  869. if (status != FX_PTR_ERROR)
  870. {
  871. /* Increment the failed tests counter. */
  872. test_control_failed_tests++;
  873. /* Print error message. */
  874. printf("Error in checking of fxe_media_format!\n");
  875. }
  876. /* Call the _fxe_media_format to cause an error. */
  877. status = _fxe_media_format(&media_instance, fake_driver, FX_NULL, FX_NULL, 0,
  878. FX_NULL, 0, 0, 0, 0, 0, 0, 0, 0);
  879. /* Check for the error. */
  880. if (status != FX_PTR_ERROR)
  881. {
  882. /* Increment the failed tests counter. */
  883. test_control_failed_tests++;
  884. /* Print error message. */
  885. printf("Error in checking of fxe_media_format!\n");
  886. }
  887. /* Setup the fake media structure. */
  888. media_instance.fx_media_id = FX_MEDIA_ID;
  889. /* Call the _fxe_media_format to cause an error. */
  890. status = _fxe_media_format(&media_instance, fake_driver, FX_NULL, buffer, 0,
  891. FX_NULL, 0, 0, 0, 0, 0, 0, 0, 0);
  892. /* Check for the error. */
  893. if (status != FX_CALLER_ERROR)
  894. {
  895. /* Increment the failed tests counter. */
  896. test_control_failed_tests++;
  897. /* Print error message. */
  898. printf("Error in checking of fxe_media_format!\n");
  899. }
  900. /* Clear the system state to simulate an ISR caller. */
  901. _tx_thread_system_state = 0;
  902. /* Call the _fxe_media_format to cause an error. */
  903. status = _fxe_media_format(&media_instance, fake_driver, FX_NULL, buffer, 0,
  904. FX_NULL, 0, 0, 0, 0, 0, 0, 0, 0);
  905. /* Check for the error. */
  906. if (status != FX_CALLER_ERROR)
  907. {
  908. /* Increment the failed tests counter. */
  909. test_control_failed_tests++;
  910. /* Print error message. */
  911. printf("Error in checking of fxe_media_format!\n");
  912. }
  913. #ifndef TX_TIMER_PROCESS_IN_ISR
  914. /* Set the current thread to the timer thread, for caller checking. */
  915. _tx_thread_current_ptr = &_tx_timer_thread;
  916. /* Call the _fxe_media_format to cause an error. */
  917. status = _fxe_media_format(&media_instance, fake_driver, FX_NULL, buffer, 0,
  918. FX_NULL, 0, 0, 0, 0, 0, 0, 0, 0);
  919. /* Set the current thread back to NULL. */
  920. _tx_thread_current_ptr = FX_NULL;
  921. /* Check for the error. */
  922. if (status != FX_CALLER_ERROR)
  923. {
  924. /* Increment the failed tests counter. */
  925. test_control_failed_tests++;
  926. /* Print error message. */
  927. printf("Error in checking of fxe_media_format!\n");
  928. }
  929. #endif
  930. /* Restore the system state. */
  931. _tx_thread_system_state = saved_system_state;
  932. /* Check caller error checking for fx_media_open. */
  933. /* Save the system state. */
  934. saved_system_state = _tx_thread_system_state;
  935. /* Call the _fxe_media_open to cause an error. */
  936. status = _fxe_media_open(&media_instance, FX_NULL, FX_NULL, FX_NULL,
  937. FX_NULL, 0, 0);
  938. /* Check for the error. */
  939. if (status != FX_PTR_ERROR)
  940. {
  941. /* Increment the failed tests counter. */
  942. test_control_failed_tests++;
  943. /* Print error message. */
  944. printf("Error in checking of fxe_media_open!\n");
  945. }
  946. /* Call the _fxe_media_open to cause an error. */
  947. status = _fxe_media_open(&media_instance, FX_NULL, fake_driver, FX_NULL,
  948. FX_NULL, 0, 0);
  949. /* Check for the error. */
  950. if (status != FX_PTR_ERROR)
  951. {
  952. /* Increment the failed tests counter. */
  953. test_control_failed_tests++;
  954. /* Print error message. */
  955. printf("Error in checking of fxe_media_open!\n");
  956. }
  957. /* Call the _fxe_media_open to cause an error. */
  958. status = _fxe_media_open(&media_instance, FX_NULL, fake_driver, FX_NULL,
  959. buffer, 0, 0);
  960. /* Check for the error. */
  961. if (status != FX_PTR_ERROR)
  962. {
  963. /* Increment the failed tests counter. */
  964. test_control_failed_tests++;
  965. /* Print error message. */
  966. printf("Error in checking of fxe_media_open!\n");
  967. }
  968. /* Setup the fake media structure. */
  969. media_instance.fx_media_id = FX_MEDIA_ID;
  970. /* Call the _fxe_media_format to cause an error. */
  971. status = _fxe_media_open(&media_instance, FX_NULL, fake_driver, FX_NULL,
  972. buffer, 0, sizeof(FX_MEDIA));
  973. /* Check for the error. */
  974. if (status != FX_CALLER_ERROR)
  975. {
  976. /* Increment the failed tests counter. */
  977. test_control_failed_tests++;
  978. /* Print error message. */
  979. printf("Error in checking of fxe_media_open!\n");
  980. }
  981. /* Clear the system state to simulate an ISR caller. */
  982. _tx_thread_system_state = 0;
  983. /* Call the _fxe_media_open to cause an error. */
  984. status = _fxe_media_open(&media_instance, FX_NULL, fake_driver, FX_NULL,
  985. buffer, 0, sizeof(FX_MEDIA));
  986. /* Check for the error. */
  987. if (status != FX_CALLER_ERROR)
  988. {
  989. /* Increment the failed tests counter. */
  990. test_control_failed_tests++;
  991. /* Print error message. */
  992. printf("Error in checking of fxe_media_open!\n");
  993. }
  994. #ifndef TX_TIMER_PROCESS_IN_ISR
  995. /* Set the current thread to the timer thread, for caller checking. */
  996. _tx_thread_current_ptr = &_tx_timer_thread;
  997. /* Call the _fxe_media_open to cause an error. */
  998. status = _fxe_media_open(&media_instance, FX_NULL, fake_driver, FX_NULL,
  999. buffer, 0, sizeof(FX_MEDIA));
  1000. /* Set the current thread back to NULL. */
  1001. _tx_thread_current_ptr = FX_NULL;
  1002. /* Check for the error. */
  1003. if (status != FX_CALLER_ERROR)
  1004. {
  1005. /* Increment the failed tests counter. */
  1006. test_control_failed_tests++;
  1007. /* Print error message. */
  1008. printf("Error in checking of fxe_media_open!\n");
  1009. }
  1010. #endif
  1011. /* Set the current thread to the test control thread, for error checking on the sector cache size. */
  1012. _tx_thread_current_ptr = &test_control_thread;
  1013. /* Save the actual sector cache size. */
  1014. temp = _fx_system_media_max_sector_cache;
  1015. _fx_system_media_max_sector_cache = 3;
  1016. /* Call the _fxe_media_open to cause an error. */
  1017. status = _fxe_media_open(&media_instance, FX_NULL, fake_driver, FX_NULL,
  1018. buffer, 0, sizeof(FX_MEDIA));
  1019. /* Restore the max sector cache size. */
  1020. _fx_system_media_max_sector_cache = temp;
  1021. /* Set the current thread back to NULL. */
  1022. _tx_thread_current_ptr = FX_NULL;
  1023. /* Check for the error. */
  1024. if (status != FX_MEDIA_INVALID)
  1025. {
  1026. /* Increment the failed tests counter. */
  1027. test_control_failed_tests++;
  1028. /* Print error message. */
  1029. printf("Error in checking of fxe_media_open!\n");
  1030. }
  1031. /* Set the current thread to the test control thread, for error checking on the sector cache size. */
  1032. _tx_thread_current_ptr = &test_control_thread;
  1033. /* Save the actual sector cache size. */
  1034. temp = _fx_system_media_max_sector_cache;
  1035. _fx_system_media_max_sector_cache = 6;
  1036. /* Call the _fxe_media_open to cause an error. */
  1037. status = _fxe_media_open(&media_instance, FX_NULL, fake_driver, FX_NULL,
  1038. buffer, 0, sizeof(FX_MEDIA));
  1039. /* Restore the max sector cache size. */
  1040. _fx_system_media_max_sector_cache = temp;
  1041. /* Set the current thread back to NULL. */
  1042. _tx_thread_current_ptr = FX_NULL;
  1043. /* Check for the error. */
  1044. if (status != FX_MEDIA_INVALID)
  1045. {
  1046. /* Increment the failed tests counter. */
  1047. test_control_failed_tests++;
  1048. /* Print error message. */
  1049. printf("Error in checking of fxe_media_open!\n");
  1050. }
  1051. /* Set the current thread to the test control thread, for error checking on the sector cache size. */
  1052. _tx_thread_current_ptr = &test_control_thread;
  1053. /* Save the actual FAT cache size. */
  1054. temp = _fx_system_media_max_fat_cache;
  1055. _fx_system_media_max_fat_cache = 3;
  1056. /* Call the _fxe_media_open to cause an error. */
  1057. status = _fxe_media_open(&media_instance, FX_NULL, fake_driver, FX_NULL,
  1058. buffer, 0, sizeof(FX_MEDIA));
  1059. /* Restore the max FAT cache size. */
  1060. _fx_system_media_max_fat_cache = temp;
  1061. /* Set the current thread back to NULL. */
  1062. _tx_thread_current_ptr = FX_NULL;
  1063. /* Check for the error. */
  1064. if (status != FX_MEDIA_INVALID)
  1065. {
  1066. /* Increment the failed tests counter. */
  1067. test_control_failed_tests++;
  1068. /* Print error message. */
  1069. printf("Error in checking of fxe_media_open!\n");
  1070. }
  1071. /* Set the current thread to the test control thread, for error checking on the sector cache size. */
  1072. _tx_thread_current_ptr = &test_control_thread;
  1073. /* Save the actual FAT cache size. */
  1074. temp = _fx_system_media_max_fat_cache;
  1075. _fx_system_media_max_fat_cache = 6;
  1076. /* Call the _fxe_media_open to cause an error. */
  1077. status = _fxe_media_open(&media_instance, FX_NULL, fake_driver, FX_NULL,
  1078. buffer, 0, sizeof(FX_MEDIA));
  1079. /* Restore the max FAT cache size. */
  1080. _fx_system_media_max_fat_cache = temp;
  1081. /* Set the current thread back to NULL. */
  1082. _tx_thread_current_ptr = FX_NULL;
  1083. /* Check for the error. */
  1084. if (status != FX_MEDIA_INVALID)
  1085. {
  1086. /* Increment the failed tests counter. */
  1087. test_control_failed_tests++;
  1088. /* Print error message. */
  1089. printf("Error in checking of fxe_media_open!\n");
  1090. }
  1091. /* Restore the system state. */
  1092. _tx_thread_system_state = saved_system_state;
  1093. /* Check caller error checking for fx_media_open_notify_set. */
  1094. /* Save the system state. */
  1095. saved_system_state = _tx_thread_system_state;
  1096. /* Call the _fxe_media_open_notify_set to cause an error. */
  1097. status = _fxe_media_open_notify_set(FX_NULL, FX_NULL);
  1098. /* Check for the error. */
  1099. if (status != FX_PTR_ERROR)
  1100. {
  1101. /* Increment the failed tests counter. */
  1102. test_control_failed_tests++;
  1103. /* Print error message. */
  1104. printf("Error in checking of fxe_media_open_notify_set!\n");
  1105. }
  1106. /* Setup the fake media structure. */
  1107. media_instance.fx_media_id = FX_MEDIA_ID;
  1108. /* Call the _fxe_media_open_notify_set to cause an error. */
  1109. status = _fxe_media_open_notify_set(&media_instance, FX_NULL);
  1110. /* Check for the error. */
  1111. if (status != FX_CALLER_ERROR)
  1112. {
  1113. /* Increment the failed tests counter. */
  1114. test_control_failed_tests++;
  1115. /* Print error message. */
  1116. printf("Error in checking of fxe_media_open_notify_set!\n");
  1117. }
  1118. /* Clear the system state to simulate an ISR caller. */
  1119. _tx_thread_system_state = 0;
  1120. /* Call the _fxe_media_open_notify_set to cause an error. */
  1121. status = _fxe_media_open_notify_set(&media_instance, FX_NULL);
  1122. /* Check for the error. */
  1123. if (status != FX_CALLER_ERROR)
  1124. {
  1125. /* Increment the failed tests counter. */
  1126. test_control_failed_tests++;
  1127. /* Print error message. */
  1128. printf("Error in checking of fxe_media_open_notify_set!\n");
  1129. }
  1130. #ifndef TX_TIMER_PROCESS_IN_ISR
  1131. /* Set the current thread to the timer thread, for caller checking. */
  1132. _tx_thread_current_ptr = &_tx_timer_thread;
  1133. /* Call the _fxe_media_open_notify_set to cause an error. */
  1134. status = _fxe_media_open_notify_set(&media_instance, FX_NULL);
  1135. /* Set the current thread back to NULL. */
  1136. _tx_thread_current_ptr = FX_NULL;
  1137. /* Check for the error. */
  1138. if (status != FX_CALLER_ERROR)
  1139. {
  1140. /* Increment the failed tests counter. */
  1141. test_control_failed_tests++;
  1142. /* Print error message. */
  1143. printf("Error in checking of fxe_media_open_notify_set!\n");
  1144. }
  1145. #endif
  1146. /* Restore the system state. */
  1147. _tx_thread_system_state = saved_system_state;
  1148. /* Check caller error checking for fx_media_read. */
  1149. /* Save the system state. */
  1150. saved_system_state = _tx_thread_system_state;
  1151. /* Call the _fxe_media_read to cause an error. */
  1152. status = _fxe_media_read(&media_instance, 0, FX_NULL);
  1153. /* Check for the error. */
  1154. if (status != FX_PTR_ERROR)
  1155. {
  1156. /* Increment the failed tests counter. */
  1157. test_control_failed_tests++;
  1158. /* Print error message. */
  1159. printf("Error in checking of fxe_media_read!\n");
  1160. }
  1161. /* Setup the fake media structure. */
  1162. media_instance.fx_media_id = FX_MEDIA_ID;
  1163. /* Call the _fxe_media_read to cause an error. */
  1164. status = _fxe_media_read(&media_instance, 0, buffer);
  1165. /* Check for the error. */
  1166. if (status != FX_CALLER_ERROR)
  1167. {
  1168. /* Increment the failed tests counter. */
  1169. test_control_failed_tests++;
  1170. /* Print error message. */
  1171. printf("Error in checking of fxe_media_read!\n");
  1172. }
  1173. /* Clear the system state to simulate an ISR caller. */
  1174. _tx_thread_system_state = 0;
  1175. /* Call the _fxe_media_read to cause an error. */
  1176. status = _fxe_media_read(&media_instance, 0, buffer);
  1177. /* Check for the error. */
  1178. if (status != FX_CALLER_ERROR)
  1179. {
  1180. /* Increment the failed tests counter. */
  1181. test_control_failed_tests++;
  1182. /* Print error message. */
  1183. printf("Error in checking of fxe_media_read!\n");
  1184. }
  1185. #ifndef TX_TIMER_PROCESS_IN_ISR
  1186. /* Set the current thread to the timer thread, for caller checking. */
  1187. _tx_thread_current_ptr = &_tx_timer_thread;
  1188. /* Call the _fxe_media_read to cause an error. */
  1189. status = _fxe_media_read(&media_instance, 0, buffer);
  1190. /* Set the current thread back to NULL. */
  1191. _tx_thread_current_ptr = FX_NULL;
  1192. /* Check for the error. */
  1193. if (status != FX_CALLER_ERROR)
  1194. {
  1195. /* Increment the failed tests counter. */
  1196. test_control_failed_tests++;
  1197. /* Print error message. */
  1198. printf("Error in checking of fxe_media_read!\n");
  1199. }
  1200. #endif
  1201. /* Restore the system state. */
  1202. _tx_thread_system_state = saved_system_state;
  1203. /* Check caller error checking for fx_media_space_available. */
  1204. /* Save the system state. */
  1205. saved_system_state = _tx_thread_system_state;
  1206. /* Setup the fake media structure. */
  1207. media_instance.fx_media_id = 0;
  1208. /* Fake test control thread running. */
  1209. _tx_thread_system_state = 0;
  1210. _tx_thread_current_ptr = &test_control_thread;
  1211. /* Call the _fxe_media_space_available to cause and error. */
  1212. status = _fxe_media_space_available(&media_instance, &temp);
  1213. _tx_thread_system_state = saved_system_state;
  1214. _tx_thread_current_ptr = FX_NULL;
  1215. /* Check for the error. */
  1216. if (status != FX_MEDIA_NOT_OPEN)
  1217. {
  1218. /* Increment the failed tests counter. */
  1219. test_control_failed_tests++;
  1220. /* Print error message. */
  1221. printf("Error in checking of fxe_media_space_available!\n");
  1222. }
  1223. /* Call the _fxe_media_space_available to cause an error. */
  1224. status = _fxe_media_space_available(&media_instance, FX_NULL);
  1225. /* Check for the error. */
  1226. if (status != FX_PTR_ERROR)
  1227. {
  1228. /* Increment the failed tests counter. */
  1229. test_control_failed_tests++;
  1230. /* Print error message. */
  1231. printf("Error in checking of fxe_media_space_available!\n");
  1232. }
  1233. /* Setup the fake media structure. */
  1234. media_instance.fx_media_id = FX_MEDIA_ID;
  1235. /* Call the _fxe_media_space_available to cause an error. */
  1236. status = _fxe_media_space_available(&media_instance, &temp);
  1237. /* Check for the error. */
  1238. if (status != FX_CALLER_ERROR)
  1239. {
  1240. /* Increment the failed tests counter. */
  1241. test_control_failed_tests++;
  1242. /* Print error message. */
  1243. printf("Error in checking of fxe_media_space_available!\n");
  1244. }
  1245. /* Clear the system state to simulate an ISR caller. */
  1246. _tx_thread_system_state = 0;
  1247. /* Call the _fxe_media_space_available to cause an error. */
  1248. status = _fxe_media_space_available(&media_instance, &temp);
  1249. /* Check for the error. */
  1250. if (status != FX_CALLER_ERROR)
  1251. {
  1252. /* Increment the failed tests counter. */
  1253. test_control_failed_tests++;
  1254. /* Print error message. */
  1255. printf("Error in checking of fxe_media_space_available!\n");
  1256. }
  1257. #ifndef TX_TIMER_PROCESS_IN_ISR
  1258. /* Set the current thread to the timer thread, for caller checking. */
  1259. _tx_thread_current_ptr = &_tx_timer_thread;
  1260. /* Call the _fxe_media_space_available to cause an error. */
  1261. status = _fxe_media_space_available(&media_instance, &temp);
  1262. /* Set the current thread back to NULL. */
  1263. _tx_thread_current_ptr = FX_NULL;
  1264. /* Check for the error. */
  1265. if (status != FX_CALLER_ERROR)
  1266. {
  1267. /* Increment the failed tests counter. */
  1268. test_control_failed_tests++;
  1269. /* Print error message. */
  1270. printf("Error in checking of fxe_media_space_available!\n");
  1271. }
  1272. #endif
  1273. /* Restore the system state. */
  1274. _tx_thread_system_state = saved_system_state;
  1275. /* Check caller error checking for fx_media_volume_get. */
  1276. /* Save the system state. */
  1277. saved_system_state = _tx_thread_system_state;
  1278. /* Call the _fxe_media_volume_get to cause an error. */
  1279. status = _fxe_media_volume_get(&media_instance, FX_NULL, 0);
  1280. /* Check for the error. */
  1281. if (status != FX_PTR_ERROR)
  1282. {
  1283. /* Increment the failed tests counter. */
  1284. test_control_failed_tests++;
  1285. /* Print error message. */
  1286. printf("Error in checking of fxe_media_volume_get!\n");
  1287. }
  1288. /* Call the _fxe_media_volume_get_extended to cause an error. */
  1289. status = _fxe_media_volume_get_extended(&media_instance, FX_NULL, 1, 0);
  1290. /* Check for the error. */
  1291. if (status != FX_PTR_ERROR)
  1292. {
  1293. /* Increment the failed tests counter. */
  1294. test_control_failed_tests++;
  1295. /* Print error message. */
  1296. printf("Error in checking of fxe_media_volume_get_extended!\n");
  1297. }
  1298. /* Call the _fxe_media_volume_get_extended to cause an error. */
  1299. status = _fxe_media_volume_get_extended(&media_instance, (CHAR*)buffer, 0, 0);
  1300. /* Check for the error. */
  1301. if (status != FX_BUFFER_ERROR)
  1302. {
  1303. /* Increment the failed tests counter. */
  1304. test_control_failed_tests++;
  1305. /* Print error message. */
  1306. printf("Error in checking of fxe_media_volume_get_extended!\n");
  1307. }
  1308. /* Setup the fake media structure. */
  1309. media_instance.fx_media_id = FX_MEDIA_ID;
  1310. /* Call the _fxe_media_volume_get to cause an error. */
  1311. status = _fxe_media_volume_get(&media_instance, (CHAR *)buffer, 0);
  1312. /* Check for the error. */
  1313. if (status != FX_CALLER_ERROR)
  1314. {
  1315. /* Increment the failed tests counter. */
  1316. test_control_failed_tests++;
  1317. /* Print error message. */
  1318. printf("Error in checking of fxe_media_volume_get!\n");
  1319. }
  1320. /* Call the _fxe_media_volume_get_extended to cause an error. */
  1321. status = _fxe_media_volume_get_extended(&media_instance, (CHAR*)buffer, sizeof(buffer), 0);
  1322. /* Check for the error. */
  1323. if (status != FX_CALLER_ERROR)
  1324. {
  1325. /* Increment the failed tests counter. */
  1326. test_control_failed_tests++;
  1327. /* Print error message. */
  1328. printf("Error in checking of fxe_media_volume_get_extended!\n");
  1329. }
  1330. /* Clear the system state to simulate an ISR caller. */
  1331. _tx_thread_system_state = 0;
  1332. /* Call the _fxe_media_volume_get to cause an error. */
  1333. status = _fxe_media_volume_get(&media_instance, (CHAR *)buffer, 0);
  1334. /* Check for the error. */
  1335. if (status != FX_CALLER_ERROR)
  1336. {
  1337. /* Increment the failed tests counter. */
  1338. test_control_failed_tests++;
  1339. /* Print error message. */
  1340. printf("Error in checking of fxe_media_volume_get!\n");
  1341. }
  1342. /* Call the _fxe_media_volume_get_extended to cause an error. */
  1343. status = _fxe_media_volume_get_extended(&media_instance, (CHAR*)buffer, sizeof(buffer), 0);
  1344. /* Check for the error. */
  1345. if (status != FX_CALLER_ERROR)
  1346. {
  1347. /* Increment the failed tests counter. */
  1348. test_control_failed_tests++;
  1349. /* Print error message. */
  1350. printf("Error in checking of fxe_media_volume_get_extended!\n");
  1351. }
  1352. #ifndef TX_TIMER_PROCESS_IN_ISR
  1353. /* Set the current thread to the timer thread, for caller checking. */
  1354. _tx_thread_current_ptr = &_tx_timer_thread;
  1355. /* Call the _fxe_media_volume_get to cause an error. */
  1356. status = _fxe_media_volume_get(&media_instance, (CHAR *)buffer, 0);
  1357. /* Set the current thread back to NULL. */
  1358. _tx_thread_current_ptr = FX_NULL;
  1359. /* Check for the error. */
  1360. if (status != FX_CALLER_ERROR)
  1361. {
  1362. /* Increment the failed tests counter. */
  1363. test_control_failed_tests++;
  1364. /* Print error message. */
  1365. printf("Error in checking of fxe_media_volume_get!\n");
  1366. }
  1367. /* Set the current thread to the timer thread, for caller checking. */
  1368. _tx_thread_current_ptr = &_tx_timer_thread;
  1369. /* Call the _fxe_media_volume_get_extended to cause an error. */
  1370. status = _fxe_media_volume_get_extended(&media_instance, (CHAR*)buffer, 1, 0);
  1371. /* Set the current thread back to NULL. */
  1372. _tx_thread_current_ptr = FX_NULL;
  1373. /* Check for the error. */
  1374. if (status != FX_CALLER_ERROR)
  1375. {
  1376. /* Increment the failed tests counter. */
  1377. test_control_failed_tests++;
  1378. /* Print error message. */
  1379. printf("Error in checking of fxe_media_volume_get_extended!\n");
  1380. }
  1381. #endif
  1382. /* Restore the system state. */
  1383. _tx_thread_system_state = saved_system_state;
  1384. /* Check caller error checking for fx_media_volume_set. */
  1385. /* Save the system state. */
  1386. saved_system_state = _tx_thread_system_state;
  1387. /* Call the _fxe_media_volume_set to cause an error. */
  1388. status = _fxe_media_volume_set(&media_instance, FX_NULL);
  1389. /* Check for the error. */
  1390. if (status != FX_PTR_ERROR)
  1391. {
  1392. /* Increment the failed tests counter. */
  1393. test_control_failed_tests++;
  1394. /* Print error message. */
  1395. printf("Error in checking of fxe_media_volume_set!\n");
  1396. }
  1397. /* Call the _fxe_media_volume_set to cause an error. */
  1398. buffer[0] = 0;
  1399. status = _fxe_media_volume_set(&media_instance, (CHAR *)buffer);
  1400. /* Check for the error. */
  1401. if (status != FX_PTR_ERROR)
  1402. {
  1403. /* Increment the failed tests counter. */
  1404. test_control_failed_tests++;
  1405. /* Print error message. */
  1406. printf("Error in checking of fxe_media_volume_set!\n");
  1407. }
  1408. /* Setup the fake media structure. */
  1409. media_instance.fx_media_id = FX_MEDIA_ID;
  1410. /* Call the _fxe_media_volume_set to cause an error. */
  1411. status = _fxe_media_volume_set(&media_instance, "MYVOL");
  1412. /* Check for the error. */
  1413. if (status != FX_CALLER_ERROR)
  1414. {
  1415. /* Increment the failed tests counter. */
  1416. test_control_failed_tests++;
  1417. /* Print error message. */
  1418. printf("Error in checking of fxe_media_volume_set!\n");
  1419. }
  1420. /* Clear the system state to simulate an ISR caller. */
  1421. _tx_thread_system_state = 0;
  1422. /* Call the _fxe_media_volume_set to cause an error. */
  1423. status = _fxe_media_volume_set(&media_instance, "MYVOL");
  1424. /* Check for the error. */
  1425. if (status != FX_CALLER_ERROR)
  1426. {
  1427. /* Increment the failed tests counter. */
  1428. test_control_failed_tests++;
  1429. /* Print error message. */
  1430. printf("Error in checking of fxe_media_volume_set!\n");
  1431. }
  1432. #ifndef TX_TIMER_PROCESS_IN_ISR
  1433. /* Set the current thread to the timer thread, for caller checking. */
  1434. _tx_thread_current_ptr = &_tx_timer_thread;
  1435. /* Call the _fxe_media_volume_set to cause an error. */
  1436. status = _fxe_media_volume_set(&media_instance, "MYVOL");
  1437. /* Set the current thread back to NULL. */
  1438. _tx_thread_current_ptr = FX_NULL;
  1439. /* Check for the error. */
  1440. if (status != FX_CALLER_ERROR)
  1441. {
  1442. /* Increment the failed tests counter. */
  1443. test_control_failed_tests++;
  1444. /* Print error message. */
  1445. printf("Error in checking of fxe_media_volume_set!\n");
  1446. }
  1447. #endif
  1448. /* Restore the system state. */
  1449. _tx_thread_system_state = saved_system_state;
  1450. /* Check caller error checking for fx_media_volume_set. */
  1451. /* Save the system state. */
  1452. saved_system_state = _tx_thread_system_state;
  1453. /* Setup the fake media structure. */
  1454. media_instance.fx_media_id = FX_MEDIA_ID;
  1455. /* Call the _fxe_media_write to cause an error. */
  1456. status = _fxe_media_write(&media_instance, 0, buffer);
  1457. /* Check for the error. */
  1458. if (status != FX_CALLER_ERROR)
  1459. {
  1460. /* Increment the failed tests counter. */
  1461. test_control_failed_tests++;
  1462. /* Print error message. */
  1463. printf("Error in checking of fxe_media_write!\n");
  1464. }
  1465. /* Clear the system state to simulate an ISR caller. */
  1466. _tx_thread_system_state = 0;
  1467. /* Call the _fxe_media_write to cause an error. */
  1468. status = _fxe_media_write(&media_instance, 0, buffer);
  1469. /* Check for the error. */
  1470. if (status != FX_CALLER_ERROR)
  1471. {
  1472. /* Increment the failed tests counter. */
  1473. test_control_failed_tests++;
  1474. /* Print error message. */
  1475. printf("Error in checking of fxe_media_write!\n");
  1476. }
  1477. #ifndef TX_TIMER_PROCESS_IN_ISR
  1478. /* Set the current thread to the timer thread, for caller checking. */
  1479. _tx_thread_current_ptr = &_tx_timer_thread;
  1480. /* Call the _fxe_media_write to cause an error. */
  1481. status = _fxe_media_write(&media_instance, 0, buffer);
  1482. /* Set the current thread back to NULL. */
  1483. _tx_thread_current_ptr = FX_NULL;
  1484. /* Check for the error. */
  1485. if (status != FX_CALLER_ERROR)
  1486. {
  1487. /* Increment the failed tests counter. */
  1488. test_control_failed_tests++;
  1489. /* Print error message. */
  1490. printf("Error in checking of fxe_media_write!\n");
  1491. }
  1492. #endif
  1493. /* Restore the system state. */
  1494. _tx_thread_system_state = saved_system_state;
  1495. /* Check caller error checking for fx_unicode_directory_create. */
  1496. /* Save the system state. */
  1497. saved_system_state = _tx_thread_system_state;
  1498. /* Setup the fake media structure. */
  1499. media_instance.fx_media_id = FX_MEDIA_ID;
  1500. /* Call the _fxe_unicode_directory_create with a NULL source name to cause an error. */
  1501. status = _fxe_unicode_directory_create(&media_instance, FX_NULL, 0, "SHORT");
  1502. /* Check for the error. */
  1503. if (status != FX_PTR_ERROR)
  1504. {
  1505. /* Increment the failed tests counter. */
  1506. test_control_failed_tests++;
  1507. /* Print error message. */
  1508. printf("Error in checking of fxe_unicode_directory_create!\n");
  1509. }
  1510. /* Call the _fxe_unicode_directory_create with a zero source name lenght to cause an error. */
  1511. status = _fxe_unicode_directory_create(&media_instance, unicode_name, 0, "SHORT");
  1512. /* Check for the error. */
  1513. if (status != FX_PTR_ERROR)
  1514. {
  1515. /* Increment the failed tests counter. */
  1516. test_control_failed_tests++;
  1517. /* Print error message. */
  1518. printf("Error in checking of fxe_unicode_directory_create!\n");
  1519. }
  1520. /* Call the _fxe_unicode_directory_create with a NULL source short name to cause an error. */
  1521. status = _fxe_unicode_directory_create(&media_instance, unicode_name, 8, FX_NULL);
  1522. /* Check for the error. */
  1523. if (status != FX_PTR_ERROR)
  1524. {
  1525. /* Increment the failed tests counter. */
  1526. test_control_failed_tests++;
  1527. /* Print error message. */
  1528. printf("Error in checking of fxe_unicode_directory_create!\n");
  1529. }
  1530. /* Call the _fxe_unicode_directory_create to cause an FX_CALLER_ERROR error. */
  1531. status = _fxe_unicode_directory_create(&media_instance, unicode_name, 6,"SHORT");
  1532. /* Check for the error. */
  1533. if (status != FX_CALLER_ERROR)
  1534. {
  1535. /* Increment the failed tests counter. */
  1536. test_control_failed_tests++;
  1537. /* Print error message. */
  1538. printf("Error in checking of fxe_unicode_directory_create!\n");
  1539. }
  1540. /* Call the _fxe_unicode_directory_create to cause an error. */
  1541. status = _fxe_unicode_directory_create(&media_instance, unicode_name, 6, "SHORT");
  1542. /* Check for the error. */
  1543. if (status != FX_CALLER_ERROR)
  1544. {
  1545. /* Increment the failed tests counter. */
  1546. test_control_failed_tests++;
  1547. /* Print error message. */
  1548. printf("Error in checking of fxe_unicode_directory_create!\n");
  1549. }
  1550. /* Clear the system state to simulate an ISR caller. */
  1551. _tx_thread_system_state = 0;
  1552. /* Call the _fxe_unicode_directory_create to cause an error. */
  1553. status = _fxe_unicode_directory_create(&media_instance, unicode_name, 6, "SHORT");
  1554. /* Check for the error. */
  1555. if (status != FX_CALLER_ERROR)
  1556. {
  1557. /* Increment the failed tests counter. */
  1558. test_control_failed_tests++;
  1559. /* Print error message. */
  1560. printf("Error in checking of fxe_unicode_directory_create!\n");
  1561. }
  1562. #ifndef TX_TIMER_PROCESS_IN_ISR
  1563. /* Set the current thread to the timer thread, for caller checking. */
  1564. _tx_thread_current_ptr = &_tx_timer_thread;
  1565. /* Call the _fxe_unicode_directory_create to cause an error. */
  1566. status = _fxe_unicode_directory_create(&media_instance, (UCHAR *)"UNICODE NAME'\0''\0'", 6, "SHORT");
  1567. /* Set the current thread back to NULL. */
  1568. _tx_thread_current_ptr = FX_NULL;
  1569. /* Check for the error. */
  1570. if (status != FX_CALLER_ERROR)
  1571. {
  1572. /* Increment the failed tests counter. */
  1573. test_control_failed_tests++;
  1574. /* Print error message. */
  1575. printf("Error in checking of fxe_unicode_directory_create!\n");
  1576. }
  1577. #endif
  1578. /* Restore the system state. */
  1579. _tx_thread_system_state = saved_system_state;
  1580. /* Check caller error checking for fx_unicode_directory_rename. */
  1581. /* Save the system state. */
  1582. saved_system_state = _tx_thread_system_state;
  1583. /* Setup the fake media structure. */
  1584. media_instance.fx_media_id = FX_MEDIA_ID;
  1585. /* Call the _fxe_unicode_directory_rename with a NULL old unicode name to cause an error. */
  1586. status = _fxe_unicode_directory_rename(&media_instance, FX_NULL, 0, FX_NULL, 0, FX_NULL);
  1587. /* Check for the error. */
  1588. if (status != FX_PTR_ERROR)
  1589. {
  1590. /* Increment the failed tests counter. */
  1591. test_control_failed_tests++;
  1592. /* Print error message. */
  1593. printf("Error in checking of fxe_unicode_directory_rename!\n");
  1594. }
  1595. /* Call the _fxe_unicode_directory_rename with a zero length old unicode name to cause an error. */
  1596. status = _fxe_unicode_directory_rename(&media_instance, (UCHAR *)"OLD_UNICODE_NAME", 0, FX_NULL, 0, FX_NULL);
  1597. /* Check for the error. */
  1598. if (status != FX_PTR_ERROR)
  1599. {
  1600. /* Increment the failed tests counter. */
  1601. test_control_failed_tests++;
  1602. /* Print error message. */
  1603. printf("Error in checking of fxe_unicode_directory_rename!\n");
  1604. }
  1605. /* Call the _fxe_unicode_directory_rename with a NULL new unicode name to cause an error. */
  1606. status = _fxe_unicode_directory_rename(&media_instance, (UCHAR *)"OLD_UNICODE_NAME", 16, FX_NULL, 0, FX_NULL);
  1607. /* Check for the error. */
  1608. if (status != FX_PTR_ERROR)
  1609. {
  1610. /* Increment the failed tests counter. */
  1611. test_control_failed_tests++;
  1612. /* Print error message. */
  1613. printf("Error in checking of fxe_unicode_directory_rename!\n");
  1614. }
  1615. /* Call the _fxe_unicode_directory_rename with a zero lenght new unicode name to cause an error. */
  1616. status = _fxe_unicode_directory_rename(&media_instance, (UCHAR *)"OLD_UNICODE_NAME", 16, (UCHAR *)"NEW_UNICODE_NAME", 0, FX_NULL);
  1617. /* Check for the error. */
  1618. if (status != FX_PTR_ERROR)
  1619. {
  1620. /* Increment the failed tests counter. */
  1621. test_control_failed_tests++;
  1622. /* Print error message. */
  1623. printf("Error in checking of fxe_unicode_directory_rename!\n");
  1624. }
  1625. /* Call the _fxe_unicode_directory_rename with a NULL new short name to cause an error. */
  1626. status = _fxe_unicode_directory_rename(&media_instance, (UCHAR *)"OLD_UNICODE_NAME", 16, (UCHAR *)"NEW_UNICODE_NAME", 16, FX_NULL);
  1627. /* Check for the error. */
  1628. if (status != FX_PTR_ERROR)
  1629. {
  1630. /* Increment the failed tests counter. */
  1631. test_control_failed_tests++;
  1632. /* Print error message. */
  1633. printf("Error in checking of fxe_unicode_directory_rename!\n");
  1634. }
  1635. /* Call the _fxe_unicode_directory_rename to cause an error. */
  1636. status = _fxe_unicode_directory_rename(&media_instance, (UCHAR *)"OLD_UNICODE_NAME", 16, (UCHAR *)"NEW_UNICODE_NAME", 16, "SHORT");
  1637. /* Check for the error. */
  1638. if (status != FX_CALLER_ERROR)
  1639. {
  1640. /* Increment the failed tests counter. */
  1641. test_control_failed_tests++;
  1642. /* Print error message. */
  1643. printf("Error in checking of fxe_unicode_directory_rename!\n");
  1644. }
  1645. /* Clear the system state to simulate an ISR caller. */
  1646. _tx_thread_system_state = 0;
  1647. /* Call the _fxe_unicode_directory_rename to cause an error. */
  1648. status = _fxe_unicode_directory_rename(&media_instance, (UCHAR *)"OLD_UNICODE_NAME", 16, (UCHAR *)"NEW_UNICODE_NAME", 16, "SHORT");
  1649. /* Check for the error. */
  1650. if (status != FX_CALLER_ERROR)
  1651. {
  1652. /* Increment the failed tests counter. */
  1653. test_control_failed_tests++;
  1654. /* Print error message. */
  1655. printf("Error in checking of fxe_unicode_directory_rename!\n");
  1656. }
  1657. #ifndef TX_TIMER_PROCESS_IN_ISR
  1658. /* Set the current thread to the timer thread, for caller checking. */
  1659. _tx_thread_current_ptr = &_tx_timer_thread;
  1660. /* Call the _fxe_unicode_directory_rename to cause an error. */
  1661. status = _fxe_unicode_directory_rename(&media_instance, (UCHAR *)"OLD_UNICODE_NAME", 16, (UCHAR *)"NEW_UNICODE_NAME", 16, "SHORT");
  1662. /* Set the current thread back to NULL. */
  1663. _tx_thread_current_ptr = FX_NULL;
  1664. /* Check for the error. */
  1665. if (status != FX_CALLER_ERROR)
  1666. {
  1667. /* Increment the failed tests counter. */
  1668. test_control_failed_tests++;
  1669. /* Print error message. */
  1670. printf("Error in checking of fxe_unicode_file_rename!\n");
  1671. }
  1672. #endif
  1673. /* Restore the system state. */
  1674. _tx_thread_system_state = saved_system_state;
  1675. /* Check caller error checking for fx_unicode_file_create. */
  1676. /* Save the system state. */
  1677. saved_system_state = _tx_thread_system_state;
  1678. /* Setup the fake media structure. */
  1679. media_instance.fx_media_id = FX_MEDIA_ID;
  1680. /* Call the _fxe_unicode_file_create with a NULL source name to cause an error. */
  1681. status = _fxe_unicode_file_create(&media_instance, FX_NULL, 0, "SHORT");
  1682. /* Check for the error. */
  1683. if (status != FX_PTR_ERROR)
  1684. {
  1685. /* Increment the failed tests counter. */
  1686. test_control_failed_tests++;
  1687. /* Print error message. */
  1688. printf("Error in checking of fxe_unicode_file_create!\n");
  1689. }
  1690. /* Call the _fxe_unicode_file_create with a zero source name lenght to cause an error. */
  1691. status = _fxe_unicode_file_create(&media_instance, (UCHAR *)"UNICODE NAME", 0, "SHORT");
  1692. /* Check for the error. */
  1693. if (status != FX_PTR_ERROR)
  1694. {
  1695. /* Increment the failed tests counter. */
  1696. test_control_failed_tests++;
  1697. /* Print error message. */
  1698. printf("Error in checking of fxe_unicode_file_create!\n");
  1699. }
  1700. /* Call the _fxe_unicode_file_create with a NULL source short name to cause an error. */
  1701. status = _fxe_unicode_file_create(&media_instance, (UCHAR *)"UNICODE NAME", 6, FX_NULL);
  1702. /* Check for the error. */
  1703. if (status != FX_PTR_ERROR)
  1704. {
  1705. /* Increment the failed tests counter. */
  1706. test_control_failed_tests++;
  1707. /* Print error message. */
  1708. printf("Error in checking of fxe_unicode_file_create!\n");
  1709. }
  1710. /* Call the _fxe_unicode_file_create to cause an error. */
  1711. status = _fxe_unicode_file_create(&media_instance, (UCHAR *)"UNICODE NAME", 6, "SHORT");
  1712. /* Check for the error. */
  1713. if (status != FX_CALLER_ERROR)
  1714. {
  1715. /* Increment the failed tests counter. */
  1716. test_control_failed_tests++;
  1717. /* Print error message. */
  1718. printf("Error in checking of fxe_unicode_file_create!\n");
  1719. }
  1720. /* Clear the system state to simulate an ISR caller. */
  1721. _tx_thread_system_state = 0;
  1722. /* Call the _fxe_unicode_file_create to cause an error. */
  1723. status = _fxe_unicode_file_create(&media_instance, (UCHAR *)"UNICODE NAME", 6, "SHORT");
  1724. /* Check for the error. */
  1725. if (status != FX_CALLER_ERROR)
  1726. {
  1727. /* Increment the failed tests counter. */
  1728. test_control_failed_tests++;
  1729. /* Print error message. */
  1730. printf("Error in checking of fxe_unicode_file_create!\n");
  1731. }
  1732. #ifndef TX_TIMER_PROCESS_IN_ISR
  1733. /* Set the current thread to the timer thread, for caller checking. */
  1734. _tx_thread_current_ptr = &_tx_timer_thread;
  1735. /* Call the _fxe_unicode_file_create to cause an error. */
  1736. status = _fxe_unicode_file_create(&media_instance, (UCHAR *)"UNICODE NAME", 6, "SHORT");
  1737. /* Set the current thread back to NULL. */
  1738. _tx_thread_current_ptr = FX_NULL;
  1739. /* Check for the error. */
  1740. if (status != FX_CALLER_ERROR)
  1741. {
  1742. /* Increment the failed tests counter. */
  1743. test_control_failed_tests++;
  1744. /* Print error message. */
  1745. printf("Error in checking of fxe_unicode_file_create!\n");
  1746. }
  1747. #endif
  1748. /* Restore the system state. */
  1749. _tx_thread_system_state = saved_system_state;
  1750. /* Check caller error checking for fx_unicode_file_rename. */
  1751. /* Save the system state. */
  1752. saved_system_state = _tx_thread_system_state;
  1753. /* Setup the fake media structure. */
  1754. media_instance.fx_media_id = FX_MEDIA_ID;
  1755. /* Call the _fxe_unicode_file_rename with a NULL old unicode name to cause an error. */
  1756. status = _fxe_unicode_file_rename(&media_instance, FX_NULL, 0, FX_NULL, 0, FX_NULL);
  1757. /* Check for the error. */
  1758. if (status != FX_PTR_ERROR)
  1759. {
  1760. /* Increment the failed tests counter. */
  1761. test_control_failed_tests++;
  1762. /* Print error message. */
  1763. printf("Error in checking of fxe_unicode_file_rename!\n");
  1764. }
  1765. /* Call the _fxe_unicode_file_rename with a zero length old unicode name to cause an error. */
  1766. status = _fxe_unicode_file_rename(&media_instance, (UCHAR *)"OLD_UNICODE_NAME", 0, FX_NULL, 0, FX_NULL);
  1767. /* Check for the error. */
  1768. if (status != FX_PTR_ERROR)
  1769. {
  1770. /* Increment the failed tests counter. */
  1771. test_control_failed_tests++;
  1772. /* Print error message. */
  1773. printf("Error in checking of fxe_unicode_file_rename!\n");
  1774. }
  1775. /* Call the _fxe_unicode_file_rename with a NULL new unicode name to cause an error. */
  1776. status = _fxe_unicode_file_rename(&media_instance, (UCHAR *)"OLD_UNICODE_NAME", 16, FX_NULL, 0, FX_NULL);
  1777. /* Check for the error. */
  1778. if (status != FX_PTR_ERROR)
  1779. {
  1780. /* Increment the failed tests counter. */
  1781. test_control_failed_tests++;
  1782. /* Print error message. */
  1783. printf("Error in checking of fxe_unicode_file_rename!\n");
  1784. }
  1785. /* Call the _fxe_unicode_file_rename with a zero lenght new unicode name to cause an error. */
  1786. status = _fxe_unicode_file_rename(&media_instance, (UCHAR *)"OLD_UNICODE_NAME", 16, (UCHAR *)"NEW_UNICODE_NAME", 0, FX_NULL);
  1787. /* Check for the error. */
  1788. if (status != FX_PTR_ERROR)
  1789. {
  1790. /* Increment the failed tests counter. */
  1791. test_control_failed_tests++;
  1792. /* Print error message. */
  1793. printf("Error in checking of fxe_unicode_file_rename!\n");
  1794. }
  1795. /* Call the _fxe_unicode_file_rename with a NULL new short name to cause an error. */
  1796. status = _fxe_unicode_file_rename(&media_instance, (UCHAR *)"OLD_UNICODE_NAME", 16, (UCHAR *)"NEW_UNICODE_NAME", 16, FX_NULL);
  1797. /* Check for the error. */
  1798. if (status != FX_PTR_ERROR)
  1799. {
  1800. /* Increment the failed tests counter. */
  1801. test_control_failed_tests++;
  1802. /* Print error message. */
  1803. printf("Error in checking of fxe_unicode_file_rename!\n");
  1804. }
  1805. /* Call the _fxe_unicode_file_rename to cause an error. */
  1806. status = _fxe_unicode_file_rename(&media_instance, (UCHAR *)"OLD_UNICODE_NAME", 16, (UCHAR *)"NEW_UNICODE_NAME", 16, "SHORT");
  1807. /* Check for the error. */
  1808. if (status != FX_CALLER_ERROR)
  1809. {
  1810. /* Increment the failed tests counter. */
  1811. test_control_failed_tests++;
  1812. /* Print error message. */
  1813. printf("Error in checking of fxe_unicode_file_rename!\n");
  1814. }
  1815. /* Clear the system state to simulate an ISR caller. */
  1816. _tx_thread_system_state = 0;
  1817. /* Call the _fxe_unicode_file_rename to cause an error. */
  1818. status = _fxe_unicode_file_rename(&media_instance, (UCHAR *)"OLD_UNICODE_NAME", 16, (UCHAR *)"NEW_UNICODE_NAME", 16, "SHORT");
  1819. /* Check for the error. */
  1820. if (status != FX_CALLER_ERROR)
  1821. {
  1822. /* Increment the failed tests counter. */
  1823. test_control_failed_tests++;
  1824. /* Print error message. */
  1825. printf("Error in checking of fxe_unicode_file_rename!\n");
  1826. }
  1827. #ifndef TX_TIMER_PROCESS_IN_ISR
  1828. /* Set the current thread to the timer thread, for caller checking. */
  1829. _tx_thread_current_ptr = &_tx_timer_thread;
  1830. /* Call the _fxe_unicode_file_rename to cause an error. */
  1831. status = _fxe_unicode_file_rename(&media_instance, (UCHAR *)"OLD_UNICODE_NAME", 16, (UCHAR *)"NEW_UNICODE_NAME", 16, "SHORT");
  1832. /* Set the current thread back to NULL. */
  1833. _tx_thread_current_ptr = FX_NULL;
  1834. /* Check for the error. */
  1835. if (status != FX_CALLER_ERROR)
  1836. {
  1837. /* Increment the failed tests counter. */
  1838. test_control_failed_tests++;
  1839. /* Print error message. */
  1840. printf("Error in checking of fxe_unicode_file_rename!\n");
  1841. }
  1842. #endif
  1843. /* Restore the system state. */
  1844. _tx_thread_system_state = saved_system_state;
  1845. /* Check caller error checking for fx_unicode_name_get. */
  1846. /* Save the system state. */
  1847. saved_system_state = _tx_thread_system_state;
  1848. /* Setup the fake media structure. */
  1849. media_instance.fx_media_id = FX_MEDIA_ID;
  1850. /* Call the _fxe_unicode_name_get with a NULL short name to cause an error. */
  1851. status = _fxe_unicode_name_get(&media_instance, FX_NULL, FX_NULL, FX_NULL);
  1852. /* Check for the error. */
  1853. if (status != FX_PTR_ERROR)
  1854. {
  1855. /* Increment the failed tests counter. */
  1856. test_control_failed_tests++;
  1857. /* Print error message. */
  1858. printf("Error in checking of fxe_unicode_name_get!\n");
  1859. }
  1860. /* Call the _fxe_unicode_name_get with a NULL destination name to cause an error. */
  1861. status = _fxe_unicode_name_get(&media_instance, "SHORTNAME", FX_NULL, FX_NULL);
  1862. /* Check for the error. */
  1863. if (status != FX_PTR_ERROR)
  1864. {
  1865. /* Increment the failed tests counter. */
  1866. test_control_failed_tests++;
  1867. /* Print error message. */
  1868. printf("Error in checking of fxe_unicode_name_get!\n");
  1869. }
  1870. /* Call the _fxe_unicode_name_get with a NULL destination name size to cause an error. */
  1871. status = _fxe_unicode_name_get(&media_instance, "SHORTNAME", (UCHAR *)"DESTINATION", FX_NULL);
  1872. /* Check for the error. */
  1873. if (status != FX_PTR_ERROR)
  1874. {
  1875. /* Increment the failed tests counter. */
  1876. test_control_failed_tests++;
  1877. /* Print error message. */
  1878. printf("Error in checking of fxe_unicode_name_get!\n");
  1879. }
  1880. /* Call the _fxe_unicode_name_get to cause an error. */
  1881. status = _fxe_unicode_name_get(&media_instance, "SHORTNAME", (UCHAR *)"DESTINATION", &temp);
  1882. /* Check for the error. */
  1883. if (status != FX_CALLER_ERROR)
  1884. {
  1885. /* Increment the failed tests counter. */
  1886. test_control_failed_tests++;
  1887. /* Print error message. */
  1888. printf("Error in checking of fxe_unicode_name_get!\n");
  1889. }
  1890. /* Call the _fxe_unicode_name_get_extended with a NULL short name to cause an error. */
  1891. status = _fxe_unicode_name_get_extended(FX_NULL, FX_NULL, FX_NULL, FX_NULL, 0);
  1892. /* Check for the error. */
  1893. if (status != FX_PTR_ERROR)
  1894. {
  1895. /* Increment the failed tests counter. */
  1896. test_control_failed_tests++;
  1897. /* Print error message. */
  1898. printf("Error in checking of fxe_unicode_name_get_extended!\n");
  1899. }
  1900. /* Call the _fxe_unicode_name_get_extended with a NULL short name to cause an error. */
  1901. status = _fxe_unicode_name_get_extended(&media_instance, FX_NULL, FX_NULL, FX_NULL, 0);
  1902. /* Check for the error. */
  1903. if (status != FX_PTR_ERROR)
  1904. {
  1905. /* Increment the failed tests counter. */
  1906. test_control_failed_tests++;
  1907. /* Print error message. */
  1908. printf("Error in checking of fxe_unicode_name_get_extended!\n");
  1909. }
  1910. /* Call the _fxe_unicode_name_get_extended with a NULL destination name to cause an error. */
  1911. status = _fxe_unicode_name_get_extended(&media_instance, "SHORTNAME", FX_NULL, FX_NULL, 0);
  1912. /* Check for the error. */
  1913. if (status != FX_PTR_ERROR)
  1914. {
  1915. /* Increment the failed tests counter. */
  1916. test_control_failed_tests++;
  1917. /* Print error message. */
  1918. printf("Error in checking of fxe_unicode_name_get_extended!\n");
  1919. }
  1920. /* Call the _fxe_unicode_name_get_extended with a NULL destination name size to cause an error. */
  1921. status = _fxe_unicode_name_get_extended(&media_instance, "SHORTNAME", (UCHAR*)"DESTINATION", FX_NULL, 0);
  1922. /* Check for the error. */
  1923. if (status != FX_PTR_ERROR)
  1924. {
  1925. /* Increment the failed tests counter. */
  1926. test_control_failed_tests++;
  1927. /* Print error message. */
  1928. printf("Error in checking of fxe_unicode_name_get_extended!\n");
  1929. }
  1930. /* Call the _fxe_unicode_name_get_extended to cause an error. */
  1931. status = _fxe_unicode_name_get_extended(&media_instance, "SHORTNAME", (UCHAR*)"DESTINATION", &temp, 1);
  1932. /* Check for the error. */
  1933. if (status != FX_CALLER_ERROR)
  1934. {
  1935. /* Increment the failed tests counter. */
  1936. test_control_failed_tests++;
  1937. /* Print error message. */
  1938. printf("Error in checking of fxe_unicode_name_get_extended!\n");
  1939. }
  1940. /* Call the _fxe_unicode_name_get_extended to cause an error. */
  1941. status = _fxe_unicode_name_get_extended(&media_instance, "SHORTNAME", (UCHAR*)"DESTINATION", &temp, 0);
  1942. /* Check for the error. */
  1943. if (status != FX_BUFFER_ERROR)
  1944. {
  1945. /* Increment the failed tests counter. */
  1946. test_control_failed_tests++;
  1947. /* Print error message. */
  1948. printf("Error in checking of fxe_unicode_name_get_extended!\n");
  1949. }
  1950. /* Clear the system state to simulate an ISR caller. */
  1951. _tx_thread_system_state = 0;
  1952. /* Call the _fxe_unicode_name_get to cause an error. */
  1953. status = _fxe_unicode_name_get(&media_instance, "SHORTNAME", (UCHAR *)"DESTINATION", &temp);
  1954. /* Check for the error. */
  1955. if (status != FX_CALLER_ERROR)
  1956. {
  1957. /* Increment the failed tests counter. */
  1958. test_control_failed_tests++;
  1959. /* Print error message. */
  1960. printf("Error in checking of fxe_unicode_name_get!\n");
  1961. }
  1962. /* Call the _fxe_unicode_name_get_extended to cause an error. */
  1963. status = _fxe_unicode_name_get_extended(&media_instance, "SHORTNAME", (UCHAR*)"DESTINATION", &temp, 1);
  1964. /* Check for the error. */
  1965. if (status != FX_CALLER_ERROR)
  1966. {
  1967. /* Increment the failed tests counter. */
  1968. test_control_failed_tests++;
  1969. /* Print error message. */
  1970. printf("Error in checking of fxe_unicode_name_get_extended!\n");
  1971. }
  1972. #ifndef TX_TIMER_PROCESS_IN_ISR
  1973. /* Set the current thread to the timer thread, for caller checking. */
  1974. _tx_thread_current_ptr = &_tx_timer_thread;
  1975. /* Call the _fxe_unicode_name_get to cause an error. */
  1976. status = _fxe_unicode_name_get(&media_instance, "SHORTNAME", (UCHAR *)"DESTINATION", &temp);
  1977. /* Set the current thread back to NULL. */
  1978. _tx_thread_current_ptr = FX_NULL;
  1979. /* Check for the error. */
  1980. if (status != FX_CALLER_ERROR)
  1981. {
  1982. /* Increment the failed tests counter. */
  1983. test_control_failed_tests++;
  1984. /* Print error message. */
  1985. printf("Error in checking of fxe_unicode_name_get!\n");
  1986. }
  1987. /* Set the current thread to the timer thread, for caller checking. */
  1988. _tx_thread_current_ptr = &_tx_timer_thread;
  1989. /* Call the _fxe_unicode_name_get_extended to cause an error. */
  1990. status = _fxe_unicode_name_get_extended(&media_instance, "SHORTNAME", (UCHAR*)"DESTINATION", &temp, 1);
  1991. /* Set the current thread back to NULL. */
  1992. _tx_thread_current_ptr = FX_NULL;
  1993. /* Check for the error. */
  1994. if (status != FX_CALLER_ERROR)
  1995. {
  1996. /* Increment the failed tests counter. */
  1997. test_control_failed_tests++;
  1998. /* Print error message. */
  1999. printf("Error in checking of fxe_unicode_name_get_extended!\n");
  2000. }
  2001. #endif
  2002. /* Restore the system state. */
  2003. _tx_thread_system_state = saved_system_state;
  2004. /* Check caller error checking for fx_unicode_short_name_get. */
  2005. /* Save the system state. */
  2006. saved_system_state = _tx_thread_system_state;
  2007. /* Setup the fake media structure. */
  2008. media_instance.fx_media_id = FX_MEDIA_ID;
  2009. /* Call the _fxe_unicode_short_name_get with a NULL source name to cause an error. */
  2010. status = _fxe_unicode_short_name_get(&media_instance, FX_NULL, 0, FX_NULL);
  2011. /* Check for the error. */
  2012. if (status != FX_PTR_ERROR)
  2013. {
  2014. /* Increment the failed tests counter. */
  2015. test_control_failed_tests++;
  2016. /* Print error message. */
  2017. printf("Error in checking of fxe_unicode_short_name_get!\n");
  2018. }
  2019. /* Call the _fxe_unicode_short_name_get with a zero length source name to cause an error. */
  2020. status = _fxe_unicode_short_name_get(&media_instance, (UCHAR *)"SOURCENAME", 0, FX_NULL);
  2021. /* Check for the error. */
  2022. if (status != FX_PTR_ERROR)
  2023. {
  2024. /* Increment the failed tests counter. */
  2025. test_control_failed_tests++;
  2026. /* Print error message. */
  2027. printf("Error in checking of fxe_unicode_short_name_get!\n");
  2028. }
  2029. /* Call the _fxe_unicode_short_name_get with a NULL destination name to cause an error. */
  2030. status = _fxe_unicode_short_name_get(&media_instance, (UCHAR *)"SOURCENAME", 16, FX_NULL);
  2031. /* Check for the error. */
  2032. if (status != FX_PTR_ERROR)
  2033. {
  2034. /* Increment the failed tests counter. */
  2035. test_control_failed_tests++;
  2036. /* Print error message. */
  2037. printf("Error in checking of fxe_unicode_short_name_get!\n");
  2038. }
  2039. /* Call the _fxe_unicode_short_name_get to cause an error. */
  2040. status = _fxe_unicode_short_name_get(&media_instance, (UCHAR *)"SOURCENAME", 16, "DESTINATION");
  2041. /* Check for the error. */
  2042. if (status != FX_CALLER_ERROR)
  2043. {
  2044. /* Increment the failed tests counter. */
  2045. test_control_failed_tests++;
  2046. /* Print error message. */
  2047. printf("Error in checking of fxe_unicode_short_name_get!\n");
  2048. }
  2049. /* Call the _fxe_unicode_short_name_get_extended with a NULL source name to cause an error. */
  2050. status = _fxe_unicode_short_name_get_extended(&media_instance, FX_NULL, 0, FX_NULL, 0);
  2051. /* Check for the error. */
  2052. if (status != FX_PTR_ERROR)
  2053. {
  2054. /* Increment the failed tests counter. */
  2055. test_control_failed_tests++;
  2056. /* Print error message. */
  2057. printf("Error in checking of fxe_unicode_short_name_get_extended!\n");
  2058. }
  2059. /* Call the _fxe_unicode_short_name_get_extended with a zero length source name to cause an error. */
  2060. status = _fxe_unicode_short_name_get_extended(&media_instance, (UCHAR*)"SOURCENAME", 0, FX_NULL, 0);
  2061. /* Check for the error. */
  2062. if (status != FX_PTR_ERROR)
  2063. {
  2064. /* Increment the failed tests counter. */
  2065. test_control_failed_tests++;
  2066. /* Print error message. */
  2067. printf("Error in checking of fxe_unicode_short_name_get_extended!\n");
  2068. }
  2069. /* Call the _fxe_unicode_short_name_get_extended with a NULL destination name to cause an error. */
  2070. status = _fxe_unicode_short_name_get_extended(&media_instance, (UCHAR*)"SOURCENAME", 16, FX_NULL, 0);
  2071. /* Check for the error. */
  2072. if (status != FX_PTR_ERROR)
  2073. {
  2074. /* Increment the failed tests counter. */
  2075. test_control_failed_tests++;
  2076. /* Print error message. */
  2077. printf("Error in checking of fxe_unicode_short_name_get_extended!\n");
  2078. }
  2079. /* Call the _fxe_unicode_short_name_get_extended with a NULL destination name to cause an error. */
  2080. status = _fxe_unicode_short_name_get_extended(FX_NULL, FX_NULL, 0, FX_NULL, 0);
  2081. /* Check for the error. */
  2082. if (status != FX_PTR_ERROR)
  2083. {
  2084. /* Increment the failed tests counter. */
  2085. test_control_failed_tests++;
  2086. /* Print error message. */
  2087. printf("Error in checking of fxe_unicode_short_name_get_extended!\n");
  2088. }
  2089. /* Call the _fxe_unicode_short_name_get_extended to cause an error. */
  2090. status = _fxe_unicode_short_name_get_extended(&media_instance, (UCHAR*)"SOURCENAME", 16, "DESTINATION", 1);
  2091. /* Check for the error. */
  2092. if (status != FX_CALLER_ERROR)
  2093. {
  2094. /* Increment the failed tests counter. */
  2095. test_control_failed_tests++;
  2096. /* Print error message. */
  2097. printf("Error in checking of fxe_unicode_short_name_get_extended!\n");
  2098. }
  2099. /* Call the _fxe_unicode_short_name_get_extended to cause an error. */
  2100. status = _fxe_unicode_short_name_get_extended(&media_instance, (UCHAR*)"SOURCENAME", 16, "DESTINATION", 0);
  2101. /* Check for the error. */
  2102. if (status != FX_BUFFER_ERROR)
  2103. {
  2104. /* Increment the failed tests counter. */
  2105. test_control_failed_tests++;
  2106. /* Print error message. */
  2107. printf("Error in checking of fxe_unicode_short_name_get_extended!\n");
  2108. }
  2109. /* Clear the system state to simulate an ISR caller. */
  2110. _tx_thread_system_state = 0;
  2111. /* Call the _fxe_unicode_short_name_get to cause an error. */
  2112. status = _fxe_unicode_short_name_get(&media_instance, (UCHAR *)"SOURCENAME", 16, "DESTINATION");
  2113. /* Check for the error. */
  2114. if (status != FX_CALLER_ERROR)
  2115. {
  2116. /* Increment the failed tests counter. */
  2117. test_control_failed_tests++;
  2118. /* Print error message. */
  2119. printf("Error in checking of fxe_unicode_short_name_get!\n");
  2120. }
  2121. /* Call the _fxe_unicode_short_name_get_extended to cause an error. */
  2122. status = _fxe_unicode_short_name_get_extended(&media_instance, (UCHAR*)"SOURCENAME", 16, "DESTINATION", 1);
  2123. /* Check for the error. */
  2124. if (status != FX_CALLER_ERROR)
  2125. {
  2126. /* Increment the failed tests counter. */
  2127. test_control_failed_tests++;
  2128. /* Print error message. */
  2129. printf("Error in checking of fxe_unicode_short_name_get_extended!\n");
  2130. }
  2131. #ifndef TX_TIMER_PROCESS_IN_ISR
  2132. /* Set the current thread to the timer thread, for caller checking. */
  2133. _tx_thread_current_ptr = &_tx_timer_thread;
  2134. /* Call the _fxe_unicode_short_name_get to cause an error. */
  2135. status = _fxe_unicode_short_name_get(&media_instance, (UCHAR *)"SOURCENAME", 16, "DESTINATION");
  2136. /* Set the current thread back to NULL. */
  2137. _tx_thread_current_ptr = FX_NULL;
  2138. /* Check for the error. */
  2139. if (status != FX_CALLER_ERROR)
  2140. {
  2141. /* Increment the failed tests counter. */
  2142. test_control_failed_tests++;
  2143. /* Print error message. */
  2144. printf("Error in checking of fxe_unicode_short_name_get!\n");
  2145. }
  2146. /* Set the current thread to the timer thread, for caller checking. */
  2147. _tx_thread_current_ptr = &_tx_timer_thread;
  2148. /* Call the _fxe_unicode_short_name_get to cause an error. */
  2149. status = _fxe_unicode_short_name_get_extended(&media_instance, (UCHAR*)"SOURCENAME", 16, "DESTINATION", 1);
  2150. /* Set the current thread back to NULL. */
  2151. _tx_thread_current_ptr = FX_NULL;
  2152. /* Check for the error. */
  2153. if (status != FX_CALLER_ERROR)
  2154. {
  2155. /* Increment the failed tests counter. */
  2156. test_control_failed_tests++;
  2157. /* Print error message. */
  2158. printf("Error in checking of fxe_unicode_short_name_get!\n");
  2159. }
  2160. #endif
  2161. /* Restore the system state. */
  2162. _tx_thread_system_state = saved_system_state;
  2163. /* Check caller error checking for fx_file_write_notify. */
  2164. /* Save the system state. */
  2165. saved_system_state = _tx_thread_system_state;
  2166. /* Setup the fake media structure. */
  2167. media_instance.fx_media_id = FX_MEDIA_ID;
  2168. /* Call the _fxe_file_write_notify_set with a NULL file pointer to cause an error. */
  2169. status = _fxe_file_write_notify_set(FX_NULL, FX_NULL);
  2170. /* Check for the error. */
  2171. if (status != FX_PTR_ERROR)
  2172. {
  2173. /* Increment the failed tests counter. */
  2174. test_control_failed_tests++;
  2175. /* Print error message. */
  2176. printf("Error in checking of fxe_file_write_notify_set!\n");
  2177. }
  2178. /* Call the _fxe_file_write_notify_set to cause an error. */
  2179. status = _fxe_file_write_notify_set(&file_instance, FX_NULL);
  2180. /* Check for the error. */
  2181. if (status != FX_CALLER_ERROR)
  2182. {
  2183. /* Increment the failed tests counter. */
  2184. test_control_failed_tests++;
  2185. /* Print error message. */
  2186. printf("Error in checking of fxe_file_write_notify_set!\n");
  2187. }
  2188. /* Clear the system state to simulate an ISR caller. */
  2189. _tx_thread_system_state = 0;
  2190. /* Call the _fxe_file_write_notify_set to cause an error. */
  2191. status = _fxe_file_write_notify_set(&file_instance, FX_NULL);
  2192. /* Check for the error. */
  2193. if (status != FX_CALLER_ERROR)
  2194. {
  2195. /* Increment the failed tests counter. */
  2196. test_control_failed_tests++;
  2197. /* Print error message. */
  2198. printf("Error in checking of fxe_file_write_notify_set!\n");
  2199. }
  2200. #ifndef TX_TIMER_PROCESS_IN_ISR
  2201. /* Set the current thread to the timer thread, for caller checking. */
  2202. _tx_thread_current_ptr = &_tx_timer_thread;
  2203. /* Call the _fxe_file_write_notify_set to cause an error. */
  2204. status = _fxe_file_write_notify_set(&file_instance, FX_NULL);
  2205. /* Set the current thread back to NULL. */
  2206. _tx_thread_current_ptr = FX_NULL;
  2207. /* Check for the error. */
  2208. if (status != FX_CALLER_ERROR)
  2209. {
  2210. /* Increment the failed tests counter. */
  2211. test_control_failed_tests++;
  2212. /* Print error message. */
  2213. printf("Error in checking of fxe_file_write_notify_set!\n");
  2214. }
  2215. #endif
  2216. /* Restore the system state. */
  2217. _tx_thread_system_state = saved_system_state;
  2218. /* Check caller error checking for fx_file_write. */
  2219. /* Save the system state. */
  2220. saved_system_state = _tx_thread_system_state;
  2221. /* Setup the fake media structure. */
  2222. media_instance.fx_media_id = FX_MEDIA_ID;
  2223. /* Call the _fxe_file_write with a NULL buffer pointer to cause an error. */
  2224. status = _fxe_file_write(&file_instance, FX_NULL, 20);
  2225. /* Check for the error. */
  2226. if (status != FX_PTR_ERROR)
  2227. {
  2228. /* Increment the failed tests counter. */
  2229. test_control_failed_tests++;
  2230. /* Print error message. */
  2231. printf("Error in checking of fxe_file_write!\n");
  2232. }
  2233. /* Call the _fxe_file_write with a NULL buffer pointer to cause an error. */
  2234. status = _fxe_file_write(&file_instance, buffer, 20);
  2235. /* Check for the error. */
  2236. if (status != FX_CALLER_ERROR)
  2237. {
  2238. /* Increment the failed tests counter. */
  2239. test_control_failed_tests++;
  2240. /* Print error message. */
  2241. printf("Error in checking of fxe_file_write!\n");
  2242. }
  2243. /* Clear the system state to simulate an ISR caller. */
  2244. _tx_thread_system_state = 0;
  2245. /* Call the _fxe_file_write with a NULL buffer pointer to cause an error. */
  2246. status = _fxe_file_write(&file_instance, buffer, 20);
  2247. /* Check for the error. */
  2248. if (status != FX_CALLER_ERROR)
  2249. {
  2250. /* Increment the failed tests counter. */
  2251. test_control_failed_tests++;
  2252. /* Print error message. */
  2253. printf("Error in checking of fxe_file_write!\n");
  2254. }
  2255. #ifndef TX_TIMER_PROCESS_IN_ISR
  2256. /* Set the current thread to the timer thread, for caller checking. */
  2257. _tx_thread_current_ptr = &_tx_timer_thread;
  2258. /* Call the _fxe_file_write with a NULL buffer pointer to cause an error. */
  2259. status = _fxe_file_write(&file_instance, buffer, 20);
  2260. /* Set the current thread back to NULL. */
  2261. _tx_thread_current_ptr = FX_NULL;
  2262. /* Check for the error. */
  2263. if (status != FX_CALLER_ERROR)
  2264. {
  2265. /* Increment the failed tests counter. */
  2266. test_control_failed_tests++;
  2267. /* Print error message. */
  2268. printf("Error in checking of fxe_file_write!\n");
  2269. }
  2270. #endif
  2271. /* Restore the system state. */
  2272. _tx_thread_system_state = saved_system_state;
  2273. /* Check caller error checking for fx_file_truncate_release. */
  2274. /* Save the system state. */
  2275. saved_system_state = _tx_thread_system_state;
  2276. /* Call the _fxe_file_truncate_release to cause an error. */
  2277. status = _fxe_file_truncate_release(&file_instance, 10);
  2278. /* Check for the error. */
  2279. if (status != FX_CALLER_ERROR)
  2280. {
  2281. /* Increment the failed tests counter. */
  2282. test_control_failed_tests++;
  2283. /* Print error message. */
  2284. printf("Error in checking of fxe_file_truncate_release!\n");
  2285. }
  2286. /* Clear the system state to simulate an ISR caller. */
  2287. _tx_thread_system_state = 0;
  2288. /* Call the _fxe_file_truncate_release to cause an error. */
  2289. status = _fxe_file_truncate_release(&file_instance, 10);
  2290. /* Check for the error. */
  2291. if (status != FX_CALLER_ERROR)
  2292. {
  2293. /* Increment the failed tests counter. */
  2294. test_control_failed_tests++;
  2295. /* Print error message. */
  2296. printf("Error in checking of fxe_file_truncate_release!\n");
  2297. }
  2298. #ifndef TX_TIMER_PROCESS_IN_ISR
  2299. /* Set the current thread to the timer thread, for caller checking. */
  2300. _tx_thread_current_ptr = &_tx_timer_thread;
  2301. /* Call the _fxe_file_truncate_release to cause an error. */
  2302. status = _fxe_file_truncate_release(&file_instance, 10);
  2303. /* Set the current thread back to NULL. */
  2304. _tx_thread_current_ptr = FX_NULL;
  2305. /* Check for the error. */
  2306. if (status != FX_CALLER_ERROR)
  2307. {
  2308. /* Increment the failed tests counter. */
  2309. test_control_failed_tests++;
  2310. /* Print error message. */
  2311. printf("Error in checking of fxe_file_truncate_release!\n");
  2312. }
  2313. #endif
  2314. /* Restore the system state. */
  2315. _tx_thread_system_state = saved_system_state;
  2316. /* Check caller error checking for fx_file_truncate. */
  2317. /* Save the system state. */
  2318. saved_system_state = _tx_thread_system_state;
  2319. /* Call the _fxe_file_truncate to cause an error. */
  2320. status = _fxe_file_truncate(&file_instance, 10);
  2321. /* Check for the error. */
  2322. if (status != FX_CALLER_ERROR)
  2323. {
  2324. /* Increment the failed tests counter. */
  2325. test_control_failed_tests++;
  2326. /* Print error message. */
  2327. printf("Error in checking of fxe_file_truncate!\n");
  2328. }
  2329. /* Clear the system state to simulate an ISR caller. */
  2330. _tx_thread_system_state = 0;
  2331. /* Call the _fxe_file_truncate to cause an error. */
  2332. status = _fxe_file_truncate(&file_instance, 10);
  2333. /* Check for the error. */
  2334. if (status != FX_CALLER_ERROR)
  2335. {
  2336. /* Increment the failed tests counter. */
  2337. test_control_failed_tests++;
  2338. /* Print error message. */
  2339. printf("Error in checking of fxe_file_truncate!\n");
  2340. }
  2341. #ifndef TX_TIMER_PROCESS_IN_ISR
  2342. /* Set the current thread to the timer thread, for caller checking. */
  2343. _tx_thread_current_ptr = &_tx_timer_thread;
  2344. /* Call the _fxe_file_truncate to cause an error. */
  2345. status = _fxe_file_truncate(&file_instance, 10);
  2346. /* Set the current thread back to NULL. */
  2347. _tx_thread_current_ptr = FX_NULL;
  2348. /* Check for the error. */
  2349. if (status != FX_CALLER_ERROR)
  2350. {
  2351. /* Increment the failed tests counter. */
  2352. test_control_failed_tests++;
  2353. /* Print error message. */
  2354. printf("Error in checking of fxe_file_truncate!\n");
  2355. }
  2356. #endif
  2357. /* Restore the system state. */
  2358. _tx_thread_system_state = saved_system_state;
  2359. /* Check caller error checking for fx_file_seek. */
  2360. /* Save the system state. */
  2361. saved_system_state = _tx_thread_system_state;
  2362. /* Call the _fxe_file_seek to cause an error. */
  2363. status = _fxe_file_seek(&file_instance, 10);
  2364. /* Check for the error. */
  2365. if (status != FX_CALLER_ERROR)
  2366. {
  2367. /* Increment the failed tests counter. */
  2368. test_control_failed_tests++;
  2369. /* Print error message. */
  2370. printf("Error in checking of fxe_file_seek!\n");
  2371. }
  2372. /* Clear the system state to simulate an ISR caller. */
  2373. _tx_thread_system_state = 0;
  2374. /* Call the _fxe_file_seek to cause an error. */
  2375. status = _fxe_file_seek(&file_instance, 10);
  2376. /* Check for the error. */
  2377. if (status != FX_CALLER_ERROR)
  2378. {
  2379. /* Increment the failed tests counter. */
  2380. test_control_failed_tests++;
  2381. /* Print error message. */
  2382. printf("Error in checking of fxe_file_seek!\n");
  2383. }
  2384. #ifndef TX_TIMER_PROCESS_IN_ISR
  2385. /* Set the current thread to the timer thread, for caller checking. */
  2386. _tx_thread_current_ptr = &_tx_timer_thread;
  2387. /* Call the _fxe_file_seek to cause an error. */
  2388. status = _fxe_file_seek(&file_instance, 10);
  2389. /* Set the current thread back to NULL. */
  2390. _tx_thread_current_ptr = FX_NULL;
  2391. /* Check for the error. */
  2392. if (status != FX_CALLER_ERROR)
  2393. {
  2394. /* Increment the failed tests counter. */
  2395. test_control_failed_tests++;
  2396. /* Print error message. */
  2397. printf("Error in checking of fxe_file_seek!\n");
  2398. }
  2399. #endif
  2400. /* Restore the system state. */
  2401. _tx_thread_system_state = saved_system_state;
  2402. /* Check caller error checking for fx_file_rename. */
  2403. /* Save the system state. */
  2404. saved_system_state = _tx_thread_system_state;
  2405. /* Call the _fxe_file_rename to cause an error. */
  2406. status = _fxe_file_rename(&media_instance, "OLDNAME", "NEWNAME");
  2407. /* Check for the error. */
  2408. if (status != FX_CALLER_ERROR)
  2409. {
  2410. /* Increment the failed tests counter. */
  2411. test_control_failed_tests++;
  2412. /* Print error message. */
  2413. printf("Error in checking of fxe_file_rename!\n");
  2414. }
  2415. /* Clear the system state to simulate an ISR caller. */
  2416. _tx_thread_system_state = 0;
  2417. /* Call the _fxe_file_rename to cause an error. */
  2418. status = _fxe_file_rename(&media_instance, "OLDNAME", "NEWNAME");
  2419. /* Check for the error. */
  2420. if (status != FX_CALLER_ERROR)
  2421. {
  2422. /* Increment the failed tests counter. */
  2423. test_control_failed_tests++;
  2424. /* Print error message. */
  2425. printf("Error in checking of fxe_file_rename!\n");
  2426. }
  2427. #ifndef TX_TIMER_PROCESS_IN_ISR
  2428. /* Set the current thread to the timer thread, for caller checking. */
  2429. _tx_thread_current_ptr = &_tx_timer_thread;
  2430. /* Call the _fxe_file_rename to cause an error. */
  2431. status = _fxe_file_rename(&media_instance, "OLDNAME", "NEWNAME");
  2432. /* Set the current thread back to NULL. */
  2433. _tx_thread_current_ptr = FX_NULL;
  2434. /* Check for the error. */
  2435. if (status != FX_CALLER_ERROR)
  2436. {
  2437. /* Increment the failed tests counter. */
  2438. test_control_failed_tests++;
  2439. /* Print error message. */
  2440. printf("Error in checking of fxe_file_rename!\n");
  2441. }
  2442. #endif
  2443. /* Restore the system state. */
  2444. _tx_thread_system_state = saved_system_state;
  2445. /* Check caller error checking for fx_file_relative_seek. */
  2446. /* Save the system state. */
  2447. saved_system_state = _tx_thread_system_state;
  2448. /* Call the _fxe_file_relative_seek to cause an error. */
  2449. status = _fxe_file_relative_seek(&file_instance, 0, FX_SEEK_BEGIN);
  2450. /* Check for the error. */
  2451. if (status != FX_CALLER_ERROR)
  2452. {
  2453. /* Increment the failed tests counter. */
  2454. test_control_failed_tests++;
  2455. /* Print error message. */
  2456. printf("Error in checking of fxe_file_relative_seek!\n");
  2457. }
  2458. /* Clear the system state to simulate an ISR caller. */
  2459. _tx_thread_system_state = 0;
  2460. /* Call the _fxe_file_relative_seek to cause an error. */
  2461. status = _fxe_file_relative_seek(&file_instance, 0, FX_SEEK_BEGIN);
  2462. /* Check for the error. */
  2463. if (status != FX_CALLER_ERROR)
  2464. {
  2465. /* Increment the failed tests counter. */
  2466. test_control_failed_tests++;
  2467. /* Print error message. */
  2468. printf("Error in checking of fxe_file_relative_seek!\n");
  2469. }
  2470. #ifndef TX_TIMER_PROCESS_IN_ISR
  2471. /* Set the current thread to the timer thread, for caller checking. */
  2472. _tx_thread_current_ptr = &_tx_timer_thread;
  2473. /* Call the _fxe_file_relative_seek to cause an error. */
  2474. status = _fxe_file_relative_seek(&file_instance, 0, FX_SEEK_BEGIN);
  2475. /* Set the current thread back to NULL. */
  2476. _tx_thread_current_ptr = FX_NULL;
  2477. /* Check for the error. */
  2478. if (status != FX_CALLER_ERROR)
  2479. {
  2480. /* Increment the failed tests counter. */
  2481. test_control_failed_tests++;
  2482. /* Print error message. */
  2483. printf("Error in checking of fxe_file_relative_seek!\n");
  2484. }
  2485. #endif
  2486. /* Restore the system state. */
  2487. _tx_thread_system_state = saved_system_state;
  2488. /* Check caller error checking for fx_file_read. */
  2489. /* Save the system state. */
  2490. saved_system_state = _tx_thread_system_state;
  2491. /* Call the _fxe_file_read with NULL buffer to cause an error. */
  2492. status = _fxe_file_read(&file_instance, FX_NULL, 20, &temp);
  2493. /* Check for the error. */
  2494. if (status != FX_PTR_ERROR)
  2495. {
  2496. /* Increment the failed tests counter. */
  2497. test_control_failed_tests++;
  2498. /* Print error message. */
  2499. printf("Error in checking of fxe_file_read!\n");
  2500. }
  2501. /* Call the _fxe_file_read with NULL actual size to cause an error. */
  2502. status = _fxe_file_read(&file_instance, buffer, 20, FX_NULL);
  2503. /* Check for the error. */
  2504. if (status != FX_PTR_ERROR)
  2505. {
  2506. /* Increment the failed tests counter. */
  2507. test_control_failed_tests++;
  2508. /* Print error message. */
  2509. printf("Error in checking of fxe_file_read!\n");
  2510. }
  2511. /* Call the _fxe_file_read to cause an error. */
  2512. status = _fxe_file_read(&file_instance, buffer, 20, &temp);
  2513. /* Check for the error. */
  2514. if (status != FX_CALLER_ERROR)
  2515. {
  2516. /* Increment the failed tests counter. */
  2517. test_control_failed_tests++;
  2518. /* Print error message. */
  2519. printf("Error in checking of fxe_file_read!\n");
  2520. }
  2521. /* Clear the system state to simulate an ISR caller. */
  2522. _tx_thread_system_state = 0;
  2523. /* Call the _fxe_file_read to cause an error. */
  2524. status = _fxe_file_read(&file_instance, buffer, 20, &temp);
  2525. /* Check for the error. */
  2526. if (status != FX_CALLER_ERROR)
  2527. {
  2528. /* Increment the failed tests counter. */
  2529. test_control_failed_tests++;
  2530. /* Print error message. */
  2531. printf("Error in checking of fxe_file_read!\n");
  2532. }
  2533. #ifndef TX_TIMER_PROCESS_IN_ISR
  2534. /* Set the current thread to the timer thread, for caller checking. */
  2535. _tx_thread_current_ptr = &_tx_timer_thread;
  2536. /* Call the _fxe_file_read to cause an error. */
  2537. status = _fxe_file_read(&file_instance, buffer, 20, &temp);
  2538. /* Set the current thread back to NULL. */
  2539. _tx_thread_current_ptr = FX_NULL;
  2540. /* Check for the error. */
  2541. if (status != FX_CALLER_ERROR)
  2542. {
  2543. /* Increment the failed tests counter. */
  2544. test_control_failed_tests++;
  2545. /* Print error message. */
  2546. printf("Error in checking of fxe_file_read!\n");
  2547. }
  2548. #endif
  2549. /* Restore the system state. */
  2550. _tx_thread_system_state = saved_system_state;
  2551. /* Check caller error checking for fx_file_open. */
  2552. /* Setup the fake media structure. */
  2553. media_instance.fx_media_id = 0;
  2554. /* Call the _fx_file_open with a 0 media ID to cause an error. */
  2555. status = _fx_file_open(&media_instance, FX_NULL, "TEST", FX_OPEN_FOR_READ);
  2556. /* Check for the error. */
  2557. if (status != FX_MEDIA_NOT_OPEN)
  2558. {
  2559. /* Increment the failed tests counter. */
  2560. test_control_failed_tests++;
  2561. /* Print error message. */
  2562. printf("Error in checking of fx_file_open!\n");
  2563. }
  2564. /* Save the system state. */
  2565. saved_system_state = _tx_thread_system_state;
  2566. /* Setup the fake media structure. */
  2567. media_instance.fx_media_id = FX_MEDIA_ID;
  2568. /* Call the _fxe_file_open with NULL file pointer to cause an error. */
  2569. status = _fxe_file_open(&media_instance, FX_NULL, "TEST", FX_OPEN_FOR_READ, 20);
  2570. /* Check for the error. */
  2571. if (status != FX_PTR_ERROR)
  2572. {
  2573. /* Increment the failed tests counter. */
  2574. test_control_failed_tests++;
  2575. /* Print error message. */
  2576. printf("Error in checking of fxe_file_open!\n");
  2577. }
  2578. /* Call the _fxe_file_open with bad control block size to cause an error. */
  2579. status = _fxe_file_open(&media_instance, &file_instance, "TEST", FX_OPEN_FOR_READ, 20);
  2580. /* Check for the error. */
  2581. if (status != FX_PTR_ERROR)
  2582. {
  2583. /* Increment the failed tests counter. */
  2584. test_control_failed_tests++;
  2585. /* Print error message. */
  2586. printf("Error in checking of fxe_file_open!\n");
  2587. }
  2588. /* Call the _fxe_file_open with bad open type to cause an error. */
  2589. status = _fxe_file_open(&media_instance, &file_instance, "TEST", (FX_OPEN_FOR_READ+FX_OPEN_FOR_READ_FAST+FX_OPEN_FOR_WRITE+99), sizeof(FX_FILE));
  2590. /* Check for the error. */
  2591. if (status != FX_ACCESS_ERROR)
  2592. {
  2593. /* Increment the failed tests counter. */
  2594. test_control_failed_tests++;
  2595. /* Print error message. */
  2596. printf("Error in checking of fxe_file_open!\n");
  2597. }
  2598. /* Call the _fxe_file_open to cause an error. */
  2599. status = _fxe_file_open(&media_instance, &file_instance, "TEST", FX_OPEN_FOR_READ, sizeof(FX_FILE));
  2600. /* Check for the error. */
  2601. if (status != FX_CALLER_ERROR)
  2602. {
  2603. /* Increment the failed tests counter. */
  2604. test_control_failed_tests++;
  2605. /* Print error message. */
  2606. printf("Error in checking of fxe_file_open!\n");
  2607. }
  2608. /* Clear the system state to simulate an ISR caller. */
  2609. _tx_thread_system_state = 0;
  2610. /* Call the _fxe_file_open to cause an error. */
  2611. status = _fxe_file_open(&media_instance, &file_instance, "TEST", FX_OPEN_FOR_READ, sizeof(FX_FILE));
  2612. /* Check for the error. */
  2613. if (status != FX_CALLER_ERROR)
  2614. {
  2615. /* Increment the failed tests counter. */
  2616. test_control_failed_tests++;
  2617. /* Print error message. */
  2618. printf("Error in checking of fxe_file_open!\n");
  2619. }
  2620. #ifndef TX_TIMER_PROCESS_IN_ISR
  2621. /* Set the current thread to the timer thread, for caller checking. */
  2622. _tx_thread_current_ptr = &_tx_timer_thread;
  2623. /* Call the _fxe_file_open to cause an error. */
  2624. status = _fxe_file_open(&media_instance, &file_instance, "TEST", FX_OPEN_FOR_READ, sizeof(FX_FILE));
  2625. /* Set the current thread back to NULL. */
  2626. _tx_thread_current_ptr = FX_NULL;
  2627. /* Check for the error. */
  2628. if (status != FX_CALLER_ERROR)
  2629. {
  2630. /* Increment the failed tests counter. */
  2631. test_control_failed_tests++;
  2632. /* Print error message. */
  2633. printf("Error in checking of fxe_file_open!\n");
  2634. }
  2635. #endif
  2636. /* Restore the system state. */
  2637. _tx_thread_system_state = saved_system_state;
  2638. /* Check caller error checking for fx_file_extended_truncate_release. */
  2639. /* Save the system state. */
  2640. saved_system_state = _tx_thread_system_state;
  2641. /* Setup the fake media structure. */
  2642. media_instance.fx_media_id = FX_MEDIA_ID;
  2643. /* Call the _fxe_file_extended_truncate_release to cause an error. */
  2644. status = _fxe_file_extended_truncate_release(&file_instance, 20);
  2645. /* Check for the error. */
  2646. if (status != FX_CALLER_ERROR)
  2647. {
  2648. /* Increment the failed tests counter. */
  2649. test_control_failed_tests++;
  2650. /* Print error message. */
  2651. printf("Error in checking of fxe_file_truncate_release!\n");
  2652. }
  2653. /* Clear the system state to simulate an ISR caller. */
  2654. _tx_thread_system_state = 0;
  2655. /* Call the _fxe_file_extended_truncate_release to cause an error. */
  2656. status = _fxe_file_extended_truncate_release(&file_instance, 20);
  2657. /* Check for the error. */
  2658. if (status != FX_CALLER_ERROR)
  2659. {
  2660. /* Increment the failed tests counter. */
  2661. test_control_failed_tests++;
  2662. /* Print error message. */
  2663. printf("Error in checking of fxe_file_extended_truncate_release!\n");
  2664. }
  2665. #ifndef TX_TIMER_PROCESS_IN_ISR
  2666. /* Set the current thread to the timer thread, for caller checking. */
  2667. _tx_thread_current_ptr = &_tx_timer_thread;
  2668. /* Call the _fxe_file_extended_truncate_release to cause an error. */
  2669. status = _fxe_file_extended_truncate_release(&file_instance, 20);
  2670. /* Set the current thread back to NULL. */
  2671. _tx_thread_current_ptr = FX_NULL;
  2672. /* Check for the error. */
  2673. if (status != FX_CALLER_ERROR)
  2674. {
  2675. /* Increment the failed tests counter. */
  2676. test_control_failed_tests++;
  2677. /* Print error message. */
  2678. printf("Error in checking of fxe_file_extended_truncate_release!\n");
  2679. }
  2680. #endif
  2681. /* Restore the system state. */
  2682. _tx_thread_system_state = saved_system_state;
  2683. /* Check caller error checking for fx_file_extended_truncate. */
  2684. /* Save the system state. */
  2685. saved_system_state = _tx_thread_system_state;
  2686. /* Setup the fake media structure. */
  2687. media_instance.fx_media_id = FX_MEDIA_ID;
  2688. /* Call the _fxe_file_extended_truncate to cause an error. */
  2689. status = _fxe_file_extended_truncate(&file_instance, 20);
  2690. /* Check for the error. */
  2691. if (status != FX_CALLER_ERROR)
  2692. {
  2693. /* Increment the failed tests counter. */
  2694. test_control_failed_tests++;
  2695. /* Print error message. */
  2696. printf("Error in checking of fxe_file_truncate!\n");
  2697. }
  2698. /* Clear the system state to simulate an ISR caller. */
  2699. _tx_thread_system_state = 0;
  2700. /* Call the _fxe_file_extended_truncate to cause an error. */
  2701. status = _fxe_file_extended_truncate(&file_instance, 20);
  2702. /* Check for the error. */
  2703. if (status != FX_CALLER_ERROR)
  2704. {
  2705. /* Increment the failed tests counter. */
  2706. test_control_failed_tests++;
  2707. /* Print error message. */
  2708. printf("Error in checking of fxe_file_extended_truncate!\n");
  2709. }
  2710. #ifndef TX_TIMER_PROCESS_IN_ISR
  2711. /* Set the current thread to the timer thread, for caller checking. */
  2712. _tx_thread_current_ptr = &_tx_timer_thread;
  2713. /* Call the _fxe_file_extended_truncate to cause an error. */
  2714. status = _fxe_file_extended_truncate(&file_instance, 20);
  2715. /* Set the current thread back to NULL. */
  2716. _tx_thread_current_ptr = FX_NULL;
  2717. /* Check for the error. */
  2718. if (status != FX_CALLER_ERROR)
  2719. {
  2720. /* Increment the failed tests counter. */
  2721. test_control_failed_tests++;
  2722. /* Print error message. */
  2723. printf("Error in checking of fxe_file_extended_truncate!\n");
  2724. }
  2725. #endif
  2726. /* Restore the system state. */
  2727. _tx_thread_system_state = saved_system_state;
  2728. /* Check caller error checking for fx_file_extended_seek. */
  2729. /* Save the system state. */
  2730. saved_system_state = _tx_thread_system_state;
  2731. /* Setup the fake media structure. */
  2732. media_instance.fx_media_id = FX_MEDIA_ID;
  2733. /* Call the _fxe_file_extended_seek to cause an error. */
  2734. status = _fxe_file_extended_seek(&file_instance, 20);
  2735. /* Check for the error. */
  2736. if (status != FX_CALLER_ERROR)
  2737. {
  2738. /* Increment the failed tests counter. */
  2739. test_control_failed_tests++;
  2740. /* Print error message. */
  2741. printf("Error in checking of fxe_file_extended_seek!\n");
  2742. }
  2743. /* Clear the system state to simulate an ISR caller. */
  2744. _tx_thread_system_state = 0;
  2745. /* Call the _fxe_file_extended_seek to cause an error. */
  2746. status = _fxe_file_extended_seek(&file_instance, 20);
  2747. /* Check for the error. */
  2748. if (status != FX_CALLER_ERROR)
  2749. {
  2750. /* Increment the failed tests counter. */
  2751. test_control_failed_tests++;
  2752. /* Print error message. */
  2753. printf("Error in checking of fxe_file_extended_seek!\n");
  2754. }
  2755. #ifndef TX_TIMER_PROCESS_IN_ISR
  2756. /* Set the current thread to the timer thread, for caller checking. */
  2757. _tx_thread_current_ptr = &_tx_timer_thread;
  2758. /* Call the _fxe_file_extended_seek to cause an error. */
  2759. status = _fxe_file_extended_seek(&file_instance, 20);
  2760. /* Set the current thread back to NULL. */
  2761. _tx_thread_current_ptr = FX_NULL;
  2762. /* Check for the error. */
  2763. if (status != FX_CALLER_ERROR)
  2764. {
  2765. /* Increment the failed tests counter. */
  2766. test_control_failed_tests++;
  2767. /* Print error message. */
  2768. printf("Error in checking of fxe_file_extended_seek!\n");
  2769. }
  2770. #endif
  2771. /* Restore the system state. */
  2772. _tx_thread_system_state = saved_system_state;
  2773. /* Check caller error checking for fx_file_extended_relative_seek. */
  2774. /* Save the system state. */
  2775. saved_system_state = _tx_thread_system_state;
  2776. /* Setup the fake media structure. */
  2777. media_instance.fx_media_id = FX_MEDIA_ID;
  2778. /* Call the _fxe_file_extended_relative_seek to cause an error. */
  2779. status = _fxe_file_extended_relative_seek(&file_instance, 20, FX_SEEK_END);
  2780. /* Check for the error. */
  2781. if (status != FX_CALLER_ERROR)
  2782. {
  2783. /* Increment the failed tests counter. */
  2784. test_control_failed_tests++;
  2785. /* Print error message. */
  2786. printf("Error in checking of fxe_file_extended_relative_seek!\n");
  2787. }
  2788. /* Clear the system state to simulate an ISR caller. */
  2789. _tx_thread_system_state = 0;
  2790. /* Call the _fxe_file_extended_relative_seek to cause an error. */
  2791. status = _fxe_file_extended_relative_seek(&file_instance, 20, FX_SEEK_FORWARD);
  2792. /* Check for the error. */
  2793. if (status != FX_CALLER_ERROR)
  2794. {
  2795. /* Increment the failed tests counter. */
  2796. test_control_failed_tests++;
  2797. /* Print error message. */
  2798. printf("Error in checking of fxe_file_extended_relative_seek!\n");
  2799. }
  2800. #ifndef TX_TIMER_PROCESS_IN_ISR
  2801. /* Set the current thread to the timer thread, for caller checking. */
  2802. _tx_thread_current_ptr = &_tx_timer_thread;
  2803. /* Call the _fxe_file_extended_relative_seek to cause an error. */
  2804. status = _fxe_file_extended_relative_seek(&file_instance, 20, FX_SEEK_BEGIN);
  2805. /* Set the current thread back to NULL. */
  2806. _tx_thread_current_ptr = FX_NULL;
  2807. /* Check for the error. */
  2808. if (status != FX_CALLER_ERROR)
  2809. {
  2810. /* Increment the failed tests counter. */
  2811. test_control_failed_tests++;
  2812. /* Print error message. */
  2813. printf("Error in checking of fxe_file_extended_relative_seek!\n");
  2814. }
  2815. #endif
  2816. /* Restore the system state. */
  2817. _tx_thread_system_state = saved_system_state;
  2818. /* Check caller error checking for fx_file_extended_best_effort_allocate. */
  2819. /* Save the system state. */
  2820. saved_system_state = _tx_thread_system_state;
  2821. /* Setup the fake media structure. */
  2822. media_instance.fx_media_id = FX_MEDIA_ID;
  2823. /* Call the _fxe_file_extended_best_effort_allocate with NULL actual size allocated to cause an error. */
  2824. status = _fxe_file_extended_best_effort_allocate(&file_instance, 20, FX_NULL);
  2825. /* Check for the error. */
  2826. if (status != FX_PTR_ERROR)
  2827. {
  2828. /* Increment the failed tests counter. */
  2829. test_control_failed_tests++;
  2830. /* Print error message. */
  2831. printf("Error in checking of fxe_file_extended_best_effort_allocate!\n");
  2832. }
  2833. /* Call the _fxe_file_extended_best_effort_allocate to cause an error. */
  2834. status = _fxe_file_extended_best_effort_allocate(&file_instance, 20, &available_bytes);
  2835. /* Check for the error. */
  2836. if (status != FX_CALLER_ERROR)
  2837. {
  2838. /* Increment the failed tests counter. */
  2839. test_control_failed_tests++;
  2840. /* Print error message. */
  2841. printf("Error in checking of fxe_file_extended_best_effort_allocate!\n");
  2842. }
  2843. /* Clear the system state to simulate an ISR caller. */
  2844. _tx_thread_system_state = 0;
  2845. /* Call the _fxe_file_extended_best_effort_allocate to cause an error. */
  2846. status = _fxe_file_extended_best_effort_allocate(&file_instance, 20, &available_bytes);
  2847. /* Check for the error. */
  2848. if (status != FX_CALLER_ERROR)
  2849. {
  2850. /* Increment the failed tests counter. */
  2851. test_control_failed_tests++;
  2852. /* Print error message. */
  2853. printf("Error in checking of fxe_file_extended_best_effort_allocate!\n");
  2854. }
  2855. #ifndef TX_TIMER_PROCESS_IN_ISR
  2856. /* Set the current thread to the timer thread, for caller checking. */
  2857. _tx_thread_current_ptr = &_tx_timer_thread;
  2858. /* Call the _fxe_file_extended_best_effort_allocate to cause an error. */
  2859. status = _fxe_file_extended_best_effort_allocate(&file_instance, 20, &available_bytes);
  2860. /* Set the current thread back to NULL. */
  2861. _tx_thread_current_ptr = FX_NULL;
  2862. /* Check for the error. */
  2863. if (status != FX_CALLER_ERROR)
  2864. {
  2865. /* Increment the failed tests counter. */
  2866. test_control_failed_tests++;
  2867. /* Print error message. */
  2868. printf("Error in checking of fxe_file_extended_best_effort_allocate!\n");
  2869. }
  2870. #endif
  2871. /* Restore the system state. */
  2872. _tx_thread_system_state = saved_system_state;
  2873. /* Check caller error checking for fx_file_extended_allocate. */
  2874. /* Save the system state. */
  2875. saved_system_state = _tx_thread_system_state;
  2876. /* Setup the fake media structure. */
  2877. media_instance.fx_media_id = FX_MEDIA_ID;
  2878. /* Call the _fxe_file_extended_allocate to cause an error. */
  2879. status = _fxe_file_extended_allocate(&file_instance, 20);
  2880. /* Check for the error. */
  2881. if (status != FX_CALLER_ERROR)
  2882. {
  2883. /* Increment the failed tests counter. */
  2884. test_control_failed_tests++;
  2885. /* Print error message. */
  2886. printf("Error in checking of fxe_file_extended_allocate!\n");
  2887. }
  2888. /* Clear the system state to simulate an ISR caller. */
  2889. _tx_thread_system_state = 0;
  2890. /* Call the _fxe_file_extended_allocate to cause an error. */
  2891. status = _fxe_file_extended_allocate(&file_instance, 20);
  2892. /* Check for the error. */
  2893. if (status != FX_CALLER_ERROR)
  2894. {
  2895. /* Increment the failed tests counter. */
  2896. test_control_failed_tests++;
  2897. /* Print error message. */
  2898. printf("Error in checking of fxe_file_extended_allocate!\n");
  2899. }
  2900. #ifndef TX_TIMER_PROCESS_IN_ISR
  2901. /* Set the current thread to the timer thread, for caller checking. */
  2902. _tx_thread_current_ptr = &_tx_timer_thread;
  2903. /* Call the _fxe_file_extended_allocate to cause an error. */
  2904. status = _fxe_file_extended_allocate(&file_instance, 20);
  2905. /* Set the current thread back to NULL. */
  2906. _tx_thread_current_ptr = FX_NULL;
  2907. /* Check for the error. */
  2908. if (status != FX_CALLER_ERROR)
  2909. {
  2910. /* Increment the failed tests counter. */
  2911. test_control_failed_tests++;
  2912. /* Print error message. */
  2913. printf("Error in checking of fxe_file_extended_allocate!\n");
  2914. }
  2915. #endif
  2916. /* Restore the system state. */
  2917. _tx_thread_system_state = saved_system_state;
  2918. /* Check caller error checking for fx_file_delete. */
  2919. /* Save the system state. */
  2920. saved_system_state = _tx_thread_system_state;
  2921. /* Setup the fake media structure. */
  2922. media_instance.fx_media_id = FX_MEDIA_ID;
  2923. /* Call the _fxe_file_delete to cause an error. */
  2924. status = _fxe_file_delete(&media_instance, "MYFILE");
  2925. /* Check for the error. */
  2926. if (status != FX_CALLER_ERROR)
  2927. {
  2928. /* Increment the failed tests counter. */
  2929. test_control_failed_tests++;
  2930. /* Print error message. */
  2931. printf("Error in checking of fxe_file_delete!\n");
  2932. }
  2933. /* Clear the system state to simulate an ISR caller. */
  2934. _tx_thread_system_state = 0;
  2935. /* Call the _fxe_file_delete to cause an error. */
  2936. status = _fxe_file_delete(&media_instance, "MYFILE");
  2937. /* Check for the error. */
  2938. if (status != FX_CALLER_ERROR)
  2939. {
  2940. /* Increment the failed tests counter. */
  2941. test_control_failed_tests++;
  2942. /* Print error message. */
  2943. printf("Error in checking of fxe_file_delete!\n");
  2944. }
  2945. #ifndef TX_TIMER_PROCESS_IN_ISR
  2946. /* Set the current thread to the timer thread, for caller checking. */
  2947. _tx_thread_current_ptr = &_tx_timer_thread;
  2948. /* Call the _fxe_file_delete to cause an error. */
  2949. status = _fxe_file_delete(&media_instance, "MYFILE");
  2950. /* Set the current thread back to NULL. */
  2951. _tx_thread_current_ptr = FX_NULL;
  2952. /* Check for the error. */
  2953. if (status != FX_CALLER_ERROR)
  2954. {
  2955. /* Increment the failed tests counter. */
  2956. test_control_failed_tests++;
  2957. /* Print error message. */
  2958. printf("Error in checking of fxe_file_delete!\n");
  2959. }
  2960. #endif
  2961. /* Restore the system state. */
  2962. _tx_thread_system_state = saved_system_state;
  2963. /* Check caller error checking for fx_file_date_time_set. */
  2964. /* Save the system state. */
  2965. saved_system_state = _tx_thread_system_state;
  2966. /* Setup the fake media structure. */
  2967. media_instance.fx_media_id = FX_MEDIA_ID;
  2968. /* Call the _fxe_file_date_time_set to cause an error. */
  2969. status = _fxe_file_date_time_set(&media_instance, "TEST.TXT",
  2970. 2017, 12, 31, 23, 59, 58);
  2971. /* Check for the error. */
  2972. if (status != FX_CALLER_ERROR)
  2973. {
  2974. /* Increment the failed tests counter. */
  2975. test_control_failed_tests++;
  2976. /* Print error message. */
  2977. printf("Error in checking of fxe_file_date_time)set!\n");
  2978. }
  2979. /* Clear the system state to simulate an ISR caller. */
  2980. _tx_thread_system_state = 0;
  2981. /* Call the _fxe_file_date_time_set to cause an error. */
  2982. status = _fxe_file_date_time_set(&media_instance, "TEST.TXT",
  2983. 2017, 12, 31, 23, 59, 58);
  2984. /* Check for the error. */
  2985. if (status != FX_CALLER_ERROR)
  2986. {
  2987. /* Increment the failed tests counter. */
  2988. test_control_failed_tests++;
  2989. /* Print error message. */
  2990. printf("Error in checking of fxe_file_date_time_set!\n");
  2991. }
  2992. #ifndef TX_TIMER_PROCESS_IN_ISR
  2993. /* Set the current thread to the timer thread, for caller checking. */
  2994. _tx_thread_current_ptr = &_tx_timer_thread;
  2995. /* Call the _fxe_file_date_time_set to cause an error. */
  2996. status = _fxe_file_date_time_set(&media_instance, "TEST.TXT",
  2997. 2017, 12, 31, 23, 59, 58);
  2998. /* Set the current thread back to NULL. */
  2999. _tx_thread_current_ptr = FX_NULL;
  3000. /* Check for the error. */
  3001. if (status != FX_CALLER_ERROR)
  3002. {
  3003. /* Increment the failed tests counter. */
  3004. test_control_failed_tests++;
  3005. /* Print error message. */
  3006. printf("Error in checking of fxe_file_date_time_set!\n");
  3007. }
  3008. #endif
  3009. /* Restore the system state. */
  3010. _tx_thread_system_state = saved_system_state;
  3011. /* Check caller error checking for fx_file_create. */
  3012. /* Save the system state. */
  3013. saved_system_state = _tx_thread_system_state;
  3014. /* Setup the fake media structure. */
  3015. media_instance.fx_media_id = FX_MEDIA_ID;
  3016. /* Call the _fxe_file_create to cause an error. */
  3017. status = _fxe_file_create(&media_instance, "TEST.TXT");
  3018. /* Check for the error. */
  3019. if (status != FX_CALLER_ERROR)
  3020. {
  3021. /* Increment the failed tests counter. */
  3022. test_control_failed_tests++;
  3023. /* Print error message. */
  3024. printf("Error in checking of fxe_file_create!\n");
  3025. }
  3026. /* Clear the system state to simulate an ISR caller. */
  3027. _tx_thread_system_state = 0;
  3028. /* Call the _fxe_file_create to cause an error. */
  3029. status = _fxe_file_create(&media_instance, "TEST.TXT");
  3030. /* Check for the error. */
  3031. if (status != FX_CALLER_ERROR)
  3032. {
  3033. /* Increment the failed tests counter. */
  3034. test_control_failed_tests++;
  3035. /* Print error message. */
  3036. printf("Error in checking of fxe_file_create!\n");
  3037. }
  3038. #ifndef TX_TIMER_PROCESS_IN_ISR
  3039. /* Set the current thread to the timer thread, for caller checking. */
  3040. _tx_thread_current_ptr = &_tx_timer_thread;
  3041. /* Call the _fxe_file_create to cause an error. */
  3042. status = _fxe_file_create(&media_instance, "TEST.TXT");
  3043. /* Set the current thread back to NULL. */
  3044. _tx_thread_current_ptr = FX_NULL;
  3045. /* Check for the error. */
  3046. if (status != FX_CALLER_ERROR)
  3047. {
  3048. /* Increment the failed tests counter. */
  3049. test_control_failed_tests++;
  3050. /* Print error message. */
  3051. printf("Error in checking of fxe_file_create!\n");
  3052. }
  3053. #endif
  3054. /* Restore the system state. */
  3055. _tx_thread_system_state = saved_system_state;
  3056. /* Check caller error checking for fx_file_close. */
  3057. /* Save the system state. */
  3058. saved_system_state = _tx_thread_system_state;
  3059. /* Setup the fake media structure. */
  3060. media_instance.fx_media_id = FX_MEDIA_ID;
  3061. /* Call the _fxe_file_close to cause an error. */
  3062. status = _fxe_file_close(&file_instance);
  3063. /* Check for the error. */
  3064. if (status != FX_CALLER_ERROR)
  3065. {
  3066. /* Increment the failed tests counter. */
  3067. test_control_failed_tests++;
  3068. /* Print error message. */
  3069. printf("Error in checking of fxe_file_close!\n");
  3070. }
  3071. /* Clear the system state to simulate an ISR caller. */
  3072. _tx_thread_system_state = 0;
  3073. /* Call the _fxe_file_close to cause an error. */
  3074. status = _fxe_file_close(&file_instance);
  3075. /* Check for the error. */
  3076. if (status != FX_CALLER_ERROR)
  3077. {
  3078. /* Increment the failed tests counter. */
  3079. test_control_failed_tests++;
  3080. /* Print error message. */
  3081. printf("Error in checking of fxe_file_close!\n");
  3082. }
  3083. #ifndef TX_TIMER_PROCESS_IN_ISR
  3084. /* Set the current thread to the timer thread, for caller checking. */
  3085. _tx_thread_current_ptr = &_tx_timer_thread;
  3086. /* Call the _fxe_file_close to cause an error. */
  3087. status = _fxe_file_close(&file_instance);
  3088. /* Set the current thread back to NULL. */
  3089. _tx_thread_current_ptr = FX_NULL;
  3090. /* Check for the error. */
  3091. if (status != FX_CALLER_ERROR)
  3092. {
  3093. /* Increment the failed tests counter. */
  3094. test_control_failed_tests++;
  3095. /* Print error message. */
  3096. printf("Error in checking of fxe_file_close!\n");
  3097. }
  3098. #endif
  3099. /* Restore the system state. */
  3100. _tx_thread_system_state = saved_system_state;
  3101. /* Check caller error checking for fx_file_best_effort_allocate. */
  3102. /* Save the system state. */
  3103. saved_system_state = _tx_thread_system_state;
  3104. /* Setup the fake media structure. */
  3105. media_instance.fx_media_id = FX_MEDIA_ID;
  3106. /* Call the _fxe_file_best_effort_allocate with a NULL actual_size_allocated to cause an error. */
  3107. status = _fxe_file_best_effort_allocate(&file_instance, 20, FX_NULL);
  3108. /* Check for the error. */
  3109. if (status != FX_PTR_ERROR)
  3110. {
  3111. /* Increment the failed tests counter. */
  3112. test_control_failed_tests++;
  3113. /* Print error message. */
  3114. printf("Error in checking of fxe_file_best_effort_allocate!\n");
  3115. }
  3116. /* Call the _fxe_file_best_effort_allocate to cause an error. */
  3117. status = _fxe_file_best_effort_allocate(&file_instance, 20, &temp);
  3118. /* Check for the error. */
  3119. if (status != FX_CALLER_ERROR)
  3120. {
  3121. /* Increment the failed tests counter. */
  3122. test_control_failed_tests++;
  3123. /* Print error message. */
  3124. printf("Error in checking of fxe_file_best_effort_allocate!\n");
  3125. }
  3126. /* Clear the system state to simulate an ISR caller. */
  3127. _tx_thread_system_state = 0;
  3128. /* Call the _fxe_file_best_effort_allocate to cause an error. */
  3129. status = _fxe_file_best_effort_allocate(&file_instance, 20, &temp);
  3130. /* Check for the error. */
  3131. if (status != FX_CALLER_ERROR)
  3132. {
  3133. /* Increment the failed tests counter. */
  3134. test_control_failed_tests++;
  3135. /* Print error message. */
  3136. printf("Error in checking of fxe_file_best_effort_allocate!\n");
  3137. }
  3138. #ifndef TX_TIMER_PROCESS_IN_ISR
  3139. /* Set the current thread to the timer thread, for caller checking. */
  3140. _tx_thread_current_ptr = &_tx_timer_thread;
  3141. /* Call the _fxe_file_best_effort_allocate to cause an error. */
  3142. status = _fxe_file_best_effort_allocate(&file_instance, 20, &temp);
  3143. /* Set the current thread back to NULL. */
  3144. _tx_thread_current_ptr = FX_NULL;
  3145. /* Check for the error. */
  3146. if (status != FX_CALLER_ERROR)
  3147. {
  3148. /* Increment the failed tests counter. */
  3149. test_control_failed_tests++;
  3150. /* Print error message. */
  3151. printf("Error in checking of fxe_file_best_effort_allocate!\n");
  3152. }
  3153. #endif
  3154. /* Restore the system state. */
  3155. _tx_thread_system_state = saved_system_state;
  3156. /* Check caller error checking for fx_file_attributes_set. */
  3157. /* Save the system state. */
  3158. saved_system_state = _tx_thread_system_state;
  3159. /* Setup the fake media structure. */
  3160. media_instance.fx_media_id = FX_MEDIA_ID;
  3161. /* Call the _fxe_file_attributes_set to cause an error. */
  3162. status = _fxe_file_attributes_set(&media_instance, "TEST.TXT", FX_READ_ONLY);
  3163. /* Check for the error. */
  3164. if (status != FX_CALLER_ERROR)
  3165. {
  3166. /* Increment the failed tests counter. */
  3167. test_control_failed_tests++;
  3168. /* Print error message. */
  3169. printf("Error in checking of fxe_file_attributes_set!\n");
  3170. }
  3171. /* Clear the system state to simulate an ISR caller. */
  3172. _tx_thread_system_state = 0;
  3173. /* Call the _fxe_file_attributes_set to cause an error. */
  3174. status = _fxe_file_attributes_set(&media_instance, "TEST.TXT", FX_READ_ONLY);
  3175. /* Check for the error. */
  3176. if (status != FX_CALLER_ERROR)
  3177. {
  3178. /* Increment the failed tests counter. */
  3179. test_control_failed_tests++;
  3180. /* Print error message. */
  3181. printf("Error in checking of fxe_file_attributes_set!\n");
  3182. }
  3183. #ifndef TX_TIMER_PROCESS_IN_ISR
  3184. /* Set the current thread to the timer thread, for caller checking. */
  3185. _tx_thread_current_ptr = &_tx_timer_thread;
  3186. /* Call the _fxe_file_attributes_set to cause an error. */
  3187. status = _fxe_file_attributes_set(&media_instance, "TEST.TXT", FX_READ_ONLY);
  3188. /* Set the current thread back to NULL. */
  3189. _tx_thread_current_ptr = FX_NULL;
  3190. /* Check for the error. */
  3191. if (status != FX_CALLER_ERROR)
  3192. {
  3193. /* Increment the failed tests counter. */
  3194. test_control_failed_tests++;
  3195. /* Print error message. */
  3196. printf("Error in checking of fxe_file_attributes_set!\n");
  3197. }
  3198. #endif
  3199. /* Restore the system state. */
  3200. _tx_thread_system_state = saved_system_state;
  3201. /* Check caller error checking for fx_file_attributes_read. */
  3202. /* Save the system state. */
  3203. saved_system_state = _tx_thread_system_state;
  3204. /* Setup the fake media structure. */
  3205. media_instance.fx_media_id = FX_MEDIA_ID;
  3206. /* Call the _fxe_file_attributes_read with NULL attributes variable to cause an error. */
  3207. status = _fxe_file_attributes_read(&media_instance, "TEST.TXT", FX_NULL);
  3208. /* Check for the error. */
  3209. if (status != FX_PTR_ERROR)
  3210. {
  3211. /* Increment the failed tests counter. */
  3212. test_control_failed_tests++;
  3213. /* Print error message. */
  3214. printf("Error in checking of fxe_file_attributes_read!\n");
  3215. }
  3216. /* Call the _fxe_file_attributes_read to cause an error. */
  3217. status = _fxe_file_attributes_read(&media_instance, "TEST.TXT", &attributes);
  3218. /* Check for the error. */
  3219. if (status != FX_CALLER_ERROR)
  3220. {
  3221. /* Increment the failed tests counter. */
  3222. test_control_failed_tests++;
  3223. /* Print error message. */
  3224. printf("Error in checking of fxe_file_attributes_read!\n");
  3225. }
  3226. /* Clear the system state to simulate an ISR caller. */
  3227. _tx_thread_system_state = 0;
  3228. /* Call the _fxe_file_attributes_read to cause an error. */
  3229. status = _fxe_file_attributes_read(&media_instance, "TEST.TXT", &attributes);
  3230. /* Check for the error. */
  3231. if (status != FX_CALLER_ERROR)
  3232. {
  3233. /* Increment the failed tests counter. */
  3234. test_control_failed_tests++;
  3235. /* Print error message. */
  3236. printf("Error in checking of fxe_file_attributes_read!\n");
  3237. }
  3238. #ifndef TX_TIMER_PROCESS_IN_ISR
  3239. /* Set the current thread to the timer thread, for caller checking. */
  3240. _tx_thread_current_ptr = &_tx_timer_thread;
  3241. /* Call the _fxe_file_attributes_read to cause an error. */
  3242. status = _fxe_file_attributes_read(&media_instance, "TEST.TXT", &attributes);
  3243. /* Set the current thread back to NULL. */
  3244. _tx_thread_current_ptr = FX_NULL;
  3245. /* Check for the error. */
  3246. if (status != FX_CALLER_ERROR)
  3247. {
  3248. /* Increment the failed tests counter. */
  3249. test_control_failed_tests++;
  3250. /* Print error message. */
  3251. printf("Error in checking of fxe_file_attributes_read!\n");
  3252. }
  3253. #endif
  3254. /* Restore the system state. */
  3255. _tx_thread_system_state = saved_system_state;
  3256. /* Check caller error checking for fx_file_allocate. */
  3257. /* Save the system state. */
  3258. saved_system_state = _tx_thread_system_state;
  3259. /* Setup the fake media structure. */
  3260. media_instance.fx_media_id = FX_MEDIA_ID;
  3261. /* Call the _fxe_file_allocate to cause an error. */
  3262. status = _fxe_file_allocate(&file_instance, 20);
  3263. /* Check for the error. */
  3264. if (status != FX_CALLER_ERROR)
  3265. {
  3266. /* Increment the failed tests counter. */
  3267. test_control_failed_tests++;
  3268. /* Print error message. */
  3269. printf("Error in checking of fxe_file_allocate!\n");
  3270. }
  3271. /* Clear the system state to simulate an ISR caller. */
  3272. _tx_thread_system_state = 0;
  3273. /* Call the _fxe_file_allocate to cause an error. */
  3274. status = _fxe_file_allocate(&file_instance, 20);
  3275. /* Check for the error. */
  3276. if (status != FX_CALLER_ERROR)
  3277. {
  3278. /* Increment the failed tests counter. */
  3279. test_control_failed_tests++;
  3280. /* Print error message. */
  3281. printf("Error in checking of fxe_file_allocate!\n");
  3282. }
  3283. #ifndef TX_TIMER_PROCESS_IN_ISR
  3284. /* Set the current thread to the timer thread, for caller checking. */
  3285. _tx_thread_current_ptr = &_tx_timer_thread;
  3286. /* Call the _fxe_file_allocate to cause an error. */
  3287. status = _fxe_file_allocate(&file_instance, 20);
  3288. /* Set the current thread back to NULL. */
  3289. _tx_thread_current_ptr = FX_NULL;
  3290. /* Check for the error. */
  3291. if (status != FX_CALLER_ERROR)
  3292. {
  3293. /* Increment the failed tests counter. */
  3294. test_control_failed_tests++;
  3295. /* Print error message. */
  3296. printf("Error in checking of fxe_file_allocate!\n");
  3297. }
  3298. #endif
  3299. /* Restore the system state. */
  3300. _tx_thread_system_state = saved_system_state;
  3301. /* Check caller error checking for fx_directory_short_name_get. */
  3302. /* Save the system state. */
  3303. saved_system_state = _tx_thread_system_state;
  3304. /* Setup the fake media structure. */
  3305. media_instance.fx_media_id = FX_MEDIA_ID;
  3306. /* Call the _fxe_directory_short_name_get with NULL long file name to cause an error. */
  3307. status = _fxe_directory_short_name_get(&media_instance, FX_NULL, "SHORT");
  3308. /* Check for the error. */
  3309. if (status != FX_PTR_ERROR)
  3310. {
  3311. /* Increment the failed tests counter. */
  3312. test_control_failed_tests++;
  3313. /* Print error message. */
  3314. printf("Error in checking of fxe_directory_short_name_get!\n");
  3315. }
  3316. /* Call the _fxe_directory_short_name_get_extended with NULL long file name to cause an error. */
  3317. status = _fxe_directory_short_name_get_extended(&media_instance, FX_NULL, "SHORT", 0);
  3318. /* Check for the error. */
  3319. if (status != FX_PTR_ERROR)
  3320. {
  3321. /* Increment the failed tests counter. */
  3322. test_control_failed_tests++;
  3323. /* Print error message. */
  3324. printf("Error in checking of fxe_directory_short_name_get_extended!\n");
  3325. }
  3326. /* Call the _fxe_directory_short_name_get with NULL short name to cause an error. */
  3327. status = _fxe_directory_short_name_get(&media_instance, "LONGNAME", FX_NULL);
  3328. /* Check for the error. */
  3329. if (status != FX_PTR_ERROR)
  3330. {
  3331. /* Increment the failed tests counter. */
  3332. test_control_failed_tests++;
  3333. /* Print error message. */
  3334. printf("Error in checking of fxe_directory_short_name_get!\n");
  3335. }
  3336. /* Call the _fxe_directory_short_name_get_extended with NULL short name to cause an error. */
  3337. status = _fxe_directory_short_name_get_extended(&media_instance, "LONGNAME", FX_NULL, 0);
  3338. /* Check for the error. */
  3339. if (status != FX_PTR_ERROR)
  3340. {
  3341. /* Increment the failed tests counter. */
  3342. test_control_failed_tests++;
  3343. /* Print error message. */
  3344. printf("Error in checking of fxe_directory_short_name_get_extended!\n");
  3345. }
  3346. /* Call the _fxe_directory_short_name_get_extended with NULL short name to cause an error. */
  3347. status = _fxe_directory_short_name_get_extended(&media_instance, "LONGNAME", "SHORT", 0);
  3348. /* Check for the error. */
  3349. if (status != FX_BUFFER_ERROR)
  3350. {
  3351. /* Increment the failed tests counter. */
  3352. test_control_failed_tests++;
  3353. /* Print error message. */
  3354. printf("Error in checking of fxe_directory_short_name_get_extended!\n");
  3355. }
  3356. /* Call the _fxe_directory_short_name_get to cause an error. */
  3357. status = _fxe_directory_short_name_get(&media_instance, "LONGNAME", "SHORT");
  3358. /* Check for the error. */
  3359. if (status != FX_CALLER_ERROR)
  3360. {
  3361. /* Increment the failed tests counter. */
  3362. test_control_failed_tests++;
  3363. /* Print error message. */
  3364. printf("Error in checking of fxe_directory_short_name_get!\n");
  3365. }
  3366. /* Call the _fxe_directory_short_name_get_extended to cause an error. */
  3367. status = _fxe_directory_short_name_get_extended(&media_instance, "LONGNAME", "SHORT", 1);
  3368. /* Check for the error. */
  3369. if (status != FX_CALLER_ERROR)
  3370. {
  3371. /* Increment the failed tests counter. */
  3372. test_control_failed_tests++;
  3373. /* Print error message. */
  3374. printf("Error in checking of fxe_directory_short_name_get_extended!\n");
  3375. }
  3376. /* Clear the system state to simulate an ISR caller. */
  3377. _tx_thread_system_state = 0;
  3378. /* Call the _fxe_directory_short_name_get to cause an error. */
  3379. status = _fxe_directory_short_name_get(&media_instance, "LONGNAME", "SHORT");
  3380. /* Check for the error. */
  3381. if (status != FX_CALLER_ERROR)
  3382. {
  3383. /* Increment the failed tests counter. */
  3384. test_control_failed_tests++;
  3385. /* Print error message. */
  3386. printf("Error in checking of fxe_directory_short_name_get!\n");
  3387. }
  3388. /* Call the _fxe_directory_short_name_get_extended to cause an error. */
  3389. status = _fxe_directory_short_name_get_extended(&media_instance, "LONGNAME", "SHORT", 1);
  3390. /* Check for the error. */
  3391. if (status != FX_CALLER_ERROR)
  3392. {
  3393. /* Increment the failed tests counter. */
  3394. test_control_failed_tests++;
  3395. /* Print error message. */
  3396. printf("Error in checking of fxe_directory_short_name_get_extended!\n");
  3397. }
  3398. #ifndef TX_TIMER_PROCESS_IN_ISR
  3399. /* Set the current thread to the timer thread, for caller checking. */
  3400. _tx_thread_current_ptr = &_tx_timer_thread;
  3401. /* Call the _fxe_directory_short_name_get to cause an error. */
  3402. status = _fxe_directory_short_name_get(&media_instance, "LONGNAME", "SHORT");
  3403. /* Set the current thread back to NULL. */
  3404. _tx_thread_current_ptr = FX_NULL;
  3405. /* Check for the error. */
  3406. if (status != FX_CALLER_ERROR)
  3407. {
  3408. /* Increment the failed tests counter. */
  3409. test_control_failed_tests++;
  3410. /* Print error message. */
  3411. printf("Error in checking of fxe_directory_short_name_get!\n");
  3412. }
  3413. /* Set the current thread to the timer thread, for caller checking. */
  3414. _tx_thread_current_ptr = &_tx_timer_thread;
  3415. /* Call the _fxe_directory_short_name_get_extended to cause an error. */
  3416. status = _fxe_directory_short_name_get_extended(&media_instance, "LONGNAME", "SHORT", 1);
  3417. /* Set the current thread back to NULL. */
  3418. _tx_thread_current_ptr = FX_NULL;
  3419. /* Check for the error. */
  3420. if (status != FX_CALLER_ERROR)
  3421. {
  3422. /* Increment the failed tests counter. */
  3423. test_control_failed_tests++;
  3424. /* Print error message. */
  3425. printf("Error in checking of fxe_directory_short_name_get_extended!\n");
  3426. }
  3427. #endif
  3428. /* Restore the system state. */
  3429. _tx_thread_system_state = saved_system_state;
  3430. /* Check caller error checking for fx_directory_rename. */
  3431. /* Save the system state. */
  3432. saved_system_state = _tx_thread_system_state;
  3433. /* Setup the fake media structure. */
  3434. media_instance.fx_media_id = FX_MEDIA_ID;
  3435. /* Call the _fxe_directory_rename to cause an error. */
  3436. status = _fxe_directory_rename(&media_instance, "LONGNAME", "SHORT");
  3437. /* Check for the error. */
  3438. if (status != FX_CALLER_ERROR)
  3439. {
  3440. /* Increment the failed tests counter. */
  3441. test_control_failed_tests++;
  3442. /* Print error message. */
  3443. printf("Error in checking of fxe_directory_rename!\n");
  3444. }
  3445. /* Clear the system state to simulate an ISR caller. */
  3446. _tx_thread_system_state = 0;
  3447. /* Call the _fxe_directory_rename to cause an error. */
  3448. status = _fxe_directory_rename(&media_instance, "LONGNAME", "SHORT");
  3449. /* Check for the error. */
  3450. if (status != FX_CALLER_ERROR)
  3451. {
  3452. /* Increment the failed tests counter. */
  3453. test_control_failed_tests++;
  3454. /* Print error message. */
  3455. printf("Error in checking of fxe_directory_rename!\n");
  3456. }
  3457. #ifndef TX_TIMER_PROCESS_IN_ISR
  3458. /* Set the current thread to the timer thread, for caller checking. */
  3459. _tx_thread_current_ptr = &_tx_timer_thread;
  3460. /* Call the _fxe_directory_rename to cause an error. */
  3461. status = _fxe_directory_rename(&media_instance, "LONGNAME", "SHORT");
  3462. /* Set the current thread back to NULL. */
  3463. _tx_thread_current_ptr = FX_NULL;
  3464. /* Check for the error. */
  3465. if (status != FX_CALLER_ERROR)
  3466. {
  3467. /* Increment the failed tests counter. */
  3468. test_control_failed_tests++;
  3469. /* Print error message. */
  3470. printf("Error in checking of fxe_directory_rename!\n");
  3471. }
  3472. #endif
  3473. /* Restore the system state. */
  3474. _tx_thread_system_state = saved_system_state;
  3475. /* Check caller error checking for fx_directory_next_full_entry_find. */
  3476. /* Save the system state. */
  3477. saved_system_state = _tx_thread_system_state;
  3478. /* Setup the fake media structure. */
  3479. media_instance.fx_media_id = FX_MEDIA_ID;
  3480. /* Call the _fxe_directory_next_full_entry_find to cause an error. */
  3481. status = _fxe_directory_next_full_entry_find(&media_instance, FX_NULL, FX_NULL, FX_NULL,
  3482. FX_NULL, FX_NULL, FX_NULL,
  3483. FX_NULL, FX_NULL, FX_NULL);
  3484. /* Check for the error. */
  3485. if (status != FX_CALLER_ERROR)
  3486. {
  3487. /* Increment the failed tests counter. */
  3488. test_control_failed_tests++;
  3489. /* Print error message. */
  3490. printf("Error in checking of fxe_directory_next_full_entry_find!\n");
  3491. }
  3492. /* Clear the system state to simulate an ISR caller. */
  3493. _tx_thread_system_state = 0;
  3494. /* Call the _fxe_directory_next_full_entry_find to cause an error. */
  3495. status = _fxe_directory_next_full_entry_find(&media_instance, FX_NULL, FX_NULL, FX_NULL,
  3496. FX_NULL, FX_NULL, FX_NULL,
  3497. FX_NULL, FX_NULL, FX_NULL);
  3498. /* Check for the error. */
  3499. if (status != FX_CALLER_ERROR)
  3500. {
  3501. /* Increment the failed tests counter. */
  3502. test_control_failed_tests++;
  3503. /* Print error message. */
  3504. printf("Error in checking of fxe_directory_next_full_entry_find!\n");
  3505. }
  3506. #ifndef TX_TIMER_PROCESS_IN_ISR
  3507. /* Set the current thread to the timer thread, for caller checking. */
  3508. _tx_thread_current_ptr = &_tx_timer_thread;
  3509. /* Call the _fxe_directory_next_full_entry_find to cause an error. */
  3510. status = _fxe_directory_next_full_entry_find(&media_instance, FX_NULL, FX_NULL, FX_NULL,
  3511. FX_NULL, FX_NULL, FX_NULL,
  3512. FX_NULL, FX_NULL, FX_NULL);
  3513. /* Set the current thread back to NULL. */
  3514. _tx_thread_current_ptr = FX_NULL;
  3515. /* Check for the error. */
  3516. if (status != FX_CALLER_ERROR)
  3517. {
  3518. /* Increment the failed tests counter. */
  3519. test_control_failed_tests++;
  3520. /* Print error message. */
  3521. printf("Error in checking of fxe_directory_next_full_entry_find!\n");
  3522. }
  3523. #endif
  3524. /* Restore the system state. */
  3525. _tx_thread_system_state = saved_system_state;
  3526. /* Check caller error checking for fx_directory_next_entry_find. */
  3527. /* Save the system state. */
  3528. saved_system_state = _tx_thread_system_state;
  3529. /* Setup the fake media structure. */
  3530. media_instance.fx_media_id = FX_MEDIA_ID;
  3531. /* Call the _fxe_directory_next_entry_find to cause an error. */
  3532. status = _fxe_directory_next_entry_find(&media_instance, FX_NULL);
  3533. /* Check for the error. */
  3534. if (status != FX_CALLER_ERROR)
  3535. {
  3536. /* Increment the failed tests counter. */
  3537. test_control_failed_tests++;
  3538. /* Print error message. */
  3539. printf("Error in checking of fxe_directory_next_entry_find!\n");
  3540. }
  3541. /* Clear the system state to simulate an ISR caller. */
  3542. _tx_thread_system_state = 0;
  3543. /* Call the _fxe_directory_next_entry_find to cause an error. */
  3544. status = _fxe_directory_next_entry_find(&media_instance, FX_NULL);
  3545. /* Check for the error. */
  3546. if (status != FX_CALLER_ERROR)
  3547. {
  3548. /* Increment the failed tests counter. */
  3549. test_control_failed_tests++;
  3550. /* Print error message. */
  3551. printf("Error in checking of fxe_directory_next_entry_find!\n");
  3552. }
  3553. #ifndef TX_TIMER_PROCESS_IN_ISR
  3554. /* Set the current thread to the timer thread, for caller checking. */
  3555. _tx_thread_current_ptr = &_tx_timer_thread;
  3556. /* Call the _fxe_directory_next_entry_find to cause an error. */
  3557. status = _fxe_directory_next_entry_find(&media_instance, FX_NULL);
  3558. /* Set the current thread back to NULL. */
  3559. _tx_thread_current_ptr = FX_NULL;
  3560. /* Check for the error. */
  3561. if (status != FX_CALLER_ERROR)
  3562. {
  3563. /* Increment the failed tests counter. */
  3564. test_control_failed_tests++;
  3565. /* Print error message. */
  3566. printf("Error in checking of fxe_directory_next_entry_find!\n");
  3567. }
  3568. #endif
  3569. /* Restore the system state. */
  3570. _tx_thread_system_state = saved_system_state;
  3571. /* Check caller error checking for fx_directory_name_test. */
  3572. /* Save the system state. */
  3573. saved_system_state = _tx_thread_system_state;
  3574. /* Setup the fake media structure. */
  3575. media_instance.fx_media_id = FX_MEDIA_ID;
  3576. /* Call the _fxe_directory_name_test to cause an error. */
  3577. status = _fxe_directory_name_test(&media_instance, "DIRNAME");
  3578. /* Check for the error. */
  3579. if (status != FX_CALLER_ERROR)
  3580. {
  3581. /* Increment the failed tests counter. */
  3582. test_control_failed_tests++;
  3583. /* Print error message. */
  3584. printf("Error in checking of fxe_directory_name_test!\n");
  3585. }
  3586. /* Clear the system state to simulate an ISR caller. */
  3587. _tx_thread_system_state = 0;
  3588. /* Call the _fxe_directory_name_test to cause an error. */
  3589. status = _fxe_directory_name_test(&media_instance, "DIRNAME");
  3590. /* Check for the error. */
  3591. if (status != FX_CALLER_ERROR)
  3592. {
  3593. /* Increment the failed tests counter. */
  3594. test_control_failed_tests++;
  3595. /* Print error message. */
  3596. printf("Error in checking of fxe_directory_name_test!\n");
  3597. }
  3598. #ifndef TX_TIMER_PROCESS_IN_ISR
  3599. /* Set the current thread to the timer thread, for caller checking. */
  3600. _tx_thread_current_ptr = &_tx_timer_thread;
  3601. /* Call the _fxe_directory_name_test to cause an error. */
  3602. status = _fxe_directory_name_test(&media_instance, "DIRNAME");
  3603. /* Set the current thread back to NULL. */
  3604. _tx_thread_current_ptr = FX_NULL;
  3605. /* Check for the error. */
  3606. if (status != FX_CALLER_ERROR)
  3607. {
  3608. /* Increment the failed tests counter. */
  3609. test_control_failed_tests++;
  3610. /* Print error message. */
  3611. printf("Error in checking of fxe_directory_name_test!\n");
  3612. }
  3613. #endif
  3614. /* Restore the system state. */
  3615. _tx_thread_system_state = saved_system_state;
  3616. /* Check caller error checking for fx_directory_long_name_get. */
  3617. /* Save the system state. */
  3618. saved_system_state = _tx_thread_system_state;
  3619. /* Setup the fake media structure. */
  3620. media_instance.fx_media_id = FX_MEDIA_ID;
  3621. /* Call the _fxe_directory_long_name_get with NULL short name to cause an error. */
  3622. status = _fxe_directory_long_name_get(&media_instance, FX_NULL, "LONGNAME");
  3623. /* Check for the error. */
  3624. if (status != FX_PTR_ERROR)
  3625. {
  3626. /* Increment the failed tests counter. */
  3627. test_control_failed_tests++;
  3628. /* Print error message. */
  3629. printf("Error in checking of fxe_directory_long_name_get!\n");
  3630. }
  3631. /* Call the _fxe_directory_long_name_get_extended with NULL short name to cause an error. */
  3632. status = _fxe_directory_long_name_get_extended(&media_instance, FX_NULL, "LONGNAME", 0);
  3633. /* Check for the error. */
  3634. if (status != FX_PTR_ERROR)
  3635. {
  3636. /* Increment the failed tests counter. */
  3637. test_control_failed_tests++;
  3638. /* Print error message. */
  3639. printf("Error in checking of fxe_directory_long_name_get_extended!\n");
  3640. }
  3641. /* Call the _fxe_directory_long_name_get with NULL long name to cause an error. */
  3642. status = _fxe_directory_long_name_get(&media_instance, "SHORTNAME", FX_NULL);
  3643. /* Check for the error. */
  3644. if (status != FX_PTR_ERROR)
  3645. {
  3646. /* Increment the failed tests counter. */
  3647. test_control_failed_tests++;
  3648. /* Print error message. */
  3649. printf("Error in checking of fxe_directory_long_name_get!\n");
  3650. }
  3651. /* Call the _fxe_directory_long_name_get_extended with NULL long name to cause an error. */
  3652. status = _fxe_directory_long_name_get_extended(&media_instance, "SHORTNAME", FX_NULL, 0);
  3653. /* Check for the error. */
  3654. if (status != FX_PTR_ERROR)
  3655. {
  3656. /* Increment the failed tests counter. */
  3657. test_control_failed_tests++;
  3658. /* Print error message. */
  3659. printf("Error in checking of fxe_directory_long_name_get_extended!\n");
  3660. }
  3661. /* Call the _fxe_directory_long_name_get_extended with zero long name buffer length to cause an error. */
  3662. status = _fxe_directory_long_name_get_extended(&media_instance, "SHORTNAME", "LONGNAME", 0);
  3663. /* Check for the error. */
  3664. if (status != FX_BUFFER_ERROR)
  3665. {
  3666. /* Increment the failed tests counter. */
  3667. test_control_failed_tests++;
  3668. /* Print error message. */
  3669. printf("Error in checking of fxe_directory_long_name_get_extended!\n");
  3670. }
  3671. /* Call the _fxe_directory_long_name_get to cause an error. */
  3672. status = _fxe_directory_long_name_get(&media_instance, "SHORTNAME", "LONGNAME");
  3673. /* Check for the error. */
  3674. if (status != FX_CALLER_ERROR)
  3675. {
  3676. /* Increment the failed tests counter. */
  3677. test_control_failed_tests++;
  3678. /* Print error message. */
  3679. printf("Error in checking of fxe_directory_long_name_get!\n");
  3680. }
  3681. /* Call the _fxe_directory_long_name_get_extended to cause an error. */
  3682. status = _fxe_directory_long_name_get_extended(&media_instance, "SHORTNAME", "LONGNAME", 1);
  3683. /* Check for the error. */
  3684. if (status != FX_CALLER_ERROR)
  3685. {
  3686. /* Increment the failed tests counter. */
  3687. test_control_failed_tests++;
  3688. /* Print error message. */
  3689. printf("Error in checking of fxe_directory_long_name_get_extended!\n");
  3690. }
  3691. /* Clear the system state to simulate an ISR caller. */
  3692. _tx_thread_system_state = 0;
  3693. /* Call the _fxe_directory_long_name_get to cause an error. */
  3694. status = _fxe_directory_long_name_get(&media_instance, "SHORTNAME", "LONGNAME");
  3695. /* Check for the error. */
  3696. if (status != FX_CALLER_ERROR)
  3697. {
  3698. /* Increment the failed tests counter. */
  3699. test_control_failed_tests++;
  3700. /* Print error message. */
  3701. printf("Error in checking of fxe_directory_long_name_get!\n");
  3702. }
  3703. /* Call the _fxe_directory_long_name_get_extended to cause an error. */
  3704. status = _fxe_directory_long_name_get_extended(&media_instance, "SHORTNAME", "LONGNAME", 1);
  3705. /* Check for the error. */
  3706. if (status != FX_CALLER_ERROR)
  3707. {
  3708. /* Increment the failed tests counter. */
  3709. test_control_failed_tests++;
  3710. /* Print error message. */
  3711. printf("Error in checking of fxe_directory_long_name_get_extended!\n");
  3712. }
  3713. #ifndef TX_TIMER_PROCESS_IN_ISR
  3714. /* Set the current thread to the timer thread, for caller checking. */
  3715. _tx_thread_current_ptr = &_tx_timer_thread;
  3716. /* Call the _fxe_directory_long_name_get to cause an error. */
  3717. status = _fxe_directory_long_name_get(&media_instance, "SHORTNAME", "LONGNAME");
  3718. /* Set the current thread back to NULL. */
  3719. _tx_thread_current_ptr = FX_NULL;
  3720. /* Check for the error. */
  3721. if (status != FX_CALLER_ERROR)
  3722. {
  3723. /* Increment the failed tests counter. */
  3724. test_control_failed_tests++;
  3725. /* Print error message. */
  3726. printf("Error in checking of fxe_directory_long_name_get!\n");
  3727. }
  3728. /* Set the current thread to the timer thread, for caller checking. */
  3729. _tx_thread_current_ptr = &_tx_timer_thread;
  3730. /* Call the _fxe_directory_long_name_get_extended to cause an error. */
  3731. status = _fxe_directory_long_name_get_extended(&media_instance, "SHORTNAME", "LONGNAME", 1);
  3732. /* Set the current thread back to NULL. */
  3733. _tx_thread_current_ptr = FX_NULL;
  3734. /* Check for the error. */
  3735. if (status != FX_CALLER_ERROR)
  3736. {
  3737. /* Increment the failed tests counter. */
  3738. test_control_failed_tests++;
  3739. /* Print error message. */
  3740. printf("Error in checking of fxe_directory_long_name_get_extended!\n");
  3741. }
  3742. #endif
  3743. /* media_ptr is NULL. */
  3744. status = _fxe_directory_local_path_get(FX_NULL, FX_NULL);
  3745. /* Check for the error. */
  3746. if (status != FX_PTR_ERROR)
  3747. {
  3748. /* Increment the failed tests counter. */
  3749. test_control_failed_tests++;
  3750. /* Print error message. */
  3751. printf("Error in checking of fxe_directory_local_path_get!\n");
  3752. }
  3753. /* return_path_name is NULL. */
  3754. status = _fxe_directory_local_path_get(&media_instance, FX_NULL);
  3755. /* Check for the error. */
  3756. if (status != FX_PTR_ERROR)
  3757. {
  3758. /* Increment the failed tests counter. */
  3759. test_control_failed_tests++;
  3760. /* Print error message. */
  3761. printf("Error in checking of fxe_directory_local_path_get!\n");
  3762. }
  3763. /* Restore the system state. */
  3764. _tx_thread_system_state = saved_system_state;
  3765. /* Check caller error checking for fx_directory_local_path_set. */
  3766. /* Save the system state. */
  3767. saved_system_state = _tx_thread_system_state;
  3768. /* Setup the fake media structure. */
  3769. media_instance.fx_media_id = FX_MEDIA_ID;
  3770. /* Call the _fxe_directory_local_path_set with NULL short name to cause an error. */
  3771. status = _fxe_directory_local_path_set(&media_instance, FX_NULL, FX_NULL, 0);
  3772. /* Check for the error. */
  3773. if (status != FX_PTR_ERROR)
  3774. {
  3775. /* Increment the failed tests counter. */
  3776. test_control_failed_tests++;
  3777. /* Print error message. */
  3778. printf("Error in checking of fxe_directory_local_path_set!\n");
  3779. }
  3780. /* Call the _fxe_directory_local_path_set with 0 path control block size to cause an error. */
  3781. status = _fxe_directory_local_path_set(&media_instance, &local_path_instance, FX_NULL, 0);
  3782. /* Check for the error. */
  3783. if (status != FX_PTR_ERROR)
  3784. {
  3785. /* Increment the failed tests counter. */
  3786. test_control_failed_tests++;
  3787. /* Print error message. */
  3788. printf("Error in checking of fxe_directory_local_path_set!\n");
  3789. }
  3790. /* Restore the system state. */
  3791. _tx_thread_system_state = saved_system_state;
  3792. /* Check caller error checking for fx_directory_local_path_restore. */
  3793. /* Save the system state. */
  3794. saved_system_state = _tx_thread_system_state;
  3795. /* Setup the fake media structure. */
  3796. media_instance.fx_media_id = FX_MEDIA_ID;
  3797. /* Call the _fxe_directory_local_path_restore with NULL local path pointer to cause an error. */
  3798. status = _fxe_directory_local_path_restore(&media_instance, FX_NULL);
  3799. /* Check for the error. */
  3800. if (status != FX_PTR_ERROR)
  3801. {
  3802. /* Increment the failed tests counter. */
  3803. test_control_failed_tests++;
  3804. /* Print error message. */
  3805. printf("Error in checking of fxe_directory_local_path_restore!\n");
  3806. }
  3807. /* Restore the system state. */
  3808. _tx_thread_system_state = saved_system_state;
  3809. /* Check caller error checking for fx_directory_information_get. */
  3810. /* Save the system state. */
  3811. saved_system_state = _tx_thread_system_state;
  3812. /* Setup the fake media structure. */
  3813. media_instance.fx_media_id = FX_MEDIA_ID;
  3814. /* Call the _fxe_directory_information_get with NULL media name to cause an error. */
  3815. status = _fxe_directory_information_get(FX_NULL, FX_NULL, FX_NULL, FX_NULL, FX_NULL, FX_NULL, FX_NULL, FX_NULL, FX_NULL, FX_NULL);
  3816. /* Check for the error. */
  3817. if (status != FX_PTR_ERROR)
  3818. {
  3819. /* Increment the failed tests counter. */
  3820. test_control_failed_tests++;
  3821. /* Print error message. */
  3822. printf("Error in checking of fxe_directory_information_get!\n");
  3823. }
  3824. /* Call the _fxe_directory_information_get with NULL attributes pointer to cause an error. */
  3825. status = _fxe_directory_information_get(&media_instance, FX_NULL, FX_NULL, FX_NULL, FX_NULL, FX_NULL, FX_NULL, FX_NULL, FX_NULL, FX_NULL);
  3826. /* Check for the error. */
  3827. if (status != FX_PTR_ERROR)
  3828. {
  3829. /* Increment the failed tests counter. */
  3830. test_control_failed_tests++;
  3831. /* Print error message. */
  3832. printf("Error in checking of fxe_directory_information_get!\n");
  3833. }
  3834. /* Call the _fxe_directory_information_get with one non-NULL pointer to cause an error. */
  3835. status = _fxe_directory_information_get(&media_instance, FX_NULL, &attributes, FX_NULL, FX_NULL, FX_NULL, FX_NULL, FX_NULL, FX_NULL, FX_NULL);
  3836. /* Check for the error. */
  3837. if (status != FX_CALLER_ERROR)
  3838. {
  3839. /* Increment the failed tests counter. */
  3840. test_control_failed_tests++;
  3841. /* Print error message. */
  3842. printf("Error in checking of fxe_directory_information_get!\n");
  3843. }
  3844. /* Call the _fxe_directory_information_get with one non-NULL pointer to cause an error. */
  3845. status = _fxe_directory_information_get(&media_instance, FX_NULL, FX_NULL, (ULONG*)&attributes, FX_NULL, FX_NULL, FX_NULL, FX_NULL, FX_NULL, FX_NULL);
  3846. /* Check for the error. */
  3847. if (status != FX_CALLER_ERROR)
  3848. {
  3849. /* Increment the failed tests counter. */
  3850. test_control_failed_tests++;
  3851. /* Print error message. */
  3852. printf("Error in checking of fxe_directory_information_get!\n");
  3853. }
  3854. /* Call the _fxe_directory_information_get with one non-NULL pointer to cause an error. */
  3855. status = _fxe_directory_information_get(&media_instance, FX_NULL, FX_NULL, FX_NULL, &attributes, FX_NULL, FX_NULL, FX_NULL, FX_NULL, FX_NULL);
  3856. /* Check for the error. */
  3857. if (status != FX_CALLER_ERROR)
  3858. {
  3859. /* Increment the failed tests counter. */
  3860. test_control_failed_tests++;
  3861. /* Print error message. */
  3862. printf("Error in checking of fxe_directory_information_get!\n");
  3863. }
  3864. /* Call the _fxe_directory_information_get with one non-NULL pointer to cause an error. */
  3865. status = _fxe_directory_information_get(&media_instance, FX_NULL, FX_NULL, FX_NULL, FX_NULL, &attributes, FX_NULL, FX_NULL, FX_NULL, FX_NULL);
  3866. /* Check for the error. */
  3867. if (status != FX_CALLER_ERROR)
  3868. {
  3869. /* Increment the failed tests counter. */
  3870. test_control_failed_tests++;
  3871. /* Print error message. */
  3872. printf("Error in checking of fxe_directory_information_get!\n");
  3873. }
  3874. /* Call the _fxe_directory_information_get with one non-NULL pointer to cause an error. */
  3875. status = _fxe_directory_information_get(&media_instance, FX_NULL, FX_NULL, FX_NULL, FX_NULL, FX_NULL, &attributes, FX_NULL, FX_NULL, FX_NULL);
  3876. /* Check for the error. */
  3877. if (status != FX_CALLER_ERROR)
  3878. {
  3879. /* Increment the failed tests counter. */
  3880. test_control_failed_tests++;
  3881. /* Print error message. */
  3882. printf("Error in checking of fxe_directory_information_get!\n");
  3883. }
  3884. /* Call the _fxe_directory_information_get with one non-NULL pointer to cause an error. */
  3885. status = _fxe_directory_information_get(&media_instance, FX_NULL, FX_NULL, FX_NULL, FX_NULL, FX_NULL, FX_NULL, &attributes, FX_NULL, FX_NULL);
  3886. /* Check for the error. */
  3887. if (status != FX_CALLER_ERROR)
  3888. {
  3889. /* Increment the failed tests counter. */
  3890. test_control_failed_tests++;
  3891. /* Print error message. */
  3892. printf("Error in checking of fxe_directory_information_get!\n");
  3893. }
  3894. /* Call the _fxe_directory_information_get with one non-NULL pointer to cause an error. */
  3895. status = _fxe_directory_information_get(&media_instance, FX_NULL, FX_NULL, FX_NULL, FX_NULL, FX_NULL, FX_NULL, FX_NULL, &attributes, FX_NULL);
  3896. /* Check for the error. */
  3897. if (status != FX_CALLER_ERROR)
  3898. {
  3899. /* Increment the failed tests counter. */
  3900. test_control_failed_tests++;
  3901. /* Print error message. */
  3902. printf("Error in checking of fxe_directory_information_get!\n");
  3903. }
  3904. /* Call the _fxe_directory_information_get with one non-NULL pointer to cause an error. */
  3905. status = _fxe_directory_information_get(&media_instance, FX_NULL, FX_NULL, FX_NULL, FX_NULL, FX_NULL, FX_NULL, FX_NULL, FX_NULL, &attributes);
  3906. /* Check for the error. */
  3907. if (status != FX_CALLER_ERROR)
  3908. {
  3909. /* Increment the failed tests counter. */
  3910. test_control_failed_tests++;
  3911. /* Print error message. */
  3912. printf("Error in checking of fxe_directory_information_get!\n");
  3913. }
  3914. /* Call the _fxe_directory_information_get to cause an error. */
  3915. status = _fxe_directory_information_get(&media_instance, FX_NULL, &attributes, (ULONG *)&attributes, &attributes, &attributes, &attributes, &attributes, &attributes, &attributes);
  3916. /* Check for the error. */
  3917. if (status != FX_CALLER_ERROR)
  3918. {
  3919. /* Increment the failed tests counter. */
  3920. test_control_failed_tests++;
  3921. /* Print error message. */
  3922. printf("Error in checking of fxe_directory_information_get!\n");
  3923. }
  3924. /* Clear the system state to simulate an ISR caller. */
  3925. _tx_thread_system_state = 0;
  3926. /* Call the _fxe_directory_information_get to cause an error. */
  3927. status = _fxe_directory_information_get(&media_instance, FX_NULL, &attributes, (ULONG *)&attributes, &attributes, &attributes, &attributes, &attributes, &attributes, &attributes);
  3928. /* Check for the error. */
  3929. if (status != FX_CALLER_ERROR)
  3930. {
  3931. /* Increment the failed tests counter. */
  3932. test_control_failed_tests++;
  3933. /* Print error message. */
  3934. printf("Error in checking of fxe_directory_information_get!\n");
  3935. }
  3936. #ifndef TX_TIMER_PROCESS_IN_ISR
  3937. /* Set the current thread to the timer thread, for caller checking. */
  3938. _tx_thread_current_ptr = &_tx_timer_thread;
  3939. /* Call the _fxe_directory_information_get to cause an error. */
  3940. status = _fxe_directory_information_get(&media_instance, FX_NULL, &attributes, (ULONG *)&attributes, &attributes, &attributes, &attributes, &attributes, &attributes, &attributes);
  3941. /* Set the current thread back to NULL. */
  3942. _tx_thread_current_ptr = FX_NULL;
  3943. /* Check for the error. */
  3944. if (status != FX_CALLER_ERROR)
  3945. {
  3946. /* Increment the failed tests counter. */
  3947. test_control_failed_tests++;
  3948. /* Print error message. */
  3949. printf("Error in checking of fxe_directory_information_get!\n");
  3950. }
  3951. #endif
  3952. /* Restore the system state. */
  3953. _tx_thread_system_state = saved_system_state;
  3954. /* Check caller error checking for fx_directory_first_full_entry_find. */
  3955. /* Save the system state. */
  3956. saved_system_state = _tx_thread_system_state;
  3957. /* Setup the fake media structure. */
  3958. media_instance.fx_media_id = FX_MEDIA_ID;
  3959. /* Call the _fxe_directory_first_full_entry_find to cause an error. */
  3960. status = _fxe_directory_first_full_entry_find(&media_instance, FX_NULL, FX_NULL, FX_NULL,
  3961. FX_NULL, FX_NULL, FX_NULL, FX_NULL, FX_NULL, FX_NULL);
  3962. /* Check for the error. */
  3963. if (status != FX_CALLER_ERROR)
  3964. {
  3965. /* Increment the failed tests counter. */
  3966. test_control_failed_tests++;
  3967. /* Print error message. */
  3968. printf("Error in checking of fxe_directory_first_full_entry_find!\n");
  3969. }
  3970. /* Clear the system state to simulate an ISR caller. */
  3971. _tx_thread_system_state = 0;
  3972. /* Call the _fxe_directory_first_full_entry_find to cause an error. */
  3973. status = _fxe_directory_first_full_entry_find(&media_instance, FX_NULL, FX_NULL, FX_NULL,
  3974. FX_NULL, FX_NULL, FX_NULL, FX_NULL, FX_NULL, FX_NULL);
  3975. /* Check for the error. */
  3976. if (status != FX_CALLER_ERROR)
  3977. {
  3978. /* Increment the failed tests counter. */
  3979. test_control_failed_tests++;
  3980. /* Print error message. */
  3981. printf("Error in checking of fxe_directory_first_full_entry_find!\n");
  3982. }
  3983. #ifndef TX_TIMER_PROCESS_IN_ISR
  3984. /* Set the current thread to the timer thread, for caller checking. */
  3985. _tx_thread_current_ptr = &_tx_timer_thread;
  3986. /* Call the _fxe_directory_first_full_entry_find to cause an error. */
  3987. status = _fxe_directory_first_full_entry_find(&media_instance, FX_NULL, FX_NULL, FX_NULL,
  3988. FX_NULL, FX_NULL, FX_NULL, FX_NULL, FX_NULL, FX_NULL);
  3989. /* Set the current thread back to NULL. */
  3990. _tx_thread_current_ptr = FX_NULL;
  3991. /* Check for the error. */
  3992. if (status != FX_CALLER_ERROR)
  3993. {
  3994. /* Increment the failed tests counter. */
  3995. test_control_failed_tests++;
  3996. /* Print error message. */
  3997. printf("Error in checking of fxe_directory_first_full_entry_find!\n");
  3998. }
  3999. #endif
  4000. /* Restore the system state. */
  4001. _tx_thread_system_state = saved_system_state;
  4002. /* Check caller error checking for fx_directory_first_entry_find. */
  4003. /* Save the system state. */
  4004. saved_system_state = _tx_thread_system_state;
  4005. /* Setup the fake media structure. */
  4006. media_instance.fx_media_id = FX_MEDIA_ID;
  4007. /* Call the _fxe_directory_first_entry_find to cause an error. */
  4008. status = _fxe_directory_first_entry_find(&media_instance, FX_NULL);
  4009. /* Check for the error. */
  4010. if (status != FX_CALLER_ERROR)
  4011. {
  4012. /* Increment the failed tests counter. */
  4013. test_control_failed_tests++;
  4014. /* Print error message. */
  4015. printf("Error in checking of fxe_directory_first_entry_find!\n");
  4016. }
  4017. /* Clear the system state to simulate an ISR caller. */
  4018. _tx_thread_system_state = 0;
  4019. /* Call the _fxe_directory_first_entry_find to cause an error. */
  4020. status = _fxe_directory_first_entry_find(&media_instance, FX_NULL);
  4021. /* Check for the error. */
  4022. if (status != FX_CALLER_ERROR)
  4023. {
  4024. /* Increment the failed tests counter. */
  4025. test_control_failed_tests++;
  4026. /* Print error message. */
  4027. printf("Error in checking of fxe_directory_first_entry_find!\n");
  4028. }
  4029. #ifndef TX_TIMER_PROCESS_IN_ISR
  4030. /* Set the current thread to the timer thread, for caller checking. */
  4031. _tx_thread_current_ptr = &_tx_timer_thread;
  4032. /* Call the _fxe_directory_first_entry_find to cause an error. */
  4033. status = _fxe_directory_first_entry_find(&media_instance, FX_NULL);
  4034. /* Set the current thread back to NULL. */
  4035. _tx_thread_current_ptr = FX_NULL;
  4036. /* Check for the error. */
  4037. if (status != FX_CALLER_ERROR)
  4038. {
  4039. /* Increment the failed tests counter. */
  4040. test_control_failed_tests++;
  4041. /* Print error message. */
  4042. printf("Error in checking of fxe_directory_first_entry_find!\n");
  4043. }
  4044. #endif
  4045. /* Restore the system state. */
  4046. _tx_thread_system_state = saved_system_state;
  4047. /* Check caller error checking for fx_directory_delete. */
  4048. /* Save the system state. */
  4049. saved_system_state = _tx_thread_system_state;
  4050. /* Setup the fake media structure. */
  4051. media_instance.fx_media_id = FX_MEDIA_ID;
  4052. /* Call the _fxe_directory_delete to cause an error. */
  4053. status = _fxe_directory_delete(&media_instance, FX_NULL);
  4054. /* Check for the error. */
  4055. if (status != FX_CALLER_ERROR)
  4056. {
  4057. /* Increment the failed tests counter. */
  4058. test_control_failed_tests++;
  4059. /* Print error message. */
  4060. printf("Error in checking of fxe_directory_delete!\n");
  4061. }
  4062. /* Clear the system state to simulate an ISR caller. */
  4063. _tx_thread_system_state = 0;
  4064. /* Call the _fxe_directory_delete to cause an error. */
  4065. status = _fxe_directory_delete(&media_instance, FX_NULL);
  4066. /* Check for the error. */
  4067. if (status != FX_CALLER_ERROR)
  4068. {
  4069. /* Increment the failed tests counter. */
  4070. test_control_failed_tests++;
  4071. /* Print error message. */
  4072. printf("Error in checking of fxe_directory_delete!\n");
  4073. }
  4074. #ifndef TX_TIMER_PROCESS_IN_ISR
  4075. /* Set the current thread to the timer thread, for caller checking. */
  4076. _tx_thread_current_ptr = &_tx_timer_thread;
  4077. /* Call the _fxe_directory_delete to cause an error. */
  4078. status = _fxe_directory_delete(&media_instance, FX_NULL);
  4079. /* Set the current thread back to NULL. */
  4080. _tx_thread_current_ptr = FX_NULL;
  4081. /* Check for the error. */
  4082. if (status != FX_CALLER_ERROR)
  4083. {
  4084. /* Increment the failed tests counter. */
  4085. test_control_failed_tests++;
  4086. /* Print error message. */
  4087. printf("Error in checking of fxe_directory_delete!\n");
  4088. }
  4089. #endif
  4090. /* Restore the system state. */
  4091. _tx_thread_system_state = saved_system_state;
  4092. /* Check caller error checking for fx_directory_default_set. */
  4093. /* Save the system state. */
  4094. saved_system_state = _tx_thread_system_state;
  4095. /* Setup the fake media structure. */
  4096. media_instance.fx_media_id = FX_MEDIA_ID;
  4097. /* Call the _fxe_directory_default_set to cause an error. */
  4098. status = _fxe_directory_default_set(&media_instance, FX_NULL);
  4099. /* Check for the error. */
  4100. if (status != FX_CALLER_ERROR)
  4101. {
  4102. /* Increment the failed tests counter. */
  4103. test_control_failed_tests++;
  4104. /* Print error message. */
  4105. printf("Error in checking of fxe_directory_default_set!\n");
  4106. }
  4107. /* Clear the system state to simulate an ISR caller. */
  4108. _tx_thread_system_state = 0;
  4109. /* Call the _fxe_directory_default_set to cause an error. */
  4110. status = _fxe_directory_default_set(&media_instance, FX_NULL);
  4111. /* Check for the error. */
  4112. if (status != FX_CALLER_ERROR)
  4113. {
  4114. /* Increment the failed tests counter. */
  4115. test_control_failed_tests++;
  4116. /* Print error message. */
  4117. printf("Error in checking of fxe_directory_default_set!\n");
  4118. }
  4119. #ifndef TX_TIMER_PROCESS_IN_ISR
  4120. /* Set the current thread to the timer thread, for caller checking. */
  4121. _tx_thread_current_ptr = &_tx_timer_thread;
  4122. /* Call the _fxe_directory_default_set to cause an error. */
  4123. status = _fxe_directory_default_set(&media_instance, FX_NULL);
  4124. /* Set the current thread back to NULL. */
  4125. _tx_thread_current_ptr = FX_NULL;
  4126. /* Check for the error. */
  4127. if (status != FX_CALLER_ERROR)
  4128. {
  4129. /* Increment the failed tests counter. */
  4130. test_control_failed_tests++;
  4131. /* Print error message. */
  4132. printf("Error in checking of fxe_directory_default_set!\n");
  4133. }
  4134. #endif
  4135. /* Restore the system state. */
  4136. _tx_thread_system_state = saved_system_state;
  4137. /* Check caller error checking for fx_directory_default_get. */
  4138. /* Save the system state. */
  4139. saved_system_state = _tx_thread_system_state;
  4140. /* Setup the fake media structure. */
  4141. media_instance.fx_media_id = FX_MEDIA_ID;
  4142. /* Call the _fxe_directory_default_get to cause an error. */
  4143. status = _fxe_directory_default_get(&media_instance, &string_ptr);
  4144. /* Check for the error. */
  4145. if (status != FX_CALLER_ERROR)
  4146. {
  4147. /* Increment the failed tests counter. */
  4148. test_control_failed_tests++;
  4149. /* Print error message. */
  4150. printf("Error in checking of fxe_directory_default_get!\n");
  4151. }
  4152. /* Clear the system state to simulate an ISR caller. */
  4153. _tx_thread_system_state = 0;
  4154. /* Call the _fxe_directory_default_get to cause an error. */
  4155. status = _fxe_directory_default_get(&media_instance, &string_ptr);
  4156. /* Check for the error. */
  4157. if (status != FX_CALLER_ERROR)
  4158. {
  4159. /* Increment the failed tests counter. */
  4160. test_control_failed_tests++;
  4161. /* Print error message. */
  4162. printf("Error in checking of fxe_directory_default_get!\n");
  4163. }
  4164. #ifndef TX_TIMER_PROCESS_IN_ISR
  4165. /* Set the current thread to the timer thread, for caller checking. */
  4166. _tx_thread_current_ptr = &_tx_timer_thread;
  4167. /* Call the _fxe_directory_default_get to cause an error. */
  4168. status = _fxe_directory_default_get(&media_instance, &string_ptr);
  4169. /* Set the current thread back to NULL. */
  4170. _tx_thread_current_ptr = FX_NULL;
  4171. /* Check for the error. */
  4172. if (status != FX_CALLER_ERROR)
  4173. {
  4174. /* Increment the failed tests counter. */
  4175. test_control_failed_tests++;
  4176. /* Print error message. */
  4177. printf("Error in checking of fxe_directory_default_get!\n");
  4178. }
  4179. #endif
  4180. /* Restore the system state. */
  4181. _tx_thread_system_state = saved_system_state;
  4182. /* Check caller error checking for fx_directory_create. */
  4183. /* Save the system state. */
  4184. saved_system_state = _tx_thread_system_state;
  4185. /* Setup the fake media structure. */
  4186. media_instance.fx_media_id = FX_MEDIA_ID;
  4187. /* Call the _fxe_directory_create to cause an error. */
  4188. status = _fxe_directory_create(&media_instance, "RETURN");
  4189. /* Check for the error. */
  4190. if (status != FX_CALLER_ERROR)
  4191. {
  4192. /* Increment the failed tests counter. */
  4193. test_control_failed_tests++;
  4194. /* Print error message. */
  4195. printf("Error in checking of fxe_directory_create!\n");
  4196. }
  4197. /* Clear the system state to simulate an ISR caller. */
  4198. _tx_thread_system_state = 0;
  4199. /* Call the _fxe_directory_create to cause an error. */
  4200. status = _fxe_directory_create(&media_instance, "RETURN");
  4201. /* Check for the error. */
  4202. if (status != FX_CALLER_ERROR)
  4203. {
  4204. /* Increment the failed tests counter. */
  4205. test_control_failed_tests++;
  4206. /* Print error message. */
  4207. printf("Error in checking of fxe_directory_create!\n");
  4208. }
  4209. #ifndef TX_TIMER_PROCESS_IN_ISR
  4210. /* Set the current thread to the timer thread, for caller checking. */
  4211. _tx_thread_current_ptr = &_tx_timer_thread;
  4212. /* Call the _fxe_directory_create to cause an error. */
  4213. status = _fxe_directory_create(&media_instance, "RETURN");
  4214. /* Set the current thread back to NULL. */
  4215. _tx_thread_current_ptr = FX_NULL;
  4216. /* Check for the error. */
  4217. if (status != FX_CALLER_ERROR)
  4218. {
  4219. /* Increment the failed tests counter. */
  4220. test_control_failed_tests++;
  4221. /* Print error message. */
  4222. printf("Error in checking of fxe_directory_create!\n");
  4223. }
  4224. #endif
  4225. /* Restore the system state. */
  4226. _tx_thread_system_state = saved_system_state;
  4227. /* Check caller error checking for fx_directory_attributes_set. */
  4228. /* Save the system state. */
  4229. saved_system_state = _tx_thread_system_state;
  4230. /* Setup the fake media structure. */
  4231. media_instance.fx_media_id = FX_MEDIA_ID;
  4232. /* Call the _fxe_directory_attributes_set to cause an error. */
  4233. status = _fxe_directory_attributes_set(&media_instance, "RETURN", FX_HIDDEN);
  4234. /* Check for the error. */
  4235. if (status != FX_CALLER_ERROR)
  4236. {
  4237. /* Increment the failed tests counter. */
  4238. test_control_failed_tests++;
  4239. /* Print error message. */
  4240. printf("Error in checking of fxe_directory_attributes_set!\n");
  4241. }
  4242. /* Clear the system state to simulate an ISR caller. */
  4243. _tx_thread_system_state = 0;
  4244. /* Call the _fxe_directory_attributes_set to cause an error. */
  4245. status = _fxe_directory_attributes_set(&media_instance, "RETURN", FX_HIDDEN);
  4246. /* Check for the error. */
  4247. if (status != FX_CALLER_ERROR)
  4248. {
  4249. /* Increment the failed tests counter. */
  4250. test_control_failed_tests++;
  4251. /* Print error message. */
  4252. printf("Error in checking of fxe_directory_attributes_set!\n");
  4253. }
  4254. #ifndef TX_TIMER_PROCESS_IN_ISR
  4255. /* Set the current thread to the timer thread, for caller checking. */
  4256. _tx_thread_current_ptr = &_tx_timer_thread;
  4257. /* Call the _fxe_directory_attributes_set to cause an error. */
  4258. status = _fxe_directory_attributes_set(&media_instance, "RETURN", FX_HIDDEN);
  4259. /* Set the current thread back to NULL. */
  4260. _tx_thread_current_ptr = FX_NULL;
  4261. /* Check for the error. */
  4262. if (status != FX_CALLER_ERROR)
  4263. {
  4264. /* Increment the failed tests counter. */
  4265. test_control_failed_tests++;
  4266. /* Print error message. */
  4267. printf("Error in checking of fxe_directory_attributes_set!\n");
  4268. }
  4269. #endif
  4270. /* Restore the system state. */
  4271. _tx_thread_system_state = saved_system_state;
  4272. /* Check caller error checking for fx_directory_attributes_read. */
  4273. /* Save the system state. */
  4274. saved_system_state = _tx_thread_system_state;
  4275. /* Setup the fake media structure. */
  4276. media_instance.fx_media_id = FX_MEDIA_ID;
  4277. /* Call the _fxe_directory_attributes_read with a NULL attributes pointer to cause an error. */
  4278. status = _fxe_directory_attributes_read(&media_instance, "RETURN", FX_NULL);
  4279. /* Check for the error. */
  4280. if (status != FX_PTR_ERROR)
  4281. {
  4282. /* Increment the failed tests counter. */
  4283. test_control_failed_tests++;
  4284. /* Print error message. */
  4285. printf("Error in checking of fxe_directory_attributes_read!\n");
  4286. }
  4287. /* Call the _fxe_directory_attributes_read to cause an error. */
  4288. status = _fxe_directory_attributes_read(&media_instance, "RETURN", &attributes);
  4289. /* Check for the error. */
  4290. if (status != FX_CALLER_ERROR)
  4291. {
  4292. /* Increment the failed tests counter. */
  4293. test_control_failed_tests++;
  4294. /* Print error message. */
  4295. printf("Error in checking of fxe_directory_attributes_read!\n");
  4296. }
  4297. /* Clear the system state to simulate an ISR caller. */
  4298. _tx_thread_system_state = 0;
  4299. /* Call the _fxe_directory_attributes_read to cause an error. */
  4300. status = _fxe_directory_attributes_read(&media_instance, "RETURN", &attributes);
  4301. /* Check for the error. */
  4302. if (status != FX_CALLER_ERROR)
  4303. {
  4304. /* Increment the failed tests counter. */
  4305. test_control_failed_tests++;
  4306. /* Print error message. */
  4307. printf("Error in checking of fxe_directory_attributes_read!\n");
  4308. }
  4309. #ifndef TX_TIMER_PROCESS_IN_ISR
  4310. /* Set the current thread to the timer thread, for caller checking. */
  4311. _tx_thread_current_ptr = &_tx_timer_thread;
  4312. /* Call the _fxe_directory_attributes_read to cause an error. */
  4313. status = _fxe_directory_attributes_read(&media_instance, "RETURN", &attributes);
  4314. /* Set the current thread back to NULL. */
  4315. _tx_thread_current_ptr = FX_NULL;
  4316. /* Check for the error. */
  4317. if (status != FX_CALLER_ERROR)
  4318. {
  4319. /* Increment the failed tests counter. */
  4320. test_control_failed_tests++;
  4321. /* Print error message. */
  4322. printf("Error in checking of fxe_directory_attributes_read!\n");
  4323. }
  4324. #endif
  4325. /* Restore the system state. */
  4326. _tx_thread_system_state = saved_system_state;
  4327. /* Check PTR error checking for _fxe_directory_default_get_copy. */
  4328. /* Save the system state. */
  4329. saved_system_state = _tx_thread_system_state;
  4330. CHAR path_name_buffer[32];
  4331. /* Setup the fake media structure. */
  4332. media_instance.fx_media_id = FX_MEDIA_ID;
  4333. /* Call the _fxe_directory_default_get_copy with a NULL attributes pointer to cause an error. */
  4334. status = _fxe_directory_default_get_copy(NULL, path_name_buffer, sizeof(path_name_buffer));
  4335. /* Check for the error. */
  4336. if (status != FX_PTR_ERROR)
  4337. {
  4338. /* Increment the failed tests counter. */
  4339. test_control_failed_tests++;
  4340. /* Print error message. */
  4341. printf("Error in checking of _fxe_directory_default_get_copy!\n");
  4342. }
  4343. /* Call the _fxe_directory_default_get_copy with a NULL attributes pointer to cause an error. */
  4344. status = _fxe_directory_default_get_copy(&media_instance, NULL, sizeof(path_name_buffer));
  4345. /* Check for the error. */
  4346. if (status != FX_PTR_ERROR)
  4347. {
  4348. /* Increment the failed tests counter. */
  4349. test_control_failed_tests++;
  4350. /* Print error message. */
  4351. printf("Error in checking of _fxe_directory_default_get_copy!\n");
  4352. }
  4353. /* Call the _fxe_directory_default_get_copy to cause an error. */
  4354. status = _fxe_directory_default_get_copy(&media_instance, path_name_buffer, sizeof(path_name_buffer));
  4355. /* Check for the error. */
  4356. if (status != FX_CALLER_ERROR)
  4357. {
  4358. /* Increment the failed tests counter. */
  4359. test_control_failed_tests++;
  4360. /* Print error message. */
  4361. printf("Error in checking of _fxe_directory_default_get_copy!\n");
  4362. }
  4363. /* Clear the system state to simulate an ISR caller. */
  4364. _tx_thread_system_state = 0;
  4365. /* Call the _fxe_directory_default_get_copy to cause an error. */
  4366. status = _fxe_directory_default_get_copy(&media_instance, path_name_buffer, sizeof(path_name_buffer));
  4367. /* Check for the error. */
  4368. if (status != FX_CALLER_ERROR)
  4369. {
  4370. /* Increment the failed tests counter. */
  4371. test_control_failed_tests++;
  4372. /* Print error message. */
  4373. printf("Error in checking of _fxe_directory_default_get_copy!\n");
  4374. }
  4375. #ifndef TX_TIMER_PROCESS_IN_ISR
  4376. /* Set the current thread to the timer thread, for caller checking. */
  4377. _tx_thread_current_ptr = &_tx_timer_thread;
  4378. /* Call the _fxe_directory_default_get_copy to cause an error. */
  4379. status = _fxe_directory_default_get_copy(&media_instance, path_name_buffer, sizeof(path_name_buffer));
  4380. /* Set the current thread back to NULL. */
  4381. _tx_thread_current_ptr = FX_NULL;
  4382. /* Check for the error. */
  4383. if (status != FX_CALLER_ERROR)
  4384. {
  4385. /* Increment the failed tests counter. */
  4386. test_control_failed_tests++;
  4387. /* Print error message. */
  4388. printf("Error in checking of _fxe_directory_default_get_copy!\n");
  4389. }
  4390. #endif
  4391. /* Restore the system state. */
  4392. _tx_thread_system_state = saved_system_state;
  4393. /* Check PTR error checking for _fxe_directory_local_path_get_copy. */
  4394. /* Save the system state. */
  4395. saved_system_state = _tx_thread_system_state;
  4396. /* Call the _fxe_directory_local_path_get_copy with a NULL attributes pointer to cause an error. */
  4397. status = _fxe_directory_local_path_get_copy(NULL, path_name_buffer, sizeof(path_name_buffer));
  4398. /* Check for the error. */
  4399. if (status != FX_PTR_ERROR)
  4400. {
  4401. /* Increment the failed tests counter. */
  4402. test_control_failed_tests++;
  4403. /* Print error message. */
  4404. printf("Error in checking of _fxe_directory_local_path_get_copy!\n");
  4405. }
  4406. /* Call the _fxe_directory_local_path_get_copy with a NULL attributes pointer to cause an error. */
  4407. status = _fxe_directory_local_path_get_copy(&media_instance, NULL, sizeof(path_name_buffer));
  4408. /* Check for the error. */
  4409. if (status != FX_PTR_ERROR)
  4410. {
  4411. /* Increment the failed tests counter. */
  4412. test_control_failed_tests++;
  4413. /* Print error message. */
  4414. printf("Error in checking of _fxe_directory_local_path_get_copy!\n");
  4415. }
  4416. /* Call the _fxe_directory_local_path_get_copy to cause an error. */
  4417. status = _fxe_directory_local_path_get_copy(&media_instance, path_name_buffer, sizeof(path_name_buffer));
  4418. /* Check for the error. */
  4419. if (status != FX_CALLER_ERROR)
  4420. {
  4421. /* Increment the failed tests counter. */
  4422. test_control_failed_tests++;
  4423. /* Print error message. */
  4424. printf("Error in checking of _fxe_directory_local_path_get_copy!\n");
  4425. }
  4426. /* Clear the system state to simulate an ISR caller. */
  4427. _tx_thread_system_state = 0;
  4428. /* Call the _fxe_directory_local_path_get_copy to cause an error. */
  4429. status = _fxe_directory_local_path_get_copy(&media_instance, path_name_buffer, sizeof(path_name_buffer));
  4430. /* Check for the error. */
  4431. if (status != FX_CALLER_ERROR)
  4432. {
  4433. /* Increment the failed tests counter. */
  4434. test_control_failed_tests++;
  4435. /* Print error message. */
  4436. printf("Error in checking of _fxe_directory_local_path_get_copy!\n");
  4437. }
  4438. #ifndef TX_TIMER_PROCESS_IN_ISR
  4439. /* Set the current thread to the timer thread, for caller checking. */
  4440. _tx_thread_current_ptr = &_tx_timer_thread;
  4441. /* Call the _fxe_directory_local_path_get_copy to cause an error. */
  4442. status = _fxe_directory_local_path_get_copy(&media_instance, path_name_buffer, sizeof(path_name_buffer));
  4443. /* Set the current thread back to NULL. */
  4444. _tx_thread_current_ptr = FX_NULL;
  4445. /* Check for the error. */
  4446. if (status != FX_CALLER_ERROR)
  4447. {
  4448. /* Increment the failed tests counter. */
  4449. test_control_failed_tests++;
  4450. /* Print error message. */
  4451. printf("Error in checking of _fxe_directory_local_path_get_copy!\n");
  4452. }
  4453. #endif
  4454. /* Restore the system state. */
  4455. _tx_thread_system_state = saved_system_state;
  4456. /* Create the test control thread. */
  4457. tx_thread_create(&test_control_thread, "test control thread", test_control_thread_entry, 0,
  4458. test_control_thread_stack, TEST_STACK_SIZE,
  4459. 0, 0, TX_NO_TIME_SLICE, TX_AUTO_START);
  4460. #ifndef NETXTEST_TIMEOUT_DISABLE
  4461. /* Create the test control semaphore. */
  4462. tx_semaphore_create(&test_control_sema, "Test control semaphore", 0);
  4463. #endif
  4464. #else
  4465. /* Skipping the error checking shell(caller error) tests for FileX Standalone */
  4466. test_control_thread_entry(0);
  4467. #endif /* FX_STANDALONE_ENABLE */
  4468. }
  4469. /* Define the test control thread. This thread is responsible for dispatching all of the
  4470. tests in the ThreadX test suite. */
  4471. void test_control_thread_entry(ULONG thread_input)
  4472. {
  4473. UINT i;
  4474. FX_PARAMETER_NOT_USED(thread_input);
  4475. /* Loop to process all tests... */
  4476. i = 0;
  4477. while (test_control_tests[i].test_entry != FX_NULL)
  4478. {
  4479. /* Dispatch the test. */
  4480. (test_control_tests[i++].test_entry)(test_free_memory_ptr);
  4481. #ifndef FX_STANDALONE_ENABLE
  4482. #ifdef TEST_TIMEOUT_DISABLE
  4483. /* Suspend control test to allow test to run. */
  4484. tx_thread_suspend(&test_control_thread);
  4485. #else
  4486. if(tx_semaphore_get(&test_control_sema, test_control_tests[i - 1].timeout))
  4487. {
  4488. /* Test case timeouts. */
  4489. printf("ERROR!\n");
  4490. test_control_failed_tests++;
  4491. }
  4492. #endif
  4493. #endif
  4494. /* Test finished, cleanup in preparation for the next test. */
  4495. test_control_cleanup();
  4496. #ifdef BATCH_TEST
  4497. fflush(stdout);
  4498. #endif
  4499. }
  4500. /* Finished with all tests, print results and return! */
  4501. printf("**** Testing Complete ****\n");
  4502. printf("**** Test Summary: Tests Passed: %lu Tests Failed: %lu\n", test_control_successful_tests, test_control_failed_tests);
  4503. #ifdef BATCH_TEST
  4504. exit((INT)test_control_failed_tests);
  4505. #endif
  4506. }
  4507. void test_control_return(UINT status)
  4508. {
  4509. #ifndef FX_STANDALONE_ENABLE
  4510. UINT old_posture = TX_INT_ENABLE;
  4511. #endif
  4512. /* Save the status in a global. */
  4513. test_control_return_status = status;
  4514. /* Ensure interrupts are enabled. */
  4515. #ifndef FX_STANDALONE_ENABLE
  4516. old_posture = tx_interrupt_control(TX_INT_ENABLE);
  4517. #endif
  4518. /* Determine if it was successful or not. */
  4519. /* Define 254 as a special error code without output. */
  4520. #ifndef FX_STANDALONE_ENABLE
  4521. if (((status > 0) && (status < 254)) || (_tx_thread_preempt_disable) || (old_posture == TX_INT_DISABLE))
  4522. #else
  4523. if((status > 0) && (status < 254))
  4524. #endif
  4525. {
  4526. printf(" **** ERROR CODE: %u *****\n", status);
  4527. test_control_failed_tests++;
  4528. }
  4529. else if (status == 0)
  4530. test_control_successful_tests++;
  4531. else if (status == 254)
  4532. test_control_failed_tests++;
  4533. else if (status == 255)
  4534. test_control_na_tests++;
  4535. #ifndef FX_STANDALONE_ENABLE
  4536. #ifdef NETXTEST_TIMEOUT_DISABLE
  4537. /* Resume the control thread to fully exit the test. */
  4538. tx_thread_resume(&test_control_thread);
  4539. #else
  4540. tx_semaphore_put(&test_control_sema);
  4541. #endif
  4542. #else
  4543. /* Finished with all tests, print results and return! */
  4544. printf("**** Testing Complete ****\n");
  4545. printf("**** Test Summary: Tests Passed: %lu Tests Failed: %lu\n", test_control_successful_tests, test_control_failed_tests);
  4546. pthread_exit(NULL);
  4547. #endif
  4548. }
  4549. void test_control_cleanup(void)
  4550. {
  4551. #ifndef FX_STANDALONE_ENABLE
  4552. TX_MUTEX *mutex_ptr;
  4553. TX_THREAD *thread_ptr;
  4554. /* Delete all FX_MEDIA instances. */
  4555. while (_fx_system_media_opened_ptr)
  4556. {
  4557. /* Close all media instances. */
  4558. fx_media_close(_fx_system_media_opened_ptr);
  4559. }
  4560. /* Delete all queues. */
  4561. while(_tx_queue_created_ptr)
  4562. {
  4563. /* Delete queue. */
  4564. tx_queue_delete(_tx_queue_created_ptr);
  4565. }
  4566. /* Delete all semaphores. */
  4567. while(_tx_semaphore_created_ptr)
  4568. {
  4569. #ifndef TEST_TIMEOUT_DISABLE
  4570. if(_tx_semaphore_created_ptr != &test_control_sema)
  4571. {
  4572. /* Delete semaphore. */
  4573. tx_semaphore_delete(_tx_semaphore_created_ptr);
  4574. }
  4575. else if(_tx_semaphore_created_count == 1)
  4576. break;
  4577. else
  4578. {
  4579. /* Delete semaphore. */
  4580. tx_semaphore_delete(_tx_semaphore_created_ptr -> tx_semaphore_created_next);
  4581. }
  4582. #else
  4583. /* Delete semaphore. */
  4584. tx_semaphore_delete(_tx_semaphore_created_ptr);
  4585. #endif
  4586. }
  4587. /* Delete all event flag groups. */
  4588. while(_tx_event_flags_created_ptr)
  4589. {
  4590. /* Delete event flag group. */
  4591. tx_event_flags_delete(_tx_event_flags_created_ptr);
  4592. }
  4593. /* Delete all byte pools. */
  4594. while(_tx_byte_pool_created_ptr)
  4595. {
  4596. /* Delete byte pool. */
  4597. tx_byte_pool_delete(_tx_byte_pool_created_ptr);
  4598. }
  4599. /* Delete all block pools. */
  4600. while(_tx_block_pool_created_ptr)
  4601. {
  4602. /* Delete block pool. */
  4603. tx_block_pool_delete(_tx_block_pool_created_ptr);
  4604. }
  4605. /* Delete all timers. */
  4606. while(_tx_timer_created_ptr)
  4607. {
  4608. /* Deactivate timer. */
  4609. tx_timer_deactivate(_tx_timer_created_ptr);
  4610. /* Delete timer. */
  4611. tx_timer_delete(_tx_timer_created_ptr);
  4612. }
  4613. /* Delete all mutexes (except for system mutex). */
  4614. while(_tx_mutex_created_ptr)
  4615. {
  4616. /* Setup working mutex pointer. */
  4617. mutex_ptr = _tx_mutex_created_ptr;
  4618. #ifdef __ghs
  4619. /* Determine if the mutex is the GHS system mutex. If so, don't delete! */
  4620. if (mutex_ptr == &__ghLockMutex)
  4621. {
  4622. /* Move to next mutex. */
  4623. mutex_ptr = mutex_ptr -> tx_mutex_created_next;
  4624. }
  4625. /* Determine if there are no more mutexes to delete. */
  4626. if (_tx_mutex_created_count == 1)
  4627. break;
  4628. #endif
  4629. /* Delete mutex. */
  4630. tx_mutex_delete(mutex_ptr);
  4631. }
  4632. /* Delete all threads, except for timer thread, and test control thread. */
  4633. while (_tx_thread_created_ptr)
  4634. {
  4635. /* Setup working pointer. */
  4636. thread_ptr = _tx_thread_created_ptr;
  4637. #ifdef TX_TIMER_PROCESS_IN_ISR
  4638. /* Determine if there are more threads to delete. */
  4639. if (_tx_thread_created_count == 1)
  4640. break;
  4641. /* Determine if this thread is the test control thread. */
  4642. if (thread_ptr == &test_control_thread)
  4643. {
  4644. /* Move to the next thread pointer. */
  4645. thread_ptr = thread_ptr -> tx_thread_created_next;
  4646. // thread_ptr = thread_ptr -> tx_created_next;
  4647. }
  4648. #else
  4649. /* Determine if there are more threads to delete. */
  4650. if (_tx_thread_created_count == 2)
  4651. break;
  4652. /* Move to the thread not protected. */
  4653. while ((thread_ptr == &_tx_timer_thread) || (thread_ptr == &test_control_thread))
  4654. {
  4655. /* Yes, move to the next thread. */
  4656. thread_ptr = thread_ptr -> tx_thread_created_next;
  4657. // thread_ptr = thread_ptr -> tx_created_next;
  4658. }
  4659. #endif
  4660. /* First terminate the thread to ensure it is ready for deletion. */
  4661. tx_thread_terminate(thread_ptr);
  4662. /* Delete the thread. */
  4663. tx_thread_delete(thread_ptr);
  4664. }
  4665. /* At this point, only the test control thread and the system timer thread and/or mutex should still be
  4666. in the system. */
  4667. #endif
  4668. }