kerneltest/f32test/server/t_main.cpp
branchRCL_3
changeset 21 e7d2d738d3c2
parent 19 4a8fed1c0ef6
child 43 c1f20ce4abcf
equal deleted inserted replaced
20:597aaf25e343 21:e7d2d738d3c2
   678 	TPckgBuf<TIOCacheValues> pkgOrgValues;
   678 	TPckgBuf<TIOCacheValues> pkgOrgValues;
   679 	TIOCacheValues& orgValues=pkgOrgValues();
   679 	TIOCacheValues& orgValues=pkgOrgValues();
   680 	r = controlIo(TheFs,theDrive, KControlIoCacheCount, orgValues);
   680 	r = controlIo(TheFs,theDrive, KControlIoCacheCount, orgValues);
   681 	test_KErrNone(r);
   681 	test_KErrNone(r);
   682 
   682 
   683 	test.Printf(_L("Requests on close queue at start=%d\n"),orgValues.iCloseCount);
   683 	test.Printf(_L("Requests at start: CloseQ %d FreeQ %d total %d peak %d\n"), 
   684 	test.Printf(_L("Requests on free queue at start=%d\n"),orgValues.iFreeCount);
   684 		orgValues.iCloseCount, orgValues.iFreeCount, orgValues.iTotalCount, orgValues.iRequestCountPeak);
   685 	test.Printf(_L("Requests dynamically allocated at start=%d\n"),orgValues.iAllocated);
       
   686 	test.Printf(_L("Requests in total at start=%d\n"),orgValues.iTotalCount);
       
   687 
   685 
   688 	// File cache
   686 	// File cache
   689 
   687 
   690 	// flush closed files queue
   688 	// flush closed files queue
   691 	r = TheFs.ControlIo(theDrive, KControlIoFlushClosedFiles);
   689 	r = TheFs.ControlIo(theDrive, KControlIoFlushClosedFiles);
   791 	TPckgBuf<TIOCacheValues> pkgValues;
   789 	TPckgBuf<TIOCacheValues> pkgValues;
   792 	TIOCacheValues& values=pkgValues();
   790 	TIOCacheValues& values=pkgValues();
   793 	r = controlIo(TheFs,theDrive, KControlIoCacheCount, values);
   791 	r = controlIo(TheFs,theDrive, KControlIoCacheCount, values);
   794 	test_KErrNone(r);
   792 	test_KErrNone(r);
   795 	
   793 	
   796 	test.Printf(_L("Requests on close queue at end=%d\n"),values.iCloseCount);
   794 	test.Printf(_L("Requests at end: CloseQ %d FreeQ %d total %d peak %d\n"), 
   797 	test.Printf(_L("Requests on free queue at end=%d\n"),values.iFreeCount);
   795 		values.iCloseCount, values.iFreeCount, values.iTotalCount, values.iRequestCountPeak);
   798 	test.Printf(_L("Requests dynamically allocated at end=%d\n"),values.iAllocated);
   796 	test.Printf(_L("Operations at end: FreeQ %d total %d peak=%d\n"),
   799 	test.Printf(_L("Requests in total at end=%d\n"),values.iTotalCount);
   797 		values.iOpFreeCount, values.iOpRequestCount, values.iOpRequestCountPeak);
   800 	
   798 	
   801 	test(orgValues.iCloseCount==values.iCloseCount);
   799 	test(orgValues.iCloseCount==values.iCloseCount);
   802 	test(orgValues.iAllocated == values.iAllocated);
   800 	test(orgValues.iAllocated == values.iAllocated);
   803 	// The free count can increase if the file server runs out of requests in the RequestAllocator 
   801 	// The free count can increase if the file server runs out of requests in the RequestAllocator 
   804 	// free pool but this should never decrease - this implies a request leak
   802 	// free pool but this should never decrease - this implies a request leak