kerneltest/f32test/server/t_main.cpp
changeset 175 5af6c74cd793
parent 90 947f0dc9f7a8
child 297 b2826f67641f
--- a/kerneltest/f32test/server/t_main.cpp	Thu Jun 10 11:48:01 2010 +0100
+++ b/kerneltest/f32test/server/t_main.cpp	Wed Jun 23 11:59:44 2010 +0100
@@ -24,6 +24,7 @@
 #include <f32dbg.h>
 #include "t_server.h"
 #include "t_chlffs.h"
+#include "f32_test_utils.h"
 
 GLDEF_D	RFs TheFs;
 GLDEF_D TFileName gSessionPath;
@@ -157,14 +158,11 @@
 
 		while(illegalChar)
 			{
-#if defined(__WINS__)
-			if (gSessionPath[0]=='C')
+			if (F32_Test_Utils::Is_SimulatedSystemDrive(TheFs, CurrentDrive()))
 				letter=(TChar)('A'+Math::Rand(aSeed)%26);
 			else
 				letter=(TChar)Math::Rand(aSeed)%256;
-#else
-			letter=(TChar)Math::Rand(aSeed)%256;
-#endif
+
 			TBool space=letter.IsSpace();
 			if (space && spaceChar==-1)
 				spaceChar=i;
@@ -666,12 +664,12 @@
 
 	TInt orgSessionCount;
 	r = controlIo(TheFs,theDrive, KControlIoSessionCount, orgSessionCount);
-	test(r==KErrNone);
+	test_KErrNone(r);
 	test.Printf(_L("Session count start=%d\n"),orgSessionCount);
 
 	TInt orgObjectCount;
 	r = controlIo(TheFs,theDrive, KControlIoObjectCount, orgObjectCount);
-	test(r==KErrNone);
+	test_KErrNone(r);
 	test.Printf(_L("Object count start=%d\n"),orgObjectCount);
 
 
@@ -717,7 +715,7 @@
 	// NB: This won't help if the test has opened another session & left sub-sessions open.
 	TheFs.Close();
 	r=TheFs.Connect();
-	test(r==KErrNone);
+	test_KErrNone(r);
 
 	// Display the file cache stats before closing the file queue
 	TFileCacheStats endFileCacheStats;
@@ -743,11 +741,11 @@
 		test_KErrNone(r);
 
 		r = controlIo(TheFs,theDrive, KControlIoSessionCount, endSessionCount);
-		test(r==KErrNone);
+		test_KErrNone(r);
 		test.Printf(_L("Session count end=%d\n"),endSessionCount);
 
 		r = controlIo(TheFs,theDrive, KControlIoObjectCount, endObjectCount);
-		test(r==KErrNone);
+		test_KErrNone(r);
 		test.Printf(_L("Object count end=%d\n"),endObjectCount);
 
 		if (endSessionCount == orgSessionCount && endObjectCount == orgObjectCount)