diff -r 95f71bcdcdb7 -r 657f875b013e kerneltest/e32test/defrag/t_ramdefrag.cpp --- a/kerneltest/e32test/defrag/t_ramdefrag.cpp Thu May 27 14:17:14 2010 +0300 +++ b/kerneltest/e32test/defrag/t_ramdefrag.cpp Fri Jun 11 15:02:23 2010 +0300 @@ -33,6 +33,7 @@ #include #include #include "testdefs.h" +#include "..\mmu\mmudetect.h" #include @@ -128,6 +129,7 @@ LOCAL_D TInt* gCandList1; // Array of zones that have the same preference and the same LOCAL_D TInt* gCandList2; // amount of free pages const TInt KInvalidCandIndex = -1; +LOCAL_D TUint gMemModel; // // GetDrive @@ -489,6 +491,8 @@ currentCacheSize >> gPageShift)); } + // Get the memory model of the kernel that this test is running on. + gMemModel = MemModelType(); return KErrNone; } @@ -1536,7 +1540,7 @@ } if (totalMorePrefInUse > requiredMovDis) - {// There enough allocatable pages in the RAM zones below the currently + {// There are enough allocatable pages in the RAM zones below the currently // least preferable RAM in use. test.Printf(_L("Memory is spread out totalMorePref 0x%x required 0x%x\n"), totalMorePrefInUse, requiredMovDis); if (verifySpread) @@ -9439,6 +9443,14 @@ test.Next(_L("Test5: Filling the FS Cache and allocating more than 16 contiguous fixed pages")); TestStart(); + + if (gMemModel >= EMemModelTypeFlexible) + {// The flexible memory model won't flush the whole paging cache for + // contiguous allocations >16 pages so skip the next test. + test.Printf(_L("This memory model won't flush the cache - Skipping...\n")); + goto SkipTest5; + } + // TestEnd() will have reduced any cache pages to minimum so just get current // count of discardable pages. GetAllPageInfo();