test/lvol: use vbdev_split to reduce size for testing
Some of the lvol tests use NVMe namespaces instead of malloc - use vbdev_split to reduce the size of the bdev on the NVMe namespace which will help speed up the tests. Signed-off-by: Jim Harris <james.r.harris@intel.com> Change-Id: I1384ec97badf60a0f5e6aac91a8c47fb6dc93cd5 Reviewed-on: https://review.gerrithub.io/399959 Tested-by: SPDK Automated Test System <sys_sgsw@intel.com> Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com> Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
This commit is contained in:
parent
0f2ef7cf22
commit
793df6adff
@ -93,6 +93,10 @@ function vhost_start()
|
||||
{
|
||||
modprobe nbd
|
||||
touch $BASE_DIR/vhost.conf
|
||||
# Use Split to make a bdev using just the first 1/4
|
||||
# of the NVMe namespace
|
||||
echo "[Split]" >> $BASE_DIR/vhost.conf
|
||||
echo " Split Nvme0n1 4" >> $BASE_DIR/vhost.conf
|
||||
$TEST_DIR/scripts/gen_nvme.sh >> $BASE_DIR/vhost.conf
|
||||
$TEST_DIR/app/vhost/vhost -c $BASE_DIR/vhost.conf &
|
||||
vhost_pid=$!
|
||||
|
@ -554,7 +554,7 @@ class TestCases(object):
|
||||
def test_case255(self):
|
||||
header(255)
|
||||
base_path = path.dirname(sys.argv[0])
|
||||
base_name = "Nvme0n1"
|
||||
base_name = "Nvme0n1p0"
|
||||
uuid_store = self.c.construct_lvol_store(base_name,
|
||||
self.lvs_name,
|
||||
self.cluster_size)
|
||||
@ -564,7 +564,7 @@ class TestCases(object):
|
||||
fail_count += 1
|
||||
traddr = self._find_traddress_for_nvme("Nvme0")
|
||||
if traddr != -1:
|
||||
self.c.delete_bdev(base_name)
|
||||
self.c.delete_bdev("Nvme0n1")
|
||||
self.c.construct_nvme_bdev("Nvme0", "PCIe", traddr)
|
||||
# wait 1 second to allow time for lvolstore tasting
|
||||
sleep(1)
|
||||
@ -942,7 +942,7 @@ class TestCases(object):
|
||||
header(700)
|
||||
fail_count = 0
|
||||
uuid_bdevs = []
|
||||
base_name = "Nvme0n1"
|
||||
base_name = "Nvme0n1p0"
|
||||
|
||||
base_path = path.dirname(sys.argv[0])
|
||||
vhost_path = path.join(self.app_path, 'vhost')
|
||||
@ -1048,7 +1048,7 @@ class TestCases(object):
|
||||
|
||||
def test_case701(self):
|
||||
header(701)
|
||||
base_name = "Nvme0n1"
|
||||
base_name = "Nvme0n1p0"
|
||||
uuid_store = self.c.construct_lvol_store(base_name,
|
||||
self.lvs_name,
|
||||
self.cluster_size)
|
||||
@ -1056,7 +1056,7 @@ class TestCases(object):
|
||||
self.cluster_size)
|
||||
traddr = self._find_traddress_for_nvme("Nvme0")
|
||||
if traddr != -1:
|
||||
self.c.delete_bdev(base_name)
|
||||
self.c.delete_bdev("Nvme0n1")
|
||||
self.c.construct_nvme_bdev("Nvme0", "PCIe", traddr)
|
||||
# wait 1 second to allow time for lvolstore tasting
|
||||
sleep(1)
|
||||
|
Loading…
Reference in New Issue
Block a user