--- a/kerneltest/f32test/server/t_notifydismount.cpp Thu Aug 19 11:14:22 2010 +0300
+++ b/kerneltest/f32test/server/t_notifydismount.cpp Tue Aug 31 16:34:26 2010 +0300
@@ -15,6 +15,7 @@
//
//
+#define __E32TEST_EXTENSION__
#include <f32file.h>
#include <e32test.h>
#include <e32hal.h>
@@ -46,12 +47,12 @@
test.Next( _L("Test File Handle Closure"));
TInt r = file.Replace(TheFs, fn, EFileWrite);
- test(r == KErrNone);
+ test_KErrNone(r);
r = TheFs.FileSystemName(fsname,aDrvNum);
- test(r == KErrNone);
+ test_KErrNone(r);
buf = _L8("handle test23456");
r = file.Write(buf);
- test(r == KErrNone);
+ test_KErrNone(r);
TheFs.NotifyDismount(aDrvNum, stat, EFsDismountForceDismount);
User::WaitForRequest(stat);
test(stat.Int() == KErrNone);
@@ -59,13 +60,13 @@
// PDEF137626 Connectivity: Phone reboots automatically when connecting to PC via USB after pl
// Check that writing data to a file when the drive is dismounted doesn't upset the file server
r = file.Write(buf);
- test(r == KErrNotReady || r == KErrDisMounted);
+ test_Value(r, r == KErrNotReady || r == KErrDisMounted);
// PDEF091956 was a file server fault EFsDriveThreadError when the file
// handle was closed
file.Close();
r = TheFs.MountFileSystem(fsname,aDrvNum);
- test(r == KErrNone);
+ test_KErrNone(r);
}
@@ -78,13 +79,13 @@
test.Next( _L("Test Request Cancelling") );
TInt r = TheFs.FileSystemName(fsname,aDrvNum);
- test(r == KErrNone);
+ test_KErrNone(r);
//***************************************
// first test with an open file handle
//***************************************
r = file.Replace(TheFs, fn, EFileWrite);
- test(r == KErrNone);
+ test_KErrNone(r);
// up the priority of this thread so that we can queue 2 requests onto the drive thread -
// i.e. a TFsNotifyDismount and a TFsCloseObject
@@ -106,7 +107,7 @@
thisThread.SetPriority(EPriorityNormal);
r = TheFs.MountFileSystem(fsname,aDrvNum);
- test(r == KErrNone);
+ test_KErrNone(r);
//***************************************
@@ -116,11 +117,11 @@
RDir dir;
TFileName sessionPath;
r=TheFs.SessionPath(sessionPath);
- test(r==KErrNone);
+ test_KErrNone(r);
TFileName path=_L("?:\\*");
path[0]=sessionPath[0];
r=dir.Open(TheFs,path,KEntryAttMaskSupported);
- test(r==KErrNone);
+ test_KErrNone(r);
thisThread.SetPriority(EPriorityRealTime);
TheFs.NotifyDismount(aDrvNum, stat, EFsDismountForceDismount);
@@ -132,7 +133,7 @@
thisThread.SetPriority(EPriorityNormal);
r = TheFs.MountFileSystem(fsname,aDrvNum);
- test(r == KErrNone);
+ test_KErrNone(r);
}
@@ -146,25 +147,25 @@
TInt size = 0;
TInt r = file.Replace(TheFs, fn, EFileWrite);
- test(r == KErrNone);
+ test_KErrNone(r);
r = TheFs.FileSystemName(fsname,aDrvNum);
- test(r == KErrNone);
+ test_KErrNone(r);
buf = _L8("size test9123456");
r = file.Write(buf);
- test(r == KErrNone);
+ test_KErrNone(r);
r = file.Flush();
- test(r == KErrNone);
+ test_KErrNone(r);
r = file.Write(buf);
- test(r == KErrNone);
+ test_KErrNone(r);
TheFs.NotifyDismount(aDrvNum, stat, EFsDismountForceDismount);
User::WaitForRequest(stat);
test(stat.Int() == KErrNone);
file.Close();
r = TheFs.MountFileSystem(fsname,aDrvNum);
- test(r == KErrNone);
+ test_KErrNone(r);
file.Open(TheFs, fn, EFileWrite);
r = file.Size(size);
- test(r == KErrNone);
+ test_KErrNone(r);
// PDEF091956 was, for example, a file size of 16 rather than 32. new file sizes were
// not flushed for the forced dismount. this was only a problem with rugged fat off.
test(size == 32);
@@ -173,13 +174,13 @@
test.Next( _L("Test File Size Flushing with EFsDismountNotifyClients") );
size = 0;
r = file.Replace(TheFs, fn, EFileWrite);
- test(r == KErrNone);
+ test_KErrNone(r);
r = file.Write(buf);
- test(r == KErrNone);
+ test_KErrNone(r);
r = file.Write(buf);
- test(r == KErrNone);
+ test_KErrNone(r);
TheFs.NotifyDismount(aDrvNum, stat, EFsDismountNotifyClients);
User::WaitForRequest(stat);
@@ -188,10 +189,10 @@
file.Close();
r = TheFs.MountFileSystem(fsname,aDrvNum);
- test(r == KErrNone);
+ test_KErrNone(r);
file.Open(TheFs, fn, EFileWrite);
r = file.Size(size);
- test(r == KErrNone);
+ test_KErrNone(r);
test(size == 32);
file.Close();
}
@@ -228,7 +229,7 @@
TInt drvNum, r;
r=TheFs.CharToDrive(gDriveToTest,drvNum);
- test(r==KErrNone);
+ test_KErrNone(r);
// dismounting with file system extension present doesn't seem to work
@@ -268,11 +269,11 @@
TUint8 isRugged;
TPtr8 pRugged(&isRugged,1,1);
r=TheFs.ControlIo(drvNum,KControlIoIsRugged,pRugged);
- test(r==KErrNone);
+ test_KErrNone(r);
if(isRugged)
{
r=TheFs.ControlIo(drvNum,KControlIoRuggedOff);
- test(r==KErrNone);
+ test_KErrNone(r);
}
TestFileSizeFlushing(drvNum);
@@ -281,7 +282,7 @@
if(isRugged)
{
r=TheFs.ControlIo(drvNum,KControlIoRuggedOn);
- test(r==KErrNone);
+ test_KErrNone(r);
}
}
else