equal
deleted
inserted
replaced
354 |
354 |
355 while (Testing) |
355 while (Testing) |
356 { |
356 { |
357 TInt r=UserSvr::HalFunction(EHalGroupVM,EVMHalFlushCache,0,0); |
357 TInt r=UserSvr::HalFunction(EHalGroupVM,EVMHalFlushCache,0,0); |
358 if (Random() & 1) |
358 if (Random() & 1) |
359 User::AfterHighRes(500+Random() & 2047); |
359 User::AfterHighRes((500+Random()) & 2047); |
360 |
360 |
361 if (r<0) |
361 if (r<0) |
362 { |
362 { |
363 GlobError=r; |
363 GlobError=r; |
364 PagedTrashCount=99; |
364 PagedTrashCount=99; |
380 { |
380 { |
381 trashBurst= (TBool) aUseTb; |
381 trashBurst= (TBool) aUseTb; |
382 } |
382 } |
383 PagedTrashCount++; |
383 PagedTrashCount++; |
384 if (RandomNo & 1) |
384 if (RandomNo & 1) |
385 User::AfterHighRes(500+Random() & 2047); |
385 User::AfterHighRes((500+Random()) & 2047); |
386 } |
386 } |
387 } |
387 } |
388 |
388 |
389 } |
389 } |
390 return(KErrNone); |
390 return(KErrNone); |
669 PageDoneSemaphore.Wait(); |
669 PageDoneSemaphore.Wait(); |
670 |
670 |
671 TInt tries = 10; |
671 TInt tries = 10; |
672 do { // If we get zero hits, maybe the page hasnt hit yet. |
672 do { // If we get zero hits, maybe the page hasnt hit yet. |
673 tries--; |
673 tries--; |
674 User::AfterHighRes(1000+Random() & 2047); // Throw some uncertainly into things |
674 User::AfterHighRes((1000+Random()) & 2047); // Throw some uncertainly into things |
675 |
675 |
676 TPtr8 statsBuf((TUint8*) &stats, sizeof(stats)); |
676 TPtr8 statsBuf((TUint8*) &stats, sizeof(stats)); |
677 r = Drive.ControlIO(KNandGetDeferStats,statsBuf,0); |
677 r = Drive.ControlIO(KNandGetDeferStats,statsBuf,0); |
678 test (r == KErrNone); |
678 test (r == KErrNone); |
679 pageGarbageCount+=stats.iPageGarbage; |
679 pageGarbageCount+=stats.iPageGarbage; |