author | hgs |
Tue, 31 Aug 2010 11:31:15 +0100 | |
changeset 254 | 1560c419b176 |
parent 122 | 70ba09fd07a5 |
child 269 | d57b86b1867a |
permissions | -rw-r--r-- |
0 | 1 |
// Copyright (c) 1996-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\server\t_fsys.cpp |
|
15 |
// |
|
16 |
// |
|
17 |
||
18 |
#define __E32TEST_EXTENSION__ |
|
19 |
||
20 |
#include <f32file.h> |
|
21 |
#include <f32file_private.h> |
|
22 |
#include <e32test.h> |
|
254 | 23 |
#include <e32math.h> |
0 | 24 |
#include "t_server.h" |
25 |
#include "fat_utils.h" |
|
26 |
#include "filesystem_fat.h" |
|
27 |
||
28 |
using namespace Fat_Test_Utils; |
|
29 |
||
30 |
RTest test(_L("T_FSYS")); |
|
254 | 31 |
static TInt64 gRndSeed; |
32 |
||
33 |
//--------------------------------------------------- |
|
34 |
||
35 |
||
36 |
void InitGlobals() |
|
37 |
{ |
|
38 |
//-- initialise random generator |
|
39 |
gRndSeed = 0xf73c1ab; |
|
40 |
Math::Rand(gRndSeed); |
|
41 |
} |
|
42 |
||
43 |
//--------------------------------------------------- |
|
44 |
void DestroyGlobals() |
|
45 |
{ |
|
46 |
} |
|
47 |
||
48 |
//--------------------------------------------------- |
|
49 |
||
50 |
/** |
|
51 |
The maximum length for the file system and extension names is KMaxFSNameLength |
|
52 |
test how the file server supports this |
|
53 |
*/ |
|
54 |
void TestFileSystemNameLength() |
|
55 |
{ |
|
56 |
test.Next(_L("Test file system name lenght limits")); |
|
57 |
if(Is_SimulatedSystemDrive(TheFs, CurrentDrive())) |
|
58 |
{ |
|
59 |
test.Printf(_L("Can't test on a simulated drive, skipping!")); |
|
60 |
return; |
|
61 |
} |
|
62 |
||
63 |
TInt nRes; |
|
64 |
TBuf<1024> name; |
|
65 |
TInt i; |
|
66 |
||
67 |
_LIT(KEmptyName, ""); //-- invalid length == 0 |
|
68 |
_LIT(KDoesNotExist, "RubbishName"); //-- valid length == 11 |
|
69 |
_LIT(KDoesNotExist1, "RubbishName123456789012345678901"); //-- valid length == 32 (KMaxFSNameLength) |
|
70 |
||
71 |
_LIT(KNameTooLong1, "RubbishName123456789012345678901_"); //-- invalid length == 33 (KMaxFSNameLength+1) |
|
72 |
||
73 |
||
74 |
test(KDoesNotExist1().Length() == KMaxFSNameLength); |
|
75 |
||
76 |
//-- generate a very long name |
|
77 |
name.Zero(); |
|
78 |
for(i=0; i<(name.MaxLength()/KDoesNotExist1().Length()); ++i) |
|
79 |
{ |
|
80 |
name.Append(KDoesNotExist1); |
|
81 |
} |
|
82 |
||
83 |
//-- 1. try to dismount the existing FS/extension specifying invalid name |
|
84 |
||
85 |
//-- 1.1 try empty names |
|
86 |
nRes = TheFs.DismountFileSystem(KEmptyName, CurrentDrive()); |
|
87 |
test_Value(nRes, nRes == KErrArgument); |
|
88 |
||
89 |
nRes = TheFs.DismountExtension(KEmptyName, CurrentDrive()); |
|
90 |
test_Value(nRes, nRes == KErrArgument); |
|
91 |
||
92 |
//-- 1.2 valid length, but non-existing name |
|
93 |
nRes = TheFs.DismountFileSystem(KDoesNotExist, CurrentDrive()); |
|
94 |
test_Value(nRes, nRes == KErrNotFound); |
|
95 |
||
96 |
nRes = TheFs.DismountExtension(KDoesNotExist, CurrentDrive()); |
|
97 |
test_Value(nRes, nRes == KErrNotFound); |
|
98 |
||
99 |
//-- 1.2 valid length == KMaxFSNameLength, but non-existing name |
|
100 |
nRes = TheFs.DismountFileSystem(KDoesNotExist1, CurrentDrive()); |
|
101 |
test_Value(nRes, nRes == KErrNotFound); |
|
102 |
||
103 |
nRes = TheFs.DismountExtension(KDoesNotExist1, CurrentDrive()); |
|
104 |
test_Value(nRes, nRes == KErrNotFound); |
|
105 |
||
106 |
//-- 1.3 too long name == KMaxFSNameLength+1, |
|
107 |
nRes = TheFs.DismountFileSystem(KNameTooLong1, CurrentDrive()); |
|
108 |
test_Value(nRes, nRes == KErrArgument); |
|
109 |
||
110 |
nRes = TheFs.DismountExtension(KNameTooLong1, CurrentDrive()); |
|
111 |
test_Value(nRes, nRes == KErrArgument); |
|
112 |
||
113 |
//-- 1.4 a very long name ~ 1024 characters, |
|
114 |
nRes = TheFs.DismountFileSystem(name, CurrentDrive()); |
|
115 |
test_Value(nRes, nRes == KErrArgument); |
|
116 |
||
117 |
nRes = TheFs.DismountExtension(name, CurrentDrive()); |
|
118 |
test_Value(nRes, nRes == KErrArgument); |
|
119 |
||
120 |
||
121 |
//-- try mounting extensions with valid, bu non-existing names |
|
122 |
nRes = TheFs.MountExtension(KDoesNotExist, CurrentDrive()); |
|
123 |
test_Value(nRes, nRes == KErrNotFound); |
|
124 |
||
125 |
nRes = TheFs.MountExtension(KDoesNotExist1, CurrentDrive()); |
|
126 |
test_Value(nRes, nRes == KErrNotFound); |
|
127 |
||
128 |
||
129 |
//==================================================== |
|
130 |
//-- dismount original file system from the drive |
|
131 |
TFSDescriptor orgFSDesc; |
|
132 |
nRes = GetFileSystemDescriptor(TheFs, CurrentDrive(), orgFSDesc); |
|
133 |
test_KErrNone(nRes); |
|
134 |
||
135 |
nRes = TheFs.DismountFileSystem(orgFSDesc.iFsName, CurrentDrive()); |
|
136 |
test_KErrNone(nRes); |
|
137 |
||
138 |
//-- 2. try to mount a FS/extension with the invalid name |
|
139 |
||
140 |
//-- 2.1 try empty names |
|
141 |
nRes = TheFs.MountFileSystem(KEmptyName, CurrentDrive()); |
|
142 |
test_Value(nRes, nRes == KErrArgument); |
|
143 |
||
144 |
nRes = TheFs.MountExtension(KEmptyName, CurrentDrive()); |
|
145 |
test_Value(nRes, nRes == KErrArgument); |
|
146 |
||
147 |
//-- 1.2 valid length, but non-existing name |
|
148 |
nRes = TheFs.MountFileSystem(KDoesNotExist, CurrentDrive()); |
|
149 |
test_Value(nRes, nRes == KErrNotFound); |
|
150 |
||
151 |
||
152 |
//-- 1.2 valid length == KMaxFSNameLength, but non-existing name |
|
153 |
nRes = TheFs.MountFileSystem(KDoesNotExist1, CurrentDrive()); |
|
154 |
test_Value(nRes, nRes == KErrNotFound); |
|
155 |
||
156 |
||
157 |
//-- 1.3 too long name == KMaxFSNameLength+1, |
|
158 |
nRes = TheFs.MountFileSystem(KNameTooLong1, CurrentDrive()); |
|
159 |
test_Value(nRes, nRes == KErrArgument); |
|
160 |
||
161 |
nRes = TheFs.MountExtension(KNameTooLong1, CurrentDrive()); |
|
162 |
test_Value(nRes, nRes == KErrArgument); |
|
163 |
||
164 |
//-- 1.4 a very long name ~ 1024 characters, |
|
165 |
nRes = TheFs.MountFileSystem(name, CurrentDrive()); |
|
166 |
test_Value(nRes, nRes == KErrArgument); |
|
167 |
||
168 |
nRes = TheFs.MountExtension(name, CurrentDrive()); |
|
169 |
test_Value(nRes, nRes == KErrArgument); |
|
170 |
||
171 |
||
172 |
||
173 |
||
174 |
//-- mount original file system back to the drive |
|
175 |
nRes = MountFileSystem(TheFs, CurrentDrive(), orgFSDesc); |
|
176 |
test_KErrNone(nRes); |
|
177 |
} |
|
178 |
||
0 | 179 |
|
180 |
static void TestFileSystemNames() |
|
33
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
181 |
{ |
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
182 |
test.Next(_L("Read file system names for all drives")); |
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
183 |
TFullName name; |
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
184 |
TInt r; |
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
185 |
for(TInt i=EDriveA;i<KMaxDrives;++i) |
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
186 |
{ |
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
187 |
r=TheFs.FileSystemName(name,i); |
122 | 188 |
test_Value(r, r == KErrNone || r==KErrNotFound); |
33
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
189 |
TChar c; |
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
190 |
r=RFs::DriveToChar(i,c); |
122 | 191 |
test_KErrNone(r); |
33
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
192 |
if(name.Length()) |
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
193 |
test.Printf(_L("File System Name on drive %c is %S\n"),(char)c,&name); |
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
194 |
else |
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
195 |
test.Printf(_L("No file system on drive %c\n"),(char)c); |
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
196 |
} |
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
197 |
} |
0 | 198 |
|
199 |
static void CheckDismount(TDesC& aFs,TInt aDrive) |
|
33
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
200 |
{ |
0 | 201 |
|
33
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
202 |
if (aDrive==EDriveC) // ??? Can't test on C: - see below |
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
203 |
return; |
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
204 |
TInt r; |
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
205 |
TFullName oldSess, newSess; |
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
206 |
r=TheFs.SessionPath(oldSess); |
122 | 207 |
test_KErrNone(r); |
33
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
208 |
TChar c; |
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
209 |
r=TheFs.DriveToChar(aDrive,c); |
122 | 210 |
test_KErrNone(r); |
33
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
211 |
newSess.Append(c); |
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
212 |
newSess.Append(':'); |
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
213 |
newSess.Append('\\'); |
0 | 214 |
|
33
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
215 |
TBuf<128> b; |
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
216 |
TDriveInfo di; |
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
217 |
r=TheFs.Drive(di,aDrive); |
122 | 218 |
test_KErrNone(r); |
33
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
219 |
b.Format(_L("Test dismounting of test file system on %c: (DrvAtt:%x MedAtt:%x)"),(TUint)c,di.iDriveAtt,di.iMediaAtt); |
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
220 |
test.Next(b); |
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
221 |
|
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
222 |
// Test cannot dismount on rom drive |
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
223 |
test.Next(_L("Test cannot dismount on Rom drive")); |
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
224 |
TFullName zName; |
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
225 |
r=TheFs.FileSystemName(zName,EDriveZ); |
122 | 226 |
test_KErrNone(r); |
33
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
227 |
r=TheFs.DismountFileSystem(zName,EDriveZ); |
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
228 |
test.Printf(_L("r=%d"),r); |
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
229 |
// NB if paging is enabled on a ROFS partition which is part of the composite file system then the |
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
230 |
// likelihood is that there will be a at least one file clamped: in this case there error will be KErrInUse |
122 | 231 |
test_Value(r, r == KErrAccessDenied || r==KErrInUse); |
0 | 232 |
|
33
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
233 |
// Test cannot dismount on wrong drive |
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
234 |
test.Next(_L("Test cannot dismount on wrong drive")); |
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
235 |
r=TheFs.DismountFileSystem(aFs,EDriveA); |
122 | 236 |
test_Value(r, r == KErrNotReady); |
0 | 237 |
|
33
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
238 |
// Test cannot dismount with wrong name |
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
239 |
test.Next(_L("Test cannot dismount with wrong file system name")); |
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
240 |
r=TheFs.DismountFileSystem(_L("abc"),aDrive); |
122 | 241 |
test_Value(r, r == KErrNotFound); |
0 | 242 |
|
33
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
243 |
// Test cannot dismount with a file open |
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
244 |
test.Next(_L("Test cannot dismount with a file open")); |
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
245 |
r=TheFs.SetSessionPath(newSess); |
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
246 |
RFile file; |
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
247 |
r=file.Replace(TheFs,_L("abc"),EFileShareAny); |
122 | 248 |
test_KErrNone(r); |
33
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
249 |
r=TheFs.SessionPath(newSess); |
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
250 |
TBool open; |
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
251 |
r=TheFs.IsFileOpen(_L("abc"),open); |
122 | 252 |
test_KErrNone(r); |
33
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
253 |
test(open); |
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
254 |
r=TheFs.DismountFileSystem(aFs,aDrive); |
122 | 255 |
test_Value(r, r == KErrInUse); |
33
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
256 |
file.Close(); |
0 | 257 |
|
33
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
258 |
// Now test dismount works |
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
259 |
test.Next(_L("Test dismounts OK")); |
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
260 |
r=TheFs.DismountFileSystem(aFs,aDrive); |
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
261 |
if(r!=KErrNone) |
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
262 |
{ |
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
263 |
test.Printf(_L("Error = %d"),r); |
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
264 |
test(EFalse); |
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
265 |
} |
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
266 |
TFullName n; |
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
267 |
r=TheFs.FileSystemName(n,aDrive); |
122 | 268 |
test_Value(r, r == KErrNone || r==KErrNotFound); |
33
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
269 |
test(!n.Length()); |
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
270 |
r=file.Replace(TheFs,_L("abc"),EFileShareAny); |
122 | 271 |
test_Value(r, r == KErrNotReady); |
33
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
272 |
file.Close(); |
0 | 273 |
|
33
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
274 |
r=TheFs.MountFileSystem(aFs,aDrive); |
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
275 |
if(r!=KErrNone) |
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
276 |
{ |
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
277 |
test.Printf(_L("error = %d\n"),r); |
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
278 |
test(EFalse); |
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
279 |
} |
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
280 |
r=TheFs.FileSystemName(n,aDrive); |
122 | 281 |
test_KErrNone(r); |
33
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
282 |
test(n.Compare(aFs)==0); |
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
283 |
r=file.Replace(TheFs,_L("abc"),EFileShareAny); // ??? bang |
122 | 284 |
test_KErrNone(r); |
33
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
285 |
file.Close(); |
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
286 |
r=TheFs.SetSessionPath(oldSess); |
122 | 287 |
test_KErrNone(r); |
33
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
288 |
} |
0 | 289 |
|
290 |
static void TestDismountFileSystem(TInt aDrive) |
|
33
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
291 |
{ |
0 | 292 |
|
33
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
293 |
TInt r; |
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
294 |
TFullName name; |
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
295 |
r=TheFs.FileSystemName(name,aDrive); |
122 | 296 |
test_Value(r, r == KErrNone || r==KErrNotFound); |
33
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
297 |
if(name.Length()) |
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
298 |
CheckDismount(name,aDrive); |
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
299 |
} |
0 | 300 |
|
301 |
#if defined(__EPOC32__) |
|
302 |
static void TestFileSystem(TInt aDrive) |
|
303 |
// |
|
304 |
// Mount a new CTestFileSystem on the drive under test |
|
305 |
// |
|
33
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
306 |
{ |
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
307 |
TBuf<64> b; |
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
308 |
TChar c; |
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
309 |
TInt r=TheFs.DriveToChar(aDrive,c); |
122 | 310 |
test_KErrNone(r); |
33
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
311 |
TDriveInfo di; |
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
312 |
r=TheFs.Drive(di,aDrive); |
122 | 313 |
test_KErrNone(r); |
33
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
314 |
b.Format(_L("Test mounting of test file system on %c: (DrvAtt:%x MedAtt:%x)"),(TUint)c,di.iDriveAtt,di.iMediaAtt); |
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
315 |
test.Next(b); |
0 | 316 |
|
33
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
317 |
test.Next(_L("Test mounting of test file system")); |
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
318 |
r=TheFs.AddFileSystem(_L("T_TFSYS")); |
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
319 |
if(r!=KErrNone && r!=KErrAlreadyExists) |
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
320 |
{ |
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
321 |
test.Printf(_L("error=%d"),r); |
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
322 |
test(EFalse); |
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
323 |
} |
0 | 324 |
|
33
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
325 |
TFullName oldFs; |
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
326 |
r=TheFs.FileSystemName(oldFs,aDrive); |
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
327 |
// TFileName oldFs; |
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
328 |
// r=TheFs.FileSystemName(oldFs,aDrive); |
122 | 329 |
test_KErrNone(r); |
33
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
330 |
r=TheFs.DismountFileSystem(oldFs,aDrive); |
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
331 |
if(r!=KErrNone) |
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
332 |
{ |
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
333 |
test.Printf(_L("Error = %d"),r); |
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
334 |
test(EFalse); |
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
335 |
} |
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
336 |
r=TheFs.MountFileSystem(_L("Test"),aDrive); |
122 | 337 |
test_KErrNone(r); |
0 | 338 |
|
33
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
339 |
TFileName newFs; |
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
340 |
r=TheFs.FileSystemName(newFs,aDrive); |
122 | 341 |
test_KErrNone(r); |
33
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
342 |
test(newFs.Compare(_L("Test"))==0); |
0 | 343 |
|
33
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
344 |
// Check attributes |
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
345 |
TDriveInfo info; |
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
346 |
r=TheFs.Drive(info,aDrive); |
122 | 347 |
test_KErrNone(r); |
0 | 348 |
|
33
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
349 |
test.Printf(_L("iType=%d,iConnectionBusType=%d,iDriveAtt=%x,iMediaAtt=%x\n"),(TUint)info.iType,\ |
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
350 |
(TUint)info.iConnectionBusType,info.iDriveAtt,info.iMediaAtt); |
0 | 351 |
|
33
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
352 |
//Try to remove filesystem without dismounting. |
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
353 |
r=TheFs.RemoveFileSystem(_L("Test")); |
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
354 |
if(r!=KErrInUse) |
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
355 |
{ |
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
356 |
test.Printf(_L("error=%d"),r); |
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
357 |
test(EFalse); |
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
358 |
} |
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
359 |
r=TheFs.FileSystemName(newFs,aDrive); |
122 | 360 |
test_KErrNone(r); |
33
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
361 |
test(newFs.Compare(_L("Test"))==0); |
0 | 362 |
|
33
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
363 |
r=TheFs.DismountFileSystem(newFs,aDrive); |
122 | 364 |
test_KErrNone(r); |
0 | 365 |
|
33
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
366 |
r=TheFs.MountFileSystem(oldFs,aDrive); |
122 | 367 |
test_KErrNone(r); |
33
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
368 |
} |
0 | 369 |
#endif |
370 |
||
371 |
static void TestMountInvalidDrive() |
|
372 |
// |
|
373 |
// Attempt to mount FAT on non-local drive |
|
33
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
374 |
{ |
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
375 |
test.Start(_L("TestMountInvalidDrive")); |
0 | 376 |
|
33
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
377 |
TInt r; |
0 | 378 |
|
33
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
379 |
test.Next(_L("Adding EFAT")); |
0 | 380 |
#ifdef __WINS__ |
33
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
381 |
_LIT(KFsNm, "EFAT32"); |
0 | 382 |
#else |
33
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
383 |
_LIT(KFsNm, "ELOCAL"); |
0 | 384 |
#endif |
385 |
||
33
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
386 |
r = TheFs.AddFileSystem(KFsNm); |
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
387 |
test.Printf(_L("afs: r = %d\n"), r); |
122 | 388 |
test_Value(r, r == KErrNone || r == KErrAlreadyExists); |
33
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
389 |
test.Next(_L("mounting FAT on drive R")); |
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
390 |
r = TheFs.MountFileSystem(KFileSystemName_FAT, EDriveR); |
122 | 391 |
test_Value(r, r == KErrArgument); |
33
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
392 |
|
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
393 |
test.End(); |
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
394 |
} |
0 | 395 |
|
396 |
// Additional step for INC083446: Corrupted miniSD not detected as corrupted by phone |
|
397 |
static void TestMountingBrokenMedia(TInt aDrive) |
|
398 |
// |
|
399 |
// Mount a new CTestFileSystem on the drive under test |
|
400 |
// |
|
33
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
401 |
{ |
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
402 |
if (aDrive==EDriveC) // ??? Can't test on C: |
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
403 |
return; |
0 | 404 |
|
33
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
405 |
TBuf<64> b; |
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
406 |
TChar c; |
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
407 |
TInt r=TheFs.DriveToChar(aDrive,c); |
122 | 408 |
test_KErrNone(r); |
33
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
409 |
TDriveInfo di; |
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
410 |
r=TheFs.Drive(di,aDrive); |
122 | 411 |
test_KErrNone(r); |
33
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
412 |
b.Format(_L("Test mounting of test file system on %c: (DrvAtt:%x MedAtt:%x)"),(TUint)c,di.iDriveAtt,di.iMediaAtt); |
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
413 |
test.Next(b); |
0 | 414 |
|
33
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
415 |
test.Next(_L("Test mounting of test file system")); |
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
416 |
r=TheFs.AddFileSystem(_L("T_TFSYS2")); |
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
417 |
if(r!=KErrNone && r!=KErrAlreadyExists) |
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
418 |
{ |
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
419 |
test.Printf(_L("error=%d"),r); |
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
420 |
test(EFalse); |
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
421 |
} |
0 | 422 |
|
33
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
423 |
TFullName oldFs; |
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
424 |
r=TheFs.FileSystemName(oldFs,aDrive); |
122 | 425 |
test_KErrNone(r); |
33
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
426 |
r=TheFs.DismountFileSystem(oldFs,aDrive); |
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
427 |
if(r!=KErrNone) |
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
428 |
{ |
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
429 |
test.Printf(_L("Error = %d"),r); |
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
430 |
test(EFalse); |
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
431 |
} |
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
432 |
r=TheFs.MountFileSystem(_L("Test2"),aDrive); |
122 | 433 |
test_Value(r, r == KErrCorrupt); |
0 | 434 |
|
33
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
435 |
TFileName newFs; |
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
436 |
r=TheFs.FileSystemName(newFs,aDrive); |
122 | 437 |
test_KErrNone(r); |
33
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
438 |
test(newFs.Compare(_L("Test2"))==0); |
0 | 439 |
|
33
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
440 |
// Get the number of remounts by checking the volume attributes - |
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
441 |
// T_TFSYS2 hijacks the iBattery member to report back the number of times MountL() has been called |
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
442 |
TDriveInfo info; |
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
443 |
TInt remounts; |
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
444 |
r=TheFs.Drive(info,aDrive); |
122 | 445 |
test_KErrNone(r); |
33
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
446 |
test.Printf(_L("iType=%d,iBattery=%d,iDriveAtt=%x,iMediaAtt=%x\n"),(TUint)info.iType,\ |
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
447 |
(TUint)info.iBattery,info.iDriveAtt,info.iMediaAtt); |
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
448 |
remounts = (TInt) info.iBattery; |
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
449 |
test.Printf(_L("Initial remounts = %d"), remounts); |
0 | 450 |
|
33
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
451 |
// Make the file server attempt to remount the drive by looking for a non-existant DLL |
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
452 |
// The file server should setop trying to remount the driver after KMaxMountFailures attempts |
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
453 |
const TInt KMaxMountFailures = 3; // copied from sf_drv.cpp |
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
454 |
const TInt KEntryAttempts = 10; |
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
455 |
TInt entryAttempts; |
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
456 |
for (entryAttempts=0; entryAttempts < KEntryAttempts; entryAttempts++) |
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
457 |
{ |
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
458 |
TEntry entry; |
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
459 |
_LIT(KNonExistantFilename, "NONEXISTANT_FILENAME.DLL"); |
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
460 |
r = TheFs.Entry(KNonExistantFilename, entry); |
122 | 461 |
test_Value(r, r == KErrCorrupt); |
33
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
462 |
} |
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
463 |
r=TheFs.Drive(info,aDrive); |
122 | 464 |
test_KErrNone(r); |
33
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
465 |
test.Printf(_L("iType=%d,iBattery=%d,iDriveAtt=%x,iMediaAtt=%x\n"),(TUint)info.iType,\ |
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
466 |
(TUint)info.iBattery,info.iDriveAtt,info.iMediaAtt); |
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
467 |
remounts = (TInt) info.iBattery; |
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
468 |
test.Printf(_L("Remounts = %d"), remounts); |
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
469 |
test(remounts == KMaxMountFailures); |
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
470 |
|
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
471 |
// simulate a media change to reset failure count |
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
472 |
r = TheFs.RemountDrive(aDrive, NULL, 0); |
0 | 473 |
|
33
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
474 |
// now try mounting again & verify the the file server attempts to mount the drive again |
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
475 |
for (entryAttempts=0; entryAttempts < KEntryAttempts; entryAttempts++) |
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
476 |
{ |
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
477 |
TEntry entry; |
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
478 |
_LIT(KNonExistantFilename, "NONEXISTANT_FILENAME.DLL"); |
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
479 |
r = TheFs.Entry(KNonExistantFilename, entry); |
122 | 480 |
test_Value(r, r == KErrCorrupt); |
33
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
481 |
} |
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
482 |
r=TheFs.Drive(info,aDrive); |
122 | 483 |
test_KErrNone(r); |
33
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
484 |
test.Printf(_L("iType=%d,iBattery=%d,iDriveAtt=%x,iMediaAtt=%x\n"),(TUint)info.iType,\ |
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
485 |
(TUint)info.iBattery,info.iDriveAtt,info.iMediaAtt); |
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
486 |
remounts = (TInt) info.iBattery; |
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
487 |
test.Printf(_L("Remounts = %d"), remounts); |
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
488 |
test(remounts == KMaxMountFailures * 2); |
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
489 |
|
0 | 490 |
|
491 |
||
33
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
492 |
r=TheFs.DismountFileSystem(newFs,aDrive); |
122 | 493 |
test_KErrNone(r); |
33
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
494 |
r=TheFs.MountFileSystem(oldFs,aDrive); |
122 | 495 |
test_KErrNone(r); |
33
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
496 |
|
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
497 |
r=TheFs.RemoveFileSystem(_L("Test2")); |
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
498 |
if(r!=KErrNone) |
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
499 |
{ |
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
500 |
test.Printf(_L("error=%d"),r); |
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
501 |
test(EFalse); |
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
502 |
} |
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
503 |
} |
0 | 504 |
|
505 |
||
506 |
/** |
|
507 |
Testing obtaining media serial number for the substituted drives |
|
508 |
*/ |
|
509 |
static void TestSubstDriveMediaSerialNumber() |
|
510 |
{ |
|
511 |
test.Next(_L("Test obtaining media serial number for the substituted drives")); |
|
512 |
||
513 |
TInt nRes; |
|
514 |
const TInt currDrvNum=CurrentDrive(); |
|
33
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
515 |
|
0 | 516 |
TDriveInfo drvInfo; |
33
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
517 |
nRes=TheFs.Drive(drvInfo, currDrvNum); |
122 | 518 |
test_KErrNone(nRes); |
0 | 519 |
|
520 |
if(drvInfo.iDriveAtt & (KDriveAttRom | KDriveAttRedirected | KDriveAttSubsted)) |
|
521 |
{ |
|
522 |
test.Printf(_L("Can't test on this drive!\n")); |
|
523 |
return; |
|
524 |
} |
|
525 |
||
526 |
TMediaSerialNumber serNum; |
|
527 |
||
528 |
//-- test Media Serial Number on unexisting drive |
|
33
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
529 |
{ |
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
530 |
for(TInt drvNum=EDriveA; drvNum<=EDriveZ; ++drvNum) |
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
531 |
{ |
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
532 |
TDriveInfo drvInfo; |
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
533 |
if(KErrNone==TheFs.Drive(drvInfo, drvNum) && drvInfo.iType==EMediaNotPresent) |
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
534 |
{ |
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
535 |
// found a non-extant drive, test it... |
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
536 |
nRes = TheFs.GetMediaSerialNumber(serNum, drvNum); |
122 | 537 |
test_Value(nRes, nRes == KErrNotReady); |
33
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
538 |
break; |
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
539 |
} |
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
540 |
} |
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
541 |
} |
0 | 542 |
|
543 |
nRes = TheFs.GetMediaSerialNumber(serNum, currDrvNum); |
|
544 |
if(nRes != KErrNone) |
|
545 |
{ |
|
546 |
test.Printf(_L("Test is inconsintent on this drive!\n")); |
|
547 |
return; |
|
548 |
} |
|
549 |
||
550 |
TFileName substPath; //-- path to the directory to substitute |
|
551 |
const TInt KSubstDrv = EDriveO; //-- drive to be substituted |
|
552 |
||
553 |
//-- make directory, which will be substituted ad a drive |
|
554 |
substPath.Format(_L("%c:\\SubstDrv1\\"), (TUint8)'A'+currDrvNum); |
|
555 |
MakeDir(substPath); |
|
556 |
||
557 |
nRes = TheFs.SetSubst(substPath, KSubstDrv); |
|
122 | 558 |
test_KErrNone(nRes); |
0 | 559 |
|
560 |
//-- an attempt to obtain Media Serial Number on a substed drive shall result in KErrNotSupported |
|
561 |
nRes = TheFs.GetMediaSerialNumber(serNum, KSubstDrv); |
|
122 | 562 |
test_Value(nRes, nRes == KErrNotSupported); |
0 | 563 |
|
564 |
//-- delete substed drive |
|
565 |
nRes = TheFs.SetSubst(_L(""), KSubstDrv); |
|
122 | 566 |
test_KErrNone(nRes); |
0 | 567 |
} |
568 |
||
569 |
||
570 |
//---------------------------------------------------------------------------------------------- |
|
571 |
//! @SYMTestCaseID PBASE-t_fsys-0317 |
|
572 |
//! @SYMTestType CIT |
|
573 |
//! @SYMPREQ CR0882 |
|
574 |
//! @SYMTestCaseDesc This test case is testing querying file system sub type name using |
|
33
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
575 |
//! RFs::QueryVolumeInfoExt() API. |
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
576 |
//! @SYMTestActions 1 querys sub type of file system on volumes mounted with 'Fat' file system |
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
577 |
//! 2 querys sub type of file system on volumes mounted with 'Lffs' file system |
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
578 |
//! 3 querys sub type of file system on volumes mounted with 'rofs' file system |
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
579 |
//! 4 querys sub type of file system on volumes mounted with other file systems |
0 | 580 |
//! @SYMTestExpectedResults |
33
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
581 |
//! 1 returned error code should be KErrNone, descriptor should match 'FAT12' or 'FAT16' or 'FAT32' |
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
582 |
//! 2 returned error code should be KErrNotSupported, descriptor should match 'Lffs' |
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
583 |
//! 3 returned error code should be KErrNotSupported, descriptor should match 'rofs' |
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
584 |
//! 4 returned error code should be KErrNotSupported, descriptor length should not be zero |
0 | 585 |
//! @SYMTestPriority High |
586 |
//! @SYMTestStatus Implemented |
|
587 |
//---------------------------------------------------------------------------------------------- |
|
588 |
static void TestFileSystemSubTypeQuery() |
|
33
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
589 |
{ |
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
590 |
test.Next(_L("Test querying sub type of the mounted file system")); |
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
591 |
TFSName fsName; |
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
592 |
TPckgBuf<TFSName> subName; |
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
593 |
TInt i, r; |
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
594 |
TDriveInfo driveInfo; |
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
595 |
TPckgBuf<TBool> fDrvSyncBuf; |
0 | 596 |
|
597 |
||
33
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
598 |
for(i = EDriveA; i <= EDriveZ; ++i, subName.Zero()) |
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
599 |
{ |
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
600 |
r = TheFs.FileSystemName(fsName, i); |
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
601 |
if (r == KErrNone) |
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
602 |
{ |
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
603 |
test.Printf(_L("Tested on drive: %c.\n"), (char)(i+'A')); |
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
604 |
r=TheFs.Drive(driveInfo, i); |
122 | 605 |
test_KErrNone(r); |
33
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
606 |
|
0 | 607 |
if (driveInfo.iType==EMediaNotPresent) |
33
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
608 |
{ |
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
609 |
test.Printf(_L("The media is not present.\n")); |
0 | 610 |
r = TheFs.QueryVolumeInfoExt(i, EFileSystemSubType, subName); |
122 | 611 |
test_Value(r, r == KErrNone || r == KErrNotReady); |
0 | 612 |
} |
33
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
613 |
else if (driveInfo.iType==EMediaCdRom) |
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
614 |
{ |
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
615 |
test.Printf(_L("CD ROM with no media will report not ready!\n")); |
0 | 616 |
r = TheFs.QueryVolumeInfoExt(i, EFileSystemSubType, subName); |
122 | 617 |
test_Value(r, r == KErrNotReady); |
33
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
618 |
} |
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
619 |
else |
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
620 |
{ |
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
621 |
r = TheFs.QueryVolumeInfoExt(i, EFileSystemSubType, subName); |
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
622 |
test_KErrNone(r); |
0 | 623 |
|
624 |
//-- test EIsDriveSync command |
|
625 |
r = TheFs.QueryVolumeInfoExt(i, EIsDriveSync, fDrvSyncBuf); |
|
122 | 626 |
test_KErrNone(r); |
0 | 627 |
if(fDrvSyncBuf()) |
628 |
test.Printf(_L("The drive is Synchronous.\n")); |
|
629 |
else |
|
630 |
test.Printf(_L("The drive is Asynchronous.\n")); |
|
631 |
||
632 |
//----------------- |
|
33
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
633 |
|
0 | 634 |
// if Fat, testing returning sub type name |
33
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
635 |
if (fsName.CompareF(KFileSystemName_FAT)==0) |
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
636 |
{ |
122 | 637 |
test_KErrNone(r); |
33
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
638 |
test(subName().CompareF(KFSSubType_FAT12)==0 || |
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
639 |
subName().CompareF(KFSSubType_FAT16)==0 || |
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
640 |
subName().CompareF(KFSSubType_FAT32)==0); |
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
641 |
continue; |
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
642 |
} |
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
643 |
|
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
644 |
// if Lffs, testing returning file system name |
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
645 |
if (fsName.CompareF(_L("Lffs"))==0) |
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
646 |
{ |
122 | 647 |
test_KErrNone(r); |
33
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
648 |
test(subName().CompareF(_L("Lffs"))==0); |
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
649 |
continue; |
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
650 |
} |
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
651 |
// if rofs, testing returning file system name |
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
652 |
if (fsName.CompareF(_L("rofs"))==0) |
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
653 |
{ |
122 | 654 |
test_KErrNone(r); |
33
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
655 |
test(subName().CompareF(_L("rofs"))==0); |
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
656 |
continue; |
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
657 |
} |
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
658 |
// if Composite, testing returning file system name |
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
659 |
if (fsName.CompareF(_L("Composite"))==0) |
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
660 |
{ |
122 | 661 |
test_KErrNone(r); |
33
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
662 |
test(subName().CompareF(_L("Composite"))==0); |
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
663 |
continue; |
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
664 |
} |
0 | 665 |
|
33
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
666 |
// else |
122 | 667 |
test_KErrNone(r); |
33
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
668 |
test(subName().Length()!=0); |
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
669 |
|
0 | 670 |
} |
33
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
671 |
} |
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
672 |
} |
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
673 |
} |
0 | 674 |
|
675 |
//---------------------------------------------------------------------------------------------- |
|
676 |
//! @SYMTestCaseID PBASE-t_fsys-0318 |
|
677 |
//! @SYMTestType CIT |
|
678 |
//! @SYMPREQ CR0882 |
|
679 |
//! @SYMTestCaseDesc This test case is testing querying file system's cluster size using |
|
33
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
680 |
//! RFs::QueryVolumeInfoExt() API. |
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
681 |
//! @SYMTestActions 1 querys cluster size of file system on volumes mounted with 'Fat' file system |
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
682 |
//! 2 querys cluster size of file system on volumes mounted with 'Lffs' file system |
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
683 |
//! 3 querys cluster size of file system on volumes mounted with other file systems |
0 | 684 |
//! @SYMTestExpectedResults |
33
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
685 |
//! 1 returned error code should be KErrNone, cluster size should be non-zero |
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
686 |
//! 2 returned error code should be KErrNone, cluster size should be 512 |
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
687 |
//! 3 returned error code should be KErrNone, cluster size should be KErrNotSupported |
0 | 688 |
//! @SYMTestPriority High |
689 |
//! @SYMTestStatus Implemented |
|
690 |
//---------------------------------------------------------------------------------------------- |
|
691 |
static void TestFileSystemClusterSizeQuery() |
|
33
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
692 |
{ |
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
693 |
test.Next(_L("Test querying cluster size information of the mounted file system")); |
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
694 |
TFullName fsName; |
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
695 |
TPckgBuf<TVolumeIOParamInfo> ioInfo; |
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
696 |
TInt i, r; |
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
697 |
TDriveInfo driveInfo; |
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
698 |
for(i = EDriveA; i <= EDriveZ; ++i) |
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
699 |
{ |
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
700 |
r = TheFs.FileSystemName(fsName, i); |
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
701 |
if (r == KErrNone) |
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
702 |
{ |
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
703 |
test.Printf(_L("Tested on drive: %c.\n"), (char)(i+'A')); |
0 | 704 |
|
33
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
705 |
r=TheFs.Drive(driveInfo, i); |
122 | 706 |
test_KErrNone(r); |
33
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
707 |
// if no media present |
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
708 |
if (driveInfo.iType==EMediaNotPresent) |
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
709 |
{ |
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
710 |
r = TheFs.QueryVolumeInfoExt(i, EIOParamInfo, ioInfo); |
122 | 711 |
test_Value(r, r == KErrNone || r == KErrNotReady); |
33
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
712 |
} |
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
713 |
else if (driveInfo.iType==EMediaCdRom) |
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
714 |
{ |
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
715 |
test.Printf(_L("CD ROM with no media!\n")); |
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
716 |
r = TheFs.QueryVolumeInfoExt(i, EIOParamInfo, ioInfo); |
122 | 717 |
test_Value(r, r == KErrNone || r == KErrNotReady); |
33
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
718 |
} |
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
719 |
else |
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
720 |
{ |
0 | 721 |
r = TheFs.QueryVolumeInfoExt(i, EIOParamInfo, ioInfo); |
33
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
722 |
test(KErrNone == r); |
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
723 |
// if Fat |
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
724 |
if (fsName.CompareF(KFileSystemName_FAT)==0) |
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
725 |
{ |
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
726 |
test(ioInfo().iClusterSize != 0); |
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
727 |
continue; |
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
728 |
} |
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
729 |
// else if Lffs |
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
730 |
if (fsName.CompareF(_L("Lffs"))==0) |
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
731 |
{ |
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
732 |
TBusLocalDrive drive; |
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
733 |
TBool changeFlag = EFalse; |
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
734 |
TInt locDriveNumber; |
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
735 |
TLocalDriveCaps DriveCaps; |
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
736 |
TLocalDriveCapsV7 DriveCapsV7; |
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
737 |
for(locDriveNumber = 0; locDriveNumber < KMaxLocalDrives; locDriveNumber++) |
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
738 |
{ |
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
739 |
r = drive.Connect(locDriveNumber,changeFlag); |
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
740 |
if(r==KErrNone) |
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
741 |
{ |
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
742 |
|
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
743 |
TPckg<TLocalDriveCaps> capsPckg(DriveCaps); |
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
744 |
r=drive.Caps(capsPckg); |
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
745 |
if((r==KErrNone) && (DriveCaps.iFileSystemId==KDriveFileSysLFFS)) |
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
746 |
{ |
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
747 |
break; |
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
748 |
} |
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
749 |
drive.Disconnect(); |
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
750 |
} |
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
751 |
} |
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
752 |
TPckg<TLocalDriveCapsV7> capsPckg(DriveCapsV7); |
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
753 |
r=drive.Caps(capsPckg); |
122 | 754 |
test_KErrNone(r); |
33
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
755 |
drive.Disconnect(); |
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
756 |
if(DriveCapsV7.iObjectModeSize == 0) |
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
757 |
{ |
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
758 |
test(ioInfo().iClusterSize == 512); |
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
759 |
continue; |
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
760 |
} |
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
761 |
else |
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
762 |
{ |
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
763 |
test((TUint32)(ioInfo().iClusterSize) == DriveCapsV7.iObjectModeSize); |
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
764 |
continue; |
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
765 |
} |
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
766 |
} |
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
767 |
// else |
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
768 |
//-- we can not suggest anything about unknown filesystem, thus do not check the result. |
0 | 769 |
//test(ioInfo().iClusterSize == KErrNotSupported); |
33
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
770 |
|
0 | 771 |
} |
33
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
772 |
} |
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
773 |
} |
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
774 |
} |
0 | 775 |
|
776 |
//---------------------------------------------------------------------------------------------- |
|
777 |
//! @SYMTestCaseID PBASE-t_fsys-0319 |
|
778 |
//! @SYMTestType CIT |
|
779 |
//! @SYMPREQ CR0882 |
|
780 |
//! @SYMTestCaseDesc This test case is testing querying block size of underlying media using |
|
33
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
781 |
//! RFs::QueryVolumeInfoExt() API. |
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
782 |
//! @SYMTestActions 1 querys block size on volumes mounted with MMC card type of media |
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
783 |
//! 2 querys block size on volumes mounted with RAM type of media |
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
784 |
//! 3 querys block size on volumes mounted with NOR flash type of media |
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
785 |
//! 4 querys block size on volumes mounted with Nand flash (code) type of media |
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
786 |
//! 5 querys block size on volumes mounted with Nand flash (data) type of media |
0 | 787 |
//! @SYMTestExpectedResults |
33
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
788 |
//! 1 returned error code should be KErrNone, block size should be 512 |
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
789 |
//! 2 returned error code should be KErrNone, block size should be KDefaultVolumeBlockSize |
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
790 |
//! 3 returned error code should be KErrNone, block size should be KDefaultVolumeBlockSize |
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
791 |
//! 4 returned error code should be KErrNone, block size should be 512 |
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
792 |
//! 5 returned error code should be KErrNone, block size should be 512 |
0 | 793 |
//! @SYMTestPriority High |
794 |
//! @SYMTestStatus Implemented |
|
795 |
//---------------------------------------------------------------------------------------------- |
|
796 |
static void TestMediaBlockSizeQuery() |
|
33
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
797 |
{ |
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
798 |
test.Next(_L("Test querying block size information of the underlying media")); |
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
799 |
#if defined(__WINS__) |
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
800 |
test.Printf(_L("This test case runs on hardware only")); |
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
801 |
return; |
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
802 |
|
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
803 |
#else // test runs on hardware only. |
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
804 |
TFSName fsName; |
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
805 |
TPckgBuf<TVolumeIOParamInfo> ioInfo; |
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
806 |
TInt i, r; |
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
807 |
TDriveInfo driveInfo; |
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
808 |
for(i = EDriveA; i <= EDriveZ; ++i) |
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
809 |
{ |
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
810 |
r = TheFs.FileSystemName(fsName, i); |
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
811 |
if (r == KErrNone) |
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
812 |
{ |
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
813 |
test.Printf(_L("Tested on drive: %c.\n"), (char)(i+'A')); |
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
814 |
r=TheFs.Drive(driveInfo, i); |
122 | 815 |
test_KErrNone(r); |
33
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
816 |
// if no media present |
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
817 |
if (driveInfo.iType==EMediaNotPresent) |
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
818 |
{ |
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
819 |
r = TheFs.QueryVolumeInfoExt(i, EIOParamInfo, ioInfo); |
122 | 820 |
test_Value(r, r == KErrNone || r == KErrNotReady); |
33
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
821 |
} |
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
822 |
else if (driveInfo.iType==EMediaCdRom) |
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
823 |
{ |
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
824 |
test.Printf(_L("CD ROM with no media will report not ready!\n")); |
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
825 |
r = TheFs.QueryVolumeInfoExt(i, EIOParamInfo, ioInfo); |
122 | 826 |
test_Value(r, r == KErrNotReady); |
33
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
827 |
} |
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
828 |
else |
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
829 |
{ |
31
56f325a607ea
Revision: 200951
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
830 |
r = TheFs.QueryVolumeInfoExt(i, EIOParamInfo, ioInfo); |
33
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
831 |
test(KErrNone == r); |
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
832 |
// if MMC, test block size >= 512; |
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
833 |
// (Version 4.3 MMC cards introduce the concept of a "Super Page" which should be used as |
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
834 |
// guide when calculating the cluster size. For these cards the reported block size may be |
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
835 |
// any multiple of 512). |
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
836 |
if ((driveInfo.iType == EMediaHardDisk) && |
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
837 |
(driveInfo.iDriveAtt & KDriveAttRemovable) && |
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
838 |
(driveInfo.iDriveAtt & KDriveAttLocal)) |
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
839 |
{ |
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
840 |
test(ioInfo().iBlockSize >= 512); |
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
841 |
continue; |
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
842 |
} |
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
843 |
// if RAM, test block size == 1; |
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
844 |
if ((driveInfo.iType == EMediaRam) && |
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
845 |
(driveInfo.iDriveAtt & KDriveAttLocal) && |
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
846 |
(driveInfo.iDriveAtt & KDriveAttInternal)) |
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
847 |
{ |
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
848 |
test(ioInfo().iBlockSize == 1); |
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
849 |
continue; |
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
850 |
} |
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
851 |
// if NOR flash, test block size == 512 (default block size); |
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
852 |
if ((driveInfo.iType == EMediaFlash) && |
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
853 |
(driveInfo.iDriveAtt & KDriveAttLocal) && |
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
854 |
(driveInfo.iDriveAtt & KDriveAttInternal)) |
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
855 |
{ |
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
856 |
TBusLocalDrive drive; |
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
857 |
TBool changeFlag = EFalse; |
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
858 |
TInt locDriveNumber; |
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
859 |
TLocalDriveCaps DriveCaps; |
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
860 |
TLocalDriveCapsV7 DriveCapsV7; |
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
861 |
for(locDriveNumber = 0; locDriveNumber < KMaxLocalDrives; locDriveNumber++) |
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
862 |
{ |
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
863 |
r = drive.Connect(locDriveNumber,changeFlag); |
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
864 |
if(r==KErrNone) |
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
865 |
{ |
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
866 |
TPckg<TLocalDriveCaps> capsPckg(DriveCaps); |
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
867 |
r=drive.Caps(capsPckg); |
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
868 |
if((r==KErrNone) && (DriveCaps.iFileSystemId==KDriveFileSysLFFS)) |
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
869 |
{ |
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
870 |
break; |
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
871 |
} |
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
872 |
drive.Disconnect(); |
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
873 |
} |
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
874 |
} |
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
875 |
TPckg<TLocalDriveCapsV7> capsPckg(DriveCapsV7); |
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
876 |
r=drive.Caps(capsPckg); |
122 | 877 |
test_KErrNone(r); |
33
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
878 |
if ((fsName.CompareF(_L("Lffs"))==0) && (DriveCapsV7.iObjectModeSize != 0)) |
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
879 |
{ |
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
880 |
test(ioInfo().iBlockSize == (TInt) DriveCapsV7.iObjectModeSize); |
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
881 |
continue; |
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
882 |
} |
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
883 |
else |
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
884 |
{ |
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
885 |
test(ioInfo().iBlockSize == (TInt) KDefaultVolumeBlockSize); |
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
886 |
continue; |
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
887 |
} |
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
888 |
} |
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
889 |
// if Nand flash (with Fat file system), test block size == 512 (small-block) or 2048 (large-block) |
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
890 |
if ((driveInfo.iType == EMediaNANDFlash) && |
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
891 |
(driveInfo.iDriveAtt & KDriveAttLocal) && |
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
892 |
(driveInfo.iDriveAtt & KDriveAttInternal)) |
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
893 |
{ |
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
894 |
test(ioInfo().iBlockSize == 512 || ioInfo().iBlockSize == 2048); |
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
895 |
continue; |
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
896 |
} |
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
897 |
} |
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
898 |
} |
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
899 |
} |
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
900 |
#endif // __WINS__ |
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
901 |
} |
0 | 902 |
|
903 |
//---------------------------------------------------------------------------------------------- |
|
904 |
//! @SYMTestCaseID PBASE-t_fsys-0320 |
|
905 |
//! @SYMTestType CIT |
|
906 |
//! @SYMPREQ CR0882 |
|
907 |
//! @SYMTestCaseDesc This test case is testing wrapper API RFs::FileSystemSubType() has the same |
|
33
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
908 |
//! behaviours as RFs::QueryVolumeInfoExt() |
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
909 |
//! @SYMTestActions 1 querys file system sub type name by both APIs |
0 | 910 |
//! @SYMTestExpectedResults |
33
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
911 |
//! 1 returned error codes and descriptors of both API should be identical |
0 | 912 |
//! @SYMTestPriority High |
913 |
//! @SYMTestStatus Implemented |
|
914 |
//---------------------------------------------------------------------------------------------- |
|
915 |
static void TestFileSystemSubType() |
|
33
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
916 |
{ |
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
917 |
test.Next(_L("Test wrapper API RFs::FileSystemSubType()'s behaviour")); |
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
918 |
TFSName fsName; |
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
919 |
TPckgBuf<TFSName> subName; |
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
920 |
TInt r; |
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
921 |
TFSName subName1; |
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
922 |
TInt r1; |
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
923 |
|
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
924 |
for(TInt i = EDriveA; i <= EDriveZ; ++i) |
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
925 |
{ |
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
926 |
r = TheFs.FileSystemName(fsName, i); |
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
927 |
if (r == KErrNone) |
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
928 |
{ |
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
929 |
test.Printf(_L("Tested on drive: %c.\n"), (char)(i+'A')); |
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
930 |
r = TheFs.QueryVolumeInfoExt(i, EFileSystemSubType, subName); |
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
931 |
r1 = TheFs.FileSystemSubType(i, subName1); |
122 | 932 |
test_Value(r, r == r1); |
33
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
933 |
if (subName().Length()) |
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
934 |
{ |
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
935 |
test(subName().CompareF(subName1)==0); |
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
936 |
} |
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
937 |
else |
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
938 |
{ |
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
939 |
test(subName1.Length()==0); |
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
940 |
} |
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
941 |
} |
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
942 |
} |
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
943 |
} |
0 | 944 |
|
945 |
//---------------------------------------------------------------------------------------------- |
|
946 |
//! @SYMTestCaseID PBASE-t_fsys-0321 |
|
947 |
//! @SYMTestType CIT |
|
948 |
//! @SYMPREQ CR0882 |
|
949 |
//! @SYMTestCaseDesc This test case is testing wrapper API RFs::VolumeIOParam() has the same |
|
33
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
950 |
//! behaviours as RFs::QueryVolumeInfoExt() |
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
951 |
//! @SYMTestActions 1 querys volume IO params by both APIs |
0 | 952 |
//! @SYMTestExpectedResults |
33
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
953 |
//! 1 returned error codes and IO param values of both API should be identical |
0 | 954 |
//! @SYMTestPriority High |
955 |
//! @SYMTestStatus Implemented |
|
956 |
//---------------------------------------------------------------------------------------------- |
|
957 |
static void TestVolumeIOParam() |
|
33
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
958 |
{ |
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
959 |
test.Next(_L("Test wrapper API RFs::VolumeIOParam()'s behaviour")); |
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
960 |
TFSName fsName; |
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
961 |
TPckgBuf<TVolumeIOParamInfo> ioInfo; |
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
962 |
TInt r; |
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
963 |
TVolumeIOParamInfo ioInfo1; |
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
964 |
TInt r1; |
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
965 |
|
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
966 |
for(TInt i = EDriveA; i <= EDriveZ; ++i) |
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
967 |
{ |
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
968 |
r = TheFs.FileSystemName(fsName, i); |
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
969 |
if (r == KErrNone) |
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
970 |
{ |
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
971 |
test.Printf(_L("Tested on drive: %c.\n"), (char)(i+'A')); |
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
972 |
r = TheFs.QueryVolumeInfoExt(i, EIOParamInfo, ioInfo); |
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
973 |
r1 = TheFs.VolumeIOParam(i, ioInfo1); |
122 | 974 |
test_Value(r, r == r1); |
33
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
975 |
test(ioInfo().iBlockSize == ioInfo1.iBlockSize); |
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
976 |
test(ioInfo().iClusterSize == ioInfo1.iClusterSize); |
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
977 |
test(ioInfo().iRecReadBufSize == ioInfo1.iRecReadBufSize); |
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
978 |
test(ioInfo().iRecWriteBufSize == ioInfo1.iRecWriteBufSize); |
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
979 |
} |
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
980 |
} |
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
981 |
} |
0 | 982 |
|
983 |
||
984 |
//---------------------------------------------------------------------------------------------- |
|
985 |
//! @SYMTestCaseID PBASE-t_fsys-0322 |
|
986 |
//! @SYMTestType CIT |
|
987 |
//! @SYMPREQ CR0882 |
|
988 |
//! @SYMTestCaseDesc This test case is testing RFs::QueryVolumeInfoExt() API on a testing file system |
|
33
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
989 |
//! @SYMTestActions 0 mounts testing file system on a certain drive |
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
990 |
//! 1 querys file system's sub type name on the drive under testing |
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
991 |
//! 2 querys file system's cluster size on the drive under testing |
0 | 992 |
//! @SYMTestExpectedResults |
33
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
993 |
//! 1 returned error code should be KErrNone, sub type name should match 'Test3SubType' |
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
994 |
//! 2 returned error code should be KErrNone, cluster size should equal 1024 |
0 | 995 |
//! @SYMTestPriority High |
996 |
//! @SYMTestStatus Implemented |
|
997 |
//---------------------------------------------------------------------------------------------- |
|
998 |
static void TestQueryVolumeInfoExtOnTestFS(TInt aDrive) |
|
33
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
999 |
{ |
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
1000 |
if (aDrive==EDriveC) // Can't test on C: |
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
1001 |
return; |
0 | 1002 |
|
33
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
1003 |
TInt r; |
0 | 1004 |
|
33
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
1005 |
test.Printf(_L("Tested on drive: %c.\n"), (char)(aDrive+'A')); |
0 | 1006 |
|
33
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
1007 |
// Mount a new CTestFileSystem on the drive under test |
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
1008 |
test.Next(_L("Test RFs::QueryVolumeInfoExt() on Testing File System")); |
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
1009 |
r = TheFs.AddFileSystem(_L("T_TFSYS3")); |
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
1010 |
if (r != KErrNone && r != KErrAlreadyExists) |
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
1011 |
{ |
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
1012 |
test.Printf(_L("error=%d"),r); |
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
1013 |
test(EFalse); |
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
1014 |
} |
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
1015 |
TFSName oldFs; |
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
1016 |
r = TheFs.FileSystemName(oldFs,aDrive); |
122 | 1017 |
test_KErrNone(r); |
33
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
1018 |
r = TheFs.DismountFileSystem(oldFs,aDrive); |
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
1019 |
if (r != KErrNone) |
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
1020 |
{ |
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
1021 |
test.Printf(_L("Error = %d"),r); |
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
1022 |
test(EFalse); |
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
1023 |
} |
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
1024 |
r = TheFs.MountFileSystem(_L("Test3"),aDrive); |
122 | 1025 |
test_KErrNone(r); |
33
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
1026 |
TFSName newFs; |
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
1027 |
r = TheFs.FileSystemName(newFs,aDrive); |
122 | 1028 |
test_KErrNone(r); |
33
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
1029 |
test(newFs.Compare(_L("Test3"))==0); |
0 | 1030 |
|
33
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
1031 |
// Sub type name query: |
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
1032 |
TPckgBuf<TFSName> subNameP; |
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
1033 |
r = TheFs.QueryVolumeInfoExt(aDrive, EFileSystemSubType, subNameP); |
122 | 1034 |
test_KErrNone(r); |
33
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
1035 |
test(subNameP() == _L("Test3SubType")); |
0 | 1036 |
|
33
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
1037 |
// Cluster size querys: |
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
1038 |
TPckgBuf<TVolumeIOParamInfo> ioInfoP; |
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
1039 |
r = TheFs.QueryVolumeInfoExt(aDrive, EIOParamInfo, ioInfoP); |
122 | 1040 |
test_KErrNone(r); |
33
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
1041 |
test(ioInfoP().iClusterSize==1024); |
0 | 1042 |
|
33
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
1043 |
// Mount the original file system back |
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
1044 |
r=TheFs.DismountFileSystem(newFs,aDrive); |
122 | 1045 |
test_KErrNone(r); |
33
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
1046 |
r=TheFs.MountFileSystem(oldFs,aDrive); |
122 | 1047 |
test_KErrNone(r); |
33
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
1048 |
|
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
1049 |
r=TheFs.RemoveFileSystem(_L("Test3")); |
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
1050 |
if(r!=KErrNone) |
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
1051 |
{ |
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
1052 |
test.Printf(_L("error=%d"),r); |
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
1053 |
test(EFalse); |
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
1054 |
} |
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
1055 |
} |
0 | 1056 |
|
1057 |
||
1058 |
//---------------------------------------------------------------------------------------------- |
|
1059 |
/** |
|
1060 |
Test remounting the file system with objects opened. |
|
1061 |
scenario: |
|
1062 |
1. create a file |
|
1063 |
2. open it. |
|
1064 |
3. forcedly remount the file system |
|
1065 |
4. read this file (this will imply remounting the filesystem) |
|
1066 |
*/ |
|
1067 |
static void TestRemountFSWithOpenedObjects() |
|
1068 |
{ |
|
1069 |
test.Next(_L("Testing forcedly remounting FS with objects opened.\n")); |
|
1070 |
||
1071 |
TInt nRes; |
|
1072 |
||
1073 |
//-- 1. create a file |
|
1074 |
_LIT(KFile, "\\test_file.file"); |
|
1075 |
const TUint KFileSz = 5000; |
|
1076 |
||
1077 |
nRes = CreateCheckableStuffedFile(TheFs, KFile, KFileSz); |
|
1078 |
test_KErrNone(nRes); |
|
1079 |
||
1080 |
RFile file; |
|
1081 |
||
1082 |
//-- 2. open this file |
|
1083 |
nRes = file.Open(TheFs, KFile, EFileRead); |
|
1084 |
test_KErrNone(nRes); |
|
122 | 1085 |
|
1086 |
const TInt drvNumber = CurrentDrive(); |
|
0 | 1087 |
|
1088 |
//-- 2.1 try to dismount the FS, it must fail because of the opened object. |
|
1089 |
TBuf<40> fsName; |
|
122 | 1090 |
nRes = TheFs.FileSystemName(fsName, drvNumber); |
0 | 1091 |
test_KErrNone(nRes); |
1092 |
||
122 | 1093 |
nRes = TheFs.DismountFileSystem(fsName, drvNumber); |
1094 |
test_Value(nRes, nRes == KErrInUse); |
|
0 | 1095 |
|
122 | 1096 |
// Flag from locmedia.h to simulate ejecting and re-inserting the media. |
1097 |
const TUint KMediaRemountForceMediaChange = 0x00000001; |
|
1098 |
TRequestStatus changeStatus; |
|
1099 |
TheFs.NotifyChange(ENotifyAll, changeStatus); |
|
1100 |
TDriveInfo driveInfo; |
|
1101 |
||
0 | 1102 |
//-- 3. forcedly remount the drive |
122 | 1103 |
nRes = TheFs.RemountDrive(drvNumber, NULL, KMediaRemountForceMediaChange); |
1104 |
||
0 | 1105 |
if(nRes == KErrNotSupported) |
122 | 1106 |
{//-- this feature is not supported and the test is inconsistent. |
0 | 1107 |
test.Printf(_L("RemountDrive() is not supported, the test is inconsistent!")); |
1108 |
||
1109 |
//-- remounting must work at least on MMC drives |
|
122 | 1110 |
const TBool isFAT = Is_Fat(TheFs, drvNumber); |
0 | 1111 |
|
122 | 1112 |
nRes = TheFs.Drive(driveInfo, drvNumber); |
0 | 1113 |
test_KErrNone(nRes); |
1114 |
||
122 | 1115 |
test_Value(driveInfo.iDriveAtt, !isFAT || (!(driveInfo.iDriveAtt & KDriveAttRemovable))); |
1116 |
} |
|
0 | 1117 |
else |
122 | 1118 |
{ |
1119 |
test_Value(nRes, nRes == KErrNotReady || nRes == KErrNone); |
|
1120 |
||
1121 |
//-- 3.1 wait for media change to complete |
|
1122 |
do |
|
1123 |
{ |
|
1124 |
// Waiting for media change... |
|
1125 |
User::WaitForRequest(changeStatus); |
|
1126 |
nRes = TheFs.Drive(driveInfo, drvNumber); |
|
1127 |
TheFs.NotifyChange(ENotifyAll, changeStatus); |
|
1128 |
} |
|
1129 |
while (nRes == KErrNotReady); |
|
1130 |
||
1131 |
test_KErrNone(nRes); |
|
1132 |
User::After(1000*K1mSec); // Wait 1 sec (needed by certain platforms) |
|
1133 |
} |
|
1134 |
||
1135 |
TheFs.NotifyChangeCancel(changeStatus); |
|
0 | 1136 |
|
1137 |
//-- 4. read this file. The FS will be remounted and the read must be OK. |
|
1138 |
TBuf8<40> buf; |
|
1139 |
nRes = file.Read(0, buf, 30); |
|
1140 |
test_KErrNone(nRes); |
|
1141 |
||
1142 |
file.Close(); |
|
1143 |
||
1144 |
//-- 5. verify the file, just in case. |
|
1145 |
nRes = VerifyCheckableFile(TheFs, KFile); |
|
1146 |
test_KErrNone(nRes); |
|
1147 |
||
1148 |
//-- 6. delete the file |
|
1149 |
TheFs.Delete(KFile); |
|
1150 |
||
1151 |
} |
|
1152 |
//---------------------------------------------------------------------------------------------- |
|
1153 |
static void TestFileSystem_MaxSupportedFileSizeQuery() |
|
1154 |
{ |
|
33
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
1155 |
test.Next(_L("Test querying max. supported file size on this file system")); |
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
1156 |
TFullName fsName; |
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
1157 |
TPckgBuf<TVolumeIOParamInfo> ioInfo; |
0 | 1158 |
TVolumeIOParamInfo& volInfo = ioInfo(); |
1159 |
||
1160 |
const TInt drvNo=CurrentDrive(); |
|
1161 |
||
1162 |
TInt nRes; |
|
1163 |
||
1164 |
nRes = TheFs.FileSystemName(fsName, drvNo); |
|
1165 |
test_KErrNone(nRes); |
|
1166 |
||
1167 |
nRes = TheFs.QueryVolumeInfoExt(drvNo, EIOParamInfo, ioInfo); |
|
1168 |
test_KErrNone(nRes); |
|
1169 |
||
1170 |
test.Printf(_L("FS:'%S' Max File Size:0x%LX\n"), &fsName, volInfo.iMaxSupportedFileSize); |
|
1171 |
if(volInfo.iMaxSupportedFileSize == KMaxTUint64) |
|
1172 |
{ |
|
1173 |
test.Printf(_L("Max File Size query isn't supported by this FS\n")); |
|
1174 |
} |
|
1175 |
||
1176 |
||
1177 |
//-- check the value for FAT FS only. |
|
1178 |
if(Is_Fat(TheFs, drvNo)) |
|
1179 |
{ |
|
1180 |
test(volInfo.iMaxSupportedFileSize == KMaxSupportedFatFileSize); |
|
1181 |
} |
|
1182 |
||
1183 |
} |
|
1184 |
||
1185 |
//---------------------------------------------------------------------------------------------- |
|
1186 |
GLDEF_C void CallTestsL() |
|
1187 |
// |
|
1188 |
// Do all tests |
|
1189 |
// |
|
33
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
1190 |
{ |
0 | 1191 |
|
1192 |
//-- set up console output |
|
1193 |
Fat_Test_Utils::SetConsole(test.Console()); |
|
1194 |
||
33
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
1195 |
TInt drive=CurrentDrive(); |
0 | 1196 |
|
1197 |
PrintDrvInfo(TheFs, drive); |
|
1198 |
||
33
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
1199 |
//Do not run this test on the NAND drive, as |
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
1200 |
//this has the FTL mounted as a primary extension |
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
1201 |
//which causes the test to fail |
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
1202 |
#if defined(__WINS__) |
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
1203 |
if (drive==EDriveU) |
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
1204 |
return; |
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
1205 |
#else |
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
1206 |
TDriveInfo driveInfo; |
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
1207 |
TheFs.Drive(driveInfo,drive); |
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
1208 |
if (driveInfo.iType == EMediaNANDFlash) |
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
1209 |
{ |
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
1210 |
return; |
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
1211 |
} |
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
1212 |
#endif |
0 | 1213 |
|
1214 |
//--------------------------------------- |
|
1215 |
||
254 | 1216 |
InitGlobals(); |
1217 |
||
1218 |
//--------------------------------------- |
|
33
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
1219 |
TestFileSystemNames(); |
254 | 1220 |
TestFileSystemNameLength(); |
33
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
1221 |
TestDismountFileSystem(CurrentDrive()); |
0 | 1222 |
#if defined(__EPOC32__) |
33
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
1223 |
TestFileSystem(CurrentDrive()); |
0 | 1224 |
#endif |
1225 |
||
33
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
1226 |
TestMountInvalidDrive(); |
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
1227 |
|
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
1228 |
TestMountingBrokenMedia(CurrentDrive()); |
0 | 1229 |
TestSubstDriveMediaSerialNumber(); |
1230 |
||
33
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
1231 |
TestFileSystemSubTypeQuery(); |
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
1232 |
TestFileSystemClusterSizeQuery(); |
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
1233 |
TestMediaBlockSizeQuery(); |
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
1234 |
TestFileSystemSubType(); |
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
1235 |
TestVolumeIOParam(); |
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
1236 |
TestQueryVolumeInfoExtOnTestFS(CurrentDrive()); |
0 | 1237 |
|
33
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
1238 |
TestFileSystem_MaxSupportedFileSizeQuery(); |
0 | 1239 |
|
1240 |
TestRemountFSWithOpenedObjects(); |
|
254 | 1241 |
|
1242 |
//--------------------------------------- |
|
1243 |
DestroyGlobals(); |
|
0 | 1244 |
} |