kerneltest/e32test/demandpaging/t_tbus_datapaging.cpp
branchRCL_3
changeset 87 2f92ad2dc5db
parent 31 56f325a607ea
child 256 c1f20ce4abcf
equal deleted inserted replaced
81:e7d2d738d3c2 87:2f92ad2dc5db
    77 											return = function;
    77 											return = function;
    78 											
    78 											
    79 
    79 
    80 LOCAL_D RFs TheFs;
    80 LOCAL_D RFs TheFs;
    81 TInt gFsDriveNumber	= -1;
    81 TInt gFsDriveNumber	= -1;
       
    82 TBool gMediaIsRam = EFalse;
    82 	
    83 	
    83 RTest test(_L("T_TBUS_DATAPAGING"));
    84 RTest test(_L("T_TBUS_DATAPAGING"));
    84 _LIT(KChunkName, "t_datapaging chunk");
    85 _LIT(KChunkName, "t_datapaging chunk");
    85 
    86 
    86 const TUint KDriveAttMask = KDriveAttLocal | KDriveAttRom | KDriveAttRemote;
    87 const TUint KDriveAttMask = KDriveAttLocal | KDriveAttRom | KDriveAttRemote;
   696 
   697 
   697 		if (r != KErrNone )
   698 		if (r != KErrNone )
   698 			continue;
   699 			continue;
   699 
   700 
   700 		TPtrC mediaType = GetMediaType(di.iType);
   701 		TPtrC mediaType = GetMediaType(di.iType);
       
   702 		if (di.iType == EMediaRam)
       
   703 			gMediaIsRam = ETrue;
   701 		test.Printf(_L("Drive %C Type %S DriveAtt 0x%x MediaAtt 0x%x FileSysId %S SerialNum %S\n"), 
   704 		test.Printf(_L("Drive %C Type %S DriveAtt 0x%x MediaAtt 0x%x FileSysId %S SerialNum %S\n"), 
   702 			'A' + n, &mediaType, di.iDriveAtt, di.iMediaAtt, &fsName, &GetSerialNumber(serialNum));
   705 			'A' + n, &mediaType, di.iDriveAtt, di.iMediaAtt, &fsName, &GetSerialNumber(serialNum));
   703 
   706 
   704 		di.iDriveAtt&= KDriveAttMask;
   707 		di.iDriveAtt&= KDriveAttMask;
   705 		di.iMediaAtt&= KMediaAttMask;
   708 		di.iMediaAtt&= KMediaAttMask;
   792 	test.Next(_L("Chunk created, declare variables"));
   795 	test.Next(_L("Chunk created, declare variables"));
   793 	
   796 	
   794 	__DECLARE_VAR_IN_CHUNK(TBusLocalDrive, &drive)
   797 	__DECLARE_VAR_IN_CHUNK(TBusLocalDrive, &drive)
   795 	TInt driveSize = TestDriveConnectAndCaps(drive, fatDriveNumber);
   798 	TInt driveSize = TestDriveConnectAndCaps(drive, fatDriveNumber);
   796 	
   799 	
   797 	TestDriveSizeRelatedMethods(drive, 0x00001000, driveSize);
   800 	if (!gMediaIsRam) // If media is RAM then the tests are invalid
       
   801 		TestDriveSizeRelatedMethods(drive, 0x00001000, driveSize);
   798 	
   802 	
   799 	TestWriteReadRelatedMethods(drive);
   803 	TestWriteReadRelatedMethods(drive);
   800 	
   804 	
   801 	TestFormatRelatedMethods(drive, driveSize);
   805 	if (!gMediaIsRam)
       
   806 		TestFormatRelatedMethods(drive, driveSize);
   802 	
   807 	
   803 	if(callPasswordRelated)
   808 	if(callPasswordRelated)
   804 		{
   809 		{
   805 		TestPasswordRelatedMethods(drive);	
   810 		TestPasswordRelatedMethods(drive);	
   806 		}
   811 		}