1198 test.Start(_L("Test HAL APIs")); |
1198 test.Start(_L("Test HAL APIs")); |
1199 TestHal(); |
1199 TestHal(); |
1200 |
1200 |
1201 if (gDataPagingSupported) |
1201 if (gDataPagingSupported) |
1202 { |
1202 { |
|
1203 test.Next(_L("Test reading and writing to a single page")); |
|
1204 TestOnePage(); |
|
1205 |
1203 test.Next(_L("Test 64-bit atomic operations are atomic with paged out data")); |
1206 test.Next(_L("Test 64-bit atomic operations are atomic with paged out data")); |
1204 TestAtomic64(); |
1207 TestAtomic64(); |
1205 |
|
1206 test.Next(_L("Test reading and writing to a single page")); |
|
1207 TestOnePage(); |
|
1208 |
1208 |
1209 test.Next(_L("Test interaction between decommit and steal")); |
1209 test.Next(_L("Test interaction between decommit and steal")); |
1210 TestDecommitAndStealInteraction(10); |
1210 TestDecommitAndStealInteraction(10); |
1211 |
1211 |
1212 test.Next(_L("Test killing a thread while it's paging in")); |
1212 test.Next(_L("Test killing a thread while it's paging in")); |
1218 test.Next(_L("Test executable memory")); |
1218 test.Next(_L("Test executable memory")); |
1219 TestExecutableMemory(); |
1219 TestExecutableMemory(); |
1220 |
1220 |
1221 test.Next(_L("Soak tests")); |
1221 test.Next(_L("Soak tests")); |
1222 DPTest::FlushCache(); |
1222 DPTest::FlushCache(); |
|
1223 |
|
1224 test.Next(_L("Soak test: change maximum cache size to minimal")); |
|
1225 TUint cacheOriginalMin = 0; |
|
1226 TUint cacheOriginalMax = 0; |
|
1227 TUint cacheCurrentSize = 0; |
|
1228 //store original values |
|
1229 DPTest::CacheSize(cacheOriginalMin, cacheOriginalMax, cacheCurrentSize); |
|
1230 gMaxCacheSize = 256; |
|
1231 gMinCacheSize = 64; |
|
1232 test_KErrNone(DPTest::SetCacheSize(gMinCacheSize * gPageSize, gMaxCacheSize * gPageSize)); |
|
1233 |
1223 for (TUint totalThreads = 1 ; totalThreads <= 64 ; totalThreads *= 4) |
1234 for (TUint totalThreads = 1 ; totalThreads <= 64 ; totalThreads *= 4) |
1224 { |
1235 { |
1225 for (TUint processes = 1 ; processes <= 16 && processes <= totalThreads ; processes *= 4) |
1236 for (TUint processes = 1 ; processes <= 16 && processes <= totalThreads ; processes *= 4) |
1226 { |
1237 { |
1227 TUint threads = totalThreads / processes; |
1238 TUint threads = totalThreads / processes; |
1228 for (TUint pages = gMaxCacheSize / 2 ; pages <= gMaxCacheSize * 2 ; pages *= 2) |
1239 for (TUint pages = gMaxCacheSize / 2 ; pages <= gMaxCacheSize * 2 ; pages *= 2) |
1229 { |
1240 { |
1230 for (TUint pin = 0 ; pin <= 1 ; ++pin) |
1241 for (TUint pin = 0 ; pin <= 1 ; ++pin) |
1231 { |
1242 { |
1232 test.Printf(_L("processes=%d threads=%d pages=%d pin=%d\r\n"),processes, threads, pages, pin); |
1243 test.Printf(_L("processes=%d threads=%d pages=%d maxcachesize=%d pin=%d\r\n"),processes, threads, pages, gMaxCacheSize,pin); |
1233 SoakTest(processes, threads, pages, pin, 3); |
1244 SoakTest(processes, threads, pages, pin, 3); |
1234 } |
1245 } |
1235 } |
1246 } |
1236 } |
1247 } |
1237 } |
1248 } |
|
1249 |
|
1250 //Reset the cache size to normal |
|
1251 test.Next(_L("Soak test: Reset cache size to normal")); |
|
1252 test_KErrNone(DPTest::SetCacheSize(cacheOriginalMin, cacheOriginalMax)); |
1238 } |
1253 } |
1239 |
1254 |
1240 test.End(); |
1255 test.End(); |
1241 return 0; |
1256 return 0; |
1242 } |
1257 } |