diff -r 41f0cfe18c80 -r c734af59ce98 kerneltest/e32test/defrag/t_ramdefrag.cpp --- a/kerneltest/e32test/defrag/t_ramdefrag.cpp Tue Apr 27 18:02:57 2010 +0300 +++ b/kerneltest/e32test/defrag/t_ramdefrag.cpp Tue May 11 17:28:22 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) @@ -9384,6 +9388,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();