Commit 3effc335 authored by Pawel Kaminski's avatar Pawel Kaminski Committed by Jim Harris
Browse files

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



Change-Id: I65c25842b9e965ea0816f9dfc8ef62b820da001e
Signed-off-by: default avatarPawel Kaminski <pawelx.kaminski@intel.com>
Reviewed-on: https://review.gerrithub.io/388813


Tested-by: default avatarSPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: default avatarKarol Latecki <karol.latecki@intel.com>
Reviewed-by: default avatarJim Harris <james.r.harris@intel.com>
parent 08ff0eaa
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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
+27 −0
Original line number Diff line number Diff line
@@ -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')
+14 −0
Original line number Diff line number Diff line
@@ -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