test/lvol: Check if lvol store exists after vhost reboot

Change-Id: I65c25842b9e965ea0816f9dfc8ef62b820da001e
Signed-off-by: Pawel Kaminski <pawelx.kaminski@intel.com>
Reviewed-on: https://review.gerrithub.io/388813
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
This commit is contained in:
Pawel Kaminski 2017-11-23 20:47:17 +01:00 committed by Jim Harris
parent 08ff0eaa9e
commit 3effc335eb
3 changed files with 42 additions and 1 deletions

View File

@ -155,7 +155,7 @@ fi
if [ $SPDK_TEST_LVOL -eq 1 ]; then
timing_enter lvol
test_cases="1,50,51,52,53,100,101,102,250,251,252,253,255,"
test_cases+="300,301,450,451,452,550,600,601,650,700"
test_cases+="300,301,450,451,452,550,600,601,650,651,700"
run_test ./test/lvol/lvol.sh --test-cases=$test_cases
timing_exit lvol
fi

View File

@ -52,6 +52,7 @@ def header(num):
600: 'construct_lvol_store_with_cluster_size_max',
601: 'construct_lvol_store_with_cluster_size_min',
650: 'tasting_positive',
651: 'tasting_lvol_store_positive',
700: 'SIGTERM',
}
print("========================================================")
@ -770,6 +771,32 @@ class TestCases(object):
footer(650)
return fail_count
def test_case651(self):
header(651)
base_path = path.dirname(sys.argv[0])
vhost_path = path.join(self.app_path, 'vhost')
config_path = path.join(base_path, 'vhost.conf')
pid_path = path.join(base_path, 'vhost.pid')
base_name = "Nvme0n1"
uuid_store = self.c.construct_lvol_store(base_name,
self.lvs_name,
self.cluster_size)
fail_count = self.c.check_get_lvol_stores(base_name, uuid_store,
self.cluster_size)
fail_count += self._stop_vhost(pid_path)
remove(pid_path)
if self._start_vhost(vhost_path, config_path, pid_path) != 0:
fail_count += 1
footer(651)
return fail_count
if self.c.check_get_lvol_stores(base_name, uuid_store,
self.cluster_size) != 0:
fail_count += 1
if self.c.destroy_lvol_store(uuid_store) != 0:
fail_count += 1
footer(651)
return fail_count
def test_case700(self):
header(700)
pid_path = path.join(self.path, 'vhost.pid')

View File

@ -590,6 +590,20 @@ Expected results:
- all RPC configuration calls successful, return code = 0
- no other operation fails
#### TEST CASE 651 - Name: tasting_lvol_store_positive
Positive test for tasting lvol store.
Steps:
- run vhost app with NVMe bdev
- construct lvol store on NVMe bdev
- stop vhost
- start vhost
- 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
### SIGTERM
#### TEST CASE 700 - Name: SIGTERM