author | Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com> |
Tue, 06 Jul 2010 15:50:07 +0300 | |
changeset 201 | 43365a9b78a3 |
parent 200 | 73ea206103e6 |
permissions | -rw-r--r-- |
0 | 1 |
// Copyright (c) 2002-2009 Nokia Corporation and/or its subsidiary(-ies). |
2 |
// All rights reserved. |
|
3 |
// This component and the accompanying materials are made available |
|
4 |
// under the terms of the License "Eclipse Public License v1.0" |
|
5 |
// which accompanies this distribution, and is available |
|
6 |
// at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
7 |
// |
|
8 |
// Initial Contributors: |
|
9 |
// Nokia Corporation - initial contribution. |
|
10 |
// |
|
11 |
// Contributors: |
|
12 |
// |
|
13 |
// Description: |
|
14 |
// f32test\ext\t_ext1.cpp |
|
15 |
// |
|
16 |
// |
|
17 |
||
109
b3a1d9898418
Revision: 201019
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
102
diff
changeset
|
18 |
#define __E32TEST_EXTENSION__ |
0 | 19 |
#include <f32file.h> |
20 |
#include <e32test.h> |
|
21 |
#include <e32svr.h> |
|
22 |
#include "t_server.h" |
|
23 |
#include "f32_test_utils.h" |
|
24 |
||
25 |
using namespace F32_Test_Utils; |
|
26 |
||
27 |
||
28 |
GLDEF_D RTest test(_L("T_EXT1")); |
|
29 |
||
30 |
_LIT(KExtensionLog,"T_LOGEXT"); |
|
31 |
_LIT(KExtensionLogName,"Logger"); |
|
32 |
_LIT(KExtensionEmpty,"T_EMPTYEXT"); |
|
33 |
_LIT(KExtensionEmptyName,"Empty"); |
|
34 |
_LIT(KExtensionBit,"T_BITEXT"); |
|
35 |
_LIT(KExtensionBitName,"Bitchange"); |
|
36 |
_LIT(KExtensionRubbish,"T_RUBBISH"); |
|
37 |
_LIT(dir1,"\\dir1\\"); |
|
38 |
_LIT(file1Name,"\\dir1\\file1.doc"); |
|
39 |
_LIT8(toWrite,"abcdefghijklmnop"); |
|
40 |
||
41 |
void TestSecondaryExtensions() |
|
42 |
// |
|
43 |
// a secondary extension is one that is added to a drive with an existing file system |
|
44 |
// therefore a mount is successful with or without the extension |
|
45 |
// |
|
46 |
{ |
|
47 |
test.Next(_L("TestSecondaryExtensions()")); |
|
48 |
TInt drive; |
|
49 |
TInt err=RFs::CharToDrive(gDriveToTest,drive); |
|
109
b3a1d9898418
Revision: 201019
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
102
diff
changeset
|
50 |
test_KErrNone(err); |
0 | 51 |
|
52 |
TPckgBuf<TBool> drvSyncBuf; |
|
53 |
err = TheFs.QueryVolumeInfoExt(drive, EIsDriveSync, drvSyncBuf); |
|
109
b3a1d9898418
Revision: 201019
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
102
diff
changeset
|
54 |
test_KErrNone(err); |
0 | 55 |
const TBool bDrvSync = drvSyncBuf(); |
56 |
||
57 |
||
58 |
TFullName fsName; |
|
59 |
TInt r=TheFs.FileSystemName(fsName,drive); |
|
109
b3a1d9898418
Revision: 201019
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
102
diff
changeset
|
60 |
test_KErrNone(r); |
0 | 61 |
test.Printf(_L("fsName=%S\n"),&fsName); |
62 |
||
200
73ea206103e6
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
109
diff
changeset
|
63 |
if (Is_SimulatedSystemDrive(TheFs, drive)) |
0 | 64 |
{ |
200
73ea206103e6
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
109
diff
changeset
|
65 |
// check that the extension cannot be mounted since it is not supported by the file system |
73ea206103e6
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
109
diff
changeset
|
66 |
test.Printf(_L("Test extension cannot be mounted")); |
0 | 67 |
r=TheFs.AddExtension(KExtensionLog); |
109
b3a1d9898418
Revision: 201019
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
102
diff
changeset
|
68 |
test_KErrNone(r); |
0 | 69 |
r=TheFs.MountExtension(KExtensionLogName,drive); |
109
b3a1d9898418
Revision: 201019
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
102
diff
changeset
|
70 |
test_Value(r, r == KErrNotSupported); |
0 | 71 |
r=TheFs.RemoveExtension(KExtensionLogName); |
109
b3a1d9898418
Revision: 201019
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
102
diff
changeset
|
72 |
test_KErrNone(r); |
0 | 73 |
return; |
74 |
} |
|
75 |
||
76 |
test.Next(_L("RFs::AddExtension()")); |
|
77 |
r=TheFs.AddExtension(KExtensionLog); |
|
78 |
RDebug::Print(_L("addext=%d"),r); |
|
109
b3a1d9898418
Revision: 201019
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
102
diff
changeset
|
79 |
test_KErrNone(r); |
0 | 80 |
r=TheFs.AddExtension(KExtensionLog); |
109
b3a1d9898418
Revision: 201019
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
102
diff
changeset
|
81 |
test_Value(r, r == KErrAlreadyExists); |
0 | 82 |
r=TheFs.AddExtension(KExtensionRubbish); |
109
b3a1d9898418
Revision: 201019
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
102
diff
changeset
|
83 |
test_Value(r, r == KErrNotFound); |
0 | 84 |
r=TheFs.AddExtension(KExtensionEmpty); |
109
b3a1d9898418
Revision: 201019
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
102
diff
changeset
|
85 |
test_KErrNone(r); |
0 | 86 |
|
87 |
test.Next(_L("RFs::MountExtension()")); |
|
88 |
#if !defined(__WINS__) |
|
89 |
// check that the extension cannot be mounted on file system that does not support extensions |
|
90 |
r=TheFs.MountExtension(KExtensionLogName,EDriveZ); |
|
109
b3a1d9898418
Revision: 201019
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
102
diff
changeset
|
91 |
test_Value(r, r == KErrNotSupported); |
0 | 92 |
#endif |
93 |
// test mounting on drive with no file system |
|
94 |
r=TheFs.DismountFileSystem(fsName,drive); |
|
109
b3a1d9898418
Revision: 201019
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
102
diff
changeset
|
95 |
test_KErrNone(r); |
0 | 96 |
r=TheFs.MountExtension(KExtensionLogName,drive); |
109
b3a1d9898418
Revision: 201019
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
102
diff
changeset
|
97 |
test_Value(r, r == KErrNotReady); |
0 | 98 |
r=TheFs.MountFileSystem(fsName,drive,bDrvSync); |
109
b3a1d9898418
Revision: 201019
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
102
diff
changeset
|
99 |
test_KErrNone(r); |
0 | 100 |
// test with a resource open |
101 |
_LIT(KFileName,"testing.doc"); |
|
102 |
RFile file; |
|
103 |
r=file.Replace(TheFs,KFileName,EFileShareExclusive); |
|
109
b3a1d9898418
Revision: 201019
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
102
diff
changeset
|
104 |
test_KErrNone(r); |
0 | 105 |
r=TheFs.MountExtension(KExtensionLogName,drive); |
109
b3a1d9898418
Revision: 201019
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
102
diff
changeset
|
106 |
test_Value(r, r == KErrInUse); |
0 | 107 |
file.Close(); |
108 |
r=TheFs.Delete(KFileName); |
|
109
b3a1d9898418
Revision: 201019
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
102
diff
changeset
|
109 |
test_KErrNone(r); |
0 | 110 |
// test with a format open |
111 |
TBuf<4> driveBuf=_L("?:\\"); |
|
112 |
driveBuf[0]=(TText)(drive+'A'); |
|
113 |
RFormat format; |
|
114 |
TInt count; |
|
115 |
r=format.Open(TheFs,driveBuf,EHighDensity,count); |
|
109
b3a1d9898418
Revision: 201019
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
102
diff
changeset
|
116 |
test_KErrNone(r); |
0 | 117 |
r=TheFs.MountExtension(KExtensionLogName,drive); |
109
b3a1d9898418
Revision: 201019
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
102
diff
changeset
|
118 |
test_Value(r, r == KErrInUse); |
0 | 119 |
format.Close(); |
120 |
// get the extension name |
|
121 |
TFullName extName; |
|
122 |
r=TheFs.ExtensionName(extName,drive,0); |
|
109
b3a1d9898418
Revision: 201019
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
102
diff
changeset
|
123 |
test_Value(r, r == KErrNotFound); |
0 | 124 |
// now load the extension |
125 |
r=TheFs.MountExtension(KExtensionLogName,drive); |
|
109
b3a1d9898418
Revision: 201019
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
102
diff
changeset
|
126 |
test_KErrNone(r); |
0 | 127 |
r=TheFs.ExtensionName(extName,drive,0); |
109
b3a1d9898418
Revision: 201019
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
102
diff
changeset
|
128 |
test_Value(r, r == KErrNone && extName==KExtensionLogName); |
0 | 129 |
r=TheFs.ExtensionName(extName,drive,1); |
109
b3a1d9898418
Revision: 201019
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
102
diff
changeset
|
130 |
test_Value(r, r == KErrNotFound); |
0 | 131 |
// try remounting the same extension |
132 |
r=TheFs.MountExtension(KExtensionLogName,drive); |
|
109
b3a1d9898418
Revision: 201019
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
102
diff
changeset
|
133 |
test_Value(r, r == KErrAlreadyExists); |
0 | 134 |
// mount a second extension |
135 |
r=TheFs.MountExtension(KExtensionEmptyName,drive); |
|
109
b3a1d9898418
Revision: 201019
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
102
diff
changeset
|
136 |
test_KErrNone(r); |
0 | 137 |
r=TheFs.ExtensionName(extName,drive,0); |
109
b3a1d9898418
Revision: 201019
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
102
diff
changeset
|
138 |
test_Value(r, r == KErrNone && extName==KExtensionLogName); |
0 | 139 |
r=TheFs.ExtensionName(extName,drive,1); |
109
b3a1d9898418
Revision: 201019
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
102
diff
changeset
|
140 |
test_Value(r, r == KErrNone && extName==KExtensionEmptyName); |
0 | 141 |
|
142 |
// force a remount on a removable media and check that extensions both exist |
|
143 |
test.Printf(_L("Test forcing remount\n")); |
|
144 |
TDriveInfo info; |
|
145 |
r=TheFs.Drive(info,drive); |
|
146 |
if(info.iDriveAtt&KDriveAttRemovable) |
|
147 |
{ |
|
148 |
const TInt KMediaRemountForceMediaChange = 0x00000001; |
|
149 |
||
150 |
||
151 |
TRequestStatus changeStatus; |
|
152 |
TheFs.NotifyChange(ENotifyAll, changeStatus); |
|
153 |
||
154 |
test.Printf(_L("Remounting the drive\n"), r); |
|
155 |
r = TheFs.RemountDrive(drive, NULL, (TUint) KMediaRemountForceMediaChange); |
|
109
b3a1d9898418
Revision: 201019
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
102
diff
changeset
|
156 |
test_Value(r, r == KErrNotReady || r == KErrNone); |
0 | 157 |
|
158 |
do |
|
159 |
{ |
|
160 |
test.Printf(_L("Waiting for media change...\n")); |
|
161 |
User::WaitForRequest(changeStatus); |
|
162 |
||
163 |
r=TheFs.Drive(info,drive); |
|
164 |
test.Printf(_L("Drive() returned %d\n"), r); |
|
165 |
||
166 |
TheFs.NotifyChange(ENotifyAll, changeStatus); |
|
167 |
} |
|
168 |
while (r == KErrNotReady); |
|
169 |
TheFs.NotifyChangeCancel(changeStatus); |
|
170 |
||
171 |
User::After(1000000); //-- don't know why we need this, otherwise for WINS mediadriver returns -18 |
|
172 |
||
173 |
||
174 |
||
175 |
/* |
|
176 |
//-- strange, but this variant caused Media Driver to always return -18 |
|
177 |
//-- and the media have become inaccessible forever (on H2). |
|
178 |
//-- funny enough, but turning ON heavy logging from the drivers (PBUS & KLOCDRV) helped the problem |
|
179 |
||
180 |
test.Printf(_L("Force media change\n")); |
|
181 |
RLocalDrive d; |
|
182 |
TBool flag=EFalse; |
|
183 |
r=d.Connect(1,flag); |
|
109
b3a1d9898418
Revision: 201019
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
102
diff
changeset
|
184 |
test_KErrNone(r); |
0 | 185 |
d.ForceMediaChange(); |
186 |
d.Close(); |
|
187 |
//#if defined(__WINS__) |
|
188 |
// ??? seems to work, find out why |
|
189 |
//User::After(500000); |
|
190 |
User::After(2000000); |
|
191 |
//#endif |
|
192 |
*/ |
|
193 |
} |
|
194 |
||
195 |
||
196 |
||
197 |
r=TheFs.ExtensionName(extName,drive,0); |
|
109
b3a1d9898418
Revision: 201019
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
102
diff
changeset
|
198 |
test_Value(r, r == KErrNone && extName==KExtensionLogName); |
0 | 199 |
r=TheFs.ExtensionName(extName,drive,1); |
109
b3a1d9898418
Revision: 201019
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
102
diff
changeset
|
200 |
test_Value(r, r == KErrNone && extName==KExtensionEmptyName); |
0 | 201 |
|
202 |
test.Printf(_L("Accessing media...\n")); |
|
203 |
// and now do some file system operations |
|
204 |
TBuf8<16> readBuf; |
|
205 |
r=TheFs.MkDir(dir1); |
|
206 |
||
207 |
test.Printf(_L("res=%d\n"), r); |
|
208 |
||
209 |
||
109
b3a1d9898418
Revision: 201019
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
102
diff
changeset
|
210 |
test_Value(r, r == KErrNone||r==KErrAlreadyExists); |
0 | 211 |
RFile file1; |
212 |
r=file1.Replace(TheFs,file1Name,EFileShareExclusive); |
|
109
b3a1d9898418
Revision: 201019
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
102
diff
changeset
|
213 |
test_KErrNone(r); |
0 | 214 |
r=file1.Write(toWrite); |
109
b3a1d9898418
Revision: 201019
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
102
diff
changeset
|
215 |
test_KErrNone(r); |
0 | 216 |
r=file1.Read(0,readBuf); |
217 |
test(readBuf==toWrite); |
|
218 |
r=file1.SetSize(0); |
|
109
b3a1d9898418
Revision: 201019
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
102
diff
changeset
|
219 |
test_KErrNone(r); |
0 | 220 |
file1.Close(); |
221 |
r=TheFs.Delete(file1Name); |
|
109
b3a1d9898418
Revision: 201019
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
102
diff
changeset
|
222 |
test_KErrNone(r); |
0 | 223 |
r=TheFs.RmDir(dir1); |
109
b3a1d9898418
Revision: 201019
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
102
diff
changeset
|
224 |
test_KErrNone(r); |
0 | 225 |
|
226 |
test.Next(_L("RFs::DismountExtension()")); |
|
227 |
// test with a resource open |
|
228 |
r=file.Replace(TheFs,KFileName,EFileShareExclusive); |
|
109
b3a1d9898418
Revision: 201019
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
102
diff
changeset
|
229 |
test_KErrNone(r); |
0 | 230 |
r=TheFs.DismountExtension(KExtensionLogName,drive); |
109
b3a1d9898418
Revision: 201019
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
102
diff
changeset
|
231 |
test_Value(r, r == KErrInUse); |
0 | 232 |
file.Close(); |
233 |
r=TheFs.Delete(KFileName); |
|
109
b3a1d9898418
Revision: 201019
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
102
diff
changeset
|
234 |
test_KErrNone(r); |
0 | 235 |
// test with a format open |
236 |
r=format.Open(TheFs,driveBuf,EHighDensity,count); |
|
109
b3a1d9898418
Revision: 201019
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
102
diff
changeset
|
237 |
test_KErrNone(r); |
0 | 238 |
r=TheFs.DismountExtension(KExtensionLogName,drive); |
109
b3a1d9898418
Revision: 201019
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
102
diff
changeset
|
239 |
test_Value(r, r == KErrInUse); |
0 | 240 |
format.Close(); |
241 |
// now dismount an extension |
|
242 |
r=TheFs.DismountExtension(KExtensionLogName,drive); |
|
109
b3a1d9898418
Revision: 201019
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
102
diff
changeset
|
243 |
test_KErrNone(r); |
0 | 244 |
r=TheFs.ExtensionName(extName,drive,0); |
109
b3a1d9898418
Revision: 201019
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
102
diff
changeset
|
245 |
test_Value(r, r == KErrNone && extName==KExtensionEmptyName); |
0 | 246 |
r=TheFs.ExtensionName(extName,drive,1); |
109
b3a1d9898418
Revision: 201019
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
102
diff
changeset
|
247 |
test_Value(r, r == KErrNotFound); |
0 | 248 |
// try to dismount an extension that is not mounted |
249 |
r=TheFs.DismountExtension(KExtensionLogName,drive); |
|
109
b3a1d9898418
Revision: 201019
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
102
diff
changeset
|
250 |
test_Value(r, r == KErrNotFound); |
0 | 251 |
r=TheFs.ExtensionName(extName,drive,0); |
109
b3a1d9898418
Revision: 201019
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
102
diff
changeset
|
252 |
test_Value(r, r == KErrNone && extName==KExtensionEmptyName); |
0 | 253 |
r=TheFs.ExtensionName(extName,drive,1); |
109
b3a1d9898418
Revision: 201019
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
102
diff
changeset
|
254 |
test_Value(r, r == KErrNotFound); |
0 | 255 |
// dismount the remaining extension |
256 |
r=TheFs.DismountExtension(KExtensionEmptyName,drive); |
|
109
b3a1d9898418
Revision: 201019
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
102
diff
changeset
|
257 |
test_KErrNone(r); |
0 | 258 |
r=TheFs.ExtensionName(extName,drive,0); |
109
b3a1d9898418
Revision: 201019
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
102
diff
changeset
|
259 |
test_Value(r, r == KErrNotFound); |
0 | 260 |
r=TheFs.ExtensionName(extName,drive,1); |
109
b3a1d9898418
Revision: 201019
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
102
diff
changeset
|
261 |
test_Value(r, r == KErrNotFound); |
0 | 262 |
|
263 |
test.Next(_L("RFs::RemoveExtension()")); |
|
264 |
r=TheFs.RemoveExtension(KExtensionLogName); |
|
109
b3a1d9898418
Revision: 201019
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
102
diff
changeset
|
265 |
test_KErrNone(r); |
0 | 266 |
r=TheFs.RemoveExtension(KExtensionEmptyName); |
109
b3a1d9898418
Revision: 201019
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
102
diff
changeset
|
267 |
test_KErrNone(r); |
0 | 268 |
} |
269 |
||
270 |
void TestPrimaryExtensions() |
|
271 |
// |
|
272 |
// a primary extension is one that is added to a drive before a file system is mounted |
|
273 |
// must be present for the mount to be successful (eg. FTL) |
|
274 |
// |
|
275 |
{ |
|
276 |
test.Next(_L("TestPrimaryExtensions()")); |
|
277 |
TInt drive; |
|
278 |
TInt err=RFs::CharToDrive(gDriveToTest,drive); |
|
109
b3a1d9898418
Revision: 201019
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
102
diff
changeset
|
279 |
test_KErrNone(err); |
0 | 280 |
|
200
73ea206103e6
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
109
diff
changeset
|
281 |
if(Is_SimulatedSystemDrive(TheFs, drive)) |
73ea206103e6
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
109
diff
changeset
|
282 |
{ |
73ea206103e6
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
109
diff
changeset
|
283 |
test.Printf(_L("Skipping TestPrimaryExtensions on PlatSim/Emulator drive %C:\n"), gSessionPath[0]); |
0 | 284 |
return; |
200
73ea206103e6
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
109
diff
changeset
|
285 |
} |
0 | 286 |
|
287 |
TPckgBuf<TBool> drvSyncBuf; |
|
288 |
err = TheFs.QueryVolumeInfoExt(drive, EIsDriveSync, drvSyncBuf); |
|
109
b3a1d9898418
Revision: 201019
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
102
diff
changeset
|
289 |
test_KErrNone(err); |
0 | 290 |
const TBool bDrvSync = drvSyncBuf(); |
291 |
||
292 |
// don't test on ram drive since accesses memory directly |
|
293 |
TDriveInfo info; |
|
294 |
TInt r=TheFs.Drive(info,drive); |
|
295 |
if(info.iMediaAtt&KMediaAttVariableSize) |
|
296 |
return; |
|
297 |
||
298 |
TFullName fsName; |
|
299 |
r=TheFs.FileSystemName(fsName,drive); |
|
109
b3a1d9898418
Revision: 201019
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
102
diff
changeset
|
300 |
test_KErrNone(r); |
0 | 301 |
test.Printf(_L("fsName=%S\n"),&fsName); |
302 |
||
303 |
test.Next(_L("RFs::AddExtension()")); |
|
304 |
r=TheFs.AddExtension(KExtensionLog); |
|
109
b3a1d9898418
Revision: 201019
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
102
diff
changeset
|
305 |
test_KErrNone(r); |
0 | 306 |
r=TheFs.AddExtension(KExtensionEmpty); |
109
b3a1d9898418
Revision: 201019
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
102
diff
changeset
|
307 |
test_KErrNone(r); |
0 | 308 |
r=TheFs.AddExtension(KExtensionBit); |
109
b3a1d9898418
Revision: 201019
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
102
diff
changeset
|
309 |
test_KErrNone(r); |
0 | 310 |
|
311 |
test.Next(_L("RFs::MountFileSystem()")); |
|
312 |
// test with file system that already exists |
|
313 |
r=TheFs.MountFileSystem(fsName,KExtensionBitName,drive,bDrvSync); |
|
109
b3a1d9898418
Revision: 201019
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
102
diff
changeset
|
314 |
test_Value(r, r == KErrAccessDenied); |
0 | 315 |
// unmount drive and mount primary extension along with file system |
316 |
r=TheFs.DismountFileSystem(fsName,drive); |
|
109
b3a1d9898418
Revision: 201019
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
102
diff
changeset
|
317 |
test_KErrNone(r); |
0 | 318 |
|
319 |
//-- !! N.B this extension mangles data read/written ftom/to the media, for some file systems it is OK and mounting succeeds |
|
320 |
//-- for others - this will result in KErrCorrupt |
|
321 |
r=TheFs.MountFileSystem(fsName,KExtensionBitName,drive,bDrvSync); |
|
109
b3a1d9898418
Revision: 201019
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
102
diff
changeset
|
322 |
test_Value(r, r == KErrNone||r==KErrCorrupt); |
0 | 323 |
|
324 |
// and now format |
|
325 |
Format(drive); |
|
326 |
TFullName extName; |
|
327 |
r=TheFs.ExtensionName(extName,drive,0); |
|
109
b3a1d9898418
Revision: 201019
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
102
diff
changeset
|
328 |
test_Value(r, r == KErrNone && extName==KExtensionBitName); |
0 | 329 |
r=TheFs.ExtensionName(extName,drive,1); |
109
b3a1d9898418
Revision: 201019
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
102
diff
changeset
|
330 |
test_Value(r, r == KErrNotFound); |
0 | 331 |
|
332 |
// and now do some file system operations |
|
333 |
TBuf8<16> readBuf; |
|
334 |
r=TheFs.MkDir(dir1); |
|
109
b3a1d9898418
Revision: 201019
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
102
diff
changeset
|
335 |
test_Value(r, r == KErrNone||r==KErrAlreadyExists); |
0 | 336 |
RFile file1; |
337 |
r=file1.Replace(TheFs,file1Name,EFileShareExclusive); |
|
109
b3a1d9898418
Revision: 201019
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
102
diff
changeset
|
338 |
test_KErrNone(r); |
0 | 339 |
r=file1.Write(toWrite); |
109
b3a1d9898418
Revision: 201019
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
102
diff
changeset
|
340 |
test_KErrNone(r); |
0 | 341 |
r=file1.Read(0,readBuf); |
342 |
test(readBuf==toWrite); |
|
343 |
r=file1.SetSize(0); |
|
109
b3a1d9898418
Revision: 201019
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
102
diff
changeset
|
344 |
test_KErrNone(r); |
0 | 345 |
file1.Close(); |
346 |
r=TheFs.Delete(file1Name); |
|
109
b3a1d9898418
Revision: 201019
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
102
diff
changeset
|
347 |
test_KErrNone(r); |
0 | 348 |
r=TheFs.RmDir(dir1); |
109
b3a1d9898418
Revision: 201019
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
102
diff
changeset
|
349 |
test_KErrNone(r); |
0 | 350 |
|
351 |
// add a secondary extension |
|
352 |
test.Printf(_L("RFs::MountExtension()")); |
|
353 |
r=TheFs.MountExtension(KExtensionLogName,drive); |
|
109
b3a1d9898418
Revision: 201019
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
102
diff
changeset
|
354 |
test_KErrNone(r); |
0 | 355 |
r=TheFs.ExtensionName(extName,drive,0); |
109
b3a1d9898418
Revision: 201019
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
102
diff
changeset
|
356 |
test_Value(r, r == KErrNone && extName==KExtensionBitName); |
0 | 357 |
r=TheFs.ExtensionName(extName,drive,1); |
109
b3a1d9898418
Revision: 201019
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
102
diff
changeset
|
358 |
test_Value(r, r == KErrNone && extName==KExtensionLogName); |
0 | 359 |
// try to add the same extension |
360 |
r=TheFs.MountExtension(KExtensionBitName,drive); |
|
109
b3a1d9898418
Revision: 201019
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
102
diff
changeset
|
361 |
test_Value(r, r == KErrAlreadyExists); |
0 | 362 |
r=TheFs.ExtensionName(extName,drive,0); |
109
b3a1d9898418
Revision: 201019
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
102
diff
changeset
|
363 |
test_Value(r, r == KErrNone && extName==KExtensionBitName); |
0 | 364 |
r=TheFs.ExtensionName(extName,drive,1); |
109
b3a1d9898418
Revision: 201019
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
102
diff
changeset
|
365 |
test_Value(r, r == KErrNone && extName==KExtensionLogName); |
0 | 366 |
// try to add a third extension |
367 |
r=TheFs.MountExtension(KExtensionEmptyName,drive); |
|
109
b3a1d9898418
Revision: 201019
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
102
diff
changeset
|
368 |
test_Value(r, r == KErrAccessDenied); |
0 | 369 |
r=TheFs.ExtensionName(extName,drive,0); |
109
b3a1d9898418
Revision: 201019
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
102
diff
changeset
|
370 |
test_Value(r, r == KErrNone && extName==KExtensionBitName); |
0 | 371 |
r=TheFs.ExtensionName(extName,drive,1); |
109
b3a1d9898418
Revision: 201019
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
102
diff
changeset
|
372 |
test_Value(r, r == KErrNone && extName==KExtensionLogName); |
0 | 373 |
|
374 |
// and now do some file system operations |
|
375 |
r=TheFs.MkDir(dir1); |
|
109
b3a1d9898418
Revision: 201019
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
102
diff
changeset
|
376 |
test_Value(r, r == KErrNone||r==KErrAlreadyExists); |
0 | 377 |
r=file1.Replace(TheFs,file1Name,EFileShareExclusive); |
109
b3a1d9898418
Revision: 201019
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
102
diff
changeset
|
378 |
test_KErrNone(r); |
0 | 379 |
r=file1.Write(toWrite); |
109
b3a1d9898418
Revision: 201019
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
102
diff
changeset
|
380 |
test_KErrNone(r); |
0 | 381 |
r=file1.Read(0,readBuf); |
382 |
test(readBuf==toWrite); |
|
383 |
r=file1.SetSize(0); |
|
109
b3a1d9898418
Revision: 201019
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
102
diff
changeset
|
384 |
test_KErrNone(r); |
0 | 385 |
file1.Close(); |
386 |
r=TheFs.Delete(file1Name); |
|
109
b3a1d9898418
Revision: 201019
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
102
diff
changeset
|
387 |
test_KErrNone(r); |
0 | 388 |
r=TheFs.RmDir(dir1); |
109
b3a1d9898418
Revision: 201019
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
102
diff
changeset
|
389 |
test_KErrNone(r); |
0 | 390 |
|
391 |
test.Printf(_L("RFs::DismountExtension()")); |
|
392 |
// test that can't dismount a primary extension via this method |
|
393 |
r=TheFs.DismountExtension(KExtensionLogName,drive); |
|
109
b3a1d9898418
Revision: 201019
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
102
diff
changeset
|
394 |
test_KErrNone(r); |
0 | 395 |
r=TheFs.ExtensionName(extName,drive,0); |
109
b3a1d9898418
Revision: 201019
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
102
diff
changeset
|
396 |
test_Value(r, r == KErrNone && extName==KExtensionBitName); |
0 | 397 |
r=TheFs.ExtensionName(extName,drive,1); |
109
b3a1d9898418
Revision: 201019
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
102
diff
changeset
|
398 |
test_Value(r, r == KErrNotFound); |
0 | 399 |
r=TheFs.DismountExtension(KExtensionBitName,drive); |
109
b3a1d9898418
Revision: 201019
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
102
diff
changeset
|
400 |
test_Value(r, r == KErrAccessDenied); |
0 | 401 |
r=TheFs.ExtensionName(extName,drive,0); |
109
b3a1d9898418
Revision: 201019
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
102
diff
changeset
|
402 |
test_Value(r, r == KErrNone && extName==KExtensionBitName); |
0 | 403 |
r=TheFs.ExtensionName(extName,drive,1); |
109
b3a1d9898418
Revision: 201019
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
102
diff
changeset
|
404 |
test_Value(r, r == KErrNotFound); |
0 | 405 |
|
406 |
test.Printf(_L("RFs::DismountFileSystem()")); |
|
407 |
r=TheFs.MountExtension(KExtensionLogName,drive); |
|
109
b3a1d9898418
Revision: 201019
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
102
diff
changeset
|
408 |
test_KErrNone(r); |
0 | 409 |
r=TheFs.ExtensionName(extName,drive,0); |
109
b3a1d9898418
Revision: 201019
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
102
diff
changeset
|
410 |
test_Value(r, r == KErrNone && extName==KExtensionBitName); |
0 | 411 |
r=TheFs.ExtensionName(extName,drive,1); |
109
b3a1d9898418
Revision: 201019
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
102
diff
changeset
|
412 |
test_Value(r, r == KErrNone && extName==KExtensionLogName); |
0 | 413 |
// and now dismount |
414 |
r=TheFs.DismountFileSystem(fsName,drive); |
|
109
b3a1d9898418
Revision: 201019
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
102
diff
changeset
|
415 |
test_KErrNone(r); |
0 | 416 |
r=TheFs.ExtensionName(extName,drive,0); |
109
b3a1d9898418
Revision: 201019
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
102
diff
changeset
|
417 |
test_Value(r, r == KErrNotReady); |
0 | 418 |
r=TheFs.ExtensionName(extName,drive,1); |
109
b3a1d9898418
Revision: 201019
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
102
diff
changeset
|
419 |
test_Value(r, r == KErrNotReady); |
0 | 420 |
// remount the file system |
421 |
r=TheFs.MountFileSystem(fsName,drive,bDrvSync); |
|
109
b3a1d9898418
Revision: 201019
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
102
diff
changeset
|
422 |
test_Value(r, r == KErrNone||r==KErrCorrupt); |
0 | 423 |
r=TheFs.ExtensionName(extName,drive,0); |
109
b3a1d9898418
Revision: 201019
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
102
diff
changeset
|
424 |
test_Value(r, r == KErrNotFound); |
0 | 425 |
r=TheFs.ExtensionName(extName,drive,1); |
109
b3a1d9898418
Revision: 201019
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
102
diff
changeset
|
426 |
test_Value(r, r == KErrNotFound); |
0 | 427 |
Format(drive); |
428 |
||
429 |
test.Next(_L("RFs::RemoveExtension()")); |
|
430 |
r=TheFs.RemoveExtension(KExtensionLogName); |
|
109
b3a1d9898418
Revision: 201019
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
102
diff
changeset
|
431 |
test_KErrNone(r); |
0 | 432 |
r=TheFs.RemoveExtension(KExtensionEmptyName); |
109
b3a1d9898418
Revision: 201019
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
102
diff
changeset
|
433 |
test_KErrNone(r); |
0 | 434 |
r=TheFs.RemoveExtension(KExtensionBitName); |
109
b3a1d9898418
Revision: 201019
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
102
diff
changeset
|
435 |
test_KErrNone(r); |
0 | 436 |
} |
437 |
||
438 |
||
439 |
GLDEF_C void CallTestsL() |
|
440 |
// |
|
441 |
// Do tests relative to the session path |
|
442 |
// |
|
443 |
{ |
|
444 |
//-- set up console output |
|
445 |
F32_Test_Utils::SetConsole(test.Console()); |
|
446 |
||
447 |
TInt drive; |
|
448 |
TInt err=RFs::CharToDrive(gDriveToTest,drive); |
|
449 |
test.Start(_L("Starting Test - T_EXT1")); |
|
109
b3a1d9898418
Revision: 201019
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
102
diff
changeset
|
450 |
test_KErrNone(err); |
0 | 451 |
|
102
ef2a444a7410
Revision: 201018
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
452 |
// Check that the drive supports extensions. |
ef2a444a7410
Revision: 201018
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
453 |
TBool extensionsSupported = EFalse; |
ef2a444a7410
Revision: 201018
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
454 |
TPckg<TBool> dataBuf(extensionsSupported); |
ef2a444a7410
Revision: 201018
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
455 |
err = TheFs.QueryVolumeInfoExt(drive,EFSysExtensionsSupported,dataBuf); |
109
b3a1d9898418
Revision: 201019
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
102
diff
changeset
|
456 |
test_KErrNone(err); |
102
ef2a444a7410
Revision: 201018
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
457 |
if(!extensionsSupported) |
ef2a444a7410
Revision: 201018
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
458 |
{ |
200
73ea206103e6
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
109
diff
changeset
|
459 |
test.Printf(_L("Drive %C: does not support file sys extensions. Skipping T_EXT1."), gSessionPath[0]); |
102
ef2a444a7410
Revision: 201018
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
460 |
test.End(); |
ef2a444a7410
Revision: 201018
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
461 |
test.Close(); |
ef2a444a7410
Revision: 201018
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
462 |
return; |
ef2a444a7410
Revision: 201018
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
463 |
} |
ef2a444a7410
Revision: 201018
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
464 |
|
0 | 465 |
PrintDrvInfo(TheFs, drive); |
466 |
||
467 |
//Do not run this test on the NAND drive, as |
|
468 |
//this has the FTL mounted as a primary extension |
|
469 |
//which causes the test to fail |
|
470 |
#if defined(__WINS__) |
|
471 |
if (drive==EDriveU) |
|
472 |
return; |
|
473 |
#else |
|
474 |
TDriveInfo driveInfo; |
|
475 |
TheFs.Drive(driveInfo,drive); |
|
476 |
if (driveInfo.iType == EMediaNANDFlash) |
|
477 |
{ |
|
200
73ea206103e6
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
109
diff
changeset
|
478 |
test.Printf(_L("Skipping T_EXT1 as drive %C: is NAND\n"), gSessionPath[0]); |
0 | 479 |
return; |
480 |
} |
|
481 |
#endif |
|
482 |
TestSecondaryExtensions(); |
|
483 |
||
484 |
//-- the t_bitext extension mangles data from the media, which may make FS mounting fail because of "corrupted" data. |
|
485 |
//-- Then this step formats the media, automounter doesn't support it straightforward way |
|
486 |
if(!Is_Lffs(TheFs, drive) && !Is_Automounter(TheFs, drive)) |
|
487 |
{ |
|
488 |
TestPrimaryExtensions(); |
|
489 |
} |
|
490 |
||
491 |
test.End(); |
|
492 |
test.Close(); |
|
493 |
} |