author | Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com> |
Thu, 07 Jan 2010 13:38:45 +0200 | |
changeset 6 | 0173bcd7697c |
parent 2 | 4122176ea935 |
permissions | -rw-r--r-- |
0 | 1 |
// |
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 |
|
2
4122176ea935
Revision: 200948 + Removing redundant base integration tests and fixing build errors
John Imhofe <john.imhofe@nokia.com>
parents:
0
diff
changeset
|
5 |
// under the terms of "Eclipse Public License v1.0" |
0 | 6 |
// which accompanies this distribution, and is available |
7 |
// at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
8 |
// |
|
9 |
// Initial Contributors: |
|
10 |
// Nokia Corporation - initial contribution. |
|
11 |
// |
|
12 |
// Contributors: |
|
13 |
// |
|
2
4122176ea935
Revision: 200948 + Removing redundant base integration tests and fixing build errors
John Imhofe <john.imhofe@nokia.com>
parents:
0
diff
changeset
|
14 |
// Description: |
0 | 15 |
// |
16 |
//! @file |
|
17 |
//! @SYMTestSuiteName pbase-f32-sfsrv-publicapi-rem |
|
18 |
//! @SYMScriptTestEnvironment This test script requires a basic ROM and a MMC card (128 MB recommended, not tested above that). |
|
19 |
//! @SYMScriptAuthor Alvar Udras, Runno Sgirka |
|
20 |
//! @SYMScriptDescription The test script contains API tests for the following functions of RRawDisk class: |
|
21 |
//! TInt Open(RFs &aFs, TInt aDrive); |
|
22 |
//! void Close(); |
|
23 |
//! TInt Read(TInt64 aPos, TDes8 &aDes); |
|
24 |
//! TInt Write(TInt64 aPos, TDesC8 &aDes); |
|
25 |
//! The tests are containing risk, e.g. Write() method call can corrupt the boot sector or |
|
26 |
//! non-writable sector of the disc, which may corrupt the whole disk forever. |
|
27 |
||
28 |
||
29 |
LOAD_SUITE t_sfsrv |
|
30 |
DELAY 5000 |
|
31 |
||
32 |
START_TESTCASE PBASE-F32-RawDisk-PublicApi-0001 |
|
33 |
//! @SYMTestCaseID PBASE-F32-RawDisk-PublicApi-0001 |
|
34 |
//! @SYMAPI RRawDisk |
|
35 |
//! @SYMTestCaseDesc Functions Open() and Close() test. Open a disk channel and close it. |
|
36 |
//! Uses API elements: Open(), Close(). |
|
37 |
//! @SYMTestActions 1. Create a RFs session. |
|
38 |
//! 2. Connect the RFs session. |
|
39 |
//! 3. call Open(RFs &aFs, TInt aDrive) method to open a direct access channel to disk, passing fileserver session, removable |
|
40 |
//! drive as parameters. |
|
41 |
//! 4. Call Close() method to close the channel. |
|
42 |
//! 5. Close the RFs session. |
|
43 |
//! @SYMTestStatus Implemented |
|
44 |
//! @SYMTestPriority Critical |
|
45 |
//! @SYMTestExpectedResults The Open() method call is completed returning KErrNone. The Close() method call is completed without errors. |
|
46 |
//! @SYMTestType CIT |
|
47 |
START_TEST_BLOCK 100 t_sfsrv \base\PBASE-F32-RawDisk-PublicApi.ini |
|
48 |
CREATE_OBJECT RFs rfs1 |
|
49 |
CREATE_OBJECT RRawDisk rawdisk1 |
|
50 |
COMMAND rfs1 new |
|
51 |
COMMAND rfs1 Connect |
|
52 |
COMMAND rawdisk1 new |
|
53 |
COMMAND rawdisk1 Open PBASE-F32-RawDisk-PublicApi-0001-001-Open_command05 |
|
54 |
COMMAND rawdisk1 Close |
|
55 |
COMMAND rawdisk1 ~ |
|
56 |
COMMAND rfs1 Close |
|
57 |
COMMAND rfs1 ~ |
|
58 |
END_TEST_BLOCK |
|
59 |
END_TESTCASE PBASE-F32-RawDisk-PublicApi-0001 |
|
60 |
||
61 |
||
62 |
START_TESTCASE PBASE-F32-RawDisk-PublicApi-0002 |
|
63 |
//! @SYMTestCaseID PBASE-F32-RawDisk-PublicApi-0002 |
|
64 |
//! @SYMAPI RRawDisk |
|
65 |
//! @SYMTestCaseDesc Function Write() and Read() test. Open a disk channel, write to the disc, verify it by reading and close the channel. |
|
66 |
//! Uses API elements: Open(), Write(), Read(), Close(). |
|
67 |
//! @SYMTestActions 1. Create a RFs session. |
|
68 |
//! 2. Connect the RFs session. |
|
69 |
//! 3. Call Open(RFs &aFs, TInt aDrive) method to open a direct access channel to disk, passing fileserver session, removable |
|
70 |
//! drive as parameters. |
|
71 |
//! 4. Call Write(TInt64 aPos, TDes8 &aDes) method passing position 1024 and string 'Hello Big World!' to write |
|
72 |
//! as parameters. |
|
73 |
//! 5. Call Read(TInt64 aPos, TDes8 &aDes) method passing position 1024 and string 'Hello Big World!' for |
|
74 |
//! verification as parameters. |
|
75 |
//! 6. Call Close() method to close the disk. |
|
76 |
//! 7. Close the RFs session. |
|
77 |
//! @SYMTestStatus Implemented |
|
78 |
//! @SYMTestPriority Critical |
|
79 |
//! @SYMTestExpectedResults The Read() and Write() method calls are completed returning KErrNone. |
|
80 |
//! @SYMTestType CIT |
|
81 |
START_TEST_BLOCK 100 t_sfsrv \base\PBASE-F32-RawDisk-PublicApi.ini |
|
82 |
CREATE_OBJECT RFs rfs1 |
|
83 |
CREATE_OBJECT RRawDisk rawdisk1 |
|
84 |
COMMAND rfs1 new |
|
85 |
COMMAND rfs1 Connect |
|
86 |
COMMAND rawdisk1 new |
|
87 |
COMMAND rawdisk1 Open PBASE-F32-RawDisk-PublicApi-0002-001-Open_command05 |
|
88 |
COMMAND rawdisk1 Write PBASE-F32-RawDisk-PublicApi-0002-001-Write_command06 |
|
89 |
COMMAND rawdisk1 Read PBASE-F32-RawDisk-PublicApi-0002-001-Read_command07 |
|
90 |
COMMAND rawdisk1 Close |
|
91 |
COMMAND rawdisk1 ~ |
|
92 |
COMMAND rfs1 Close |
|
93 |
COMMAND rfs1 ~ |
|
94 |
END_TEST_BLOCK |
|
95 |
END_TESTCASE PBASE-F32-RawDisk-PublicApi-0002 |
|
96 |
||
97 |
||
98 |
START_TESTCASE PBASE-F32-RawDisk-PublicApi-0003 |
|
99 |
//! @SYMTestCaseID PBASE-F32-RawDisk-PublicApi-0003 |
|
100 |
//! @SYMAPI RRawDisk |
|
101 |
//! @SYMTestCaseDesc Function Write() and Read() test. Open a disk channel, write and read an empty string and close the channel. |
|
102 |
//! Uses API elements: Open(), Write(), Read(), Close(). |
|
103 |
//! @SYMTestActions 1. Create a RFs session. |
|
104 |
//! 2. Connect the RFs session. |
|
105 |
//! 3. Call Open(RFs &aFs, TInt aDrive) method to open a direct access channel to disk, passing fileserver session, removable |
|
106 |
//! drive as parameters. |
|
107 |
//! 4. Call Write(TInt64 aPos, TDes8 &aDes) method passing position 1024 and empty string to write |
|
108 |
//! as parameters. |
|
109 |
//! 5. Call Read(TInt64 aPos, TDes8 &aDes) method passing position 1024 and empty string for |
|
110 |
//! verification as parameters. |
|
111 |
//! 6. Call Close() method to close the disk. |
|
112 |
//! 7. Close the RFs session. |
|
113 |
//! @SYMTestStatus Implemented |
|
114 |
//! @SYMTestPriority Critical |
|
115 |
//! @SYMTestExpectedResults The Read() and Write() method calls are completed returning KErrNone. |
|
116 |
//! @SYMTestType CIT |
|
117 |
START_TEST_BLOCK 100 t_sfsrv \base\PBASE-F32-RawDisk-PublicApi.ini |
|
118 |
CREATE_OBJECT RFs rfs1 |
|
119 |
CREATE_OBJECT RRawDisk rawdisk1 |
|
120 |
COMMAND rfs1 new |
|
121 |
COMMAND rfs1 Connect |
|
122 |
COMMAND rawdisk1 new |
|
123 |
COMMAND rawdisk1 Open PBASE-F32-RawDisk-PublicApi-0003-001-Open_command05 |
|
124 |
COMMAND rawdisk1 Write PBASE-F32-RawDisk-PublicApi-0003-001-Write_command06 |
|
125 |
COMMAND rawdisk1 Read PBASE-F32-RawDisk-PublicApi-0003-001-Read_command07 |
|
126 |
COMMAND rawdisk1 Close |
|
127 |
COMMAND rawdisk1 ~ |
|
128 |
COMMAND rfs1 Close |
|
129 |
COMMAND rfs1 ~ |
|
130 |
END_TEST_BLOCK |
|
131 |
END_TESTCASE PBASE-F32-RawDisk-PublicApi-0003 |
|
132 |
||
133 |
||
134 |
// ************************ |
|
135 |
// *** NEGATIVE TESTS *** |
|
136 |
// ************************ |
|
137 |
||
138 |
||
139 |
START_TESTCASE PBASE-F32-RawDisk-PublicApi-1007 |
|
140 |
//! @SYMTestCaseID PBASE-F32-RawDisk-PublicApi-1007 |
|
141 |
//! @SYMAPI RRawDisk |
|
142 |
//! @SYMTestCaseDesc Test that checks that no other resources can access the disk while direct access to it is in effect. |
|
143 |
//! Uses API elements: Open(), Close(). |
|
144 |
//! @SYMTestActions 1. Create a RFs session. |
|
145 |
//! 2. Connect the RFs session. |
|
146 |
//! 3. Call Open(RFs &aFs, TInt aDrive) method to open a direct access channel to disk, passing fileserver session, removable |
|
147 |
//! drive as parameters. |
|
148 |
//! 4. Create a RFile instance, passing fileserver session, EFileShareAny and {removable drive path}test03.txt as parameters. |
|
149 |
//! 5. Close the RFile instance. |
|
150 |
//! 6. Call Close() method to close the channel. |
|
151 |
//! 7. Format the disk for future usage. |
|
152 |
//! 8. Close the RFs session. |
|
153 |
//! @SYMTestStatus Implemented |
|
154 |
//! @SYMTestPriority Critical |
|
155 |
//! @SYMTestExpectedResults The RFormat::Open() method call returns error -14 (KErrInUse). |
|
156 |
//! @SYMTestType CIT |
|
157 |
START_TEST_BLOCK 100 t_sfsrv \base\PBASE-F32-RawDisk-PublicApi.ini |
|
158 |
CREATE_OBJECT RFs rfs1 |
|
159 |
CREATE_OBJECT RRawDisk rawdisk1 |
|
160 |
CREATE_OBJECT RFile file |
|
161 |
COMMAND rfs1 new |
|
162 |
COMMAND rfs1 Connect |
|
163 |
COMMAND rawdisk1 new |
|
164 |
COMMAND rawdisk1 Open PBASE-F32-RawDisk-PublicApi-1007-001-Open_command05 |
|
165 |
COMMAND file new |
|
166 |
COMMAND !Error=-14 file Create PBASE-F32-RawDisk-PublicApi-1007-001-Create_command07 |
|
167 |
COMMAND file Close |
|
168 |
COMMAND file ~ |
|
169 |
COMMAND rawdisk1 Close |
|
170 |
COMMAND rawdisk1 ~ |
|
171 |
COMMAND rfs1 Close |
|
172 |
COMMAND rfs1 ~ |
|
173 |
END_TEST_BLOCK |
|
174 |
END_TESTCASE PBASE-F32-RawDisk-PublicApi-1007 |
|
175 |
||
176 |
||
177 |
START_TESTCASE PBASE-F32-RawDisk-PublicApi-1008 |
|
178 |
//! @SYMTestCaseID PBASE-F32-RawDisk-PublicApi-1008 |
|
179 |
//! @SYMAPI RRawDisk |
|
180 |
//! @SYMTestCaseDesc Function Open() test. Call Open() after opening a resource on the disk. |
|
181 |
//! Uses API elements: Open(), Close(). |
|
182 |
//! @SYMTestActions 1. Create a RFs session. |
|
183 |
//! 2. Connect the RFs session. |
|
184 |
//! 3. Open an RFormat instance, passing fileserver session, removable drive and EHighDensity as parameters. |
|
185 |
//! 4. Call Open(RFs &aFs, TInt aDrive) method to open a direct access channel to disk, passing fileserver session, removable |
|
186 |
//! drive as parameters. |
|
187 |
//! 5. Call Close() method to close the channel. |
|
188 |
//! 6. Close the RFormat instance. |
|
189 |
//! 7. Format the disk for future usage. |
|
190 |
//! 8. Close the RFs session. |
|
191 |
//! @SYMTestStatus Implemented |
|
192 |
//! @SYMTestPriority Critical |
|
193 |
//! @SYMTestExpectedResults The Open() method call returns error -14 (KErrInUse). |
|
194 |
//! @SYMTestType CIT |
|
195 |
START_TEST_BLOCK 100 t_sfsrv \base\PBASE-F32-RawDisk-PublicApi.ini |
|
196 |
CREATE_OBJECT RFs rfs1 |
|
197 |
CREATE_OBJECT RRawDisk rawdisk1 |
|
198 |
CREATE_OBJECT RFormat format1 |
|
199 |
COMMAND rfs1 new |
|
200 |
COMMAND rfs1 Connect |
|
201 |
COMMAND format1 new |
|
202 |
COMMAND format1 Open PBASE-F32-RawDisk-PublicApi-1008-001-Open_command05 |
|
203 |
COMMAND rawdisk1 new |
|
204 |
COMMAND !Error=-14 rawdisk1 Open PBASE-F32-RawDisk-PublicApi-1008-001-Open_command07 |
|
205 |
COMMAND format1 Close |
|
206 |
COMMAND format1 ~ |
|
207 |
COMMAND rawdisk1 Close |
|
208 |
COMMAND rawdisk1 ~ |
|
209 |
COMMAND rfs1 Close |
|
210 |
COMMAND rfs1 ~ |
|
211 |
END_TEST_BLOCK |
|
212 |
END_TESTCASE PBASE-F32-RawDisk-PublicApi-1008 |
|
213 |
||
214 |
||
215 |
START_TESTCASE PBASE-F32-RawDisk-PublicApi-1009 |
|
216 |
//! @SYMTestCaseID PBASE-F32-RawDisk-PublicApi-1009 |
|
217 |
//! @SYMAPI RRawDisk |
|
218 |
//! @SYMTestCaseDesc Test that checks that calling Close() allows other resources to access the disk. |
|
219 |
//! Uses API elements: Open(), Close(). |
|
220 |
//! @SYMTestActions 1. Create a RFs session. |
|
221 |
//! 2. Connect the RFs session. |
|
222 |
//! 3. Call Open(RFs &aFs, TInt aDrive) method to open a direct access channel to disk, passing fileserver session, removable |
|
223 |
//! drive as parameters. |
|
224 |
//! 4. Call Close() method to close the channel. |
|
225 |
//! 5. Open an RFormat instance, passing fileserver session, removable drive and EHighDensity as parameters. |
|
226 |
//! 6. Close the RFormat instance. |
|
227 |
//! 7. Close the RFs session. |
|
228 |
//! @SYMTestStatus Implemented |
|
229 |
//! @SYMTestPriority Critical |
|
230 |
//! @SYMTestExpectedResults The RFormat instance can access the disk without errors. |
|
231 |
//! @SYMTestType CIT |
|
232 |
START_TEST_BLOCK 100 t_sfsrv \base\PBASE-F32-RawDisk-PublicApi.ini |
|
233 |
CREATE_OBJECT RFs rfs1 |
|
234 |
CREATE_OBJECT RRawDisk rawdisk1 |
|
235 |
CREATE_OBJECT RFormat format1 |
|
236 |
COMMAND rfs1 new |
|
237 |
COMMAND rfs1 Connect |
|
238 |
COMMAND rawdisk1 new |
|
239 |
COMMAND rawdisk1 Open PBASE-F32-RawDisk-PublicApi-1009-001-Open_command05 |
|
240 |
COMMAND rawdisk1 Close |
|
241 |
COMMAND rawdisk1 ~ |
|
242 |
COMMAND format1 new |
|
243 |
COMMAND format1 Open PBASE-F32-RawDisk-PublicApi-1009-001-Open_command09 |
|
244 |
COMMAND format1 Close |
|
245 |
COMMAND format1 ~ |
|
246 |
COMMAND rfs1 Close |
|
247 |
COMMAND rfs1 ~ |
|
248 |
END_TEST_BLOCK |
|
249 |
END_TESTCASE PBASE-F32-RawDisk-PublicApi-1009 |
|
250 |
||
251 |
||
252 |
START_TESTCASE PBASE-F32-RawDisk-PublicApi-1010 |
|
253 |
//! @SYMTestCaseID PBASE-F32-RawDisk-PublicApi-1010 |
|
254 |
//! @SYMAPI RRawDisk |
|
255 |
//! @SYMTestCaseDesc Function Write() test. Open a disk channel, write to the disc, while starting writing from a negative position. |
|
256 |
//! Uses API elements: Open(), Write(), Close(). |
|
257 |
//! @SYMTestActions 1. Create a RFs session. |
|
258 |
//! 2. Connect the RFs session. |
|
259 |
//! 3. Call Open(RFs &aFs, TInt aDrive) method to open a direct access channel to disk, passing fileserver session, removable |
|
260 |
//! drive as parameters. |
|
261 |
//! 4. Call Write(TInt64 aPos, TDes8 &aDes) method passing -1 as position, string 'Hello World!' to write as parameters. |
|
262 |
//! 6. Call Close() method to close the disk. |
|
263 |
//! 7. Format the disk for future usage. |
|
264 |
//! 8. Close the RFs session. |
|
265 |
//! @SYMTestStatus Implemented |
|
266 |
//! @SYMTestPriority Critical |
|
267 |
//! @SYMTestExpectedResults The Write() method call returns error -6 (KErrArgument). |
|
268 |
//! @SYMTestType CIT |
|
269 |
START_TEST_BLOCK 100 t_sfsrv \base\PBASE-F32-RawDisk-PublicApi.ini |
|
270 |
CREATE_OBJECT RFs rfs1 |
|
271 |
CREATE_OBJECT RRawDisk rawdisk1 |
|
272 |
CREATE_OBJECT RFormat format1 |
|
273 |
COMMAND rfs1 new |
|
274 |
COMMAND rfs1 Connect |
|
275 |
COMMAND rawdisk1 new |
|
276 |
COMMAND rawdisk1 Open PBASE-F32-RawDisk-PublicApi-1010-001-Open_command05 |
|
277 |
COMMAND !Error=-6 rawdisk1 Write PBASE-F32-RawDisk-PublicApi-1010-001-Write_command06 |
|
278 |
COMMAND rawdisk1 Close |
|
279 |
COMMAND rawdisk1 ~ |
|
280 |
COMMAND format1 new |
|
281 |
COMMAND format1 Open PBASE-F32-RawDisk-PublicApi-1010-001-Open_command10 |
|
282 |
COMMAND format1 Next |
|
283 |
COMMAND format1 Close |
|
284 |
COMMAND format1 ~ |
|
285 |
COMMAND rfs1 Close |
|
286 |
COMMAND rfs1 ~ |
|
287 |
END_TEST_BLOCK |
|
288 |
END_TESTCASE PBASE-F32-RawDisk-PublicApi-1010 |
|
289 |
||
290 |
||
291 |
START_TESTCASE PBASE-F32-RawDisk-PublicApi-1011 |
|
292 |
//! @SYMTestCaseID PBASE-F32-RawDisk-PublicApi-1011 |
|
293 |
//! @SYMAPI RRawDisk |
|
294 |
//! @SYMTestCaseDesc Function Write() test. Open a disk channel, write to the disc, while starting writing from an out of range position. |
|
295 |
//! Uses API elements: Open(), Write(), Close(). |
|
296 |
//! @SYMTestActions 1. Create a RFs session. |
|
297 |
//! 2. Connect the RFs session. |
|
298 |
//! 3. Call Open(RFs &aFs, TInt aDrive) method to open a direct access channel to disk, passing fileserver session, removable |
|
299 |
//! drive as parameters. |
|
300 |
//! 4. Call Write(TInt64 aPos, TDes8 &aDes) method passing 10000000 as position, string 'Hello World!' as parameters. |
|
301 |
//! 6. Call Close() method to close the disk. |
|
302 |
//! 7. Format the disk for future usage. |
|
303 |
//! 8. Close the RFs session. |
|
304 |
//! @SYMTestStatus Implemented |
|
305 |
//! @SYMTestPriority Critical |
|
306 |
//! @SYMTestExpectedResults The Write() method call returns error -20 (KErrCorrupt). |
|
307 |
//! @SYMTestType CIT |
|
308 |
START_TEST_BLOCK 100 t_sfsrv \base\PBASE-F32-RawDisk-PublicApi.ini |
|
309 |
CREATE_OBJECT RFs rfs1 |
|
310 |
CREATE_OBJECT RRawDisk rawdisk1 |
|
311 |
CREATE_OBJECT RFormat format1 |
|
312 |
COMMAND rfs1 new |
|
313 |
COMMAND rfs1 Connect |
|
314 |
COMMAND rawdisk1 new |
|
315 |
COMMAND rawdisk1 Open PBASE-F32-RawDisk-PublicApi-1011-001-Open_command05 |
|
316 |
COMMAND !Error=-20 rawdisk1 Write PBASE-F32-RawDisk-PublicApi-1011-001-Write_command06 |
|
317 |
COMMAND rawdisk1 Close |
|
318 |
COMMAND rawdisk1 ~ |
|
319 |
COMMAND format1 new |
|
320 |
COMMAND format1 Open PBASE-F32-RawDisk-PublicApi-1011-001-Open_command10 |
|
321 |
COMMAND format1 Next |
|
322 |
COMMAND format1 Close |
|
323 |
COMMAND rfs1 Close |
|
324 |
COMMAND rfs1 ~ |
|
325 |
END_TEST_BLOCK |
|
326 |
END_TESTCASE PBASE-F32-RawDisk-PublicApi-1011 |
|
327 |
||
328 |
||
329 |
START_TESTCASE PBASE-F32-RawDisk-PublicApi-1012 |
|
330 |
//! @SYMTestCaseID PBASE-F32-RawDisk-PublicApi-1012 |
|
331 |
//! @SYMAPI RRawDisk |
|
332 |
//! @SYMTestCaseDesc Function Read() test. Open a disk channel, read from disc, starting reading from a negative position, and close the channel. |
|
333 |
//! Uses API elements: Open(), Read(), Close(). |
|
334 |
//! @SYMTestActions 1. Create a RFs session. |
|
335 |
//! 2. Connect the RFs session. |
|
336 |
//! 3. Call Open(RFs &aFs, TInt aDrive) method to open a direct access channel to disk, passing fileserver session, removable |
|
337 |
//! drive as parameters. |
|
338 |
//! 4. Call Read(TInt64 aPos, TDes8 &aDes) method passing -1 as position, string 'Hello World!' as parameters. |
|
339 |
//! 5. Call Close() method to close the disk. |
|
340 |
//! 6. Close the RFs session. |
|
341 |
//! @SYMTestStatus Implemented |
|
342 |
//! @SYMTestPriority Critical |
|
343 |
//! @SYMTestExpectedResults The Read() method call returns error -6 (KErrArgument). |
|
344 |
//! @SYMTestType CIT |
|
345 |
START_TEST_BLOCK 100 t_sfsrv \base\PBASE-F32-RawDisk-PublicApi.ini |
|
346 |
CREATE_OBJECT RFs rfs1 |
|
347 |
CREATE_OBJECT RRawDisk rawdisk1 |
|
348 |
COMMAND rfs1 new |
|
349 |
COMMAND rfs1 Connect |
|
350 |
COMMAND rawdisk1 new |
|
351 |
COMMAND rawdisk1 Open PBASE-F32-RawDisk-PublicApi-1012-001-Open_command05 |
|
352 |
COMMAND !Error=-6 rawdisk1 Read PBASE-F32-RawDisk-PublicApi-1012-001-Read_command06 |
|
353 |
COMMAND rawdisk1 Close |
|
354 |
COMMAND rawdisk1 ~ |
|
355 |
COMMAND rfs1 Close |
|
356 |
COMMAND rfs1 ~ |
|
357 |
END_TEST_BLOCK |
|
358 |
END_TESTCASE PBASE-F32-RawDisk-PublicApi-1012 |
|
359 |
||
360 |
||
361 |
START_TESTCASE PBASE-F32-RawDisk-PublicApi-1013 |
|
362 |
//! @SYMTestCaseID PBASE-F32-RawDisk-PublicApi-1013 |
|
363 |
//! @SYMAPI RRawDisk |
|
364 |
//! @SYMTestCaseDesc Function Read() test. Open a disk channel, read from disc, starting reading from an out of range position, |
|
365 |
//! and close the channel. |
|
366 |
//! Uses API elements: Open(), Read(), Close(). |
|
367 |
//! @SYMTestActions 1. Create a RFs session. |
|
368 |
//! 2. Connect the RFs session. |
|
369 |
//! 3. Call Open(RFs &aFs, TInt aDrive) method to open a direct access channel to disk, passing fileserver session, removable |
|
370 |
//! drive as parameters. |
|
371 |
//! 4. Call Read(TInt64 aPos, TDes8 &aDes) method passing 10000000 as position, string 'Hello World!' as parameters. |
|
372 |
//! 5. Call Close() method to close the disk. |
|
373 |
//! 6. Close the RFs session. |
|
374 |
//! @SYMTestStatus Implemented |
|
375 |
//! @SYMTestPriority Critical |
|
376 |
//! @SYMTestExpectedResults The Read() method call returns error -20 (KErrCorrupt). |
|
377 |
//! @SYMTestType CIT |
|
378 |
START_TEST_BLOCK 100 t_sfsrv \base\PBASE-F32-RawDisk-PublicApi.ini |
|
379 |
CREATE_OBJECT RFs rfs1 |
|
380 |
CREATE_OBJECT RRawDisk rawdisk1 |
|
381 |
COMMAND rfs1 new |
|
382 |
COMMAND rfs1 Connect |
|
383 |
COMMAND rawdisk1 new |
|
384 |
COMMAND rawdisk1 Open PBASE-F32-RawDisk-PublicApi-1013-001-Open_command05 |
|
385 |
COMMAND !Error=-20 rawdisk1 Read PBASE-F32-RawDisk-PublicApi-1013-001-Read_command06 |
|
386 |
COMMAND rawdisk1 Close |
|
387 |
COMMAND rawdisk1 ~ |
|
388 |
COMMAND rfs1 Close |
|
389 |
COMMAND rfs1 ~ |
|
390 |
END_TEST_BLOCK |
|
391 |
END_TESTCASE PBASE-F32-RawDisk-PublicApi-1013 |