kerneltest/f32test/server/t_dcdiskadmin.cpp
branchRCL_3
changeset 44 3e88ff8f41d5
parent 43 c1f20ce4abcf
--- a/kerneltest/f32test/server/t_dcdiskadmin.cpp	Tue Aug 31 16:34:26 2010 +0300
+++ b/kerneltest/f32test/server/t_dcdiskadmin.cpp	Wed Sep 01 12:34:56 2010 +0100
@@ -15,7 +15,6 @@
 // 
 //
 
-#define __E32TEST_EXTENSION__
 #include <f32file.h>
 #include <e32test.h>
 #include <e32std.h>
@@ -76,6 +75,9 @@
 TRequestStatus aStat3;
 TRequestStatus aStat4;
 
+TVolumeInfo aVolInfo;
+//	TDriveInfo adriveInfo;
+
 TBuf<40> systestfile;
 TBuf<40> pritestfile;
 TBuf<40> restestfile;
@@ -106,16 +108,16 @@
 	mkdirname.Append(systestname);
 	mkdirname.Append(KMkDirSub);
 	r=TheFs.MkDirAll(mkdirname);	
-	test_Value(r, r == KErrPermissionDenied);
+	test(r==KErrPermissionDenied);
 
 	r=TheFs.RmDir(mkdirname);	
-	test_Value(r, r == KErrPermissionDenied);
+	test(r==KErrPermissionDenied);
 
 	r=TheFs.SetSubst(systestname,EDriveS);
-	test_Value(r, r == KErrPermissionDenied);
+	test(r==KErrPermissionDenied);
 	
 	r=TheFs.SetSessionPath(systestname);
-	test_Value(r, r == KErrPermissionDenied);
+	test(r==KErrPermissionDenied);
 
 	TheFs.NotifyChange(ENotifyAll,aStat1,systestname);
 	test(aStat1==KErrPermissionDenied);
@@ -130,29 +132,29 @@
 	oldName[0]=(TText)gDriveToTest;
 
 	r=TheFs.GetShortName(systestfile, shortfilename);
-	test_Value(r, r == KErrPermissionDenied);
+	test(r==KErrPermissionDenied);
 
 	r=TheFs.GetLongName(systestfile1, longfilename);
-	test_Value(r, r == KErrPermissionDenied);
+	test(r==KErrPermissionDenied);
 
 	r=file1.Create(TheFs,oldName,EFileWrite);
-	test_Value(r, r == KErrNone || r==KErrAlreadyExists);
+	test(r==KErrNone || r==KErrAlreadyExists);
 	file1.Close();
 
 	r=TheFs.Replace(oldName,systestfile);
-	test_Value(r, r == KErrPermissionDenied);
+	test(r==KErrPermissionDenied);
 	
 	r=TheFs.Rename(systestfile,systestfile1);
-	test_Value(r, r == KErrPermissionDenied);
+	test(r==KErrPermissionDenied);
 	
 	r=TheFs.Entry(systestfile1,entry);
-	test_Value(r, r == KErrPermissionDenied);
+	test(r==KErrPermissionDenied);
 
 	r=TheFs.SetEntry(systestfile1,testtime,KEntryAttNormal,KEntryAttReadOnly);
-	test_Value(r, r == KErrPermissionDenied);
+	test(r==KErrPermissionDenied);
 
 	r=TheFs.Delete(systestfile1);
-	test_Value(r, r == KErrPermissionDenied);
+	test(r==KErrPermissionDenied);
 
 
 	// DEF141257: Security Issue in File Server 
@@ -166,24 +168,24 @@
 	SysTestFileDot.Append(KFileSys);
 	RFile file;
 	r = file.Replace(TheFs, SysTestFileDot, EFileWrite);
-	test_Value(r, r == KErrPathNotFound);
+	test(r==KErrPathNotFound);
 
 	// try creating a subst drive for "\.SYS"...
 	TBuf<40> SysTestNameDot;
 	SysTestNameDot=KSystemPathDot;
 	SysTestNameDot[0]=(TText)('A' + gTheDriveNum);
 	r=TheFs.SetSubst(SysTestNameDot,EDriveA);
-	test_KErrNone(r);
+	test(r==KErrNone);
 
 	// try creating a file using substituted drive...
 	TBuf<40> SubstTestFile = _L("A:\\");
 	SubstTestFile.Append(KFileSys);
 
 	r = file.Replace(TheFs, SubstTestFile, EFileWrite);
-	test_Value(r, r == KErrPathNotFound);
+	test(r==KErrPathNotFound);
 
 	r = TheFs.SetSubst(_L(""),EDriveA);
-	test_KErrNone(r);
+	test(r==KErrNone);
 
 
 
@@ -192,7 +194,7 @@
 	TFindFile finder(TheFs);
 	CDir* dir = NULL;
 	r=finder.FindWildByDir(KWildFile, KWildPathDot, dir);
-	test_Value(r, r == KErrNotFound);
+	test(r==KErrNotFound);
 	delete dir;
 
 	// Deliberately create a directory called "\.SYS"
@@ -201,17 +203,17 @@
 	mkdirname.Append(KSystemPathDot);
 	mkdirname[0]=(TText)('A' + gTheDriveNum);
 	r=TheFs.MkDirAll(mkdirname);	
-	test_KErrNone(r);
+	test(r==KErrNone);
 
 	r=TheFs.GetShortName(mkdirname, shortfilename);
-	test_Value(r, r == KErrNone || r==KErrNotSupported);	// short names not supported on LFFS
+	test(r==KErrNone || r==KErrNotSupported);	// short names not supported on LFFS
 //	r = shortfilename.Compare(_L("SYS~1"));
-//	test_KErrNone(r);
+//	test(r==KErrNone);
 	r = shortfilename.Compare(_L("SYS"));
 	test (r != 0);
 
 	r = TheFs.RmDir(mkdirname);
-	test_KErrNone(r);
+	test(r==KErrNone);
 
 	// Deliberately create a directory called "\..SYS"
 	// and verify shortname is NOT the same as "SYS"
@@ -220,17 +222,17 @@
 	mkdirname.Append(KSystemPathDotDot);
 	mkdirname[0]=(TText)('A' + gTheDriveNum);
 	r=TheFs.MkDirAll(mkdirname);	
-	test_KErrNone(r);
+	test(r==KErrNone);
 
 	r=TheFs.GetShortName(mkdirname, shortfilename);
-	test_Value(r, r == KErrNone || r==KErrNotSupported);	// short names not supported on LFFS
+	test(r==KErrNone || r==KErrNotSupported);	// short names not supported on LFFS
 //	r = shortfilename.Compare(_L("_.SYS"));
-//	test_KErrNone(r);
+//	test(r==KErrNone);
 	r = shortfilename.Compare(_L("SYS"));
 	test (r != 0);
 
 	r = TheFs.RmDir(mkdirname);
-	test_KErrNone(r);
+	test(r==KErrNone);
 	}
 
 
@@ -247,26 +249,26 @@
 	mkdirname.Append(restestname);
 	mkdirname.Append(KMkDirSub);
 	r=TheFs.MkDirAll(mkdirname);	
-	test_Value(r, r == KErrPermissionDenied);
+	test(r==KErrPermissionDenied);
 
 	TheFs.RmDir(mkdirname);
-	test_Value(r, r == KErrPermissionDenied);
+	test(r==KErrPermissionDenied);
 	
 	// Change due to defect DEF099546 fix
 	// TCB capability is required for following operation.
 	r=TheFs.SetSubst(restestname,EDriveS);
-	//test_KErrNone(r);
-	test_Value(r, r == KErrPermissionDenied);
+	//test(r==KErrNone);
+	test(r==KErrPermissionDenied);
 	
 	// SetSubst will fail.
 	//r=TheFs.RealName(_L("S:\\File.XXX"),realName);
-	//test_KErrNone(r);
+	//test(r==KErrNone);
 
 	//r=TheFs.SetSubst(_L(""),EDriveS); 
-	//test_KErrNone(r);
+	//test(r==KErrNone);
 
 	r=TheFs.SetSessionPath(restestname);
-	test_KErrNone(r);
+	test(r==KErrNone);
 	
 	TheFs.NotifyChange(ENotifyAll,aStat4,restestname);
 	test(aStat4==KRequestPending);
@@ -282,32 +284,29 @@
 	oldName[0]=(TText)gDriveToTest;
 
 	r=TheFs.GetShortName(restestfile, shortfilename);
-	test(r == KErrNone || KErrPathNotFound);
-//	test_Value(r, r == KErrNone || r == KErrPathNotFound);
+	test(r==KErrNone || KErrPathNotFound);
 
 	r=TheFs.GetLongName(restestfile1, longfilename);
-	test(r == KErrNone || KErrPathNotFound);
-//	test_Value(r, r == KErrNone || r == KErrPathNotFound);
+	test(r==KErrNone || KErrPathNotFound);
 
 	r=file1.Create(TheFs,oldName,EFileWrite);
-	test_Value(r, r == KErrNone || r==KErrAlreadyExists);
+	test(r==KErrNone || r==KErrAlreadyExists);
 	file1.Close();
 
 	r=TheFs.Replace(oldName,restestfile);
-	test_Value(r, r == KErrPermissionDenied);
+	test(r==KErrPermissionDenied);
 	
 	r=TheFs.Rename(restestfile,restestfile1);
-	test_Value(r, r == KErrPermissionDenied);
+	test(r==KErrPermissionDenied);
 	
 	r=TheFs.Entry(restestfile1,entry);
-	test(r == KErrNone || KErrPathNotFound);
-//	test_Value(r, r == KErrNone || r == KErrPathNotFound);
+	test(r==KErrNone || KErrPathNotFound);
 
 	r=TheFs.SetEntry(restestfile1,testtime,KEntryAttNormal,KEntryAttReadOnly);
-	test_Value(r, r == KErrPermissionDenied);
+	test(r==KErrPermissionDenied);
 
 	r=TheFs.Delete(restestfile1);
-	test_Value(r, r == KErrPermissionDenied);
+	test(r==KErrPermissionDenied);
 	}
 
 
@@ -324,16 +323,16 @@
 	mkdirname.Append(KMkDirSub);
 
 	r=TheFs.MkDirAll(mkdirname);	
-	test_Value(r, r == KErrPermissionDenied);
+	test(r==KErrPermissionDenied);
 
 	r=TheFs.RmDir(mkdirname);	
-	test_Value(r, r == KErrPermissionDenied);
+	test(r==KErrPermissionDenied);
 
 	r=TheFs.SetSubst(pritestfalseidname,EDriveS);
-	test_Value(r, r == KErrPermissionDenied); 
+	test(r==KErrPermissionDenied); 
 	
 	r=TheFs.SetSessionPath(pritestfalseidname);
-	test_Value(r, r == KErrPermissionDenied);
+	test(r==KErrPermissionDenied);
 
 	TheFs.NotifyChange(ENotifyAll,aStat2,pritestfalseidname);
 	test(aStat2==KErrPermissionDenied);
@@ -348,29 +347,29 @@
 	oldName[0]=(TText)gDriveToTest;
 
 	r=TheFs.GetShortName(pritestfile, shortfilename);
-	test_Value(r, r == KErrPermissionDenied);
+	test(r==KErrPermissionDenied);
 
 	r=TheFs.GetLongName(pritestfile1, longfilename);
-	test_Value(r, r == KErrPermissionDenied);
+	test(r==KErrPermissionDenied);
 
 	r=file1.Create(TheFs,oldName,EFileWrite);
-	test_Value(r, r == KErrNone || r==KErrAlreadyExists);
+	test(r==KErrNone || r==KErrAlreadyExists);
 	file1.Close();
 
 	r=TheFs.Replace(oldName,pritestfile);
-	test_Value(r, r == KErrPermissionDenied);
+	test(r==KErrPermissionDenied);
 	
 	r=TheFs.Rename(pritestfile,pritestfile1);
-	test_Value(r, r == KErrPermissionDenied);
+	test(r==KErrPermissionDenied);
 	
 	r=TheFs.Entry(pritestfile1,entry);
-	test_Value(r, r == KErrPermissionDenied);
+	test(r==KErrPermissionDenied);
 
 	r=TheFs.SetEntry(pritestfile1,testtime,KEntryAttNormal,KEntryAttReadOnly);
-	test_Value(r, r == KErrPermissionDenied);
+	test(r==KErrPermissionDenied);
 
 	r=TheFs.Delete(pritestfile1);
-	test_Value(r, r == KErrPermissionDenied);
+	test(r==KErrPermissionDenied);
 
 	}
 
@@ -390,16 +389,16 @@
 	mkdirname.Append(KMkDirSub);
 
 	r=TheFs.MkDirAll(mkdirname);	
-	test_Value(r, r == KErrPermissionDenied);
+	test(r==KErrPermissionDenied);
 
 	r=TheFs.RmDir(mkdirname);	
-	test_Value(r, r == KErrPermissionDenied);
+	test(r==KErrPermissionDenied);
 
 	r=TheFs.SetSubst(pritestname,EDriveS);
-	test_Value(r, r == KErrPermissionDenied); 
+	test(r==KErrPermissionDenied); 
 	
 	r=TheFs.SetSessionPath(pritestname);
-	test_Value(r, r == KErrPermissionDenied);
+	test(r==KErrPermissionDenied);
 
 	TheFs.NotifyChange(ENotifyAll,aStat2,pritestname);
 	test(aStat2==KErrPermissionDenied);
@@ -414,29 +413,29 @@
 	oldName[0]=(TText)gDriveToTest;
 
 	r=TheFs.GetShortName(pritestfile, shortfilename);
-	test_Value(r, r == KErrPermissionDenied);
+	test(r==KErrPermissionDenied);
 
 	r=TheFs.GetLongName(pritestfile1, longfilename);
-	test_Value(r, r == KErrPermissionDenied);
+	test(r==KErrPermissionDenied);
 
 	r=file1.Create(TheFs,oldName,EFileWrite);
-	test_Value(r, r == KErrNone || r==KErrAlreadyExists);
+	test(r==KErrNone || r==KErrAlreadyExists);
 	file1.Close();
 
 	r=TheFs.Replace(oldName,pritestfile);
-	test_Value(r, r == KErrPermissionDenied);
+	test(r==KErrPermissionDenied);
 	
 	r=TheFs.Rename(pritestfile,pritestfile1);
-	test_Value(r, r == KErrPermissionDenied);
+	test(r==KErrPermissionDenied);
 	
 	r=TheFs.Entry(pritestfile1,entry);
-	test_Value(r, r == KErrPermissionDenied);
+	test(r==KErrPermissionDenied);
 
 	r=TheFs.SetEntry(pritestfile1,testtime,KEntryAttNormal,KEntryAttReadOnly);
-	test_Value(r, r == KErrPermissionDenied);
+	test(r==KErrPermissionDenied);
 
 	r=TheFs.Delete(pritestfile1);
-	test_Value(r, r == KErrPermissionDenied);
+	test(r==KErrPermissionDenied);
 
 	}
 
@@ -454,22 +453,22 @@
 	mkdirname.Append(theprivatepath);
 	mkdirname.Append(KMkDirSub);
 	r=TheFs.MkDirAll(mkdirname);	
-	test_KErrNone(r);
+	test(r==KErrNone);
 
 	r=TheFs.RmDir(mkdirname);	
-	test_KErrNone(r);
+	test(r==KErrNone);
 
 	r=TheFs.SetSubst(theprivatepath,EDriveS);	
-	test_KErrNone(r);
+	test(r==KErrNone);
 
 	r=TheFs.RealName(_L("S:\\File.XXX"),realName);
-	test_KErrNone(r);
+	test(r==KErrNone);
 
 	r=TheFs.SetSubst(_L(""),EDriveS);	
-	test_KErrNone(r);
+	test(r==KErrNone);
 	
 	r=TheFs.SetSessionPath(theprivatepath);
-	test_KErrNone(r);
+	test(r==KErrNone);
 
 	TheFs.NotifyChange(ENotifyAll,aStat3,theprivatepath);
 	test(aStat3==KRequestPending);
@@ -484,31 +483,29 @@
 	oldName[0]=(TText)gDriveToTest;
 
 	r=TheFs.GetShortName(pritestfile, shortfilename);
-	test(r == KErrNone || KErrPathNotFound);
-//	test_Value(r, r == KErrNone || r == KErrPathNotFound);
+	test(r==KErrNone || KErrPathNotFound);
 
 	r=TheFs.GetLongName(pritestfile1, longfilename);
-	test(r == KErrNone || KErrPathNotFound);
-//	test_Value(r, r == KErrNone || r == KErrPathNotFound);
+	test(r==KErrNone || KErrPathNotFound);
 
 	r=file1.Create(TheFs,oldName,EFileWrite);
-	test_Value(r, r == KErrNone || r==KErrAlreadyExists);
+	test(r==KErrNone || r==KErrAlreadyExists);
 	file1.Close();
 
 	r=TheFs.Replace(oldName,pritestfile);
-	test_KErrNone(r);
+	test(r==KErrNone);
 	
 	r=TheFs.Rename(pritestfile,pritestfile1);
-	test_Value(r, r == KErrNone || r==KErrAlreadyExists);
+	test(r==KErrNone || r==KErrAlreadyExists);
 	
 	r=TheFs.Entry(pritestfile1,entry);
-	test_KErrNone(r);
+	test(r==KErrNone);
 
 	r=TheFs.SetEntry(pritestfile1,testtime,KEntryAttNormal,KEntryAttReadOnly);
-	test_KErrNone(r);
+	test(r==KErrNone);
 
 	r=TheFs.Delete(pritestfile1);
-	test_KErrNone(r);
+	test(r==KErrNone);
 	}
 
 LOCAL_C void systemRFiletest()
@@ -519,32 +516,32 @@
 //RFile testing with session path set to //system//
 
 	r=TheFs.SetSessionPath(systestname);
-	test_Value(r, r == KErrPermissionDenied);
+	test(r==KErrPermissionDenied);
 
 	r=file1.Temp(TheFs,systestname,fromTemp,EFileWrite);
-	test_Value(r, r == KErrPermissionDenied);
+	test(r==KErrPermissionDenied);
 
 	TBuf<25> sysfilename;
 	sysfilename.Append(systestname);
 	sysfilename.Append(KFileSys);
 	r=file1.Create(TheFs,sysfilename,EFileWrite);
-	test_Value(r, r == KErrPermissionDenied);
+	test(r==KErrPermissionDenied);
 
 	r=file1.Open(TheFs,sysfilename,EFileWrite);
-	test_Value(r, r == KErrPermissionDenied);
+	test(r==KErrPermissionDenied);
 
 	r=file1.Open(TheFs,sysfilename,EFileRead);
-	test_Value(r, r == KErrPermissionDenied);
+	test(r==KErrPermissionDenied);
 
 	r=file1.Replace(TheFs,sysfilename,EFileWrite);
-	test_Value(r, r == KErrPermissionDenied);
+	test(r==KErrPermissionDenied);
 
     TFindFile finder(TheFs);
     CDir* dir = NULL;
     r=finder.FindWildByDir(KWildFile, KWildPath, dir);
 	if (!(r==KErrPermissionDenied))
         test.Printf(_L("T_DCDISKADMIN: test find wildcards r = %d (expected KErrPermissionDenied)\n"), r);
-	test_Value(r, r == KErrPermissionDenied);
+	test(r==KErrPermissionDenied);
 	delete dir;
 	}
 
@@ -555,45 +552,45 @@
 	{
 //RFile testing with session path set to //resource//
 	r=TheFs.SetSessionPath(restestname);
-	test_KErrNone(r);
+	test(r==KErrNone);
 
 	r=file1.Temp(TheFs,restestname,fromTemp,EFileWrite);
-	test_Value(r, r == KErrPermissionDenied);
+	test(r==KErrPermissionDenied);
 	file1.Close();
 
 	r=file1.Create(TheFs,KFileRes,EFileWrite);
-	test_Value(r, r == KErrPermissionDenied);
+	test(r==KErrPermissionDenied);
 	file1.Close();
 
 	r=file1.Open(TheFs,KFileRes,EFileWrite);
-	test_Value(r, r == KErrPermissionDenied);
+	test(r==KErrPermissionDenied);
 	file1.Close();
 
 	r=file1.Open(TheFs,KFileRes,EFileRead|EFileShareReadersOnly);
-	test_Value(r, r == KErrNone || r==KErrPathNotFound);
+	test(r==KErrNone || r==KErrPathNotFound);
 	file1.Close();
 
 	r=file1.Open(TheFs,KFileRes,EFileShareReadersOrWriters|EFileRead);
-	test_Value(r, r == KErrNone || r==KErrPathNotFound);
+	test(r==KErrNone || r==KErrPathNotFound);
 	file1.Close();
 
 	r=file1.Open(TheFs,KFileRes,EFileShareReadersOrWriters|EFileWrite);
-	test_Value(r, r == KErrPermissionDenied);
+	test(r==KErrPermissionDenied);
 	file1.Close();
 
 	r=file1.Open(TheFs,KFileRes,EFileShareReadersOnly);
-	test_KErrNone(r);
+	test(r==KErrNone);
 
 	r=file1.ChangeMode(EFileShareExclusive);	
-	test_KErrNone(r);
+	test(r==KErrNone);
 
 	//this operation is prevented as you can not open a file for write access in the resource directory
 	r=file1.Rename(KFileRes3);
-	test_Value(r, r == KErrPermissionDenied || r==KErrAccessDenied);
+	test(r==KErrPermissionDenied || r==KErrAccessDenied);
 	file1.Close();
 
 	r=file1.Replace(TheFs,KFileRes,EFileWrite);
-	test_Value(r, r == KErrPermissionDenied);
+	test(r==KErrPermissionDenied);
 	file1.Close();
 
 	}
@@ -605,26 +602,26 @@
 //
 	{
 	r=TheFs.SetSessionPath(pritestfalseidname);
-	test_Value(r, r == KErrPermissionDenied);
+	test(r==KErrPermissionDenied);
 
 	r=file1.Temp(TheFs,pritestfalseidname,fromTemp,EFileWrite);
-	test_Value(r, r == KErrPermissionDenied);
+	test(r==KErrPermissionDenied);
 
 	TBuf<25> prifilename;
 	prifilename.Append(pritestname);
 	prifilename.Append(KFileSys);
 
 	r=file1.Create(TheFs,prifilename,EFileWrite);
-	test_Value(r, r == KErrPermissionDenied);
+	test(r==KErrPermissionDenied);
 
 	r=file1.Open(TheFs,prifilename,EFileWrite);
-	test_Value(r, r == KErrPermissionDenied);
+	test(r==KErrPermissionDenied);
 
 	r=file1.Open(TheFs,prifilename,EFileRead);
-	test_Value(r, r == KErrPermissionDenied);
+	test(r==KErrPermissionDenied);
 
 	r=file1.Replace(TheFs,prifilename,EFileWrite);
-	test_Value(r, r == KErrPermissionDenied);
+	test(r==KErrPermissionDenied);
 	}
 
 
@@ -634,26 +631,26 @@
 //
 	{
 	r=TheFs.SetSessionPath(pritestname);
-	test_Value(r, r == KErrPermissionDenied);
+	test(r==KErrPermissionDenied);
 
 	r=file1.Temp(TheFs,pritestname,fromTemp,EFileWrite);
-	test_Value(r, r == KErrPermissionDenied);
+	test(r==KErrPermissionDenied);
 
 	TBuf<25> prifilename;
 	prifilename.Append(pritestname);
 	prifilename.Append(KFileSys);
 
 	r=file1.Create(TheFs,prifilename,EFileWrite);
-	test_Value(r, r == KErrPermissionDenied);
+	test(r==KErrPermissionDenied);
 
 	r=file1.Open(TheFs,prifilename,EFileWrite);
-	test_Value(r, r == KErrPermissionDenied);
+	test(r==KErrPermissionDenied);
 	
 	r=file1.Open(TheFs,prifilename,EFileRead);
-	test_Value(r, r == KErrPermissionDenied);
+	test(r==KErrPermissionDenied);
 
 	r=file1.Replace(TheFs,prifilename,EFileWrite);
-	test_Value(r, r == KErrPermissionDenied);
+	test(r==KErrPermissionDenied);
 	}
 
 
@@ -663,29 +660,29 @@
 //
 	{
 	r=TheFs.SetSessionToPrivate(gTheDriveNum);
-	test_KErrNone(r);
+	test(r==KErrNone);
 		
 	r=file1.Temp(TheFs,theprivatepath,fromTemp,EFileWrite);
-	test_KErrNone(r);
+	test(r==KErrNone);
 	file1.Close();
 
 	r=file1.Create(TheFs,KFilePri,EFileWrite);
-	test_Value(r, r == KErrNone || r==KErrAlreadyExists);
+	test(r==KErrNone || r==KErrAlreadyExists);
 	file1.Close();
 
 	r=file1.Open(TheFs,KFilePri,EFileWrite);
-	test_KErrNone(r);
+	test(r==KErrNone);
 	file1.Close();
 	
 	r=file1.Open(TheFs,KFilePri,EFileRead);
-	test_KErrNone(r);
+	test(r==KErrNone);
 	file1.Close();
 	
 	r=file1.Replace(TheFs,KFilePri,EFileWrite);
-	test_KErrNone(r);
+	test(r==KErrNone);
 	
 	r=file1.Rename(KFilePri3);
-	test_Value(r, r == KErrNone || r==KErrAlreadyExists);
+	test(r==KErrNone || r==KErrAlreadyExists);
 	file1.Close();
 	}
 
@@ -700,30 +697,30 @@
 	dirNameBuf = KSystemPath;
 	dirNameBuf[0]=(TText)gDriveToTest;
 	r=dir.Open(TheFs,dirNameBuf,KEntryAttNormal);
-	test_Value(r, r == KErrPermissionDenied);
+	test(r==KErrPermissionDenied);
 	dir.Close();
 	r=TheFs.GetDir(dirNameBuf,KEntryAttMatchMask,ESortByName,dirEntries);
-	test_Value(r, r == KErrPermissionDenied);
+	test(r==KErrPermissionDenied);
 	dirNameBuf.Zero();
 	delete dirEntries;
 	//Private//falseid
 	dirNameBuf=KPrivateFalseID;
 	dirNameBuf[0]=(TText)gDriveToTest;
 	r=dir.Open(TheFs,dirNameBuf,KEntryAttNormal);
-	test_Value(r, r == KErrPermissionDenied);
+	test(r==KErrPermissionDenied);
 	dir.Close();
 	r=TheFs.GetDir(dirNameBuf,KEntryAttMatchMask,ESortByName,dirEntries);
-	test_Value(r, r == KErrPermissionDenied);
+	test(r==KErrPermissionDenied);
 	dirNameBuf.Zero();
 	delete dirEntries;
 	//Private
 	dirNameBuf=KPrivatePath;
 	dirNameBuf[0]=(TText)gDriveToTest;
 	r=dir.Open(TheFs,dirNameBuf,KEntryAttNormal);
-	test_Value(r, r == KErrPermissionDenied);
+	test(r==KErrPermissionDenied);
 	dir.Close();
 	r=TheFs.GetDir(dirNameBuf,KEntryAttMatchMask,ESortByName,dirEntries);
-	test_Value(r, r == KErrPermissionDenied);
+	test(r==KErrPermissionDenied);
 	dirNameBuf.Zero();
 	delete dirEntries;
 	//Private/uid
@@ -731,19 +728,19 @@
 	dirNameBuf.Insert(0,_L("?:"));
 	dirNameBuf[0]=(TText)gDriveToTest;
 	r=dir.Open(TheFs,dirNameBuf,KEntryAttNormal);
-	test_KErrNone(r);
+	test(r==KErrNone);
 	dir.Close();
 	r=TheFs.GetDir(dirNameBuf,KEntryAttMatchMask,ESortByName,dirEntries);
-	test_KErrNone(r);
+	test(r==KErrNone);
 	dirNameBuf.Zero();
 	delete dirEntries;
 	//Resource
 	dirNameBuf=KResourcePath;
 	dirNameBuf[0]=(TText)gDriveToTest;
 	r=dir.Open(TheFs,dirNameBuf,KEntryAttNormal);
-	test_Value(r, r == KErrNone || r==KErrPathNotFound || r==KErrNotFound);
+	test(r==KErrNone || r==KErrPathNotFound || r==KErrNotFound);
 	r=TheFs.GetDir(dirNameBuf,KEntryAttMatchMask,ESortByName,dirEntries);
-	test_Value(r, r == KErrNone || r==KErrPathNotFound || r==KErrNotFound);
+	test(r==KErrNone || r==KErrPathNotFound || r==KErrNotFound);
 	dir.Close();
 	delete dirEntries;
 	}
@@ -755,19 +752,19 @@
 //
 	{
 	r=TheFs.FileSystemName(fsname,gTheDriveNum);
-	test_KErrNone(r);
+	test(r==KErrNone);
 	r = DismountFileSystem(TheFs, fsname, gTheDriveNum);
-	test_KErrNone(r);
+	test(r==KErrNone);
 //	r=TheFs.RemoveFileSystem(fsname);	//can not test due to bug else where fix exists
-//	test_Value(r, r == KErrPermissionDenied);
+//	test(r==KErrPermissionDenied);
 //	r=TheFs.AddFileSystem(fsname);
-//	test_Value(r, r == KErrPermissionDenied);
+//	test(r==KErrPermissionDenied);
 	r = MountFileSystem(TheFs, fsname, gTheDriveNum);
-	test_KErrNone(r);
+	test(r==KErrNone);
 	r=TheFs.SetDriveName(gTheDriveNum,KDriveName);
-	test_KErrNone(r);
+	test(r==KErrNone);
 	r=TheFs.SetVolumeLabel(KVolLable, gTheDriveNum);
-	test_Value(r, r == KErrNone || r==KErrNotSupported);
+	test(r==KErrNone || r==KErrNotSupported);
 
 	systemRFstest();
 	resourceRFstest();
@@ -792,11 +789,11 @@
 	test(aStat3==KErrNone);
 	
 	r=TheFs.SetSessionPath(systestname);
-	test_Value(r, r == KErrPermissionDenied);
+	test(r==KErrPermissionDenied);
 	
 //Test RRawDisk class
 	r=rawdisk.Open(TheFs,gTheDriveNum);
-	test_Value(r, r == KErrPermissionDenied);
+	test(r==KErrPermissionDenied);
 	rawdisk.Close();
 
 	RDirtest();
@@ -807,21 +804,21 @@
 		{
 		//Test RFormat class
 		r=format.Open(TheFs,driveBuf,EHighDensity,count);
-		test_KErrNone(r);
+		test(r==KErrNone);
 
 		while(count)
 			{
 			TInt r=format.Next(count);
-			test_KErrNone(r);
+			test(r==KErrNone);
 			}
 		format.Close();
 		}
 
 	driveBuf[0]=(TText)gDriveToTest;
 	r=TheFs.ScanDrive(driveBuf);
-	test_Value(r, r == KErrNone || r==KErrNotSupported);
+	test(r==KErrNone || r==KErrNotSupported);
 	r=TheFs.CheckDisk(driveBuf);
-	test_Value(r, r == KErrNone || r==KErrNotSupported);
+	test(r==KErrNone || r==KErrNotSupported);
 	}
 
 
@@ -833,16 +830,16 @@
 	{
 	driveBuf[0]=(TText)gDriveToTest;
 	r=TheFs.SessionPath(temp);
-	test_KErrNone(r);
+	test(r==KErrNone);
 
 	test.Printf(_L("Session path: %S"),&temp);
 
 	r=TheFs.CreatePrivatePath(gTheDriveNum);
-	test_Value(r, r == KErrNone || r== KErrAlreadyExists);
+	test(r==KErrNone || r== KErrAlreadyExists);
 
 	TBuf<18> tempPri;
 	r=TheFs.PrivatePath(tempPri);
-	test_KErrNone(r);
+	test(r==KErrNone);
 	theprivatepath = _L("?:");
 	theprivatepath.Append(tempPri);
 	
@@ -851,9 +848,9 @@
 	TFileName thesessionpath;
 
 	r=TheFs.SetSessionToPrivate(gTheDriveNum);
-	test_KErrNone(r);
+	test(r==KErrNone);
 	r=TheFs.SessionPath(thesessionpath);
-	test_KErrNone(r);
+	test(r==KErrNone);
 
 	test(thesessionpath == theprivatepath);
 	}
@@ -867,8 +864,7 @@
 	test.Next(_L("Delete test directory"));
 	CFileMan* fMan=CFileMan::NewL(TheFs);
 	TInt r=fMan->RmDir(gSessionPath);
-	test(r == KErrNone || KErrPathNotFound);
-//	test_Value(r, r == KErrNone || r == KErrPathNotFound);
+	test(r==KErrNone || KErrPathNotFound);
 	delete fMan;
 	}
 
@@ -892,7 +888,7 @@
 	sesspath[0] = (TText)gDriveToTest;
 
 	TInt r= TheFs.SetSessionPath(sesspath);
-	test_KErrNone(r);
+	test(r==KErrNone);
 
 	//cleanup from previous run of this test
 	TBuf<2> cmd;
@@ -900,7 +896,7 @@
 	cmd[0] = (TText)gDriveToTest;
 	RProcess tp;
 	r=tp.Create(_L("clean_prepdc.exe"),sesspath);
-	test_KErrNone(r);
+	test(r==KErrNone);
 	{
 	TRequestStatus ps;
 	tp.Logon(ps);
@@ -914,30 +910,30 @@
 	RFs fs2;
 	
 	r=fs1.Connect();
-	test_KErrNone(r);
+	test(r==KErrNone);
 	r=fs1.SessionPath(sesspath);
-	test_KErrNone(r);
+	test(r==KErrNone);
 	test.Printf(_L("session1 Path=%S"),&sesspath);
 
 	TBuf<30> privatepath;
 	r=fs1.SetSessionToPrivate(gTheDriveNum);
-	test_KErrNone(r);
+	test(r==KErrNone);
 	r=fs1.PrivatePath(privatepath);
-	test_KErrNone(r);
+	test(r==KErrNone);
 	r=privatepath.Compare(KExpectedPrivatePath());
-	test_Value(r, r == 0);
+	test(r==0);
 	r=fs1.SessionPath(sesspath);
-	test_KErrNone(r);
+	test(r==KErrNone);
 	r=privatepath.Compare(sesspath.Mid(KPathPosition));
-	test_Value(r, r == 0);
+	test(r==0);
 	r=fs1.CreatePrivatePath(gTheDriveNum);
-	test_KErrNone(r);
+	test(r==KErrNone);
 	fs1.Close();
 
 	r=fs2.Connect();
-	test_KErrNone(r);
+	test(r==KErrNone);
 	r=fs2.SessionPath(sesspath);
-	test_KErrNone(r);
+	test(r==KErrNone);
 	test.Printf(_L("session2 Path=%S"),&sesspath);
 	fs2.Close();