test/doc: Remove snapshot and clone test plan.

Move logical volume tasting test plan into script.

Change-Id: I2da9ab9348a01df86489c81b6debea4f564cc318
Signed-off-by: Pawel Kaminski <pawelx.kaminski@intel.com>
Reviewed-on: https://review.gerrithub.io/419383
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com>
This commit is contained in:
Pawel Kaminski 2018-07-16 13:16:27 -04:00 committed by Ben Walker
parent d3c6335bc9
commit 46412580ee
2 changed files with 23 additions and 174 deletions

View File

@ -1119,6 +1119,15 @@ class TestCases(object):
@case_message
def test_case700(self):
"""
tasting_positive
Positive test for tasting a multi lvol bdev configuration.
Create a lvol store with some lvol bdevs on NVMe drive and restart vhost app.
After restarting configuration should be automatically loaded and should be exactly
the same as before restarting.
Check that running configuration can be modified after restarting and tasting.
"""
fail_count = 0
uuid_bdevs = []
base_name = "Nvme0n1p0"
@ -1147,6 +1156,7 @@ class TestCases(object):
self.lbd_name + str(i),
size)
uuid_bdevs.append(uuid_bdev)
# Using get_bdevs command verify lvol bdevs were correctly created
fail_count += self.c.check_get_bdevs_methods(uuid_bdev, size)
old_bdevs = sorted(self.c.get_lvol_bdevs(), key=lambda x: x["name"])
@ -1203,6 +1213,8 @@ class TestCases(object):
uuid_bdevs = []
# Create lvol store on NVMe bdev, create ten lvol bdevs on lvol store and
# verify all configuration call results
uuid_store = self.c.construct_lvol_store(base_name,
self.lvs_name,
self.cluster_size)
@ -1217,6 +1229,7 @@ class TestCases(object):
uuid_bdevs.append(uuid_bdev)
fail_count += self.c.check_get_bdevs_methods(uuid_bdev, size)
# Destroy lvol store
if self.c.destroy_lvol_store(uuid_store) != 0:
fail_count += 1
@ -1224,7 +1237,13 @@ class TestCases(object):
@case_message
def test_case701(self):
"""
tasting_lvol_store_positive
Positive test for tasting lvol store.
"""
base_name = "Nvme0n1p0"
# construct lvol store on NVMe bdev
uuid_store = self.c.construct_lvol_store(base_name,
self.lvs_name,
self.cluster_size)
@ -1232,15 +1251,19 @@ class TestCases(object):
self.cluster_size)
traddr = self._find_traddress_for_nvme("Nvme0")
if traddr != -1:
# delete NVMe bdev
self.c.delete_bdev("Nvme0n1")
# add NVMe bdev
self.c.construct_nvme_bdev("Nvme0", "PCIe", traddr)
# wait 1 second to allow time for lvolstore tasting
sleep(1)
else:
fail_count += 1
# check if lvol store still exists in vhost configuration
if self.c.check_get_lvol_stores(base_name, uuid_store,
self.cluster_size) != 0:
fail_count += 1
# destroy lvol store from NVMe bdev
if self.c.destroy_lvol_store(uuid_store) != 0:
fail_count += 1
return fail_count

View File

@ -554,180 +554,6 @@ Expected result:
- construct lvol store return code != 0
- Error code response printed to stdout
### logical volume tasting tests
#### TEST CASE 700 - Name: tasting_positive
Positive test for tasting a multi lvol bdev configuration.
Create a lvol store with some lvol bdevs on NVMe drive and restart vhost app.
After restarting configuration should be automatically loaded and should be exactly
the same as before restarting.
Check that running configuration can be modified after restarting and tasting.
Steps:
- run vhost app with NVMe bdev
- construct lvol store on NVMe bdev
- using get_lvol_stores command verify lvol store was correctly created
- construct five lvol bdevs on previously created lvol store;
each lvol bdev size is approximately equal to 2% of total lvol store size
(approximately because of the lvol metadata which consumes some of the space)
- using get_bdevs command verify lvol bdevs were correctly created
- shutdown vhost application by sending SIGTERM signal
- start vhost application with the same NVMe bdev as in the first step
- using get_lvol_stores command verify that previously created lvol strore
was correctly discovered and loaded by tasting feature (including UUID's)
- using get_bdevs command verify that previously created lvol bdevs were
correctly discovered and loaded by tasting feature (including UUID's)
- verify if configuration can be modified after tasting:
construct five more lvol bdevs to fill up loaded lvol store,
delete all existing lvol bdevs,
destroy existing lvol store,
verify removal results using get_lvol_stores and get_bdevs commands
- re-create initial configuration by repeating steps 2-5:
create lvol store on NVMe bdev, create four lvol bdevs on lvol store and
verify all configuration call results
- clean running configuration:
delete all lvol bdevs,
destroy lvol store
verify removal results using get_lvol_stores and get_bdevs commands
Expected results:
- configuration is successfully tasted and loaded after restarting vhost
- lvol store attributes (UUID, total size, cluster size, etc.) remain the same after
loading existing configuration
- lvol bdev attributes (UUID, size, etc.) remain the same after
loading existing configuration
- all RPC configuration calls successful, return code = 0
- no other operation fails
#### TEST CASE 701 - Name: tasting_lvol_store_positive
Positive test for tasting lvol store.
Steps:
- run vhost app with NVMe bdev
- construct lvol store on NVMe bdev
- delete NVMe bdev
- add NVMe bdev
- check if lvol store still exists in vhost configuration
- destroy lvol store from NVMe bdev
Expected result:
- calls successful (lvol store should be tasted correctly), return code = 0
- no other operation fails
### snapshot and clone
#### TEST CASE 750 - Name: snapshot_readonly
- constrcut malloc bdev
- construct lvol store on malloc bdev
- construct lvol bdev
- fill lvol bdev with 100% of its space using write operation
- create snapshot of created lvol bdev
- check if created snapshot has readonly status
- try to perform write operation on created snapshot
- check if write failed
- destroy lvol bdev
- destroy lvol store
- destroy malloc bdev
Expected result:
- calls successful, return code = 0
- no other operation fails
#### TEST CASE 751 - Name: snapshot_compare_with_lvol_bdev
- construct malloc bdev
- construct lvol store on malloc bdev
- construct thin provisioned lvol bdev with size less than 25% of lvs
- construct thick provisioned lvol bdev with size less than 25% of lvs
- fill first lvol bdev with 50% of its space
- fill second lvol bdev with 100% of their space
- create snapshots of created lvol bdevs and check that they are readonly
- check using cmp program if data on corresponding lvol bdevs
and snapshots are the same
- fill lvol bdev again with 50% of its space using write operation
- compare thin provisioned bdev clusters with snapshot clusters
and check that 50% of data are the same and 50% are different
- destroy lvol bdevs
- destroy lvol store
- destroy malloc bdev
Expected result:
- calls successful, return code = 0
- removing snapshot should always end with success
- no other operation fails
#### TEST CASE 752 - Name: snapshot_during_io_traffic
- construct malloc bdev
- construct lvol store on malloc bdev
- construct thin provisioned lvol bdev
- perform write operation with verification to created lvol bdev
- during write operation create snapshot of created lvol bdev
- check that snapshot has been created successfully and check that it is readonly
- check that write operation ended with success
- destroy lvol bdev
- destroy lvol store
- destroy malloc bdev
Expected result:
- calls successful, return code = 0
- no other operation fails
#### TEST CASE 753 - Name: snapshot_of_snapshot
- construct malloc bdev
- construct lvol store on malloc bdev
- construct thick provisioned lvol bdev
- create snapshot of created lvol bdev and check that it is readonly
- create snapshot of previously created snapshot
- check if operation fails
- destroy lvol bdev
- destroy lvol store
- destroy malloc bdev
Expected result:
- calls successful, return code = 0
- creating snapshot of snapshot should fail
- no other operation fails
#### TEST CASE 754 - Name: clone_bdev_only
- construct malloc bdev
- construct lvol store on malloc
- construct thick provisioned lvol bdev
- create clone of created lvol bdev
- check if operation fails
- create snapshot of lvol bdev and check that it is readonly
- create clone of created lvol bdev
- check if operation failed
- create clone of snapshot on the same lvs
where snaphot was created
- check if operation ends with success
- check if clone is not readonly
- check that clone is thin provisioned
- destroy lvol bdev
- destroy lvol store
- destroy malloc bdev
Expected result:
- calls successful, return code = 0
- cloning thick provisioned lvol bdev should fail
- no other operation fails
#### TEST CASE 755 - Name: clone_writing_to_clone
- construct with malloc bdev
- construct lvol store on malloc bdev
- construct thick provisioned lvol bdev
- fill lvol bdev with 100% of its space
- create snapshot of thick provisioned lvol bdev
- create two clones of created snapshot
- perform write operation to first clone
and verify that data were written correctly
- check that operation ended with success
- compare second clone with snapshot and check
that data on both bdevs are the same
- destroy lvol bdev
- destroy lvol store
- destroy malloc bdev
Expected result:
- calls successful, return code = 0
- no other operation fails
### logical volume rename tests
#### TEST CASE 800 - Name: rename_positive