test/lvol: rewrite destroy_lvol_store_nonexistent_lvs_uuid to bash

Again, smuggle it into one of the existing test case
to create more opportunities for this test to fail.
We'll now trying to remove an inexistent lvolstore
when there's a valid lvolstore present.

Change-Id: I64a72a8ffe38ba6939d0818d2c6c81e49748a33c
Signed-off-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Signed-off-by: Pawel Kaminski <pawelx.kaminski@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/462468
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>
Reviewed-by: Maciej Szwed <maciej.szwed@intel.com>
This commit is contained in:
Darek Stojaczyk 2019-07-18 14:19:46 +02:00 committed by Jim Harris
parent 0fa664624c
commit a531e9d70c
3 changed files with 6 additions and 21 deletions

View File

@ -14,6 +14,12 @@ function test_construct_lvs() {
lvs_uuid=$(rpc_cmd bdev_lvol_create_lvstore "$malloc_name" lvs_test)
lvs=$(rpc_cmd bdev_lvol_get_lvstores -u "$lvs_uuid")
# try to destroy inexistent lvs, this should obviously fail
dummy_uuid="00000000-0000-0000-0000-000000000000"
rpc_cmd bdev_lvol_delete_lvstore -u "$dummy_uuid" && false
# our lvs should not be impacted
rpc_cmd bdev_lvol_get_lvstores -u "$lvs_uuid"
# verify it's there
[ "$(jq -r '.[0].uuid' <<< "$lvs")" = "$lvs_uuid" ]
[ "$(jq -r '.[0].name' <<< "$lvs")" = "lvs_test" ]

View File

@ -23,7 +23,6 @@ function usage() {
echo " --test-cases= List test cases which will be run:
254: 'destroy_after_bdev_lvol_resize_positive',
255: 'delete_lvol_store_persistent_positive',
300: 'bdev_lvol_delete_lvstore_nonexistent_lvs_uuid',
350: 'nested_destroy_logical_volume_negative',
400: 'nested_construct_logical_volume_positive',
550: 'delete_bdev_positive',

View File

@ -114,8 +114,6 @@ def case_message(func):
# bdev_lvol_delete_lvstore - positive tests
254: 'destroy_after_bdev_lvol_resize_positive',
255: 'delete_lvol_store_persistent_positive',
# bdev_lvol_delete_lvstore - negative tests
300: 'bdev_lvol_delete_lvstore_nonexistent_lvs_uuid',
550: 'delete_bdev_positive',
551: 'delete_lvol_bdev',
552: 'bdev_lvol_delete_lvstore_with_clones',
@ -398,24 +396,6 @@ class TestCases(object):
# - no other operation fails
return fail_count
@case_message
def test_case300(self):
"""
bdev_lvol_delete_lvstore_nonexistent_lvs_uuid
Call bdev_lvol_delete_lvstore with nonexistent logical_volumes name
exist in configuration.
"""
fail_count = 0
# try to call bdev_lvol_delete_lvstore with lvs_uuid which does not exist
if self.c.bdev_lvol_delete_lvstore(self._gen_lvs_uuid()) == 0:
fail_count += 1
# Expected result:
# - return code != 0
# - Error code response printed to stdout
return fail_count
@case_message
def test_case550(self):
"""