kerneltest/f32test/server/t_filecache.cpp
changeset 109 b3a1d9898418
parent 0 a41df078684a
child 139 95f71bcdcdb7
--- a/kerneltest/f32test/server/t_filecache.cpp	Mon May 03 13:47:38 2010 +0300
+++ b/kerneltest/f32test/server/t_filecache.cpp	Fri May 14 17:13:29 2010 +0300
@@ -114,7 +114,7 @@
 void PrintFileCacheConfig(TFileCacheConfig& aFileCacheConfig, TBool aDisplay = ETrue)
 	{
 	TInt r = controlIo(TheFs,gDrive, KControlIoFileCacheConfig, aFileCacheConfig);
-	test (r == KErrNone);
+	test_KErrNone(r);
 	if (!aDisplay)
 		return;
 	
@@ -271,7 +271,7 @@
 	TBool simulatelockFailureMode;
 	TFileCacheStats fileCacheStats;
 	r = controlIo(TheFs, gDrive, KControlIoFileCacheStats, fileCacheStats);
-	test (r == KErrNone);
+	test_KErrNone(r);
 	test.Printf(_L("Number of files on closed queue=%d\n"),fileCacheStats.iFilesOnClosedQueue);
 	test(fileCacheStats.iFilesOnClosedQueue == 0);
 #endif
@@ -280,7 +280,7 @@
 	// turn OFF lock failure mode 
 	simulatelockFailureMode = EFalse;
 	r = controlIo(TheFs, gDrive, KControlIoSimulateLockFailureMode, simulatelockFailureMode);
-	test (r == KErrNone);
+	test_KErrNone(r);
 #endif
 
 	TFileName testFile   = _L("TEST.BIN");
@@ -618,7 +618,7 @@
 
 	TInt size;
 	r = f.Size(size);
-	test (r == KErrNone);
+	test_KErrNone(r);
 	test (size = KBufSize);
 
 	readPtr.Set(gBuf->Des());
@@ -627,7 +627,7 @@
 	// Allocate full cachelines - so we can enable hole testing
 	TBool allocateAllSegmentsInCacheLine = ETrue;
 	r = controlIo(TheFs, gDrive, KControlIoAllocateMaxSegments, allocateAllSegmentsInCacheLine);
-	test (r == KErrNone);
+	test_KErrNone(r);
 	PrintFileCacheStats(fileCacheStats, EFalse);
 	TInt holesDetected = fileCacheStats.iHoleCount;
 	TInt lockFailures = fileCacheStats.iCommitFailureCount + fileCacheStats.iLockFailureCount;
@@ -712,7 +712,7 @@
 	// Don't allocate full cachelines any more
 	allocateAllSegmentsInCacheLine = EFalse;
 	r = controlIo(TheFs, gDrive, KControlIoAllocateMaxSegments, allocateAllSegmentsInCacheLine);
-	test (r == KErrNone);
+	test_KErrNone(r);
 #endif
 
 
@@ -812,7 +812,7 @@
 
 #if defined(_DEBUG) || defined(_DEBUG_RELEASE)
 	r = controlIo(TheFs, gDrive, KControlIoFileCacheStats, fileCacheStats);
-	test (r == KErrNone);
+	test_KErrNone(r);
 	test.Printf(_L("Number of files on closed queue=%d\n"),fileCacheStats.iFilesOnClosedQueue);
 	test(fileCacheStats.iFilesOnClosedQueue == 1);
 #endif
@@ -846,7 +846,7 @@
 
 #if defined(_DEBUG) || defined(_DEBUG_RELEASE)
 		r = controlIo(TheFs, gDrive, KControlIoFileCacheStats, fileCacheStats);
-		test (r == KErrNone);
+		test_KErrNone(r);
 		test.Printf(_L("Number of files on closed queue=%d\n"),fileCacheStats.iFilesOnClosedQueue);
 		test(fileCacheStats.iFilesOnClosedQueue == 0);
 #endif
@@ -857,7 +857,7 @@
 
 #if defined(_DEBUG) || defined(_DEBUG_RELEASE)
 		r = controlIo(TheFs, gDrive, KControlIoFileCacheStats, fileCacheStats);
-		test (r == KErrNone);
+		test_KErrNone(r);
 		test.Printf(_L("Number of files on closed queue=%d\n"),fileCacheStats.iFilesOnClosedQueue);
 		test(fileCacheStats.iFilesOnClosedQueue == 1);
 #endif
@@ -886,7 +886,7 @@
 
 	#if defined(_DEBUG) || defined(_DEBUG_RELEASE)
 		r = controlIo(TheFs, gDrive, KControlIoFileCacheStats, fileCacheStats);
-		test (r == KErrNone);
+		test_KErrNone(r);
 		test.Printf(_L("Number of files on closed queue=%d\n"),fileCacheStats.iFilesOnClosedQueue);
 		test(fileCacheStats.iFilesOnClosedQueue == 0);
 	#endif
@@ -896,7 +896,7 @@
 	// turn lock failure mode back ON (if enabled)
 	simulatelockFailureMode = ETrue;
 	r = controlIo(TheFs, gDrive, KControlIoSimulateLockFailureMode, simulatelockFailureMode);
-	test (r == KErrNone);
+	test_KErrNone(r);
 #endif
 
 	//**************************************************************
@@ -922,7 +922,7 @@
 
 #if defined(_DEBUG) || defined(_DEBUG_RELEASE)
 	r = controlIo(TheFs, gDrive, KControlIoFileCacheStats, fileCacheStats);
-	test (r == KErrNone);
+	test_KErrNone(r);
 	test.Printf(_L("Number of Write-throughs with dirty data=%d\n"),fileCacheStats.iWriteThroughWithDirtyDataCount);
 	TInt writeThroughWithDirtyDataCountOld = fileCacheStats.iWriteThroughWithDirtyDataCount;
 	TInt writeThroughWithDirtyDataCountNew = writeThroughWithDirtyDataCountOld;
@@ -933,7 +933,7 @@
 		{
 		fileSize = 0;
 		r = f.SetSize(fileSize);
-		test (r == KErrNone);
+		test_KErrNone(r);
 		for (pos = 0; pos < KMaxFileSize; )
 			{
 			r = f.Write(pos, writePtr);
@@ -944,11 +944,11 @@
 				test.Printf(_L("Flush returned %d"), r);
 				test(0);
 				}
-			test(r == KErrNone);
+			test_KErrNone(r);
 			pos+= writePtr.Length();
 
 			r = f.Size(fileSize);
-			test (r == KErrNone);
+			test_KErrNone(r);
 			if (fileSize != pos)
 				{
 				test.Printf(_L("Iter #%d, write pos %d != size %d"), i, pos, fileSize);
@@ -960,7 +960,7 @@
 
 #if defined(_DEBUG) || defined(_DEBUG_RELEASE)
 			r = controlIo(TheFs, gDrive, KControlIoFileCacheStats, fileCacheStats);
-			test (r == KErrNone);
+			test_KErrNone(r);
 			writeThroughWithDirtyDataCountNew = fileCacheStats.iWriteThroughWithDirtyDataCount;
 			if (writeThroughWithDirtyDataCountNew > writeThroughWithDirtyDataCountOld)
 				{
@@ -998,9 +998,9 @@
 
 	RFs fs;
 	TInt r = fs.Connect();
-	test (r==KErrNone);
+	test_KErrNone(r);
 	r = fs.SetSessionPath(gSessionPath);
-	test (r==KErrNone);
+	test_KErrNone(r);
 
 
 	RFile file;
@@ -1236,7 +1236,7 @@
 
 	RFile file;
 	TInt r = file.Replace(TheFs,_L("WRITETST"),EFileStream | aFileMode);
-	test (r == KErrNone);
+	test_KErrNone(r);
 
 	TTime startTime;
 	TTime endTime;
@@ -1600,7 +1600,7 @@
 
 	TVolumeInfo volInfo;
 	TInt r = TheFs.Volume(volInfo, gDrive);
-	test (r == KErrNone);
+	test_KErrNone(r);
 
 	TFullName extName;
 	r = TheFs.ExtensionName(extName,gDrive, 0);
@@ -1635,7 +1635,7 @@
 		// turn OFF lock failure mode
 		TBool simulatelockFailureMode = EFalse;
 		r = controlIo(TheFs, gDrive, KControlIoSimulateLockFailureMode, simulatelockFailureMode);
-		test (r == KErrNone);
+		test_KErrNone(r);
 #endif
 
 		TestFileRead(EFileReadDirectIO);
@@ -1655,7 +1655,7 @@
 		// turn lock failure mode back ON (if enabled)
 		simulatelockFailureMode = ETrue;
 		r = controlIo(TheFs, gDrive, KControlIoSimulateLockFailureMode, simulatelockFailureMode);
-		test (r == KErrNone);
+		test_KErrNone(r);
 #endif
 		}	// if (gRunPerformanceTests)
 
@@ -1779,7 +1779,7 @@
 		{
 		test.Printf(_L("Writing DriveCacheFlags for drive %C = %08X\n"), (TInt) gDriveToTest, gDriveCacheFlags);
 		r = controlIo(TheFs,gDrive, KControlIoFileCacheFlagsWrite, gDriveCacheFlags);
-		test (r == KErrNone);
+		test_KErrNone(r);
 		}
 #endif