os/kernelhwsrv/baseapitest/basesvs/validation/f32/sfsrv/scripts/PBASE-F32-RFS-PublicApi-ROM.script
First public contribution.
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-RFS-Mounts-PublicApi-ROM
18 //! @SYMScriptTestEnvironment This test script requires a basic ROM.
19 //! @SYMScriptAuthor Oleg Kuznetsov
20 //! @SYMScriptDescription The test script contains API tests for the functions listed in the description of PBASE-F32-RFS-Mounts-PublicApi.script
21 //! file that perform operations on a ROM.
27 START_TESTCASE PBASE-F32-RFS-PublicApi-0007
28 //! @SYMTestCaseID PBASE-F32-RFS-PublicApi-0007
30 //! @SYMTestCaseDesc Function FileSystemName() test with ROM Drive.
31 //! Uses API elements: FileSystemName().
32 //! @SYMTestActions 1. Call Connect() method.
33 //! 2. Call FileSystemName() passing the ROM drive number as argument. Check that aName parameter is set to "Win32" under WINSCW and to "rofs" under ARMv5.
34 //! 3. Call Close() method.
35 //! @SYMTestStatus Implemented
36 //! @SYMTestPriority Critical
37 //! @SYMTestExpectedResults FileSystemName() returns KErrNone and the real name of the file system through the aName output argument.
39 START_TEST_BLOCK 100 T_Sfsrv \base\PBASE-F32-RFS-PublicApi-ROM.ini
40 CREATE_OBJECT RFs RFs1
43 COMMAND RFs1 FileSystemName PBASE-F32-RFS-PublicApi-0007-001-FileSystemName_command03
47 END_TESTCASE PBASE-F32-RFS-PublicApi-0007
50 START_TESTCASE PBASE-F32-RFS-PublicApi-1006
51 //! @SYMTestCaseID PBASE-F32-RFS-PublicApi-1006
53 //! @SYMAuthor Anton Grober
54 //! @SYMCreationDate 22/08/2006
55 //! @SYMTestCaseDesc IsValidDrive() passing a value between 0 and 26 as parameter.
56 //! Uses API elements: IsValidDrive().
57 //! @SYMTestActions 1. Call IsValidDrive() passing some mounted drive as a parameter(in this particular case it's tested with ROM-Drive's index as parameter).
58 //! @SYMTestStatus Implemented
59 //! @SYMTestPriority Critical
60 //! @SYMTestExpectedResults Function IsValidDrive() returns ETrue.
62 START_TEST_BLOCK 100 T_Sfsrv \base\PBASE-F32-RFS-PublicApi-ROM.ini
63 CREATE_OBJECT RFs RFs1
65 COMMAND RFs1 IsValidDrive PBASE-F32-RFS-PublicApi-1006-001-IsValidDrive_command02
68 END_TESTCASE PBASE-F32-RFS-PublicApi-1006
71 START_TESTCASE PBASE-F32-RFS-PublicApi-1016
72 //! @SYMTestCaseID PBASE-F32-RFS-PublicApi-1016
74 //! @SYMAuthor Anton Golovko
75 //! @SYMCreationDate 2/10/2006
76 //! @SYMTestCaseDesc Drive() function test. Passing exisiting drive index as parameter.
77 //! Uses API elements: Drive()
78 //! @SYMTestActions 1. Call Connect().
79 //! 2. Call Drive() passing TDriveInfo reference as first parameter and ROM-drive as second parameter.
81 //! @SYMTestStatus Implemented
82 //! @SYMTestPriority High
83 //! @SYMTestExpectedResults Function returns KErrNone and iType field of TDriveInfo equals EMediaRom.
85 START_TEST_BLOCK 100 T_Sfsrv \base\PBASE-F32-RFS-PublicApi-ROM.ini
86 CREATE_OBJECT RFs RFs1
89 COMMAND RFs1 Drive PBASE-F32-RFS-PublicApi-1016-001-Drive_command03
93 END_TESTCASE PBASE-F32-RFS-PublicApi-1016
96 START_TESTCASE PBASE-F32-RFS-PublicApi-1040
97 //! @SYMTestCaseID PBASE-F32-RFS-PublicApi-1040
99 //! @SYMAuthor Anton Grober
100 //! @SYMCreationDate 02/10/2006
101 //! @SYMTestCaseDesc LockDrive() function test. Passing ROM drive index as parameter.
102 //! Uses API elements: LockDrive().
103 //! @SYMTestActions 1. Call Connect().
104 //! 2. Call LockDrive() passing ROM drive's number.
106 //! @SYMTestStatus Implemented
107 //! @SYMTestPriority High
108 //! @SYMTestExpectedResults Function LockDrive() returns KErrNotSupported.
110 START_TEST_BLOCK 100 T_Sfsrv \base\PBASE-F32-RFS-PublicApi-ROM.ini
111 CREATE_OBJECT RFs RFs1
114 COMMAND !Error=-5 RFs1 LockDrive PBASE-F32-RFS-PublicApi-1040-001-LockDrive_command03
118 END_TESTCASE PBASE-F32-RFS-PublicApi-1040
121 START_TESTCASE PBASE-F32-RFS-PublicApi-1042
122 //! @SYMTestCaseID PBASE-F32-RFS-PublicApi-1042
124 //! @SYMAuthor Anton Grober
125 //! @SYMCreationDate 02/10/2006
126 //! @SYMTestCaseDesc ReserveDriveSpace() function test. Passing non-writeable drive number as parameter.
127 //! Uses API elements: ReserveDriveSpace().
128 //! @SYMTestActions 1. Call Connect().
129 //! 2. Call ReserveDriveSpace() passing non-writeable drives number as drive number parameter.
131 //! @SYMTestStatus Implemented
132 //! @SYMTestPriority High
133 //! @SYMTestExpectedResults Function ReserveDriveSpace() returns KErrDiskFull.
135 START_TEST_BLOCK 100 T_Sfsrv \base\PBASE-F32-RFS-PublicApi-ROM.ini
136 CREATE_OBJECT RFs RFs1
139 COMMAND !Error=-26 RFs1 ReserveDriveSpace PBASE-F32-RFS-PublicApi-1042-001-ReserveDriveSpace_command03
143 END_TESTCASE PBASE-F32-RFS-PublicApi-1042
146 START_TESTCASE PBASE-F32-RFS-PublicApi-1060
147 //! @SYMTestCaseID PBASE-F32-RFS-PublicApi-1060
149 //! @SYMAuthor Anton Grober
150 //! @SYMCreationDate 24/01/2007
151 //! @SYMTestCaseDesc Subst() test passing a mounted drive as paramater.
152 //! Uses API elements: Subst().
153 //! @SYMTestActions 1. Call Connect().
154 //! 2. Call Subst() passing ROM-drive index and some path as second parameter.
156 //! @SYMTestStatus Implemented
157 //! @SYMTestPriority Critical
158 //! @SYMTestExpectedResults Function Subst() returns empty string through reference.
160 START_TEST_BLOCK 100 T_Sfsrv \base\PBASE-F32-RFS-PublicApi-ROM.ini
161 CREATE_OBJECT RFs RFs1
164 COMMAND RFs1 Subst PBASE-F32-RFS-PublicApi-1060-001-Subst_command03
168 END_TESTCASE PBASE-F32-RFS-PublicApi-1060
171 START_TESTCASE PBASE-F32-RFS-PublicApi-1066
172 //! @SYMTestCaseID PBASE-F32-RFS-PublicApi-1066
174 //! @SYMCreationDate 22/08/2006
175 //! @SYMTestCaseDesc ErasePassword() test. Passing drive's number which doesn't support locking.
176 //! Uses API elements: ErasePassword()
177 //! @SYMTestActions 1. Call Connect().
178 //! 2. Call ErasePassword() passing some drive's number which doesn't supported locking.
180 //! @SYMTestStatus Implemented
181 //! @SYMTestPriority High
182 //! @SYMTestExpectedResults Function ErasePassword() returns KErrNotSupported.
184 START_TEST_BLOCK 100 T_Sfsrv \base\PBASE-F32-RFS-PublicApi-ROM.ini
185 CREATE_OBJECT RFs RFs1
188 COMMAND !Error=-5 RFs1 ErasePassword PBASE-F32-RFS-PublicApi-1066-001-ErasePassword_command03
192 END_TESTCASE PBASE-F32-RFS-PublicApi-1066
195 START_TESTCASE PBASE-F32-RFS-PublicApi-1071
196 //! @SYMTestCaseID PBASE-F32-RFS-PublicApi-1071
198 //! @SYMCreationDate 22/08/2006
199 //! @SYMTestCaseDesc ClearPassword() test.
200 //! Uses API elements: ClearPassword()
201 //! @SYMTestActions 1. Call Connect().
202 //! 2. Call ClearPassword() passing some drive's number which doesn't supported locking.
204 //! @SYMTestStatus Implemented
205 //! @SYMTestPriority High
206 //! @SYMTestExpectedResults Function ClearPassword() returns KErrNotSupported.
208 START_TEST_BLOCK 100 T_Sfsrv \base\PBASE-F32-RFS-PublicApi-ROM.ini
209 CREATE_OBJECT RFs RFs1
212 COMMAND !Error=-5 RFs1 ClearPassword PBASE-F32-RFS-PublicApi-1071-001-ClearPassword_command03
216 END_TESTCASE PBASE-F32-RFS-PublicApi-1071
219 START_TESTCASE PBASE-F32-RFS-PublicApi-1077
220 //! @SYMTestCaseID PBASE-F32-RFS-PublicApi-1077
222 //! @SYMCreationDate 22/08/2006
223 //! @SYMTestCaseDesc UnlockDrive() test. Testing with drive doesn't support locking.
224 //! Uses API elements: UnlockDrive()
225 //! @SYMTestActions 1. Call Connect().
226 //! 2. Call UnlockDrive() passing some drive's number which doesn't supported locking and 'test' as password.
228 //! @SYMTestStatus Implemented
229 //! @SYMTestPriority High
230 //! @SYMTestExpectedResults Function UnlockDrive() returns KErrNotSupported.
232 START_TEST_BLOCK 100 T_Sfsrv \base\PBASE-F32-RFS-PublicApi-ROM.ini
233 CREATE_OBJECT RFs RFs1
236 COMMAND !Error=-5 RFs1 UnlockDrive PBASE-F32-RFS-PublicApi-1077-001-UnlockDrive_command03
240 END_TESTCASE PBASE-F32-RFS-PublicApi-1077
243 START_TESTCASE PBASE-F32-RFS-PublicApi-1090
244 //! @SYMTestCaseID PBASE-F32-RFS-PublicApi-1090
246 //! @SYMAuthor Anton Grober
247 //! @SYMCreationDate 8/03/2007
248 //! @SYMTestCaseDesc SetSubst() functions test. Passing ROM drive index as second parameter and existing path to folder as second parameter.
249 //! Uses API elements: SetSubst().
250 //! @SYMTestActions 1. Call Connect().
251 //! 2. Call SetSubst() passing "ROMDriveTestPath:\base\" as a first parameter and non-mounted valid drive's number as a drive number.
252 //! 3. Check that function returned KErrNone.
253 //! 4. Call SetSubst() passing ""(empty descriptor) as a first parameter and non-mounted valid drive's number as a drive number. This will unsubst the substed.
255 //! @SYMTestStatus Implemented
256 //! @SYMTestPriority Critical
257 //! @SYMTestExpectedResults Function SetSubst() returns KErrNone.
259 START_TEST_BLOCK 100 T_Sfsrv \base\PBASE-F32-RFS-PublicApi-ROM.ini
260 CREATE_OBJECT RFs RFs1
263 COMMAND RFs1 SetSubst PBASE-F32-RFS-PublicApi-1090-001-SetSubst_command03
264 COMMAND RFs1 SetSubst PBASE-F32-RFS-PublicApi-1090-001-SetSubst_command04
268 END_TESTCASE PBASE-F32-RFS-PublicApi-1090
271 START_TESTCASE PBASE-F32-RFS-PublicApi-3012
272 //! @SYMTestCaseID PBASE-F32-RFS-PublicApi-3012
274 //! @SYMTestCaseDesc Function IsRomAddress() test.
275 //! Uses API elements: IsFileInRom(), IsRomAddress().
276 //! @SYMTestActions 1. Call Connect().
277 //! 2. Call IsFileInRom(), get address of "<ROMDriveChar>:\base\T_Sfsrv\test_rom.txt"
278 //! 3. Call IsRomAddress(), pass address that was got by IsFileInRom as parameter and check that file in rom.
280 //! @SYMTestStatus Implemented
281 //! @SYMTestPriority Critical
282 //! @SYMTestExpectedResults File is located in rom.
284 START_TEST_BLOCK 100 T_Sfsrv \base\PBASE-F32-RFS-PublicApi-ROM.ini
285 CREATE_OBJECT RFs RFs1
288 COMMAND RFs1 IsFileInRom PBASE-F32-RFS-PublicApi-3012-001-IsFileInRom_command03
289 COMMAND RFs1 IsRomAddress PBASE-F32-RFS-PublicApi-3012-001-IsRomAddress_command04
293 END_TESTCASE PBASE-F32-RFS-PublicApi-3012
295 START_TESTCASE PBASE-F32-RFS-PublicApi-0019
296 //! @SYMTestCaseID PBASE-F32-RFS-PublicApi-0019
298 //! @SYMTestCaseDesc Function FileSystemSubType() test with ROM drive.
299 //! Uses API elements: FileSystemSubType().
300 //! @SYMTestActions 1. Call Connect() method.
301 //! 2. Call FileSystemSubType() passing the ROM drive number as argument. Check that aName parameter is set to "Win32" under WINSCW and to "Rom" under ARMv5.
302 //! 3. Call Close() method.
303 //! @SYMTestStatus Implemented
304 //! @SYMTestPriority Critical
305 //! @SYMTestExpectedResults FileSystemSubType() returns KErrNone and the real sub type name of the file system through the aName output argument.
307 START_TEST_BLOCK 100 T_Sfsrv \base\PBASE-F32-RFS-PublicApi-ROM.ini
308 CREATE_OBJECT RFs RFs1
311 COMMAND RFs1 FileSystemSubType PBASE-F32-RFS-PublicApi-0019-001-FileSystemSubType_command03
315 END_TESTCASE PBASE-F32-RFS-PublicApi-0019
318 START_TESTCASE PBASE-F32-RFS-PublicApi-3016
319 //! @SYMTestCaseID PBASE-F32-RFS-PublicApi-3016
321 //! @SYMTestCaseDesc Function InitialisePropertiesFile() test.
322 //! Uses API elements: InitialisePropertiesFile().
323 //! @SYMTestActions 1. Call Connect().
324 //! 2. Call InitialisePropertiesFile() and pass "<ROMDriveChar>:\base\T_Sfsrv\test_rom.txt" as argument.
326 //! @SYMTestStatus Implemented
327 //! @SYMTestPriority Critical
328 //! @SYMTestExpectedResults KErrPermissionDenied, because can only be called from the ESTART process.
330 START_TEST_BLOCK 100 T_Sfsrv \base\PBASE-F32-RFS-PublicApi-ROM.ini
331 CREATE_OBJECT RFs RFs1
334 COMMAND !Error=-46 RFs1 InitialisePropertiesFile PBASE-F32-RFS-PublicApi-3016-001-InitialisePropertiesFile_command03
338 END_TESTCASE PBASE-F32-RFS-PublicApi-3016