kerneltest/f32test/server/t_falsespace.cpp
branchRCL_3
changeset 256 c1f20ce4abcf
parent 117 5b5d147c7838
child 257 3e88ff8f41d5
equal deleted inserted replaced
249:a179b74831c9 256:c1f20ce4abcf
  1047 	
  1047 	
  1048 	nRes = TheFs.Delete(KBaseFN);
  1048 	nRes = TheFs.Delete(KBaseFN);
  1049 	test_KErrNone(nRes);
  1049 	test_KErrNone(nRes);
  1050     for(i=0; i<MaxDummyFiles; ++i)
  1050     for(i=0; i<MaxDummyFiles; ++i)
  1051 	    {
  1051 	    {
  1052         nRes = DeleteFileX(KBaseFN, i); 
  1052         nRes = DeleteFileX(KBaseFN, i);
  1053         test_KErrNone(nRes);
  1053         test_KErrNone(nRes);
  1054 		}
  1054 		}
  1055 	}
  1055 	}
  1056 
  1056 
  1057 void TestRAMDriveNotification()
  1057 void TestRAMDriveNotification()
  1082 	test_Value(stat.Int(), stat == KErrNone);
  1082 	test_Value(stat.Int(), stat == KErrNone);
  1083 	test.Printf(_L("ok\n"));
  1083 	test.Printf(_L("ok\n"));
  1084 	}
  1084 	}
  1085 
  1085 
  1086 
  1086 
  1087 
       
  1088 //-----------------------------------------------------------------------------
  1087 //-----------------------------------------------------------------------------
  1089 /**
  1088 /**
  1090     Test that the reserving some drive space does not takes more space than required.
  1089     Test that the reserving some drive space does not takes more space than required.
  1091 */
  1090 */
  1092 void Test0()
  1091 void Test0()
  1149 
  1148 
  1150     FormatDrive();
  1149     FormatDrive();
  1151 }
  1150 }
  1152 
  1151 
  1153 //-----------------------------------------------------------------------------
  1152 //-----------------------------------------------------------------------------
  1154 void CallTestsL()
  1153 
       
  1154 GLDEF_C void CallTestsL()
  1155 //
  1155 //
  1156 // Do tests relative to session path
  1156 // Do tests relative to session path
  1157 //
  1157 //
  1158 	{
  1158 	{
  1159 	//-- set up console output 
  1159 	//-- set up console output
  1160 	Fat_Test_Utils::SetConsole(test.Console()); 
  1160 	Fat_Test_Utils::SetConsole(test.Console());
  1161 	
  1161 
  1162 	// If TESTFAST mode (for automated test builds) is set, don't run LFFS tests.
  1162 	// If TESTFAST mode (for automated test builds) is set, don't run LFFS tests.
  1163 	if ((UserSvr::DebugMask(2) & 0x00000002) && IsTestingLFFS())
  1163 	if ((UserSvr::DebugMask(2) & 0x00000002) && IsTestingLFFS())
  1164 		{
  1164 		{
  1165 		test.Printf(_L("TEST NOT RUN FOR LFFS DRIVE"));
  1165 		test.Printf(_L("TEST NOT RUN FOR LFFS DRIVE"));
  1166 		return;
  1166 		return;
  1176 
  1176 
  1177 	TDriveInfo drv;
  1177 	TDriveInfo drv;
  1178 	r = TheFs.Drive(drv, gTestDrive);
  1178 	r = TheFs.Drive(drv, gTestDrive);
  1179 	test_KErrNone(r);
  1179 	test_KErrNone(r);
  1180 
  1180 
  1181 
       
  1182 	//-- print drive information
  1181 	//-- print drive information
  1183 	PrintDrvInfo(TheFs, gTestDrive);
  1182 	PrintDrvInfo(TheFs, gTestDrive);
  1184 
       
  1185 
  1183 
  1186 	// do not run the remainder of this test on RAM drive
  1184 	// do not run the remainder of this test on RAM drive
  1187 	if (drv.iType == EMediaRam)
  1185 	if (drv.iType == EMediaRam)
  1188 		{
  1186 		{
  1189 		TestRAMDriveNotification();	// Test drive space reservations trigger disk space notifications
  1187 		TestRAMDriveNotification();	// Test drive space reservations trigger disk space notifications
  1190 		test.Printf(_L("Main tests can't run on RAM drive %C:\n"), gSessionPath[0]);
  1188 		test.Printf(_L("Main tests can't run on RAM drive %C:\n"), gSessionPath[0]);
  1191 		return;
  1189 		return;
  1192 		}
  1190 		}
  1193 
  1191 
  1194 	if (Is_Win32(TheFs, gTestDrive))
  1192 	if (Is_SimulatedSystemDrive(TheFs, gTestDrive))
  1195 		{
  1193 		{
  1196 		test.Printf(_L("Skipping on emulator %C: drive\n"), gSessionPath[0]);
  1194 		test.Printf(_L("Skipping T_FALSESPACE on PlatSim/Emulator drive %C:\n"), gSessionPath[0]);
  1197 		return;
  1195 		return;
  1198 		}
  1196 		}
  1199 
  1197 
  1200     Test0();
  1198     Test0();
  1201 	Test1();	// General test for new APIs
  1199 	Test1();	// General test for new APIs
  1202 	Test2();	// Test to ensure drive and session reserve limits are not exceeded
  1200 	Test2();	// Test to ensure drive and session reserve limits are not exceeded
  1203 	Test3();
  1201 	Test3();
  1204 	Test4();	// test filling the drive and that each checked API fails
  1202 	Test4();	// Test filling the drive and that each checked API fails
  1205 	Test5();
  1203 	Test5();
  1206 	Test6();
  1204 	Test6();
  1207 	Test7();
  1205 	Test7();
  1208 	TestForDEF142554();
  1206 	TestForDEF142554();
  1209 	Test2();	// run this test to check reserves are being cleared correctly
  1207 	Test2();	// Run this test to check reserves are being cleared correctly
  1210 
  1208 
  1211 	TestFAT4G_Boundary();
  1209 	TestFAT4G_Boundary();
  1212     
  1210 
  1213 	TurnAllocFailureOff();
  1211 	TurnAllocFailureOff();
  1214 	}
  1212 	}