os/kernelhwsrv/baseapitest/basesvs/validation/f32/sfsrv/scripts/PBASE-F32-Format-PublicApi-REM.script
Update contrib.
2 // Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies).
3 // All rights reserved.
4 // This component and the accompanying materials are made available
5 // under the terms of "Eclipse Public License v1.0"
6 // which accompanies this distribution, and is available
7 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
9 // Initial Contributors:
10 // Nokia Corporation - initial contribution.
17 //! @SYMTestSuiteName pbase-f32-sfsrv-publicapi-rem
18 //! @SYMScriptTestEnvironment This test script requires a basic ROM.
19 //! @SYMScriptAuthor Alvar Udras, Runno Sgirka
20 //! @SYMScriptDescription The test script contains API tests for the following functions of RFormat class:
21 //! TInt Open(RFs &aFs, const TDesC &aName, TUint aFormatMode, TInt &aCount);
22 //! TInt Open(RFs &aFs, const TDesC &aName, TUint aFormatMode, TInt &aCount, const TDesC8 &anInfo);
24 //! TInt Next(TInt &aStep);
25 //! void Next(TPckgBuf< TInt > &aStep, TRequestStatus &aStatus);
31 START_TESTCASE PBASE-F32-Format-PublicApi-0001
32 //! @SYMTestCaseID PBASE-F32-Format-PublicApi-0001
34 //! @SYMTestCaseDesc Functions Open(RFs &aFs, const TDesC &aName, TUint aFormatMode, TInt &aCount) and Close() test. Open a removable device
35 //! using EQuickFormat as format mode and close it.
36 //! Uses API elements: Open(), Close().
37 //! @SYMTestActions 1. Create RFs session.
38 //! 2. Connect the RFs session.
39 //! 3. Call Open(RFs &aFs, const TDesC &aName, TUint aFormatMode, TInt &aCount) method, passing the RFs session,
40 //! removable drive letter, EQuickFormat, aCount as parameters.
41 //! 4. Call Close() to close the RFormat instance.
42 //! 5. Close RFs session.
43 //! @SYMTestStatus Implemented
44 //! @SYMTestPriority Critical
45 //! @SYMTestExpectedResults The Open() method call is completed returning KErrNone.
47 START_TEST_BLOCK 100 t_sfsrv \base\PBASE-F32-Format-PublicApi.ini
48 CREATE_OBJECT RFs rfs1
49 CREATE_OBJECT RFormat format1
53 COMMAND format1 Open PBASE-F32-Format-PublicApi-0001-001-Open_command05
59 END_TESTCASE PBASE-F32-Format-PublicApi-0001
62 START_TESTCASE PBASE-F32-Format-PublicApi-0002
63 //! @SYMTestCaseID PBASE-F32-Format-PublicApi-0002
65 //! @SYMTestCaseDesc Functions Open(RFs &aFs, const TDesC &aName, TUint aFormatMode, TInt &aCount) and Close() test. Open a removable device
66 //! using EHighDensity as format mode and close it.
67 //! Uses API elements: Open(), Close().
68 //! @SYMTestActions 1. Create RFs session.
69 //! 2. Connect the RFs session.
70 //! 3. Call Open(RFs &aFs, const TDesC &aName, TUint aFormatMode, TInt &aCount) method, passing the RFs session,
71 //! removable drive letter, EHighDensity, aCount as parameters.
72 //! 4. Call Close() to close the RFormat instance.
73 //! 5. Close RFs session.
74 //! @SYMTestStatus Implemented
75 //! @SYMTestPriority Critical
76 //! @SYMTestExpectedResults The Open() method call is completed returning KErrNone.
78 START_TEST_BLOCK 100 t_sfsrv \base\PBASE-F32-Format-PublicApi.ini
79 CREATE_OBJECT RFs rfs1
80 CREATE_OBJECT RFormat format1
84 COMMAND format1 Open PBASE-F32-Format-PublicApi-0002-001-Open_command05
90 END_TESTCASE PBASE-F32-Format-PublicApi-0002
93 START_TESTCASE PBASE-F32-Format-PublicApi-0003
94 //! @SYMTestCaseID PBASE-F32-Format-PublicApi-0003
96 //! @SYMTestCaseDesc Functions Open(RFs &aFs, const TDesC &aName, TUint aFormatMode, TInt &aCount) and Close() test. Open a removable device
97 //! using ELowDensity as format mode and close it.
98 //! Uses API elements: Open(), Close().
99 //! @SYMTestActions 1. Create RFs session.
100 //! 2. Connect the RFs session.
101 //! 3. Call Open(RFs &aFs, const TDesC &aName, TUint aFormatMode, TInt &aCount) method, passing the RFs session,
102 //! removable drive letter, ELowDensity, aCount as parameters.
103 //! 4. Call Close() to close the RFormat instance.
104 //! 5. Close RFs session.
105 //! @SYMTestStatus Implemented
106 //! @SYMTestPriority Critical
107 //! @SYMTestExpectedResults The Open() method call is completed returning KErrNone.
109 START_TEST_BLOCK 100 t_sfsrv \base\PBASE-F32-Format-PublicApi.ini
110 CREATE_OBJECT RFs rfs1
111 CREATE_OBJECT RFormat format1
115 COMMAND format1 Open PBASE-F32-Format-PublicApi-0003-001-Open_command05
116 COMMAND format1 Close
121 END_TESTCASE PBASE-F32-Format-PublicApi-0003
124 START_TESTCASE PBASE-F32-Format-PublicApi-0004
125 //! @SYMTestCaseID PBASE-F32-Format-PublicApi-0004
127 //! @SYMTestCaseDesc Functions Open(RFs &aFs, const TDesC &aName, TUint aFormatMode, TInt &aCount) and Close() test. Open a removable device
128 //! using EFullFormat as format mode and close it.
129 //! Uses API elements: Open(), Close().
130 //! @SYMTestActions 1. Create RFs session.
131 //! 2. Connect the RFs session.
132 //! 3. Call Open(RFs &aFs, const TDesC &aName, TUint aFormatMode, TInt &aCount) method, passing the RFs session,
133 //! removable drive letter, EFullFormat, aCount as parameters.
134 //! 4. Call Close() to close the RFormat instance.
135 //! 5. Close RFs session.
136 //! @SYMTestStatus Implemented
137 //! @SYMTestPriority Critical
138 //! @SYMTestExpectedResults The Open() method call is completed returning KErrNone.
140 START_TEST_BLOCK 100 t_sfsrv \base\PBASE-F32-Format-PublicApi.ini
141 CREATE_OBJECT RFs rfs1
142 CREATE_OBJECT RFormat format1
146 COMMAND format1 Open PBASE-F32-Format-PublicApi-0004-001-Open_command05
147 COMMAND format1 Close
152 END_TESTCASE PBASE-F32-Format-PublicApi-0004
155 START_TESTCASE PBASE-F32-Format-PublicApi-0005
156 //! @SYMTestCaseID PBASE-F32-Format-PublicApi-0005
158 //! @SYMTestCaseDesc Functions Open(RFs &aFs, const TDesC &aName, TUint aFormatMode, TInt &aCount) and Close() test. Open a removable device
159 //! using ESpecialFormat as format mode and close it.
160 //! Uses API elements: Open(), Close().
161 //! @SYMTestActions 1. Create RFs session.
162 //! 2. Connect the RFs session.
163 //! 3. Call Open(RFs &aFs, const TDesC &aName, TUint aFormatMode, TInt &aCount) method, passing the RFs session,
164 //! removable drive letter, ESpecialFormat, aCount as parameters.
165 //! 4. Call Close() to close the RFormat instance.
166 //! 5. Close RFs session.
167 //! @SYMTestStatus Implemented
168 //! @SYMTestPriority Critical
169 //! @SYMTestExpectedResults So we are getting -21(access denied ) for formatting a disk with invalid parameter.
171 START_TEST_BLOCK 100 t_sfsrv \base\PBASE-F32-Format-PublicApi.ini
172 CREATE_OBJECT RFs rfs1
173 CREATE_OBJECT RFormat format1
177 COMMAND format1 Open PBASE-F32-Format-PublicApi-1005-001-Open_command05
178 COMMAND !AsyncError=-21 format1 Next PBASE-F32-Format-PublicApi-1005-001-Next_command06
180 COMMAND format1 Close
185 END_TESTCASE PBASE-F32-Format-PublicApi-0005
188 START_TESTCASE PBASE-F32-Format-PublicApi-0006
189 //! @SYMTestCaseID PBASE-F32-Format-PublicApi-0006
191 //! @SYMTestCaseDesc Function Open(RFs &aFs, const TDesC &aName, TUint aFormatMode, TInt &aCount, const TDesC8 &anInfo) test. Open
192 //! a device and close it.
193 //! Uses API elements: Open(), Close().
194 //! @SYMTestActions 1. Create RFs session.
195 //! 2. Connect the RFs session.
196 //! 3. Call Open(RFs &aFs, const TDesC &aName, TUint aFormatMode, TInt &aCount, const TDesC8 &anInfo) method,
197 //! passing the RFs session, removable drive letter, EQuickFormat, aCount, special format information s as parameters.
198 //! 4. Call Close() to close the RFormat instance.
199 //! 5. Close RFs session.
200 //! @SYMTestStatus Implemented
201 //! @SYMTestPriority Critical
202 //! @SYMTestExpectedResults The Open() method call is completed returning KErrNone.
204 START_TEST_BLOCK 100 t_sfsrv \base\PBASE-F32-Format-PublicApi.ini
205 CREATE_OBJECT RFs rfs1
206 CREATE_OBJECT RFormat format1
210 COMMAND format1 Open PBASE-F32-Format-PublicApi-0006-001-Open_command05
211 COMMAND format1 Close
216 END_TESTCASE PBASE-F32-Format-PublicApi-0006
219 START_TESTCASE PBASE-F32-Format-PublicApi-0007
220 //! @SYMTestCaseID PBASE-F32-Format-PublicApi-0007
222 //! @SYMTestCaseDesc Function Next(TInt &aStep) test. Open a removable device, execute the next format steps and close the device.
223 //! Uses API elements: Open(), Next(), Close().
224 //! @SYMTestActions 1. Create RFs session.
225 //! 2. Connect the RFs session.
226 //! 3. Call Open(RFs &aFs, const TDesC &aName, TUint aFormatMode, TInt &aCount) method, passing the RFs session,
227 //! removable drive letter, EHighDensity, aCount as parameters.
228 //! 4. Call Next(TInt &aStep) method, passing aCount as parameter and loop it until aCount reaches 0.
229 //! 5. Call Close() to close the RFormat instance.
230 //! 6. Close RFs session.
231 //! @SYMTestStatus Implemented
232 //! @SYMTestPriority Critical
233 //! @SYMTestExpectedResults The Next() method call is completed returning KErrNone.
235 START_TEST_BLOCK 100 t_sfsrv \base\PBASE-F32-Format-PublicApi.ini
236 CREATE_OBJECT RFs rfs1
237 CREATE_OBJECT RFormat format1
241 COMMAND format1 Open PBASE-F32-Format-PublicApi-0007-001-Open_command05
243 COMMAND format1 Close
248 END_TESTCASE PBASE-F32-Format-PublicApi-0007
251 START_TESTCASE PBASE-F32-Format-PublicApi-0008
252 //! @SYMTestCaseID PBASE-F32-Format-PublicApi-0008
254 //! @SYMTestCaseDesc Function Next(TPckgBuf< TInt > &aStep, TRequestStatus &aStatus) test. Open a removable device, execute the next format
255 //! steps and close the device.
256 //! Uses API elements: Open(), Next(), Close().
257 //! @SYMTestActions 1. Create RFs session.
258 //! 2. Connect the RFs session.
259 //! 3. Call Open(RFs &aFs, const TDesC &aName, TUint aFormatMode, TInt &aCount) method, passing the RFs session,
260 //! removable drive letter, EHighDensity, aCount as parameters.
261 //! 4. Call Next(TPckgBuf< TInt > &aStep, TRequestStatus &aStatus) method, passing aCount,
262 //! activeListener -> iStatus as parameters and loop it until aCount reaches 0.
263 //! 5. Call Close() to close the RFormat instance.
264 //! 6. Close RFs session.
265 //! @SYMTestStatus Implemented
266 //! @SYMTestPriority Critical
267 //! @SYMTestExpectedResults The Next() method call is completed returning KErrNone.
269 START_TEST_BLOCK 100 t_sfsrv \base\PBASE-F32-Format-PublicApi.ini
270 CREATE_OBJECT RFs rfs1
271 CREATE_OBJECT RFormat format1
275 COMMAND format1 Open PBASE-F32-Format-PublicApi-0008-001-Open_command05
276 COMMAND format1 Next PBASE-F32-Format-PublicApi-0008-001-Next_command06
278 COMMAND format1 Close
283 END_TESTCASE PBASE-F32-Format-PublicApi-0008
286 START_TESTCASE PBASE-F32-Format-PublicApi-0009
287 //! @SYMTestCaseID PBASE-F32-Format-PublicApi-0009
289 //! @SYMTestCaseDesc Functions Open(RFs &aFs, const TDesC &aName, TUint aFormatMode, TInt &aCount) and Close() test. Open a removable device
290 //! using EForceErase as format mode and close it.
291 //! Uses API elements: Open(), Close().
292 //! @SYMTestActions 1. Create RFs session.
293 //! 2. Connect the RFs session.
294 //! 3. Call Open(RFs &aFs, const TDesC &aName, TUint aFormatMode, TInt &aCount) method, passing the RFs session,
295 //! removable drive letter, EForceErase, aCount as parameters.
296 //! 4. Call Close() to close the RFormat instance.
297 //! 5. Close RFs session.
298 //! @SYMTestStatus Implemented
299 //! @SYMTestPriority Critical
300 //! @SYMTestExpectedResults The Open() method call is completed returning KErrNone.
302 START_TEST_BLOCK 100 t_sfsrv \base\PBASE-F32-Format-PublicApi.ini
303 CREATE_OBJECT RFs rfs1
304 CREATE_OBJECT RFormat format1
308 COMMAND format1 Open PBASE-F32-Format-PublicApi-0009-001-Open_command05
309 COMMAND format1 Close
314 END_TESTCASE PBASE-F32-Format-PublicApi-0009
317 // ************************
318 // *** NEGATIVE TESTS ***
319 // ************************
323 START_TESTCASE PBASE-F32-Format-PublicApi-1005
324 //! @SYMTestCaseID PBASE-F32-Format-PublicApi-1005
326 //! @SYMTestCaseDesc Function Open(RFs &aFs, const TDesC &aName, TUint aFormatMode, TInt &aCount) test. Call Open() with invalid
327 //! format mode value.
328 //! Uses API elements: Open(), Close().
329 //! @SYMTestActions 1. Create RFs session.
330 //! 2. Connect the RFs session.
331 //! 3. Call Open(RFs &aFs, const TDesC &aName, TUint aFormatMode, TInt &aCount) method, passing the RFs session,
332 //! removable drive letter, -1, aCount as parameters.
333 //! 4. Call Next(TPckgBuf< TInt > &aStep, TRequestStatus &aStatus) method, passing aCount,
334 //! activeListener -> iStatus as parameters and loop it until aCount reaches 0.
335 //! 5. Call Close() to close the RFormat instance.
336 //! 6. Close RFs session.
337 //! @SYMTestStatus Implemented
338 //! @SYMTestPriority Critical
339 //! @SYMTestExpectedResults The Open() method call returns error -21 (Access denied).
341 START_TEST_BLOCK 100 t_sfsrv \base\PBASE-F32-Format-PublicApi.ini
342 CREATE_OBJECT RFs rfs1
343 CREATE_OBJECT RFormat format1
347 COMMAND format1 Open PBASE-F32-Format-PublicApi-1005-001-Open_command05
348 COMMAND !AsyncError=-21 format1 Next PBASE-F32-Format-PublicApi-1005-001-Next_command06
350 COMMAND format1 Close
355 END_TESTCASE PBASE-F32-Format-PublicApi-1005
358 START_TESTCASE PBASE-F32-Format-PublicApi-1009
359 //! @SYMTestCaseID PBASE-F32-Format-PublicApi-1009
361 //! @SYMTestCaseDesc Functions Open(RFs &aFs, const TDesC &aName, TUint aFormatMode, TInt &aCount) test. Open a removable device
362 //! using EQuickFormat as format mode after opening a file on it.
363 //! Uses API elements: Open(), Close().
364 //! @SYMTestActions 1. Create RFs session.
365 //! 2. Connect the RFs session.
366 //! 3. Create an RFile instance.
367 //! 4. Call Open(RFs &aFs, const TDesC &aName, TUint aFormatMode, TInt &aCount) method, passing the RFs session,
368 //! removable drive letter, EQuickFormat, aCount as parameters.
369 //! 5. Call Close() to close the RFormat instance.
370 //! 6. Close RFile instance.
371 //! 7. Close RFs session.
372 //! @SYMTestStatus Implemented
373 //! @SYMTestPriority Critical
374 //! @SYMTestExpectedResults The Open() method call returns error -14 (KErrInUse).
376 START_TEST_BLOCK 100 t_sfsrv \base\PBASE-F32-Format-PublicApi.ini
377 CREATE_OBJECT RFs rfs1
378 CREATE_OBJECT RFile file
379 CREATE_OBJECT RFormat format1
383 COMMAND file Create PBASE-F32-Format-PublicApi-1009-001-Create_command05
385 COMMAND !Error=-14 format1 Open PBASE-F32-Format-PublicApi-1009-001-Open_command08
386 COMMAND format1 Close
393 END_TESTCASE PBASE-F32-Format-PublicApi-1009
396 START_TESTCASE PBASE-F32-Format-PublicApi-1010
397 //! @SYMTestCaseID PBASE-F32-Format-PublicApi-1010
399 //! @SYMTestCaseDesc A test which stops the format in the middle and tries to create a RFs instance after that.
400 //! Uses API elements: Open(), Next(), Close().
401 //! @SYMTestActions 1. Create RFs session.
402 //! 2. Connect the RFs session.
403 //! 3. Call Open(RFs &aFs, const TDesC &aName, TUint aFormatMode, TInt &aCount) method, passing the RFs session,
404 //! removable drive letter, EHighDensity, aCount as parameters.
405 //! 4. Call Next(TPckgBuf< TInt > &aStep, TRequestStatus &aStatus) method, passing aCount,
406 //! activeListener -> iStatus as parameters and loop it.
407 //! 5. Call Close() to close the RFormat instance, without calling outstanding first.
408 //! 6. Create an RFile instance.
409 //! 7. Close RFile instance.
410 //! 8. Call Open(RFs &aFs, const TDesC &aName, TUint aFormatMode, TInt &aCount) method to format the disk for future
411 //! usage, passing the RFs session, removable drive letter, EHighDensity, aCount as parameters.
412 //! 9. Call Next(TInt &aStep) method, passing aCount as parameter and loop it until aCount reaches 0.
413 //! 10. Call Close() to close the RFormat instance.
414 //! 11. Close RFs session.
415 //! @SYMTestStatus Implemented
416 //! @SYMTestPriority Critical
417 //! @SYMTestExpectedResults The RFs create method call will return error -20 (KErrCorrupt).
419 START_TEST_BLOCK 100 t_sfsrv \base\PBASE-F32-Format-PublicApi.ini
420 CREATE_OBJECT RFs rfs1
421 CREATE_OBJECT RFormat format1
422 CREATE_OBJECT RFile file
426 COMMAND format1 Open PBASE-F32-Format-PublicApi-1010-001-Open_command05
427 COMMAND format1 Next PBASE-F32-Format-PublicApi-1010-001-Next_command06
429 COMMAND format1 Close
432 COMMAND !Error=-20 file Create PBASE-F32-Format-PublicApi-1010-001-Create_command10
436 COMMAND format1 Open PBASE-F32-Format-PublicApi-1010-001-Open_command14
438 COMMAND format1 Close
443 END_TESTCASE PBASE-F32-Format-PublicApi-1010