kerneltest/f32test/server/t_fsched.cpp
changeset 175 5af6c74cd793
parent 0 a41df078684a
child 243 c7a0ce20c48c
--- a/kerneltest/f32test/server/t_fsched.cpp	Thu Jun 10 11:48:01 2010 +0100
+++ b/kerneltest/f32test/server/t_fsched.cpp	Wed Jun 23 11:59:44 2010 +0100
@@ -29,6 +29,9 @@
 #include "t_server.h"
 #include <e32twin.h>
 #include <e32cmn.h>
+#include "f32_test_utils.h"
+
+using namespace F32_Test_Utils;
 
 //----------------------------------------------------------------------------------------------
 //! @SYMTestCaseID      PBASE-T_FSCHED-0191
@@ -930,9 +933,9 @@
 	test.Printf(_L("\nSync read done %d ms before the write ended\n"),I64LOW(timeTaken.Int64() / KuStomS));
 	TReal time=I64LOW(timeTaken.Int64() / KuStomS); 
 	#if !defined(__WINS__)
-	// If this condition fails, means that writing the sync file while fairscheduling a small sync read takes too long
+		// If this condition fails, it means that writing the sync file while fairscheduling a small sync read takes too long
 		test.Printf(_L("time: %f\n"), time);
-//		test((time > 0) && (((gTotalTimeSync[0]-time)>0) || ((gTotalTimeSync[1]-time)>0)) );  
+		// test((time > 0) && (((gTotalTimeSync[0]-time)>0) || ((gTotalTimeSync[1]-time)>0)) );  
 		test(time > 0);
 	#endif 
 	
@@ -959,11 +962,14 @@
 	time = I64LOW(timeTaken.Int64() / KuStomS); 
 
 	#if !defined(__WINS__)
-	// If this condition fails, means that writing the async file while fairscheduling a small async read takes too long
+	if (!Is_HVFS(TheFs, gDrive))
+		{
+		// If this condition fails, it means that writing the async file while fairscheduling a small async read takes too long
 		test.Printf(_L("time: %f\n"), time);
 		test.Printf(_L("gTotalTimeAsync[0] = %d , gTotalTimeAsync[1] = %d\n"),gTotalTimeAsync[0],gTotalTimeAsync[1] );
-//		test((time > 0) && (((gTotalTimeAsync[0]-time)>0) || ((gTotalTimeAsync[1]-time)>0)) );
+		// test((time > 0) && (((gTotalTimeAsync[0]-time)>0) || ((gTotalTimeAsync[1]-time)>0)) );
 		test(time > 0);
+		}
 	#endif
 }
 
@@ -998,9 +1004,9 @@
 	test.Printf(_L("\nSync write done %d ms before the big write ended\n"),I64LOW(timeTaken.Int64() / KuStomS));
 	TReal time=I64LOW(timeTaken.Int64() / KuStomS); 
 	#if !defined(__WINS__)
-	// If this condition fails, means that writing the sync file while fairscheduling a small sync write takes too long
+		// If this condition fails, it means that writing the sync file while fairscheduling a small sync write takes too long
 		test.Printf(_L("time: %f\n"), time);
-// 		test((time > 0) && (((gTotalTimeSync[0]-time)>0) || ((gTotalTimeSync[1]-time)>0)) ); 
+		// test((time > 0) && (((gTotalTimeSync[0]-time)>0) || ((gTotalTimeSync[1]-time)>0)) ); 
 		test(time > 0);
 	#endif 
 
@@ -1018,13 +1024,16 @@
 	
 	timeTaken = time2.MicroSecondsFrom(time1);
 	test.Printf(_L("\nAsync write done %d ms before the big write ended\n"),I64LOW(timeTaken.Int64() / KuStomS));
-	time=I64LOW(timeTaken.Int64() / KuStomS); 
+	time=I64LOW(timeTaken.Int64() / KuStomS);
 	#if !defined(__WINS__)
-	// If this condition fails, means that writing the async file while fairscheduling a small async write takes too long
+	if (!Is_HVFS(TheFs, gDrive))
+		{
+		// If this condition fails, it means that writing the async file while fairscheduling a small async write takes too long
 		test.Printf(_L("time: %f\n"), time);
 		test.Printf(_L("gTotalTimeAsync[0] = %d , gTotalTimeAsync[1] = %d\n"),gTotalTimeAsync[0],gTotalTimeAsync[1] );
-//		test((time > 0) && (((gTotalTimeAsync[0]-time)>0) || ((gTotalTimeAsync[1]-time)>0)) ); 
+		// test((time > 0) && (((gTotalTimeAsync[0]-time)>0) || ((gTotalTimeAsync[1]-time)>0)) );
 		test(time > 0);
+		}
 	#endif
 	bigFile.Close();
 	smallFile.Close();	
@@ -1277,7 +1286,7 @@
 	
 	TBool simulatelockFailureMode = EFalse;
 	r = controlIo(TheFs, gDrive, KControlIoSimulateLockFailureMode, simulatelockFailureMode);
-	test (r == KErrNone  ||  r == KErrNotSupported);
+	test_Value(r, r == KErrNone  ||  r == KErrNotSupported);
 #endif
 
 	// FileNames/File generation
@@ -1336,9 +1345,9 @@
 	TestWriteOrder();
 	
 	// Format the drive to make sure no blocks are left to be erased in LFFS
-	#if !defined(__WINS__)
+	if (!Is_Win32(TheFs, gDrive))
 		Format(gDrive);	
-	#endif
+	
 	r = TheFs.MkDirAll(gSessionPath);
 	
 	TimeTakenToWriteBigFile(1);  
@@ -1366,7 +1375,7 @@
 	// turn lock failure mode back ON (if cache is enabled)
 	simulatelockFailureMode = ETrue;
 	r = controlIo(TheFs, gDrive, KControlIoSimulateLockFailureMode, simulatelockFailureMode);
-    test (r == KErrNone  ||  r == KErrNotSupported);
+    test_Value(r, r == KErrNone  ||  r == KErrNotSupported);
 #endif
 
 	test.End();
@@ -1505,10 +1514,9 @@
 		test.Printf(_L("%c: Media corruption; previous test may have aborted; else, check hardware\n"), (TUint)gDrive + 'A');
 		}
 	TESTERROR(r);
-#if !defined(__WINS__)
-	if ((volInfo.iDrive.iMediaAtt & KMediaAttFormattable))
+	
+	if (!Is_Win32(TheFs, gDrive) && (volInfo.iDrive.iMediaAtt & KMediaAttFormattable))
 		Format(gDrive);
-#endif
 
 	if(CheckForDiskSize())
 		{