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