test/lvol: rewrite destroy_lvol_store_use_name_positive to bash
The test case covers destroying the lvolstore using its human-friendly name instead of uuid. We destroy lvolstores all over the basic construct tests, so we just smuggle one removal by name into one of those existing test cases. Change-Id: I5027382f727be226f601573367bfcd214baf474a Signed-off-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com> Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/462190 Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by: Ben Walker <benjamin.walker@intel.com> Reviewed-by: Jim Harris <james.r.harris@intel.com>
This commit is contained in:
parent
26b840163c
commit
713a14bd2e
@ -114,7 +114,10 @@ function test_construct_lvs_different_cluster_size() {
|
||||
# clean up
|
||||
rpc_cmd bdev_lvol_delete_lvstore -u "$lvs1_uuid"
|
||||
rpc_cmd bdev_lvol_get_lvstores -u "$lvs1_uuid" && false
|
||||
rpc_cmd bdev_lvol_delete_lvstore -u "$lvs2_uuid"
|
||||
|
||||
# delete the second lvs (using its name only)
|
||||
rpc_cmd bdev_lvol_delete_lvstore -l lvs2_test
|
||||
rpc_cmd bdev_lvol_get_lvstores -l lvs2_test && false
|
||||
rpc_cmd bdev_lvol_get_lvstores -u "$lvs2_uuid" && false
|
||||
|
||||
rpc_cmd bdev_malloc_delete "$malloc1_name"
|
||||
|
@ -21,7 +21,6 @@ function usage() {
|
||||
echo " --block-size Block size for this bdev"
|
||||
echo "-x set -x for script debug"
|
||||
echo " --test-cases= List test cases which will be run:
|
||||
251: 'bdev_lvol_delete_lvstore_use_name_positive',
|
||||
252: 'bdev_lvol_delete_lvstore_with_lvol_bdev_positive',
|
||||
253: 'destroy_multi_logical_volumes_positive',
|
||||
254: 'destroy_after_bdev_lvol_resize_positive',
|
||||
|
@ -112,7 +112,6 @@ def case_message(func):
|
||||
def inner(*args, **kwargs):
|
||||
test_name = {
|
||||
# bdev_lvol_delete_lvstore - positive tests
|
||||
251: 'bdev_lvol_delete_lvstore_use_name_positive',
|
||||
252: 'bdev_lvol_delete_lvstore_with_lvol_bdev_positive',
|
||||
253: 'destroy_multi_logical_volumes_positive',
|
||||
254: 'destroy_after_bdev_lvol_resize_positive',
|
||||
@ -293,37 +292,6 @@ class TestCases(object):
|
||||
lvs = self.c.bdev_lvol_get_lvstores(lvs_name)[0]
|
||||
return int(int(lvs['cluster_size']) / MEGABYTE)
|
||||
|
||||
@case_message
|
||||
def test_case251(self):
|
||||
"""
|
||||
bdev_lvol_delete_lvstore_use_name_positive
|
||||
|
||||
Positive test for destroying a logical volume store using
|
||||
lvol store name instead of uuid for reference.
|
||||
Call bdev_lvol_delete_lvstore with correct logical volume name
|
||||
"""
|
||||
# Create malloc bdev
|
||||
base_name = self.c.bdev_malloc_create(self.total_size,
|
||||
self.block_size)
|
||||
# Construct lvol store on created malloc bdev
|
||||
uuid_store = self.c.bdev_lvol_create_lvstore(base_name,
|
||||
self.lvs_name)
|
||||
# Check correct uuid values in response bdev_lvol_get_lvstores command
|
||||
fail_count = self.c.check_bdev_lvol_get_lvstores(base_name, uuid_store,
|
||||
self.cluster_size)
|
||||
# Destroy lvol store
|
||||
fail_count += self.c.bdev_lvol_delete_lvstore(self.lvs_name)
|
||||
# Check correct response bdev_lvol_get_lvstores command
|
||||
if self.c.check_bdev_lvol_get_lvstores("", "", "") == 1:
|
||||
fail_count += 1
|
||||
fail_count += self.c.bdev_malloc_delete(base_name)
|
||||
|
||||
# Expected result:
|
||||
# - calls successful, return code = 0
|
||||
# - bdev_lvol_get_lvstores: response should be of no value after destroyed lvol store
|
||||
# - no other operation fails
|
||||
return fail_count
|
||||
|
||||
@case_message
|
||||
def test_case252(self):
|
||||
"""
|
||||
|
Loading…
Reference in New Issue
Block a user