]> git.proxmox.com Git - ceph.git/blame - ceph/src/spdk/test/pmem/test_plan.md
bump version to 15.2.11-pve1
[ceph.git] / ceph / src / spdk / test / pmem / test_plan.md
CommitLineData
11fdf7f2
TL
1# PMEM bdev feature test plan
2
3## Objective
4The purpose of these tests is to verify possibility of using pmem bdev
5configuration in SPDK by running functional tests FIO traffic verification
6tests.
7
8## Configuration
9Configuration in tests is to be done using example stub application
10(spdk/example/bdev/io/bdev_io).
11All possible management is done using RPC calls with the exception of
12use of split bdevs which have to be configured in .conf file.
13
14Functional tests are executed as scenarios - sets of smaller test steps
15in which results and return codes of RPC calls are validated.
16Some configuration calls may also additionally be validated
17by use of "get" (e.g. get_bdevs) RPC calls, which provide additional
18information for veryfing results.
19In some steps additional write/read operations will be performed on
20PMEM bdevs in order to check IO path correct behavior.
21
22FIO traffic verification tests will serve as integration tests and will
23be executed to config correct behavior of PMEM bdev when working with vhost,
24nvmf_tgt and iscsi_tgt applications.
25
26## Functional tests
27
28### pmem_pool_info
29
30#### pmem_pool_info_tc1
31Negative test for checking pmem pool file.
32Call with missing path argument.
33Steps & 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
38Negative test for checking pmem pool file.
39Call with non-existant path argument.
40Steps & 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
45Negative test for checking pmem pool file.
46Call with other type of pmem pool file.
47Steps & 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
54Positive test for checking pmem pool file.
55Call with existing pmem pool file.
56Steps & 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
61From libpmemblk documentation:
62- PMEM block size has to be bigger than 512 internal blocks; if lower value
63is used then PMEM library will silently round it up to 512 which is defined
64in pmem/libpmemblk.h file as PMEMBLK_MIN_BLK.
65- Total pool size cannot be less than 16MB which is defined i
66pmem/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
70Negative test case for creating a new pmem.
71Call create_pmem_pool with missing arguments.
72Steps & 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
87Negative test case for creating a new pmem.
88Call create_pmem_pool with non existing path argument.
89Steps & 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
96Positive test case for creating a new pmem pool on disk space.
97Steps & expected results:
98- call create_pmem_pool with correct path argument,
99blocksize=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
107Positive test case for creating a new pmem pool in RAM space.
108# TODO: Research test steps for creating a pool in RAM!!!
109Steps & expected results:
110- call create_pmem_pool with correct path argument,
111blocksize=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
119Negative test case for creating two pmems with same path.
120Steps & expected results:
121- call create_pmem_pool with correct path argument,
122blocksize=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,
127blocksize=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
130available 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
136Positive test case for creating pmem pool file with various block sizes.
137Steps & expected results:
138- call create_pmem_pool with correct path argument, total size=256MB
139with 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;
141For pool files created with block size <512 their block size should be rounded up
142to 512; other pool files should have the same block size as specified in create
143command
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
148Negative test case for creating pmem pool file with total size of less than 16MB.
149Steps & expected results:
150- call create_pmem_pool with correct path argument, block size=512 and
151total 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
157Negative test case for creating pmem pool file with less than 256 blocks.
158Steps & expected results:
159- call create_pmem_pool with correct path argument, block size=128k and
160total 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
168Negative test case for deleting a pmem.
169Call delete_pmem_pool on non-exisiting pmem.
170Steps & 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
175Negative test case for deleting a pmem.
176Call delete_pmem_pool on a file of wrong type
177Steps & 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
184Positive test case for creating and deleting a pemem.
185Steps & 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
196Negative test case for creating and deleting a pemem.
197Steps & 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
205Negative test for constructing new pmem bdev.
206Call create_pmem_bdev with missing argument.
207Steps & expected results:
208- Call construct_pmem_bdev with missing path argument.
209- Check that return code != 0
210
211#### construct_pmem_bdev_tc2
212Negative test for constructing new pmem bdev.
213Call construct_pmem_bdev with not existing path argument.
214Steps & 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
220Negative test for constructing pmem bdevs with random file instead of pmemblk pool.
221Steps & 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
227Negative test for constructing pmem bdevs with pmemobj instead of pmemblk pool.
228Steps & 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
235Positive test for constructing pmem bdev.
236Steps & 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
250Negative test for constructing pmem bdevs twice on the same pmem.
251Steps & 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 269Positive test for deleting pmem bdevs using delete_pmem_bdev call.
11fdf7f2
TL
270Steps & 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,
274block 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
284were unaffected.
285
9f95a23c 286#### delete_pmem_bdev_tc2
11fdf7f2
TL
287Negative test for deleting pmem bdev twice.
288Steps & expected results:
289- call create_pmem_pool with correct path argument,
290block 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
305Description of integration tests which run FIO verification traffic against
306pmem_bdevs used in vhost, iscsi_tgt and nvmf_tgt applications can be found in
307test directories for these components:
308- spdk/test/vhost
309- spdk/test/nvmf
310- spdk/test/iscsi_tgt