]>
Commit | Line | Data |
---|---|---|
11fdf7f2 TL |
1 | # PMEM bdev feature test plan |
2 | ||
3 | ## Objective | |
4 | The purpose of these tests is to verify possibility of using pmem bdev | |
5 | configuration in SPDK by running functional tests FIO traffic verification | |
6 | tests. | |
7 | ||
8 | ## Configuration | |
9 | Configuration in tests is to be done using example stub application | |
10 | (spdk/example/bdev/io/bdev_io). | |
11 | All possible management is done using RPC calls with the exception of | |
12 | use of split bdevs which have to be configured in .conf file. | |
13 | ||
14 | Functional tests are executed as scenarios - sets of smaller test steps | |
15 | in which results and return codes of RPC calls are validated. | |
16 | Some configuration calls may also additionally be validated | |
17 | by use of "get" (e.g. get_bdevs) RPC calls, which provide additional | |
18 | information for veryfing results. | |
19 | In some steps additional write/read operations will be performed on | |
20 | PMEM bdevs in order to check IO path correct behavior. | |
21 | ||
22 | FIO traffic verification tests will serve as integration tests and will | |
23 | be executed to config correct behavior of PMEM bdev when working with vhost, | |
24 | nvmf_tgt and iscsi_tgt applications. | |
25 | ||
26 | ## Functional tests | |
27 | ||
28 | ### pmem_pool_info | |
29 | ||
30 | #### pmem_pool_info_tc1 | |
31 | Negative test for checking pmem pool file. | |
32 | Call with missing path argument. | |
33 | Steps & expected results: | |
34 | - Call pmem_pool_info with missing path argument | |
35 | - Check that return code != 0 and error code = | |
36 | ||
37 | #### pmem_pool_info_tc2 | |
38 | Negative test for checking pmem pool file. | |
39 | Call with non-existant path argument. | |
40 | Steps & expected results: | |
41 | - Call pmem_pool_info with path argument that points to not existing file. | |
42 | - Check that return code != 0 and error code = ENODEV | |
43 | ||
44 | #### pmem_pool_info_tc3 | |
45 | Negative test for checking pmem pool file. | |
46 | Call with other type of pmem pool file. | |
47 | Steps & expected results: | |
48 | - Using pmem utility tools create pool of OBJ type instead of BLK | |
49 | (if needed utility tools are not available - create random file in filesystem) | |
50 | - Call pmem_pool_info and point to file created in previous step. | |
51 | - Check that return code != 0 and error code = ENODEV | |
52 | ||
53 | #### pmem_pool_info_tc4 | |
54 | Positive test for checking pmem pool file. | |
55 | Call with existing pmem pool file. | |
56 | Steps & expected results: | |
57 | - Call pmem_pool_info with path argument that points to existing file. | |
58 | - Check that return code == 0 | |
59 | ||
60 | ### create_pmem_pool | |
61 | From libpmemblk documentation: | |
62 | - PMEM block size has to be bigger than 512 internal blocks; if lower value | |
63 | is used then PMEM library will silently round it up to 512 which is defined | |
64 | in pmem/libpmemblk.h file as PMEMBLK_MIN_BLK. | |
65 | - Total pool size cannot be less than 16MB which is defined i | |
66 | pmem/libpmemblk.h file as PMEMBLK_MIN_POOL | |
67 | - Total number of segments in PMEP pool file cannot be less than 256 | |
68 | ||
69 | #### create_pmem_pool_tc1 | |
70 | Negative test case for creating a new pmem. | |
71 | Call create_pmem_pool with missing arguments. | |
72 | Steps & expected results: | |
73 | - call create_pmem_pool without path argument | |
74 | - call return code != 0 | |
75 | - call pmem_pool_info and check that pmem pool file was not created | |
76 | - call return code != 0 | |
77 | - call create_pmem_pool with path but without size and block size arguments | |
78 | - call return code != 0 | |
79 | - call pmem_pool_info and check that pmem pool file was not created | |
80 | - call return code != 0 | |
81 | - call create_pmem_pool with path and size but without block size arguments | |
82 | - call return code != 0 | |
83 | - call pmem_pool_info and check that pmem pool file was not created | |
84 | - call return code != 0 | |
85 | ||
86 | #### create_pmem_pool_tc2 | |
87 | Negative test case for creating a new pmem. | |
88 | Call create_pmem_pool with non existing path argument. | |
89 | Steps & expected results: | |
90 | - call create_pmem_pool with path that does not exist | |
91 | - call return code != 0 | |
92 | - call pmem_pool_info and check that pmem pool file was not created | |
93 | - call return code != 0 | |
94 | ||
95 | #### create_pmem_pool_tc3 | |
96 | Positive test case for creating a new pmem pool on disk space. | |
97 | Steps & expected results: | |
98 | - call create_pmem_pool with correct path argument, | |
99 | blocksize=512 and total size=256MB | |
100 | - call return code = 0 | |
101 | - call pmem_pool_info and check that pmem file was created | |
102 | - call return code = 0 | |
103 | - call delete_pmem_pool on previously created pmem | |
104 | - return code = 0 and no error code | |
105 | ||
106 | #### create_pmem_pool_tc4 | |
107 | Positive test case for creating a new pmem pool in RAM space. | |
108 | # TODO: Research test steps for creating a pool in RAM!!! | |
109 | Steps & expected results: | |
110 | - call create_pmem_pool with correct path argument, | |
111 | blocksize=512 and total size=256MB | |
112 | - call return code = 0 | |
113 | - call pmem_pool_info and check that pmem file was created | |
114 | - call return code = 0 | |
115 | - call delete_pmem_pool on previously created pmem | |
116 | - return code = 0 and no error code | |
117 | ||
118 | #### create_pmem_pool_tc5 | |
119 | Negative test case for creating two pmems with same path. | |
120 | Steps & expected results: | |
121 | - call create_pmem_pool with correct path argument, | |
122 | blocksize=512 and total size=256MB | |
123 | - call return code = 0 | |
124 | - call pmem_pool_info and check that pmem file was created | |
125 | - call return code = 0 | |
126 | - call create_pmem_pool with the same path argument as before, | |
127 | blocksize=4096 and total size=512MB | |
128 | - call return code != 0, error code = EEXIST | |
129 | - call create_pmem_pool and check that first pmem pool file is still | |
130 | available and not modified (block size and total size stay the same) | |
131 | - call return code = 0 | |
132 | - call delete_pmem_pool on first created pmem pool | |
133 | - return code =0 and no error code | |
134 | ||
135 | #### create_pmem_pool_tc6 | |
136 | Positive test case for creating pmem pool file with various block sizes. | |
137 | Steps & expected results: | |
138 | - call create_pmem_pool with correct path argument, total size=256MB | |
139 | with different block size arguments - 1, 511, 512, 513, 1024, 4096, 128k and 256k | |
140 | - call pmem_pool_info on each of created pmem pool and check if it was created; | |
141 | For pool files created with block size <512 their block size should be rounded up | |
142 | to 512; other pool files should have the same block size as specified in create | |
143 | command | |
144 | - call return code = 0; block sizes as expected | |
145 | - call delete_pmem_pool on all created pool files | |
146 | ||
147 | #### create_pmem_pool_tc7 | |
148 | Negative test case for creating pmem pool file with total size of less than 16MB. | |
149 | Steps & expected results: | |
150 | - call create_pmem_pool with correct path argument, block size=512 and | |
151 | total size less than 16MB | |
152 | - return code !=0 and error code !=0 | |
153 | - call pmem_pool_info to verify pmem pool file was not created | |
154 | - return code = 0 | |
155 | ||
156 | #### create_pmem_pool_tc8 | |
157 | Negative test case for creating pmem pool file with less than 256 blocks. | |
158 | Steps & expected results: | |
159 | - call create_pmem_pool with correct path argument, block size=128k and | |
160 | total size=30MB | |
161 | - return code !=0 and error code !=0 | |
162 | - call pmem_pool_info to verify pmem pool file was not created | |
163 | - return code = 0 | |
164 | ||
165 | ### delete_pmem_pool | |
166 | ||
167 | #### delete_pmem_pool_tc1 | |
168 | Negative test case for deleting a pmem. | |
169 | Call delete_pmem_pool on non-exisiting pmem. | |
170 | Steps & expected results: | |
171 | - call delete_pmem_pool on non-existing pmem. | |
172 | - return code !=0 and error code = ENOENT | |
173 | ||
174 | #### delete_pmem_pool_tc2 | |
175 | Negative test case for deleting a pmem. | |
176 | Call delete_pmem_pool on a file of wrong type | |
177 | Steps & expected results: | |
178 | - Using pmem utility tools create pool of OBJ type instead of BLK | |
179 | (if needed utility tools are not available - create random file in filesystem) | |
180 | - Call delete_pmem_pool and point to file created in previous step. | |
181 | - return code !=0 and error code = ENOTBLK | |
182 | ||
183 | #### delete_pmem_pool_tc3 | |
184 | Positive test case for creating and deleting a pemem. | |
185 | Steps & expected results: | |
186 | - call create_pmem_pool with correct arguments | |
187 | - return code = 0 and no error code | |
188 | - using pmem_pool_info check that pmem was created | |
189 | - return code = 0 and no error code | |
190 | - call delete_pmem_pool on previously created pmem | |
191 | - return code = 0 and no error code | |
192 | - using pmem_pool_info check that pmem no longer exists | |
193 | - return code !=0 and error code = ENODEV | |
194 | ||
195 | #### delete_pmem_pool_tc4 | |
196 | Negative test case for creating and deleting a pemem. | |
197 | Steps & expected results: | |
198 | - run scenario from test case 3 | |
199 | - call delete_pmem_pool on already deleted pmem pool | |
200 | - return code !=0 and error code = ENODEV | |
201 | ||
202 | ### construct_pmem_bdev | |
203 | ||
204 | #### construct_pmem_bdev_tc1 | |
205 | Negative test for constructing new pmem bdev. | |
206 | Call create_pmem_bdev with missing argument. | |
207 | Steps & expected results: | |
208 | - Call construct_pmem_bdev with missing path argument. | |
209 | - Check that return code != 0 | |
210 | ||
211 | #### construct_pmem_bdev_tc2 | |
212 | Negative test for constructing new pmem bdev. | |
213 | Call construct_pmem_bdev with not existing path argument. | |
214 | Steps & expected results: | |
215 | - call construct_pmem_bdev with incorrect (not existing) path | |
216 | - call return code != 0 and error code = ENODEV | |
217 | - using get_bdevs check that no pmem bdev was created | |
218 | ||
219 | #### construct_pmem_bdev_tc3 | |
220 | Negative test for constructing pmem bdevs with random file instead of pmemblk pool. | |
221 | Steps & expected results: | |
222 | - using a system tool (like dd) create a random file | |
223 | - call construct_pmem_bdev with path pointing to that file | |
224 | - return code != 0, error code = ENOTBLK | |
225 | ||
226 | #### construct_pmem_bdev_tc4 | |
227 | Negative test for constructing pmem bdevs with pmemobj instead of pmemblk pool. | |
228 | Steps & expected results: | |
229 | - Using pmem utility tools create pool of OBJ type instead of BLK | |
230 | (if needed utility tools are not available - create random file in filesystem) | |
231 | - call construct_pmem_bdev with path pointing to that pool | |
232 | - return code != 0, error code = ENOTBLK | |
233 | ||
234 | #### construct_pmem_bdev_tc5 | |
235 | Positive test for constructing pmem bdev. | |
236 | Steps & expected results: | |
237 | - call create_pmem_pool with correct arguments | |
238 | - return code = 0, no errors | |
239 | - call pmem_pool_info and check if pmem files exists | |
240 | - return code = 0, no errors | |
241 | - call construct_pmem_bdev with with correct arguments to create a pmem bdev | |
242 | - return code = 0, no errors | |
243 | - using get_bdevs check that pmem bdev was created | |
9f95a23c | 244 | - delete pmem bdev using delete_pmem_bdev |
11fdf7f2 TL |
245 | - return code = 0, no error code |
246 | - delete previously created pmem pool | |
247 | - return code = 0, no error code | |
248 | ||
249 | #### construct_pmem_bdev_tc6 | |
250 | Negative test for constructing pmem bdevs twice on the same pmem. | |
251 | Steps & expected results: | |
252 | - call create_pmem_pool with correct arguments | |
253 | - return code = 0, no errors | |
254 | - call pmem_pool_info and check if pmem files exists | |
255 | - return code = 0, no errors | |
256 | - call construct_pmem_bdev with with correct arguments to create a pmem bdev | |
257 | - return code = 0, no errors | |
258 | - using get_bdevs check that pmem bdev was created | |
259 | - call construct_pmem_bdev again on the same pmem file | |
260 | - return code != 0, error code = EEXIST | |
9f95a23c | 261 | - delete pmem bdev using delete_pmem_bdev |
11fdf7f2 TL |
262 | - return code = 0, no error code |
263 | - delete previously created pmem pool | |
264 | - return code = 0, no error code | |
265 | ||
9f95a23c | 266 | ### delete_pmem_bdev |
11fdf7f2 TL |
267 | |
268 | #### delete_bdev_tc1 | |
9f95a23c | 269 | Positive test for deleting pmem bdevs using delete_pmem_bdev call. |
11fdf7f2 TL |
270 | Steps & expected results: |
271 | - construct malloc and aio bdevs (also NVMe if possible) | |
272 | - all calls - return code = 0, no errors; bdevs created | |
273 | - call create_pmem_pool with correct path argument, | |
274 | block size=512, total size=256M | |
275 | - return code = 0, no errors | |
276 | - call pmem_pool_info and check if pmem file exists | |
277 | - return code = 0, no errors | |
278 | - call construct_pmem_bdev and create a pmem bdev | |
279 | - return code = 0, no errors | |
280 | - using get_bdevs check that pmem bdev was created | |
9f95a23c | 281 | - delete pmem bdev using delete_pmem_bdev |
11fdf7f2 TL |
282 | - return code = 0, no errors |
283 | - using get_bdevs confirm that pmem bdev was deleted and other bdevs | |
284 | were unaffected. | |
285 | ||
9f95a23c | 286 | #### delete_pmem_bdev_tc2 |
11fdf7f2 TL |
287 | Negative test for deleting pmem bdev twice. |
288 | Steps & expected results: | |
289 | - call create_pmem_pool with correct path argument, | |
290 | block size=512, total size=256M | |
291 | - return code = 0, no errors | |
292 | - call pmem_pool_info and check if pmem file exists | |
293 | - return code = 0, no errors | |
294 | - call construct_pmem_bdev and create a pmem bdev | |
295 | - return code = 0, no errors | |
296 | - using get_bdevs check that pmem bdev was created | |
9f95a23c | 297 | - delete pmem bdev using delete_pmem_bdev |
11fdf7f2 TL |
298 | - return code = 0, no errors |
299 | - using get_bdevs confirm that pmem bdev was deleted | |
9f95a23c | 300 | - delete pmem bdev using delete_pmem_bdev second time |
11fdf7f2 TL |
301 | - return code != 0, error code = ENODEV |
302 | ||
303 | ||
304 | ## Integration tests | |
305 | Description of integration tests which run FIO verification traffic against | |
306 | pmem_bdevs used in vhost, iscsi_tgt and nvmf_tgt applications can be found in | |
307 | test directories for these components: | |
308 | - spdk/test/vhost | |
309 | - spdk/test/nvmf | |
310 | - spdk/test/iscsi_tgt |