105 { |
106 { |
106 |
107 |
107 gSessionPath=_L("?:\\F32-TST\\"); |
108 gSessionPath=_L("?:\\F32-TST\\"); |
108 TChar driveLetter; |
109 TChar driveLetter; |
109 TInt r=TheFs.DriveToChar(aDrive,driveLetter); |
110 TInt r=TheFs.DriveToChar(aDrive,driveLetter); |
110 test(r==KErrNone); |
111 test_KErrNone(r); |
111 gSessionPath[0]=(TText)driveLetter; |
112 gSessionPath[0]=(TText)driveLetter; |
112 r=TheFs.SetSessionPath(gSessionPath); |
113 r=TheFs.SetSessionPath(gSessionPath); |
113 test(r==KErrNone); |
114 test_KErrNone(r); |
114 r=TheFs.MkDirAll(gSessionPath); |
115 r=TheFs.MkDirAll(gSessionPath); |
115 test(r==KErrNone || r==KErrAlreadyExists); |
116 test_Value(r, r == KErrNone || r==KErrAlreadyExists); |
116 TheFs.ResourceCountMarkStart(); |
117 TheFs.ResourceCountMarkStart(); |
117 |
118 |
118 switch(aDrive) |
119 switch(aDrive) |
119 { |
120 { |
120 #if defined (__MARM__) |
121 #if defined (__MARM__) |
267 __UHEAP_MARK; |
268 __UHEAP_MARK; |
268 |
269 |
269 test.Title(); |
270 test.Title(); |
270 test.Start(_L("Starting tests...")); |
271 test.Start(_L("Starting tests...")); |
271 r=TheFs.Connect(); |
272 r=TheFs.Connect(); |
272 test(r==KErrNone); |
273 test_KErrNone(r); |
273 // TheFs.SetAllocFailure(gAllocFailOn); |
274 // TheFs.SetAllocFailure(gAllocFailOn); |
274 |
275 |
275 // Default drive testing |
276 // Default drive testing |
276 DoTests(KDefaultDrive); |
277 DoTests(KDefaultDrive); |
277 |
278 |
278 // Remote drive testing |
279 // Remote drive testing |
279 RThread clientThreadQ; |
280 RThread clientThreadQ; |
280 r=clientThreadQ.Create(_L("TestRemoteDrive"), TestRemoteDrive, KDefaultStackSize,KHeapSize,KHeapSize,NULL); |
281 r=clientThreadQ.Create(_L("TestRemoteDrive"), TestRemoteDrive, KDefaultStackSize,KHeapSize,KHeapSize,NULL); |
281 test(r==KErrNone); |
282 test_KErrNone(r); |
282 TRequestStatus statq; |
283 TRequestStatus statq; |
283 clientThreadQ.Logon(statq); |
284 clientThreadQ.Logon(statq); |
284 test.Next(_L("Resume clientThreadQ")); |
285 test.Next(_L("Resume clientThreadQ")); |
285 clientThreadQ.Resume(); |
286 clientThreadQ.Resume(); |
286 |
287 |
287 // MARM CF card drive testing (WINS emulates CF card on X) |
288 // MARM CF card drive testing (WINS emulates CF card on X) |
288 RThread clientThreadX; |
289 RThread clientThreadX; |
289 r=clientThreadX.Create(_L("TestXDrive"), TestXDrive, KDefaultStackSize,KHeapSize,KHeapSize,NULL); |
290 r=clientThreadX.Create(_L("TestXDrive"), TestXDrive, KDefaultStackSize,KHeapSize,KHeapSize,NULL); |
290 test(r==KErrNone); |
291 test_KErrNone(r); |
291 TRequestStatus statx; |
292 TRequestStatus statx; |
292 clientThreadX.Logon(statx); |
293 clientThreadX.Logon(statx); |
293 test.Next(_L("Resume clientThreadX")); |
294 test.Next(_L("Resume clientThreadX")); |
294 clientThreadX.Resume(); |
295 clientThreadX.Resume(); |
295 |
296 |
296 // MARM RAM drive testing (WINS emulates FAT filesystem on Y) |
297 // MARM RAM drive testing (WINS emulates FAT filesystem on Y) |
297 RThread clientThreadY; |
298 RThread clientThreadY; |
298 r=clientThreadY.Create(_L("TestYDrive"), TestYDrive, KDefaultStackSize,KHeapSize,KHeapSize,NULL); |
299 r=clientThreadY.Create(_L("TestYDrive"), TestYDrive, KDefaultStackSize,KHeapSize,KHeapSize,NULL); |
299 test(r==KErrNone); |
300 test_KErrNone(r); |
300 TRequestStatus staty; |
301 TRequestStatus staty; |
301 clientThreadY.Logon(staty); |
302 clientThreadY.Logon(staty); |
302 test.Next(_L("Resume clientThreadY")); |
303 test.Next(_L("Resume clientThreadY")); |
303 clientThreadY.Resume(); |
304 clientThreadY.Resume(); |
304 |
305 |